:root {
  color-scheme: light;
  --page: #f3f1f7;
  --surface: #ffffff;
  --surface-soft: #eeebf5;
  --surface-strong: #242137;
  --text: #211f2b;
  --muted: #6e687b;
  --line: #ded9e8;
  --accent: #51489b;
  --accent-strong: #40377e;
  --accent-soft: #e9e5fb;
  --mint: #dff2e9;
  --mint-text: #226044;
  --amber: #fff0cc;
  --amber-text: #7b4d00;
  --rose: #fbe3e7;
  --rose-text: #8c3345;
  --shadow: 0 16px 48px rgba(44, 36, 72, 0.09);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--page); scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(138, 125, 207, 0.12), transparent 28rem),
    var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button, textarea, input, select { font: inherit; }
button { touch-action: manipulation; }
button:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(81, 72, 155, 0.3); outline-offset: 3px; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  border-radius: 10px;
  background: var(--surface-strong);
  color: white;
  padding: 0.7rem 1rem;
}
.skip-link:focus { top: 1rem; }

.app-shell { min-height: 100vh; }
.desktop-rail { display: none; }
.workspace { min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(222, 217, 232, 0.86);
  background: rgba(243, 241, 247, 0.9);
  backdrop-filter: blur(18px);
}

.topbar h1 { margin: 0.1rem 0 0; font-size: clamp(1.28rem, 6vw, 1.72rem); line-height: 1.15; letter-spacing: -0.025em; }
.eyebrow, .kicker { margin: 0; color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; }
.top-actions { display: flex; align-items: center; gap: 0.7rem; }
.dispatch-button { min-height: 42px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent); color: white; padding: 0 0.7rem; font-weight: 800; cursor: pointer; }
.dispatch-button b { display: none; }
.agent-status { display: none; align-items: center; gap: 0.45rem; color: var(--mint-text); font-size: 0.82rem; font-weight: 750; }
.agent-status i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #44ad79; box-shadow: 0 0 0 5px rgba(68, 173, 121, 0.12); }
.avatar-button { width: 42px; height: 42px; border: 0; border-radius: 14px; background: var(--surface-strong); color: white; font-weight: 800; cursor: pointer; }

main { padding: 1rem 1rem 7rem; }
.view { max-width: 1180px; margin: 0 auto; animation: view-in 180ms ease-out; }
.view[hidden] { display: none; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.focus-banner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  border-radius: 24px;
  background: var(--surface-strong);
  color: white;
  padding: 1.15rem;
  box-shadow: var(--shadow);
}
.banner-label { display: inline-flex; border-radius: 999px; background: rgba(255,255,255,0.12); color: #d8d2ff; padding: 0.28rem 0.58rem; font-size: 0.72rem; font-weight: 800; }
.focus-banner p { max-width: 760px; margin: 0.55rem 0 0; font-size: 1.02rem; font-weight: 650; line-height: 1.55; }
.text-button { min-height: 44px; border: 0; border-radius: 12px; background: white; color: var(--surface-strong); padding: 0 1rem; font-weight: 800; cursor: pointer; }

.guardrail-card { display: grid; gap: 0.8rem; margin-top: 0.85rem; border: 1px solid #d6d0ea; border-radius: 20px; background: rgba(255,255,255,0.82); padding: 1rem; }
.guardrail-heading { display: flex; align-items: center; gap: 0.7rem; }
.guardrail-heading > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 900; }
.guardrail-heading h2 { margin: 0.08rem 0 0; font-size: 1rem; }
.policy-grid { display: grid; gap: 0.6rem; }
.policy-grid > div { border-radius: 14px; background: var(--mint); padding: 0.75rem; }
.policy-grid .policy-locked { background: var(--amber); }
.policy-grid strong { color: var(--mint-text); font-size: 0.82rem; }
.policy-grid .policy-locked strong { color: var(--amber-text); }
.policy-grid p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.76rem; }

.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin: 0.85rem 0; }
.metric-card { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.8); padding: 0.9rem; }
.metric-card span { color: var(--muted); font-size: 0.78rem; font-weight: 650; }
.metric-card strong { display: block; margin-top: 0.1rem; font-size: 1.65rem; letter-spacing: -0.04em; }
.metric-card small { display: block; color: var(--muted); font-size: 0.72rem; }

.content-grid, .schedule-layout { display: grid; gap: 0.85rem; }
.primary-column, .secondary-column { display: grid; align-content: start; gap: 0.85rem; min-width: 0; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,0.94); padding: 1rem; box-shadow: 0 5px 18px rgba(48, 39, 75, 0.035); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.section-heading h2, .page-intro h2, .strategy-card h2 { margin: 0.12rem 0 0; font-size: 1.18rem; letter-spacing: -0.02em; }
.quiet-button { min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--accent); padding: 0 0.4rem; font-weight: 750; cursor: pointer; white-space: nowrap; }

.stack-list { display: grid; gap: 0.65rem; }
.blocker-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.78rem; border-radius: 16px; background: var(--page); padding: 0.9rem; }
.severity-line { width: 5px; border-radius: 99px; background: #d4a23d; }
.severity-line.danger { background: #bb5064; }
.card-title-row { display: flex; justify-content: space-between; gap: 0.8rem; }
.card-title-row h3 { margin: 0; font-size: 0.98rem; line-height: 1.4; }
.blocker-card p { margin: 0.32rem 0 0; color: var(--muted); font-size: 0.84rem; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-top: 0.72rem; color: var(--muted); font-size: 0.76rem; }
.owner-pill, .status-pill, .readiness-badge { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 0.28rem 0.55rem; background: var(--surface-soft); color: var(--text); font-size: 0.74rem; font-weight: 750; }
.inline-button { min-height: 38px; border: 0; border-radius: 10px; background: var(--surface); color: var(--accent); padding: 0 0.68rem; font-weight: 800; cursor: pointer; }

.strategy-card { background: linear-gradient(145deg, #fcfbff 0%, #efebff 100%); }
.strategy-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.signal-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 15px; background: var(--accent); color: white; font-size: 1.25rem; }
.muted-copy { color: var(--muted); }
.strategy-card .muted-copy { margin: 0.55rem 0; font-size: 0.88rem; }
.evidence-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.9rem 0; }
.evidence-row span { border-radius: 10px; background: rgba(255,255,255,0.74); padding: 0.42rem 0.55rem; color: var(--accent-strong); font-size: 0.76rem; font-weight: 800; }
.recommendation { border-left: 3px solid var(--accent); margin: 0.9rem 0; padding-left: 0.78rem; font-size: 0.86rem; font-weight: 650; }
.button-row, .dialog-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.primary-button, .secondary-button { min-height: 44px; border-radius: 12px; padding: 0 0.9rem; font-weight: 800; cursor: pointer; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: white; }
.primary-button:hover { background: var(--accent-strong); }
.primary-button:disabled { cursor: not-allowed; border-color: #b8b2c6; background: #b8b2c6; }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--text); }

.department-quick { display: grid; gap: 0.7rem; }
.department-quick-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; }
.department-quick-row strong { font-size: 0.88rem; }
.department-quick-row span { color: var(--muted); font-size: 0.76rem; }
.progress-track { grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 99px; background: #e8e4ed; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #8579d1); }

.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 3.5rem 1rem minmax(0, 1fr); gap: 0.55rem; min-height: 72px; }
.timeline.compact .timeline-item:nth-child(n+4) { display: none; }
.timeline-time { color: var(--muted); font-size: 0.76rem; font-weight: 700; padding-top: 0.08rem; }
.timeline-marker { position: relative; }
.timeline-marker::before { content: ""; position: absolute; left: 0.34rem; top: 0.42rem; bottom: -0.55rem; width: 1px; background: var(--line); }
.timeline-marker::after { content: ""; position: absolute; left: 0; top: 0.28rem; width: 0.72rem; height: 0.72rem; border: 3px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.timeline-item:last-child .timeline-marker::before { display: none; }
.timeline-copy strong { display: block; font-size: 0.88rem; }
.timeline-copy span { color: var(--muted); font-size: 0.76rem; }

.page-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.page-intro h2 { font-size: clamp(1.45rem, 7vw, 2rem); }
.page-intro p:not(.kicker) { max-width: 680px; margin: 0.35rem 0 0; color: var(--muted); }
.selection-tools { display: flex; align-items: center; gap: 0.7rem; }
.selection-tools span { color: var(--muted); font-size: 0.82rem; }

.approval-grid, .department-grid { display: grid; gap: 0.8rem; }
.approval-card { position: relative; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 1rem; transition: border-color 150ms ease, transform 150ms ease; }
.approval-card:hover { border-color: #b8b1cf; transform: translateY(-1px); }
.approval-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(81,72,155,0.09); }
.approval-select { position: absolute; right: 1rem; top: 1rem; width: 22px; height: 22px; accent-color: var(--accent); }
.approval-card h3 { max-width: calc(100% - 2rem); margin: 0.25rem 0 0; font-size: 1.02rem; }
.approval-card p { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.84rem; }
.approval-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.7rem; align-items: center; margin-top: 0.9rem; }
.approval-card .button-row { margin-top: 0.9rem; }

.batch-review-workspace {
  overflow: hidden;
  border: 1px solid #cbc4e4;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.batch-review-header { display: grid; gap: 1rem; background: linear-gradient(145deg, #29253f 0%, #433b76 100%); color: white; padding: 1.15rem; }
.batch-review-header h2 { margin: 0.55rem 0 0; font-size: clamp(1.35rem, 6vw, 2rem); line-height: 1.2; letter-spacing: -0.03em; }
.batch-review-header p { max-width: 760px; margin: 0.55rem 0 0; color: #d6d0e7; }
.batch-review-header .primary-button { border-color: white; background: white; color: var(--surface-strong); }
.batch-review-header .primary-button:disabled { border-color: #7d7694; background: #7d7694; color: #ddd9e8; }
.batch-eyebrow { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.batch-eyebrow .status-pill { background: #dff2e9; color: var(--mint-text); }
.safety-pill { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; color: #efeaff; padding: 0.28rem 0.55rem; font-size: 0.74rem; font-weight: 750; }
.batch-overview { display: grid; gap: 0.72rem; border-bottom: 1px solid var(--line); padding: 1rem 1.15rem; }
.batch-progress-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 0.7rem; }
.batch-progress-copy strong { font-size: 0.94rem; }
.batch-progress-copy span { color: var(--muted); font-size: 0.76rem; }
.batch-progress { height: 9px; overflow: hidden; border-radius: 999px; background: #e8e4ed; }
.batch-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7770c5, #70bea0); transition: width 220ms ease; }
.batch-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.45rem; }
.batch-stats div { border-radius: 13px; background: var(--page); padding: 0.58rem; }
.batch-stats span { display: block; color: var(--muted); font-size: 0.68rem; }
.batch-stats strong { font-size: 1.05rem; }
.batch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.15rem 0; }
.batch-toolbar strong, .batch-toolbar span { display: block; }
.batch-toolbar span { color: var(--muted); font-size: 0.76rem; }
.batch-script-list { display: grid; gap: 0.7rem; padding: 0.8rem 1.15rem 1.15rem; }
.batch-script-card { border: 1px solid var(--line); border-radius: 19px; background: #fbfaff; padding: 0.95rem; transition: border-color 150ms ease, box-shadow 150ms ease; }
.batch-script-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(81,72,155,0.1); }
.batch-script-top { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; }
.script-order { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; background: var(--surface-strong); color: white; font-size: 0.76rem; font-weight: 850; }
.batch-script-select { width: 25px; height: 25px; accent-color: var(--accent); }
.batch-script-card h3 { margin: 0.72rem 0 0; font-size: 1.04rem; line-height: 1.4; }
.batch-script-card > p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.84rem; }
.batch-script-card blockquote { margin: 0.75rem 0 0; border-left: 3px solid var(--accent); padding-left: 0.72rem; font-size: 0.88rem; font-weight: 700; }
.batch-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.65rem; margin-top: 0.85rem; }
.decision-lock { color: var(--muted); font-size: 0.74rem; }
.batch-status-可拍攝 { background: var(--mint); color: var(--mint-text); }
.batch-status-修改中 { background: var(--amber); color: var(--amber-text); }
.batch-status-不採用 { background: var(--rose); color: var(--rose-text); }
.batch-decision-dock { position: sticky; bottom: 5.8rem; z-index: 10; display: grid; gap: 0.75rem; border-top: 1px solid var(--line); background: rgba(255,255,255,0.97); padding: 0.9rem 1.15rem calc(0.9rem + env(safe-area-inset-bottom)); box-shadow: 0 -12px 30px rgba(36,33,55,0.08); backdrop-filter: blur(16px); }
.batch-note-row { display: grid; gap: 0.6rem; }
.batch-note-row strong, .batch-note-row span { display: block; }
.batch-note-row span { color: var(--muted); font-size: 0.74rem; }
.batch-note-row textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 12px; background: var(--page); color: var(--text); padding: 0.7rem; line-height: 1.4; }
.batch-decision-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
.batch-decision-buttons button { min-height: 48px; padding: 0 0.55rem; }
.danger-button { min-height: 44px; border: 1px solid #e7b9c2; border-radius: 12px; background: var(--rose); color: var(--rose-text); padding: 0 0.9rem; font-weight: 800; cursor: pointer; }
.danger-button:disabled { cursor: not-allowed; opacity: 0.46; }
.batch-audit { border-top: 1px solid var(--line); padding: 0.8rem 1.15rem 1.1rem; }
.batch-audit summary { cursor: pointer; color: var(--accent); font-size: 0.82rem; font-weight: 800; }
.batch-audit ol { display: grid; gap: 0.5rem; list-style: none; margin: 0.8rem 0 0; padding: 0; }
.batch-audit li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.55rem; color: var(--muted); font-size: 0.76rem; }
.batch-audit li strong { color: var(--text); }
.secondary-review-heading { display: flex; flex-direction: column; align-items: flex-start; gap: 0.8rem; margin: 1.5rem 0 0.8rem; }
.secondary-review-heading h2 { margin: 0.12rem 0 0; font-size: 1.18rem; }
.batch-script-dialog { width: min(780px, calc(100% - 1rem)); }
.batch-dialog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.76rem; }
.batch-angle { border-radius: 14px; background: var(--accent-soft); color: var(--accent-strong); padding: 0.8rem; font-weight: 700; }
.teleprompter-copy { white-space: pre-line; font-size: 1rem; line-height: 1.8; }
.batch-detail-grid { display: grid; gap: 0.65rem; }
.batch-detail-grid section { border-radius: 14px; background: var(--page); padding: 0.8rem; }
.batch-detail-grid h3 { margin-top: 0; }
.batch-detail-grid ol, .batch-detail-grid ul { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.84rem; }
.batch-dialog-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.schedule-layout { align-items: start; }
.publishing-panel { margin-top: 0.85rem; }
.publishing-subcopy { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.82rem; }
.publishing-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; margin-bottom: 0.85rem; }
.publish-stat { border-radius: 14px; background: var(--page); padding: 0.72rem; }
.publish-stat span { display: block; color: var(--muted); font-size: 0.72rem; }
.publish-stat strong { display: block; margin-top: 0.08rem; font-size: 1.25rem; }
.publishing-list { display: grid; gap: 0.55rem; }
.publishing-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.65rem; border-bottom: 1px solid var(--line); padding: 0.7rem 0; }
.publishing-row:last-child { border-bottom: 0; }
.publishing-row h3 { margin: 0.2rem 0 0; font-size: 0.9rem; }
.publishing-row p { margin: 0.18rem 0 0; color: var(--muted); font-size: 0.75rem; }
.platform-badge { display: inline-flex; border-radius: 8px; background: var(--surface-soft); color: var(--accent-strong); padding: 0.2rem 0.45rem; font-size: 0.68rem; font-weight: 850; }
.publish-status { min-width: 4.6rem; text-align: center; }
.publish-status.is-live { background: var(--mint); color: var(--mint-text); }
.publish-status.is-waiting { background: var(--amber); color: var(--amber-text); }
.carousel-rule { display: flex; gap: 0.7rem; margin-top: 0.85rem; border-radius: 14px; background: var(--accent-soft); padding: 0.8rem; }
.carousel-rule > span { color: var(--accent-strong); font-size: 1.25rem; }
.carousel-rule strong { font-size: 0.84rem; }
.carousel-rule p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.76rem; }
.rule-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }
.rule-chips span { border: 1px solid #d5ceef; border-radius: 999px; background: rgba(255,255,255,0.65); color: var(--accent-strong); padding: 0.2rem 0.45rem; font-size: 0.68rem; font-weight: 750; }
.shoot-card { background: var(--surface-strong); color: white; }
.shoot-card .kicker, .shoot-card p, .shoot-card small { color: #c8c2da; }
.shoot-card h3 { margin: 1rem 0 0.35rem; font-size: 1.2rem; }
.shoot-date { display: flex; align-items: center; gap: 0.7rem; margin-top: 1rem; }
.shoot-date strong { font-size: 4.2rem; line-height: 0.9; letter-spacing: -0.08em; }
.shoot-date span { color: #beb7d1; font-size: 0.78rem; font-weight: 800; line-height: 1.35; }
.progress-line { height: 8px; overflow: hidden; margin: 1rem 0 0.45rem; border-radius: 99px; background: rgba(255,255,255,0.12); }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: #b7aeff; }

.department-card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 1rem; }
.department-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; }
.department-card h3 { margin: 0; font-size: 1.03rem; }
.department-card p { margin: 0.22rem 0 0; color: var(--muted); font-size: 0.8rem; }
.department-card .progress-track { margin: 1rem 0 0.65rem; }
.department-next { display: flex; justify-content: space-between; gap: 0.7rem; color: var(--muted); font-size: 0.78rem; }
.course-page-intro { align-items: flex-start; }
.course-direction { display: grid; gap: 1rem; overflow: hidden; border-radius: 24px; background: linear-gradient(135deg, #242137 0%, #38315f 62%, #51489b 100%); color: white; padding: 1.15rem; box-shadow: var(--shadow); }
.course-direction > div { display: flex; align-items: flex-start; gap: 0.85rem; }
.course-direction-mark { display: grid; flex: 0 0 auto; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,0.24); border-radius: 15px; background: rgba(255,255,255,0.1); color: #ded9ff; font-weight: 900; }
.course-direction .kicker { color: #c8c2e8; }
.course-direction h2 { margin: 0.12rem 0 0; font-size: clamp(1.15rem, 5vw, 1.65rem); letter-spacing: -0.025em; }
.course-direction p:not(.kicker) { max-width: 780px; margin: 0.45rem 0 0; color: #d5d0e4; font-size: 0.88rem; }
.course-horizon { width: fit-content; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; background: rgba(255,255,255,0.09); color: #e5e1f1; padding: 0.38rem 0.68rem; font-size: 0.76rem; font-weight: 750; }
.course-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin: 0.85rem 0; }
.course-stat { min-width: 0; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,0.88); padding: 0.85rem; }
.course-stat span { display: block; color: var(--muted); font-size: 0.74rem; font-weight: 700; }
.course-stat strong { display: block; margin-top: 0.18rem; font-size: clamp(1rem, 5vw, 1.4rem); line-height: 1.25; letter-spacing: -0.025em; }
.course-layout, .course-main-column, .course-side-column { display: grid; align-content: start; gap: 0.85rem; }
.section-subcopy { margin: 0.24rem 0 0; color: var(--muted); font-size: 0.8rem; }
.course-list, .course-candidate-list, .course-rhythm, .school-roadmap { display: grid; gap: 0.7rem; }
.course-card { border: 1px solid var(--line); border-radius: 18px; background: #fbfaff; padding: 0.9rem; }
.course-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.7rem; }
.course-card h3 { margin: 0.15rem 0 0; font-size: 1rem; }
.course-progress-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; margin-top: 0.95rem; }
.course-progress-row strong { font-size: 1.55rem; letter-spacing: -0.04em; }
.course-progress-row span { color: var(--muted); font-size: 0.74rem; }
.course-progress { margin-top: 0.35rem; }
.course-next { margin-top: 0.9rem; border-left: 3px solid var(--accent); padding-left: 0.7rem; }
.course-next span { color: var(--muted); font-size: 0.7rem; font-weight: 800; }
.course-next p { margin: 0.12rem 0 0; font-size: 0.83rem; font-weight: 700; }
.course-blocker { display: flex; align-items: flex-start; gap: 0.55rem; margin-top: 0.75rem; border-radius: 12px; background: var(--amber); padding: 0.65rem; color: var(--amber-text); }
.course-blocker > span { display: grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(123,77,0,0.25); border-radius: 50%; font-size: 0.72rem; font-weight: 900; }
.course-blocker p { margin: 0; font-size: 0.75rem; }
.module-details { margin-top: 0.8rem; border-top: 1px solid var(--line); padding-top: 0.75rem; }
.module-details summary { min-height: 40px; color: var(--accent); font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.module-list { display: grid; gap: 0.65rem; padding-top: 0.35rem; }
.module-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.45rem 0.8rem; align-items: center; }
.module-row strong { display: block; font-size: 0.8rem; }
.module-row span { display: block; color: var(--muted); font-size: 0.68rem; }
.module-row b { color: var(--accent-strong); font-size: 0.75rem; }
.course-source-row { display: grid; gap: 0.7rem; border-bottom: 1px solid var(--line); padding: 0.3rem 0 0.85rem; }
.course-source-row:last-child { border-bottom: 0; padding-bottom: 0; }
.course-source-row h3 { margin: 0.28rem 0 0; font-size: 0.9rem; }
.course-source-row p { margin: 0.25rem 0; color: var(--muted); font-size: 0.78rem; }
.course-source-row small { color: var(--accent-strong); font-size: 0.72rem; font-weight: 750; }
.course-source-row button { width: 100%; }
.course-source-row button:disabled { cursor: default; color: var(--mint-text); background: var(--mint); }
.course-reminder { margin-bottom: 0.75rem; border: 1px solid #d5ceef; border-radius: 15px; background: var(--accent-soft); padding: 0.8rem; }
.course-reminder > strong { display: block; color: var(--accent-strong); font-size: 0.82rem; }
.course-reminder > p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.74rem; }
.course-reminder > small { display: block; margin-top: 0.55rem; color: var(--muted); font-size: 0.68rem; }
.rhythm-row { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0.2rem 0.65rem; border-radius: 15px; background: var(--page); padding: 0.75rem; }
.rhythm-row strong { grid-row: 1 / span 2; display: grid; place-items: center; min-height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); font-size: 0.78rem; }
.rhythm-row p { margin: 0; font-size: 0.78rem; font-weight: 680; }
.rhythm-row span { color: var(--muted); font-size: 0.68rem; }
.school-step { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.65rem; padding-bottom: 0.9rem; }
.school-step:not(:last-child)::after { content: ""; position: absolute; left: 0.95rem; top: 2.1rem; bottom: 0; width: 1px; background: var(--line); }
.school-step > span { z-index: 1; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface-soft); color: var(--muted); font-size: 0.75rem; font-weight: 850; }
.school-step.is-current > span { background: var(--accent); color: white; box-shadow: 0 0 0 5px var(--accent-soft); }
.school-step strong { display: block; font-size: 0.82rem; }
.school-step p { margin: 0.18rem 0 0; color: var(--muted); font-size: 0.72rem; }
.school-step b { grid-column: 2; width: fit-content; border-radius: 999px; background: var(--surface-soft); color: var(--muted); padding: 0.2rem 0.45rem; font-size: 0.66rem; }
.school-step.is-current b { background: var(--mint); color: var(--mint-text); }
.activity-panel { margin-top: 0.85rem; }
.task-list { display: grid; gap: 0.65rem; }
.task-empty { border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); padding: 1rem; text-align: center; font-size: 0.84rem; }
.task-row { display: grid; gap: 0.55rem; border-radius: 16px; background: var(--page); padding: 0.85rem; }
.task-row-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; }
.task-row h3 { margin: 0; font-size: 0.92rem; }
.task-row p { margin: 0.22rem 0 0; color: var(--muted); font-size: 0.78rem; }
.task-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.task-approval { background: var(--amber); color: var(--amber-text); }
.knowledge-intro { margin: -0.2rem 0 0.8rem; color: var(--muted); font-size: 0.82rem; }
.knowledge-list { display: grid; gap: 0.6rem; }
.knowledge-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; border-radius: 15px; background: var(--page); padding: 0.8rem; }
.knowledge-row h3 { margin: 0; font-size: 0.9rem; }
.knowledge-row p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.75rem; }
.knowledge-row .is-locked { background: var(--rose); color: var(--rose-text); }
.updated-at { color: var(--muted); font-size: 0.78rem; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { position: relative; border-left: 1px solid var(--line); margin-left: 0.35rem; padding: 0 0 0.95rem 1rem; color: var(--muted); font-size: 0.82rem; }
.event-list li::before { content: ""; position: absolute; left: -0.31rem; top: 0.25rem; width: 0.52rem; height: 0.52rem; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent); }

.mobile-nav {
  position: fixed;
  z-index: 30;
  left: 0.75rem;
  right: 0.75rem;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  background: rgba(36,33,55,0.96);
  padding: 0.45rem;
  box-shadow: 0 18px 50px rgba(27,24,43,0.28);
  backdrop-filter: blur(18px);
}
.mobile-nav-button { position: relative; min-height: 54px; border: 0; border-radius: 15px; background: transparent; color: #afa9c2; cursor: pointer; }
.mobile-nav-button > span { display: block; font-size: 1.12rem; line-height: 1.2; }
.mobile-nav-button small { display: block; margin-top: 0.12rem; font-size: 0.7rem; font-weight: 750; }
.mobile-nav-button.is-active { background: rgba(255,255,255,0.12); color: white; }
.mobile-nav-button b { position: absolute; right: 0.65rem; top: 0.35rem; min-width: 1.15rem; border-radius: 99px; background: #f5c3cd; color: #732c3c; font-size: 0.65rem; }

.review-dialog { width: min(720px, calc(100% - 1rem)); max-height: calc(100dvh - 1rem); border: 0; border-radius: 24px; background: transparent; padding: 0; color: var(--text); }
.review-dialog::backdrop { background: rgba(27,24,43,0.62); backdrop-filter: blur(4px); }
.dialog-shell { max-height: calc(100dvh - 1rem); overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 30px 80px rgba(20,16,36,0.28); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: 1rem; }
.dialog-header h2 { margin: 0.15rem 0 0; font-size: 1.18rem; }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--surface-soft); color: var(--text); font-size: 1.5rem; cursor: pointer; }
.dialog-body { max-height: calc(100dvh - 180px); overflow: auto; padding: 1rem; }
.dialog-body blockquote { margin: 1rem 0; border-radius: 16px; background: var(--page); padding: 1rem; font-size: 0.94rem; font-weight: 650; }
.dialog-body h3 { margin: 1rem 0 0.55rem; font-size: 0.9rem; }
.check-list { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.check-list span { border-radius: 10px; background: var(--mint); color: var(--mint-text); padding: 0.38rem 0.58rem; font-size: 0.76rem; font-weight: 750; }
.feedback-field { display: grid; gap: 0.45rem; margin-top: 0.8rem; font-size: 0.84rem; font-weight: 800; }
.feedback-field textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 14px; background: #fbfaff; color: var(--text); padding: 0.78rem; font-weight: 450; line-height: 1.5; }
.feedback-field input, .feedback-field select { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 14px; background: #fbfaff; color: var(--text); padding: 0 0.78rem; font-weight: 500; }
.form-grid { display: grid; gap: 0.2rem; }
.form-note { margin: 0 0 0.35rem; border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 0.75rem; color: var(--muted); font-size: 0.8rem; }
.dialog-actions { justify-content: flex-end; border-top: 1px solid var(--line); padding: 0.85rem 1rem; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: 6.2rem; width: min(420px, calc(100% - 2rem)); transform: translateX(-50%); border-radius: 14px; background: var(--surface-strong); color: white; padding: 0.85rem 1rem; box-shadow: 0 16px 45px rgba(27,24,43,0.3); font-size: 0.84rem; font-weight: 700; }
.toast[hidden] { display: none; }

@media (min-width: 560px) {
  .agent-status { display: flex; }
  .dispatch-button b { display: inline; }
  .focus-banner { flex-direction: row; align-items: center; justify-content: space-between; padding: 1.4rem; }
  .policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publishing-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .course-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .course-source-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .course-source-row button { width: auto; min-width: 7rem; }
  .page-intro { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .approval-grid, .department-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-review-header { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 1.4rem; }
  .batch-script-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-note-row { grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr); align-items: center; }
  .secondary-review-heading { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .batch-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .app-shell { display: grid; grid-template-columns: 92px minmax(0, 1fr); }
  .desktop-rail { position: sticky; top: 0; display: flex; flex-direction: column; align-items: center; height: 100vh; background: var(--surface-strong); padding: 1.2rem 0.7rem; }
  .brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: #ded9ff; color: var(--accent-strong); font-size: 1.2rem; font-weight: 900; }
  .rail-nav { display: grid; width: 100%; gap: 0.55rem; margin-top: 2.2rem; }
  .rail-button { min-height: 60px; border: 0; border-radius: 16px; background: transparent; color: #a9a3b9; cursor: pointer; }
  .rail-button span { display: block; font-size: 1.18rem; }
  .rail-button small { display: block; margin-top: 0.18rem; font-size: 0.68rem; font-weight: 750; }
  .rail-button.is-active { background: rgba(255,255,255,0.12); color: white; }
  .rail-bottom { width: 100%; margin-top: auto; }
  .topbar { min-height: 88px; padding: 1rem 2rem; }
  main { padding: 1.3rem 2rem 3rem; }
  .mobile-nav { display: none; }
  .batch-decision-dock { bottom: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .batch-decision-buttons { min-width: 420px; }
  .content-grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr); }
  .schedule-layout { grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr); }
  .course-direction { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 1.4rem; }
  .course-layout { grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr); }
  .toast { bottom: 2rem; }
}

@media (min-width: 1180px) {
  .approval-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .department-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel { padding: 1.2rem; }
  .batch-script-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

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