:root {
  color-scheme: light;
  --ink: #18333e;
  --muted: #516973;
  --ground: #f3f7f8;
  --surface: #fff;
  --teal: #176b68;
  --teal-dark: #10504e;
  --teal-soft: #e4f1ee;
  --line: #dbe5e8;
  --red: #a63b3b;
  --red-soft: #fbeeee;
  --amber: #805115;
  --amber-soft: #fcf2de;
  --blue: #285d9e;
  --blue-soft: #eaf1fa;
  --radius: 14px;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  font-size: 15px;
  line-height: 1.65;
  background: var(--ground);
  color: var(--ink);
  accent-color: var(--teal);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
button, input, select { min-height: 44px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #277bba;
  outline-offset: 3px;
}
input, select { caret-color: var(--teal); }
::selection { background: #b9ded5; color: #123c37; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: #b1c5c9; border-radius: 6px; }
a { color: var(--teal); text-underline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(25px, 3.4vw, 36px); letter-spacing: -.025em; line-height: 1.35; font-weight: 700; }
h2 { font-size: 20px; line-height: 1.4; }
h3 { font-size: 17px; line-height: 1.5; }
small, .small { font-size: 12px; }
svg { width: 21px; height: 21px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.numeric { font-variant-numeric: tabular-nums; }
.initial { max-width: 700px; padding: 70px 24px; margin: auto; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 12px; z-index: 50; background: white; }
.skip-link:focus { top: 12px; }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; height: 100dvh; top: 0; padding: 33px 22px; color: #e4f1ef; background: #174845; display: flex; flex-direction: column; }
.brand { display: flex; gap: 11px; align-items: center; color: inherit; text-decoration: none; font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.brand img { width: 37px; height: 37px; }
.sidebar .brand { padding-left: 9px; }
.nav { display: flex; flex-direction: column; gap: 7px; margin-top: 52px; }
.nav button { display: flex; align-items: center; gap: 13px; border: 0; border-radius: 10px; padding: 12px 15px; background: transparent; color: #d8e8e6; text-align: left; }
.nav button:hover { background: #215751; }
.nav button.active { color: #fff; background: #2b645d; font-weight: 600; }
.nav .count { margin-left: auto; background: #f2d9c8; color: #63391e; border-radius: 10px; min-width: 21px; padding: 0 6px; text-align: center; font-size: 12px; }
.side-foot { margin-top: auto; color: #c2d9d5; padding: 22px 9px 0; font-size: 12px; }
.side-foot p + p { margin-top: 6px; }
.workspace { min-width: 0; }
.topbar { padding: 23px 42px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-title { font-size: 14px; font-weight: 600; }
.top-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.sync-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.dot.error { background: var(--amber); }
.button { min-height: 43px; padding: 9px 17px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font-weight: 500; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; gap: 7px; line-height: 1.5; }
.button:hover { background: #edf3f4; }
.button.primary { color: white; border-color: transparent; background: var(--teal); }
.button.primary:hover { background: var(--teal-dark); }
.button.quiet { background: transparent; border-color: transparent; padding: 8px; color: var(--teal); }
.button.danger { color: var(--red); }
.button.compact { padding: 6px 11px; min-height: 36px; font-size: 12px; }
main.content { max-width: 1450px; padding: 39px 42px 58px; margin: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head p { margin-top: 8px; color: var(--muted); }
.date-label { text-align: right; color: var(--muted); font-size: 13px; white-space: nowrap; }
.date-label strong { display: block; font-size: 17px; color: var(--ink); }
.status-banner { padding: 15px 19px; border-radius: 10px; background: var(--amber-soft); color: #704810; display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 23px; }
.status-banner p { max-width: 72ch; }
.status-banner strong { font-weight: 600; }
.status-banner a { color: inherit; }
.today-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, 1fr); align-items: start; gap: 28px; }
.panel { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.panel-head { padding: 21px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-head h2 { font-size: 17px; }
.panel-body { padding: 24px; }
.day-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; padding: 18px 18px 4px; }
.day-picker button { border: 0; background: transparent; color: var(--muted); padding: 8px 2px; border-radius: 9px; line-height: 1.5; }
.day-picker small { display: block; font-size: 11px; }
.day-picker strong { display: block; font-size: 17px; font-weight: 500; }
.day-picker button.active { background: var(--teal); color: white; }
.day-picker button:hover:not(.active) { background: var(--teal-soft); color: var(--teal-dark); }
.schedule { padding: 2px 24px 22px; }
.course-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; padding-top: 24px; }
.course-time { padding-top: 3px; font-size: 15px; font-weight: 600; line-height: 1.5; font-variant-numeric: tabular-nums; }
.course-time span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.course-data { padding-bottom: 24px; border-bottom: 1px solid var(--line); min-width: 0; }
.course-row:last-child .course-data { border-bottom: 0; padding-bottom: 0; }
.course-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.course-title h3 { font-size: 18px; font-weight: 600; word-break: break-word; }
.course-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 7px; }
.course-meta span { display: inline-flex; align-items: center; gap: 5px; }
.course-meta svg { width: 15px; height: 15px; }
.tag { display: inline-flex; padding: 3px 8px; border-radius: 5px; line-height: 1.6; font-size: 11px; font-weight: 500; white-space: nowrap; color: var(--teal-dark); background: var(--teal-soft); }
.tag.cancelled, .tag.cancel { color: var(--red); background: var(--red-soft); }
.tag.moved_out, .tag.move { color: var(--amber); background: var(--amber-soft); }
.tag.moved_in { color: var(--blue); background: var(--blue-soft); }
.cancelled h3, .moved_out h3 { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); }
.course-change { margin-top: 11px; padding: 8px 11px; color: var(--red); background: var(--red-soft); font-size: 12px; border-radius: 7px; }
.moved_out .course-change { color: var(--amber); background: var(--amber-soft); }
.moved_in .course-change { color: var(--blue); background: var(--blue-soft); }
.aside-stack { display: grid; gap: 23px; }
.notice-teaser { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.notice-teaser:last-child { border-bottom: 0; }
.notice-teaser p { margin-top: 9px; font-weight: 500; font-size: 14px; }
.notice-teaser time { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.hint { padding: 19px 22px; color: var(--muted); font-size: 12px; }
.hint strong { display: block; color: var(--ink); margin-bottom: 6px; font-size: 13px; }
.empty { padding: 44px 25px; text-align: center; color: var(--muted); }
.empty svg { width: 34px; height: 34px; margin-bottom: 12px; color: var(--teal); }
.empty h2, .empty h3 { color: var(--ink); margin-bottom: 8px; }
.empty .button { margin-top: 18px; }
.section-space { margin-top: 27px; }
.practical { padding: 18px 23px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; }
.practical + .practical { border-top: 1px solid var(--line); }
.practical span { color: var(--muted); font-size: 13px; }
.week-toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.week-toolbar select { width: auto; min-width: 112px; }
.week-scroll { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.week-board { display: grid; grid-template-columns: repeat(7, minmax(115px, 1fr)); min-width: 805px; }
.week-day { min-height: 420px; border-right: 1px solid var(--line); }
.week-day:last-child { border-right: 0; }
.week-day-head { padding: 18px 8px; text-align: center; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.week-day-head strong { display: block; font-size: 20px; font-weight: 500; color: var(--ink); }
.week-day.is-today .week-day-head { background: var(--teal-soft); color: var(--teal-dark); }
.week-course { margin: 12px 8px; padding: 11px 10px; border-radius: 9px; background: var(--teal-soft); font-size: 12px; }
.week-course strong { display: block; font-size: 13px; line-height: 1.5; margin: 6px 0; }
.week-course p { color: #37615b; font-size: 11px; overflow-wrap: anywhere; }
.week-course.cancelled { background: var(--red-soft); }
.week-course.cancelled strong { text-decoration: line-through; color: var(--red); }
.week-course.cancelled p { color: var(--red); }
.week-course.moved_out { background: var(--amber-soft); }
.week-course.moved_in { background: var(--blue-soft); }
.week-course .tag { padding: 0; margin-top: 7px; background: transparent; }
.week-empty { padding: 28px 5px; text-align: center; font-size: 12px; color: var(--muted); }
.filter-row { display: flex; gap: 8px; margin-bottom: 23px; flex-wrap: wrap; }
.filter-row button { min-height: 37px; border: 1px solid var(--line); border-radius: 7px; padding: 6px 14px; background: transparent; color: var(--muted); font-size: 13px; }
.filter-row button.active { background: var(--teal); color: white; border-color: var(--teal); }
.notice-item { border-bottom: 1px solid var(--line); padding: 0 24px; }
.notice-item:last-child { border-bottom: 0; }
.notice-item summary { cursor: pointer; list-style: none; padding: 22px 0; display: flex; align-items: flex-start; gap: 15px; }
.notice-item summary::-webkit-details-marker { display: none; }
.notice-item .summary-text { flex: 1; min-width: 0; }
.notice-item summary strong { font-size: 16px; font-weight: 500; }
.notice-item summary time { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.notice-item summary > svg { margin-top: 4px; transition: transform .15s ease-out; }
.notice-item[open] summary > svg { transform: rotate(180deg); }
.notice-detail { padding: 0 0 23px; line-height: 1.9; font-size: 14px; overflow-wrap: anywhere; }
.notice-detail p { white-space: pre-wrap; max-width: 75ch; }
.notice-detail .muted { margin-top: 13px; font-size: 12px; }
.unread-label { color: var(--teal); font-size: 11px; margin-left: 9px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; align-items: start; }
.settings-stack { display: grid; gap: 26px; }
label.field { display: block; margin-bottom: 18px; font-size: 13px; font-weight: 500; }
label.field > span { display: block; margin-bottom: 7px; }
input, select { width: 100%; border: 1px solid #b9ccd1; border-radius: 8px; padding: 10px 12px; background: white; color: var(--ink); min-width: 0; }
input::placeholder { color: #607781; opacity: 1; }
input:focus, select:focus { border-color: var(--teal); }
label.field .help { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 6px; }
.form-row { display: flex; gap: 10px; align-items: flex-end; }
.form-row label { flex: 1; margin-bottom: 0; }
.form-row .button { min-height: 46px; white-space: nowrap; }
.form-note { margin-top: 15px; font-size: 12px; color: var(--muted); }
.form-error { margin-bottom: 18px; color: var(--red); font-size: 13px; }
.check { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; font-size: 14px; }
.check input { width: 19px; min-height: 19px; height: 19px; }
.check small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.rule { height: 1px; background: var(--line); margin: 24px 0; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bind-code { padding: 16px; margin-top: 16px; background: var(--teal-soft); border-radius: 8px; font-size: 13px; overflow-wrap: anywhere; }
.bind-code strong { display: block; font-size: 21px; letter-spacing: .08em; margin: 5px 0; }
.delivery-list { font-size: 12px; }
.delivery { padding: 12px 0; border-bottom: 1px solid var(--line); }
.delivery:last-child { border-bottom: 0; }
.delivery p { margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
td, th { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-weight: 500; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
.auth-layout { min-height: 100dvh; display: grid; grid-template-columns: minmax(300px, .95fr) minmax(400px, 1.05fr); }
.auth-story { padding: clamp(40px, 6vw, 100px); background: #174845; color: #e2f0ed; display: flex; flex-direction: column; justify-content: space-between; gap: 80px; }
.auth-story h1 { font-size: clamp(32px, 4.1vw, 54px); font-weight: 500; line-height: 1.5; letter-spacing: -.025em; }
.auth-story .intro { margin-top: 24px; font-size: 14px; line-height: 1.9; max-width: 29ch; color: #c4dcd6; }
.auth-feature { margin-top: 32px; padding: 18px 0; border-top: 1px solid #4d7770; font-size: 13px; display: flex; align-items: flex-start; gap: 13px; }
.auth-feature p { color: #c4dcd6; margin-top: 5px; font-size: 12px; }
.auth-footer { font-size: 12px; color: #bad4ce; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 50px 32px; }
.auth-form { width: 100%; max-width: 350px; }
.auth-form > p { margin: 11px 0 30px; color: var(--muted); font-size: 13px; }
.auth-form .button { width: 100%; margin-top: 4px; }
.auth-form .form-note { margin-top: 24px; font-size: 12px; }
.auth-mobile-brand { display: none; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 100; background: #183b3b; color: white; border-radius: 10px; padding: 13px 21px; box-shadow: 0 8px 28px #14312b26; max-width: min(560px, calc(100vw - 36px)); width: max-content; font-size: 13px; }
[hidden] { display: none !important; }
@media (min-width: 1700px) { main.content { padding-top: 48px; } }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 182px minmax(0, 1fr); }
  .sidebar { padding: 28px 13px; }
  .topbar { padding: 19px 27px; }
  main.content { padding: 30px 27px 50px; }
  .today-layout { grid-template-columns: minmax(0, 1fr); }
  .aside-stack { grid-template-columns: 1fr 1fr; align-items: start; }
  .settings-grid { gap: 20px; }
}
@media (max-width: 760px) {
  :root { font-size: 14px; }
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: 0; background: none; }
  .sidebar > .brand, .side-foot { display: none; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; margin: 0; background: #fff; border-top: 1px solid var(--line); flex-direction: row; gap: 0; padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); }
  .nav button { flex: 1; flex-direction: column; justify-content: center; gap: 2px; color: #577078; padding: 7px 3px; font-size: 10px; border-radius: 8px; position: relative; min-width: 0; }
  .nav button.active { color: var(--teal); background: #eaf4f1; }
  .nav button:hover { background: #eaf4f1; color: var(--teal-dark); }
  .nav button svg { width: 21px; height: 21px; }
  .nav .count { position: absolute; top: 1px; right: calc(50% - 23px); font-size: 9px; min-width: 15px; padding: 0 3px; }
  .topbar { padding: 16px 20px; align-items: center; }
  .topbar-title { font-size: 18px; letter-spacing: -.01em; }
  .top-actions { gap: 10px; justify-content: flex-end; }
  .topbar .sync-state { font-size: 10px; }
  .topbar .button { min-height: 35px; padding: 6px 9px; font-size: 11px; }
  .topbar .button svg { width: 15px; height: 15px; }
  main.content { padding: 25px 18px calc(105px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 23px; align-items: flex-start; gap: 12px; }
  .page-head p { font-size: 12px; margin-top: 8px; }
  h1 { font-size: 28px; }
  .date-label { font-size: 11px; padding-top: 5px; }
  .date-label strong { font-size: 14px; }
  .status-banner { padding: 13px 15px; align-items: flex-start; font-size: 12px; }
  .status-banner .button { font-size: 11px; padding: 5px 8px; min-height: 33px; flex-shrink: 0; }
  .today-layout { gap: 21px; }
  .panel-head { padding: 18px 19px; }
  .panel-body { padding: 21px 19px; }
  .day-picker { padding: 14px 12px 0; gap: 3px; }
  .day-picker button { padding: 8px 2px; }
  .schedule { padding: 0 18px 22px; }
  .course-row { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; padding-top: 23px; }
  .course-title h3 { font-size: 16px; }
  .course-meta { gap: 6px 13px; font-size: 12px; }
  .course-time { font-size: 14px; }
  .course-time span { font-size: 10px; }
  .course-title { gap: 6px; }
  .tag { font-size: 10px; padding: 2px 6px; }
  .aside-stack { grid-template-columns: 1fr; gap: 21px; }
  .aside-stack > .panel:last-child { display: none; }
  .notice-teaser { padding: 16px 19px; }
  .notice-item { padding: 0 18px; }
  .notice-item summary { gap: 10px; padding: 19px 0; }
  .notice-item summary strong { font-size: 14px; }
  .notice-item summary time { font-size: 10px; }
  .notice-detail { font-size: 13px; }
  .settings-grid { grid-template-columns: 1fr; gap: 21px; }
  .settings-stack { gap: 21px; }
  .week-toolbar { margin-bottom: 18px; }
  .page-head:has(.week-toolbar) { display: block; }
  .page-head .week-toolbar { margin-top: 20px; }
  .week-board { min-width: 805px; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .auth-layout { display: block; }
  .auth-story { display: none; }
  .auth-main { padding: 45px 25px; min-height: 100dvh; }
  .auth-mobile-brand { display: flex; color: var(--teal-dark); margin-bottom: 44px; }
  .auth-form h2 { font-size: 25px; }
  .auth-form > p { margin-bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
