:root {
    --mobile-bg: #f8f4e9;
    --mobile-panel: rgba(255, 253, 247, 0.94);
    --mobile-panel-strong: #fffdf7;
    --mobile-green: #2f9857;
    --mobile-green-dark: #073b2d;
    --mobile-muted: #5f746b;
    --mobile-line: rgba(9, 59, 45, 0.12);
    --mobile-shadow: 0 18px 48px rgba(45, 64, 51, 0.16);
    --mobile-soft-shadow: 0 10px 26px rgba(45, 64, 51, 0.11);
    --nav-height: 90px;
    --mobile-shell-width: min(100%, 560px);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--mobile-bg);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: var(--mobile-bg);
    color: var(--mobile-green-dark);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.mobile-app {
    min-height: 100vh;
    background-image:
        linear-gradient(rgba(255, 250, 239, 0.34), rgba(255, 250, 239, 0.56)),
        var(--mobile-bg-image);
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
}

.mobile-app[data-theme="forest"] {
    --mobile-bg-image: url("../../images/mobile/background/mobile-forest-bg.png");
}

.mobile-app[data-theme="sunset"] {
    --mobile-bg-image: url("../../images/mobile/background/mobile-sunset-bg.webp");
}

.mobile-app[data-theme="beach"] {
    --mobile-bg-image: url("../../images/mobile/background/mobile-beach-bg.webp");
}

.mobile-app[data-theme="minimal"] {
    --mobile-bg-image: url("../../images/mobile/background/mobile-minimal-bg.webp");
}

.mobile-app[data-theme="night"] {
    --mobile-bg-image: url("../../images/mobile/background/mobile-night-bg.webp");
}

.mobile-root {
    width: var(--mobile-shell-width);
    min-height: 100vh;
    margin: 0 auto;
    padding: max(14px, env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom));
}

.mobile-header {
    display: grid;
    position: relative;
    z-index: 30;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-height: 112px;
    margin: 0 0 12px;
}

[data-page="home"] .mobile-root {
    padding-top: max(6px, env(safe-area-inset-top));
    /* Keep the final home section 4px above the fixed navigation. */
    padding-bottom: calc(74px + max(10px, env(safe-area-inset-bottom)));
}

[data-page="home"] .mobile-header {
    min-height: 92px;
    margin-bottom: 8px;
}

[data-page="home"] .brand-lockup {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 7px;
}

[data-page="home"] .brand-logo {
    width: 40px;
    height: 40px;
}

[data-page="home"] .brand-title {
    font-size: 19px;
}

[data-page="home"] .brand-subtitle {
    margin-top: 2px;
    font-size: 12px;
}

[data-page="home"] .mobile-header .pill-button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
}

.brand-lockup {
    min-width: 0;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    width: 100%;
    min-width: 0;
}

.mobile-header .pill-button {
    min-height: 42px;
    padding: 0 11px;
    justify-self: auto;
}

.header-select {
    gap: 5px;
    padding-right: 8px;
}

.header-select select {
    max-width: 96px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--mobile-green-dark);
    font: inherit;
    font-size: 13px;
    font-weight: 900;
}

.mobile-language-picker {
    position: relative;
    z-index: 40;
}

.mobile-language-toggle,
.mobile-language-option {
    border: 0;
    color: var(--mobile-green-dark);
    font: inherit;
    font-weight: 900;
}

.mobile-language-toggle {
    min-height: 42px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--mobile-line);
    border-radius: 999px;
    background: linear-gradient(135deg, #ffe7e3, #ecfbef);
    box-shadow: var(--mobile-soft-shadow);
    white-space: nowrap;
}

[data-page="home"] .mobile-language-toggle {
    min-height: 34px;
    padding: 0 8px;
    font-size: 11px;
}

.mobile-language-chevron {
    margin-left: 1px;
    font-size: 16px;
    transform: translateY(-2px);
}

.mobile-language-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 7px);
    right: 0;
    display: none;
    min-width: 168px;
    padding: 6px;
    border: 1px solid rgba(9, 59, 45, 0.14);
    border-radius: 16px;
    background: rgba(255, 253, 247, 0.98);
    box-shadow: 0 16px 38px rgba(45, 64, 51, 0.2);
}

.mobile-language-picker.is-open .mobile-language-menu {
    display: grid;
    gap: 3px;
}

.mobile-language-option {
    width: 100%;
    min-height: 38px;
    padding: 7px 8px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 11px;
    background: transparent;
    text-align: left;
}

.mobile-language-option.is-selected {
    background: #e4f5e7;
}

.mobile-language-flag {
    position: relative;
    width: 25px;
    height: 17px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(12, 52, 35, 0.16);
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.mobile-language-flag.flag-zh { background: #de2910; }
.mobile-language-flag.flag-zh::after {
    content: "★";
    position: absolute;
    top: -3px;
    left: 3px;
    color: #ffde00;
    font-size: 14px;
}

.mobile-language-flag.flag-en {
    background: repeating-linear-gradient(to bottom, #b22234 0 2px, #fff 2px 4px);
}
.mobile-language-flag.flag-en::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 11px;
    height: 10px;
    background: #3c3b6e;
}

.mobile-language-flag.flag-es {
    background: linear-gradient(to right, #006847 0 33.33%, #fff 33.33% 66.66%, #ce1126 66.66% 100%);
}
.mobile-language-flag.flag-es::after {
    content: "•";
    position: absolute;
    top: 1px;
    left: 10px;
    color: #8a6b27;
    font-size: 12px;
}

[data-page="home"] .header-select select {
    max-width: 72px;
    font-size: 12px;
}

.brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 14px;
}

.brand-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.05;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-subtitle {
    margin: 4px 0 0;
    color: var(--mobile-muted);
    font-size: 13px;
    font-weight: 760;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pill-button,
.icon-button,
.primary-button,
.soft-button,
.danger-button {
    border: 1px solid var(--mobile-line);
    border-radius: 999px;
    color: var(--mobile-green-dark);
    background: rgba(255, 253, 247, 0.88);
    box-shadow: var(--mobile-soft-shadow);
    font-weight: 850;
}

.pill-button {
    min-height: 44px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.icon-button {
    width: 52px;
    height: 52px;
    display: inline-grid;
    place-items: center;
    font-size: 24px;
    border-radius: 16px;
}

.page-title > .icon-button {
    color: #1677d2;
    font-size: 34px;
    font-weight: 950;
}

.back-icon-button {
    padding: 7px;
}

.back-nav-icon {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.soft-button {
    min-height: 48px;
    padding: 0 22px;
}

.primary-button {
    min-height: 48px;
    padding: 0 26px;
    color: #fff;
    background: linear-gradient(135deg, #42b76b, #23894c);
    border-color: rgba(35, 137, 76, 0.5);
}

.danger-button {
    min-height: 48px;
    padding: 0 22px;
    color: #d83225;
}

.hero-card,
.mobile-section,
.stats-strip,
.settings-panel,
.classroom-card,
.reader-meta-card {
    border: 1px solid var(--mobile-line);
    background: var(--mobile-panel);
    border-radius: 24px;
    box-shadow: var(--mobile-soft-shadow);
}

.hero-card {
    min-height: 132px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 45%;
    overflow: hidden;
    margin-bottom: 14px;
}

.home-hero {
    min-height: 168px;
    margin-bottom: 4px;
    display: block;
    padding: 0;
    background: rgba(255, 253, 247, 0.68);
}

.home-hero-image {
    display: block;
    width: 100%;
    min-height: 168px;
    object-fit: contain;
}

html[lang="zh-CN"] .home-hero {
    min-height: 178px;
}

html[lang="zh-CN"] .home-hero-image {
    min-height: 178px;
}

.hero-copy {
    padding: 18px 0 18px 18px;
    align-self: center;
}

.hero-kicker {
    margin: 0 0 7px;
    color: #3f963d;
    font-size: 16px;
    font-weight: 900;
}

.hero-title {
    margin: 0;
    font-size: clamp(24px, 7vw, 31px);
    line-height: 1.08;
    font-weight: 950;
}

.hero-text {
    margin: 10px 0 0;
    color: #31483f;
    line-height: 1.45;
    font-size: 15px;
}

.hero-image,
.classroom-hero-image {
    width: 100%;
    height: 100%;
    min-height: 148px;
    object-fit: cover;
    object-position: center;
    opacity: 0.95;
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mode-grid > * {
    min-width: 0;
}

.home-mode-grid {
    gap: 0;
}

.home-mode-grid .mode-card {
    min-height: auto;
    border-radius: 0;
    padding: 0;
}

.home-primary-modes {
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}

.primary-modes-image {
    position: relative;
    width: 100%;
    --primary-start-width: 18.3%;
    --primary-start-height: 9%;
    --primary-left-start: 4.9%;
    --primary-right-start: 51.9%;
}

.primary-modes-image--zh {
    --primary-top-start: 35.8%;
    --primary-bottom-start: 80.5%;
}

.primary-modes-image--en {
    --primary-top-start: 36.4%;
    --primary-bottom-start: 82.8%;
}

.primary-modes-image--es {
    --primary-top-start: 37.8%;
    --primary-bottom-start: 85.5%;
}

.primary-modes-image > img {
    display: block;
    width: 100%;
    height: auto;
}

.primary-mode-hotspot {
    position: absolute;
    z-index: 1;
    width: var(--primary-start-width);
    height: var(--primary-start-height);
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
}

.primary-mode-hotspot:focus-visible {
    outline: 3px solid #173f87;
    outline-offset: 2px;
}

.primary-mode-hotspot--quick30,
.primary-mode-hotspot--daily3 {
    left: var(--primary-left-start);
}

.primary-mode-hotspot--gentle1,
.primary-mode-hotspot--deep5 {
    left: var(--primary-right-start);
}

.primary-mode-hotspot--quick30,
.primary-mode-hotspot--gentle1 {
    top: var(--primary-top-start);
}

.primary-mode-hotspot--daily3,
.primary-mode-hotspot--deep5 {
    top: var(--primary-bottom-start);
}

.home-mode-grid .mode-time {
    font-size: 30px;
}

.home-mode-grid .mode-title {
    margin: 5px 0 33px;
    max-width: calc(100% - 62px);
    font-size: 14px;
}

.home-mode-grid .mode-thumb {
    top: 38px;
    right: 9px;
    width: 62px;
    height: 62px;
}

.home-mode-grid .mode-start {
    min-width: 86px;
    min-height: 30px;
    bottom: 8px;
    padding: 0 10px;
    font-size: 13px;
}

.mode-card {
    min-height: 164px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--mobile-line);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 250, 241, 0.88));
    box-shadow: var(--mobile-soft-shadow);
    padding: 14px 12px 12px;
    text-align: left;
}

.mode-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(233, 246, 255, 0.9));
}

.mode-card:nth-child(3) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 245, 222, 0.9));
}

.mode-card:nth-child(4) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(246, 237, 255, 0.9));
}

.mode-time {
    display: block;
    color: var(--mobile-green);
    font-size: 29px;
    line-height: 0.9;
    font-weight: 950;
}

.mode-title {
    margin: 7px 0 46px;
    max-width: calc(100% - 48px);
    font-size: 13px;
    line-height: 1.1;
    font-weight: 900;
}

.mode-thumb {
    position: absolute;
    right: 6px;
    top: 58px;
    bottom: auto;
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.mode-start {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    min-width: 96px;
    min-height: 32px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #42b76b, #23894c);
    font-weight: 900;
    font-size: 15px;
}

.mode-image-card,
.mode-image-card:nth-child(2),
.mode-image-card:nth-child(3),
.mode-image-card:nth-child(4) {
    display: block;
    min-height: 0;
    aspect-ratio: 1448 / 1086;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.mode-card-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.home-mode-grid .mode-card-image {
    transform: none;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 8px 0;
    padding: 12px 6px;
}

.home-stats {
    gap: 0;
    margin: 4px 0;
    padding: 15px 8px;
}

.home-stats .stat-mini {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 5px;
    align-items: center;
    text-align: left;
    padding: 0 4px;
}

.home-stats .stat-mini img {
    grid-row: 1 / 3;
    width: 38px;
    height: 38px;
}

.home-stats .stat-mini span {
    margin: 0;
    font-size: 11px;
    line-height: 1.05;
}

.home-stats .stat-mini strong {
    margin: 1px 0 0;
    font-size: 16px;
    line-height: 1.05;
}

.stat-mini {
    min-width: 0;
    text-align: center;
    border-right: 1px solid var(--mobile-line);
}

.stat-mini:last-child {
    border-right: 0;
}

.stat-mini img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.stat-mini span {
    display: block;
    margin-top: 3px;
    color: var(--mobile-muted);
    font-size: 11px;
    font-weight: 760;
}

.stat-mini strong {
    display: block;
    margin-top: 1px;
    font-size: 18px;
    font-weight: 950;
}

.mobile-section {
    margin: 14px 0;
    padding: 14px;
}

.home-section {
    margin: 4px 0;
    padding: 8px;
    border-radius: 18px;
}

.home-section .section-head {
    margin-bottom: 4px;
}

.home-section .section-head h2 {
    font-size: 15px;
}

.home-section .link-button {
    font-size: 12px;
}

[data-page="classroom"] .mobile-section {
    margin: 4px 0;
    padding: 10px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-head h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 950;
}

.link-button {
    border: 0;
    background: transparent;
    color: #54645f;
    font-weight: 820;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.h-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 37%;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-inline: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.h-scroll::-webkit-scrollbar {
    display: none;
}

.small-mode {
    min-height: 132px;
    padding: 10px;
    scroll-snap-align: start;
    border: 1px solid var(--mobile-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    text-align: left;
}

.home-mode-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    overflow: hidden;
    padding: 1px 0 3px;
}

.home-mode-strip .small-mode {
    min-height: 116px;
    padding: 7px;
    border-radius: 13px;
    scroll-snap-align: start;
}

.home-mode-strip .small-mode img {
    aspect-ratio: 1.25;
    border-radius: 10px;
}

.small-mode-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 4px;
    margin-top: 5px;
}

.small-mode-line strong {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    overflow-wrap: normal;
    word-break: normal;
}

.small-mode-line .duration-chip {
    grid-column: 2;
    justify-self: end;
    min-height: 18px;
    padding: 0 5px;
    font-size: 9px;
}

.home-mode-strip .small-mode strong {
    font-size: 10px;
    line-height: 1.12;
}

.mode-all-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.small-mode img,
.care-card img {
    width: 100%;
    aspect-ratio: 1.3;
    object-fit: cover;
    object-position: top center;
    border-radius: 12px;
}

.small-mode strong,
.care-card strong {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.15;
}

.care-card strong {
    margin-top: 0;
}

.duration-chip,
.category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: #17673b;
    background: #dff5dc;
    font-size: 12px;
    font-weight: 900;
}

.care-card {
    min-width: 0;
    border: 1px solid var(--mobile-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    overflow: hidden;
    text-align: left;
}

.care-card img {
    display: block;
    border-radius: 0;
    aspect-ratio: 1.42;
    object-position: top center;
}

.home-card-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.home-card-strip .care-card {
    border-radius: 13px;
}

.home-card-strip .care-card img {
    aspect-ratio: 1.95;
}

.home-card-strip .care-card-body {
    padding: 5px;
}

.home-card-strip .care-card strong {
    font-size: 10px;
    line-height: 1.1;
}

.care-card-body {
    padding: 9px;
}

.podcast-list {
    display: grid;
    gap: 9px;
}

.home-podcast-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.podcast-card {
    min-width: 0;
    min-height: 102px;
    display: grid;
    align-content: space-between;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--mobile-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
}

.podcast-card .podcast-title {
    font-size: 10px;
    line-height: 1.16;
}

.podcast-card-footer {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--mobile-green-dark);
}

.podcast-card .podcast-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 17px;
}

.podcast-card .play-button {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

.podcast-row,
.backup-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 9px;
    border: 1px solid var(--mobile-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
}

.podcast-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #e6f4ff, #f4fbff);
    font-size: 30px;
    box-shadow: inset 0 0 0 1px rgba(8, 85, 62, 0.05);
}

.podcast-icon-water {
    background: linear-gradient(135deg, #dff4ff, #fff5cf);
}

.podcast-icon-screen {
    background: linear-gradient(135deg, #e8ddff, #edf8ff);
}

.podcast-icon-night {
    background: linear-gradient(135deg, #efe2ff, #fff2d7);
}

.podcast-icon-time {
    background: linear-gradient(135deg, #def3ff, #f0fff0);
}

.podcast-icon-leaf {
    background: linear-gradient(135deg, #e4f8df, #fff6d6);
}

.podcast-icon-spark {
    background: linear-gradient(135deg, #fff0db, #e9f7e7);
}

.podcast-icon-tone-0 {
    background: linear-gradient(135deg, #def3ff, #f0fff0);
}

.podcast-icon-tone-1 {
    background: linear-gradient(135deg, #fff0cf, #e9f7ff);
}

.podcast-icon-tone-2 {
    background: linear-gradient(135deg, #e8ddff, #fff7dc);
}

.podcast-icon-tone-3 {
    background: linear-gradient(135deg, #dff8ee, #eef2ff);
}

.podcast-icon-tone-4 {
    background: linear-gradient(135deg, #ffe7e3, #ecfbef);
}

.podcast-icon-tone-5 {
    background: linear-gradient(135deg, #e4f8df, #fff0ef);
}

.podcast-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 900;
}

.play-button {
    width: 46px;
    height: 46px;
    border: 1px solid var(--mobile-line);
    border-radius: 999px;
    background: #fff;
    color: var(--mobile-green-dark);
    box-shadow: var(--mobile-soft-shadow);
    font-weight: 950;
}

.mobile-nav {
    position: fixed;
    left: 50%;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 100;
    width: min(calc(100% - 32px), 560px);
    min-height: 70px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 6px;
    border: 1px solid var(--mobile-line);
    border-radius: 22px;
    background: rgba(255, 253, 247, 0.94);
    box-shadow: 0 16px 46px rgba(43, 56, 48, 0.18);
    backdrop-filter: blur(14px);
    transition: transform 0.24s ease, opacity 0.2s ease;
}

.mobile-nav.is-hidden {
    transform: translate(-50%, calc(100% + 28px));
    opacity: 0;
    pointer-events: none;
}

.nav-item {
    min-width: 0;
    min-height: 58px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: #60706d;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 1px;
    font-size: 9px;
    font-weight: 780;
    text-decoration: none;
}

.nav-item svg {
    width: 26px;
    height: 26px;
    stroke-width: 2;
}

.nav-item img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: saturate(0.75) opacity(0.82);
    transition: transform 0.18s ease, filter 0.18s ease;
}

.nav-fallback-icon {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #53b66f, #1e7d47);
    font-size: 23px;
    font-weight: 950;
    font-family: Georgia, "Times New Roman", serif;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.nav-item.is-active {
    color: #0d7f3f;
    background: linear-gradient(135deg, rgba(227, 247, 230, 0.96), rgba(245, 252, 239, 0.96));
}

.nav-item.is-active img {
    transform: translateY(-1px) scale(1.08);
    filter: saturate(1.05) opacity(1);
}

.nav-item.is-active .nav-fallback-icon {
    transform: translateY(-1px) scale(1.08);
}

.mobile-footer-note {
    margin: 12px 0 6px;
    padding: 10px 12px;
    text-align: center;
    color: rgba(7, 59, 45, 0.68);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 760;
    border-radius: 18px;
    background: rgba(255, 253, 247, 0.42);
}

.mobile-footer-note p {
    margin: 0 0 4px;
}

.mobile-footer-note strong {
    display: block;
    font-size: 12px;
    font-weight: 900;
}

.about-brand {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.about-brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 16px;
}

.about-brand h2,
.about-brand p {
    margin: 0;
}

.about-brand h2 {
    font-size: 24px;
    line-height: 1.05;
}

.about-brand p {
    margin-top: 4px;
    color: var(--mobile-muted);
    font-weight: 800;
}

.about-desktop-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    text-decoration: none;
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 14px;
}

.page-title h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.08;
    font-weight: 950;
}

.practice-title-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.enter-immersive-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.exit-immersive-button,
.exit-immersive-control,
.immersive-speed-control {
    display: none;
}

.practice-stage {
    position: relative;
    height: min(58vh, 480px);
    min-height: 330px;
    overflow: hidden;
    border: 1px solid rgba(48, 151, 94, 0.18);
    border-radius: 28px;
    background: radial-gradient(circle at 50% 50%, rgba(238, 255, 242, 0.95), rgba(226, 245, 233, 0.86));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.single-step-stage {
    height: min(54vh, 430px);
}

.target-orb {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 74px;
    height: 74px;
    margin: -37px 0 0 -37px;
    border-radius: 50%;
    color: #fff;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 34% 28%, #defef4, #18a894 48%, #0e7a70);
    box-shadow: 0 0 0 28px rgba(47, 152, 87, 0.08), 0 18px 44px rgba(25, 99, 83, 0.24);
    transform: translate(-50%, -50%);
    will-change: transform;
}

.mobile-massage-guide {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    pointer-events: none;
    color: var(--mobile-green-dark);
    text-align: center;
}

.practice-stage.is-massage-step .mobile-massage-guide {
    display: grid;
}

.practice-stage.is-massage-step .target-orb {
    opacity: 0 !important;
}

.mobile-face-guide {
    position: relative;
    width: 176px;
    height: 176px;
    border-radius: 50%;
    border: 2px solid rgba(47, 152, 87, 0.24);
    background:
        radial-gradient(circle at 50% 72%, rgba(47, 152, 87, 0.12), transparent 24%),
        radial-gradient(circle, rgba(255, 255, 255, 0.78), rgba(225, 247, 231, 0.58));
    box-shadow: 0 22px 56px rgba(25, 99, 83, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.64);
}

.mobile-face-guide::before,
.mobile-face-guide::after {
    content: none;
}

.massage-eye {
    position: absolute;
    top: 62px;
    width: 34px;
    height: 24px;
    border: 3px solid rgba(6, 71, 55, 0.58);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
}

.massage-eye-left {
    left: 48px;
}

.massage-eye-right {
    right: 48px;
}

.massage-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--mobile-green);
    box-shadow: 0 0 0 10px rgba(47, 152, 87, 0.14);
    animation: mobileMassagePulse 1.55s ease-in-out infinite, mobileMassageLeft 6s steps(1, end) infinite;
}

.massage-dot-right {
    animation-name: mobileMassagePulse, mobileMassageRight;
}

.mobile-massage-guide strong {
    display: block;
    margin-top: 14px;
    font-size: 18px;
    font-weight: 950;
}

@keyframes mobileMassagePulse {
    0%, 100% {
        transform: scale(0.82);
        opacity: 0.58;
    }
    50% {
        transform: scale(1.24);
        opacity: 1;
    }
}

@keyframes mobileMassageLeft {
    0%, 32% {
        left: 74px;
        top: 58px;
    }
    33%, 65% {
        left: 24px;
        top: 82px;
    }
    66%, 100% {
        left: 60px;
        top: 100px;
    }
}

@keyframes mobileMassageRight {
    0%, 32% {
        right: 74px;
        top: 58px;
    }
    33%, 65% {
        right: 24px;
        top: 82px;
    }
    66%, 100% {
        right: 60px;
        top: 100px;
    }
}

.stage-track {
    position: absolute;
    pointer-events: none;
}

.stage-track[data-track="horizontal"] {
    left: 9%;
    right: 9%;
    top: 50%;
    height: 1px;
    background: rgba(8, 85, 62, 0.13);
}

.stage-track[data-track="vertical"] {
    top: 9%;
    bottom: 9%;
    left: 50%;
    width: 1px;
    background: rgba(8, 85, 62, 0.13);
}

.stage-track[data-track="circle"] {
    width: 62%;
    aspect-ratio: 1;
    left: 19%;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid rgba(8, 85, 62, 0.12);
    border-radius: 50%;
}

.stage-track[data-track="diagonal"] {
    inset: 18% 15%;
}

.stage-track[data-track="diagonal"]::before,
.stage-track[data-track="corner"]::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    border: 2px solid rgba(8, 85, 62, 0.1);
    background: linear-gradient(45deg, transparent calc(50% - 1px), rgba(8, 85, 62, 0.14) 50%, transparent calc(50% + 1px));
}

.stage-track[data-track="corner"] {
    inset: 17% 16%;
}

.stage-track[data-track="corner"]::before {
    background:
        linear-gradient(90deg, rgba(8, 85, 62, 0.13), rgba(8, 85, 62, 0.13)) top / 100% 1px no-repeat,
        linear-gradient(90deg, rgba(8, 85, 62, 0.13), rgba(8, 85, 62, 0.13)) bottom / 100% 1px no-repeat,
        linear-gradient(0deg, rgba(8, 85, 62, 0.13), rgba(8, 85, 62, 0.13)) left / 1px 100% no-repeat,
        linear-gradient(0deg, rgba(8, 85, 62, 0.13), rgba(8, 85, 62, 0.13)) right / 1px 100% no-repeat;
}

.stage-track[data-track="eight"] {
    inset: 31% 12%;
}

.stage-track[data-track="eight"]::before,
.stage-track[data-track="eight"]::after {
    content: "";
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    border: 2px solid rgba(8, 85, 62, 0.12);
    border-radius: 50%;
}

.stage-track[data-track="eight"]::before {
    left: 2%;
}

.stage-track[data-track="eight"]::after {
    right: 2%;
}

.stage-track[data-track="spiral"] {
    width: 64%;
    aspect-ratio: 1;
    left: 18%;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle, transparent 0 15px, rgba(8, 85, 62, 0.11) 16px 18px, transparent 19px 29px);
}

.stage-track[data-track="soft"] {
    inset: 22%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(8, 85, 62, 0.08), transparent 62%);
}

.practice-info {
    display: grid;
    grid-template-columns: clamp(140px, 36vw, 154px) minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin: 12px 0;
    min-height: 132px;
    padding: 8px;
}

.practice-info img {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    border-radius: 14px;
}

.practice-info-image {
    align-self: stretch;
    min-width: 0;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
}

.practice-info-image img {
    display: block;
    transform: scale(1.44);
    transform-origin: center;
}

.practice-info h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
}

.practice-info-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.practice-step-duration {
    display: inline-grid;
    place-items: center;
    min-width: 48px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #087a45;
    background: #dcf6d7;
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.practice-info p {
    margin: 6px 0 0;
    color: var(--mobile-muted);
    line-height: 1.36;
}

.final-distance-info {
    border-color: rgba(47, 152, 87, 0.28);
    background: linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(232, 249, 231, 0.94));
}

.final-distance-info .practice-step-duration {
    color: #fff;
    background: #2f9857;
}

.step-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 12px 0 16px;
}

.step-dots span {
    width: 38px;
    height: 7px;
    border-radius: 999px;
    background: rgba(14, 59, 45, 0.12);
}

.step-dots span.is-active {
    background: var(--mobile-green);
}

.step-range-row {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 8px;
    padding: 0 10px;
}

.step-range {
    width: min(210px, 42%);
    accent-color: var(--mobile-green);
}

.step-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 31%;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-inline: 34%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.step-scroll::-webkit-scrollbar {
    display: none;
}

.step-card {
    min-height: 138px;
    padding: 10px 8px;
    border: 1px solid var(--mobile-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    text-align: center;
    scroll-snap-align: center;
}

.step-card.is-active {
    border-color: rgba(47, 152, 87, 0.45);
    background: #e9f9e9;
}

.step-card.is-range-preview:not(.is-active) {
    border-color: rgba(47, 152, 87, 0.3);
    background: rgba(233, 249, 233, 0.68);
}

.step-number {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #ddf4d7;
    color: #2a7b3c;
    font-weight: 950;
}

.step-card strong {
    display: block;
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.14;
}

.practice-controls {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.single-step-info {
    grid-template-columns: 80px minmax(0, 1fr) auto;
    margin-bottom: 10px;
}

.single-step-info img {
    width: 76px;
    height: 76px;
}

.single-practice-title {
    margin-bottom: 10px;
}

.single-step-controls {
    margin-top: 10px;
}

.practice-mode-picker {
    margin: 10px 0 12px;
    padding: 12px;
}

.practice-mode-picker .section-head {
    margin-bottom: 10px;
}

.practice-mode-picker .section-head h2 {
    font-size: 17px;
}

.practice-mode-tools {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(74px, 128px) auto;
    align-items: center;
    gap: 8px;
}

.practice-mode-range {
    width: 100%;
    min-width: 74px;
    accent-color: var(--mobile-green);
}

.practice-mode-more {
    min-height: 32px;
    padding: 0 2px;
    white-space: nowrap;
}

.practice-mode-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 24px) / 4);
    gap: 8px;
    overflow-x: auto;
    padding: 2px 22px 4px 0;
    scroll-snap-type: none;
    scroll-behavior: auto;
    scroll-padding-inline: 0 22px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.practice-mode-scroll::-webkit-scrollbar {
    display: none;
}

.practice-mode-chip {
    min-height: 116px;
    padding: 8px 7px;
    border: 1px solid var(--mobile-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--mobile-green-dark);
    text-align: center;
}

.practice-mode-chip.is-active {
    border-color: rgba(47, 152, 87, 0.45);
    background: #e8f9e7;
    box-shadow: inset 0 0 0 1px rgba(47, 152, 87, 0.12);
}

.practice-mode-chip.is-range-preview:not(.is-active) {
    border-color: rgba(47, 152, 87, 0.32);
    background: rgba(235, 250, 233, 0.9);
}

.practice-mode-chip img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
    margin: 0 auto 6px;
}

.practice-mode-chip strong {
    display: block;
    min-height: 28px;
    font-size: 11px;
    line-height: 1.15;
    font-weight: 900;
}

.practice-mode-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    margin-top: 6px;
    padding: 0 7px;
    border-radius: 999px;
    color: #17673b;
    background: #dff5dc;
    font-size: 11px;
    font-weight: 900;
}

.settings-panel {
    padding: 16px;
}

.practice-settings-sheet {
    position: fixed;
    left: 50%;
    bottom: calc(52px + env(safe-area-inset-bottom));
    z-index: 160;
    width: min(100%, 560px);
    max-height: calc(82dvh - 52px - env(safe-area-inset-bottom));
    overflow-y: auto;
    transform: translateX(-50%);
    border-radius: 28px;
    padding: 12px 16px 18px;
    box-shadow: 0 -18px 54px rgba(43, 56, 48, 0.2);
}

.sheet-handle {
    width: 46px;
    height: 5px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: rgba(9, 59, 45, 0.18);
}

.settings-group {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group h2 {
    margin: 0 0 2px;
    font-size: 19px;
}

.field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 12px;
    border: 1px solid var(--mobile-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.field-row label {
    font-weight: 850;
}

.field-row select,
.field-row input[type="range"] {
    max-width: 155px;
}

.field-note {
    margin: 0;
    color: var(--mobile-muted);
    line-height: 1.55;
}

.checkin-hero {
    display: block;
    min-height: 0;
    margin-bottom: 14px;
    padding: 24px 22px;
}

.checkin-hero h1 {
    margin: 0 0 12px;
    font-size: 32px;
    line-height: 1.1;
}

.checkin-hero p {
    margin: 0;
    color: #43564f;
    line-height: 1.6;
    max-width: 34rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 14px 0;
}

.stat-card {
    min-height: 0;
    aspect-ratio: 1499 / 1049;
    position: relative;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: transparent;
    box-shadow: none;
}

.stat-card-art {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stat-card span {
    position: absolute;
    z-index: 1;
    left: 10%;
    bottom: 31%;
    margin: 0;
    color: var(--mobile-muted);
    font-weight: 800;
}

.stat-card strong {
    position: absolute;
    z-index: 1;
    left: 10%;
    bottom: 13%;
    margin: 0;
    font-size: clamp(27px, 8vw, 33px);
    line-height: 1;
}

.stat-card--today strong {
    color: #249856;
}

.stat-card--streak strong {
    color: #f28b18;
}

.stat-card--total strong {
    color: #238fd8;
}

.stat-card--week strong {
    color: #7950c6;
}

.checkin-backup {
    padding: 18px;
}

.checkin-backup .section-head {
    margin-bottom: 8px;
}

.checkin-backup .section-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
}

.backup-heading-icon {
    width: 40px;
    height: 35px;
    flex: 0 0 auto;
}

.checkin-backup .settings-group {
    gap: 10px;
}

.checkin-safety-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2074 / 620;
    margin: 14px 0 8px;
    border-radius: 20px;
}

.checkin-safety-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkin-safety-card p {
    position: absolute;
    z-index: 1;
    top: 12%;
    left: 6%;
    width: 48%;
    margin: 0;
    padding: 0;
    color: #315c49;
    font-size: clamp(12px, 3.2vw, 16px);
    line-height: 1.45;
    font-weight: 800;
}

.backup-row {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    min-height: 70px;
}

.backup-row .podcast-icon {
    position: relative;
    overflow: hidden;
    background: #f0f8ef;
    font-size: 0;
}

.backup-row .podcast-icon::after {
    display: block;
    font-size: 27px;
    line-height: 1;
}

[data-export] .podcast-icon {
    background: linear-gradient(135deg, #dff6ff, #dceaff);
}

[data-export] .podcast-icon::after {
    content: "📤";
}

[data-import] .podcast-icon {
    background: linear-gradient(135deg, #e5f8df, #fff4c9);
}

[data-import] .podcast-icon::after {
    content: "📥";
}

[data-clear] .podcast-icon {
    background: linear-gradient(135deg, #ffe4de, #fff0e8);
}

[data-clear] .podcast-icon::after {
    content: "🗑️";
}

.classroom-hero {
    display: block;
    overflow: hidden;
    margin-bottom: 4px;
    padding: 0;
    background: rgba(255, 253, 247, 0.68);
}

.classroom-hero .hero-copy {
    position: relative;
    z-index: 1;
    padding: 22px 0 20px 20px;
}

.classroom-hero-image {
    display: block;
    width: 100%;
    height: auto;
    min-height: 150px;
    max-height: none;
    object-fit: contain;
    object-position: center;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.classroom-more-title {
    align-items: center;
}

.classroom-more-title .icon-button,
.reader-top .icon-button {
    width: 58px;
    height: 58px;
    font-size: 34px;
    font-weight: 950;
}

.classroom-more-title .back-icon-button {
    background: #fffdf7;
    border-color: rgba(9, 59, 45, 0.12);
    box-shadow: var(--mobile-soft-shadow);
}

.classroom-more-title h1 {
    font-size: 24px;
}

.classroom-back-button {
    min-height: 42px;
    padding: 0 14px;
    white-space: nowrap;
}

.classroom-more-section {
    margin-top: 10px;
}

.reader-page {
    min-height: 100vh;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

.reader-top {
    position: sticky;
    top: max(0px, env(safe-area-inset-top));
    z-index: 20;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    margin: 0 -4px 16px;
    padding: 8px 4px;
    border-radius: 0 0 20px 20px;
    background: rgba(255, 253, 247, 0.96);
    backdrop-filter: blur(14px);
}

.reader-top h1 {
    margin: 0;
    text-align: center;
    font-size: 22px;
}

.reader-shell {
    touch-action: none;
    overflow: hidden;
    border-radius: 20px;
    background: #fffdf7;
    box-shadow: var(--mobile-soft-shadow);
}

.reader-image {
    width: 100%;
    height: min(66vh, 720px);
    max-height: 66vh;
    object-fit: contain;
    display: block;
    transform-origin: center;
    transition: transform 0.18s ease;
    user-select: none;
}

.reader-shell.is-zooming .reader-image {
    transition: none;
}

.reader-count {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 11px;
    margin: 16px 0;
    color: var(--mobile-muted);
    font-weight: 780;
}

.reader-count i {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(13, 127, 63, 0.22);
}

.reader-count i.is-active {
    background: #15944e;
}

.reader-meta-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
}

.reader-meta-card img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
}

.reader-meta-card h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
}

.reader-meta-card p {
    margin: 5px 0 0;
    color: var(--mobile-muted);
    font-size: 13px;
}

.pinch-note {
    margin: 18px 0 calc(12px + env(safe-area-inset-bottom));
    text-align: center;
    color: var(--mobile-muted);
}

.podcast-player {
    position: fixed;
    inset: 0 auto 0 50%;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 560px);
    padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
    background-image:
        linear-gradient(rgba(248, 244, 233, 0.72), rgba(248, 244, 233, 0.9)),
        var(--podcast-bg-image, url("../../images/mobile/background/mobile-forest-bg.png"));
    background-position: center;
    background-size: cover;
    transform: translateX(-50%);
}

.podcast-panel {
    width: min(100%, 520px);
    max-height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    padding: 12px 18px 22px;
    border-radius: 30px;
    background: rgba(255, 253, 247, 0.96);
    box-shadow: var(--mobile-shadow);
    overscroll-behavior: contain;
}

.podcast-panel-head {
    position: sticky;
    top: -12px;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 6px 0 12px;
    background: rgba(255, 253, 247, 0.96);
}

.podcast-panel h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.16;
    overflow-wrap: anywhere;
}

.podcast-panel audio {
    width: 100%;
    margin: 14px 0 14px;
}

.player-tools {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 9px;
    align-items: center;
    margin: 0 0 14px;
}

.player-tools .soft-button {
    min-height: 42px;
    padding: 0 12px;
}

.player-tools select {
    min-height: 42px;
    border: 1px solid var(--mobile-line);
    border-radius: 999px;
    padding: 0 10px;
    background: #fff;
    color: var(--mobile-green-dark);
    font-weight: 850;
}

.volume-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    font-weight: 850;
}

.volume-row input {
    width: 100%;
    min-width: 0;
}

.oscilloscope {
    display: flex;
    align-items: end;
    gap: 9px;
    height: 58px;
    margin-top: 22px;
}

.oscilloscope span {
    width: 16px;
    height: 32px;
    border-radius: 999px;
    background: #cdb091;
}

.oscilloscope.is-playing span {
    animation: wavebar 0.82s ease-in-out infinite;
}

.oscilloscope.is-playing span:nth-child(2) {
    animation-delay: 0.16s;
}

.oscilloscope.is-playing span:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes wavebar {
    0%, 100% { height: 26px; background: #cdb091; }
    50% { height: 54px; background: #7db99e; }
}

.mobile-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--nav-height) + 22px + env(safe-area-inset-bottom));
    z-index: 180;
    max-width: min(86vw, 360px);
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(12, 54, 40, 0.92);
    color: #fff;
    box-shadow: var(--mobile-shadow);
    transform: translate(-50%, 18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.mobile-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

body.reader-open .mobile-nav,
body.player-open .mobile-nav,
body.immersive-practice .mobile-nav {
    display: none;
}

body.immersive-practice {
    background: #e8f6ed;
}

body.immersive-practice .mobile-app {
    background-image:
        linear-gradient(rgba(225, 246, 235, 0.7), rgba(223, 243, 231, 0.82)),
        var(--mobile-bg-image);
}

body.immersive-practice .mobile-root {
    width: min(100%, 560px);
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding: max(20px, env(safe-area-inset-top)) 16px calc(22px + env(safe-area-inset-bottom));
}

body.immersive-practice .page-title {
    order: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    margin: 8px 0 16px;
}

body.immersive-practice .page-title > .icon-button,
body.immersive-practice .enter-immersive-button,
body.immersive-practice .exit-immersive-button,
body.immersive-practice .practice-info,
body.immersive-practice .step-dots,
body.immersive-practice .step-scroll,
body.immersive-practice .practice-mode-picker,
body.immersive-practice .practice-settings-sheet {
    display: none !important;
}

body.immersive-practice .page-title h1 {
    font-size: clamp(30px, 8vw, 44px);
    line-height: 1.08;
}

body.immersive-practice .practice-title-actions {
    justify-content: flex-start;
}

body.immersive-practice #timeLeft {
    min-height: 72px;
    padding: 0 26px;
    border-radius: 26px;
    font-size: clamp(42px, 14vw, 72px);
    line-height: 1;
    font-weight: 520;
    color: var(--mobile-green-dark);
    background: rgba(242, 253, 244, 0.8);
    box-shadow: var(--mobile-soft-shadow);
}

body.immersive-practice .practice-controls {
    order: 2;
    display: grid;
    grid-template-columns: 1fr 1.16fr 0.84fr;
    gap: 10px;
    margin: 8px 0 28px;
}

body.immersive-practice .practice-controls #restartPractice,
body.immersive-practice .practice-controls #exitPractice {
    display: none;
}

body.immersive-practice .practice-controls .exit-immersive-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.immersive-practice .practice-controls .immersive-speed-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.immersive-practice .practice-controls .primary-button,
body.immersive-practice .practice-controls .soft-button {
    min-height: 62px;
    border-radius: 999px;
    padding: 0 12px;
    font-size: clamp(15px, 4.2vw, 21px);
}

body.immersive-practice .practice-stage {
    order: 3;
    flex: 1 1 auto;
    width: 100%;
    min-height: min(62dvh, 640px);
    height: auto;
    margin: 0 auto;
    border-radius: 30px;
    background: rgba(231, 249, 239, 0.78);
}

body.immersive-practice .stage-track[data-track="eight"]::before,
body.immersive-practice .stage-track[data-track="eight"]::after,
body.immersive-practice .stage-track[data-track="circle"],
body.immersive-practice .stage-track[data-track="diagonal"]::before,
body.immersive-practice .stage-track[data-track="corner"]::before {
    border-style: dashed;
}

body.immersive-practice .practice-info.final-distance-info {
    order: 4;
    display: grid !important;
    grid-template-columns: 70px minmax(0, 1fr);
    margin: 16px 0 0;
}

body.immersive-practice .practice-info.final-distance-info img {
    width: 64px;
    height: 64px;
}

body.immersive-practice .practice-info.final-distance-info [data-toggle-settings] {
    display: none;
}

body.reader-open .mobile-app {
    background: #fffdf7;
}

body.reader-open .mobile-root {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

@media (max-width: 380px) {
    .mobile-root {
        padding-left: 12px;
        padding-right: 12px;
    }
    .brand-title {
        font-size: 22px;
    }
    .pill-button {
        padding: 0 10px;
        font-size: 13px;
    }
    .hero-card {
        grid-template-columns: 1fr;
    }
    .hero-image {
        min-height: 120px;
    }
    .mode-card {
        min-height: 164px;
    }
    .mode-time {
        font-size: 28px;
    }
    .h-scroll {
        grid-auto-columns: 45%;
    }
    .mobile-header {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 72px;
        gap: 8px;
    }
    .brand-lockup {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 8px;
    }
    .brand-logo {
        width: 46px;
        height: 46px;
    }
    .mobile-header .pill-button {
        min-height: 38px;
        padding: 0 8px;
    }
    .reader-top {
        grid-template-columns: 48px minmax(0, 1fr) auto auto;
        gap: 6px;
    }
    .reader-top .icon-button {
        width: 48px;
        height: 48px;
    }
    .reader-top .pill-button {
        min-height: 42px;
        padding: 0 9px;
        font-size: 12px;
    }
    .reader-top .pill-button svg {
        width: 18px;
        height: 18px;
    }
    .step-scroll {
        grid-auto-columns: 36%;
        scroll-padding-inline: 30%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
