/* Qingke 55 — one visual system for the complete application. */
:root {
  color-scheme: light;
  --paper-bg: #f5f7f8;
  --paper-card: #ffffff;
  --paper-subtle: #f0f3f5;
  --paper-elevated: #ffffff;
  --paper-line: #e9edf0;
  --paper-line-dark: #d6dee3;
  --ink: #182d38;
  --ink-secondary: #60727e;
  --ink-muted: #5c6f7b;
  --muted: var(--ink-secondary);
  --accent: #147d6d;
  --accent-dark: #116d60;
  --accent-hover: #116d60;
  --accent-light: #e9f5f0;
  --accent-border: #bbdfd1;
  --warm: #b76c25;
  --warm-light: #fff3e6;
  --danger: #ba4e58;
  --shadow-sm: 0 2px 8px #233d4b05;
  --shadow-md: 0 4px 24px #233d4b06;
  --shadow-lg: 0 16px 48px #233d4b14;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --nav-surface: rgba(255, 255, 255, .92);
  --hero-bg: #143f3d;
  --hero-highlight: #286354;
  --hero-ink: #f4faf7;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper-bg); -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; min-height: 100dvh; color: var(--ink); background: var(--paper-bg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; border: 0; }
button, a, summary, [role="button"] { -webkit-tap-highlight-color: transparent; }
button { transition: background .18s, color .18s, box-shadow .18s, transform .18s; }
button:disabled { cursor: default; }
button:active:not(:disabled), [role="button"]:active { transform: scale(.98); }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent-border); outline-offset: 3px; }
input, select { width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px; background: var(--paper-subtle); border: 1px solid transparent; border-radius: 12px; outline: none; font-size: .9375rem; transition: border-color .18s, box-shadow .18s; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
input::placeholder { color: var(--ink-muted); opacity: .85; }
select { cursor: pointer; }
input[type="checkbox"] { accent-color: var(--accent); }
input[type="range"] { accent-color: var(--accent); padding: 0; min-height: 44px; border: 0; box-shadow: none; background: transparent; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2.25rem; line-height: 1.25; font-weight: 720; letter-spacing: -.065em; }
h2 { font-size: 1.125rem; line-height: 1.4; font-weight: 650; letter-spacing: -.035em; }
h3 { font-size: 1rem; line-height: 1.5; font-weight: 650; }
strong { font-weight: 650; }
svg { flex-shrink: 0; }
.ui-icon { width: 20px; height: 20px; vertical-align: middle; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ambient { display: none; }
.app-shell { max-width: 1240px; margin: 0 auto; padding: 24px 32px 56px; }
.glass { background: var(--paper-card); border: 1px solid var(--paper-line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.topbar { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 20px; min-height: 72px; padding: 12px 18px; margin-bottom: 36px; position: relative; z-index: 30; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); justify-self: start; }
.brand-mark { display: grid; place-items: center; flex-shrink: 0; width: 39px; height: 39px; border-radius: 13px; background: linear-gradient(145deg,#277f6c,#184d47); box-shadow: 0 3px 8px #1a655c20, inset 0 1px 1px #ffffff33; }
.brand-mark-svg { width: 26px; height: 26px; }
.brand strong { font-size: 1.0625rem; letter-spacing: -.03em; }
.brand small { display: block; font-size: .6875rem; color: var(--ink-secondary); margin-top: 1px; letter-spacing: .02em; }
.header-notification { display: grid; place-items: center; justify-self: end; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-secondary); background: var(--paper-subtle); }
.header-notification:hover { color: var(--accent); background: var(--accent-light); }
.header-notification.alert::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #dd9660; transform: translate(7px,-7px); }
.primary-nav { display: flex; gap: 5px; padding: 4px; border-radius: 15px; background: var(--paper-subtle); }
.nav-link { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; background: transparent; color: var(--ink-secondary); font-size: .8125rem; font-weight: 550; white-space: nowrap; }
.nav-link.active { color: var(--accent); background: var(--paper-card); box-shadow: var(--shadow-sm); }
.nav-symbol { display: grid; place-items: center; width: 20px; height: 20px; }
.nav-symbol svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-badge { display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; color: #fff; background: #bf7541; font-size: 10px; font-weight: 650; line-height: 1; }
.view { display: none; }
.view.active { display: block; animation: view-in .2s ease both; }
@keyframes view-in { from { opacity: .6; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.eyebrow, .section-kicker { font-size: .75rem; font-weight: 550; line-height: 1.5; letter-spacing: .015em; color: var(--ink-secondary); }
.title-dot { display: inline-block; width: 8px; height: 8px; margin: 0 0 5px 10px; border-radius: 50%; background: #dda369; }
.hero-spark { display: none; }
.home-hero { display: grid; grid-template-columns: 1fr minmax(320px,440px); align-items: center; gap: 48px; margin: 0 0 32px; }
.home-hero.is-solo { grid-template-columns: 1fr; }
.home-intro .eyebrow { margin-bottom: 10px; color: var(--ink-secondary); }
.home-intro h1 { font-size: 2.75rem; }
.hero-summary { margin-top: 10px; color: var(--ink-secondary); font-size: .875rem; }
.next-card { position: relative; overflow: hidden; min-width: 0; padding: 22px 24px 18px; border-radius: 24px; color: var(--hero-ink); background: radial-gradient(ellipse at 95% 0,var(--hero-highlight),transparent 65%), var(--hero-bg); box-shadow: 0 8px 20px #194b3b19; }
.next-card[role="button"] { cursor: pointer; }
.next-card::after { content: ""; position: absolute; top: 42px; right: 17px; width: 85px; height: 85px; pointer-events: none; opacity: .58; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23dcc79b'%3E%3Ccircle cx='50' cy='50' r='26' stroke-opacity='.18'/%3E%3Ccircle cx='50' cy='50' r='18' stroke-opacity='.3'/%3E%3Ccircle cx='50' cy='50' r='9' stroke-width='1.2'/%3E%3Cpath d='M50 25v7M50 68v7M25 50h7M68 50h7M32 32l5 5M63 63l5 5M32 68l5-5M63 37l5-5' stroke-opacity='.7' stroke-linecap='round'/%3E%3C/g%3E%3Ccircle cx='82' cy='19' r='2' fill='%23dcc79b' fill-opacity='.4'/%3E%3C/svg%3E") center/contain no-repeat; }
.next-topline { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 13px; font-size: .75rem; }
.next-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: #e2f1e8; }
.next-status i { width: 6px; height: 6px; border-radius: 50%; background: #9ddec4; box-shadow: 0 0 0 3px #9ddec413; }
.next-relative { padding: 3px 9px; border-radius: 99px; background: #ffffff15; border: 1px solid #ffffff15; color: #f4e1bd; font-size: .6875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.next-body { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.next-course-info { order: -1; min-width: 0; padding-right: 65px; }
.next-course-info > strong { display: block; font-size: 1.4375rem; line-height: 1.35; letter-spacing: -.04em; color: #fff; overflow-wrap: anywhere; }
.next-course-info > span { display: flex; align-items: center; gap: 4px; margin-top: 5px; font-size: .75rem; color: #d5e9de; }
.next-course-info .ui-icon { width: 13px; height: 13px; }
.next-time { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.next-time strong { font-size: 1.3125rem; font-weight: 550; letter-spacing: -.015em; }
.next-time span { color: #d5e9de; font-size: .8125rem; }
.next-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 13px; padding-top: 11px; border-top: 1px solid #ffffff15; font-size: .6875rem; color: #c0dccd; }
.next-progress { height: 3px; margin-top: 12px; border-radius: 3px; background: #ffffff20; overflow: hidden; }
.next-progress span { display: block; height: 100%; background: #b1e2c8; }
.next-empty { display: grid; gap: 8px; padding: 5px; }
.next-empty > span { font-size: 22px; color: #ebd3a6; }
.next-empty strong { font-size: 1.125rem; }
.next-empty small { color: #c0dccd; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1fr) 282px; gap: 24px; align-items: start; }
.schedule-panel { min-width: 0; padding: 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; }
.schedule-heading { min-width: 0; }
.schedule-heading .section-kicker { font-size: .6875rem; }
.calendar-picker { display: block; }
.calendar-picker select { width: auto; max-width: 100%; font-size: 1.125rem; font-weight: 650; padding: 2px 24px 2px 0; background: transparent; border: 0; min-height: 38px; letter-spacing: -.035em; }
.week-switch { display: flex; align-items: center; gap: 1px; flex-shrink: 0; }
.week-switch button { display: grid; place-items: center; min-width: 44px; height: 44px; background: transparent; color: var(--ink-secondary); border-radius: 12px; font-size: 22px; }
.week-switch button:hover:not(:disabled) { background: var(--paper-subtle); }
.week-switch button:disabled { color: var(--paper-line-dark); }
.week-switch .week-label { min-width: 70px; white-space: nowrap; padding-inline: 4px; font-size: .8125rem; color: var(--ink); font-weight: 550; }
.schedule-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 17px 0 18px; }
.mode-switch { display: inline-flex; flex: 0 0 auto; gap: 3px; padding: 3px; border: 1px solid var(--paper-line); border-radius: 12px; background: var(--paper-subtle); }
.mode-switch button { min-height: 38px; padding: 6px 18px; border-radius: 9px; background: transparent; color: var(--ink-secondary); font-size: .8125rem; font-weight: 550; }
.mode-switch button.active { background: var(--paper-card); color: var(--ink); box-shadow: 0 1px 4px #22334412; }
.schedule-tools { display: flex; gap: 4px; align-items: center; min-width: 0; }
.text-button { min-height: 44px; padding: 8px 4px; background: transparent; color: var(--accent); font-size: .8125rem; font-weight: 550; }
.schedule-tools .text-button { font-size: .6875rem; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.schedule-menu { position: relative; z-index: 5; }
.schedule-menu summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; color: var(--ink-secondary); font-size: .8125rem; border-radius: 12px; }
.schedule-menu summary::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; box-shadow: -5px 0 currentColor, 5px 0 currentColor; margin: 0 3px; }
.schedule-menu[open] summary { background: var(--paper-subtle); color: var(--accent); }
.schedule-menu-items { position: absolute; right: 0; top: calc(100% + 7px); min-width: 188px; padding: 7px; border-radius: 17px; background: var(--paper-elevated); border: 1px solid var(--paper-line); box-shadow: var(--shadow-lg); }
.schedule-menu-items button { display: block; width: 100%; min-height: 44px; text-align: left; padding: 10px 12px; border-radius: 10px; background: transparent; font-size: .8125rem; }
.schedule-menu-items button:hover { background: var(--paper-subtle); }
.week-timetable-viewport { --time-column: 42px; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--paper-line-dark) transparent; border-radius: 14px; }
.week-strip { display: grid; grid-template-columns: var(--time-column) repeat(7,minmax(0,1fr)); gap: 0; margin-bottom: 10px; min-width: 560px; }
.week-day { min-height: 64px; padding: 9px 0; margin: 0 3px; border-radius: 13px; color: var(--ink-secondary); background: transparent; font-size: .6875rem; line-height: 1.4; }
.week-day strong { display: block; margin-top: 6px; font-size: 1.0625rem; font-weight: 550; font-variant-numeric: tabular-nums; }
.week-day.today { color: var(--accent); }
.week-day.selected { color: #fff; background: var(--accent); box-shadow: 0 3px 8px #147d6d18; }
.week-day.today::after { content: ""; display: block; width: 3px; height: 3px; margin: 4px auto -4px; background: currentColor; border-radius: 50%; }
.schedule-grid { display: grid; grid-template-columns: var(--time-column) repeat(7,minmax(0,1fr)); grid-template-rows: repeat(11,52px); min-width: 560px; gap: 0; position: relative; background: repeating-linear-gradient(to bottom,transparent 0,transparent 51px,var(--paper-line) 51px,var(--paper-line) 52px); padding-bottom: 1px; }
.time-label { padding: 8px 5px 0 1px; text-align: left; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.time-label > strong { display: block; font-size: .75rem; line-height: 1.2; font-weight: 550; }
.period-time { display: grid; margin-top: 3px; font-size: 8px; line-height: 1.35; }
.period-time i { font-style: normal; }
[data-color="0"] { --course-bg: #e7f3ed; --course-color: #295e4c; --course-accent: #438e72; }
[data-color="1"] { --course-bg: #f9eee0; --course-color: #795934; --course-accent: #bf925a; }
[data-color="2"] { --course-bg: #e9effa; --course-color: #425d8f; --course-accent: #7f9fc8; }
[data-color="3"] { --course-bg: #f9ebed; --course-color: #8d515e; --course-accent: #c28493; }
[data-color="4"] { --course-bg: #f0ebf9; --course-color: #6d598e; --course-accent: #9c85b9; }
[data-color="5"] { --course-bg: #eff2df; --course-color: #616931; --course-accent: #99a55e; }
[data-color="6"] { --course-bg: #e4f2f5; --course-color: #346976; --course-accent: #6aa4b3; }
.course-block { min-width: 0; min-height: 0; margin: 4px 3px; padding: 8px 7px; overflow: hidden; border: 1px solid color-mix(in srgb,var(--course-accent) 12%,transparent); border-left: 2px solid var(--course-accent); border-radius: 10px; background: var(--course-bg); color: var(--course-color); cursor: pointer; transition: filter .15s, transform .15s; }
.course-block > strong { display: block; font-size: .75rem; line-height: 1.45; font-weight: 600; overflow-wrap: anywhere; }
.course-block > span { display: block; margin-top: 5px; font-size: .625rem; line-height: 1.35; overflow-wrap: anywhere; }
.course-block .course-teacher { font-size: .5625rem; }
.course-block.is-live { outline: 2px solid var(--course-accent); outline-offset: 1px; }
.course-block.has-conflict { border: 1px dashed var(--danger); }
.agenda-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 22px 0 14px; }
.agenda-heading > span { font-size: .875rem; font-weight: 650; }
.agenda-heading > small { font-size: .6875rem; color: var(--ink-secondary); }
.day-agenda { display: grid; gap: 11px; }
.agenda-course { display: grid; grid-template-columns: 60px minmax(0,1fr) 12px; align-items: center; gap: 14px; padding: 18px 16px; min-height: 106px; border-radius: 18px; border: 1px solid var(--paper-line); background: var(--paper-card); cursor: pointer; position: relative; overflow: hidden; transition: box-shadow .18s, transform .18s; }
.agenda-course::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; border-radius: 0 4px 4px 0; background: var(--course-accent); }
.agenda-course:hover { box-shadow: var(--shadow-md); }
.agenda-time { font-variant-numeric: tabular-nums; }
.agenda-time > strong { display: block; font-size: 1.0625rem; line-height: 1.3; letter-spacing: -.025em; }
.agenda-time > span { display: block; margin-top: 1px; color: var(--ink-secondary); font-size: .6875rem; }
.agenda-time > small { display: block; margin-top: 6px; color: var(--ink-muted); font-size: .5625rem; }
.agenda-copy { min-width: 0; }
.agenda-copy > strong { display: block; font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.agenda-copy > span { display: block; color: var(--ink-secondary); font-size: .75rem; margin-top: 5px; }
.agenda-copy > small { display: block; color: var(--ink-muted); font-size: .625rem; margin-top: 5px; }
.agenda-chevron { color: var(--paper-line-dark); font-size: 20px; }
.reschedule-badge { display: inline-block; padding: 1px 5px; margin-left: 5px; border-radius: 5px; color: var(--warm); background: var(--warm-light); font-size: .625rem; vertical-align: middle; }
.day-empty, .empty-state { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 32px 16px; border: 1px solid var(--paper-line); border-radius: 20px; background: var(--paper-card); }
.day-empty > span, .empty-orbit { display: grid; place-items: center; width: 58px; height: 58px; color: var(--accent); background: var(--accent-light); border-radius: 20px; font-size: 28px; font-weight: 300; margin-bottom: 4px; }
.day-empty > strong, .empty-state h3 { font-size: 1rem; }
.day-empty p, .empty-state p { max-width: 320px; color: var(--ink-secondary); font-size: .8125rem; line-height: 1.7; }
.day-empty button, .empty-state button { margin-top: 8px; }
.side-stack { display: grid; gap: 20px; }
.task-card, .reminder-card { padding: 20px; min-width: 0; }
.reminder-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.reminder-top p { margin-top: 4px; font-size: .75rem; color: var(--ink-secondary); }
.reminder-status, .push-status { border-radius: 12px; background: var(--paper-subtle); padding: 11px 13px; font-size: .75rem; line-height: 1.65; color: var(--ink-secondary); margin: 15px 0 4px; overflow-wrap: anywhere; }
[data-tone="good"] { color: var(--accent-dark); background: var(--accent-light); }
[data-tone="warning"] { color: var(--warm); background: var(--warm-light); }
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: 0 0 48px; cursor: pointer; }
.switch::before { content: ""; position: absolute; inset: -8px -2px; }
.switch input { position: absolute; inset: -8px -2px; width: 52px; height: 44px; margin: 0; padding: 0; opacity: 0; z-index: 1; cursor: pointer; }
.switch > span { display: block; height: 28px; border-radius: 99px; background: var(--paper-line-dark); transition: background .2s; }
.switch > span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #182d3826; transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--accent-border); outline-offset: 4px; }
.primary, .secondary, .danger-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; padding: 11px 18px; border-radius: 13px; line-height: 1.4; font-size: .875rem; font-weight: 600; }
.primary { background: var(--accent); color: #fff; box-shadow: 0 3px 9px #147d6d12; }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.primary:disabled { color: var(--ink-muted); background: var(--paper-subtle); box-shadow: none; }
.primary[aria-busy="true"] { background: var(--accent-light); color: var(--accent-dark); }
.primary[aria-busy="true"]::before { content: ""; width: 16px; height: 16px; border: 2px solid var(--accent-border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.secondary { color: var(--ink); background: var(--paper-subtle); border: 1px solid var(--paper-line); }
.secondary:hover { background: var(--paper-line); }
.danger-button { color: var(--danger); background: transparent; }
.small { padding: 9px 14px; font-size: .8125rem; }
.full { width: 100%; }
.page-title { text-align: left; margin: 0 0 30px; }
.page-title .eyebrow { display: none; }
.page-title > p:last-child { margin-top: 9px; color: var(--ink-secondary); font-size: .875rem; }
.tasks-layout { display: grid; gap: 24px; max-width: 860px; margin: 0 auto; }
.task-page-title { max-width: 860px; margin-inline: auto; }
.task-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 22px 0; }
.task-overview > div { min-width: 0; display: flex; flex-direction: column; padding: 0 24px; gap: 4px; }
.task-overview > div + div { border-left: 1px solid var(--paper-line); }
.task-overview .section-kicker { font-size: .6875rem; font-weight: 500; }
.task-overview strong { font-size: 1.875rem; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.task-overview > div:nth-child(2) strong { color: var(--warm); }
.task-overview > div:nth-child(3) strong { color: var(--accent); }
.task-overview > div > span:last-child { font-size: .625rem; color: var(--ink-secondary); }
.task-workspace { min-width: 0; padding: 24px; }
.task-workspace > .section-head { flex-wrap: wrap; }
.task-list-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 22px 0 15px; }
.task-list-head h3 { font-size: .875rem; }
.task-filters { display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: var(--paper-subtle); }
.task-filters button { min-height: 38px; padding: 6px 12px; border-radius: 8px; color: var(--ink-secondary); background: transparent; font-size: .75rem; font-weight: 500; }
.task-filters button.active { color: var(--ink); background: var(--paper-card); box-shadow: var(--shadow-sm); }
.task-list, #taskPreview { display: grid; gap: 12px; }
#taskPreview { margin-top: 14px; }
.task-item { padding: 18px; min-width: 0; border: 1px solid var(--paper-line); border-radius: 18px; background: var(--paper-card); }
.task-item-main { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.task-checkbox-label { display: flex; align-items: flex-start; gap: 12px; min-width: 0; flex: 1; position: relative; cursor: pointer; }
.task-checkbox-label > input { position: absolute; width: 44px; height: 44px; margin: -7px 0 0 -12px; padding: 0; opacity: 0; cursor: pointer; }
.task-check-custom { flex: 0 0 21px; width: 21px; height: 21px; margin-top: 3px; border: 1.5px solid var(--paper-line-dark); border-radius: 7px; background: var(--paper-subtle); }
.task-checkbox-label input:checked + .task-check-custom { border-color: var(--accent); background: var(--accent); }
.task-checkbox-label input:checked + .task-check-custom::after { content: ""; display: block; width: 10px; height: 6px; margin: 5px 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg); }
.task-checkbox-label input:focus-visible + .task-check-custom { outline: 3px solid var(--accent-border); outline-offset: 3px; }
.task-info { min-width: 0; flex: 1; }
.task-title-row { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.task-title { font-size: .875rem; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.task-kind-pill, .task-course-pill, .task-countdown { display: inline-flex; max-width: 100%; align-items: center; padding: 3px 7px; border-radius: 6px; font-size: .625rem; line-height: 1.45; font-weight: 550; }
.task-kind-pill { color: var(--accent-dark); background: var(--accent-light); }
.task-kind-pill.kind-exam, .task-countdown.urgent { background: var(--warm-light); color: var(--warm); }
.task-kind-pill.kind-done { color: var(--ink-secondary); background: var(--paper-subtle); }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; color: var(--ink-secondary); font-size: .6875rem; }
.task-course-pill { background: var(--paper-subtle); color: var(--ink-secondary); overflow-wrap: anywhere; }
.task-due-date { font-variant-numeric: tabular-nums; }
.task-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; flex-shrink: 0; gap: 8px; }
.task-countdown { color: var(--ink-secondary); background: var(--paper-subtle); white-space: nowrap; }
.task-countdown.overdue { color: var(--danger); background: #ba4e580d; }
.task-delete-btn { width: 44px; height: 44px; font-size: 19px; color: var(--ink-muted); background: transparent; border-radius: 10px; }
.task-delete-btn:hover { color: var(--danger); background: #ba4e580d; }
.is-done .task-title { text-decoration: line-through; color: var(--ink-secondary); }
.task-progress-block { margin: 15px 0 -6px 33px; padding-top: 10px; border-top: 1px solid var(--paper-line); }
.task-progress-row { display: flex; align-items: center; gap: 16px; }
.task-progress-row > span { font-size: .625rem; color: var(--ink-secondary); flex-shrink: 0; }
.task-progress-row strong { margin-left: 6px; color: var(--accent); font-size: .6875rem; font-variant-numeric: tabular-nums; }
.task-progress-row input { flex: 1; min-width: 0; }
.task-progress-row input { -webkit-appearance: none; appearance: none; }
.task-progress-row input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right,var(--accent) var(--progress,0%),var(--paper-line-dark) var(--progress,0%)); }
.task-progress-row input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; border: 2px solid var(--paper-card); background: var(--accent); box-shadow: 0 1px 4px #142b3822; }
.task-progress-row input::-moz-range-track { height: 4px; border-radius: 4px; background: var(--paper-line-dark); }
.task-progress-row input::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
.task-progress-row input::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--paper-card); background: var(--accent); }
#homeTaskCard .task-item { padding: 14px; }
#homeTaskCard .task-item-main { flex-direction: column; }
#homeTaskCard .task-side { flex-direction: row; width: 100%; align-items: center; padding-left: 33px; }
#homeTaskCard .task-title { font-size: .8125rem; }
#homeTaskCard .task-progress-row { flex-direction: column; align-items: stretch; gap: 0; }
#homeTaskCard .task-progress-block { margin-left: 0; }
.task-empty { padding: 32px 24px; background: var(--paper-subtle); border: 1px dashed var(--paper-line-dark); border-radius: 18px; text-align: center; font-size: .8125rem; line-height: 1.7; color: var(--ink-secondary); }
.task-empty::before { content: "✓"; display: grid; place-items: center; margin: 0 auto 14px; width: 44px; height: 44px; border: 1px solid var(--accent-border); border-radius: 50%; background: var(--accent-light); color: var(--accent); font-size: 22px; font-weight: 300; }
.task-form-panel { margin-top: 20px; padding: 18px; border-radius: 18px; border: 1px solid var(--paper-line); background: var(--paper-subtle); }
.task-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.task-form > label { min-width: 0; }
label.field, .task-form label, .form-grid label, .scope-label { display: grid; gap: 7px; color: var(--ink-secondary); font-size: .8125rem; }
.task-form input, .task-form select { background: var(--paper-card); border: 1px solid var(--paper-line); }
.task-date-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; grid-column: 1 / -1; }
.task-date-shortcuts > span { font-size: .6875rem; color: var(--ink-secondary); margin-right: 4px; }
.task-date-shortcuts button { min-height: 44px; padding: 8px 12px; border-radius: 10px; background: var(--paper-card); color: var(--accent); font-size: .75rem; border: 1px solid var(--paper-line); }
.task-form-actions { display: flex; justify-content: flex-end; gap: 10px; grid-column: 1 / -1; }
.import-steps { display: flex; align-items: center; gap: 18px; margin: 0 0 28px; }
.step-item { display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-size: .8125rem; }
.step-num { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--paper-line); color: var(--ink-secondary); font-size: .6875rem; font-weight: 650; }
.step-item.active { color: var(--accent); font-weight: 600; }
.step-item.active .step-num, .step-item.completed .step-num { color: #fff; background: var(--accent); }
.step-arrow { color: var(--paper-line-dark); font-size: 16px; }
.import-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 24px; align-items: start; }
.upload-card, .review-card { min-width: 0; padding: 24px; }
.upload-card:only-child { max-width: 650px; }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 264px; padding: 24px; border: 1.5px dashed var(--paper-line-dark); border-radius: 20px; background: radial-gradient(circle at 50% 25%,var(--accent-light),transparent 75%),var(--paper-subtle); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--accent); background: var(--accent-light); }
.upload-symbol { display: grid; place-items: center; width: 59px; height: 65px; margin-bottom: 8px; border: 1px solid var(--paper-line); border-radius: 16px; background: var(--paper-card); box-shadow: 0 4px 12px #147d6d09; color: var(--accent); transform: rotate(-5deg); }
.upload-symbol::after { content: "+"; position: absolute; right: -6px; bottom: -3px; display: grid; place-items: center; width: 24px; height: 24px; border: 3px solid var(--paper-card); border-radius: 50%; font-size: 16px; color: #fff; background: var(--accent); }
.upload-symbol .ui-icon { width: 27px; height: 27px; }
.drop-zone h2 { font-size: 1rem; }
.drop-zone p { font-size: .75rem; color: var(--ink-secondary); }
.drop-zone small { font-size: .625rem; color: var(--ink-muted); }
.model-row { display: grid; grid-template-columns: minmax(0,1fr); gap: 15px; margin-top: 20px; }
.model-row > div { display: flex; align-items: center; gap: 12px; }
.model-row label { flex-shrink: 0; color: var(--ink-secondary); font-size: .75rem; }
.model-row select { font-size: .8125rem; min-height: 44px; }
#recognizeButton { width: 100%; min-height: 48px; }
.privacy-note { margin-top: 12px; text-align: center; color: var(--ink-secondary); font-size: .625rem; }
.preview-wrap { position: relative; overflow: hidden; border: 1px solid var(--paper-line); border-radius: 18px; background: var(--paper-subtle); padding: 10px; }
.preview-wrap img { display: block; width: 100%; max-height: 280px; object-fit: contain; border-radius: 10px; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.remove-preview { min-height: 44px; padding: 8px 10px; font-size: .6875rem; border-radius: 9px; background: var(--paper-card); color: var(--ink-secondary); border: 1px solid var(--paper-line); }
.preview-wrap.cropping { touch-action: none; cursor: crosshair; }
.crop-selection { position: absolute; z-index: 3; border: 2px solid var(--accent); background: #147d6d16; box-shadow: 0 0 0 9999px #122b3433; pointer-events: none; }
.crop-hint { position: absolute; z-index: 4; bottom: 10px; left: 10px; right: 10px; padding: 8px; border-radius: 10px; color: #fff; background: #143f3ddd; text-align: center; font-size: .75rem; }
.status-pill { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 7px; white-space: nowrap; font-size: .625rem; color: var(--ink-secondary); background: var(--paper-subtle); }
.status-pill.good { color: var(--accent); background: var(--accent-light); }
.import-scope { display: grid; gap: 14px; margin-top: 18px; padding: 16px; background: var(--paper-subtle); border-radius: 16px; }
.import-scope strong { font-size: .875rem; }
.import-scope p { font-size: .75rem; color: var(--ink-secondary); margin-top: 5px; }
.scope-fields { display: flex; align-items: center; gap: 10px; }
.scope-fields label { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; font-size: .75rem; }
.scope-fields label > span { flex-shrink: 0; }
.scope-arrow { font-size: .75rem; color: var(--ink-secondary); }
.import-pattern-field { display: grid; gap: 7px; font-size: .75rem; color: var(--ink-secondary); }
.import-pattern-field small { font-size: .6875rem; }
.import-diff { display: grid; gap: 5px; font-size: .6875rem; padding-top: 12px; border-top: 1px solid var(--paper-line-dark); }
.import-diff:empty { display: none; }
.import-diff strong { font-size: .75rem; }
.import-warning, .review-flags, .ics-warnings, .reschedule-detail-notice { color: var(--warm); background: var(--warm-light); font-size: .75rem; padding: 10px 12px; border-radius: 10px; }
.course-editor { display: grid; gap: 14px; margin-top: 16px; }
.course-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 16px; border: 1px solid var(--paper-line); border-radius: 16px; }
.course-row.needs-review { border-color: #dfbd92; }
.course-row-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.course-row-head strong { font-size: .75rem; }
.course-row-head > span { font-size: .625rem; color: var(--ink-secondary); }
.delete-course { flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; color: var(--danger); background: transparent; font-size: 20px; }
.course-row > label { display: grid; gap: 6px; min-width: 0; font-size: .6875rem; color: var(--ink-secondary); }
.course-name-field, .weeks-field, .review-flags { grid-column: 1 / -1; }
.course-row input, .course-row select { font-size: .8125rem; }
#saveCourses { margin-top: 18px; }
.editor-placeholder { display: grid; justify-items: center; gap: 10px; padding: 40px 20px; font-size: .875rem; color: var(--ink-secondary); }
.import-history-card { padding: 24px; margin-top: 24px; }
.import-history-card .fine-print { margin-top: 8px; }
.import-history-list { display: grid; gap: 10px; margin-top: 16px; }
.import-history-empty { font-size: .75rem; padding: 14px 0; color: var(--ink-secondary); }
.import-history-item { padding: 16px; border: 1px solid var(--paper-line); border-radius: 14px; }
.import-history-copy { display: grid; gap: 5px; }
.import-history-copy strong { font-size: .875rem; }
.import-history-copy span, .import-history-copy small { font-size: .75rem; color: var(--ink-secondary); }
.import-history-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.settings-profile { display: flex; align-items: center; gap: 14px; padding: 20px 24px; margin-bottom: 24px; border-radius: 22px; border: 1px solid var(--paper-line); background: var(--paper-card); }
.settings-profile-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 15px; color: var(--accent); background: var(--accent-light); }
.settings-profile-icon .ui-icon { width: 26px; height: 26px; }
.settings-profile > div { min-width: 0; flex: 1; }
.settings-profile strong { font-size: .9375rem; overflow-wrap: anywhere; }
.settings-profile p { margin-top: 4px; color: var(--ink-secondary); font-size: .6875rem; }
.profile-indicator { display: flex; align-items: center; gap: 5px; font-size: .625rem; color: var(--ink-secondary); white-space: nowrap; }
.profile-indicator i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 18px; }
.settings-card { padding: 22px; min-width: 0; }
.span-2 { grid-column: 1 / -1; }
.settings-title { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin-bottom: 12px; }
.settings-title-icon { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; border-radius: 9px; background: var(--accent-light); color: var(--accent); }
.settings-title-icon .ui-icon { width: 17px; height: 17px; }
.icon-bell { background: var(--warm-light); color: var(--warm); }
.icon-calendar { background: #e9effa; color: #526e9e; }
.icon-cloud { background: #f0ebf9; color: #7c619e; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--paper-line); }
.setting-row > div { min-width: 0; }
.setting-row strong { font-size: .875rem; font-weight: 550; }
.setting-row p { font-size: .6875rem; color: var(--ink-secondary); margin-top: 4px; line-height: 1.6; }
.setting-row select { width: 128px; flex-shrink: 0; }
.fine-print { color: var(--ink-secondary); font-size: .75rem; line-height: 1.75; }
.field { margin-top: 16px; }
.semester-card { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.semester-card h2 { grid-column: 1 / -1; }
.semester-card .field { min-width: 0; margin-top: 10px; font-size: .75rem; }
.settings-card .fine-print { margin-top: 10px; }
.settings-card .section-head { flex-wrap: wrap; gap: 8px; }
.settings-card .section-head .settings-title { margin-bottom: 0; }
.widget-settings .fine-print { max-width: 780px; }
.widget-settings > .secondary { margin-top: 12px; }
.widget-actions, .button-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.button-stack > button { flex: 1 1 180px; }
.widget-actions > button { flex: 1 1 150px; }
.widget-credentials > .danger-button { margin-top: 10px; font-size: .75rem; }
.settings-accordion { padding: 0; }
.settings-accordion > summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 80px; padding: 18px 22px; }
.settings-accordion > summary strong { display: block; font-size: .875rem; font-weight: 550; }
.settings-accordion > summary small { display: block; margin-top: 4px; font-size: .6875rem; color: var(--ink-secondary); }
.settings-accordion > summary::after, .settings-diagnostics > summary::after, .sync-controls > summary::after, .widget-guide-accordion > summary::after { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-right: 1.5px solid var(--ink-muted); border-bottom: 1.5px solid var(--ink-muted); transform: rotate(45deg); margin: -4px 3px 0; transition: transform .2s; }
details[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.settings-accordion-content { padding: 0 22px 22px; }
.settings-diagnostics > summary, .sync-controls > summary, .widget-guide-accordion > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 46px; margin-top: 10px; font-size: .75rem; color: var(--ink-secondary); }
.settings-diagnostics + .fine-print { margin-top: 7px; font-size: .6875rem; }
.reminder-audit { display: grid; gap: 7px; margin: 8px 0 12px; }
.audit-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 10px 12px; font-size: .6875rem; border-radius: 10px; background: var(--paper-subtle); }
.audit-row span { color: var(--ink-secondary); }
.audit-row strong { overflow-wrap: anywhere; font-weight: 500; }
.audit-row.good strong { color: var(--accent); }
.audit-row.warning strong { color: var(--warm); }
.period-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.period-item { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; padding: 11px 12px; border-radius: 10px; background: var(--paper-subtle); font-size: .6875rem; color: var(--ink-secondary); }
.period-item strong { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.inline-controls { display: flex; gap: 8px; margin-top: 16px; }
.inline-controls input { flex: 1; min-width: 0; }
.holiday-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.holiday-chip { min-height: 44px; padding: 9px 12px; border-radius: 10px; background: var(--paper-subtle); color: var(--ink-secondary); font-size: .75rem; }
.calendar-subscribe { margin-top: 22px; padding-top: 6px; border-top: 1px solid var(--paper-line); }
.calendar-subscribe > button { margin-top: 12px; }
.subscription-list { display: grid; gap: 10px; }
.subscription-item { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px; margin-top: 10px; border-radius: 12px; background: var(--paper-subtle); font-size: .75rem; }
.subscription-item strong, .subscription-item small { display: block; overflow-wrap: anywhere; }
.subscription-item small { color: var(--ink-secondary); }
.install-guide { grid-column: 1 / -1; }
.install-guide p { color: var(--ink-secondary); font-size: .8125rem; }
#syncCode, #widgetReadToken { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: .75rem; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%,8px); z-index: 100; padding: 12px 19px; max-width: calc(100% - 48px); border: 1px solid #ffffff18; border-radius: 14px; background: #1c3540ed; color: #fff; box-shadow: var(--shadow-lg); font-size: .8125rem; text-align: center; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
dialog { color: var(--ink); }
dialog:not([open]) { display: none; }
.course-detail, .source-image-dialog { width: min(560px,calc(100% - 32px)); max-height: 85dvh; padding: 32px; overflow-y: auto; border: 1px solid var(--paper-line); border-radius: 28px; background: var(--paper-elevated); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: #102c3659; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.detail-close { display: grid; place-items: center; position: absolute; right: 17px; top: 16px; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-secondary); background: var(--paper-subtle); font-size: 22px; }
.course-detail .section-kicker { color: var(--accent); display: block; margin: 4px 50px 8px 0; }
.course-detail h2 { padding-right: 36px; margin-bottom: 18px; font-size: 1.4375rem; line-height: 1.45; overflow-wrap: anywhere; }
.course-detail dl { margin: 0; }
.course-detail dl > div { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--paper-line); font-size: .875rem; }
.course-detail dt { color: var(--ink-secondary); font-size: .8125rem; }
.course-detail dd { margin: 0; overflow-wrap: anywhere; }
.course-detail-actions { display: grid; gap: 10px; margin-top: 22px; }
.course-detail form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-impact { padding: 11px 13px; border-radius: 12px; background: var(--paper-subtle); font-size: .75rem; color: var(--ink-secondary); }
.dialog-actions { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.week-picker-help { font-size: .8125rem; color: var(--ink-secondary); margin: -4px 0 20px; }
.week-picker-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.week-picker-option { min-height: 66px; padding: 10px 5px; border-radius: 12px; border: 1px solid var(--paper-line); background: var(--paper-subtle); text-align: center; }
.week-picker-option strong { display: block; font-size: .75rem; font-weight: 500; }
.week-picker-option small { display: block; margin-top: 4px; font-size: .625rem; color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
.week-picker-option.selected { background: var(--accent-light); color: var(--accent); border-color: var(--accent-border); }
.week-picker-current { margin-top: 16px; }
.source-image-dialog h2 { margin-bottom: 20px; padding-right: 44px; }
.source-image-dialog img { display: block; max-width: 100%; border-radius: 12px; }
.source-image-dialog p { margin-top: 14px; }
.ics-import-preview { display: grid; gap: 9px; margin: 16px 0; }
.ics-preview-row { display: grid; gap: 5px; padding: 14px; border-radius: 12px; background: var(--paper-subtle); font-size: .8125rem; }
.ics-preview-row span, .ics-preview-row small { font-size: .75rem; color: var(--ink-secondary); }
.conflict-course-list { display: grid; gap: 10px; }
.conflict-course-list button { display: grid; gap: 6px; min-height: 66px; padding: 15px; text-align: left; border-radius: 12px; background: var(--paper-subtle); }
.conflict-course-list button span { font-size: .75rem; color: var(--ink-secondary); }
@media (hover: hover) {
  .nav-link:hover:not(.active) { background: var(--paper-line); }
  .course-block:hover { filter: saturate(1.2); transform: translateY(-1px); }
  .agenda-course:hover { border-color: var(--paper-line-dark); }
}
@media (max-width: 1000px) {
  .app-shell { padding-inline: 24px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .side-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-hero { gap: 30px; }
  .topbar { gap: 12px; }
  .brand small { display: none; }
  .nav-link { padding-inline: 14px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 20px; }
  .app-shell { padding: calc(14px + env(safe-area-inset-top)) 20px calc(112px + env(safe-area-inset-bottom)); }
  .topbar { display: flex; justify-content: space-between; padding: 0; min-height: 44px; margin: 0 0 24px; position: relative; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .brand { gap: 9px; }
  .brand-mark { width: 33px; height: 33px; border-radius: 11px; }
  .brand-mark-svg { width: 23px; height: 23px; }
  .brand strong { font-size: .9375rem; letter-spacing: -.01em; }
  .brand small { display: none; }
  .header-notification { background: var(--paper-card); border: 1px solid var(--paper-line); width: 40px; height: 40px; position: relative; }
  .header-notification::before { content: ""; position: absolute; inset: -2px; }
  .primary-nav { position: fixed; z-index: 50; left: max(12px,env(safe-area-inset-left)); right: max(12px,env(safe-area-inset-right)); bottom: max(12px,env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; max-width: 480px; margin-inline: auto; padding: 5px 8px; min-height: 67px; border-radius: 25px; background: var(--nav-surface); border: 1px solid var(--paper-line); box-shadow: 0 5px 30px #172e3810,0 1px 2px #172e3804; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
  .nav-link { display: flex; flex-direction: column; gap: 2px; min-height: 55px; padding: 2px; border-radius: 16px; font-size: .6875rem; font-weight: 500; background: transparent; }
  .nav-link.active { box-shadow: none; background: transparent; font-weight: 600; }
  .nav-symbol { width: 44px; height: 29px; border-radius: 11px; transition: background .2s; }
  .nav-symbol svg { width: 21px; height: 21px; }
  .nav-link.active .nav-symbol { background: var(--accent-light); }
  .nav-badge { position: absolute; top: 3px; left: calc(50% + 9px); border: 2px solid var(--paper-card); padding: 0 3px; min-width: 17px; height: 17px; font-size: 8px; }
  h1 { font-size: 2rem; }
  .home-hero { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; margin-bottom: 22px; }
  .home-intro .eyebrow { margin-bottom: 6px; font-size: .75rem; }
  .home-intro h1 { font-size: 2.0625rem; line-height: 1.3; }
  .hero-summary { font-size: .75rem; margin-top: 6px; }
  .title-dot { width: 7px; height: 7px; margin-bottom: 4px; }
  .next-card { padding: 17px 20px 14px; border-radius: 22px; }
  .next-topline { margin-bottom: 10px; }
  .next-course-info > strong { font-size: 1.3125rem; }
  .next-course-info > span { font-size: .6875rem; margin-top: 4px; }
  .next-body { gap: 8px; }
  .next-time strong { font-size: 1.1875rem; }
  .next-footer { margin-top: 12px; padding-top: 10px; font-size: .625rem; }
  .dashboard-grid { gap: 24px; }
  .schedule-panel { padding: 0; border: 0; background: transparent; border-radius: 0; box-shadow: none; }
  .schedule-heading .section-kicker { font-size: .625rem; }
  .calendar-picker select { font-size: 1rem; min-height: 34px; }
  .week-switch button { min-width: 32px; }
  .week-switch .week-label { min-width: 66px; font-size: .75rem; }
  .schedule-head { gap: 8px; }
  .schedule-controls { margin: 13px 0 16px; gap: 6px; }
  .mode-switch button { min-height: 36px; padding-inline: 17px; font-size: .75rem; }
  .mode-switch { padding: 3px; border: 0; }
  .schedule-menu summary { padding: 8px 6px; font-size: .75rem; }
  .week-strip { min-width: 616px; }
  .schedule-grid { min-width: 616px; grid-template-rows: repeat(11,52px); background-color: var(--paper-card); }
  #scheduleView[data-mode="week"] .week-timetable-viewport { padding-bottom: 8px; }
  #scheduleView[data-mode="day"] .week-strip { min-width: 0; grid-template-columns: repeat(7,minmax(0,1fr)); margin-bottom: 0; padding: 5px 0; border: 1px solid var(--paper-line); border-radius: 17px; background: var(--paper-card); }
  #scheduleView[data-mode="day"] .week-strip > div:first-child { display: none; }
  #scheduleView[data-mode="day"] .week-timetable-viewport { overflow: visible; }
  .week-day { min-height: 57px; padding: 7px 0; margin-inline: 2px; border-radius: 12px; font-size: .6875rem; }
  .week-day strong { margin-top: 5px; font-size: .9375rem; }
  .agenda-heading { margin: 21px 0 12px; }
  .agenda-heading > span { font-size: .8125rem; }
  .agenda-heading > small { font-size: .625rem; }
  .agenda-course { gap: 12px; padding: 16px; grid-template-columns: 54px minmax(0,1fr) 10px; min-height: 100px; }
  .agenda-copy > strong { font-size: .875rem; }
  .agenda-copy > span { font-size: .75rem; }
  .agenda-copy > small { font-size: .6875rem; }
  .agenda-time > strong { font-size: 1rem; }
  .side-stack { grid-template-columns: minmax(0,1fr); }
  .task-card, .reminder-card { padding: 18px; }
  .side-stack h3 { font-size: .875rem; }
  .page-title { margin-bottom: 24px; }
  .page-title h1 { font-size: 1.9375rem; }
  .page-title > p:last-child { font-size: .75rem; margin-top: 7px; }
  .tasks-layout { gap: 24px; }
  .task-overview { padding: 16px 0; border-radius: 19px; }
  .task-overview > div { padding-inline: 16px; gap: 3px; }
  .task-overview strong { font-size: 1.625rem; }
  .task-overview .section-kicker { font-size: .625rem; }
  .task-overview > div > span:last-child { font-size: .5625rem; }
  .task-workspace { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .task-workspace .section-head h2 { font-size: 1rem; }
  #toggleTaskFormBtn { font-size: .75rem; min-height: 44px; padding-inline: 13px; }
  .task-list-head { margin: 18px 0 14px; align-items: stretch; }
  .task-list-head h3 { display: none; }
  .task-filters { width: 100%; padding: 4px; border-radius: 12px; }
  .task-filters button { flex: 1; min-height: 38px; border-radius: 9px; }
  .task-item { padding: 16px; }
  .task-item-main { flex-direction: column; gap: 8px; }
  .task-side { width: 100%; flex-direction: row; align-items: center; padding-left: 33px; }
  .task-delete-btn { margin-block: -8px; margin-right: -8px; }
  .task-title { font-size: .8125rem; }
  .task-progress-row { flex-direction: column; align-items: stretch; gap: 0; }
  .task-progress-block { margin-top: 12px; }
  .task-form { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .task-form-panel { padding: 16px; background: var(--paper-card); }
  .task-form input, .task-form select { background: var(--paper-subtle); font-size: 16px; }
  .task-date-shortcuts > span { width: 100%; }
  .task-date-shortcuts button { padding: 8px 10px; }
  .task-form-actions > button { flex: 1; }
  .import-steps { gap: 9px; justify-content: space-between; margin-bottom: 24px; }
  .step-item { font-size: .6875rem; gap: 6px; }
  .step-num { width: 22px; height: 22px; font-size: .625rem; }
  .step-arrow { font-size: 13px; }
  .import-layout { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .upload-card, .review-card { padding: 18px; border-radius: 22px; }
  .drop-zone { min-height: 210px; padding: 20px 12px; }
  .drop-zone h2 { font-size: .9375rem; }
  .upload-symbol { width: 51px; height: 56px; margin-bottom: 7px; }
  .model-row { gap: 14px; margin-top: 17px; }
  .model-row select { min-height: 44px; padding: 10px; font-size: 16px; }
  .privacy-note { font-size: .5625rem; }
  .preview-wrap img { max-height: 220px; }
  .course-row { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 14px; }
  .course-row input, .course-row select { font-size: 16px; }
  .course-row-head { flex-wrap: wrap; gap: 6px; }
  .course-row-head > span { flex: 1; }
  .import-history-card { padding: 18px; border-radius: 20px; }
  .import-history-card h2 { font-size: .9375rem; }
  .import-history-card .fine-print { font-size: .6875rem; }
  .settings-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .settings-profile { gap: 11px; padding: 17px; margin-bottom: 22px; border-radius: 20px; }
  .settings-profile-icon { width: 41px; height: 41px; flex-basis: 41px; border-radius: 13px; }
  .settings-profile strong { font-size: .875rem; }
  .settings-profile p { font-size: .625rem; }
  .profile-indicator { display: none; }
  .settings-card { padding: 18px; border-radius: 20px; }
  .settings-accordion { padding: 0; }
  .settings-accordion > summary { min-height: 76px; padding: 16px 18px; }
  .settings-accordion-content { padding: 0 18px 18px; }
  .settings-title { font-size: .9375rem; }
  .setting-row { gap: 14px; padding-block: 14px; }
  .setting-row strong { font-size: .8125rem; }
  .setting-row p { font-size: .625rem; }
  .setting-row select { width: 115px; font-size: 16px; }
  .field input { font-size: 16px; }
  .semester-card { column-gap: 12px; }
  .fine-print { font-size: .6875rem; }
  .widget-settings .section-head { align-items: flex-start; }
  .widget-settings .status-pill { margin-left: 39px; font-size: .5625rem; }
  .widget-settings > .secondary { width: 100%; }
  .push-status, .reminder-status { font-size: .6875rem; }
  .widget-actions > button { flex-basis: 120px; font-size: .75rem; }
  .button-stack > button { flex-basis: 140px; font-size: .75rem; }
  .period-list { gap: 6px; }
  .period-item { padding: 10px; font-size: .625rem; }
  .toast { bottom: calc(94px + env(safe-area-inset-bottom)); border-radius: 12px; font-size: .75rem; }
  .course-detail, .source-image-dialog { position: fixed; inset: auto 0 0; width: 100%; max-width: 100%; max-height: 88dvh; margin: 0; padding: 38px 24px calc(24px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; border-bottom: 0; }
  dialog::before { content: ""; position: absolute; top: 10px; left: calc(50% - 18px); width: 36px; height: 4px; border-radius: 4px; background: var(--paper-line-dark); }
  .detail-close { top: 22px; right: 18px; width: 36px; height: 36px; }
  .detail-close::before { content: ""; position: absolute; inset: -4px; }
  .course-detail h2 { font-size: 1.25rem; }
  .form-grid input, .form-grid select, .scope-label select { font-size: 16px; }
  .week-picker-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .week-picker-option { min-height: 70px; }
}
@media (max-width: 350px) {
  .app-shell { padding-inline: 16px; }
  .schedule-tools .text-button { max-width: 60px; font-size: .625rem; }
  .week-switch .week-label { min-width: 60px; }
  .week-switch button { min-width: 30px; }
  .task-overview > div { padding-inline: 12px; }
  .import-steps { gap: 5px; }
  .step-item { gap: 4px; font-size: .625rem; }
  .setting-row select { width: 98px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper-bg: #0c1419;
    --paper-card: #152027;
    --paper-subtle: #1c2a31;
    --paper-elevated: #1b2931;
    --paper-line: #223139;
    --paper-line-dark: #3d515c;
    --ink: #e8f0f3;
    --ink-secondary: #a5b7c1;
    --ink-muted: #9caeba;
    --accent: #72cdb0;
    --accent-dark: #a3dfca;
    --accent-hover: #93dec2;
    --accent-light: #193b33;
    --accent-border: #3a7360;
    --warm: #eac08b;
    --warm-light: #362c22;
    --danger: #e39da5;
    --shadow-sm: 0 2px 8px #00000008;
    --shadow-md: 0 4px 24px #00000010;
    --shadow-lg: 0 16px 48px #00000033;
    --nav-surface: rgba(21,32,39,.95);
    --hero-bg: #183a36;
    --hero-highlight: #28544b;
  }
  .primary { color: #102a22; }
  .week-day.selected { color: #102a22; }
  .step-item.active .step-num, .step-item.completed .step-num { color: #102a22; }
  .task-checkbox-label input:checked + .task-check-custom::after { border-color: #102a22; }
  .icon-calendar { background: #253346; color: #a4bce8; }
  .icon-cloud { background: #302b41; color: #c0aedb; }
  .upload-symbol::after { color: #102a22; }
  [data-color="0"] { --course-bg: #1c352e; --course-color: #bde1d2; --course-accent: #76b399; }
  [data-color="1"] { --course-bg: #373024; --course-color: #e7d1b2; --course-accent: #bd9b71; }
  [data-color="2"] { --course-bg: #253244; --course-color: #c4d4ee; --course-accent: #8faacf; }
  [data-color="3"] { --course-bg: #3b2932; --course-color: #efd0d9; --course-accent: #c997a8; }
  [data-color="4"] { --course-bg: #322c42; --course-color: #d9cfee; --course-accent: #ad98cc; }
  [data-color="5"] { --course-bg: #303525; --course-color: #d9dfb5; --course-accent: #a9b479; }
  [data-color="6"] { --course-bg: #22363e; --course-color: #c0dfe7; --course-accent: #89b4c0; }
  dialog::backdrop { background: #040c1299; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (prefers-contrast: more) {
  :root { --ink-secondary: var(--ink); --ink-muted: var(--ink); }
  .glass, .agenda-course, .task-item { border-color: var(--paper-line-dark); }
}
