:root {
  --text-scale: 1;
  --viewport-font-unit: .24rem;
  font-family: var(--app-font, system-ui), sans-serif;
  font-optical-sizing: auto;
  color: #242629;
  background: var(--page-background, #f0f2f4);
  --line: #f0f0f0;
  --muted: #8b9098;
  --accent: #0a59f7;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, white);
  --accent-hover: color-mix(in srgb, var(--accent) 13%, white);
  --accent-muted: color-mix(in srgb, var(--accent) 66%, #8b9199);
  --time-width: calc(5.5rem * var(--text-scale));
  --header-height: calc(4.5rem * var(--text-scale));
  --period-height: calc(5.5rem * var(--text-scale));
  --ease: cubic-bezier(.2, 0, .2, 1);
  --material: linear-gradient(145deg, #fffffff7, #f9fbfde8);
  --material-shadow: 0 12px 48px #202b4026, 0 2px 8px #202b400a, inset 0 0 0 1px #ffffffe6;
}
* { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; overscroll-behavior-y: none; }
body { min-width: 0; height: 100%; margin: 0; overflow: hidden; -webkit-font-smoothing: antialiased; }
body.dialog-open { overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus { outline: none; }
html[data-keyboard-navigation] :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button:disabled { cursor: default; opacity: .4; }
[hidden] { display: none !important; }
.hm-symbol { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 1em; height: 1em; font-family: "HarmonyOS Symbols"; font-size: 24px; font-weight: 500; line-height: 1; font-style: normal; user-select: none; }
.app-shell { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: clip; }
.page-scroll-content { min-height: 0; display: flex; flex: 1; flex-direction: column; overflow: hidden; }
.edge-clip { overflow: clip; overflow-clip-margin: 6px; }
.page-scroll-content, .detail-scroll-content, .week-scroll-content, .timetable-grid { translate: var(--edge-offset-x, 0px) var(--edge-offset, 0px); }
.app-header { position: relative; z-index: 5; flex: none; background: transparent; }
.header-inner { max-width: 1440px; min-height: 62px; margin: auto; padding: 14px 36px 6px; display: flex; align-items: center; gap: 14px; }
.icon-button { flex: none; width: 52px; height: 52px; padding: 0; display: grid; place-items: center; border: 1px solid #fffffff2; border-radius: 50%; background: #ffffff26; color: #292b2e; box-shadow: 0 12px 30px #37455509, inset 0 0 0 1px #ffffff50; transition: transform 140ms var(--ease), background 180ms, box-shadow 140ms, color 180ms; }
.icon-button:active { transform: scale(.9); background: #e5e9ef; }
.icon-button[aria-expanded="true"] { color: var(--accent); background: #fff; box-shadow: 0 4px 20px #a3b9db30; }
#backButton .hm-symbol { font-size: 24px; }
.sync-button.is-syncing .hm-symbol { animation: spin 900ms linear infinite; }
.title-cluster { min-width: 0; display: flex; align-items: center; gap: 18px; }
.title-cluster > strong { min-width: 0; max-width: 560px; overflow: hidden; font-size: calc(2rem * var(--text-scale)); font-weight: 800; letter-spacing: -.025em; white-space: nowrap; text-overflow: ellipsis; }
.week-select-trigger { flex: none; height: 38px; padding: 0 4px; display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 10px; background: transparent; color: #858585; font-size: calc(1rem * var(--text-scale)); font-weight: 550; white-space: nowrap; transition: background 180ms, color 180ms, transform 140ms var(--ease); }
.week-select-trigger b { font-weight: inherit; font-variant-numeric: tabular-nums; }
.week-select-trigger .select-chevron { font-size: 11px; transition: transform 220ms var(--ease); }
.week-select-trigger[aria-expanded="true"] { color: var(--accent); }
.week-select-trigger[aria-expanded="true"] .select-chevron { transform: rotate(180deg); }
.week-select-trigger:active { transform: scale(.94); }
.desktop-week-nav { display: none; flex: none; align-items: center; gap: 5px; }
.desktop-week-nav .icon-button:disabled { cursor: default; transform: none; opacity: .3; }
.header-actions { display: flex; gap: 12px; margin-left: auto; }
.header-subline { max-width: 1440px; margin: auto; padding: 0 36px 12px 86px; display: flex; align-items: center; gap: 20px; color: #8b9199; font-size: calc(0.6875rem * var(--text-scale)); letter-spacing: .02em; }
#timeModeLabel { margin-left: auto; }
.source-state { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.source-state i { width: 5px; height: 5px; border-radius: 50%; background: #89ab97; }
.source-state.loading i { animation: pulse 1s infinite; }
.offline-banner { flex: none; max-width: 1368px; width: calc(100% - 32px); margin: 0 auto 10px; padding: 8px 12px; border-radius: 12px; display: flex; align-items: center; gap: 10px; background: var(--accent-soft); color: var(--accent); font-size: calc(0.75rem * var(--text-scale)); }
.offline-banner span { flex: 1; }
.offline-banner button { flex: none; border: 0; border-radius: 8px; padding: 7px 10px; background: var(--table-surface, #fff); color: inherit; }
.timetable-panel { width: calc(100% - 64px); max-width: 1368px; min-height: 0; margin: 0 auto 24px; display: flex; flex: 1; flex-direction: column; overflow: hidden; border: 1px solid #fff; border-radius: 28px; background: var(--table-surface, #fff); box-shadow: 0 8px 36px #35455a0c; }
.timetable-scroll { width: 100%; min-height: 0; flex: 1; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; touch-action: pinch-zoom; }
.timetable-scroll::-webkit-scrollbar { display: none; }
.weekend-hint { display: none; margin: 0; padding: 8px 12px 0; color: #8c939d; font-size: calc(0.6875rem * var(--text-scale)); text-align: right; }
.timetable-grid { position: relative; display: grid; width: 100%; grid-template-columns: var(--time-width) repeat(var(--day-count, 5), minmax(0, 1fr)); grid-template-rows: var(--header-height) repeat(var(--row-count, 10), var(--period-height)); }
.corner, .day-head, .time-cell, .grid-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.edge-right { border-right: 0; }
.edge-bottom { border-bottom: 0; }
.corner { position: sticky; top: 0; left: 0; z-index: 7; grid-column: 1; grid-row: 1; display: grid; place-items: center; background: var(--table-surface, #fff); }
.corner small { color: #a98057; font-size: calc(0.6875rem * var(--text-scale)); }
.timetable-grid :is(.corner, .day-head, .time-cell) { translate: var(--edge-pin-x, 0px) var(--edge-pin-y, 0px); }
.day-head { position: sticky; top: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: var(--table-surface, #fff); color: #5b6068; }
/* Extend the header surface beyond its moving edge without adding scroll width. */
.day-head.edge-right { box-shadow: 60px 0 var(--table-surface, #fff); clip-path: inset(0 -60px 0 0); }
.day-head strong { font-size: calc(1.3125rem * var(--text-scale)); font-weight: 750; line-height: 1.2; }
.day-head .day-date { color: #a0a0a0; font-size: calc(0.9375rem * var(--text-scale)); font-weight: 550; font-variant-numeric: tabular-nums; }
.day-head small { position: absolute; right: 12px; top: 15px; color: #b5bac1; font-size: calc(0.625rem * var(--text-scale)); }
.day-head.today strong { color: var(--today-color, #ec6b55); }
.day-head.today .day-date { color: var(--today-muted, #eca394); }
.time-cell { position: sticky; left: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 13px; background: var(--table-surface, #fff); color: #9a9fa5; font-variant-numeric: tabular-nums; }
.timetable-grid .time-cell { z-index: 6; }
.time-cell.edge-bottom { box-shadow: 0 60px var(--table-surface, #fff); clip-path: inset(0 0 -60px 0); }
.time-cell strong { margin-bottom: 3px; color: #333638; font-size: calc(1.375rem * var(--text-scale)); font-weight: 800; line-height: 1.1; }
.time-cell span { font-size: calc(0.6875rem * var(--text-scale)); line-height: 1.25; }
.time-cell.afternoon-start, .grid-cell.afternoon-start { border-top: 0; }
.grid-cell { background: var(--table-surface, #fff); }
.course-card { z-index: 2; min-width: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; width: calc((100% - 8px) / var(--lane-count)); margin: 4px 0 4px calc(4px + var(--lane) * ((100% - 8px) / var(--lane-count))); padding: 12px; overflow: hidden; border: 0; border-radius: 11px; background: var(--course-bg); color: var(--course-color); text-align: left; transition: transform 180ms var(--ease), filter 180ms, background-color 180ms, color 180ms; }
.course-card:active { transform: scale(.96); filter: brightness(.98); }
.course-card strong { display: -webkit-box; overflow: hidden; font-size: calc(1rem * var(--text-scale)); font-weight: 600; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.course-card span { display: block; overflow: hidden; margin-top: 5px; font-size: calc(0.6875rem * var(--text-scale)); line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.course-card .desktop-meta { color: color-mix(in srgb, var(--course-color) 68%, #8d9198); }
.course-card .course-time { margin-top: auto; padding-top: 8px; font-variant-numeric: tabular-nums; opacity: .9; }
.course-card .mobile-meta { display: none; }
.course-card.compact { padding-top: 8px; }
.course-card.compact strong { -webkit-line-clamp: 1; }
.course-card.compact span { margin-top: 3px; }
.course-card.compact .course-time, .course-card.compact .course-teacher { display: none; }
.timetable-panel { --empty-shade: color-mix(in srgb, color-mix(in srgb, var(--page-background, #f0f2f4) 70%, #bac4d3) 60%, var(--table-surface, #fff)); }
.empty-overlay { position: absolute; inset: var(--header-height) 0 0 var(--time-width); z-index: 5; background: var(--empty-shade); box-shadow: 0 0 0 60px var(--empty-shade); clip-path: inset(0 -60px -60px 0); pointer-events: none; }
.timetable-scroll.is-empty { background: linear-gradient(var(--table-surface, #fff), var(--table-surface, #fff)) top / 100% var(--header-height) no-repeat, linear-gradient(to right, var(--table-surface, #fff) var(--time-width), var(--empty-shade) var(--time-width)); }
.empty-message-anchor { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; pointer-events: none; }
.empty-message-anchor button { pointer-events: auto; }
.empty-state { width: min(280px, 100%); padding: 16px 0; display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 5px; border: 1px solid #ffffffcc; border-radius: 50%; background: #eef1f5d9; color: #9099a6; }
.empty-state .empty-icon .hm-symbol { font-size: 23px; color: inherit; }
.empty-state p { margin: 0; color: #929aa5; font-size: calc(0.75rem * var(--text-scale)); line-height: 1.75; max-width: 230px; text-wrap: pretty; }
.empty-state strong { color: #596370; font-size: calc(1.0625rem * var(--text-scale)); font-weight: 600; line-height: 1.4; }
.empty-state button { margin-top: 9px; min-height: 36px; padding: 7px 18px; border: 1px solid #e5eaf2; border-radius: 20px; background: #ffffffb3; color: var(--accent); font-size: calc(0.8125rem * var(--text-scale)); }
.popover-backdrop { position: fixed; inset: 0; z-index: 30; background: #202b4009; }
.week-popover, .action-popover { position: fixed; z-index: 31; width: 272px; padding: 6px; border: 1px solid #fffffff5; border-radius: 24px; background: var(--material); backdrop-filter: blur(40px) saturate(1.5); -webkit-backdrop-filter: blur(40px) saturate(1.5); box-shadow: var(--material-shadow); transform-origin: var(--origin-x, 50%) top; }
.popover-heading { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 2px 16px; font-size: calc(0.75rem * var(--text-scale)); color: #777e88; }
.popover-heading > span { margin-left: auto; font-size: calc(0.625rem * var(--text-scale)); color: #a0a6af; }
.mobile-week-picker { position: relative; max-height: min(384px, calc(100dvh - 172px)); overflow-y: auto; overscroll-behavior: none; scrollbar-width: thin; scrollbar-color: #b8c0cc60 transparent; scroll-behavior: smooth; }
.week-option { width: 100%; min-height: 48px; padding: 0 14px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 16px; background: transparent; color: #343940; text-align: left; transition: background 160ms, transform 140ms var(--ease), color 160ms; }
.week-option span:not(.hm-symbol) { flex: none; font-size: 15px; font-weight: 550; }
.week-option small { margin-left: auto; color: #9299a3; font-size: calc(0.6875rem * var(--text-scale)); white-space: nowrap; font-variant-numeric: tabular-nums; }
.week-option .hm-symbol { font-size: 18px; opacity: 0; }
.week-option.selected { background: var(--accent-soft); color: var(--accent); }
.week-option.selected small { color: var(--accent-muted); }
.week-option.selected .hm-symbol { opacity: 1; }
.week-option:active { background: #dfe7f6; transform: scale(.97); }
.action-popover { width: min(220px, calc(100vw - 24px)); padding: 5px; border-radius: 20px; max-height: calc(100dvh - 24px); overflow-y: auto; transform-origin: right top; }
.action-popover > button, .install-menu-row > #installAppButton { width: 100%; min-height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 14px; background: transparent; color: #353b45; text-align: left; font-size: calc(0.875rem * var(--text-scale)); transition: background 160ms, transform 140ms var(--ease); }
.action-popover > button .hm-symbol, #installAppButton .hm-symbol { font-size: 18px; color: #535c69; }
.install-menu-row { position: relative; display: flex; align-items: center; }
.install-menu-row > #installAppButton { width: 100%; padding-right: 40px; gap: 8px; }
#legacyButton > .hm-symbol { width: 18px; flex: 0 0 18px; font-size: 23px; transform: translateX(-3px); }
.action-popover > button:active, #installAppButton:active { background: #e5eaf2; transform: scale(.97); }
.menu-divider { height: 1px; margin: 5px 14px; background: #d5dbe450; }
.action-popover > button .menu-chevron { margin-left: auto; font-size: 12px; color: #929aa5; }
.menu-setting-label { padding: 7px 0; display: flex; flex-direction: column; gap: 3px; }
.menu-setting-label small { color: #969da7; font-size: calc(0.6875rem * var(--text-scale)); font-variant-numeric: tabular-nums; }
.action-popover > button { min-height: calc(2.5rem * var(--text-scale)); padding-top: 7px; padding-bottom: 7px; }
.font-size-popover { width: min(272px, calc(100vw - 24px)); }
.font-size-popover .font-size-back strong { font-weight: 600; }
.font-size-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; margin: 8px 5px 9px; padding: 3px; border-radius: 999px; background: var(--accent-soft); }
.font-size-options button { min-width: 0; min-height: calc(2rem * var(--text-scale)); padding: 4px; border: 0; border-radius: 999px; background: transparent; color: inherit; text-align: center; white-space: nowrap; font-size: min(calc(.9375rem * var(--text-scale)), 24px); transition: background 160ms, color 160ms; }
.font-size-options button[aria-checked="true"] { background: var(--material); color: var(--accent); box-shadow: 0 2px 6px #17253b12; font-weight: 600; }
.font-size-options button:not([aria-checked="true"]):hover { background: var(--accent-hover); }
html:not([data-text-size="default"]) .title-cluster > strong { line-height: 1.2; }
.detail-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 28px; background: #1a223138; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.course-detail { width: min(480px, 100%); max-height: min(86dvh, 800px); overflow: auto; overscroll-behavior: none; padding: 24px; border: 1px solid #ffffffd9; border-radius: 32px; background: var(--material); box-shadow: 0 32px 100px #14203930, inset 0 1px 0 #fff; }
.sheet-handle { display: none; }
.course-detail.is-resizing { overflow: hidden; }
.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.detail-header h2 { flex: 1; min-width: 0; margin: 0; color: #292e35; font-size: calc(1.25rem * var(--text-scale)); font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.detail-header .icon-button { width: 36px; height: 36px; background: #e9edf2; border: 0; box-shadow: none; }
.detail-header .hm-symbol { font-size: 18px; }
.detail-course { margin-top: 8px; padding: 24px; border: 1px solid #ffffffc0; border-radius: 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--course-bg) 74%, white), var(--course-bg)); }
.detail-course .course-eyebrow { display: flex; align-items: center; gap: 7px; margin: 0 0 14px; color: var(--course-color); font-size: calc(0.75rem * var(--text-scale)); }
.course-eyebrow .hm-symbol { font-size: 15px; }
.detail-course h3 { margin: 0; color: var(--course-color); font-size: calc(1.625rem * var(--text-scale)); font-weight: 650; line-height: 1.45; letter-spacing: -.035em; }
.detail-course .detail-time { margin: 15px 0 0; color: var(--course-color); font-size: calc(1.0625rem * var(--text-scale)); font-weight: 500; font-variant-numeric: tabular-nums; }
.detail-course .detail-period { margin: 5px 0 0; color: color-mix(in srgb, var(--course-color) 70%, #999); font-size: calc(0.75rem * var(--text-scale)); }
.detail-list { margin: 18px 0 0; padding: 4px 16px; border-radius: 22px; background: #ffffffa6; }
.detail-row { display: grid; grid-template-columns: 94px 1fr; align-items: start; gap: 12px; padding: 14px 0; font-size: calc(0.8125rem * var(--text-scale)); line-height: 1.6; }
.detail-row + .detail-row { border-top: 1px solid #e9edf280; }
.detail-row dt { display: flex; align-items: center; gap: 10px; color: #9299a3; }
.detail-row dt .hm-symbol { font-size: 18px; color: #858e9b; }
.detail-row dd { margin: 0; color: #4a535f; text-align: right; overflow-wrap: anywhere; }
.assessment-row dd { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.info-button { flex: 0 0 28px; width: 28px; height: 28px; margin: -3px -5px -3px 0; padding: 5px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #7c8796; }
.info-button span { display: grid; place-items: center; width: 16px; height: 16px; border: 1.4px solid currentColor; border-radius: 50%; font: 600 11px/1 system-ui, sans-serif; }
.info-button:active { background: transparent; }
.install-menu-row > .info-button { position: absolute; right: 0; top: 0; width: 36px; height: 40px; margin: 0; padding: 10px; }
.install-ready { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; }
.install-ready img { width: 52px; height: 52px; border-radius: 14px; }
.install-ready strong { display: block; font-size: calc(1rem * var(--text-scale)); font-weight: 600; }
.install-ready p { margin: 4px 0 0; color: var(--guide-muted); font-size: calc(0.8125rem * var(--text-scale)); }
.install-guide, .offline-guide { --guide-ink: #454d59; --guide-muted: #697585; --guide-line: #8995a324; color: var(--guide-ink); font-size: calc(0.875rem * var(--text-scale)); line-height: 1.65; }
.install-intro { margin: 12px 0 0; color: var(--guide-muted); font-size: calc(0.8125rem * var(--text-scale)); }
.install-notice { margin: 14px 0; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: calc(0.8125rem * var(--text-scale)); }
.install-guide[data-install-state="unconfirmed"] .install-notice { background: var(--guide-line); color: var(--guide-muted); }
.install-steps { display: grid; gap: 18px; margin: 20px 0; padding: 0; list-style: none; counter-reset: install-step; }
.install-steps > li { position: relative; padding-left: 38px; counter-increment: install-step; }
.install-steps > li::before { content: counter(install-step); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 600 12px/1 system-ui, sans-serif; }
.install-steps strong { display: block; font-size: calc(0.875rem * var(--text-scale)); font-weight: 600; }
.install-steps p { margin: 4px 0 0; color: var(--guide-muted); font-size: calc(0.8125rem * var(--text-scale)); }
.install-paths > li { padding-left: 0; }
.install-paths > li::before { display: none; }
.guide-extra { border-top: 1px solid var(--guide-line); font-size: calc(0.8125rem * var(--text-scale)); }
.guide-extra summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 0; color: var(--guide-muted); cursor: pointer; list-style: none; }
.guide-extra summary::-webkit-details-marker { display: none; }
.guide-extra summary::after { content: '+'; flex: none; width: 20px; text-align: center; font: 400 18px/1 system-ui, sans-serif; }
.guide-extra[open] summary::after { content: '−'; }
.guide-extra summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.guide-extra p { margin: 0 0 12px; color: var(--guide-muted); }
.guide-extra ul { margin: 0 0 12px; padding-left: 20px; color: var(--guide-muted); }
.guide-extra li + li { margin-top: 8px; }
.guide-note { margin: 10px 0; color: var(--guide-muted); font-size: calc(0.8125rem * var(--text-scale)); }
.offline-guide { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--guide-line); }
.offline-guide h3 { margin: 0; font-size: calc(0.9375rem * var(--text-scale)); font-weight: 600; }
.browser-switch { margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: var(--guide-line); }
.browser-switch h3 { margin: 0 0 4px; font-size: calc(0.875rem * var(--text-scale)); font-weight: 600; }
.browser-switch p { margin: 0; font-size: calc(0.8125rem * var(--text-scale)); color: var(--guide-muted); }
.browser-handoff { margin: 16px 0; }
.browser-handoff .dialog-actions { margin-top: 0; }
.browser-handoff #copyLinkStatus:empty { display: none; }
.copy-link-fallback { display: grid; gap: 6px; color: var(--guide-muted); font-size: calc(0.75rem * var(--text-scale)); }
.copy-link-fallback input { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--guide-line); border-radius: 10px; background: transparent; color: var(--guide-ink); font: inherit; user-select: text; }
.offline-status { margin: 14px 0; padding: 4px 12px; border: 1px solid var(--guide-line); border-radius: 14px; background: #8793a007; }
.offline-status > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; }
.offline-status > div + div { border-top: 1px solid var(--guide-line); }
.offline-status dt { flex: none; font-size: calc(0.75rem * var(--text-scale)); }
.offline-status dd { margin: 0; color: var(--guide-muted); font-size: calc(0.75rem * var(--text-scale)); text-align: right; }
.offline-status dd[data-ready="true"] { color: var(--accent); }
.wechat-browser-hint { position: fixed; top: max(8px, env(safe-area-inset-top)); right: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 0; color: #fff; pointer-events: none; }
.wechat-browser-hint svg { width: 64px; height: 60px; margin-right: 0; filter: drop-shadow(0 1px 2px #16223840); }
.wechat-browser-hint > span { display: flex; flex-direction: column; gap: 4px; padding: 10px 13px; border: 1px solid #ffffff42; border-radius: 15px; background: #28374bc9; box-shadow: 0 4px 16px #16223814; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); font-size: calc(0.8125rem * var(--text-scale)); font-weight: 600; line-height: 1.45; }
.wechat-browser-hint small { color: #e0e6ef; font-size: calc(0.6875rem * var(--text-scale)); font-weight: 400; }
.detail-backdrop[data-wechat="true"] { padding-top: max(148px, calc(env(safe-area-inset-top) + 140px)); }
.detail-backdrop[data-wechat="true"] .course-detail { max-height: min(calc(100dvh - 176px - env(safe-area-inset-top)), 800px); }
html[data-theme="original"][data-appearance="dark"] :is(.install-guide, .offline-guide) { --guide-ink: #e0e6ee; --guide-muted: #b2bdcc; --guide-line: #ffffff1c; }
.info-popup { position: fixed; z-index: 2; width: min(300px, calc(100vw - 24px)); padding: 16px 18px; border-radius: 20px; background: #ffffff; color: #434a54; box-shadow: 0 8px 32px #1f29332b; font-size: calc(0.875rem * var(--text-scale)); line-height: 1.65; transform-origin: var(--arrow-x) bottom; }
.info-popup::after { content: ''; position: absolute; left: calc(var(--arrow-x) - 6px); width: 12px; height: 12px; background: inherit; transform: rotate(45deg); }
.info-popup[data-placement="top"]::after { bottom: -5px; }
.info-popup[data-placement="bottom"] { transform-origin: var(--arrow-x) top; }
.info-popup[data-placement="bottom"]::after { top: -5px; }
.course-detail[data-view="personalization"] { width: min(420px, 100%); }
.course-detail[data-view="colors"] { width: min(440px, 100%); padding: 22px; }
.course-detail[data-view="colors"] .detail-header { gap: 12px; }
.course-detail[data-view="fonts"] { width: min(440px, 100%); padding: 22px; overflow-x: hidden; scrollbar-width: none; }
.course-detail[data-view="fonts"]::-webkit-scrollbar { display: none; width: 0; height: 0; }
.course-detail[data-view="fonts"] .detail-header { gap: 12px; }
.detail-header .detail-back { border: 1px solid #ffffffed; background: linear-gradient(145deg, #ffffffba, #e9edf2b3); box-shadow: 0 4px 12px #35455a0b, inset 0 0 0 1px #ffffff70; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.detail-header .detail-back .hm-symbol { font-size: 24px; font-weight: 500; }
.settings-caption { margin: 14px 0 18px; color: #9299a2; font-size: calc(0.8125rem * var(--text-scale)); line-height: 1.5; }
.settings-group { overflow: hidden; border: 1px solid #fff; border-radius: 24px; background: #ffffffc4; }
.settings-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 88px; padding: 16px; border: 0; background: transparent; text-align: left; transition: background 140ms; }
.settings-option + .settings-option { border-top: 1px solid #edf0f2; }
.settings-option:active { background: #e9edf4; }
.setting-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px; background: #eaf0fe; color: #5c82ce; }
.setting-icon .hm-symbol { font-size: 23px; }
.palette-icon { background: var(--accent-soft); color: var(--accent); }
.font-icon { background: #eaf3fb; color: #6590b2; }
.setting-copy { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.setting-copy strong { color: #38414d; font-size: calc(0.9375rem * var(--text-scale)); font-weight: 550; }
.setting-copy small { color: #a0a6ae; font-size: calc(0.6875rem * var(--text-scale)); }
.setting-status { margin-left: auto; color: #9ba4b2; font-size: calc(0.6875rem * var(--text-scale)); white-space: nowrap; }
.color-setting-status { display: flex; align-items: center; gap: 12px; }
.color-setting-status > .hm-symbol { font-size: 13px; }
.palette-orb { position: relative; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: conic-gradient(from -90deg, var(--swatch-1) 0 25%, var(--swatch-2) 25% 50%, var(--swatch-3) 50% 75%, var(--swatch-4) 75%); box-shadow: inset 0 0 0 1px #3d344308; }
.palette-orb.mini-orb { width: 28px; height: 28px; }
.course-detail[data-view="colors"] .settings-caption { margin: 14px 0 16px; font-size: calc(0.75rem * var(--text-scale)); }
.theme-preview { padding: 14px 16px; border: 1px solid #fff; border-radius: 22px; background: var(--table-surface); transition: background-color 180ms; }
.theme-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.theme-preview-header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5e6166; font-size: calc(0.8125rem * var(--text-scale)); font-weight: 600; }
.theme-preview-header > span { flex: none; color: #8f959c; font-size: calc(0.625rem * var(--text-scale)); }
.theme-preview-weekdays { display: grid; grid-template-columns: repeat(5, 1fr); margin: 12px 0 7px; color: #93979d; text-align: center; font-size: calc(0.625rem * var(--text-scale)); }
.theme-preview-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(4, 18px); gap: 4px; }
.theme-preview-grid > span { min-width: 0; padding: 7px; border-radius: 7px; }
.theme-preview-grid i { display: block; width: 60%; height: 2px; border-radius: 2px; background: currentColor; opacity: .25; }
.theme-preview-grid i + i { width: 38%; margin-top: 5px; }
.theme-section-heading { display: flex; justify-content: space-between; gap: 12px; margin: 20px 2px 10px; color: #747e8b; font-size: calc(0.6875rem * var(--text-scale)); }
#themeSelectionStatus { color: var(--accent); text-align: right; }
.theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.theme-option { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 11px; padding: 12px 2px 10px; border: 0; border-radius: 20px; background: transparent; color: #6d737d; transition: background 160ms, transform 140ms var(--ease), color 160ms; }
.theme-option-name { font-size: calc(0.75rem * var(--text-scale)); line-height: 1.5; white-space: nowrap; }
.theme-option .palette-orb::after { content: ''; position: absolute; inset: -4px; border: 1.5px solid var(--swatch-accent); border-radius: inherit; opacity: 0; transform: scale(.9); transition: opacity 140ms, transform 180ms var(--ease); }
.theme-check { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--swatch-accent); color: #fff; opacity: 0; transform: scale(.6); transition: opacity 120ms, transform 180ms var(--ease); }
.theme-check .hm-symbol { font-size: 10px; }
.theme-option[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.theme-option[aria-pressed="true"] .theme-option-name { font-weight: 600; }
.theme-option[aria-pressed="true"] .palette-orb::after, .theme-option[aria-pressed="true"] .theme-check { opacity: 1; transform: scale(1); }
.theme-option:active { transform: scale(.95); }
html[data-theme]:not([data-theme="original"]) .course-card .desktop-meta { color: var(--course-color); opacity: 1; }
.course-detail[data-view="fonts"] .settings-caption { margin: 14px 0 16px; font-size: calc(0.75rem * var(--text-scale)); }
/* Keep names stable; each sample declares its own family independently. */
.font-options { display: grid; gap: 10px; font-family: system-ui, sans-serif; }
.font-download-notice { position: fixed; z-index: 70; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); padding: 12px 16px; border: 1px solid #ffffffb3; border-radius: 22px; background: #f5f7faf2; color: #343b45; box-shadow: 0 6px 24px #27344526; font: 13px/1.5 system-ui, sans-serif; }
.font-download-notice button { flex: none; border: 0; background: transparent; color: #0a59f7; padding: 6px 2px; font: inherit; }
.font-loading { font-size: calc(1.25rem * var(--text-scale)); animation: font-loading-turn 1s linear infinite; }
@keyframes font-loading-turn { to { transform: rotate(360deg); } }
@media screen { html[data-theme="original"][data-appearance="dark"] .font-download-notice button { color: #8bbaff; } }
@media (prefers-reduced-motion: reduce) { .font-loading { animation: none; } }
.font-option { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 14px 16px; border: 1px solid #e9edf0; border-radius: 20px; background: #ffffffb8; color: #454c56; text-align: left; transition: background 140ms, border-color 140ms, transform 140ms var(--ease); }
.font-option-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.font-option-heading strong { font-size: calc(0.8125rem * var(--text-scale)); font-weight: 600; }
.font-check { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--accent); color: white; opacity: 0; transform: scale(.7); transition: opacity 140ms, transform 140ms; }
.font-check .hm-symbol { font-size: 11px; }
.font-sample { font-size: calc(1.4375rem * var(--text-scale)); font-weight: 400; line-height: 1.3; }
.font-preview-image { height: 36.67px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.font-option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.font-option[aria-pressed="true"] .font-option-heading { color: var(--accent); }
.font-option[aria-pressed="true"] .font-check { opacity: 1; transform: scale(1); }
.font-option:active { transform: scale(.98); }
.font-selection-status { margin: 16px 2px 0; color: var(--accent); font-size: calc(0.6875rem * var(--text-scale)); }
.font-license-note { margin: 12px 2px 0; color: #939aa3; font-size: calc(0.625rem * var(--text-scale)); line-height: 1.6; }
.font-license-note a { color: inherit; text-underline-offset: 2px; }
.dialog-actions { display: flex; gap: 12px; margin-top: 20px; }
.dialog-actions button { flex: 1; height: 44px; border: 0; border-radius: 24px; font-size: calc(0.9375rem * var(--text-scale)); font-weight: 600; transition: transform 140ms, filter 140ms; }
.dialog-actions button:active { transform: scale(.96); filter: brightness(.96); }
#clearCacheButton .hm-symbol { color: #d94838; }
#aboutButton > svg { flex: 0 0 18px; }
.detail-backdrop[data-view="about"] { align-items: center; padding: 20px; }
.course-detail[data-view="about"] { width: min(380px, 100%); padding: 22px; border-radius: 28px; max-height: calc(100dvh - 40px); }
.course-detail[data-view="about"] .sheet-handle { display: none; }
.about-copyright { margin: 22px 0 0; color: var(--muted); font-size: calc(0.6875rem * var(--text-scale)); line-height: 1.7; text-align: center; }
.about-content { display: grid; gap: 20px; padding: 8px 0 6px; }
.about-content p { display: grid; gap: 7px; margin: 0; line-height: 1.65; }
.about-content span { color: #88919e; font-size: calc(0.75rem * var(--text-scale)); }
.about-content strong { color: #454c56; font-size: calc(0.9375rem * var(--text-scale)); font-weight: 500; }
.about-content a { color: var(--accent); font-size: calc(0.9375rem * var(--text-scale)); text-decoration: none; overflow-wrap: anywhere; }
.about-version { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
#recentUpdates { border: 0; padding: 6px 0; background: transparent; color: var(--accent); font-size: calc(0.8125rem * var(--text-scale)); }
#recentUpdates:hover { text-decoration: underline; }
.changelog-content { padding-top: 16px; color: inherit; font-size: calc(0.875rem * var(--text-scale)); line-height: 1.65; }
.course-detail[data-changelog="true"] { width: min(440px, 100%); }
.course-detail[data-changelog="true"] .detail-header { gap: 10px; }
.changelog-preference { position: relative; display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 28px; margin-top: 0; color: var(--muted); font-size: calc(0.75rem * var(--text-scale)); cursor: pointer; }
.changelog-preference input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.changelog-checkbox { display: grid; place-items: center; flex: none; width: 17px; height: 17px; border: 1.2px solid currentColor; border-radius: 50%; color: #a1aab6; transition: background 140ms, border-color 140ms; }
.changelog-checkbox svg { width: 15px; height: 15px; opacity: 0; }
.changelog-preference input:checked + .changelog-checkbox { border-color: var(--accent); background: var(--accent); color: #fff; }
.changelog-preference input:checked + .changelog-checkbox svg { opacity: 1; }
.changelog-preference input:focus-visible + .changelog-checkbox { outline: 2px solid var(--accent); outline-offset: 3px; }
.changelog-content ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.changelog-content p { margin: 16px 0 0; color: var(--muted); font-size: calc(0.8125rem * var(--text-scale)); }
.detail-backdrop[data-view="cache"] { align-items: center; padding: 20px; }
.course-detail[data-view="cache"] { width: min(360px, 100%); max-height: calc(100dvh - 40px); padding: 22px; border-radius: 28px; border: 1px solid #ffffffb3; }
.course-detail[data-view="cache"] .sheet-handle { display: none; }
#cancelClearCache { background: #e9edf3; color: #647184; }
#confirmClearCache { background: #d94838; color: #fff; }
.secondary-action { background: #e9edf3; color: #647184; }
.primary-action { background: var(--accent); color: #fff; }
.dialog-actions.install-actions { gap: 10px; margin-top: 16px; }
.dialog-actions.install-actions button { height: 40px; border: 1px solid #ffffff40; border-radius: 22px; font-size: calc(0.875rem * var(--text-scale)); box-shadow: 0 3px 10px #2639520b, inset 0 1px 0 #ffffff70, inset 0 -1px 0 #00000008; }
.install-actions .primary-action { background: radial-gradient(ellipse at 24% 0%, #ffffff30, #ffffff00 70%), linear-gradient(150deg, color-mix(in srgb, var(--accent) 88%, white), var(--accent)); }
.install-actions .secondary-action { background: radial-gradient(ellipse at 24% 0%, #ffffffdc, #ffffff00 75%), linear-gradient(135deg, #f3f6facc, #e3e9f2b3); border-color: #ffffffe6; box-shadow: 0 3px 10px #2639520b, inset 0 1px 0 #fff, inset 0 -1px 0 #ffffff80; backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); }
html[data-theme="original"][data-appearance="dark"] .install-actions .secondary-action { background: radial-gradient(ellipse at 24% 0%, #ffffff20, #ffffff00 75%), linear-gradient(135deg, #69768766, #222c3855); color: #e0e7f1; border-color: #ffffff30; box-shadow: 0 3px 10px #0002, inset 0 1px 0 #ffffff30, inset 0 -1px 0 #ffffff08; }
html[data-theme="original"][data-appearance="dark"] .install-actions .primary-action { color: #172a46; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 32px; max-width: 85vw; padding: 13px 22px; border: 1px solid var(--toast-border, #ffffffe6); border-radius: 28px; background: var(--toast-background, #f8fafaf0); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); color: var(--toast-text, #30343a); box-shadow: 0 8px 32px #14203922, 0 1px 4px #1420390a; font-size: calc(0.8125rem * var(--text-scale)); opacity: 0; transform: translate(-50%, 12px) scale(.98); text-align: center; pointer-events: none; transition: opacity 140ms, transform 220ms var(--ease), background-color 140ms, color 140ms; }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media screen {
  html[data-theme="original"][data-appearance="dark"] .toast { --toast-background: #303238f0; --toast-text: #f5f6f8; --toast-border: #ffffff24; }
}
@keyframes pulse { 50% { opacity: .25; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) {
  .icon-button:hover { background: #fff; box-shadow: 0 6px 20px #3b4d6710; }
  .course-card:hover { filter: saturate(1.12) brightness(.99); }
  .week-option:hover, .action-popover > button:hover, #installAppButton:hover { background: #e9edf480; }
  .week-option.selected:hover, .theme-option:hover { background: var(--accent-hover); }
  .font-option:hover { background: var(--accent-soft); }
  .settings-option:hover { background: #e9edf480; }
}
@media (min-width: 640px) {
  .desktop-week-nav { display: flex; margin-left: -7px; }
  .header-inner .desktop-week-nav .icon-button { width: 28px; height: 28px; }
  .timetable-scroll { overflow-x: hidden; }
  .header-inner .icon-button { width: 36px; height: 36px; }
  .header-inner .icon-button .hm-symbol { font-size: 20px; }
  .title-cluster { gap: 14px; }
  .title-cluster > strong { font-size: calc(1.625rem * var(--text-scale)); line-height: 36px; }
  .week-select-trigger { height: 32px; gap: 6px; font-size: calc(0.875rem * var(--text-scale)); }
  .week-select-trigger .select-chevron { font-size: 10px; }
  .header-actions { gap: 10px; }
}
@media (max-width: 639px) {
  .weekend-hint { display: block; }
  .timetable-grid .time-cell { z-index: 6; }
  .timetable-grid .corner { z-index: 7; }
  :root { --time-width: calc(clamp(2.625rem, calc(12.3 * var(--viewport-font-unit)), 5.75rem) * var(--text-scale)); --header-height: calc(clamp(3.25rem, calc(14 * var(--viewport-font-unit)), 5.75rem) * var(--text-scale)); --period-height: calc(clamp(4.375rem, calc(19.55 * var(--viewport-font-unit)), 9.25rem) * var(--text-scale)); }
  html { scrollbar-gutter: auto; }
  html, body, .course-detail, .mobile-week-picker, .action-popover { scrollbar-width: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar, .course-detail::-webkit-scrollbar, .mobile-week-picker::-webkit-scrollbar, .action-popover::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .header-inner { --header-control-size: clamp(32px, 8.2vw, 36px); min-height: 64px; padding: max(10px, env(safe-area-inset-top)) clamp(12px, 3vw, 20px) 10px; gap: 8px; }
  .header-inner .icon-button { width: var(--header-control-size); height: var(--header-control-size); }
  .header-inner .icon-button .hm-symbol { font-size: 20px; font-weight: 500; }
  .title-cluster { flex: 1; gap: 6px; }
  .title-cluster > strong { font-size: calc(clamp(1.1875rem, calc(5.1 * var(--viewport-font-unit)), 1.5rem) * var(--text-scale)); line-height: var(--header-control-size); }
  .week-select-trigger { min-width: 0; height: var(--header-control-size); padding: 0; gap: 4px; font-size: calc(clamp(0.6875rem, calc(2.9 * var(--viewport-font-unit)), 0.8125rem) * var(--text-scale)); letter-spacing: 0; }
  .week-select-trigger .select-chevron { font-size: 9px; }
  .header-actions { gap: 8px; }
  .header-subline { display: none; }
  .timetable-panel { width: 100%; margin: 0; border: 0; border-radius: clamp(20px, 4.5vw, 34px) clamp(20px, 4.5vw, 34px) 0 0; box-shadow: none; }
  .day-head { gap: 1vw; }
  .day-head strong { font-size: calc(clamp(0.875rem, calc(4.05 * var(--viewport-font-unit)), 1.875rem) * var(--text-scale)); }
  .day-head .day-date { font-size: calc(clamp(0.75rem, calc(3.4 * var(--viewport-font-unit)), 1.5625rem) * var(--text-scale)); }
  .day-head small { display: none; }
  .time-cell { gap: .4vw; padding-top: 3.4vw; color: #939393; border-bottom-color: transparent; }
  .time-cell strong { margin-bottom: .3vw; font-size: calc(clamp(1.125rem, calc(4.5 * var(--viewport-font-unit)), 2.125rem) * var(--text-scale)); }
  .time-cell span { font-size: calc(clamp(0.6875rem, calc(3.35 * var(--viewport-font-unit)), 1.5625rem) * var(--text-scale)); line-height: 1.2; }
  .course-card { --card-gap: clamp(3px, .6vw, 5px); width: calc((100% - 2 * var(--card-gap)) / var(--lane-count)); margin: var(--card-gap) 0 var(--card-gap) calc(var(--card-gap) + var(--lane) * ((100% - 2 * var(--card-gap)) / var(--lane-count))); padding: 1.1vw 1.15vw; border-radius: clamp(7px, 1.65vw, 12px); }
  .course-card strong { display: block; font-size: calc(clamp(0.75rem, calc(3.3 * var(--viewport-font-unit)), 1.5625rem) * var(--text-scale)); font-weight: 600; line-height: 1.2; }
  .course-card span { margin-top: .75vw; font-size: calc(clamp(0.625rem, calc(2.75 * var(--viewport-font-unit)), 1.3125rem) * var(--text-scale)); line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
  .course-card .desktop-meta { display: none; }
  .course-card .mobile-meta { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; opacity: var(--course-meta-opacity, .65); }
  .course-card .campus-line { display: block; white-space: nowrap; }
  .course-card .room-line { -webkit-line-clamp: 2; }
  .course-card .campus-line + .room-line { margin-top: 0; }
  .course-card.compact strong { display: -webkit-box; -webkit-line-clamp: 2; }
  .course-card.compact .mobile-meta { -webkit-line-clamp: 1; margin-top: 3px; }
  .empty-state { padding: 12px 0; }
  .empty-state strong { font-size: calc(1rem * var(--text-scale)); }
  .week-popover { width: min(264px, calc(100vw - 24px)); }
  .detail-backdrop { align-items: flex-end; padding: 0; }
  .detail-backdrop[data-view="about"] { align-items: flex-end; padding: 0; }
  .course-detail[data-view="about"] { width: 100%; max-height: 88dvh; padding: 10px 20px max(28px, env(safe-area-inset-bottom)); border-radius: 32px 32px 0 0; border-bottom: 0; }
  .course-detail[data-view="about"] .sheet-handle { display: block; }
  .course-detail { width: 100%; max-height: 88dvh; padding: 10px 20px max(28px, env(safe-area-inset-bottom)); border-radius: 32px 32px 0 0; border-bottom: 0; }
  .course-detail[data-view="course"] { padding: 10px 20px max(20px, env(safe-area-inset-bottom)); }
  .course-detail[data-view="course"] .sheet-handle { margin-bottom: 12px; }
  .course-detail[data-view="personalization"], .course-detail[data-view="date"], .course-detail[data-view="colors"] { width: 100%; }
  .course-detail[data-view="colors"] { padding: 10px 20px max(24px, env(safe-area-inset-bottom)); }
  .course-detail[data-view="colors"] .sheet-handle { margin-bottom: 12px; }
  .course-detail[data-view="fonts"] { width: 100%; padding: 10px 20px max(24px, env(safe-area-inset-bottom)); }
  .course-detail[data-view="fonts"] .sheet-handle { margin-bottom: 12px; }
  .course-detail[data-view="date"] { padding: 10px 18px max(20px, env(safe-area-inset-bottom)); }
  .course-detail[data-view="date"] .sheet-handle { margin-bottom: 12px; }
  .sheet-handle { width: 34px; height: 4px; display: block; margin: 0 auto 17px; border-radius: 5px; background: #c7ccd4; }
  .detail-header .icon-button { width: 36px; height: 36px; }
  .detail-header .hm-symbol { font-size: 17px; }
  .detail-course { margin-top: 6px; padding: 16px 20px; }
  .detail-course .course-eyebrow { margin-bottom: 8px; }
  .detail-course h3 { font-size: calc(1.5rem * var(--text-scale)); line-height: 1.3; }
  .detail-course .detail-time { margin-top: 10px; }
  .detail-course .detail-period { margin-top: 4px; }
  .detail-list { margin-top: 12px; padding: 2px 16px; }
  .detail-row { padding: 10px 0; }
  .toast { bottom: max(28px, env(safe-area-inset-bottom)); }
}
@media (max-width: 389px) {
  .header-inner { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .title-cluster { gap: 4px; }
  .title-cluster > strong { font-size: calc(1.25rem * var(--text-scale)); }
  .week-select-trigger { font-size: calc(0.75rem * var(--text-scale)); }
  .header-actions { gap: 6px; }
}
@media (min-width: 640px) and (max-width: 1050px) {
  :root { --time-width: calc(4.25rem * var(--text-scale)); --period-height: calc(5.5rem * var(--text-scale)); }
  .header-inner { padding-left: 24px; padding-right: 24px; }
  .header-subline { padding-left: 74px; gap: 12px; font-size: calc(0.625rem * var(--text-scale)); }
  .timetable-panel { width: calc(100% - 32px); }
  .course-card { padding: 10px; }
  .course-card strong { font-size: calc(0.875rem * var(--text-scale)); }
}
@media (min-width: 640px) and (max-width: 799px) {
  :root { --time-width: calc(3.5rem * var(--text-scale)); --header-height: calc(4.25rem * var(--text-scale)); }
  .header-inner { padding-left: 18px; padding-right: 18px; gap: 10px; }
  .title-cluster { gap: 10px; }
  .title-cluster > strong { font-size: calc(1.5rem * var(--text-scale)); }
  .header-subline { padding-left: 64px; padding-right: 18px; flex-wrap: wrap; row-gap: 6px; }
  .day-head strong { font-size: calc(1.125rem * var(--text-scale)); }
  .day-head small { display: none; }
  .course-card { padding: 8px; }
  .course-card span { font-size: calc(0.625rem * var(--text-scale)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Course labels wrap fully before dense cards are fitted by queueCourseTextFit. */
.course-card strong, .course-card span { flex-shrink: 0; -webkit-line-clamp: unset; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.course-card strong, .course-card.compact strong { display: block; -webkit-line-clamp: unset; }
.course-card .campus-line, .course-card .room-line, .course-card.compact .mobile-meta { white-space: normal; -webkit-line-clamp: unset; }

@media print {
  :root { --time-width: 72px; --header-height: 62px; --period-height: 60px; }
  .app-header, .popover-backdrop, .week-popover, .action-popover, .detail-backdrop, .toast { display: none !important; }
  .timetable-panel { width: 100%; margin: 0; border: 0; box-shadow: none; }
  .course-card { padding: 5px; print-color-adjust: exact; }
  .course-card strong { font-size: 10px; }
  .course-card span { font-size: 8px; margin-top: 2px; }
}


.export-preview { display: block; width: 100%; height: auto; max-height: 58dvh; object-fit: contain; margin-top: 14px; border-radius: 12px; }
.export-size { margin: 8px 0 12px; color: var(--muted); font-size: calc(0.6875rem * var(--text-scale)); text-align: center; }
.export-save { display: grid; place-items: center; width: 100%; height: 40px; border: 0; border-radius: 20px; background: var(--accent); color: white; font-size: calc(0.875rem * var(--text-scale)); text-decoration: none; }



/* Shared adaptive bottom notification material. */
:root { color-scheme: light; --notice-material: linear-gradient(125deg, #ffffffeb, #edf2f7cf); --notice-ink: #303740; --notice-edge: #ffffffe0; --notice-shadow: 0 12px 36px #14203926, inset 0 1px 0 #fff, inset 0 -1px 0 #ffffff50; }
.toast, .font-download-notice { background: var(--notice-material); color: var(--notice-ink); border-color: var(--notice-edge); box-shadow: var(--notice-shadow); backdrop-filter: blur(28px) saturate(1.35); -webkit-backdrop-filter: blur(28px) saturate(1.35); }
@media screen {
  html[data-theme="original"][data-appearance="dark"] {
    color-scheme: dark; color: #e5e9ef;
    --page-background: #14171c !important; --table-surface: #1b1f25 !important;
    --accent: #8cb6ff !important; --line: #2b3038; --muted: #a6aeba;
    --accent-soft: #283952; --accent-hover: #344760; --accent-muted: #a5bde2;
    --material: linear-gradient(145deg, #333944f5, #22272ff0);
    --material-shadow: 0 16px 48px #0006, inset 0 1px 0 #ffffff18;
    --notice-material: linear-gradient(125deg, #414956e8, #242b35d9);
    --notice-ink: #f1f4f8; --notice-edge: #ffffff29;
    --notice-shadow: 0 12px 36px #0006, inset 0 1px 0 #ffffff26, inset 0 -1px 0 #ffffff08;
  }
  html[data-theme="original"][data-appearance="dark"] .app-header { background: transparent; }
  html[data-theme="original"][data-appearance="dark"] :is(.timetable-panel, .course-detail, .week-popover, .action-popover, .settings-group, .theme-preview, .detail-course) { border-color: #ffffff16; }
  html[data-theme="original"][data-appearance="dark"] :is(.icon-button, .detail-header .icon-button, .detail-header .detail-back) { color: #e2e7ef; background: linear-gradient(145deg, #ffffff12, #ffffff05); border-color: #ffffff28; box-shadow: inset 0 1px 0 #ffffff12; }
  html[data-theme="original"][data-appearance="dark"] :is(.day-head, .time-cell strong, .detail-row dd, .setting-copy strong, .about-content strong, .theme-preview-header strong, .empty-state strong, .course-detail .detail-header h2, .action-popover > button, #installAppButton, .week-option, .font-option, .theme-option) { color: #dce2ec; }
  html[data-theme="original"][data-appearance="dark"] :is(.week-select-trigger, .header-subline, .settings-caption, .detail-row dt, .detail-row dt .hm-symbol, .action-popover > button .hm-symbol, #installAppButton .hm-symbol, .popover-heading, .empty-state p, .theme-section-heading) { color: #a6b0bf; }
  html[data-theme="original"][data-appearance="dark"] :is(.settings-group, .detail-list, .font-option, .empty-icon, .empty-state button, .setting-icon) { background: #ffffff09; border-color: #ffffff16; }
  html[data-theme="original"][data-appearance="dark"] :is(.detail-row + .detail-row, .settings-option + .settings-option) { border-color: #ffffff12; }
  html[data-theme="original"][data-appearance="dark"] .menu-divider { background: #ffffff16; }
  html[data-theme="original"][data-appearance="dark"] .sheet-handle { background: #727b89; }
  html[data-theme="original"][data-appearance="dark"] .detail-backdrop { background: #0008; }
  html[data-theme="original"][data-appearance="dark"] .info-popup { background: #343c48; color: #e3e9f2; }
  html[data-theme="original"][data-appearance="dark"] .timetable-panel { --empty-shade: color-mix(in srgb, #101722 65%, var(--table-surface)); }
  html[data-theme="original"][data-appearance="dark"] .course-card { background: color-mix(in srgb, var(--course-color) 18%, #20252d); color: color-mix(in srgb, var(--course-color) 48%, #fff); }
  html[data-theme="original"][data-appearance="dark"] .course-card .desktop-meta { color: inherit; }
  html[data-theme="original"][data-appearance="dark"] .detail-course { background: color-mix(in srgb, var(--course-color) 15%, #242a33); }
  html[data-theme="original"][data-appearance="dark"] .detail-course :is(h3, .course-eyebrow, .detail-time, .detail-period) { color: color-mix(in srgb, var(--course-color) 48%, #fff); }
  html[data-theme="original"][data-appearance="dark"] .font-preview-image { filter: brightness(0) invert(.88); }
  html[data-theme="original"][data-appearance="dark"] :is(.font-option[aria-pressed="true"], .theme-option[aria-pressed="true"], .week-option.selected) { background: var(--accent-soft); color: var(--accent); }
  html[data-theme="original"][data-appearance="dark"] .font-option[aria-pressed="true"] { border-color: var(--accent); }
  html[data-theme="original"][data-appearance="dark"] :is(.font-check) { color: #182337; }
  html[data-theme="original"][data-appearance="dark"] #clearCacheButton .hm-symbol { color: #ff8c80; }
  html[data-theme="original"][data-appearance="dark"] :is(.icon-button:hover, .action-popover > button:hover, #installAppButton:hover, #installAppButton:active, .week-option:hover, .settings-option:active) { background: #ffffff12; }
}
.appearance-setting { margin-top: 18px; }
.appearance-setting > strong { display: block; margin: 0 4px 10px; font-size: calc(0.8125rem * var(--text-scale)); font-weight: 500; }
.appearance-options { display: flex; gap: 4px; padding: 4px; border-radius: 18px; background: #8793a014; }
.appearance-options button { flex: 1; padding: 10px 4px; border: 0; border-radius: 14px; background: transparent; color: inherit; font-size: calc(0.8125rem * var(--text-scale)); }
.appearance-options button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: 0 2px 8px #0000000a; }
html[data-theme="original"][data-appearance="dark"] #cancelClearCache { background: #ffffff12; color: #dce2ec; }
/* Shared close control for every detail dialog and sheet. */
.course-detail .detail-header #closeDetail {
  background: linear-gradient(135deg, #ffffffcc 0%, #eff3f78c 55%, #dbe3ed66 100%);
  border: 1px solid #ffffffe6;
  box-shadow: 0 4px 14px #26395210, inset 0 1px 0 #fff, inset 0 -1px 0 #ffffff70;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  color: #353d47;
}
html[data-theme="original"][data-appearance="dark"] .course-detail .detail-header #closeDetail {
  background: linear-gradient(135deg, #69768766, #35415055 55%, #222c3855);
  border-color: #ffffff2b;
  box-shadow: 0 4px 14px #0003, inset 0 1px 0 #ffffff30, inset 0 -1px 0 #ffffff08;
  color: #edf2f8;
}
.course-detail .detail-header #closeDetail:active { filter: brightness(.94); }
/* Font picker: header stays outside the scrolling content. */
.course-detail[data-view="fonts"] { height: min(86dvh, 800px); display: flex; flex-direction: column; overflow: hidden; }
.course-detail[data-view="fonts"] > .edge-clip,
.course-detail[data-view="fonts"] .detail-scroll-content { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.course-detail[data-view="fonts"] .detail-header,
.course-detail[data-view="fonts"] .sheet-handle { flex-shrink: 0; }
.course-detail[data-view="fonts"] #detailContent { min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.course-detail[data-view="fonts"] #detailContent::-webkit-scrollbar { display: none; }
@media (max-width: 639px) { .course-detail[data-view="fonts"] { height: 88dvh; } }
.font-scroll-content { translate: 0 var(--edge-offset, 0px); }
.course-detail[data-view="fonts"] .font-options { padding-top: 12px; }
.empty-state .empty-icon.is-loading { background: transparent; border: 0; box-shadow: none; }
.empty-state .empty-icon.is-loading .hm-symbol { font-size: 30px; }
.source-state .font-loading { font-size: calc(0.8125rem * var(--text-scale)); }
.about-credits { border-top: 1px solid var(--line); padding-top: 14px; font-size: calc(0.75rem * var(--text-scale)); line-height: 1.7; }
.about-credits > strong { font-size: calc(0.75rem * var(--text-scale)); font-weight: 500; }
.about-content .about-credits p { display: block; margin: 7px 0; color: var(--muted); }
.about-content .about-credits a { font-size: calc(0.75rem * var(--text-scale)); }
/* Official LoadingProgress GIF, served locally. */
.harmony-loading { display: inline-block; flex: none; width: 22px; height: 22px; object-fit: contain; filter: url("#loading-transparent"); }
html[data-theme="original"][data-appearance="dark"] .harmony-loading { filter: url("#loading-transparent") invert(1); }
.empty-state .is-loading .harmony-loading { width: 36px; height: 36px; }
.source-state .harmony-loading { width: 16px; height: 16px; }

@media (max-width: 639px) {
  :root { --time-width: min(calc(clamp(2.625rem, calc(12.3 * var(--viewport-font-unit)), 5.75rem) * var(--text-scale)), 25vw); }
  .title-cluster > strong { font-size: min(calc(clamp(1.1875rem, calc(5.1 * var(--viewport-font-unit)), 1.5rem) * var(--text-scale)), 32px); line-height: 1.2; }
  .week-select-trigger { font-size: min(calc(clamp(.6875rem, calc(2.9 * var(--viewport-font-unit)), .8125rem) * var(--text-scale)), 22px); }
  .time-cell span { font-size: min(calc(clamp(.6875rem, calc(3.35 * var(--viewport-font-unit)), 1.5625rem) * var(--text-scale)), 22px); }
}

/* School exams share the schedule's surfaces and exact minute axis. */
.exam-status { color:var(--accent,#5667a5); background:transparent; border:0; padding:4px 8px; font:inherit; font-size:.8rem; cursor:pointer; }
.exam-list-item { display:flex; flex-direction:column; gap:8px; width:100%; text-align:left; border:0; border-radius:14px; padding:16px; margin:8px 0; color:inherit; background:var(--surface,#f3f4f8); font:inherit; cursor:pointer; }
.exam-list-item span { font-size:.85em; opacity:.8; }
.course-card .exam-time { display:block; font-weight:600; font-size:.8em; }

/* Exams use one recognizable identity, independent of each course's palette. */
.timetable-scroll.has-exams { overflow-x: auto; }
.is-exam, .exam-list-item, .exam-status {
  --exam-bg: #fff2e8;
  --exam-ink: #713b1d;
  --exam-accent: #a94717;
  --exam-line: #e6b89a;
}
html[data-appearance="dark"] :is(.is-exam, .exam-list-item, .exam-status) {
  --exam-bg: #35271f;
  --exam-ink: #ffdbbf;
  --exam-accent: #ffc091;
  --exam-line: #835537;
}
.course-card.is-exam, html[data-appearance] .course-card.is-exam {
  background: var(--exam-bg);
  color: var(--exam-ink);
  border: 1px solid var(--exam-line);
  border-inline-start: 3px solid var(--exam-accent);
  container-type: inline-size;
}
.exam-badge, #scheduleGrid .course-card.is-exam > .exam-badge {
  display: block;
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
  margin: 0 0 5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--exam-accent);
  color: var(--exam-bg);
  font-size: calc(.625rem * var(--text-scale));
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
  letter-spacing: .04em;
}
#scheduleGrid .course-card.is-exam > .exam-time {
  margin-top: 6px;
  color: var(--exam-accent);
  font-size: calc(.75rem * var(--text-scale));
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: normal;
}
.exam-time time { display: inline-block; }
#scheduleGrid .course-card.is-exam > .exam-location,
#scheduleGrid .course-card.is-exam > .exam-seat {
  margin-top: 5px;
  font-size: calc(.6875rem * var(--text-scale));
  line-height: 1.4;
  white-space: normal;
}
#scheduleGrid .course-card.is-exam > .exam-seat { font-weight: 650; }
@container (max-width: 48px) {
  #scheduleGrid .course-card.is-exam > .exam-badge { padding-inline: 3px; letter-spacing: 0; }
  #scheduleGrid .course-card.is-exam > .exam-time { font-size: calc(.625rem * var(--text-scale)); }
  #scheduleGrid .course-card.is-exam > .exam-seat { display: none; }
}
.exam-list-item {
  background: var(--exam-bg);
  color: var(--exam-ink);
  border: 1px solid var(--exam-line);
  border-inline-start: 3px solid var(--exam-accent);
  gap: 7px;
}
.exam-list-item .exam-badge { margin-bottom: 0; opacity: 1; font-size: .625rem; }
.exam-list-item strong { font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.exam-list-item .exam-list-time { color: var(--exam-accent); font-weight: 650; opacity: 1; font-variant-numeric: tabular-nums; }
.exam-list-item > span { overflow-wrap: anywhere; }
.exam-toolbar { flex: none; width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 36px 12px; }
.exam-status { max-width: 100%; min-height: 36px; padding: 6px 12px; border: 1px solid var(--exam-line); border-radius: 10px; color: var(--exam-ink); background: var(--exam-bg); font-size: calc(.75rem * var(--text-scale)); font-weight: 650; text-align: left; }
@media (max-width: 639px) {
  .exam-toolbar { padding: 0 16px 10px; }
}

/* Mixed arrangements share column geometry and readable state labels. */
.detail-row { grid-template-columns: minmax(72px, 94px) minmax(0, 1fr); }
.detail-row dd { min-width: 0; overflow-wrap: anywhere; }

/* Assessment summaries have one type scale, regardless of available card height. */
#scheduleGrid .course-card.is-exam { padding: 5px 4px; }
#scheduleGrid .course-card.is-exam > :is(strong, span) { flex: 0 0 auto; min-width: 0; }
#scheduleGrid .course-card.is-exam > strong {
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;
  font-size: calc(.75rem * var(--text-scale)); font-weight: 600; line-height: 1.3;
  -webkit-line-clamp: 2; overflow-wrap: anywhere;
}
#scheduleGrid .course-card.is-exam > .exam-badge {
  margin: 0 0 3px; padding: 1px 3px; font-size: calc(.625rem * var(--text-scale));
  font-weight: 600; line-height: 1.3; letter-spacing: 0;
}
#scheduleGrid .course-card.is-exam > .exam-time {
  display: flex; flex-direction: column; margin-top: 2px;
  font-size: calc(.625rem * var(--text-scale)); font-weight: 600; line-height: 1.3;
  white-space: nowrap;
}
#scheduleGrid .course-card.is-exam > :is(.exam-location, .exam-seat) {
  display: block; margin-top: 2px; font-size: calc(.625rem * var(--text-scale));
  font-weight: 400; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.assessment-detail {
  --course-color: #713b1d; --course-bg: #fff2e8;
  border: 1px solid #e6b89a; border-inline-start: 3px solid #a94717;
}
.detail-course.assessment-detail, .course-info-card.assessment-detail { background: #fff2e8; }
.assessment-kind {
  display: inline-block; flex: none; margin-inline-start: auto; padding: 2px 7px;
  border-radius: 5px; background: #a94717; color: #fff2e8;
  font-size: calc(.625rem * var(--text-scale)); font-weight: 600; line-height: 1.4;
}
html[data-appearance="dark"] .assessment-detail {
  --course-color: #ffdbbf; --course-bg: #35271f; background: #35271f;
  border-color: #835537; border-inline-start-color: #ffc091;
}
html[data-appearance="dark"] .assessment-kind { background: #ffc091; color: #35271f; }

#scheduleGrid .course-card.is-exam > .exam-location {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1;
  white-space: normal; overflow-wrap: anywhere;
}

/* Extend the selected palette to secondary pages as well as the timetable. */
html[data-theme]:not([data-theme="original"]) {
  --theme-ink: color-mix(in srgb, var(--accent) 20%, #242629);
  --theme-muted: color-mix(in srgb, var(--accent) 30%, #727780);
  --theme-line: color-mix(in srgb, var(--accent) 14%, var(--table-surface));
  --theme-card: color-mix(in srgb, var(--table-surface) 94%, var(--accent));
  --muted: var(--theme-muted);
  --line: var(--theme-line);
  --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--table-surface));
  --accent-hover: color-mix(in srgb, var(--accent) 16%, var(--table-surface));
  --material: linear-gradient(145deg, color-mix(in srgb, var(--table-surface) 96%, transparent), color-mix(in srgb, var(--page-background) 94%, transparent));
  --toast-background: var(--theme-card); --toast-text: var(--theme-ink); --toast-border: var(--theme-line);
  color: var(--theme-ink);
}
html[data-theme]:not([data-theme="original"]) :is(.course-detail, .action-popover, .week-popover, .settings-group, .theme-preview, .font-option) { border-color: var(--theme-line); }
html[data-theme]:not([data-theme="original"]) :is(.detail-list, .settings-group, .info-popup, .font-option, .course-info-card, .profile-identity, .profile-group, .study-card) { background: var(--theme-card); }
html[data-theme]:not([data-theme="original"]) :is(.detail-header h2, .detail-row dd, .setting-copy strong, .about-content strong, .theme-preview-header strong, .font-option, .action-popover > button, #installAppButton, .week-option, .info-popup) { color: var(--theme-ink); }
html[data-theme]:not([data-theme="original"]) :is(.detail-row dt, .detail-row dt .hm-symbol, .settings-caption, .setting-copy small, .setting-status, .about-content span, .theme-section-heading, .week-option small, .font-option small, .action-popover > button:not(#clearCacheButton) .hm-symbol) { color: var(--theme-muted); }
html[data-theme]:not([data-theme="original"]) :is(.detail-row + .detail-row, .settings-option + .settings-option, .study-select select) { border-color: var(--theme-line); }
html[data-theme]:not([data-theme="original"]) .menu-divider { background: var(--theme-line); }
html[data-theme]:not([data-theme="original"]) :is(.setting-icon, .font-icon, .detail-header #closeDetail, .detail-header .detail-back, #cancelClearCache) { background: var(--accent-soft); color: var(--accent); }
html[data-theme]:not([data-theme="original"]) :is(.action-popover > button:hover, .week-option:active, .settings-option:active) { background: var(--accent-hover); }
html[data-theme]:not([data-theme="original"]) :is(.week-option.selected, .week-option.selected small, .theme-option[aria-pressed="true"], .font-option[aria-pressed="true"]) { color: var(--accent); background: var(--accent-soft); }
html[data-theme]:not([data-theme="original"]) :is(.install-guide, .offline-guide) { --guide-ink: var(--theme-ink); --guide-muted: var(--theme-muted); --guide-line: var(--theme-line); }
html[data-theme]:not([data-theme="original"]) :is(.is-exam, .exam-list-item, .exam-status, .assessment-detail) {
  --exam-accent: color-mix(in srgb, var(--accent) 15%, #a94717);
  --exam-bg: color-mix(in srgb, #ed944f 18%, var(--table-surface));
  --exam-ink: color-mix(in srgb, var(--exam-accent) 55%, #242629);
  --exam-line: color-mix(in srgb, var(--exam-accent) 48%, var(--table-surface));
}
html[data-theme]:not([data-theme="original"]) .assessment-detail {
  --course-color: var(--exam-ink); --course-bg: var(--exam-bg);
  background: var(--exam-bg); border-color: var(--exam-line); border-inline-start-color: var(--exam-accent);
}
html[data-theme]:not([data-theme="original"]) .assessment-kind { background: var(--exam-accent); color: var(--exam-bg); }

html[data-theme]:not([data-theme="original"]) .action-popover > button:not(#clearCacheButton) > .hm-symbol { color: var(--accent); }
html[data-theme]:not([data-theme="original"]) .font-size-options button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); }

/* Keep the preview clear of the header controls and use pill segments. */
.course-detail[data-view="colors"] #detailContent { padding-top: 14px; }
.appearance-options { border-radius: 999px; }
.appearance-options button { min-width: 0; border-radius: 999px; }

.schedule-change-banner { flex: none; margin: 0 auto 12px; width: calc(100% - 64px); max-width: 1368px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.schedule-change-banner[hidden] { display: none; }
.schedule-change-banner > button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; background: transparent; color: inherit; text-align: left; border-radius: inherit; }
.schedule-change-banner > button > span:nth-child(2) { flex: 1; min-width: 0; }
.schedule-change-banner strong { display: block; font-size: 14px; font-weight: 600; }
.schedule-change-banner small { display: block; margin-top: 3px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-change-row { margin: 0 0 12px; padding: 16px; border: 1px solid var(--theme-line, var(--line)); border-radius: 16px; background: var(--theme-card, var(--table-surface, #fff)); }
.schedule-change-row header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.schedule-change-row strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.schedule-change-row header span { color: var(--accent); font-size: 12px; }
.schedule-change-row p { margin: 12px 0 0; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.schedule-change-row small { display: block; color: var(--theme-muted, var(--muted)); font-size: 12px; }

@media (max-width: 639px) { .schedule-change-banner { width: calc(100% - 32px); } }

.schedule-change-banner .change-alert-icon { flex: none; width: 26px; height: 26px; }
.schedule-change-row mark { padding: 2px 4px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-weight: 600; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.schedule-change-row .change-before mark { color: inherit; background: color-mix(in srgb, currentColor 10%, transparent); font-weight: inherit; }
#scheduleGrid .course-card > .adjustment-badge { display: block; flex: none; align-self: flex-start; width: max-content; max-width: 100%; margin: 0 0 3px; padding: 1px 3px; border-radius: 4px; background: var(--accent); color: var(--page-background, #fff); font-size: calc(.625rem * var(--text-scale)); font-weight: 600; line-height: 1.3; white-space: nowrap; }
