:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-quiet: #edf1f7;
  --ink: #16213b;
  --muted: #657086;
  --line: #d8deea;
  --brand: #001e62;
  --brand-deep: #001545;
  --brand-action: #001e62;
  --brand-panel: #001e62;
  --brand-soft: #e8edf8;
  --teal: #176b60;
  --teal-soft: #e5f2ef;
  --amber: #755d00;
  --amber-soft: #fff7cf;
  --blue: #315da8;
  --blue-soft: #e9effa;
  --red: #c63527;
  --red-soft: #f9e9e6;
  --yellow: #f1c400;
  --yellow-ink: #5f4c00;
  --yellow-soft: #fff7c9;
  --topbar: rgba(244, 246, 250, 0.96);
  --shadow: 0 12px 28px rgba(0, 30, 98, 0.08);
  --radius: 8px;
  font-family: "Hiragino Sans", "Yu Gothic", "YuGothic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.dark {
  color-scheme: dark;
  --bg: #0f1420;
  --surface: #171d2b;
  --surface-quiet: #222b3c;
  --ink: #f4f6fb;
  --muted: #a8b1c3;
  --line: #364158;
  --brand: #9bb4ef;
  --brand-deep: #c5d2f5;
  --brand-action: #2854a5;
  --brand-panel: #0d2e75;
  --brand-soft: #202d4e;
  --teal: #70c5b8;
  --teal-soft: #173c38;
  --amber: #f4d35e;
  --amber-soft: #3d3515;
  --blue: #9bb4ef;
  --blue-soft: #1d3156;
  --red: #ed7a6f;
  --red-soft: #432722;
  --yellow: #f1c400;
  --yellow-ink: #f6d84b;
  --yellow-soft: #3b3414;
  --topbar: rgba(15, 20, 32, 0.96);
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: 32px; line-height: 1.18; }
h2 { margin-bottom: 8px; font-size: 19px; line-height: 1.35; }
h3 { margin-bottom: 4px; font-size: 15px; line-height: 1.45; }
p { line-height: 1.65; }

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 228px minmax(0, 1fr);
  grid-template-rows: 68px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 4;
  grid-row: 1 / -1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.sidebar::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--yellow) 0 33.33%, #001e62 33.33% 66.66%, #c63527 66.66% 100%);
  content: "";
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 24px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--brand-panel);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.brand-mark::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--yellow) 0 33.33%, #ffffff 33.33% 66.66%, #c63527 66.66% 100%);
  content: "";
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; line-height: 1.1; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.app-nav { display: grid; gap: 4px; }

.nav-button {
  width: 100%;
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-button:hover { background: var(--surface-quiet); color: var(--ink); }
.nav-button[aria-current="page"] { border-color: #c9d4ed; background: var(--brand-soft); color: var(--brand-deep); box-shadow: inset 3px 0 0 var(--brand-action); font-weight: 750; }
body.dark .nav-button[aria-current="page"] { border-color: var(--line); }

.nav-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.sidebar-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 10px 8px;
  color: var(--muted);
  font-size: 11px;
}

.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: var(--topbar);
  backdrop-filter: blur(10px);
}

.topbar-context { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.campus-label { padding: 0; border: 0; background: transparent; color: var(--brand); font-weight: 800; }
.campus-label:hover { text-decoration: underline; }

.theme-button, .dismiss-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.theme-button { width: 34px; height: 34px; border-radius: 50%; font-size: 17px; }
.theme-button:hover { border-color: var(--brand); color: var(--brand); }

.workspace {
  grid-column: 2;
  width: 100%;
  max-width: 1440px;
  padding: 38px 42px 56px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 27px;
}

.today-header { margin-bottom: 22px; }
.eyebrow, .panel-kicker { margin-bottom: 7px; color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; }
.subcopy { max-width: 660px; margin-bottom: 0; color: var(--muted); font-size: 14px; }

.header-stat {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr);
  gap: 7px;
  align-items: baseline;
  padding: 10px 0 10px 14px;
  border-left: 3px solid var(--red);
}

.header-stat strong { color: var(--red); font-size: 26px; line-height: 1; }
.header-stat span { color: var(--muted); font-size: 12px; }

.attention-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  margin: 0 0 18px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: var(--surface);
}

.attention-strip.warning { border-left-color: var(--amber); }
.attention-kind { color: var(--blue); font-size: 12px; font-weight: 800; }
.attention-strip.warning .attention-kind { color: var(--amber); }
.attention-strip p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.attention-actions { display: flex; align-items: center; gap: 12px; }

.source-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: -8px 0 18px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.source-strip > span:first-child { color: var(--red); font-weight: 800; }
.source-strip > span:last-child { color: var(--brand); font-weight: 800; white-space: nowrap; }
.source-strip p { margin: 0; line-height: 1.45; }

.text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.text-action:hover { color: var(--brand-deep); text-decoration: underline; }
.dismiss-button { width: 26px; height: 26px; border-radius: 50%; color: var(--muted); font-weight: 700; }
.dismiss-button:hover { color: var(--red); border-color: var(--red); }

.decision-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(310px, 1.25fr) minmax(220px, 0.8fr);
  gap: 14px;
  margin-bottom: 36px;
}

.action-path {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(250px, 0.85fr) minmax(220px, 0.7fr);
  gap: 14px;
  margin-bottom: 16px;
}

.now-panel {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  align-items: flex-start;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 4px solid var(--red);
  background: var(--surface);
}

.now-panel .split-header { width: 100%; margin-bottom: 12px; }
.now-panel h2 { max-width: 480px; margin-bottom: 9px; font-size: 22px; }
.now-panel > p { margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.now-panel small { margin-top: 7px; color: var(--muted); font-size: 11px; }
.now-panel .primary-button { margin-top: auto; }
.location-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 800; }
.progress-line { width: 100%; height: 7px; overflow: hidden; border-radius: 99px; background: var(--surface-quiet); }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: var(--red); transition: width 0.18s ease; }

.next-class-panel, .focus-panel, .place-panel {
  min-height: 250px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.next-class-panel { display: flex; flex-direction: column; justify-content: space-between; background: var(--brand-panel); border-color: var(--brand-panel); color: #fff; }
.next-class-panel .panel-kicker { color: #f1c400; }
.next-course-period { display: block; margin-bottom: 13px; color: #dce5fa; font-size: 13px; font-weight: 750; }
.next-course-main h2 { margin-bottom: 6px; font-size: 23px; }
.next-course-main p { margin-bottom: 0; color: #dce5fa; font-size: 14px; }
.course-brief { display: flex; flex-wrap: wrap; gap: 8px 12px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.28); color: #dce5fa; font-size: 12px; }
.course-brief strong { width: 100%; color: #fff; }

.focus-panel { display: flex; flex-direction: column; align-items: flex-start; background: var(--surface); }
.focus-panel .split-header { width: 100%; margin-bottom: 5px; }
.focus-panel h2 { font-size: 21px; }
.focus-panel > p:not(.panel-kicker) { margin: 10px 0 16px; color: var(--muted); font-size: 13px; }
.focus-meta { margin: 0; color: var(--teal); font-size: 12px; font-weight: 750; }

.place-panel { display: flex; flex-direction: column; align-items: flex-start; background: var(--yellow-soft); border-color: #eadb7a; }
body.dark .place-panel { border-color: #756814; }
.place-panel strong { color: var(--brand); font-size: 31px; line-height: 1; }
.place-panel h2 { margin: 9px 0 7px; font-size: 18px; }
.place-panel p:not(.panel-kicker) { margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.place-panel .ghost-button { margin-top: auto; }

.plan-sequence {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 36px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.plan-sequence > div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 9px; padding: 13px 12px; border-right: 1px solid var(--line); }
.plan-sequence > div:last-child { border-right: 0; }
.plan-sequence span { color: var(--brand); font-size: 11px; font-weight: 800; }
.plan-sequence > div:first-child span { color: var(--red); }
.plan-sequence > div:last-child span { color: var(--yellow-ink); }
.plan-sequence p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.plan-sequence strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 12px; }

.primary-button, .ghost-button {
  min-height: 39px;
  padding: 0 13px;
  border-radius: 7px;
  font-weight: 750;
}

.primary-button { border: 1px solid var(--brand-action); background: var(--brand-action); color: #fff; }
.primary-button:hover { filter: brightness(1.18); }
.ghost-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.ghost-button:hover { border-color: var(--brand); color: var(--brand); }
.due-chip { display: inline-flex; align-items: center; min-height: 25px; padding: 0 8px; border-radius: 99px; background: var(--amber-soft); color: var(--amber); font-size: 11px; font-weight: 800; }

.weekly-plan { margin-bottom: 36px; }
.week-course-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.week-course-strip article { min-width: 0; display: grid; gap: 6px; padding: 14px 12px; border-right: 1px solid var(--line); }
.week-course-strip article:first-child { border-left: 1px solid var(--line); }
.week-course-strip article.today-course { background: var(--brand-soft); box-shadow: inset 0 3px 0 var(--brand); }
.week-course-strip span { color: var(--brand); font-size: 11px; font-weight: 800; }
.week-course-strip strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.week-course-strip small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr); gap: 38px; }
.section-block { min-width: 0; }
.section-heading, .split-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-heading { margin-bottom: 14px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading .eyebrow { margin-bottom: 4px; }
.quiet-label { color: var(--muted); font-size: 12px; white-space: nowrap; }

.due-map { border-top: 1px solid var(--line); }
.due-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 108px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.due-row:hover { background: var(--surface-quiet); }
.due-date { color: var(--brand); font-size: 13px; font-weight: 800; }
.due-course { color: var(--muted); font-size: 12px; }
.due-row strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.status-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-todo { background: var(--red-soft); color: var(--red); }
.status-draft { background: var(--amber-soft); color: var(--amber); }
.status-done { background: var(--teal-soft); color: var(--teal); }

.feed-list { border-top: 1px solid var(--line); }
.feed-item { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 9px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.feed-item > span { color: var(--blue); font-size: 11px; font-weight: 800; }
.feed-item strong { font-size: 13px; }
.feed-item p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.task-summary { display: flex; gap: 16px; padding-bottom: 5px; color: var(--muted); font-size: 12px; }
.task-summary span { display: grid; gap: 3px; }
.task-summary strong { color: var(--ink); font-size: 21px; line-height: 1; }

.task-toolbar, .place-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  margin-bottom: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.segmented { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.segmented button { min-height: 31px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 12px; }
.segmented button:hover { color: var(--ink); background: var(--surface-quiet); }
.segmented button.active { background: var(--brand-action); color: #fff; font-weight: 750; }

.inline-search { display: flex; min-width: 260px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.inline-search input, .resource-search input { width: 100%; min-height: 37px; border: 0; background: transparent; color: var(--ink); padding: 0 11px; outline: none; }
.search-button { min-width: 54px; border: 0; border-left: 1px solid var(--line); background: var(--brand-action); color: #fff; font-size: 12px; font-weight: 800; }
.search-button:hover { filter: brightness(1.18); }

.task-workspace { display: grid; grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr); align-items: start; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.task-list { display: grid; border-right: 1px solid var(--line); }
.task-list-item { width: 100%; display: grid; grid-template-columns: 11px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 15px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.task-list-item:last-child { border-bottom: 0; }
.task-list-item:hover { background: var(--surface-quiet); }
.task-list-item.selected { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.task-status-dot { width: 9px; height: 9px; border-radius: 50%; }
.task-status-dot.status-todo { background: var(--red); }
.task-status-dot.status-draft { background: var(--amber); }
.task-status-dot.status-done { background: var(--teal); }
.task-list-copy { min-width: 0; display: grid; gap: 3px; }
.task-list-copy small, .task-list-copy em { overflow: hidden; color: var(--muted); font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.task-list-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.task-list-arrow { color: var(--muted); font-size: 17px; }

.task-detail { padding: 24px; }
.task-detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.task-detail-top h2 { max-width: 580px; margin: 8px 0 0; font-size: 23px; }
.course-label { color: var(--brand); font-size: 12px; font-weight: 800; }
.task-facts { display: flex; flex-wrap: wrap; gap: 7px 13px; margin: 12px 0 17px; color: var(--muted); font-size: 12px; }
.task-preview { margin-bottom: 13px; font-size: 14px; }
.rubric-row, .feature-list { display: flex; flex-wrap: wrap; gap: 6px; }
.rubric-row span, .feature-list span { display: inline-flex; min-height: 25px; align-items: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 11px; }

.next-step { margin-top: 22px; padding: 16px; border-left: 3px solid var(--teal); background: var(--teal-soft); }
.next-step .panel-kicker { margin-bottom: 8px; color: var(--teal); }
.next-step ol { display: grid; gap: 6px; margin: 0; padding-left: 20px; font-size: 13px; }
.task-actions, .template-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.submission-checklist { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.submission-checklist h3 { margin-bottom: 0; }
.submission-checklist > .split-header > strong { color: var(--teal); font-size: 20px; line-height: 1; }
.submission-checklist > p { margin: 7px 0 12px; color: var(--muted); font-size: 12px; }
.check-list { display: grid; gap: 6px; }
.check-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: center; min-height: 39px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); text-align: left; font-size: 12px; }
.check-row:hover { border-color: var(--teal); }
.check-row > span:first-child { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 4px; color: #fff; font-size: 9px; font-weight: 800; }
.check-row.checked { border-color: var(--teal); background: var(--teal-soft); }
.check-row.checked > span:first-child { border-color: var(--teal); background: var(--teal); }

.submission-tools { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.submission-tools h3 { margin-bottom: 0; }
.submission-tools code { max-width: 240px; overflow: hidden; color: var(--blue); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.report-output { max-height: 230px; margin: 14px 0 0; padding: 13px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-quiet); color: var(--ink); font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; white-space: pre-wrap; }

.availability-label { display: inline-flex; align-items: center; gap: 7px; color: var(--teal); font-size: 12px; font-weight: 800; }
.availability-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.location-switch { padding: 0; border: 0; background: transparent; }
.location-switch:hover { color: var(--brand); }
.intent-control { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.intent-control p { margin: 0 6px 0 0; color: var(--muted); font-size: 12px; }
.intent-button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 12px; }
.intent-button:hover { color: var(--ink); border-color: var(--teal); }
.intent-button.active { border-color: var(--teal); background: var(--teal); color: #fff; font-weight: 750; }
.results-context { margin: -4px 0 18px; color: var(--muted); font-size: 12px; }

.place-workspace { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr); align-items: start; gap: 30px; }
.room-results { display: grid; gap: 8px; }
.room-result { width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: left; }
.room-result:hover, .room-result.selected { border-color: var(--teal); }
.room-result.selected { box-shadow: inset 3px 0 0 var(--teal); }
.room-result-top { display: flex; justify-content: space-between; gap: 12px; }
.availability { display: inline-flex; margin-bottom: 7px; font-size: 11px; font-weight: 800; }
.availability.open { color: var(--teal); }
.availability.closed { color: var(--red); }
.room-result h2 { margin-bottom: 3px; font-size: 17px; }
.room-result p { margin: 0; color: var(--muted); font-size: 12px; }
.room-result-top > strong { color: var(--teal); font-size: 25px; line-height: 1; }
.room-result-top > strong small { font-size: 11px; }
.room-result > p { margin: 11px 0; }
.room-feature-line { color: var(--blue); font-size: 11px; font-weight: 750; word-spacing: 6px; }

.place-detail { position: sticky; top: 90px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.place-detail h2 { margin-bottom: 3px; font-size: 23px; }
.place-location { margin: 0; color: var(--muted); font-size: 12px; }
.route-number { display: flex; align-items: baseline; gap: 8px; margin: 18px 0; }
.route-number strong { color: var(--brand); font-size: 36px; line-height: 1; }
.route-number span { color: var(--muted); font-size: 12px; }
.campus-map { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-quiet); }
.place-note { margin: 15px 0; color: var(--muted); font-size: 13px; }
.place-detail .feature-list { margin-bottom: 17px; }
.route-fit { display: grid; gap: 4px; margin: 0 0 15px; padding: 10px; border-left: 3px solid var(--teal); background: var(--teal-soft); color: var(--muted); font-size: 12px; line-height: 1.45; }
.route-fit strong { color: var(--teal); font-size: 11px; }

.life-tabs { display: flex; gap: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.life-tabs button { min-height: 39px; padding: 0 2px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 13px; }
.life-tabs button:hover { color: var(--ink); }
.life-tabs button.active { border-color: var(--brand); color: var(--brand); font-weight: 800; }

.life-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 0.85fr); gap: 46px; }
.life-workspace h2, .resource-workspace h2 { font-size: 23px; }
.split-form { display: grid; gap: 12px; margin: 20px 0 18px; }
.split-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.split-form input { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.split-result { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.split-result table { width: 100%; border-collapse: collapse; font-size: 13px; }
.split-result th, .split-result td { padding: 12px 3px; border-bottom: 1px solid var(--line); text-align: left; }
.split-result th { color: var(--muted); font-size: 11px; }
.split-result td:last-child, .split-result th:last-child { text-align: right; }

.resource-workspace { display: grid; grid-template-columns: minmax(270px, 0.8fr) minmax(0, 1.2fr); gap: 26px 44px; }
.resource-search { display: flex; align-self: end; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); overflow: hidden; }
.resource-search .primary-button { border-radius: 0; white-space: nowrap; }
.resource-list { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.resource-list article { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.resource-list article > span { color: var(--blue); font-size: 11px; font-weight: 800; }
.resource-list h3 { margin-bottom: 2px; font-size: 14px; }
.resource-list p { margin: 0; color: var(--muted); font-size: 12px; }

.services-workspace { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr); gap: 42px; }
.service-list { border-top: 1px solid var(--line); }
.service-list a { display: grid; grid-template-columns: 45px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.service-list a:hover h2 { color: var(--brand); }
.service-index { color: var(--brand); font-size: 12px; font-weight: 800; }
.service-list h2 { margin: 0 0 4px; font-size: 18px; }
.service-list p { margin: 0; color: var(--muted); font-size: 12px; }
.service-arrow { color: var(--brand); font-size: 21px; }
.service-note { align-self: start; padding: 22px; border-left: 4px solid var(--brand); background: var(--brand-soft); }
.service-note h2 { margin: 8px 0; }
.service-note p:not(.panel-kicker) { margin-bottom: 0; color: var(--muted); font-size: 13px; }

.reset-button { margin-top: 26px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; text-decoration: underline; }
.reset-button:hover { color: var(--red); }

.empty-state { margin: 0; padding: 25px 0; color: var(--muted); font-size: 13px; }
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(360px, calc(100vw - 48px)); padding: 11px 14px; border-radius: 7px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow); font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 0.18s ease, transform 0.18s ease; }
.toast-region.show { opacity: 1; transform: translateY(0); }
.mobile-nav { display: none; }

@media (max-width: 1040px) {
  .workspace { padding: 30px; }
  .decision-grid { grid-template-columns: 1fr 1.2fr; }
  .action-path { grid-template-columns: 1.1fr 0.9fr; }
  .action-path .place-panel { grid-column: 1 / -1; min-height: 160px; }
  .place-panel { grid-column: 1 / -1; min-height: 160px; }
  .task-workspace { grid-template-columns: 320px minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { height: 58px; padding: 0 20px; }
  .workspace { padding: 27px 20px 94px; }
  h1 { font-size: 27px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .header-stat { padding-left: 10px; }
  .decision-grid, .action-path, .content-grid, .place-workspace, .life-workspace, .services-workspace, .resource-workspace { grid-template-columns: 1fr; }
  .next-class-panel, .focus-panel, .place-panel { min-height: 0; }
  .action-path .place-panel { grid-column: auto; }
  .content-grid { gap: 30px; }
  .week-course-strip { overflow-x: auto; grid-template-columns: repeat(6, minmax(145px, 1fr)); }
  .task-toolbar, .place-controls { align-items: stretch; flex-direction: column; }
  .inline-search { min-width: 0; }
  .task-workspace { grid-template-columns: 1fr; }
  .task-list { border-right: 0; border-bottom: 1px solid var(--line); }
  .place-detail { position: static; }
  .resource-search { grid-row: 2; }
  .plan-sequence { grid-template-columns: 1fr; }
  .plan-sequence > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .plan-sequence > div:last-child { border-bottom: 0; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 6px max(6px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -8px 20px rgba(20, 35, 30, 0.08); }
  .mobile-nav-button { display: grid; place-items: center; gap: 2px; min-height: 46px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
  .mobile-nav-button > span { font-size: 13px; font-weight: 800; }
  .mobile-nav-button small { font-size: 10px; }
  .mobile-nav-button[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 800; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 14px; }
  .topbar-context { font-size: 12px; }
  .workspace { padding: 23px 14px 90px; }
  h1 { font-size: 25px; }
  .attention-strip { grid-template-columns: 1fr auto; }
  .attention-strip > div:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .attention-kind { grid-column: 1; }
  .attention-actions { grid-column: 2; grid-row: 1; }
  .decision-grid { grid-template-columns: 1fr; }
  .source-strip { grid-template-columns: 1fr auto; gap: 5px 12px; }
  .source-strip p { grid-column: 1 / -1; grid-row: 2; }
  .due-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .due-course { display: none; }
  .task-summary { width: 100%; justify-content: space-between; }
  .task-detail { padding: 18px; }
  .task-detail-top h2 { font-size: 20px; }
  .task-detail-top { flex-direction: column; }
  .submission-tools code { max-width: 170px; }
  .intent-control { align-items: stretch; }
  .intent-control p { width: 100%; }
  .intent-button { flex: 1 1 30%; min-height: 44px; }
  .campus-filter { width: 100%; }
  .campus-filter button { flex: 1; }
  .place-detail { padding: 18px; }
  .life-tabs { justify-content: space-between; gap: 8px; }
  .life-tabs button { font-size: 12px; }
  .resource-list article { grid-template-columns: auto minmax(0, 1fr); }
  .service-list a { grid-template-columns: 35px minmax(0, 1fr) auto; }
}
