:root {
  color-scheme: light;
  --ink: #20303a;
  --muted: #526973;
  --line: rgba(32, 48, 58, 0.22);
  --paper: #73b8d7;
  --panel: #fff8e7;
  --panel-soft: #e8f5f7;
  --sidebar: #fff0cf;
  --sidebar-muted: #5b7077;
  --accent: #ff6847;
  --accent-strong: #b8442e;
  --accent-soft: #fff0dc;
  --amber: #b36f23;
  --teal: #287f91;
  --green: #5e7444;
  --blue: #3f94bd;
  --sky: #57a8d1;
  --cloud: #fff9ea;
  --sand: #f3d4aa;
  --shadow: 0 18px 46px rgba(32, 48, 58, 0.14);
  --shadow-soft: 0 10px 24px rgba(32, 48, 58, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Trebuchet MS", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Aptos, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at -8% 46%, rgba(255, 104, 71, 0.95) 0 9.5rem, transparent 9.7rem),
    radial-gradient(ellipse at 88% 7%, rgba(255, 249, 234, 0.86) 0 8rem, transparent 8.2rem),
    radial-gradient(ellipse at 12% 30%, rgba(255, 249, 234, 0.7) 0 4.8rem, transparent 5rem),
    linear-gradient(180deg, #4f9fc9 0%, #75bdd9 52%, #d8edf0 100%);
  background-attachment: fixed;
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 16%, rgba(255, 249, 234, 0.84) 0 3.2rem, transparent 3.35rem),
    radial-gradient(ellipse at 36% 17%, rgba(255, 249, 234, 0.78) 0 2rem, transparent 2.15rem),
    radial-gradient(ellipse at 72% 24%, rgba(255, 249, 234, 0.72) 0 2.6rem, transparent 2.75rem),
    radial-gradient(ellipse at 77% 25%, rgba(255, 249, 234, 0.66) 0 1.7rem, transparent 1.85rem),
    linear-gradient(180deg, transparent 0%, rgba(255, 248, 231, 0.26) 100%);
}

button,
select,
input,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button,
a,
input,
select,
textarea {
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

button:active,
.card-actions a:active,
.assist-actions a:active {
  transform: translateY(1px);
}

:focus-visible {
  outline: 3px solid rgba(255, 104, 71, 0.34);
  outline-offset: 2px;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "main";
  min-height: 100vh;
}

.filter-backdrop {
  display: none;
}

.panel {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 0;
  margin: 0;
  background: var(--sidebar);
  border: 0 solid rgba(32, 48, 58, 0);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--ink);
  box-shadow: none;
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  overflow: hidden;
  transition:
    max-height 220ms ease,
    padding 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.app-shell.filters-open .panel {
  max-height: 78vh;
  margin-top: 14px;
  padding: 18px;
  border-width: 1px;
  border-color: rgba(32, 48, 58, 0.22);
  box-shadow: var(--shadow-soft);
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  overflow: auto;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  position: static;
  height: auto;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(32, 48, 58, 0.24) transparent;
}

.brand {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(32, 48, 58, 0.18);
}

.brand h1 {
  max-width: 56ch;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.4;
}

.filter-close {
  margin-left: auto;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(32, 48, 58, 0.22);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--accent-strong);
  font-weight: 850;
  white-space: nowrap;
}

.filter-close:hover {
  border-color: rgba(255, 104, 71, 0.45);
  background: #fff9ea;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid rgba(32, 48, 58, 0.78);
  border-radius: 50%;
  background:
    linear-gradient(180deg, #ffd682 0 35%, #ff8d5d 36% 68%, #f6f1d5 69% 100%);
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(32, 48, 58, 0.14);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.panel .eyebrow {
  color: var(--accent-strong);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.control-group {
  display: grid;
  gap: 9px;
}

.control-group > label,
.range-row label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 760;
}

select,
input[type="search"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--ink);
}

.panel select,
.panel input[type="search"] {
  border-color: rgba(32, 48, 58, 0.24);
  background: rgba(255, 252, 240, 0.9);
}

select,
input[type="search"] {
  min-height: 42px;
  padding: 0 12px;
}

input[type="search"]::placeholder {
  color: #7c8990;
}

.wide-action {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(32, 48, 58, 0.25);
  border-radius: 8px;
  background: rgba(255, 252, 240, 0.66);
  color: var(--ink);
  font-weight: 850;
}

.wide-action:hover {
  border-color: rgba(255, 104, 71, 0.5);
  background: #fff9ea;
}

.primary-apply {
  min-height: 44px;
  border: 2px solid rgba(32, 48, 58, 0.78);
  border-radius: 8px;
  background: var(--accent);
  color: #fff9ea;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(150, 60, 35, 0.25);
}

.primary-apply:hover {
  background: var(--accent-strong);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.segmented,
.day-grid {
  display: grid;
  gap: 8px;
}

.segmented {
  grid-template-columns: repeat(2, 1fr);
}

.day-grid {
  grid-template-columns: repeat(7, 1fr);
}

.segmented button,
.day-grid button,
.actions button,
.section-head button,
.dialog-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--ink);
  font-weight: 720;
}

.panel .segmented button,
.panel .day-grid button {
  border-color: rgba(32, 48, 58, 0.22);
  background: rgba(255, 252, 240, 0.6);
  color: var(--ink);
}

.segmented button.active,
.day-grid button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.panel .segmented button.active,
.panel .day-grid button.active {
  border-color: rgba(32, 48, 58, 0.55);
  background: #fff9ea;
  color: var(--accent-strong);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}

.checkbox-grid label,
.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sidebar-muted);
  font-size: 0.92rem;
}

.toggle input,
.checkbox-grid input {
  accent-color: var(--accent);
}

.compact {
  gap: 12px;
}

.range-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.source-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(32, 48, 58, 0.2);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.72);
}

.source-box h2 {
  color: var(--ink);
  font-size: 1rem;
}

.source-box a {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--accent-strong);
  font-weight: 760;
}

.source-box a:hover {
  background: #fff9ea;
}

.source-box p {
  margin: 0;
  color: var(--sidebar-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 30px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 16px;
  min-height: 186px;
  padding: 28px;
  border: 2px solid rgba(32, 48, 58, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 248, 231, 0.94), rgba(255, 248, 231, 0.78) 52%, rgba(110, 184, 214, 0.5)),
    url("./assets/sky-coast-reference.jpg") center 38% / cover;
  box-shadow: 0 20px 42px rgba(32, 48, 58, 0.16);
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 16px;
  width: 94px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 28% 56%, var(--cloud) 0 24px, transparent 25px),
    radial-gradient(ellipse at 58% 42%, var(--cloud) 0 31px, transparent 32px),
    radial-gradient(ellipse at 82% 60%, var(--cloud) 0 21px, transparent 22px);
  filter: drop-shadow(0 2px 0 rgba(32, 48, 58, 0.28));
  opacity: 0.9;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar h2 {
  max-width: 820px;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.summary-card {
  min-width: 132px;
  display: grid;
  place-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(32, 48, 58, 0.24);
  border-radius: 8px;
  background: rgba(255, 252, 240, 0.88);
  box-shadow: 0 8px 18px rgba(32, 48, 58, 0.08);
}

.summary-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.summary-action {
  min-width: 104px;
  padding: 0 14px;
  border: 1px solid rgba(32, 48, 58, 0.24);
  border-radius: 8px;
  background: rgba(255, 252, 240, 0.9);
  color: var(--accent-strong);
  font-weight: 850;
}

.summary-action:hover {
  border-color: rgba(255, 104, 71, 0.5);
  background: var(--accent-soft);
}

.top-language-switch {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-width: 94px;
}

.top-language-switch button {
  min-height: 34px;
  border: 1px solid rgba(32, 48, 58, 0.24);
  border-radius: 8px;
  background: rgba(255, 252, 240, 0.9);
  color: var(--ink);
  font-weight: 850;
}

.top-language-switch button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff9ea;
}

.summary-card span {
  display: block;
  color: var(--accent-strong);
  font-size: 2rem;
  font-weight: 850;
}

.summary-card p {
  margin: 0;
  color: var(--muted);
}

.quick-start {
  order: 1;
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border: 2px solid rgba(32, 48, 58, 0.44);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 231, 0.96), rgba(232, 245, 247, 0.92));
  box-shadow: var(--shadow-soft);
}

.quick-start-copy {
  display: grid;
  gap: 8px;
  max-width: 850px;
}

.quick-start-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
}

.quick-start-copy p {
  max-width: 68ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
}

.quick-start-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-start-grid label,
.starter-completed {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 850;
}

.quick-start-grid select,
.starter-completed input {
  min-height: 46px;
  border-color: rgba(32, 48, 58, 0.24);
  background: #fffdf7;
}

.starter-completed {
  padding: 14px;
  border: 1px solid rgba(32, 48, 58, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 240, 0.7);
}

.starter-completed small,
.quick-start-result small {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

.quick-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.quick-start-actions .primary-apply {
  width: min(100%, 220px);
}

.quiet-action {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(32, 48, 58, 0.22);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--ink);
  font-weight: 850;
}

.quiet-action:hover {
  border-color: rgba(255, 104, 71, 0.45);
  background: #fff9ea;
}

.quick-start-result {
  display: grid;
  gap: 6px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid rgba(40, 127, 145, 0.22);
  border-radius: 8px;
  background: rgba(232, 245, 247, 0.8);
}

.quick-start-result:empty {
  display: none;
}

.quick-start-result strong {
  color: var(--teal);
}

.quick-start-result span {
  color: var(--ink);
  font-weight: 750;
}

.story-guide {
  order: 1;
  margin: -2px 0 18px;
  border: 1px solid rgba(32, 48, 58, 0.2);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 8px 18px rgba(32, 48, 58, 0.07);
  overflow: hidden;
}

.story-guide summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
  list-style: none;
}

.story-guide summary::-webkit-details-marker {
  display: none;
}

.story-guide summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid rgba(32, 48, 58, 0.22);
  border-radius: 8px;
  background: #e8f5f7;
  color: var(--teal);
}

.story-guide[open] summary::after {
  content: "-";
}

.story-guide summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.35;
}

.story-guide-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 16px;
  padding: 0 16px 16px;
}

.story-block {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(32, 48, 58, 0.14);
  border-radius: 8px;
  background: rgba(232, 245, 247, 0.52);
}

.story-block h3 {
  margin: 0;
  font-size: 1rem;
}

.story-block p,
.story-block li {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.58;
}

.story-block p,
.story-block ol {
  margin: 0;
}

.story-block ol {
  display: grid;
  gap: 6px;
  padding-left: 20px;
}

.advanced-directory {
  order: 3;
  margin-top: 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(32, 48, 58, 0.24);
  border-radius: 8px;
  background: rgba(255, 248, 231, 0.88);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.advanced-directory summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
  list-style: none;
}

.advanced-directory summary::-webkit-details-marker {
  display: none;
}

.advanced-directory summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid rgba(32, 48, 58, 0.24);
  border-radius: 8px;
  color: var(--accent-strong);
  background: #fff9ea;
}

.advanced-directory[open] summary::after {
  content: "-";
}

.advanced-directory summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.35;
}

.advanced-content {
  display: grid;
  gap: 18px;
  padding: 0 16px 16px;
}

.advanced-actions {
  display: flex;
  justify-content: flex-end;
}

.advanced-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(32, 48, 58, 0.24);
  border-radius: 8px;
  background: #fff9ea;
  color: var(--ink);
  font-weight: 750;
}

.advanced-actions button:hover {
  border-color: rgba(255, 104, 71, 0.5);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.assist-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(32, 48, 58, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 231, 0.96), rgba(231, 245, 247, 0.92)),
    var(--panel);
  box-shadow: var(--shadow-soft);
}

.assist-copy h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
}

.assist-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.assist-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.assist-controls label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.assist-controls input,
.assist-controls select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(32, 48, 58, 0.22);
  border-radius: 8px;
  background: #fffdf7;
  padding: 0 10px;
}

.assist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assist-actions a,
.assist-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-weight: 850;
}

.assist-actions a {
  background: var(--accent);
  color: #fff9ea;
}

.assist-actions button {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.assist-actions a:hover {
  background: var(--accent-strong);
}

.assist-actions button:hover {
  background: #fff9ea;
  box-shadow: inset 0 0 0 1px rgba(255, 104, 71, 0.16);
}

.assist-status,
.assist-preview {
  display: grid;
  gap: 8px;
}

.audit-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.audit-card {
  background: rgba(255, 248, 231, 0.94);
  border: 1px solid rgba(32, 48, 58, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.section-head.flush {
  padding: 14px 16px;
}

.audit-overview,
.gap-list,
.current-list {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
}

.audit-overview div,
.current-item {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid rgba(32, 48, 58, 0.18);
  border-radius: 8px;
  background: #fffdf7;
}

.audit-overview strong,
.current-item strong {
  color: var(--ink);
}

.audit-overview span,
.current-item span,
.current-item small {
  color: var(--muted);
  line-height: 1.4;
}

.gap-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-item {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 11px;
  border: 1px solid rgba(32, 48, 58, 0.18);
  border-radius: 8px;
  background: #fffdf7;
  text-align: left;
}

.gap-item:hover {
  border-color: rgba(255, 104, 71, 0.5);
  box-shadow: var(--shadow-soft);
}

.gap-item span {
  font-weight: 780;
  color: var(--ink);
  line-height: 1.25;
}

.gap-item strong {
  color: var(--muted);
  font-size: 0.8rem;
}

.gap-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.workspace {
  order: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.recommendations,
.schedule-panel {
  background: rgba(255, 248, 231, 0.94);
  border: 1px solid rgba(32, 48, 58, 0.24);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.schedule-panel {
  order: -1;
  z-index: 4;
  overflow: hidden;
}

.schedule-panel .section-head {
  display: flex;
  align-items: center;
}

.schedule-panel .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.schedule-panel .actions button {
  min-height: 34px;
  padding: 0 8px;
  white-space: nowrap;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(32, 48, 58, 0.18);
  background:
    linear-gradient(90deg, rgba(232, 245, 247, 0.9), rgba(255, 248, 231, 0.86));
}

.actions {
  display: flex;
  gap: 8px;
}

.actions button,
.section-head button {
  padding: 0 12px;
}

.course-list {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.course-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(32, 48, 58, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.98), rgba(255, 248, 231, 0.95));
  box-shadow: 0 8px 18px rgba(32, 48, 58, 0.08);
}

.course-card:hover {
  border-color: rgba(255, 104, 71, 0.55);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.course-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.course-title h4 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.28;
  letter-spacing: -0.02em;
}

.instructor-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 104, 71, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 240, 220, 0.98), rgba(255, 250, 234, 0.9));
}

.instructor-line span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.instructor-line strong {
  color: var(--accent-strong);
  font-size: 1.28rem;
  font-weight: 900;
}

.instructor-line em {
  color: var(--ink);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7f5f7;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.best {
  background: #ffe4bc;
  color: var(--amber);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.score-box {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  align-self: start;
  border-radius: 8px;
  border: 1px solid rgba(32, 48, 58, 0.16);
  background:
    radial-gradient(circle at 50% 18%, #ffd889 0 17px, transparent 18px),
    linear-gradient(180deg, #ffe6c3, #fff5df);
  color: var(--accent-strong);
}

.score-box strong {
  font-size: 1.55rem;
}

.reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.professor-summary {
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(32, 48, 58, 0.14);
  border-radius: 8px;
  background: rgba(232, 245, 247, 0.72);
}

.professor-summary strong {
  font-size: 0.9rem;
}

.professor-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.summary-grid span {
  display: block;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #fffdf7;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.38;
}

.summary-grid b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.78rem;
}

.reason {
  padding: 6px 8px;
  border-radius: 8px;
  background: #e8f5f7;
  color: var(--muted);
  font-size: 0.82rem;
}

.reason.important {
  background: #e8f3f1;
  color: var(--teal);
  font-weight: 800;
}

.reason.warning {
  background: #fff0dc;
  color: var(--amber);
  font-weight: 800;
}

.reason.accuracy {
  background: #edf7ee;
  color: var(--green);
  font-weight: 850;
}

.official-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px dashed rgba(32, 48, 58, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.86);
}

.official-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  background: #e8f5f7;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 760;
}

.official-chip b {
  color: var(--ink);
}

.official-chip.open {
  background: rgba(39, 132, 85, 0.12);
  color: var(--green);
}

.official-chip.waitlist,
.official-chip.warning {
  background: #fff0dc;
  color: var(--amber);
}

.official-chip.closed {
  background: rgba(177, 47, 46, 0.1);
  color: var(--accent);
}

.official-chip.pending,
.official-chip.muted {
  background: rgba(232, 245, 247, 0.72);
  color: var(--muted);
}

.accuracy-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(94, 116, 68, 0.24);
  border-radius: 8px;
  background: rgba(246, 251, 237, 0.78);
}

.accuracy-panel span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.36;
}

.accuracy-panel b {
  margin-right: 6px;
  color: var(--green);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions button,
.card-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(32, 48, 58, 0.2);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--ink);
  font-weight: 750;
  font-size: 0.9rem;
}

.card-actions button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff9ea;
}

.card-actions button:hover,
.card-actions a:hover {
  border-color: rgba(32, 48, 58, 0.35);
  background: #fff9ea;
}

.card-actions button.primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.selected-plan {
  display: grid;
  gap: 8px;
  max-height: 76px;
  padding: 12px;
  border-bottom: 1px solid rgba(32, 48, 58, 0.16);
  overflow: auto;
}

.schedule-sync-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(32, 48, 58, 0.14);
  background: rgba(255, 253, 247, 0.82);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.schedule-sync-status strong {
  color: var(--accent-strong);
}

.plan-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.campus-rule {
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.campus-rule.ok {
  border: 1px solid rgba(39, 132, 85, 0.22);
  background: rgba(39, 132, 85, 0.08);
  color: var(--green);
}

.campus-rule.warning {
  border: 1px solid rgba(177, 47, 46, 0.22);
  background: rgba(177, 47, 46, 0.08);
  color: var(--accent);
}

.calendar {
  display: grid;
  /* 默认五列；renderWeek 会按方案里有没有周末课，行内覆盖成 6 或 7 列。
     不能写成 repeat(var(--week-cols), …) —— Chromium 不接受 var() 当重复次数，
     整条声明会被丢掉，然后多出来的那一列静静地掉到第二行去。 */
  grid-template-columns: 44px repeat(5, minmax(36px, 1fr));
  grid-auto-rows: 36px;
  max-height: 126px;
  padding: 10px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(232, 245, 247, 0.94), rgba(255, 248, 231, 0.72));
}

.schedule-panel.calendar-expanded .calendar {
  max-height: 320px;
}

.calendar-cell {
  min-width: 44px;
  border-right: 1px solid rgba(32, 48, 58, 0.14);
  border-bottom: 1px solid rgba(32, 48, 58, 0.14);
  padding: 4px;
  color: var(--muted);
  font-size: 0.68rem;
}

.calendar-cell.head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff8e7;
  color: var(--ink);
  font-weight: 850;
}

.calendar-cell.time {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff8e7;
  font-weight: 750;
}

.calendar-block {
  border-radius: 6px;
  background:
    linear-gradient(180deg, #ff8463, #de5a3f);
  color: #fff9ea;
  padding: 4px;
  font-size: 0.64rem;
  line-height: 1.2;
  overflow: hidden;
}

.empty-state {
  padding: 34px 28px;
  text-align: center;
  color: var(--muted);
  line-height: 1.55;
}

dialog {
  width: min(980px, calc(100vw - 28px));
  border: 2px solid rgba(32, 48, 58, 0.72);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0;
  background: var(--panel);
}

dialog::backdrop {
  background: rgba(18, 47, 63, 0.46);
}

dialog form {
  padding: 20px;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  font-size: 1.35rem;
  line-height: 1;
}

.icon-button:hover {
  background: var(--panel-soft);
}

.dialog-copy {
  color: var(--muted);
  line-height: 1.5;
}

.import-preview {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.manual-completed-field {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(32, 48, 58, 0.18);
  border-radius: 8px;
  background: rgba(232, 245, 247, 0.72);
  color: var(--ink);
  font-weight: 800;
}

.manual-completed-field textarea {
  min-height: 96px;
  font-family: inherit;
  font-size: 0.92rem;
}

.preview-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(232, 245, 247, 0.72);
  font-size: 0.84rem;
}

.community-entries {
  display: grid;
  gap: 10px;
  max-height: 240px;
  overflow: auto;
  margin: 14px 0;
}

.community-entry {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(232, 245, 247, 0.72);
}

.community-entry p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.community-entry small {
  color: var(--muted);
}

.community-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.community-facts span {
  padding: 7px 8px;
  border: 1px solid rgba(32, 48, 58, 0.12);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.community-facts b {
  display: block;
  color: var(--ink);
  font-size: 0.76rem;
}

.community-form,
.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.community-form label,
.profile-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 750;
  font-size: 0.9rem;
}

.community-form input,
.community-form select,
.profile-form input,
.profile-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  padding: 0 10px;
}

.community-form input:focus,
.community-form select:focus,
.profile-form input:focus,
.profile-form select:focus,
select:focus,
input[type="search"]:focus,
textarea:focus {
  border-color: rgba(255, 104, 71, 0.54);
  box-shadow: 0 0 0 3px rgba(255, 104, 71, 0.16);
}

.community-form textarea {
  min-height: 120px;
}

.profile-form textarea {
  min-height: 140px;
}

.profile-toggle {
  align-self: end;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
}

.full-span {
  grid-column: 1 / -1;
}

textarea {
  min-height: 52vh;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
}

dialog textarea {
  background: rgba(232, 245, 247, 0.72);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.dialog-actions button {
  padding: 0 14px;
}

.dialog-actions button[type="submit"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff9ea;
}

.dialog-actions button[type="submit"]:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 1500px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .schedule-panel {
    order: 0;
    position: sticky;
    top: 18px;
  }

  .schedule-panel .section-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .schedule-panel .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selected-plan {
    max-height: 132px;
  }

  .calendar {
    max-height: 300px;
  }

  .schedule-panel.calendar-expanded .calendar {
    max-height: 420px;
  }
}

@media (max-width: 1120px) {
  .app-shell,
  .audit-grid,
  .assist-controls,
  .quick-start-grid {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .calendar {
    max-height: 108px;
  }

  .schedule-panel.calendar-expanded .calendar {
    max-height: 260px;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .panel {
    width: min(520px, calc(100vw - 32px));
  }

  .main {
    width: 100%;
  }

  .course-card {
    grid-template-columns: minmax(0, 1fr) 96px;
  }
}

@media (max-width: 640px) {
  .app-shell,
  .panel,
  .main,
  .topbar,
  .summary-row,
  .recommendations,
  .schedule-panel,
  .course-card {
    min-width: 0;
    max-width: 100%;
  }

  .panel,
  .main {
    padding: 16px;
  }

  .quick-start {
    padding: 16px;
  }

  .quick-start-actions,
  .quick-start-actions .primary-apply,
  .quiet-action {
    width: 100%;
  }

  .topbar,
  .course-card {
    grid-template-columns: 1fr;
  }

  .topbar,
  .summary-row {
    flex-direction: column;
  }

  .topbar {
    padding: 18px;
  }

  .summary-card,
  .top-language-switch,
  .summary-action {
    min-width: 0;
    width: 100%;
  }

  .advanced-directory summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .story-guide summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .story-guide summary small {
    width: calc(100% - 40px);
    margin-left: 0;
  }

  .story-guide-content {
    grid-template-columns: 1fr;
  }

  .advanced-directory summary small {
    width: calc(100% - 42px);
    margin-left: 0;
  }

  .schedule-panel {
    position: static;
  }

  .selected-plan {
    max-height: 96px;
  }

  .day-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .day-grid button,
  .segmented button {
    min-width: 0;
    padding-inline: 4px;
  }

  .source-box a {
    min-width: 0;
    white-space: normal;
  }

  .actions,
  .assist-actions,
  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions button,
  .assist-actions a,
  .assist-actions button,
  .card-actions button,
  .card-actions a {
    width: 100%;
  }

  .gap-list {
    grid-template-columns: 1fr;
  }

  .course-list {
    padding: 12px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .accuracy-panel {
    grid-template-columns: 1fr;
  }

  .profile-form,
  .community-form {
    grid-template-columns: 1fr;
  }

  .score-box {
    width: 100%;
    height: 64px;
  }

  .calendar {
    grid-template-columns: 48px repeat(5, minmax(74px, 1fr));
  }
}

/* ============================================================
   v30 首屏 / 周课表 / 图标化卡片
   目标：一屏看完，看图不看字。
   ============================================================ */

/* ---------- 首屏 ---------- */
.hero {
  background: var(--panel, #fffdf8);
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 20px;
  padding: 28px 24px;
  margin-bottom: 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .05);
}
.hero h2 { margin: 0 0 4px; font-size: 1.6rem; line-height: 1.25; }
.hero p { margin: 0 0 18px; color: #6b6257; font-size: .95rem; }

/* 草图：[专业] [目标学校] [CC] 排成一行。
   窄屏不能硬排三个 —— 390px 减掉边距和缝隙，每栏只剩 110px，
   原生 select 不加省略号，专业名会被直接切掉，学生看不见自己选的是什么。
   所以窄屏「专业」独占一行，另外两个并排（选项都是短名字）。
   ≥560px 三个一排，「专业」那栏给多一点宽度。 */
.hero-steps {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
}
.hero-steps > .hero-step:first-child { grid-column: 1 / -1; }
@media (min-width: 560px) {
  .hero-steps { grid-template-columns: 1.7fr 1fr 1fr; }
  .hero-steps > .hero-step:first-child { grid-column: auto; }
}

.hero-step {
  display: grid; grid-template-columns: 1fr; grid-template-areas: none;
  gap: 5px; align-items: start; min-width: 0;
}
.hero-step-label { grid-area: auto; font-weight: 600; font-size: .84rem; color: #5b5349; }
.hero-step select {
  grid-area: auto; width: 100%; min-width: 0; padding: 12px 10px; font-size: .95rem;
  border: 1px solid rgba(0, 0, 0, .14); border-radius: 12px; background: #fff;
}

.hero-go {
  width: 100%; padding: 16px; font-size: 1.05rem; font-weight: 700;
  color: #fff; background: #f97316; border: 0; border-radius: 14px; cursor: pointer;
}
.hero-go:hover { background: #ea6a08; }
.hero-more {
  display: block; margin: 10px auto 0; background: none; border: 0;
  color: #8a8078; font-size: .88rem; cursor: pointer;
}

/* 回访：进度环 + 十个区 */
.hero-progress { display: grid; gap: 20px; align-items: center; }
@media (min-width: 700px) { .hero-progress { grid-template-columns: 168px 1fr; } }

.hero-ring { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.hero-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hero-ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.ring-track { stroke: rgba(0, 0, 0, .07); }
.ring-fill { stroke: #f97316; transition: stroke-dasharray .5s ease; }
.hero-ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.hero-ring-text strong { display: block; font-size: 2.1rem; line-height: 1; }
.hero-ring-text span { font-size: .78rem; color: #8a8078; }

.hero-areas { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.hero-area {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  border: 1px solid transparent;
}
.hero-area i { font-style: normal; }
.hero-area.on { background: #dcfce7; color: #15803d; }
.hero-area.off { background: #f5f2ec; color: #9a9086; border-color: rgba(0, 0, 0, .06); }
.hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero-actions .hero-go { width: auto; padding: 12px 22px; }
.hero-actions .hero-more { margin: 0; }

/* 首次进入时，把原来那一整屏表单收起来 */
/* 设置面板由「更多设置」这个开关控制，展开和收起都要能用。
   结果区（workspace）只在还没排过课的时候藏起来，排完就一直在。 */
body.settings-closed .quick-start,
body.settings-closed .controls,
body.settings-closed .advanced-directory,
body.settings-closed .story-guide { display: none; }
body.pre-search .workspace { display: none; }

/* ---------- 一周方格图 ---------- */
/* 草图上「本学期课表」和「两年课表」是并列的两个框，不是框里套框。
   所以 #weekView 自己不画框了 —— 它现在只是个容器，
   里面三块各画各的：课表、两年课表、（进度环 + 主修清单）。 */
.week-view { background: none; border: 0; padding: 0; margin-bottom: 0; }
.week-card {
  background: var(--panel, #fffdf8);
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 20px; padding: 18px 16px; margin-bottom: 12px;
}
.week-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.week-head h3 { margin: 0; font-size: 1.15rem; }
.week-units { font-size: .86rem; color: #8a8078; font-weight: 600; }

.week-grid { display: grid; grid-template-columns: 34px repeat(5, 1fr); gap: 4px; }
.week-gutter { position: relative; }
.week-hour { position: absolute; right: 4px; font-size: .68rem; color: #a9a09a; transform: translateY(-50%); }
.week-col-head { text-align: center; font-size: .8rem; font-weight: 700; color: #6b6257; padding-bottom: 6px; }
.week-col-body {
  position: relative; border-radius: 8px;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.035) 0 1px, transparent 1px 37.2px);
}
.week-block {
  position: absolute; left: 2px; right: 2px; border-radius: 7px;
  padding: 4px 5px; overflow: hidden; color: #fff; line-height: 1.15;
}
.week-block b { display: block; font-size: .74rem; }
.week-block i { font-style: normal; font-size: .64rem; opacity: .85; }
.k-major { background: #f97316; }
.k-english { background: #2563eb; }
.k-ge { background: #14b8a6; }

.week-async { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; font-size: .8rem; color: #8a8078; }
.week-async em { font-style: normal; color: #fff; padding: 3px 8px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.week-legend { display: flex; gap: 14px; margin-top: 12px; font-size: .76rem; color: #6b6257; }
.week-legend span { display: inline-flex; align-items: center; gap: 5px; background: none; }
.week-legend span::before { content: ""; width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.week-legend .k-major::before { background: #f97316; }
.week-legend .k-english::before { background: #2563eb; }
.week-legend .k-ge::before { background: #14b8a6; }
.week-legend .k-major, .week-legend .k-english, .week-legend .k-ge { background: none; color: inherit; }

/* ---------- 图标化课程卡片 ---------- */
.course-card {
  position: relative; display: block; padding: 0; overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .08); border-radius: 14px;
  background: #fffdf8; margin-bottom: 10px;
}
.course-card.is-picked { border-color: #f97316; box-shadow: 0 0 0 2px rgba(249, 115, 22, .16); }
.course-card.is-blocked { opacity: .72; }

.c-main {
  width: 100%; display: grid; grid-template-columns: 14px 1fr 18px;
  gap: 10px; align-items: start; padding: 13px 46px 13px 13px;
  background: none; border: 0; text-align: left; cursor: pointer; font: inherit;
}
.c-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; }
.c-dot.ok { background: #22c55e; }
.c-dot.warn { background: #f59e0b; }
.c-dot.no { background: #ef4444; }

.c-body { display: grid; gap: 3px; min-width: 0; }
.c-top { display: flex; align-items: baseline; gap: 8px; }
.c-top b { font-size: 1rem; letter-spacing: .01em; }
.c-units { font-size: .78rem; color: #9a9086; }
.c-name { font-size: .86rem; color: #6b6257; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: #7a7168; }
.c-stars { color: #f59e0b; letter-spacing: 1px; font-size: .78rem; }

/* 老师评分：跟 RateMyProfessors 一样给具体数字。
   星星只有五档，4.8 和 5.0 画出来没区别，而学生比的就是这零点几分。 */
.c-rate { display: inline-flex; align-items: baseline; gap: 1px; white-space: nowrap; }
.c-rate b { font-size: .92rem; font-weight: 750; color: #b45309; letter-spacing: -.01em; }
.c-rate i { font-style: normal; font-size: .62rem; color: #b9b0a6; margin-right: 3px; }
.c-rate em {
  font-style: normal; font-size: .62rem; color: #8a8078;
  background: rgba(0,0,0,.05); border-radius: 6px; padding: 1px 4px;
}
.sec-chip .chip-rate { font-style: normal; font-weight: 700; color: #b45309; }
/* 评论条数跟着分数走 —— 4.8 基于 5 条和 4.6 基于 50 条，分量差很多，
   RMP 自己也是把「Based on 9 ratings」写在分数底下的。 */
.sec-chip .chip-rate u {
  text-decoration: none; font-size: 8.5px; font-weight: 600;
  opacity: .6; margin-left: 2px; vertical-align: super;
}
.sec-chip.on .chip-rate { color: #fff; }
.sec-chip .chip-norate { font-style: normal; font-size: 9.5px; color: #a9a09a; }
@media (prefers-color-scheme: dark) {
  .c-rate b, .sec-chip .chip-rate { color: #f0a53c; }
  .c-rate em { background: rgba(255,255,255,.08); color: #a49a90; }
}
/* 「无评分」是一句说明，不是零分。别用星星的颜色和字距，
   免得学生扫过去还以为是个很低的分。 */
.c-stars.none {
  color: #a9a09a; letter-spacing: 0; font-size: .72rem;
  font-style: normal; white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .c-stars.none { color: #8d857c; } }
.c-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14em; }
.c-when.async { color: #9a9086; }
.c-area { color: #0f766e; font-weight: 600; }
.c-block { font-size: .8rem; color: #dc2626; font-weight: 600; }
.c-warn { font-size: .76rem; color: #a29a90; }
.c-caret { color: #b8b0a6; font-size: .8rem; padding-top: 3px; }

.c-pick {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  border-radius: 50%; border: 1px solid rgba(0, 0, 0, .14); background: #fff;
  font-size: 1rem; line-height: 1; cursor: pointer; color: #6b6257;
}
.c-pick.on { background: #f97316; border-color: #f97316; color: #fff; }

.c-detail { padding: 0 13px 13px; border-top: 1px dashed rgba(0, 0, 0, .1); }
.c-detail .meta { font-size: .78rem; }
.c-detail .meta.note { color: #9a9086; max-height: 7.5em; overflow: auto; }

@media (max-width: 480px) {
  .hero { padding: 20px 16px; }
  .hero h2 { font-size: 1.35rem; }
  .week-grid { grid-template-columns: 28px repeat(5, 1fr); gap: 3px; }
  .week-block b { font-size: .66rem; }
  .week-block i { display: none; }
}

/* ---------- 顶栏瘦身 ----------
   原来的顶栏在手机上要吃掉整整一屏：四行大标题 + 两个上下堆叠的语言按钮
   + 两张统计卡 + 一个反馈按钮。学生还没看到任何内容就得先滑一屏。
   还没搜索时统计卡显示的是「—」和「90」，本来也没意义，先收起来。 */
.topbar { padding: 14px 18px; }
.topbar .eyebrow { font-size: .68rem; letter-spacing: .12em; margin: 0 0 2px; }
.topbar h2 { font-size: 1.05rem; line-height: 1.35; margin: 0; max-width: 32em; }
.top-language-switch { display: inline-flex; gap: 0; border-radius: 999px; overflow: hidden; }
.top-language-switch button { padding: 6px 14px; font-size: .82rem; border-radius: 0; }

/* 首屏藏起这两张统计卡和反馈按钮。
   试过放回来，代价太大：手机上大按钮会被顶到 939px，掉出 844px 的第一屏；
   而且"匹配课程"在你还没填任何东西时显示的是"—"，本来也没话说。
   转学总共要 90 units 这个信息改放在标题下面那行橙色小字里，那里有上下文。 */
body.pre-search .topbar .summary-card,
body.pre-search .topbar #feedbackBtn { display: none; }

@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .topbar h2 { font-size: .95rem; }
  .summary-row { width: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .summary-card { flex: 1 1 auto; padding: 8px 10px; }
  .summary-card span { font-size: 1.2rem; }
  .summary-card p { font-size: .7rem; }
}

.list-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 4px; }
.list-more span { font-size: .8rem; color: #9a9086; }
.list-more button {
  padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(0,0,0,.14);
  background: #fff; font-size: .88rem; font-weight: 600; cursor: pointer; color: #5b5349;
}

/* 手机上有 2px 横向溢出，会让整页能左右拖动。grid/flex 的子项默认
   min-width:auto，长内容会把容器撑破 —— 显式压回去。 */
html, body { overflow-x: hidden; }
.main, .workspace, .quick-start, .recommendations, .schedule-panel { min-width: 0; max-width: 100%; }
.quick-start > *, .quick-start-grid > *, .workspace > *, .c-body > * { min-width: 0; }

/* 时间刻度要和课程格子对齐 —— 星期表头占了一行高度，刻度也得下移同样多 */
.week-gutter { margin-top: 26px; }
/* 已经排过课之后，那一大段「3 分钟生成第一版课表」的说明就是多余的，
   只留下面的控件，学生要改条件还能改。 */
body:not(.pre-search) .quick-start-copy { display: none; }
.hero-more { padding: 6px 10px; }
body:not(.pre-search) .quick-start { padding-top: 16px; }

/* ---------- 折叠成一门课一张卡 + 时段块 ---------- */
.course-card.grouped .c-main.static { cursor: default; padding: 13px 13px 8px; }
.c-secn { font-size: .74rem; color: #a29a90; margin-left: auto; white-space: nowrap; }

.sec-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 0 13px 13px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.sec-strip::-webkit-scrollbar { height: 4px; }
.sec-strip::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 4px; }

.sec-chip {
  flex: 0 0 auto; min-width: 92px; text-align: left; cursor: pointer;
  border: 1px solid rgba(0,0,0,.12); border-radius: 10px; background: #fff;
  padding: 7px 9px; font: inherit; line-height: 1.3; color: #4a453e;
}
.sec-chip b { display: block; font-size: .8rem; }
.sec-chip i { display: block; font-style: normal; font-size: .72rem; color: #f59e0b; }
.sec-chip em {
  display: block; font-style: normal; font-size: .68rem; color: #9a9086;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 11em;
}
.sec-chip:hover { border-color: #f97316; }
.sec-chip.on { background: #f97316; border-color: #f97316; color: #fff; }
.sec-chip.on i, .sec-chip.on em { color: rgba(255,255,255,.9); }
/* 撞课的不藏起来 —— 学生可能就是想换掉已选的那门，而不是放弃这门 */
.sec-chip.clash { opacity: .5; background: #faf8f5; }
.sec-chip.clash em { color: #dc2626; }

.sec-more {
  flex: 0 0 auto; align-self: center; border: 1px dashed rgba(0,0,0,.18);
  background: none; border-radius: 10px; padding: 10px 12px; cursor: pointer;
  font-size: .78rem; color: #8a8078;
}

#groupToggleBtn { font-size: .82rem; }
.course-card.grouped .c-main.static { width: 100%; background: none; border: 0; text-align: left; font: inherit; cursor: pointer; }

.week-head { gap: 12px; }
.week-export {
  margin-left: auto; padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(0,0,0,.14); background: #fff;
  font-size: .8rem; font-weight: 600; color: #5b5349; cursor: pointer; white-space: nowrap;
}
.week-export:hover { border-color: #f97316; color: #c2410c; }
.week-export[disabled] { opacity: .6; cursor: default; }

/* 收起设置的悬浮按钮：只在设置展开时出现，固定在右下角，翻到哪儿都点得到 */
.settings-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  padding: 12px 20px; border-radius: 999px; border: 0;
  background: #2f2a24; color: #fff; font-size: .9rem; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22); cursor: pointer;
}
.settings-fab:hover { background: #14110e; }
body.settings-closed .settings-fab { display: none; }

/* ---------- 首屏示意图 ----------
   三个下拉框讲不清这网站是干什么的。先让学生看一眼结果：
   一张迷你周课表，配色和真实输出完全一致，扫一眼就知道"哦，是排课表的"。 */
.hero-preview {
  margin: 0 0 14px; padding: 12px 12px 10px;
  background: #fffdf8; border: 1px solid rgba(0, 0, 0, .07); border-radius: 14px;
}
.hp-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.hp-col { display: block; }
.hp-col b {
  display: block; text-align: center; font-size: .68rem; font-weight: 700;
  color: #a29a90; padding-bottom: 4px;
}
.hp-col em {
  position: relative; display: block; height: 82px; border-radius: 6px;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.045) 0 1px, transparent 1px 19px);
}
.hp-col i {
  position: absolute; left: 1px; right: 1px; border-radius: 5px;
  font-style: normal; font-size: .58rem; font-weight: 700; color: #fff;
  padding: 3px 0 0 4px; overflow: hidden; letter-spacing: .01em;
}
.hero-preview figcaption {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding-top: 10px;
}
.hero-preview figcaption strong { font-size: .84rem; color: #4a453e; }
.hero-preview figcaption span { font-size: .76rem; color: #9a9086; }

.hero-sell {
  list-style: none; margin: 0 0 16px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 14px;
}
.hero-sell li {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .78rem; color: #6b6257;
}
.hero-sell i {
  font-style: normal; width: 17px; height: 17px; border-radius: 50%;
  background: #f1ede5; color: #c2410c; font-size: .62rem;
  display: inline-grid; place-items: center; font-weight: 700;
}

.hero-progress-side p small {
  display: block; margin-top: 4px; font-size: .78rem; color: #a29a90; font-weight: 400;
}

@media (min-width: 760px) {
  /* 桌面上示意图放右边，跟三步并排，不占竖向空间 */
  /* 右栏三块各占一行，别再挤在同一个格子里。
     原来课表示意图、进度环、卖点三样全是 grid-area: p，
     靠 align-self 和一句 margin-top: 214px 手工错开 ——
     只要中间那块变高一点（英文那句 "See at a glance which 8 areas are left"
     一换行就高了 20 多像素），三样就叠在一起，卖点直接压在区码上。
     用真正的三行，高度自己撑开，不用魔法数字。 */
  .hero-start { display: grid; grid-template-columns: 1fr 300px; gap: 0 32px;
                grid-template-areas: "h p1" "t p1" "s p2" "b p3" "m p3" "w w";
                align-items: start; }
  .hero-start h2 { grid-area: h; margin-bottom: 6px; }
  /* 副标题单独占一行，不再跟标题挤在同一个格子里靠 margin-top: 46px 错开。
     那个 46 是照着当时的标题高度量出来的，标题一换行就对不上。 */
  .hero-start > p:not(.hero-stale) { grid-area: t; align-self: start; margin: 0 0 18px; }
  /* 「上次的方案是更早以前存的」这条也是个 <p>，原来的 `.hero-start > p`
     把它一起圈进了 grid-area: h —— 于是标题、副标题、这条提示三个
     叠在同一个格子里。用户截图上看到的就是这个。
     给它自己一行，横跨两栏。 */
  .hero-stale { grid-area: w; margin: 4px 0 0; }
  .hero-preview { grid-area: p1; margin: 0 0 10px; }
  .hero-sell { grid-area: p3; align-self: start; margin: 0; padding-top: 8px; }
  .hero-steps { grid-area: s; grid-template-columns: 1.7fr 1fr 1fr; gap: 10px; }
}
/* 760px 起右边留了 300px 给示意图，左栏就只剩 400 多 ——
   三个一排的话「专业」只有 164px、「CC」只有 97px，
   "Foothill College" 在 97px 里根本显示不完。
   左栏宽到 560 以上（约 1020px 视口）才排得下三个。 */
@media (min-width: 760px) and (max-width: 1019px) {
  .hero-steps { grid-template-columns: 1fr 1fr; }
  .hero-steps > .hero-step:first-child { grid-column: 1 / -1; }
  .hero-go { grid-area: b; }
  .hero-more { grid-area: m; margin: 8px auto 0; }
}
@media (max-width: 480px) {
  .hp-col em { height: 68px; }
  .hero-sell { gap: 4px 12px; margin-bottom: 12px; }
  .hero-sell li { font-size: .74rem; }
}

/* 手机上顶部那条装饰横幅原本要吃掉 370px，学生得先滑过一整屏才看到内容。
   压到 190px，图还在，位置让出来。 */
@media (max-width: 640px) {
  .topbar { min-height: 0; max-height: 190px; padding: 12px 16px; overflow: hidden; }
  .topbar h2 { font-size: .88rem; line-height: 1.3; }
  .topbar .eyebrow { font-size: .62rem; }
}

/* 统计卡片在首屏被藏起来之后，语言切换成了 .summary-row 里唯一的孩子，
   被 flex 拉伸到整行高度（134×154），再套上 999px 圆角就变成一个大圆盘。
   固定住它自己的尺寸，别跟着行高走。 */
.summary-row { align-items: center; }
.top-language-switch {
  flex: 0 0 auto; align-self: center; height: auto; width: auto;
  border: 1px solid rgba(0, 0, 0, .12); background: #fff;
}
.top-language-switch button {
  height: 32px; line-height: 1; padding: 0 16px; white-space: nowrap; border: 0;
}
.hero-start > p small {
  display: block; margin-top: 6px; font-size: .8rem; color: #c2410c; font-weight: 600;
}


/* ---------- 课表底下的转学进度 ----------
   课表回答"这学期怎么过"，圆环回答"走完这一步还剩多少"。
   两个挨在一起才是完整的一句话，分开放就得靠脑子接。 */
.week-progress {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px dashed rgba(0, 0, 0, .12);
}
.week-progress .hero-progress-side h2 { font-size: 1.05rem; margin: 0 0 4px; }
.week-progress .hero-ring { width: 132px; height: 132px; }
/* 手机上这个环是纯装饰，占的地方比它给的信息多。缩一圈。 */
@media (max-width: 480px) {
  .week-progress .hero-ring { width: 96px; height: 96px; }
  .week-progress .hero-ring-text strong { font-size: 1.35rem; }
  .week-progress { gap: 12px; }
}
.week-progress .hero-ring-text strong { font-size: 1.7rem; }
@media (min-width: 700px) {
  .week-progress .hero-progress { grid-template-columns: 148px 1fr; }
}

/* 回访顶部的窄摘要：圆环搬走之后，这里只需要一行"你是谁、排了多少" */
.hero-slim {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.hero-slim-text { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.hero-slim-text b { font-size: 1.15rem; }
.hero-slim-text span { font-size: .92rem; color: #6b6257; font-weight: 600; }
.hero-slim-text em { font-style: normal; font-size: .82rem; color: #c2410c; font-weight: 700; }
.hero-slim .hero-actions { margin: 0; }
.hero-slim .hero-go { width: auto; padding: 11px 20px; font-size: .92rem; }
@media (max-width: 560px) {
  .hero-slim { flex-direction: column; align-items: stretch; }
  .hero-slim .hero-actions { justify-content: space-between; }
}

/* ---------- 首屏第二张示意图：进度环 ----------
   课表告诉学生"会拿到什么"，进度环告诉他"会知道什么"。两张一起，
   不用读说明就明白这网站的两件事。 */
.hero-ring-preview {
  display: flex; align-items: center; gap: 14px; margin: 0 0 14px;
  padding: 12px; background: #fffdf8;
  border: 1px solid rgba(0, 0, 0, .07); border-radius: 14px;
}
.hrp-ring { position: relative; width: 64px; height: 64px; flex: 0 0 64px; }
.hrp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hrp-ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.hrp-ring b {
  position: absolute; inset: 0; display: grid; place-content: center;
  font-size: .82rem; font-weight: 700; color: #2f2a24;
}
.hero-ring-preview figcaption { min-width: 0; }
.hero-ring-preview strong { display: block; font-size: .84rem; color: #4a453e; }
.hero-ring-preview > figcaption > span { font-size: .76rem; color: #9a9086; }
.hrp-areas { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.hrp-areas i {
  font-style: normal; font-size: .64rem; font-weight: 700; padding: 2px 6px;
  border-radius: 999px; line-height: 1.5;
}
.hrp-areas i.on { background: #dcfce7; color: #15803d; }
.hrp-areas i.off { background: #f5f2ec; color: #a9a09a; }

/* 两张示意图加起来变高了，把周课表格子和卖点收紧一点，
   保证「帮我排第一学期」那个按钮还在第一屏里 */
.hero-preview { margin-bottom: 10px; padding: 10px 10px 8px; }
.hp-col em { height: 62px; }
.hero-sell { gap: 4px 12px; margin-bottom: 12px; }
@media (max-width: 480px) {
  .hp-col em { height: 52px; }
  .hero-ring-preview { padding: 10px; gap: 10px; }
  .hrp-ring, .hrp-ring { width: 56px; height: 56px; flex-basis: 56px; }
}
@media (min-width: 760px) {
  /* 桌面右栏：课表在上，进度环在中，卖点在下 —— 各占一行。
     那句 margin-top: 214px 去掉了：它是照着当时中文文案的高度量出来的，
     换成英文（文案更长、会换行）就对不上，三块直接叠在一起。 */
  .hero-ring-preview { grid-area: p2; align-self: start; margin: 0 0 10px; }
}

/* 加了第二张示意图之后手机上大按钮掉出第一屏了（920 > 844）。
   往回抠：顶部横幅再矮一点，标题和卖点收紧，示意图之间的间距压掉。 */
@media (max-width: 640px) {
  .topbar { max-height: 140px; padding: 10px 16px; }
  .topbar h2 { font-size: .82rem; -webkit-line-clamp: 2; }
  .hero { padding: 16px 14px; }
  .hero h2 { font-size: 1.22rem; }
  .hero > .hero-start > p { margin-bottom: 12px; font-size: .88rem; }
  .hero-start > p small { margin-top: 4px; font-size: .76rem; }
  .hero-preview { margin-bottom: 8px; }
  .hero-ring-preview { margin-bottom: 10px; }
  .hero-sell { gap: 2px 10px; margin-bottom: 10px; }
  .hero-sell li { font-size: .72rem; }
  .hero-sell i { width: 15px; height: 15px; font-size: .58rem; }
  .hero-steps { gap: 8px; }
  .hero-step select { padding: 11px 12px; }
  .hero-go { padding: 14px; }
}

/* 示意图的说明文字要和格子分开，别贴在一起 */
.hero-preview figcaption { padding-top: 12px; }
.hp-col i { display: flex; align-items: center; padding: 0 0 0 4px; }

/* 英文比中文占的行高多一点点，手机上刚好把按钮挤出去 3px。再抠一点。 */
@media (max-width: 640px) {
  .hero-sell { margin-bottom: 8px; }
  .hero-go { padding: 13px; }
  .hero-ring-preview { margin-bottom: 8px; }
}

/* ---------- 主修清单 ----------
   把 ASSIST 协议整张摊开：排了的、留到下学期的、本学期没开的、先修不够的，
   各是各的样子。学生问"为什么没给我排 X"，答案得在页面上，不能靠猜。 */
.prep-list {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px dashed rgba(0, 0, 0, .12);
}
.prep-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.prep-head h3 { margin: 0; font-size: 1.05rem; }
.prep-count { font-size: .78rem; color: #8a8078; font-weight: 600; white-space: nowrap; }
.prep-source { margin: 2px 0 10px; font-size: .74rem; color: #a9a09a; }
.prep-none { margin: 6px 0 12px; font-size: .82rem; color: #8a8078; }

.prep-list ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.prep-list li {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 4px 8px;
  align-items: baseline; padding: 8px 10px; border-radius: 10px;
  background: #fffdf8; border: 1px solid rgba(0, 0, 0, .06);
}
.prep-list li i { font-style: normal; font-weight: 700; text-align: center; }
.prep-recv { font-size: .84rem; font-weight: 600; color: #4a453e; min-width: 0; }
.prep-opt { grid-column: 2; font-size: .76rem; color: #0f766e; font-weight: 600; }
.prep-list li em {
  grid-row: 1; grid-column: 3; font-style: normal; font-size: .72rem;
  color: #9a9086; white-space: nowrap;
}
.prep-list li.s-planned { border-color: rgba(34, 197, 94, .35); background: #f4fdf7; }
.prep-list li.s-planned i, .prep-list li.s-planned em { color: #15803d; }
.prep-list li.s-done i, .prep-list li.s-done em { color: #15803d; }
.prep-list li.s-blocked i, .prep-list li.s-blocked em { color: #dc2626; }
.prep-list li.s-notoffered { opacity: .68; }

.prep-math {
  display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start;
  padding: 12px; border-radius: 12px;
}
.prep-math i {
  font-style: normal; font-weight: 700; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem;
}
.prep-math strong { display: block; font-size: .84rem; }
.prep-math span { font-size: .78rem; }
.prep-math small { display: block; margin-top: 4px; font-size: .72rem; color: #8a8078; }
.prep-math.missing { background: #fff7ed; border: 1px solid rgba(249, 115, 22, .3); }
.prep-math.missing i { background: #f97316; color: #fff; }
.prep-math.missing span { color: #c2410c; font-weight: 600; }
.prep-math.ok { background: #f4fdf7; border: 1px solid rgba(34, 197, 94, .3); }
.prep-math.ok i { background: #22c55e; color: #fff; }
.prep-math.ok span { color: #15803d; }

/* ——— 第一学期节奏说明 ——— */
.prep-pace {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border-left: 3px solid var(--line, #d8dee9);
  background: rgba(0, 0, 0, 0.02);
}
.prep-pace strong { font-size: 13px; font-weight: 650; }
.prep-pace span { font-size: 13px; line-height: 1.55; opacity: 0.85; }
.prep-pace small { font-size: 11.5px; opacity: 0.6; }
.prep-pace.easy  { border-left-color: #17a673; background: rgba(23, 166, 115, 0.06); }
.prep-pace.tight { border-left-color: #e6902c; background: rgba(230, 144, 44, 0.07); }
.prep-pace.over  { border-left-color: #d64545; background: rgba(214, 69, 69, 0.07); }
@media (prefers-color-scheme: dark) {
  .prep-pace { background: rgba(255, 255, 255, 0.04); }
}

/* ——— 专业清单：本校课号在前，接收校课名退成小字 ——— */
.prep-list li { align-items: center; }
.prep-main { min-width: 0; display: grid; grid-template-columns: auto auto 1fr; gap: 0 6px; }
.prep-main b {
  grid-column: 1; font-size: 14.5px; font-weight: 680; letter-spacing: .01em;
}
.prep-main .prep-alt {
  grid-column: 2; align-self: center; font-size: 10.5px; font-weight: 600;
  padding: 1px 5px; border-radius: 999px; opacity: .6;
  background: rgba(0, 0, 0, .07); cursor: help;
}
.prep-main small {
  grid-column: 1 / -1; font-size: 11.5px; opacity: .55;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prep-list li em { flex: 0 0 auto; white-space: nowrap; font-size: 11.5px; }
.prep-list li.s-next em { color: #b8710f; }
.prep-list li.s-next { background: rgba(230, 144, 44, .06); }
.prep-list li.s-next i { color: #e6902c; }

/* ——— 节奏说明：默认一行，点开才展开 ——— */
details.prep-pace { display: block; padding: 0; }
details.prep-pace > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 13px; cursor: pointer; list-style: none; font-size: 12.5px;
  /* 跟 .fold 一样锁成一行 —— 英文版本来会折成两行，多吃 20px */
  white-space: nowrap;
}
.prep-pace-one { overflow: hidden; text-overflow: ellipsis; }
details.prep-pace > summary::-webkit-details-marker { display: none; }
.prep-pace-one { font-weight: 620; }
.prep-why { font-size: 11.5px; opacity: .6; white-space: nowrap; }
.prep-why::after { content: " ▾"; }
details.prep-pace[open] > summary .prep-why::after { content: " ▴"; }
details.prep-pace > p { margin: 0 14px 10px; font-size: 12.5px; line-height: 1.55; opacity: .85; }
details.prep-pace > p.prep-ease { font-size: 11.5px; opacity: .55; }

/* ——— 排完课之后收起课程列表 ——— */
.browse-open {
  width: 100%; display: grid; gap: 3px; padding: 16px;
  border: 1px dashed var(--line, #d8dee9); border-radius: 14px;
  background: transparent; cursor: pointer; text-align: center; color: inherit;
}
.browse-open span { font-size: 14px; font-weight: 620; }
.browse-open small { font-size: 11.5px; opacity: .55; }
.browse-open:hover { background: rgba(0, 0, 0, .03); }
.browse-close {
  width: 100%; margin-bottom: 10px; padding: 9px; font-size: 12.5px;
  border: 1px solid var(--line, #d8dee9); border-radius: 10px;
  background: transparent; cursor: pointer; color: inherit; opacity: .75;
}
/* 收起时，"筛选/排序"那一排也没有意义了 */
body.browse-collapsed .recommendations > .section-head .filter-row { display: none; }

/* ——— 有周课表时，收掉下面那个重复的日历 ——— */
body.week-live #calendarGrid,
body.week-live #toggleCalendarBtn { display: none; }
body.week-live .schedule-panel .section-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
body.week-live .schedule-panel .section-head h3 { flex: 0 0 auto; margin: 0; font-size: 14px; }
body.week-live .schedule-panel .section-head .actions {
  flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 6px;
}
body.week-live .schedule-panel .section-head .actions button {
  flex: 0 1 auto; width: auto; padding: 7px 11px; font-size: 12px; white-space: nowrap;
}
body.week-live .schedule-sync-status { font-size: 11.5px; opacity: .6; }

/* 「1 / 6 门已安排」在 390px 上被标题挤出了右边界 */
.prep-head { display: flex; align-items: baseline; gap: 8px; }
.prep-head h3 { flex: 1 1 auto; min-width: 0; }
.prep-count { flex: 0 0 auto; white-space: nowrap; font-size: 11.5px; }
.prep-list li i { flex: 0 0 auto; width: 1.1em; text-align: center; }

/* ——— 班次横滑：给个"还能往右"的提示 ——— */
.sec-strip { position: relative; }
.sec-strip.can-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent);
                               mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); }
.sec-strip.can-left.can-right {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 34px), transparent);
          mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 34px), transparent);
}
.sec-strip.can-left:not(.can-right) {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 20px);
          mask-image: linear-gradient(to right, transparent, #000 20px);
}
/* 箭头得放在带遮罩的滚动条外面，否则会被自己的遮罩淡掉 */
.sec-wrap { position: relative; }
.sec-wrap > .sec-hint {
  position: absolute; top: 50%; right: 2px; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 999px; pointer-events: none;
  display: none; align-items: center; justify-content: center;
  font-size: 12px; color: #6b6259; background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .16);
}
.sec-wrap:has(.sec-strip.can-right) > .sec-hint { display: flex; }
@media (prefers-color-scheme: dark) {
  .sec-wrap > .sec-hint { color: #ddd6cc; background: rgba(40, 38, 35, .92); }
}

/* ——— 排课结果横幅：取代原来的浏览器 alert ——— */
.plan-notice {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 12px; margin-bottom: 12px; border-radius: 12px;
  /* 半透明会把页面背景那几块橙色色块透上来，绿底变肉粉。用实色。 */
  background: #e9f5ef; border-left: 3px solid #17a673;
}
.plan-notice.empty { background: #fbeceb; border-left-color: #d64545; }
.plan-notice > i {
  flex: 0 0 auto; font-style: normal; font-weight: 800; color: #17a673;
  line-height: 1.45; font-size: 14px;
}
.plan-notice.empty > i { color: #d64545; }
.plan-notice > div { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.plan-notice strong { font-size: 13.5px; font-weight: 660; }
.plan-notice small { font-size: 11.5px; opacity: .62; line-height: 1.5; }
.pn-x {
  flex: 0 0 auto; width: 26px; height: 26px; padding: 0; cursor: pointer;
  border: 0; border-radius: 999px; background: transparent; color: inherit;
  opacity: .45; font-size: 17px; line-height: 1;
}
.pn-x:hover { opacity: .9; background: rgba(0, 0, 0, .06); }
@media (prefers-color-scheme: dark) {
  .plan-notice { background: #1c2a24; }
  .plan-notice.empty { background: #2b1d1c; }
}

/* topbar 高 140px 且 overflow:hidden，这两张统计卡超出 153px —— 排完课之后
   它们被从中间切掉，露出半张卡。反正也读不了，有方案时就收掉；
   「还需多少 units」在下面的进度环里写着（15 / 90 units），信息没丢。 */
/* 只藏那两张统计卡 —— 语言切换也在这一行里，整行藏掉等于排完课就没法
   切换语言了（v43 就是这么错的）。而且藏掉卡之后语言切换会变成 flex 行里
   唯一的孩子被拉伸成大圆盘，所以顺手把尺寸钉死。 */
body.week-live .topbar .summary-card { display: none; }
body.week-live .topbar .summary-row {
  justify-content: flex-start;
}
body.week-live .topbar .top-language-switch {
  flex: 0 0 auto; align-self: center; height: auto;
}

/* 星期不明的课：有时间但查不了冲突，得说清楚 */
.week-async.warn { border-left: 3px solid #e6902c; padding-left: 9px; }
.week-async.warn > small {
  display: block; width: 100%; margin-top: 4px;
  font-size: 11px; line-height: 1.45; opacity: .7;
}

/* ——— 一行结论 + 点开看详情（TAG / 7 门课 / 优先注册 / 候补通用）——— */
details.fold {
  display: block; margin-top: 6px; border-radius: 12px;
  border-left: 3px solid var(--line, #d8dee9); background: rgba(0, 0, 0, .02);
}
details.fold.ok   { border-left-color: #17a673; background: rgba(23, 166, 115, .06); }
details.fold.warn { border-left-color: #e6902c; background: rgba(230, 144, 44, .07); }
details.fold > summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 7px 13px; cursor: pointer; list-style: none; font-size: 12.5px;
  white-space: nowrap;
}
details.fold > summary::-webkit-details-marker { display: none; }
/* summary 必须一行放得下 —— 折成两行的话四个块就多吃 100 多像素 */
.fold-one { overflow: hidden; text-overflow: ellipsis; }
.fold-one { min-width: 0; }
.fold-one b { font-weight: 660; }
.fold-more { flex: 0 0 auto; font-size: 11.5px; opacity: .6; white-space: nowrap; }
.fold-more::after { content: " ▾"; }
details.fold[open] > summary .fold-more::after { content: " ▴"; }
.fold-body { padding: 0 14px 11px; }
.fold-body p { margin: 0 0 7px; font-size: 12.5px; line-height: 1.6; opacity: .85; }
.fold-body p:last-child { margin-bottom: 0; }
.fold-body p.fold-note { font-size: 11.5px; opacity: .6; }
@media (prefers-color-scheme: dark) {
  details.fold { background: rgba(255, 255, 255, .04); }
}

/* 嵌在「转学须知」里的子块：去掉外层间距，避免双重留白 */
.fold-nest { padding-top: 2px; margin: 0 -6px; }
.fold-nest > details.fold > summary { padding-left: 10px; padding-right: 10px; }
.fold-nest > details.fold:first-child { margin-top: 0; }
.fold-nest > details.fold { background: rgba(0, 0, 0, .03); }
@media (prefers-color-scheme: dark) {
  .fold-nest > details.fold { background: rgba(255, 255, 255, .05); }
}

/* ——— GPA 一行：输入框 + 门槛对照 ——— */
.gpa-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 2px 4px 8px; padding: 8px 10px; border-radius: 10px;
  background: rgba(0, 0, 0, .03);
}
.gpa-in { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.gpa-in > span { font-weight: 620; white-space: nowrap; }
.gpa-in input {
  width: 74px; padding: 4px 7px; font-size: 13px; font-variant-numeric: tabular-nums;
  border: 1px solid var(--line, #d8dee9); border-radius: 8px;
  background: var(--card, #fff); color: inherit;
}
.gpa-in input:focus { outline: 2px solid #2f6df6; outline-offset: 1px; }
.gpa-marks { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.gpa-ask { font-size: 11.5px; opacity: .6; }
.gpa-mark {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 2px 8px; border-radius: 999px; font-size: 11.5px; white-space: nowrap;
  border: 1px solid transparent;
}
.gpa-mark i { font-style: normal; font-weight: 660; }
.gpa-mark.ok { background: rgba(23, 166, 115, .12); border-color: rgba(23, 166, 115, .35); }
.gpa-mark.ok i { color: #17a673; }
.gpa-mark.no { background: rgba(230, 144, 44, .12); border-color: rgba(230, 144, 44, .38); }
.gpa-mark.no i { color: #c2751c; }
@media (prefers-color-scheme: dark) {
  .gpa-row { background: rgba(255, 255, 255, .05); }
  .gpa-in input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); }
  .gpa-mark.no i { color: #e6902c; }
}

/* ——— 荣誉班升级：这是 TAP 里学生今天就能动的那一步，给它最高的对比度 ———
   选择器必须带上 .prep-list —— 这两个 ul 长在它里面，而 .prep-list ul 是
   grid、.prep-list li 是 flex，短选择器盖不过去，行会被拆散。 */
.tap-ups { margin: 2px 0 7px; }
.tap-ups > b { display: block; font-size: 12.5px; margin-bottom: 4px; }
.prep-list .tap-ups ul { display: block; margin: 0; padding: 0; list-style: none; gap: 0; }
.prep-list .tap-ups li {
  display: block; align-items: initial; gap: 0; border: 0; background: none;
  padding: 6px 9px; margin: 0 0 4px; border-radius: 8px; font-size: 12.5px;
  background: rgba(47, 109, 246, .08); border-left: 3px solid #2f6df6;
}
.tap-up-line { display: block; line-height: 1.45; }
.prep-list .tap-ups li em {
  flex: initial; font-style: normal; font-size: 12.5px; color: inherit;
  white-space: normal; opacity: .7;
}
.prep-list .tap-ups li b { font-weight: 680; }
.prep-list .tap-ups li small {
  display: block; margin-top: 2px; font-size: 11px; line-height: 1.45; opacity: .65;
}
@media (prefers-color-scheme: dark) {
  .prep-list .tap-ups li { background: rgba(47, 109, 246, .16); }
}

/* ——— 封顶线列表（同上，得盖过 .prep-list li 的 flex）——— */
.prep-list .cap-list { display: block; margin: 0 0 7px; padding: 0; list-style: none; gap: 0; }
.prep-list .cap-list li {
  display: block; position: relative; border: 0; background: none;
  padding: 3px 0 3px 16px; margin: 0; font-size: 12.5px; line-height: 1.5;
}
.prep-list .cap-list li::before { content: "·"; position: absolute; left: 4px; opacity: .5; }
.prep-list .cap-list li.warn::before {
  content: "!"; color: #c2751c; font-weight: 700; opacity: 1;
}
@media (prefers-color-scheme: dark) {
  .prep-list .cap-list li.warn::before { color: #e6902c; }
}

/* ——— 圆环下面那条封顶提示 ——— */
.ring-cap { margin: 4px 0 0; font-size: 11.5px; opacity: .65; }
.ring-cap.over { opacity: 1; color: #c2751c; font-weight: 620; }
@media (prefers-color-scheme: dark) { .ring-cap.over { color: #e6902c; } }

/* ——— 两年路线图 ———
   长在 .prep-list 里，得盖过它的 ul{display:grid} / li{display:flex}。 */
.prep-list .road-list { display: block; margin: 4px 0 8px; padding: 0; list-style: none; gap: 0; }
.prep-list .road-term {
  display: block; align-items: initial; gap: 0; border: 0;
  padding: 7px 0 7px 11px; margin: 0 0 2px;
  border-left: 2px solid var(--line, #d8dee9); background: none;
}
.prep-list .road-term.now { border-left-color: #2f6df6; }
.prep-list .road-term.guess { border-left-style: dashed; opacity: .88; }
.prep-list .road-term > b { font-size: 12.5px; font-weight: 680; }
.road-tag {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 10.5px; background: rgba(47, 109, 246, .12); color: #2f6df6;
}
.road-tag.guess { background: rgba(0, 0, 0, .06); color: inherit; opacity: .65; }
.prep-list .road-term > em {
  float: right; font-style: normal; font-size: 11.5px; opacity: .6;
  font-variant-numeric: tabular-nums;
}
.prep-list .road-courses { display: block; margin: 5px 0 0; padding: 0; list-style: none; gap: 0; }
.prep-list .road-courses li {
  display: block; align-items: initial; gap: 0; border: 0; background: none;
  padding: 2px 0; margin: 0; font-size: 12px; line-height: 1.45;
}
.prep-list .road-courses li.road-off { opacity: .55; }
.prep-list .road-courses li b { font-weight: 640; }
.prep-list .road-courses li small { display: block; font-size: 10.5px; opacity: .55; }
.prep-list .road-courses li i { font-style: normal; font-size: 10.5px; color: #c2751c; }
.road-alt {
  margin-left: 4px; padding: 0 5px; border-radius: 999px;
  font-size: 10px; background: rgba(0, 0, 0, .07); opacity: .7;
}
.road-short b, .road-heavy b { color: #c2751c; }
.road-heavy { padding: 7px 9px; border-radius: 8px; background: rgba(230, 144, 44, .09); }
@media (prefers-color-scheme: dark) {
  .road-tag.guess, .road-alt { background: rgba(255, 255, 255, .1); }
  .prep-list .road-courses li i, .road-short b, .road-heavy b { color: #e6902c; }
  .road-heavy { background: rgba(230, 144, 44, .14); }
}

/* ——— 带去问 counselor 的单子 ——— */
.prep-list .ask-list { display: block; margin: 2px 0 7px; padding: 0; list-style: none; gap: 0; }
.prep-list .ask-list li {
  display: block; align-items: initial; gap: 0; border: 0;
  padding: 5px 0 5px 15px; margin: 0; position: relative;
  background: none; font-size: 12.5px; line-height: 1.5;
}
.prep-list .ask-list li::before {
  content: "?"; position: absolute; left: 2px; top: 5px;
  font-weight: 700; opacity: .45;
}
.prep-list .ask-list li small { display: block; margin-top: 2px; font-size: 11px; opacity: .6; }

/* ——— 成绩单 ——— */
.gr-paste { margin: 6px 0 4px; }
.gr-paste label { display: block; }
.gr-paste label > span { display: block; font-size: 12px; font-weight: 620; margin-bottom: 4px; }
.gr-paste textarea {
  /* 全局有一条 textarea{min-height:52vh}，是给对话框里那个大粘贴框用的。
     min-height 压得过行内 height —— 不清掉的话，这个本该 62px 的小框
     会被撑到接近半屏。 */
  min-height: 0;
  width: 100%; box-sizing: border-box; padding: 8px 10px;
  font-size: 12.5px; line-height: 1.5; font-family: inherit;
  border: 1px solid var(--line, #d8dee9); border-radius: 10px; display: block;
  background: var(--card, #fff); color: inherit; resize: vertical;
}
.gr-paste textarea:focus { outline: 2px solid #2f6df6; outline-offset: 1px; }
.gr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.gr-actions small { flex: 1 1 100%; font-size: 10.5px; opacity: .55; line-height: 1.45; }
.gr-go, .gr-clear {
  padding: 5px 14px; border-radius: 999px; font-size: 12px; cursor: pointer;
  border: 1px solid transparent; font-weight: 620;
}
.gr-go { background: #2f6df6; color: #fff; }
.gr-clear { background: none; border-color: var(--line, #d8dee9); color: inherit; opacity: .75; }

.gr-head b { font-size: 14px; }
.gr-fix {
  margin: 6px 0 8px; padding: 8px 10px; border-radius: 10px;
  background: rgba(23, 166, 115, .09); border-left: 3px solid #17a673;
}
.gr-fix > b { display: block; font-size: 12.5px; margin-bottom: 4px; }
.prep-list .gr-fix ul { display: block; margin: 0 0 5px; padding: 0; list-style: none; gap: 0; }
.prep-list .gr-fix li {
  display: block; align-items: initial; gap: 0; border: 0; background: none;
  padding: 2px 0; margin: 0; font-size: 12.5px; line-height: 1.5;
}
.gr-fix li em { font-style: normal; font-weight: 700; color: #c2751c; margin: 0 4px; }
.gr-fix li span { opacity: .75; }
.gr-fix p { margin: 4px 0 0; }
.gr-stuck b { color: #c2751c; }

.gr-rows { margin-top: 8px; }
.gr-rows > summary {
  cursor: pointer; list-style: none; font-size: 12px; opacity: .7; padding: 4px 0;
}
.gr-rows > summary::-webkit-details-marker { display: none; }
.gr-rows > summary::after { content: " ▾"; }
.gr-rows[open] > summary::after { content: " ▴"; }
.prep-list .gr-list { display: block; margin: 4px 0 6px; padding: 0; list-style: none; gap: 0; }
.prep-list .gr-list li {
  display: flex; align-items: baseline; gap: 8px; border: 0; background: none;
  padding: 3px 0; margin: 0; font-size: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.prep-list .gr-list li b {
  flex: 0 0 auto; min-width: 78px; font-weight: 640; white-space: nowrap;
}
.prep-list .gr-list li em {
  flex: 0 0 auto; font-style: normal; font-weight: 700; min-width: 26px;
  font-variant-numeric: tabular-nums;
}
.prep-list .gr-list li i {
  /* .prep-list li i 那条给清单前面的状态符号设了 width:1.1em。
     层叠是按属性算的 —— 我这条不显式写 width，那个 1.1em 照样生效，
     「5 学分」被压成 12px 溢出去压住旁边的「不可转」。 */
  width: auto; text-align: left;
  flex: 0 0 auto; font-style: normal; opacity: .55; font-size: 11px;
  white-space: nowrap;                 /* 「5 学分」不能竖着断成两行 */
}
.prep-list .gr-list li span {
  margin-left: auto; font-size: 10.5px; opacity: .6; white-space: nowrap;
}
.prep-list .gr-list li span.q { color: #c2751c; opacity: .85; }
.prep-list .gr-list li.gr-nouc { opacity: .6; }
.g-A, .g-Ap { color: #17a673; }
.g-D, .g-Dp, .g-Dm, .g-F { color: #dc2626; }
.g-Cm, .g-C { color: #c2751c; }

.gpa-in.computed { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12.5px; }
.gpa-in.computed b { font-size: 16px; font-variant-numeric: tabular-nums; }
.gpa-in.computed small { font-size: 10.5px; opacity: .55; }

@media (prefers-color-scheme: dark) {
  .gr-paste textarea { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); }
  .gr-fix { background: rgba(23, 166, 115, .16); }
  .gr-fix li em, .gr-stuck b, .prep-list .gr-list li span.q { color: #e6902c; }
  .prep-list .gr-list li { border-bottom-color: rgba(255, 255, 255, .07); }
  .g-D, .g-Dp, .g-Dm, .g-F { color: #f87171; }
}

/* ——— 问一句：数学分班到哪了 ——— */
.ask-math {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  margin: 0 0 10px; padding: 8px 11px; border-radius: 12px;
  background: rgba(47, 109, 246, .07); border-left: 3px solid #2f6df6;
}
.ask-math > b { font-size: 12.5px; }
.ask-math-btns { display: flex; gap: 6px; }
.ask-math-btns button {
  padding: 4px 12px; border-radius: 999px; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line, #d8dee9); background: var(--card, #fff); color: inherit;
}
.ask-math-btns button.on { background: #2f6df6; border-color: #2f6df6; color: #fff; font-weight: 620; }
.ask-math-note { flex: 1 1 100%; font-size: 11px; line-height: 1.5; opacity: .65; }

/* ——— 这学期多重 ——— */
.load-note { margin: 0 0 10px; }
.load-note p { margin: 0 0 5px; font-size: 12px; line-height: 1.55; }
.load-note p:last-child { margin-bottom: 0; }
.load-warn {
  padding: 7px 10px; border-radius: 9px;
  background: rgba(230, 144, 44, .1); border-left: 3px solid #e6902c;
}
.load-ok { opacity: .6; font-size: 11.5px; }
@media (prefers-color-scheme: dark) {
  .ask-math { background: rgba(47, 109, 246, .16); }
  .ask-math-btns button { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); }
  .load-warn { background: rgba(230, 144, 44, .16); }
}

/* 「本学期课表」这一框：标题在最上面，草图上就是这么标的。
   问分班那条挪到标题下面 —— 它是这张课表的一个开关，不是页面的开场白。 */
.week-card .week-progress { margin-top: 0; padding-top: 0; border-top: 0; }
.week-card.week-after { padding-top: 12px; }

/* 「进行中」：这条要求修了一半。比"以后""还不能上"都更接近完成，
   所以用暖色，不用灰色 —— 灰色会让学生以为一点没动。 */
.prep-list li.s-partial > i { color: #c2751c; }
.prep-list li.s-partial > em { color: #c2751c; font-weight: 640; }
@media (prefers-color-scheme: dark) {
  .prep-list li.s-partial > i, .prep-list li.s-partial > em { color: #e6902c; }
}

/* 时段按钮上的「候补」标 */
.sec-chip .sec-wl {
  display: block; text-decoration: none; font-size: 9.5px; font-weight: 700;
  color: #c2751c; letter-spacing: .02em;
}
.sec-chip.on .sec-wl { color: #fff; opacity: .9; }
@media (prefers-color-scheme: dark) { .sec-chip .sec-wl { color: #e6902c; } }

/* ——— 两年课表：跟「本学期课表」并列的一块 ——— */
.road-section {
  /* 跟「本学期课表」是并列的两个框，就得长得一样。
     原来用半透明灰底，背面那几团装饰色块会透上来，
     两个框并排一看，一个奶白一个花的，不像是一对。 */
  display: block; margin: 0 0 12px; border-radius: 20px;
  background: var(--panel, #fffdf8); border: 1px solid rgba(0, 0, 0, .07);
}
.road-section > summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 14px; cursor: pointer; list-style: none;
}
.road-section > summary::-webkit-details-marker { display: none; }
.road-more { flex: 0 0 auto; font-size: 11.5px; opacity: .6; white-space: nowrap; }
.road-more::after { content: " ▾"; }
.road-section[open] > summary .road-more::after { content: " ▴"; }
.road-body { padding: 0 14px 12px; }
/* 首屏高度预算是 3 屏。加了「问分班」「课量」「两年课表」三块之后
   本来就紧，这里收一点边距把它压回预算内。 */
.week-card { padding-top: 14px; }
.ask-math { margin-top: 0; }
.road-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; min-width: 0; }
.road-head h3 { margin: 0; font-size: 15px; }
.road-verdict {
  padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 620;
}
.road-verdict.ok { background: rgba(23, 166, 115, .14); color: #12805a; }
.road-verdict.heavy, .road-verdict.warn { background: rgba(230, 144, 44, .16); color: #a35f12; }
.road-section p { font-size: 12.5px; line-height: 1.6; margin: 0 0 7px; opacity: .85; }
.road-section .fold-note { font-size: 11.5px; opacity: .6; }

.road-lock-what { font-size: 12.5px; }
.road-lock-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 6px; }
.road-lock-form input {
  flex: 1 1 180px; min-width: 0; padding: 8px 11px; font: inherit; font-size: 13px;
  border: 1px solid var(--line, #d8dee9); border-radius: 10px;
  background: var(--card, #fff); color: inherit;
}
.road-lock-form input:focus { outline: 2px solid #2f6df6; outline-offset: 1px; }
.road-lock-form button {
  flex: 0 0 auto; padding: 8px 18px; border-radius: 10px; border: 0; cursor: pointer;
  background: #2f6df6; color: #fff; font: inherit; font-size: 13px; font-weight: 620;
}
.road-lock-why { font-size: 11px !important; opacity: .6 !important; }
.road-lock-msg { min-height: 1em; font-size: 11.5px; color: #c2751c; }
@media (prefers-color-scheme: dark) {
  .road-section { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .09); }
  .road-verdict.ok { color: #3ddc9a; }
  .road-verdict.heavy, .road-verdict.warn { color: #e6902c; }
  .road-lock-form input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); }
  .road-lock-msg { color: #e6902c; }
}
/* 独立成块之后，路线图那几条 li 不再长在 .prep-list 里了，得单独再声明一次 */
.road-section .road-list { display: block; margin: 4px 0 8px; padding: 0; list-style: none; }
.road-section .road-term {
  display: block; padding: 7px 0 7px 11px; margin: 0 0 2px;
  border-left: 2px solid var(--line, #d8dee9);
}
.road-section .road-term.now { border-left-color: #2f6df6; }
.road-section .road-term.guess { border-left-style: dashed; opacity: .88; }
.road-section .road-term > b { font-size: 12.5px; font-weight: 680; }
.road-section .road-term > em {
  float: right; font-style: normal; font-size: 11.5px; opacity: .6;
  font-variant-numeric: tabular-nums;
}
.road-section .road-courses { display: block; margin: 5px 0 0; padding: 0; list-style: none; }
.road-section .road-courses li { display: block; padding: 2px 0; font-size: 12px; line-height: 1.45; }
.road-section .road-courses li.road-off { opacity: .55; }
.road-section .road-courses li b { font-weight: 640; }
.road-section .road-courses li small { display: block; font-size: 10.5px; opacity: .55; }
.road-section .road-courses li i { font-style: normal; font-size: 10.5px; color: #c2751c; }

/* ——— 「不是你？」+ 换人清除 ——— */
.hero-notme {
  margin-left: 8px; padding: 2px 9px; font-size: 11.5px; cursor: pointer;
  border: 1px solid var(--line, #d8dee9); border-radius: 999px;
  background: transparent; color: inherit; opacity: .62;
}
.hero-notme:hover { opacity: 1; background: rgba(0, 0, 0, .04); }
.hero-slim.hero-reset { border-left: 3px solid #d64545; }
.hero-slim.hero-reset .hero-slim-text span { font-size: 12.5px; line-height: 1.55; }
.hero-go.danger { background: #d64545; }
.hero-go.danger:hover { background: #c03a3a; }
.hero-stale {
  margin: 8px 0 0; font-size: 11.5px; opacity: .7; line-height: 1.6;
}
.hero-stale button {
  margin-left: 6px; padding: 2px 9px; font-size: 11.5px; cursor: pointer;
  border: 1px solid var(--line, #d8dee9); border-radius: 999px;
  background: transparent; color: inherit;
}
.hero-stale button:hover { background: rgba(0, 0, 0, .04); }

/* ——— 用完了自己清 ——— */
.week-wipe {
  padding: 7px 12px; font-size: 12px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line, #d8dee9); border-radius: 999px;
  background: transparent; color: inherit; opacity: .7;
}
.week-wipe:hover { opacity: 1; background: rgba(0, 0, 0, .04); }
.plan-notice.wipe { background: #fdf3e6; border-left-color: #e6902c; }
.plan-notice.wipe > i { color: #e6902c; }
.wipe-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wipe-go {
  padding: 7px 15px; font-size: 12.5px; font-weight: 620; cursor: pointer;
  border: 0; border-radius: 999px; background: #d64545; color: #fff;
}
.wipe-go:hover { background: #c03a3a; }
.wipe-no {
  padding: 7px 13px; font-size: 12.5px; cursor: pointer; color: inherit;
  border: 1px solid var(--line, #d8dee9); border-radius: 999px; background: transparent;
}
@media (prefers-color-scheme: dark) {
  .plan-notice.wipe { background: #2c2418; }
}

/* 头部多了「清掉痕迹」之后，390px 上标题和 units 都被挤到换行。
   标题不换行，units 可以省略，两个按钮各自保持完整 —— 按钮是要点的，
   截断了就点不准。 */
.week-head { flex-wrap: wrap; gap: 8px; }
.week-head h3 { flex: 0 0 auto; white-space: nowrap; }
.week-units {
  flex: 1 1 auto; min-width: 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.week-export, .week-wipe { flex: 0 0 auto; }
@media (max-width: 420px) {
  .week-head h3 { font-size: 1.05rem; }
  .week-units { font-size: .8rem; }
  .week-export, .week-wipe { padding: 6px 10px; font-size: 11.5px; }
}

/* 「在这所学校它叫 X」—— 可点的专业切换 */
.prep-alts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.prep-alts > span { font-size: 12px; opacity: .7; }
.prep-alts button {
  padding: 5px 11px; font-size: 12px; cursor: pointer; color: inherit;
  border: 1px solid var(--line, #d8dee9); border-radius: 999px;
  background: rgba(0, 0, 0, .02);
}
.prep-alts button:hover { background: rgba(230, 144, 44, .14); border-color: #e6902c; }


/* ——— 周末筛选：默认不选，但要看得见它存在 ——— */
#dayFilters button.weekend:not(.active) {
  border-style: dashed;
  opacity: .72;
}
.day-hint {
  margin: 6px 0 0; font-size: 11px; line-height: 1.5; opacity: .6;
}


/* ——— 首屏：三个下拉一行，其余收进次要一行 ——— */
.quick-start-more {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px; margin-top: 10px;
}
.quick-start-more > label > span, .starter-completed.secondary > span {
  font-size: 12px; opacity: .7;
}
.starter-completed.secondary { margin-top: 10px; }
.starter-completed.secondary small { opacity: .55; }

/* 人工提示的小标签（见 instructor-notes.js）。
   avoid 用警示色，prefer 用肯定色 —— 两种都是"人写的判断"，
   跟旁边那个抓来的分数在视觉上要分得开。 */
.sec-chip .sec-note {
  font-size: 10px; line-height: 1; padding: 2px 5px; border-radius: 999px;
  text-decoration: none; font-weight: 700; white-space: nowrap; cursor: help;
}
.sec-chip .sec-note.warn { background: #fff1e6; color: #a2500a; border: 1px solid #f3d3b3; }
.sec-chip .sec-note.good { background: #e8f5ec; color: #1c6b3a; border: 1px solid #bfe2cc; }
@media (prefers-color-scheme: dark) {
  .sec-chip .sec-note.warn { background: #3a2a17; color: #f0c08a; border-color: #6a4a22; }
  .sec-chip .sec-note.good { background: #17301f; color: #9fd8b4; border-color: #2f5c3d; }
}
