:root{color-scheme:light;--bg:#f5f6fa;--card:#fff;--text:#222b3e;--muted:#737e94;--line:#e7eaf2;--accent:#6558e8;--soft:#eeecff;--green:#17836a;--shadow:0 6px 28px #28356006;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button{touch-action:manipulation}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:3px}button{border:0}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.shell{max-width:540px;margin:auto;min-height:100dvh;padding-bottom:calc(100px + env(safe-area-inset-bottom));padding-top:env(safe-area-inset-top)}.topbar{display:flex;align-items:center;justify-content:space-between;padding:24px 22px 12px}.brand{display:flex;gap:10px;align-items:center;font-size:16px;font-weight:800;letter-spacing:.04em}.brand-icon{width:37px;height:39px;border-radius:12px;background:var(--accent);color:white;display:grid;place-items:center;font-size:29px;font-weight:900;line-height:1}.brand-caption{display:block;color:var(--muted);font-size:10px;letter-spacing:.01em;font-weight:500;margin-top:3px}.icon-button{width:44px;height:44px;border-radius:14px;background:var(--card);border:1px solid var(--line);font-size:25px;display:grid;place-items:center}main{padding:0 22px}.intro{margin:26px 0}.eyebrow{font-size:10px;letter-spacing:.12em;font-weight:750;color:var(--muted);margin:0 0 8px}.intro h1{font-size:clamp(25px,6.8vw,34px);letter-spacing:-1.2px;margin:0 0 10px;font-weight:800;line-height:1.15}.accent{color:var(--accent)}.muted{color:var(--muted);font-size:12px;line-height:1.6;margin:0}.group-card{background:var(--card);width:100%;border:1px solid var(--line);border-radius:20px;padding:18px;display:flex;gap:14px;align-items:center;text-align:left;box-shadow:var(--shadow)}.group-symbol{display:grid;place-items:center;border-radius:14px;background:var(--soft);color:var(--accent);height:48px;width:48px;flex-shrink:0;font-size:28px}.group-copy{min-width:0;flex:1}.group-copy .eyebrow{display:block;font-size:9px;margin-bottom:4px}.group-copy strong{display:block;font-size:20px;letter-spacing:-.4px;overflow-wrap:anywhere}.group-copy .muted{display:block;font-size:10px;margin-top:4px}.section-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:28px 0 16px}.section-row h2{font-size:18px;margin:0;letter-spacing:-.4px}.section-row .eyebrow{font-size:9px;margin-bottom:5px}select{border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--accent);max-width:140px;min-height:44px;padding:9px;font-size:11px}.days{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.day{min-height:73px;position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;border-radius:15px;background:var(--card);border:1px solid var(--line)}.day span{font-size:10px;color:var(--muted)}.day strong{font-size:18px}.day.active{background:var(--accent);border-color:var(--accent);color:white;box-shadow:0 5px 12px color-mix(in srgb,var(--accent) 18%,transparent)}.day.active span{color:#efedff}.day.today:after{content:"";width:4px;height:4px;border-radius:50%;background:var(--accent);position:absolute;bottom:5px}.day.active:after{background:white}.day-heading{margin-top:27px}.day-heading h2{font-size:17px}.day-heading .muted{font-size:11px}.lesson{display:flex;gap:13px;align-items:stretch;margin-bottom:12px}.lesson-time{flex:0 0 42px;text-align:right;padding-top:17px}.lesson-time strong{display:block;font-size:12px;font-weight:700}.lesson-time span{display:block;font-size:10px;color:var(--muted);margin-top:5px}.lesson-card{flex:1;min-width:0;position:relative;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:15px 16px;box-shadow:var(--shadow)}.lesson-card.replacement{border-left:3px solid var(--accent)}.lesson-card.cancelled{opacity:.72}.lesson-card.cancelled h3{text-decoration:line-through}.lesson-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:9px;color:var(--muted);margin-bottom:9px}.badge{display:inline-block;color:var(--accent);background:var(--soft);border-radius:5px;padding:4px 6px;font-size:9px;font-weight:650}.badge.cancel{background:#fff0ef;color:#bd544c}.lesson-card h3{font-size:14px;line-height:1.5;overflow-wrap:anywhere;margin:0 0 9px;letter-spacing:-.15px}.lesson-meta{display:flex;gap:8px;flex-wrap:wrap;font-size:10px;color:var(--muted);line-height:1.6}.room{color:var(--green);font-weight:650}.lesson-note,.original{font-size:11px;line-height:1.6;color:var(--muted);margin:9px 0 0;overflow-wrap:anywhere}.original{text-decoration:line-through}.source-note{font-size:10px;color:var(--muted);line-height:1.7;text-align:center;margin:24px 0}.bottom-nav{position:fixed;z-index:5;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:540px;background:var(--card);border-top:1px solid var(--line);display:flex;justify-content:space-around;padding:10px 12px calc(10px + env(safe-area-inset-bottom))}.nav-item{background:transparent;color:var(--muted);display:flex;align-items:center;gap:5px;flex-direction:column;font-size:10px;min-height:50px;min-width:76px;justify-content:center}.nav-item>span{font-size:24px;line-height:1}.nav-item.active{color:var(--accent)}.welcome{text-align:center;padding:45px 0 20px}.welcome-icon{width:66px;height:66px;display:grid;place-items:center;color:var(--accent);background:var(--soft);font-size:34px;border-radius:22px;margin:0 auto 20px}.welcome h2{font-size:20px;letter-spacing:-.5px;margin:0 0 10px}.primary{background:var(--accent);color:white;padding:14px 19px;border-radius:12px;min-height:48px;font-size:13px;font-weight:650;margin-top:24px}.primary span{margin-left:20px}.message{background:var(--soft);color:var(--accent);padding:13px 15px;border-radius:12px;margin-top:16px;font-size:12px;line-height:1.6;overflow-wrap:anywhere}.message.error{color:#a9423b;background:#fff0ef}.message button{background:transparent;color:inherit;text-decoration:underline;min-height:44px}.empty{text-align:center;padding:36px 16px;background:var(--card);border:1px dashed var(--line);border-radius:18px}.empty h3{font-size:16px;margin:0 0 8px}.bell{display:flex;align-items:center;justify-content:space-between;min-height:58px;border-bottom:1px solid var(--line);font-size:13px}.bell strong{color:var(--accent);font-size:14px}.panel-note{margin-bottom:10px}dialog{color:var(--text);background:var(--card);border:1px solid var(--line);border-radius:24px 24px 0 0;padding:24px;position:fixed;inset:auto 0 0;margin:auto;width:min(100%,540px);max-width:100%;max-height:85dvh;overflow:auto;padding-bottom:calc(24px + env(safe-area-inset-bottom));box-shadow:0 -20px 100px #20274820}dialog::backdrop{background:#151c3666;backdrop-filter:blur(3px)}.dialog-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.dialog-header h2{font-size:25px;letter-spacing:-.8px;margin:0}.dialog-header .eyebrow{font-size:9px}.search-label{display:block;color:var(--muted);font-size:12px;margin-bottom:8px}input{width:100%;border:1px solid var(--line);background:var(--bg);color:var(--text);border-radius:12px;padding:14px;min-height:48px;font-size:16px}.campus-tabs{display:flex;gap:7px;margin:17px 0}.campus-tabs button{padding:10px 14px;background:var(--bg);border-radius:10px;color:var(--muted);font-size:12px;min-height:44px}.campus-tabs button.active{background:var(--soft);color:var(--accent)}.group-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px;max-height:34dvh;overflow:auto}.group-option{background:var(--bg);padding:14px 10px;border-radius:10px;font-size:13px;font-weight:650;min-height:48px;overflow-wrap:anywhere}.group-option.selected{color:var(--accent);background:var(--soft)}.dialog-foot{font-size:10px;margin-top:20px}.loading{opacity:.5;pointer-events:none}
@media(max-width:350px){main{padding:0 14px}.topbar{padding-left:14px;padding-right:14px}.days{gap:4px}.day{border-radius:12px}.lesson{gap:9px}.lesson-card{padding:13px}.group-card{padding:14px;gap:10px}.group-copy strong{font-size:18px}}
@media(prefers-reduced-motion:no-preference){button{transition:background .15s,opacity .15s}.lesson-card{animation:appear .18s ease-out}@keyframes appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}}

/* Left drawer and additional student tools. */
.hamburger{display:flex;flex-direction:column;justify-content:space-between;width:23px;height:18px;margin:3px 0}.hamburger i{display:block;width:100%;height:2px;background:currentColor;border-radius:2px}
.drawer{inset:0 auto 0 0;margin:0;max-height:100dvh;height:100dvh;width:min(86vw,360px);max-width:360px;border-radius:0 22px 22px 0;padding:calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));overscroll-behavior:contain}.drawer .dialog-header h2{font-size:23px}.drawer .dialog-header{gap:6px}.drawer-group{background:var(--soft);color:var(--accent);padding:12px 14px;border-radius:12px;font-size:13px;font-weight:650;margin:0 0 24px}.menu-section-label{font-size:9px;letter-spacing:.14em;color:var(--muted);margin:24px 12px 8px}.drawer-item{display:flex;align-items:center;gap:14px;text-align:left;background:transparent;border-radius:12px;padding:12px;width:100%;min-height:52px;font-size:14px;line-height:1.4}.drawer-item:hover,.drawer-item:focus-visible{background:var(--soft)}.drawer-item>span:first-child{width:24px;text-align:center;font-size:24px;color:var(--accent);flex-shrink:0}.drawer-item>span:nth-child(2){flex:1}.drawer-item small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.drawer-item b{color:var(--muted);font-size:20px;font-weight:400}
body:has(dialog[open]){overflow:hidden}#feature-dialog{overscroll-behavior:contain}#feature-status{margin-top:16px}#feature-content{font-size:13px;line-height:1.7;overflow-wrap:anywhere}.feature-note{color:var(--muted);font-size:12px;line-height:1.7;margin:10px 0 18px}.option-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 0;border-bottom:1px solid var(--line);min-height:54px}.option-row input{width:24px;min-height:24px;height:24px;accent-color:var(--accent);flex-shrink:0}.choice-row{display:flex;gap:8px}.choice-row button{flex:1;padding:14px 8px;border-radius:12px;background:var(--bg);min-height:48px}.choice-row button.active{background:var(--soft);color:var(--accent)}.feature-card{background:var(--bg);border:1px solid var(--line);border-radius:14px;padding:16px;margin:12px 0}.feature-card h3{font-size:14px;margin:0 0 8px}.feature-card p{margin:5px 0;color:var(--muted);font-size:12px}.feature-card .price{font-size:24px;color:var(--accent);font-weight:750}.tool-form{display:flex;flex-direction:column;gap:12px}.tool-form label{font-size:12px;color:var(--muted)}.tool-form select{max-width:100%;width:100%;font-size:14px}.tool-form input{font-size:16px}.tool-form .primary{margin:0}.result-button{display:block;width:100%;text-align:left;min-height:48px;padding:13px;background:var(--bg);border-radius:10px;margin:8px 0}.result-button:hover{background:var(--soft)}.feature-link{display:inline-flex;align-items:center;justify-content:center;background:var(--accent);color:var(--card);padding:12px 16px;border-radius:12px;min-height:48px;font-weight:650;margin:12px 0}
@media(prefers-reduced-motion:no-preference){.drawer[open]{animation:drawer-in .2s ease-out}@keyframes drawer-in{from{transform:translateX(-100%)}to{transform:translateX(0)}}}

.dialog-header>div{min-width:0}.dialog-header .icon-button{flex-shrink:0}.drawer .dialog-header h2{font-size:clamp(18px,5.5vw,23px)}

/* Appearance tokens: explicit theme overrides the operating system preference. */
:root[data-theme="light"]{color-scheme:light;--bg:#f5f6fa;--card:#fff;--text:#222b3e;--muted:#68758d;--line:#e1e6ef;--green:#17836a;--shadow:0 6px 28px #28356006}
:root[data-theme="dark"]{color-scheme:dark;--bg:#141821;--card:#1e2430;--text:#edf0f8;--muted:#a0abc0;--line:#303949;--green:#77d4b2;--shadow:none}
:root[data-theme="dark"] .message.error{background:#3c2525;color:#ffb5ad}
.day.active,.primary,.feature-link{background:var(--solid,var(--accent));color:white}.day.active span{color:white}
.brand-icon{width:48px;height:48px;background:var(--soft);color:var(--accent);border-radius:14px;padding:4px}.college-mark{display:block;width:100%;height:100%;color:inherit;flex-shrink:0}
.drawer-brand{display:flex;align-items:center;gap:12px;color:var(--accent);margin-bottom:24px}.drawer-brand .college-mark{width:46px;height:46px}.drawer-brand>span{font-size:17px;letter-spacing:.05em;font-weight:800;color:var(--text)}.drawer-brand small{display:block;font-size:10px;font-weight:500;letter-spacing:0;color:var(--muted);margin-top:4px}
.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 26px}.theme-options button{background:var(--bg);border:1px solid var(--line);border-radius:14px;min-height:84px;padding:12px 5px;font-size:11px;display:flex;flex-direction:column;align-items:center;gap:10px}.theme-options button>span{font-size:25px;line-height:1}.theme-options button.active{border-color:var(--accent);background:var(--soft);color:var(--accent)}
.palette-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:12px 0 24px}.palette-options button{background:transparent;min-height:70px;padding:7px 2px;font-size:10px;display:flex;flex-direction:column;align-items:center;gap:9px;border:1px solid transparent;border-radius:12px}.palette-options button.active{background:var(--soft);border-color:var(--accent)}.palette-swatch{display:block;width:30px;height:30px;border-radius:50%;background:var(--swatch);border:3px solid var(--card);box-shadow:0 0 0 1px var(--line)}.palette-options button.active .palette-swatch{box-shadow:0 0 0 2px var(--accent)}
.appearance-preview{display:flex;align-items:center;gap:16px;padding:18px;background:var(--soft);border:1px solid var(--line);border-radius:16px;color:var(--accent)}.appearance-preview .college-mark{width:60px;height:60px}.appearance-preview strong{font-size:17px}.appearance-preview p{font-size:11px;color:var(--muted);margin:4px 0 0}

.access-banner{font-size:11px;margin:12px 2px 0}.premium-badge{font-size:9px;font-weight:650;color:var(--accent);background:var(--soft);padding:4px 6px;border-radius:6px;flex-shrink:0}#menu-plan{font-size:11px;margin:-12px 12px 20px}
.lesson-time { flex-basis: 62px; padding-top: 12px; font-size: 10px; }
.lesson-time strong { margin-bottom: 6px; }
.lesson-time span { margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lesson-time small, .bell small { display: block; color: var(--muted); font-size: 10px; font-weight: normal; margin: 4px 0; }
.bell { min-height: 52px; }
.bell strong { text-align: right; }
.pair-live { margin-bottom: 8px; color: var(--accent); font-size: 11px; font-variant-numeric: tabular-nums; }
.pair-live progress { display: block; width: 100%; height: 8px; margin-top: 5px; accent-color: var(--accent); }
.week-choice, .week-options button { background: var(--card); color: var(--accent); border: 1px solid var(--line); border-radius: 12px; min-height: 44px; padding: 8px 12px; }
.week-choice { font-size: 11px; max-width: 50%; }
#parity { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#parity::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  flex-shrink: 0;
}
.week-options { display: grid; gap: 8px; }
.week-options button { text-align: left; }
.week-options button[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); }
.study-page { min-height: calc(100dvh - 145px); display: flex; flex-direction: column; }
.study-page h1 { font-size: clamp(24px, 6vw, 32px); margin: 16px 0; }
.study-page h2 { font-size: 17px; margin: 20px 0 10px; }
.course-list, #study-content { flex: 1; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 8px; }
.course-grid button[aria-pressed="true"], .filter-row button[aria-pressed="true"] { background: var(--soft); color: var(--accent); }
.thumb-controls { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); background: var(--bg); padding: 10px 0; z-index: 2; margin-top: 12px; }
.filter-row, .thumb-row { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.filter-row { margin: 0 0 6px; flex-wrap: wrap; }
.filter-row button { min-height: 44px; padding: 4px 9px; border-radius: 10px; background: var(--card); font-size: 11px; }
.thumb-row input { min-width: 0; flex: 1; }
.thumb-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; background: var(--soft); color: var(--accent); font-size: 12px; white-space: nowrap; }
.replacement-downloads { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }
.group-card .group-symbol { align-content: center; gap: 2px; font-size: 22px; line-height: 1; }
.group-symbol small { font-size: 9px; font-weight: 700; }
.group-symbol small:empty { display: none; }
.week-header { flex-wrap: wrap; }
.week-controls { display: flex; gap: 8px; max-width: 100%; margin-inline-start: auto; }
.week-controls .week-choice { max-width: none; }
@media (max-width: 540px) {
  .week-header { display: grid; grid-template-columns: minmax(0, 1fr); }
  .week-controls { width: 100%; margin-inline-start: 0; }
  .week-controls .week-choice { flex: 1; min-width: 0; }
}
.subgroup-shortcut::after { content: none; }
#study-content .thumb-search { position: sticky; bottom: calc(126px + env(safe-area-inset-bottom)); background: var(--bg); padding: 10px 0; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.thumb-search label:nth-child(3) { grid-column: 1 / -1; }
.thumb-search input, .thumb-search select { min-width: 0; width: 100%; }
.thumb-search .primary { align-self: end; justify-self: end; min-height: 48px; }
#study-content, #study-content #feature-body { display: flex; flex-direction: column; }
#study-content #feature-body, #study-content #search-results { flex: 1; }
.study-page .thumb-controls { border-top: 1px solid var(--line); }
#group-page { min-height: auto; }
.group-steps { margin-top: 18px; }
#search-results .result-button { background: var(--card); border: 1px solid var(--line); }
#search-results .result-button:hover { background: var(--soft); }
.detail-week-button { grid-column: 1 / -1; }
.detail-week-day + .detail-week-day { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.step-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.step-options button, .group-steps .group-option { min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-weight: 650; }
#group-page .group-option[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); }

.bell-templates { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; align-items: start; }
.bell-template { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 12px; }
.bell-template h2 { margin: 0 0 8px; }
.bell-template .bell { gap: 6px; padding: 7px 0; }
.bell-template .bell:last-child { border-bottom: 0; }
.bell-template .bell strong { font-size: 12px; white-space: nowrap; }
.bell-template .bell small { font-size: 9px; }
@media (max-width: 520px) { .bell-templates { grid-template-columns: 1fr; } }
.lesson { align-items: stretch; gap: 8px; margin-bottom: 8px; }
.lesson-card { padding: 11px 13px; }
.lesson-heading { display: flex; align-items: start; gap: 8px; }
.lesson-heading h3 { flex: 1; min-width: 0; margin-bottom: 5px; line-height: 1.35; }
.lesson-heading .badge { flex: none; }
.lesson-note, .original { margin-top: 5px; }
.lesson-time { padding-top: 9px; }
.pair-live { margin: 8px 0 0; }
.pair-live progress { height: 9px; }
.day-live { margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; background: var(--soft); font-size: 12px; color: var(--accent); }
.day-live p { margin: 0; }
#travel-settings { margin-top: 5px; }
#travel-settings summary { cursor: pointer; min-height: 32px; align-content: center; }
#travel-minutes { width: 75px; margin: 4px; }
#search-detail { width: min(100%, 540px); max-height: 88dvh; }
.detail-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 12px 0; }
.detail-days button { min-height: 44px; padding: 4px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 12px; }
.detail-days button[aria-pressed="true"] { background: var(--soft); color: var(--accent); border-color: var(--accent); }
.detail-lesson { margin: 7px 0; padding: 10px 12px; }
.detail-lesson p { margin: 5px 0; }

#study-page[data-route="search"] { min-height: 0; }
#study-page[data-route="search"] .thumb-controls { position: static; }
#study-content .thumb-search .primary { grid-column: 1 / -1; justify-self: stretch; min-height: 48px; }

/* Keep the refresh artwork centered independently of font metrics. */
#refresh { padding: 0; line-height: 1; }
#refresh svg { display: block; flex-shrink: 0; }

/* Search results scroll inside their own frame, without moving the form. */
#study-content #search-results {
  flex: none;
  max-height: 38dvh;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 8px;
}
#search-results .result-button { margin: 0 0 8px; }
#search-results .result-button:last-child { margin-bottom: 0; }
#search-results .feature-note { margin: 8px; }
#study-content .thumb-search { position: static; }

.bottom-nav .nav-item > svg { width: 24px; height: 24px; flex-shrink: 0; }
.detail-lesson > strong { display: block; }
.detail-lesson > .badge { margin-bottom: 8px; }
.detail-lesson.change-removed { border-left: 3px solid #bd544c; }
.detail-lesson.change-removed > p:not(.original) { text-decoration: line-through; }
.detail-lesson.change-removed .badge { color: #bd544c; background: var(--soft); }
.detail-lesson.change-added { border-left: 3px solid var(--green); }
.detail-lesson.change-replaced { border-left: 3px solid var(--accent); }


/* Compact schedule header keeps the first lessons above the navigation. */
.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 44px;
  gap: 8px 12px;
  padding: 14px 22px 0;
}
.topbar .brand { gap: 7px; font-size: 14px; }
.topbar .brand-icon { width: 34px; height: 36px; border-radius: 10px; }
.topbar .brand-caption { font-size: 9px; }
.topbar .group-card {
  min-width: 0;
  padding: 8px 10px;
  gap: 8px;
  border-radius: 12px;
  box-shadow: none;
}
.topbar .group-symbol { width: 28px; height: 32px; border-radius: 8px; font-size: 18px; }
.topbar .group-symbol small { font-size: 8px; }
.topbar .group-copy .eyebrow { font-size: 7px; margin-bottom: 2px; letter-spacing: .06em; }
.topbar .group-copy strong { font-size: 15px; line-height: 1.2; }
.topbar .group-copy .muted { font-size: 9px; line-height: 1.3; margin-top: 3px; overflow-wrap: anywhere; }
#schedule-section .week-header { display: flex; justify-content: flex-end; margin: 10px 0; }
#schedule-section .days { gap: 6px; }
#schedule-section .day { min-height: 54px; gap: 3px; border-radius: 12px; }
#schedule-section .day-heading { margin: 16px 0 12px; }
@media (max-width: 540px) {
  #schedule-section .week-controls { width: auto; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
  #schedule-section .week-controls .week-choice { flex: none; padding: 8px; font-size: 10px; }
}
@media (max-width: 400px) {
  .topbar { padding: 12px 16px 0; gap: 8px; }
  .topbar .brand { font-size: 12px; gap: 5px; }
  .topbar .brand-caption { display: none; }
  .topbar .group-card { padding: 7px 8px; }
  .topbar .group-symbol { display: none; }
  main { padding-inline: 16px; }
}


/* Group and week parity share one compact header card. */
.topbar .group-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; padding: 6px 8px; gap: 7px; }
.topbar .group-symbol { width: 24px; height: 28px; font-size: 16px; }
.topbar .group-copy strong { font-size: 14px; }
.topbar .group-copy .muted { margin-top: 2px; white-space: nowrap; }
.topbar #parity { min-height: 32px; max-width: none; padding: 5px 7px; font-size: 10px; border-radius: 8px; gap: 6px; }
#schedule-section .days { margin-top: 12px; }
@media (max-width: 400px) {
  .topbar .group-card { grid-template-columns: minmax(0, 1fr) auto; padding: 6px; gap: 4px; }
  .topbar .group-copy strong { font-size: 12px; }
  .topbar .group-copy .muted { font-size: 8px; }
  .topbar #parity { font-size: 9px; padding: 5px; gap: 5px; }
}

.week-header:has(#subgroup-shortcut[hidden]) { display: none !important; }

@media (max-width: 350px) {
  .topbar { grid-template-columns: auto minmax(0, 1fr) 32px; gap: 6px; }
  .topbar .brand-icon { display: none; }
  .topbar #refresh { width: 32px; height: 36px; border-radius: 10px; }
  .topbar .group-copy strong { font-size: 11px; }
  .topbar #parity { font-size: 8px; gap: 4px; padding-inline: 4px; }
}
