/* Product UI layer: intentionally flatter and quieter than the legacy skin. */
@font-face { font-family: "Onest"; src: url("./assets/fonts/Onest-Variable.ttf") format("truetype"); font-style: normal; font-weight: 100 900; font-display: swap; }
:root {
  --bg: #100e0c;
  --surface: rgba(45, 38, 31, .58);
  --surface-raised: rgba(92, 71, 52, .42);
  --surface-soft: rgba(33, 28, 23, .55);
  --surface-pressed: rgba(107, 77, 53, .48);
  --text: #fff9f1;
  --text-secondary: #c4b8ab;
  --text-muted: #8f8377;
  --border: rgba(255, 235, 216, .11);
  --accent: #ee9255;
  --accent-strong: #ffad70;
  --accent-contrast: #251508;
  --body-background: #100e0c;
  --page-background: radial-gradient(circle at 8% 5%, rgba(226,102,48,.18), transparent 31%), radial-gradient(circle at 92% 13%, rgba(154,48,38,.14), transparent 27%), linear-gradient(180deg, rgba(12,10,9,.18), rgba(12,10,9,.48)), url("./assets/autumn-pixel-bg.png");
  --shell-background: transparent;
  --surface-gradient: linear-gradient(145deg, rgba(58,48,39,.68), rgba(31,27,23,.52));
  --card-shadow: 0 14px 38px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.055);
  --control-background: rgba(34,29,24,.6);
  --input-background: rgba(27,23,20,.64);
  --selected-background: rgba(176,104,55,.23);
  --rail-color: #39332c;
  --ring-background: #1c1a17;
  --nav-background: rgba(35,30,26,.68);
  --nav-border: rgba(255,236,218,.13);
  --nav-shadow: 0 16px 44px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.08);
  --nav-indicator-background: var(--accent);
  --nav-active-text: #f2a553;
  --nav-label-text: #f7c187;
  --glass-fill: rgba(45, 36, 29, .48);
  --glass-edge: rgba(255, 239, 224, .17);
  --glass-top: rgba(255, 255, 255, .16);
  --glass-bottom: rgba(102, 62, 35, .11);
  --glass-shadow: 0 18px 50px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.13), inset 0 -1px rgba(255,174,112,.055);
  --radius-xl: 22px;
  --radius-lg: 17px;
  --radius-md: 13px;
}

:root[data-theme="light"] {
  --bg: #f5f2ec;
  --surface: rgba(255,253,249,.96);
  --surface-raised: #eee5d9;
  --surface-soft: #f5efe7;
  --surface-pressed: #e6dbcc;
  --text: #241f1b;
  --text-secondary: #574c42;
  --text-muted: #6f6256;
  --border: rgba(89,65,43,.20);
  --accent: #ad4c1c;
  --accent-strong: #984016;
  --accent-contrast: #fff;
  --green: #147845;
  --red: #c52c3b;
  --orange: #925500;
  --violet: #7443ac;
  --blue: #0069d4;
  --yellow: #786300;
  --cyan: #007987;
  --body-background: #f5f2ec;
  --page-background: linear-gradient(180deg, rgba(250,248,244,.82), rgba(250,248,244,.74) 30%, rgba(250,248,244,.70)), url("./assets/autumn-pixel-bg-light.png");
  --shell-background: transparent;
  --surface-gradient: linear-gradient(145deg, #fffefa, #f9f3eb);
  --card-shadow: 0 5px 16px rgba(74,49,25,.07), inset 0 .5px #fff;
  --control-background: #f3ede5;
  --input-background: #f7f2eb;
  --grid-background: #e7dfd3;
  --grid-cell-background: #fffdf9;
  --selected-background: #f2ddc7;
  --tint-ink: #382e25;
  --blue-ink: #005bbb;
  --green-ink: #147845;
  --violet-ink: #7443ac;
  --orange-ink: #925500;
  --red-ink: #c52c3b;
  --rail-color: #d2c2ae;
  --ring-background: #fffdf9;
  --calendar-background: var(--surface-gradient);
  --nav-background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(250,244,236,.96));
  --nav-border: rgba(89,65,43,.23);
  --nav-shadow: 0 6px 22px rgba(74,49,25,.10), inset 0 .5px #fff;
  --nav-active-text: #0069d4;
  --nav-label-text: #0069d4;
  --telegram-bottom-bar: #f5f2ec;
  --toast-background: #382e25;
  --toast-text: #fff;
  --shadow: 0 6px 24px rgba(74,49,25,.08);
  --glass-fill: rgba(255,253,249,.96);
  --glass-edge: rgba(89,65,43,.23);
  --glass-top: rgba(255,255,255,.35);
  --glass-bottom: rgba(225,205,179,.10);
  --glass-shadow: 0 5px 16px rgba(74,49,25,.07), inset 0 .5px rgba(255,255,255,.85);
}

html, body { width: 100%; max-width: 100%; min-height: 100%; min-height: 100dvh; overflow-x: clip; }
html { background-color: var(--bg); background-image: var(--page-background); background-position: center top; background-size: auto, auto, auto, cover; background-attachment: fixed; }
body { font-family: "Onest", "Noto Sans", "Segoe UI", sans-serif; font-optical-sizing: auto; font-synthesis: none; font-feature-settings: "kern" 1, "liga" 1, "calt" 1; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background-color: var(--bg); background-image: var(--page-background); background-position: center top; background-size: auto, auto, auto, cover; background-attachment: fixed; }
:root[data-theme="light"], :root[data-theme="light"] body { background-size: auto, cover; }
.app-shell, .main-content { min-height: 100vh; min-height: 100svh; min-height: 100dvh; }
.app-shell { border: 0; background: transparent; }
.app-shell::before { position: fixed; inset: auto -105px 18% auto; width: 235px; height: 235px; transform: rotate(32deg); border-radius: 82% 12% 78% 18%; background: linear-gradient(145deg, rgba(226,105,48,.15), rgba(153,44,35,.035)); filter: blur(2px); opacity: .8; }
.app-shell::after { position: fixed; z-index: 0; top: 17%; right: auto; left: -76px; display: block; width: 155px; height: 155px; transform: rotate(-25deg); border-radius: 85% 10% 80% 15%; background: linear-gradient(145deg, rgba(205,122,55,.10), rgba(119,105,54,.025)); color: transparent; filter: blur(1px); opacity: .8; content: ""; pointer-events: none; }
.screen { min-width: 0; min-height: 100vh; min-height: 100svh; min-height: 100dvh; max-width: 100vw; overflow-x: clip; padding-top: calc(22px + var(--safe-top)); }
.main-content { isolation: isolate; }
.retired-feature { display: none !important; }

/* Some iOS Home Screen launches incorrectly report a zero safe-area inset. */
html[data-runtime="standalone"] .screen { padding-top: calc(22px + max(var(--safe-top), 62px)); }
html[data-runtime="standalone"] .standalone-back-bar { min-height: calc(50px + max(var(--safe-top), 62px)); padding-top: max(var(--safe-top), 62px); }
html[data-runtime="standalone"] .standalone-back-bar:not([hidden]) + .main-content .screen { padding-top: 18px; }

.falling-leaves { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.falling-leaves i { --leaf-x: 10vw; --leaf-drift: 13vw; --leaf-size: 15px; --leaf-color: #d77432; position: absolute; top: -12vh; left: var(--leaf-x); color: var(--leaf-color); font-size: var(--leaf-size); filter: drop-shadow(0 4px 7px rgba(42,18,7,.22)); opacity: .42; animation: autumn-leaf-fall 18s linear infinite; }
.falling-leaves i:nth-child(1) { --leaf-x: 5vw; --leaf-drift: 18vw; --leaf-size: 13px; animation-delay: -4s; animation-duration: 17s; }
.falling-leaves i:nth-child(2) { --leaf-x: 18vw; --leaf-drift: -10vw; --leaf-size: 18px; --leaf-color: #a9462b; animation-delay: -13s; animation-duration: 23s; }
.falling-leaves i:nth-child(3) { --leaf-x: 34vw; --leaf-drift: 12vw; --leaf-size: 11px; --leaf-color: #d89946; animation-delay: -8s; animation-duration: 19s; }
.falling-leaves i:nth-child(4) { --leaf-x: 49vw; --leaf-drift: -16vw; --leaf-size: 16px; animation-delay: -17s; animation-duration: 25s; }
.falling-leaves i:nth-child(5) { --leaf-x: 61vw; --leaf-drift: 14vw; --leaf-size: 12px; --leaf-color: #8e3c2e; animation-delay: -2s; animation-duration: 21s; }
.falling-leaves i:nth-child(6) { --leaf-x: 73vw; --leaf-drift: -13vw; --leaf-size: 19px; --leaf-color: #c77d35; animation-delay: -11s; animation-duration: 24s; }
.falling-leaves i:nth-child(7) { --leaf-x: 85vw; --leaf-drift: 9vw; --leaf-size: 14px; animation-delay: -19s; animation-duration: 22s; }
.falling-leaves i:nth-child(8) { --leaf-x: 94vw; --leaf-drift: -17vw; --leaf-size: 10px; --leaf-color: #a94b2b; animation-delay: -6s; animation-duration: 16s; }
.falling-leaves i:nth-child(9) { --leaf-x: 42vw; --leaf-drift: 20vw; --leaf-size: 9px; --leaf-color: #de9a4a; animation-delay: -21s; animation-duration: 28s; }
@keyframes autumn-leaf-fall {
  0% { transform: translate3d(0, -8vh, 0) rotate(0deg) scale(.82); opacity: 0; }
  8% { opacity: .42; }
  48% { transform: translate3d(calc(var(--leaf-drift) * -.35), 52vh, 0) rotate(260deg) scale(1); }
  92% { opacity: .32; }
  100% { transform: translate3d(var(--leaf-drift), 118vh, 0) rotate(620deg) scale(.86); opacity: 0; }
}
.app-shell { z-index: 1; }

/* Safari standalone has no Telegram header, so inner screens need native-looking chrome. */
.standalone-back-bar {
  position: sticky;
  z-index: 24;
  top: 0;
  display: grid;
  min-height: calc(50px + var(--safe-top));
  grid-template-columns: minmax(82px, 1fr) auto minmax(82px, 1fr);
  align-items: end;
  padding: var(--safe-top) max(14px, var(--safe-right)) 6px max(14px, var(--safe-left));
  border-bottom: 1px solid var(--nav-border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  view-transition-name: standalone-header;
}
.standalone-back-bar[hidden] { display: none; }
.standalone-back { display: inline-flex; width: fit-content; min-height: 38px; align-items: center; gap: 7px; padding: 0 8px 0 2px; background: transparent; color: var(--accent-strong); font-size: 15px; font-weight: 620; }
.standalone-back .fa-icon, .standalone-back > i { width: 15px; font-size: 15px; }
.standalone-back-bar > strong { align-self: center; overflow: hidden; max-width: 48vw; padding-top: 5px; font-size: 15px; font-weight: 690; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.standalone-bar-spacer { min-width: 82px; }
html[data-runtime="standalone"] .standalone-back-bar:not([hidden]) + .main-content .screen { padding-top: 18px; }

.web-login { position: fixed; z-index: 100; inset: 0; display: grid; min-height: 100dvh; padding: max(24px, var(--safe-top)) 20px max(24px, var(--safe-bottom)); place-items: center; overflow-y: auto; background: var(--bg); }
.web-login-card { display: flex; width: min(100%, 420px); flex-direction: column; align-items: center; padding: 34px 26px; border-radius: 24px; background: var(--surface); box-shadow: var(--card-shadow); text-align: center; }
.web-login-icon { display: grid; width: 64px; height: 64px; margin-bottom: 22px; place-items: center; border-radius: 19px; background: #229ed9; color: #fff; font-size: 28px; }
.web-login-card .eyebrow { margin-bottom: 9px; color: var(--accent-strong); }
.web-login-card h1 { margin: 0; font-size: clamp(25px, 7vw, 32px); line-height: 1.08; letter-spacing: -.035em; }
.web-login-card p { max-width: 330px; margin: 14px 0 24px; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
.telegram-login-button { display: inline-flex; width: 100%; min-height: 50px; align-items: center; justify-content: center; gap: 10px; border-radius: 13px; background: #229ed9; color: #fff; font-weight: 720; }
.web-login-card > small { display: flex; align-items: center; gap: 7px; margin-top: 17px; color: var(--text-muted); font-size: 11px; }

.fa-icon { display: inline-grid; place-items: center; width: 1em; height: 1em; font-size: 1em; line-height: 1; }
.icon-button .fa-icon, .round-action .fa-icon { font-size: 18px; }
.row-arrow { width: 16px !important; height: 16px !important; font-size: 13px; }

.avatar { background: var(--surface-raised); box-shadow: none; color: var(--accent-strong); }
.home-intro { margin-bottom: 28px; }
.home-greeting span { font-size: 13px; }
.home-greeting strong { font-size: 18px; }
.date-heading h1 { max-width: 100%; font-size: clamp(29px, 7.6vw, 40px); line-height: 1.05; overflow-wrap: anywhere; }
.group-chip, .week-number-badge { border: 0; border-radius: 8px; background: var(--surface-raised); color: var(--text-secondary); }

.card, .search-card, .day-switcher, .list-card, .week-day-group, .profile-card, .theme-card, .install-card, .lesson-card, .home-route { border: 1px solid var(--glass-edge); background: linear-gradient(145deg, var(--glass-top), rgba(255,255,255,.025) 34%, var(--glass-bottom) 100%), var(--glass-fill); background-clip: padding-box; box-shadow: var(--glass-shadow); backdrop-filter: blur(30px) saturate(180%) contrast(104%); -webkit-backdrop-filter: blur(30px) saturate(180%) contrast(104%); }
.day-switcher { margin-top: 22px; padding: 3px; border: 1px solid var(--glass-edge); border-radius: 18px; background: linear-gradient(145deg, var(--glass-top), rgba(255,255,255,.02) 42%, var(--glass-bottom)), var(--glass-fill); box-shadow: var(--glass-shadow); }
.day-switcher-current { color: var(--text-secondary); }
.search-card { margin-top: 12px; padding: 16px; border: 1px solid var(--glass-edge); border-radius: 20px; background: linear-gradient(145deg, var(--glass-top), rgba(255,255,255,.02) 42%, var(--glass-bottom)), var(--glass-fill); box-shadow: var(--glass-shadow); }
.search-card > .fa-icon:first-child { color: var(--text-muted); font-size: 18px; }
.search-card strong { font-size: 16px; font-weight: 650; }
.search-card small { margin-top: 2px; font-size: 12px; }
.section-heading { margin: 30px 3px 10px; font-size: 11px; font-weight: 720; letter-spacing: .08em; }

.lesson-spotlight { gap: 13px; padding: 17px; border: 1px solid var(--glass-edge); border-left: 3px solid var(--route-color); border-radius: 22px; background: linear-gradient(145deg, var(--glass-top), rgba(255,255,255,.025) 36%, var(--glass-bottom)), var(--glass-fill); box-shadow: var(--glass-shadow); backdrop-filter: blur(30px) saturate(180%) contrast(104%); -webkit-backdrop-filter: blur(30px) saturate(180%) contrast(104%); }
.lesson-spotlight.is-current { border-color: color-mix(in srgb, var(--green) 45%, var(--glass-edge)); background: linear-gradient(145deg, color-mix(in srgb, var(--green) 12%, var(--glass-top)), rgba(255,255,255,.025) 38%, var(--glass-bottom)), var(--glass-fill); }
.spotlight-icon { border-radius: 13px; background: var(--surface-raised); box-shadow: none; }
.spotlight-icon .fa-icon { font-size: 21px; }
.spotlight-status i, .home-route-dot { box-shadow: none; }
.spotlight-progress, .spotlight-progress i { box-shadow: none; }

.home-route { border: 1px solid var(--glass-edge); border-radius: 22px; background: linear-gradient(145deg, var(--glass-top), rgba(255,255,255,.025) 36%, var(--glass-bottom)), var(--glass-fill); box-shadow: var(--glass-shadow); backdrop-filter: blur(30px) saturate(180%) contrast(104%); -webkit-backdrop-filter: blur(30px) saturate(180%) contrast(104%); }
.home-route-item { min-height: 82px; padding: 14px; }
.home-route-item.is-current { background: color-mix(in srgb, var(--route-color) 7%, var(--surface)); }
.home-route-dot { border-width: 2px; }
.home-route-item.is-current .home-route-dot { width: 12px; height: 12px; border-width: 3px; box-shadow: none; }
.home-route-kind { background: transparent; padding: 2px 0; }

.lesson-card { padding: 16px; border: 1px solid var(--glass-edge); border-left: 3px solid var(--lesson-color); border-radius: 20px; background: linear-gradient(145deg, var(--glass-top), rgba(255,255,255,.025) 36%, var(--glass-bottom)), var(--glass-fill); box-shadow: var(--glass-shadow); backdrop-filter: blur(30px) saturate(180%) contrast(104%); -webkit-backdrop-filter: blur(30px) saturate(180%) contrast(104%); }
.lesson-card.is-current { border-color: color-mix(in srgb, var(--green) 45%, var(--glass-edge)); background: linear-gradient(145deg, color-mix(in srgb, var(--green) 12%, var(--glass-top)), rgba(255,255,255,.025) 38%, var(--glass-bottom)), var(--glass-fill); box-shadow: var(--glass-shadow); }
.lesson-card.is-replacement { border-left-color: var(--orange); }
.lesson-card.is-past { border-color: var(--border); background: var(--surface-soft); filter: none; opacity: .54; }
.lesson-tag { border-radius: 6px; }

.empty-state, .error-state, .group-required { border: 0; border-radius: 20px; background: var(--surface); box-shadow: var(--card-shadow); }
.empty-visual, .error-visual { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-raised); transform: none; }
.empty-visual .fa-icon, .error-visual .fa-icon { font-size: 27px; }
.primary-button, .secondary-button, .state-action { min-height: 46px; border-radius: 12px; }

.list-card { overflow: hidden; border: 1px solid var(--glass-edge); background: linear-gradient(145deg, var(--glass-top), rgba(255,255,255,.025) 36%, var(--glass-bottom)), var(--glass-fill); box-shadow: var(--glass-shadow); backdrop-filter: blur(30px) saturate(180%) contrast(104%); -webkit-backdrop-filter: blur(30px) saturate(180%) contrast(104%); }
.list-row, .settings-row { min-height: 64px; padding: 11px 15px; }
.row-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; background: var(--surface-raised) !important; color: var(--text-secondary); }
.row-icon .fa-icon { font-size: 15px; }
.row-copy strong { font-size: 15px; font-weight: 640; }
.row-copy small { font-size: 12px; }
.feature-icon { border-radius: 11px; box-shadow: none; }
.feature-icon .fa-icon { font-size: 17px; }
.feature-hero-icon .fa-icon { font-size: 31px; }
.assistant-card { background: var(--surface); }

.profile-card { border: 1px solid var(--glass-edge); background: linear-gradient(145deg, var(--glass-top), rgba(255,255,255,.025) 36%, var(--glass-bottom)), var(--glass-fill); box-shadow: var(--glass-shadow); backdrop-filter: blur(30px) saturate(180%) contrast(104%); -webkit-backdrop-filter: blur(30px) saturate(180%) contrast(104%); }
.theme-card, .install-card { border: 1px solid var(--glass-edge); background: linear-gradient(145deg, var(--glass-top), rgba(255,255,255,.025) 36%, var(--glass-bottom)), var(--glass-fill); backdrop-filter: blur(30px) saturate(180%) contrast(104%); -webkit-backdrop-filter: blur(30px) saturate(180%) contrast(104%); }
.theme-card::after { display: none; }
.theme-option { border: 0; background: var(--surface-soft); }
.theme-option.is-active { border: 0; background: var(--selected-background); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }

.filter-tabs, .week-view-switch { border: 0; background: var(--surface-soft); }
.filter-tabs button.is-active, .week-view-switch button.is-active { background: var(--surface-raised); box-shadow: none; }
.week-day-group { border: 1px solid var(--glass-edge); background: linear-gradient(145deg, var(--glass-top), rgba(255,255,255,.025) 36%, var(--glass-bottom)), var(--glass-fill); box-shadow: var(--glass-shadow); backdrop-filter: blur(30px) saturate(180%) contrast(104%); -webkit-backdrop-filter: blur(30px) saturate(180%) contrast(104%); }
.week-table-scroll { border: 0; box-shadow: none; }

.bottom-nav { right: max(12px, var(--safe-right)); bottom: max(10px, var(--safe-bottom)); left: max(12px, var(--safe-left)); width: auto; max-width: 680px; min-height: 70px; padding: 6px; overflow: hidden; border: 1px solid var(--glass-edge); border-radius: 25px; background: linear-gradient(145deg, rgba(255,255,255,.17), rgba(255,255,255,.025) 42%, var(--glass-bottom)), color-mix(in srgb, var(--nav-background) 72%, transparent); box-shadow: var(--nav-shadow), inset 0 1px rgba(255,255,255,.16); backdrop-filter: blur(34px) saturate(190%) contrast(106%); -webkit-backdrop-filter: blur(34px) saturate(190%) contrast(106%); view-transition-name: bottom-navigation; }
.bottom-nav::before { position: absolute; z-index: 0; top: -32px; left: 7%; display: block; width: 62%; height: 48px; border-radius: 50%; background: rgba(255,255,255,.13); filter: blur(13px); opacity: .72; content: ""; pointer-events: none; }
.bottom-nav::after { position: absolute; z-index: 0; right: 22px; bottom: -22px; display: block; width: 42%; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); filter: blur(15px); content: ""; pointer-events: none; }
.bottom-nav-indicator { top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / var(--nav-count)); height: auto; border: 1px solid color-mix(in srgb, var(--accent) 28%, rgba(255,255,255,.2)); border-radius: 22px 18px 21px 17px; background: radial-gradient(circle at 28% 12%, rgba(255,255,255,.24), transparent 38%), linear-gradient(145deg, color-mix(in srgb, var(--accent) 26%, rgba(255,255,255,.08)), color-mix(in srgb, var(--glass-fill) 78%, transparent)); box-shadow: 0 8px 23px rgba(0,0,0,.17), inset 0 1px rgba(255,255,255,.22), inset 0 -1px color-mix(in srgb, var(--accent) 13%, transparent); backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%); transition: transform 220ms cubic-bezier(.2,.8,.25,1), border-radius 220ms ease; }
.bottom-nav .bottom-nav-item { min-height: 58px; gap: 4px; border-radius: 18px; }
.bottom-nav-icon { width: 25px; height: 25px; }
.bottom-nav-icon .fa-icon { font-size: 19px; transition: color 140ms ease, transform 140ms ease; }
.bottom-nav-icon > .fa-icon { position: static; width: 25px; height: 25px; border: 0; background: transparent; box-shadow: none; }
.bottom-nav-item[aria-current="page"] .bottom-nav-icon .fa-icon { transform: translateY(-1px); filter: none; }
.bottom-nav-label { font-size: 9px; font-weight: 580; }

.screen.is-entering-forward { animation: screen-forward 310ms cubic-bezier(.2,.82,.24,1); }
.screen.is-entering-back { animation: screen-back 310ms cubic-bezier(.2,.82,.24,1); }
.screen.is-entering-root { animation: screen-root 260ms ease-out; }
@keyframes screen-forward { from { transform: translateX(7px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes screen-back { from { transform: translateX(-7px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes screen-root { from { opacity: 0; } to { opacity: 1; } }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(route-screen) { animation-duration: 360ms; animation-timing-function: cubic-bezier(.22,.8,.24,1); }
html[data-navigation-direction="forward"]::view-transition-old(route-screen) { animation: route-old-forward 330ms cubic-bezier(.4,0,.2,1) both; }
html[data-navigation-direction="forward"]::view-transition-new(route-screen) { animation: route-new-forward 360ms cubic-bezier(.16,.84,.28,1) both; }
html[data-navigation-direction="back"]::view-transition-old(route-screen) { animation: route-old-back 330ms cubic-bezier(.4,0,.2,1) both; }
html[data-navigation-direction="back"]::view-transition-new(route-screen) { animation: route-new-back 360ms cubic-bezier(.16,.84,.28,1) both; }
@keyframes route-old-forward { to { transform: translate3d(-7%,0,0) scale(.985); opacity: 0; filter: blur(2px); } }
@keyframes route-new-forward { from { transform: translate3d(9%,0,0) scale(.985); opacity: 0; filter: blur(2px); } }
@keyframes route-old-back { to { transform: translate3d(7%,0,0) scale(.985); opacity: 0; filter: blur(2px); } }
@keyframes route-new-back { from { transform: translate3d(-9%,0,0) scale(.985); opacity: 0; filter: blur(2px); } }
@keyframes redesign-old { to { opacity: 0; } }
@keyframes redesign-new { from { opacity: 0; transform: translateY(3px); } }
.spotlight-content.is-revealing, .schedule-content.is-revealing, .day-content.is-revealing { animation: none; }
@keyframes redesign-loaded { from { opacity: 0; transform: translateY(3px); } }

@media (min-width: 680px) {
  .screen { max-width: 760px; }
  .bottom-nav { right: 50%; left: auto; width: min(760px, 100%); transform: translateX(50%); border-right: 1px solid var(--nav-border); border-left: 1px solid var(--nav-border); }
}

@media (prefers-reduced-motion: reduce) {
  .falling-leaves { display: none; }
}

/* Clear glass: thinner frosting, a rounded optical rim and a separate lens. */
:root {
  --glass-fill: rgba(30, 29, 30, .27);
  --glass-top: rgba(255,255,255,.12);
  --glass-bottom: rgba(255,255,255,.015);
  --glass-edge: rgba(255,255,255,.22);
  --glass-shadow: 0 12px 32px rgba(0,0,0,.16), inset 0 1px 2px rgba(255,255,255,.32), inset 0 -1px 2px rgba(255,255,255,.10);
  --nav-active-text: #4eb5ff;
  --nav-label-text: #4eb5ff;
}
.card, .search-card, .day-switcher, .list-card, .profile-card, .theme-card, .install-card, .lesson-card, .home-route, .week-day-group, .lesson-spotlight {
  backdrop-filter: blur(12px) saturate(145%);
  -webkit-backdrop-filter: blur(12px) saturate(145%);
}
.bottom-nav {
  border-radius: 999px;
  overflow: visible;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.025)), rgba(28,28,30,.52);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 10px 32px rgba(0,0,0,.22), inset 0 1px 3px rgba(255,255,255,.26), inset 0 -1px 3px rgba(255,255,255,.10);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.bottom-nav::before { inset: 1px 18px auto; width: auto; height: 1px; border-radius: 50%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); filter: none; }
.bottom-nav::after { inset: auto 24px 1px; width: auto; height: 1px; border-radius: 50%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.26), transparent); filter: none; }
.bottom-nav-indicator {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.30);
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.24), transparent 36%), linear-gradient(145deg, rgba(255,255,255,.10), rgba(0,0,0,.18));
  box-shadow: 0 3px 10px rgba(0,0,0,.24), inset 0 2px 3px rgba(255,255,255,.34), inset 0 -2px 3px rgba(255,255,255,.17);
  backdrop-filter: blur(2px) saturate(190%) contrast(115%);
  -webkit-backdrop-filter: blur(2px) saturate(190%) contrast(115%);
}
.bottom-nav-indicator::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from 20deg, rgba(255,255,255,.65), rgba(89,192,255,.36), transparent 28%, rgba(255,255,255,.36) 48%, rgba(174,133,255,.27) 70%, transparent 83%, rgba(255,255,255,.65));
  padding: 2px; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor;
}
.bottom-nav .bottom-nav-item { border-radius: 999px; color: rgba(255,255,255,.84); }
.bottom-nav-label { font-size: 10px; font-weight: 650; }
.bottom-nav-icon .fa-icon { font-size: 22px; }
.bottom-nav-item[aria-current="page"] { color: var(--nav-active-text); }
.bottom-nav-item[aria-current="page"] .bottom-nav-label { color: var(--nav-label-text); }
:root[data-theme="light"] .bottom-nav { background: var(--nav-background); border-color: var(--nav-border); }
:root[data-theme="light"] .bottom-nav .bottom-nav-item { color: #303036; }
:root[data-theme="light"] .bottom-nav-item[aria-current="page"] { color: var(--nav-active-text); }
:root[data-theme="light"] .bottom-nav-indicator { background: #ededf0; border-color: rgba(255,255,255,.85); box-shadow: inset 0 .5px 1px #fff; }
.screen.is-entering-forward, .screen.is-entering-back, .screen.is-entering-root { animation: none; }

/* Water is an optical layer; keep the original navigation geometry. */
.bottom-nav { border-radius: 25px; }
.bottom-nav .bottom-nav-item { border-radius: 18px; }
.bottom-nav-indicator { border-radius: 19px; overflow: hidden; background: rgba(255,255,255,.045); }
.bottom-nav-indicator::after { content: none; }
@supports (backdrop-filter: url("#liquid-refraction")) {
  .bottom-nav-indicator {
    backdrop-filter: url("#liquid-refraction") blur(1px) saturate(145%);
  }
}

/* Clear surfaces and direct manipulation of the navigation lens. */
.card, .search-card, .day-switcher, .list-card, .profile-card, .theme-card, .install-card, .lesson-card, .home-route, .week-day-group, .lesson-spotlight, .standalone-back-bar, .bottom-nav, .bottom-nav-indicator {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-width: .5px;
}
.bottom-nav { border-radius: 999px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bottom-nav .bottom-nav-item, .bottom-nav-indicator { border-radius: 999px; }
.bottom-nav-indicator::before { padding: .5px; opacity: .65; }
.bottom-nav::before, .bottom-nav::after { height: .5px; opacity: .4; }
.bottom-nav.is-held .bottom-nav-indicator {
  transform: translate3d(var(--nav-drag-x, 0px), 0, 0) scale(1.04, 1.13);
  transition: none;
  box-shadow: 0 5px 18px rgba(0,0,0,.20), inset 0 .5px 1px rgba(255,255,255,.55), inset 0 -.5px 1px rgba(255,255,255,.22);
}
.bottom-nav.is-held .bottom-nav-item[aria-current="page"], .bottom-nav.is-held .bottom-nav-item[aria-current="page"] .bottom-nav-label { color: var(--text-secondary); }
.bottom-nav.is-held .bottom-nav-item.is-nav-preview, .bottom-nav.is-held .bottom-nav-item.is-nav-preview .bottom-nav-label { color: var(--nav-active-text); }

.bottom-nav-indicator { transition: none; will-change: transform; background: radial-gradient(ellipse at 32% 8%, rgba(255,255,255,.20), transparent 46%), rgba(255,255,255,.045); }
:root[data-theme="light"] .falling-leaves { opacity: .30; }
:root[data-theme="light"] .app-shell::before,
:root[data-theme="light"] .app-shell::after { display: none; }
:root[data-theme="light"] .calendar-screen,
:root[data-theme="light"] .admin-screen { background: none; }
:root[data-theme="light"] .bottom-nav { box-shadow: var(--nav-shadow); }
:root[data-theme="light"] .bottom-nav::before,
:root[data-theme="light"] .bottom-nav::after { display: none; }
:root[data-theme="light"] .bottom-nav.is-held .bottom-nav-indicator { box-shadow: 0 3px 10px rgba(25,25,30,.10), inset 0 .5px 1px #fff; }
:root[data-theme="light"] .lesson-spotlight.is-current,
:root[data-theme="light"] .lesson-card.is-current { background: #f1f8f4; }
:root[data-theme="light"] .lesson-card.is-past { opacity: 1; }
:root[data-theme="light"] .home-route-item.is-past { opacity: 1; filter: none; }

.liquid-nav-optics {
  position: absolute; inset: 0; z-index: 2; display: flex; padding: 6px;
  pointer-events: none; user-select: none; -webkit-user-select: none;
  background: #29282a; color: var(--nav-active-text);
  contain: layout style;
  clip-path: inset(50%);
}
.bottom-nav .liquid-nav-copy { flex: 1 1 0; min-width: 0; color: var(--nav-active-text); }
.liquid-nav-copy .bottom-nav-label { color: var(--nav-label-text); }
.has-liquid-engine .bottom-nav-indicator { z-index: 3; background: transparent; pointer-events: none; }
.has-liquid-engine.is-held .bottom-nav-indicator { transition: none; }
.has-liquid-engine .bottom-nav-item:focus-visible { z-index: 4; }
:root[data-theme="light"] .liquid-nav-optics { background: #efebe5; }
:root[data-theme="light"] .bottom-nav .liquid-nav-copy { color: var(--nav-active-text); }
:root[data-theme="light"] .has-liquid-engine .bottom-nav-indicator { background: transparent; }
