@font-face { font-family: Montserrat; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/montserrat-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/montserrat-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #fff;
  --surface-soft: #f1f3f7;
  --line: #e5e8ee;
  --text: #222a3b;
  --muted: #7a8395;
  --accent: #5c6ddf;
  --accent-deep: #4858c4;
  --accent-soft: #eaedff;
  --accent-line: #d9defa;
  --positive: #308c79;
  --positive-soft: #eaf6f2;
  --nav-muted: #8992a2;
  --nav-bg: rgba(255,255,255,.95);
  --day-active-bg: #222a3b;
  --day-active-text: #fff;
  --button-bg: #222a3b;
  --button-text: #fff;
  --toast-bg: #222a3b;
  --toast-text: #fff;
}
* { box-sizing: border-box; cursor: default; caret-color: transparent; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 13px/1.5 Montserrat, Arial, sans-serif; -webkit-font-smoothing: antialiased; cursor: default; }
button, select { font: inherit; }
button:not(:disabled), button:not(:disabled) *, select, summary, summary *, label[for], label[for] *, a[href], a[href] *, [role="button"], [role="switch"], .game-name-toggle, .game-name-toggle *, .checkbox-row, .checkbox-row *, .file-picker label, .file-picker label * { cursor: pointer; }
input, textarea, [contenteditable="true"] { cursor: text; caret-color: auto; }
input[type="checkbox"], input[type="radio"] { cursor: pointer; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; transition: transform .16s ease, border-color .16s ease, background-color .16s ease; }
button:active:not(:disabled) { transform: scale(.97); }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-shell { width: min(100%, 700px); min-height: 100vh; margin: auto; padding: max(24px, env(safe-area-inset-top)) 22px calc(104px + env(safe-area-inset-bottom)); }
.app-header { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.brand-icon { display: grid; place-items: center; flex: 0 0 39px; width: 39px; height: 39px; border-radius: 11px; background: var(--accent); color: #fff; }
.brand-icon svg { width: 23px; height: 23px; }
.app-header h1 { margin: 0; font-size: clamp(21px, 4.3vw, 27px); font-weight: 760; line-height: 1.15; letter-spacing: -.055em; }
.today-button { flex: 0 0 auto; margin-left: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 10px; font-weight: 700; }
.today-button span { margin-left: 4px; color: var(--accent); font-size: 15px; line-height: 0; }
.view { display: none; animation: appear .2s ease-out; }
.view.active { display: block; }
@keyframes appear { from { opacity: .55; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.context-line { display: flex; align-items: center; gap: 8px; margin: 0 1px 12px; white-space: nowrap; }
.context-label { color: var(--muted); font-size: 10px; font-weight: 600; }
.context-line strong { font-size: 12px; font-weight: 750; }
.context-separator { width: 3px; height: 3px; margin: 0 3px; border-radius: 50%; background: #bcc4d0; }
.badge { color: var(--muted); font-size: 10px; font-weight: 650; }
.live-card { position: relative; overflow: hidden; margin-bottom: 25px; padding: 20px 21px 17px; border: 1px solid var(--accent-line); border-radius: 20px; background: var(--accent-soft); box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 9%, transparent); }
.live-card::after { content: ""; position: absolute; top: 0; right: 0; width: 76px; height: 76px; border-left: 1px solid color-mix(in srgb, var(--accent) 10%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 0 0 0 76px; pointer-events: none; }
.live-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.live-state { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--accent-deep); font-size: 10px; font-weight: 750; }
.live-state::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--accent); }
.live-card[data-mode="current"] .live-state::before { background: var(--positive); }
.live-clock { color: var(--muted); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.live-subject { max-width: 530px; margin: 0 0 8px; font-size: clamp(23px, 5.3vw, 34px); font-weight: 750; line-height: 1.17; letter-spacing: -.05em; text-wrap: balance; }
.live-details { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-bottom: 18px; color: var(--muted); font-size: 10px; }
.live-details p { margin: 0; }
.live-details p:empty { display: none; }
.live-timer-wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 13px; border-top: 1px solid var(--accent-line); }
.live-timer-caption { color: var(--muted); font-size: 10px; font-weight: 600; }
.live-timer { color: var(--accent-deep); font-size: clamp(26px, 7vw, 39px); font-weight: 730; line-height: 1; letter-spacing: -.055em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.week-nav strong { min-width: 0; font-size: 12px; font-weight: 730; text-align: center; }
.round-button { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: 23px/1 Arial, sans-serif; }
.round-button:hover { border-color: var(--accent); color: var(--accent-deep); }
.day-tabs { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 2px; margin-bottom: 26px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.day-tab { min-width: 0; min-height: 58px; padding: 5px 0 4px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); text-align: center; }
.day-tab .short { display: block; font-size: 9px; font-weight: 650; }
.day-tab .number { display: block; margin: 2px 0; font-size: 16px; font-weight: 740; line-height: 1.1; }
.day-load { display: block; margin: 2px auto 0; color: var(--accent-deep); font-size: 9px; font-weight: 750; line-height: 1; }
.day-load.empty { color: var(--muted); opacity: .45; }
.day-tab:hover { background: var(--surface-soft); color: var(--text); }
.day-tab.active { background: var(--day-active-bg); color: var(--day-active-text); }
.day-tab.active .day-load { color: var(--day-active-text); opacity: .85; }
.day-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.eyebrow { display: block; color: var(--accent-deep); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow:empty { display: none; }
.day-heading h2 { margin: 3px 0 0; font-size: clamp(21px, 4.4vw, 26px); font-weight: 750; line-height: 1.2; letter-spacing: -.05em; }
.pill { flex: 0 0 auto; color: var(--muted); font-size: 10px; font-weight: 650; white-space: nowrap; }
.lesson-list { display: grid; gap: 9px; }
.lesson-card { display: grid; grid-template-columns: 61px minmax(0,1fr); column-gap: 16px; padding: 17px 17px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 5px 16px rgba(35,48,75,.035); }
.lesson-card.current { border-color: var(--accent-line); }
.lesson-card.next { border-color: var(--accent-line); }
.lesson-top { display: flex; flex-direction: column; align-items: flex-start; grid-column: 1; grid-row: 1 / span 3; min-width: 0; padding-right: 11px; border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.lesson-number { order: -1; margin-bottom: auto; color: var(--accent); font-size: 22px; font-weight: 740; letter-spacing: -.07em; line-height: 1; }
.lesson-time { margin-top: 13px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.lesson-end { margin-top: 1px; color: var(--muted); font-size: 10px; font-weight: 600; }
.lesson-status { grid-column: 2; justify-self: start; margin-bottom: 5px; padding: 3px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-deep); font-size: 9px; font-weight: 730; }
.lesson-card.next .lesson-status { background: var(--accent-soft); color: var(--accent-deep); }
.lesson-subject { grid-column: 2; min-width: 0; margin: 0 0 7px; font-size: 14px; font-weight: 750; letter-spacing: -.025em; line-height: 1.35; }
.lesson-meta { display: flex; flex-wrap: wrap; grid-column: 2; gap: 3px 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.lesson-meta span + span::before { content: " · "; margin: 0 5px; color: #abb4c3; }
.lesson-meta .meta-type { color: var(--accent-deep); font-weight: 650; }
.empty-card { padding: 28px 15px; color: var(--muted); text-align: center; }
.empty-card strong { display: block; font-size: 13px; font-weight: 650; }
.week-summary { margin-top: 17px; padding: 17px 18px 15px; }
.week-summary-head { display: flex; align-items: center; gap: 21px; }
.week-summary-head > div { display: grid; gap: 3px; }
.week-summary-head > div + div { padding-left: 21px; border-left: 1px solid var(--line); }
.week-summary-head span { color: var(--muted); font-size: 9px; font-weight: 650; }
.week-summary-head strong { font-size: 15px; font-weight: 760; letter-spacing: -.03em; }
.week-bars { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.week-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-height: 59px; color: var(--muted); }
.week-bar b { font-size: 9px; font-weight: 730; }
.week-bar small { font-size: 9px; font-weight: 650; }
.week-bar-fill { display: block; width: 15px; min-height: 4px; border-radius: 4px 4px 2px 2px; background: var(--accent); opacity: .55; }
.week-bar.active { color: var(--accent-deep); }
.week-bar.active .week-bar-fill { opacity: 1; }
.section-heading { margin: 4px 0 19px; }
.section-heading h2 { margin: 0; font-size: clamp(26px, 5vw, 33px); font-weight: 750; letter-spacing: -.055em; }
.setting-card, .profile-card, .about-card { margin-bottom: 10px; padding: 19px; }
.setting-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.setting-symbol { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-deep); font-size: 10px; font-weight: 750; }
.setting-title h3, .about-card h3, .theme-card h3 { margin: 0; font-size: 13px; font-weight: 750; }
.option-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
.option-button { min-width: 0; min-height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font-size: 10px; font-weight: 670; }
.option-button:hover { border-color: var(--accent); }
.option-button:disabled { opacity: .72; }
.option-button.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.option-button.off.selected { border-color: #b9898b; background: #fbf1f1; color: #a2686b; }
.wide-button { width: 100%; min-height: 47px; margin-top: 4px; border: 0; border-radius: 10px; background: var(--button-bg); color: var(--button-text); font-size: 11px; font-weight: 730; }
.wide-button:hover { background: var(--accent-deep); }
.wide-button:disabled { border: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); opacity: 1; }
.reminder-preview { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 17px 18px; border-color: var(--accent-line); background: var(--accent-soft); }
.reminder-preview-icon { display: grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; border-radius: 9px; background: var(--surface); color: var(--accent-deep); font-size: 20px; font-weight: 600; }
.reminder-preview > div { display: grid; gap: 2px; min-width: 0; }
.reminder-preview-label { color: var(--accent-deep); font-size: 9px; font-weight: 730; }
.reminder-preview strong { font-size: 13px; font-weight: 750; line-height: 1.35; }
.reminder-preview small { color: var(--muted); font-size: 10px; }
.helper-note { color: var(--muted); font-size: 10px; }
.helper-note:empty { display: none; }
.profile-card label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.profile-card select { width: 100%; min-height: 44px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--text); font-size: 12px; font-weight: 700; }
.theme-group { margin-top: 16px; }
.theme-group-label { color: var(--muted); font-size: 10px; font-weight: 700; }
.theme-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 8px; }
.theme-button { display: grid; justify-items: center; gap: 7px; min-width: 0; padding: 10px 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font-size: 10px; font-weight: 670; }
.theme-button.selected { border-color: var(--accent); color: var(--accent-deep); }
.theme-swatch { display: block; width: 26px; height: 26px; border-radius: 7px; }
.swatch-blue { background: linear-gradient(135deg, #e1e6ff 50%, #5c6ddf 50%); }
.swatch-lime { background: linear-gradient(135deg, #eef3df 50%, #829954 50%); }
.swatch-violet { background: linear-gradient(135deg, #eee6f3 50%, #9675ad 50%); }
.swatch-dark-blue { background: linear-gradient(135deg, #1c2942 50%, #94a8ff 50%); }
.swatch-dark-lime { background: linear-gradient(135deg, #253522 50%, #a4c678 50%); }
.swatch-dark-violet { background: linear-gradient(135deg, #33273f 50%, #c7a0dd 50%); }
.about-card p { margin: 9px 0 0; color: var(--muted); white-space: pre-line; font-size: 11px; }
.easter-card { margin-top: 15px; }
.easter-card summary { display: flex; align-items: center; justify-content: flex-start; padding: 12px 16px; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; list-style: none; }
.easter-card summary::-webkit-details-marker { display: none; }
.easter-card img { display: block; width: calc(100% - 18px); height: auto; margin: 0 9px 9px; border-radius: 9px; }
.bottom-nav { position: fixed; z-index: 10; left: 50%; bottom: 0; display: flex; gap: 0; width: min(100%,700px); min-height: calc(63px + env(safe-area-inset-bottom)); padding: 5px 18px max(5px, env(safe-area-inset-bottom)); transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; background: var(--nav-bg); box-shadow: 0 -6px 25px rgba(40,52,86,.06); }
.nav-button { display: grid; justify-items: center; align-content: center; flex: 1; min-width: 0; border: 0; border-radius: 10px; background: transparent; color: var(--nav-muted); }
.nav-button svg { display: block; width: 19px; height: 19px; }
.nav-button small { display: block; margin-top: 3px; font-size: 9px; font-weight: 650; white-space: nowrap; }
.nav-button.active { color: var(--accent-deep); }
.nav-button.active::after { content: ""; width: 16px; height: 2px; margin-top: 3px; border-radius: 2px; background: var(--accent); }
.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: min(90vw,360px); padding: 10px 13px; transform: translate(-50%,10px); border-radius: 9px; background: var(--toast-bg); color: var(--toast-text); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; font-size: 11px; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 500px) {
  .app-shell { padding: max(20px, env(safe-area-inset-top)) 15px calc(92px + env(safe-area-inset-bottom)); }
  .app-header { margin-bottom: 20px; }
  .live-card { padding: 18px 18px 16px; }
  .live-subject { font-size: clamp(22px, 6vw, 28px); }
  .live-timer { font-size: clamp(26px, 7.5vw, 34px); }
  .day-tabs { gap: 0; }
  .day-tab .number { font-size: 15px; }
}
@media (max-width: 355px) {
  .app-header h1 { font-size: 20px; }
  .today-button { padding: 7px 8px; }
  .live-timer-caption { max-width: 85px; }
  .live-timer { font-size: 25px; }
  .lesson-card { grid-template-columns: 54px minmax(0,1fr); column-gap: 12px; padding: 15px 12px; }
  .lesson-number { font-size: 20px; }
  .nav-button small { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { button, .view, .toast { animation: none; transition: none; } button:active:not(:disabled) { transform: none; } }
