:root {
  --ink: #14273a;
  --muted: #607184;
  --navy: #0b3558;
  --navy-2: #164f79;
  --teal: #0b8577;
  --teal-soft: #e3f5f1;
  --blue-soft: #eaf2f8;
  --paper: #ffffff;
  --canvas: #f4f7fa;
  --line: #dce5ec;
  --amber: #a56008;
  --amber-soft: #fff4dc;
  --red: #b43b3b;
  --red-soft: #ffeded;
  --green: #18785f;
  --green-soft: #e5f5ef;
  --purple: #5b4ab0;
  --purple-soft: #efedff;
  --shadow: 0 14px 38px rgba(25, 49, 72, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input { font: inherit; }
button { cursor: pointer; }

.site-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px max(28px, calc((100vw - 1440px) / 2));
  background: var(--navy);
  color: white;
  border-bottom: 5px solid #2db9a3;
}
.brand-mark { width: 58px; height: 58px; flex: 0 0 auto; border-radius: 15px; display: grid; place-items: center; background: white; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,.2); }
.brand-mark img { width: 54px; height: 54px; object-fit: contain; }
.brand-copy { min-width: 0; }
.brand-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; }
.eyebrow, .step-label { margin: 0 0 5px; color: #78d6ca; font-size: .75rem; font-weight: 800; letter-spacing: .105em; }
.site-header h1 { margin: 0; font-size: clamp(1.55rem, 2.2vw, 2.15rem); line-height: 1; letter-spacing: -.025em; }
.unofficial-badge { padding: 5px 9px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: rgba(255,255,255,.1); color: #e7f3f7; font-size: .7rem; font-weight: 800; letter-spacing: .015em; white-space: nowrap; }
.dataset-status { margin-left: auto; color: #c8d7e3; font-size: .8rem; line-height: 1.55; text-align: right; white-space: pre-line; }

.app-shell { width: min(1440px, calc(100% - 48px)); margin: 26px auto 40px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .85fr); gap: 22px; align-items: start; }
.planning-notice { grid-column: 1 / -1; padding: 13px 17px; border: 1px solid #c8ddd7; border-left: 5px solid var(--teal); border-radius: 11px; background: #f2faf8; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.planning-notice strong { color: var(--navy); }
.layout-column { min-width: 0; display: grid; gap: 22px; align-content: start; }
section { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.selection-panel, .plan-panel, .checks-panel, .calendar-panel { padding: 25px; }
.selection-panel { position: relative; }
.section-heading, .calendar-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.section-heading.compact { margin-bottom: 15px; }
h2 { margin: 0; color: var(--navy); font-size: 1.22rem; line-height: 1.25; letter-spacing: -.015em; }
.plan-count { padding: 6px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--navy-2); font-size: .78rem; font-weight: 750; white-space: nowrap; }

.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap svg { position: absolute; left: 16px; width: 21px; fill: none; stroke: var(--muted); stroke-width: 2; pointer-events: none; }
.search-wrap input { width: 100%; min-height: 52px; padding: 0 76px 0 48px; border: 2px solid #cbd7e0; border-radius: 12px; outline: none; font-size: 1rem; color: var(--ink); transition: border .16s, box-shadow .16s; }
.search-wrap input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(11,133,119,.12); }
.search-wrap kbd { position: absolute; right: 14px; padding: 3px 8px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--canvas); color: var(--muted); font-size: .75rem; }
.search-wrap.has-value kbd { display: none; }
.search-hint { margin: 7px 2px 0; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.clear-search-button { position: absolute; right: 9px; min-height: 34px; padding: 0 9px; border: 0; border-radius: 7px; background: var(--blue-soft); color: var(--navy-2); font-size: .74rem; font-weight: 800; }
.clear-search-button:hover, .clear-search-button:focus-visible { background: #dceaf4; outline: 2px solid rgba(11,133,119,.25); }
.search-results { position: absolute; z-index: 20; width: min(calc(100% - 98px), 780px); max-height: 330px; overflow-y: auto; margin-top: 7px; padding: 7px; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 38px rgba(25,49,72,.16); }
.search-option { width: 100%; padding: 11px 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 0; border-radius: 8px; background: transparent; text-align: left; color: var(--ink); }
.search-option:hover, .search-option:focus { background: var(--blue-soft); outline: none; }
.search-identity { min-width: 0; display: grid; gap: 3px; }
.search-option strong { color: var(--navy); font-size: .9rem; }
.search-title { color: var(--muted); font-size: .83rem; line-height: 1.35; overflow-wrap: anywhere; }
.search-match { padding: 0 1px; border-radius: 3px; background: #fff0a8; color: inherit; font-weight: inherit; }
.search-traits { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; }
.search-gsp { padding: 3px 6px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-size: .66rem; font-style: normal; font-weight: 850; letter-spacing: .025em; }
.run-count { min-width: 48px; text-align: right; white-space: nowrap; }
.search-empty { padding: 18px 12px; color: var(--muted); }

.course-detail { margin-top: 18px; }
.empty-selection, .empty-plan { min-height: 110px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 24px; border: 1px dashed #cbd7e0; border-radius: 12px; color: var(--muted); }
.empty-selection strong, .empty-plan strong { display: block; color: var(--ink); margin-bottom: 3px; }
.empty-selection p, .empty-plan p { margin: 0; font-size: .88rem; line-height: 1.45; }
.empty-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--navy-2); font-size: 1.4rem; }
.course-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 2px 2px 16px; }
.course-code { font-size: 1.45rem; font-weight: 850; color: var(--navy); letter-spacing: -.02em; }
.course-subtitle { margin-top: 3px; color: var(--muted); font-size: .88rem; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.badge { padding: 5px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--navy-2); font-size: .75rem; font-weight: 750; }
.badge.gsp { background: var(--teal-soft); color: var(--teal); }
.run-list { display: grid; gap: 10px; }
.run-card { display: grid; grid-template-columns: 88px 1fr auto; gap: 15px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 12px; transition: border .16s, background .16s; }
.run-card:hover { border-color: #aac0d0; background: #fbfdff; }
.run-code { align-self: stretch; display: flex; align-items: center; justify-content: center; padding: 8px; border-radius: 9px; background: var(--navy); color: white; font-weight: 850; }
.run-summary strong { display: block; margin-bottom: 4px; font-size: .93rem; }
.run-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--muted); font-size: .8rem; }
.run-impact { margin-top: 6px; font-size: .78rem; font-weight: 700; }
.impact-ok { color: var(--green); }
.impact-warn { color: var(--amber); }
.impact-clash { color: var(--red); }
.run-actions { display: flex; align-items: center; gap: 8px; }
.primary-button, .secondary-button, .text-button, .icon-button { border: 0; border-radius: 9px; font-weight: 750; }
.primary-button { min-width: 78px; padding: 10px 13px; background: var(--teal); color: white; }
.primary-button:hover { background: #087064; }
.primary-button[disabled] { background: #c7d4dc; color: #617383; cursor: default; }
.secondary-button { padding: 9px 11px; background: var(--blue-soft); color: var(--navy-2); }
.secondary-button:hover { background: #dceaf4; }
.text-button { padding: 7px 4px; background: transparent; color: var(--navy-2); }
.text-button.danger { color: var(--red); font-size: .82rem; }
.panel-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 5px 10px; }
.export-button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 8px; background: var(--blue-soft); color: var(--navy-2); font-size: .76rem; font-weight: 800; }
.export-button:hover { background: #dceaf4; }
.export-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.planned-courses { display: grid; gap: 9px; }
.planned-card { position: relative; padding: 13px 14px 13px 17px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdff; overflow: hidden; }
.planned-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--course-color); }
.planned-top { display: flex; justify-content: space-between; gap: 10px; }
.planned-top strong { color: var(--navy); }
.planned-top span { color: var(--muted); font-size: .76rem; font-weight: 700; }
.planned-line { margin-top: 5px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.planned-actions { display: flex; gap: 12px; margin-top: 7px; }
.planned-actions button { padding: 0; border: 0; background: transparent; color: var(--navy-2); font-size: .78rem; font-weight: 750; }
.planned-actions button:last-child { color: var(--red); }

.checks-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.check-stat { padding: 11px 10px; border-radius: 10px; text-align: center; }
.check-stat strong { display: block; font-size: 1.25rem; }
.check-stat span { font-size: .72rem; font-weight: 700; }
.check-stat.ok { background: var(--green-soft); color: var(--green); }
.check-stat.warn { background: var(--amber-soft); color: var(--amber); }
.check-stat.clash { background: var(--red-soft); color: var(--red); }
.checks-detail { margin-top: 11px; display: grid; gap: 8px; }
.check-item { position: relative; min-height: 50px; padding: 11px 12px; border-left: 4px solid; border-radius: 7px; background: var(--canvas); font-size: .8rem; line-height: 1.45; }
.check-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 5px; margin-bottom: 2px; }
.check-heading strong { margin: 0; }
.check-item.clash { border-color: var(--red); }
.check-item.warn { border-color: var(--amber); }
.clash-session-list { margin: 5px 0 0; padding-left: 18px; }
.clash-session-list li + li { margin-top: 2px; }
.calendar-locator { width: 28px; height: 28px; display: inline-grid; place-items: center; flex: 0 0 auto; padding: 0; border: 0; border-radius: 7px; background: transparent; }
.calendar-locator.clash { color: var(--red); }
.calendar-locator.travel { color: var(--amber); }
.calendar-locator:hover, .calendar-locator:focus-visible { background: var(--blue-soft); outline: 2px solid rgba(11,133,119,.2); }
.calendar-locator.clash:hover, .calendar-locator.clash:focus-visible { background: var(--red-soft); outline-color: rgba(180,59,59,.18); }
.calendar-locator.travel:hover, .calendar-locator.travel:focus-visible { background: var(--amber-soft); outline-color: rgba(165,96,8,.18); }
.calendar-locator svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.calendar-locator.is-locating { animation: locator-ack .55s ease-out; }
@keyframes locator-ack {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.warnings-toggle { justify-self: start; padding: 6px 2px; border: 0; border-radius: 5px; background: transparent; font-size: .78rem; font-weight: 800; }
.warnings-toggle.clash { color: var(--red); }
.warnings-toggle.travel { color: var(--amber); }
.warnings-toggle:hover, .warnings-toggle:focus-visible { text-decoration: underline; outline: 2px solid rgba(11,133,119,.18); outline-offset: 2px; }
.all-clear { color: var(--muted); font-size: .83rem; line-height: 1.45; }

.calendar-toolbar { align-items: center; margin-bottom: 8px; }
.calendar-controls { display: flex; align-items: center; gap: 7px; }
.view-tabs { display: flex; padding: 3px; border-radius: 10px; background: var(--canvas); }
.view-tabs button { min-width: 65px; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 750; }
.view-tabs button[aria-selected="true"] { background: white; color: var(--navy); box-shadow: 0 2px 7px rgba(25,49,72,.12); }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; background: var(--blue-soft); color: var(--navy); font-size: 1.4rem; }
.icon-button:hover { background: #dceaf4; }
.period-label { margin-bottom: 12px; color: var(--muted); font-size: .86rem; font-weight: 700; }
.location-key { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 13px; margin: -2px 0 12px; padding: 8px 10px; border-radius: 8px; background: var(--canvas); color: var(--muted); font-size: .72rem; }
.location-key strong { color: var(--navy); }
.location-key b { color: var(--navy-2); }
.calendar { position: relative; min-height: 500px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
.week-grid { min-width: 900px; display: grid; grid-template-columns: 58px repeat(7, 1fr); grid-template-rows: 64px 840px; }
.week-corner, .week-day { position: sticky; top: 0; z-index: 4; background: white; border-bottom: 1px solid var(--line); }
.week-day { padding: 8px 5px; border-left: 1px solid var(--line); text-align: center; }
.week-day strong { display: block; color: var(--navy); font-size: .78rem; }
.week-day > span:not(.day-alerts) { color: var(--muted); font-size: .72rem; }
.week-day.has-travel:not(.has-clash) { background: #fff9ed; box-shadow: inset 0 3px 0 var(--amber); }
.week-day.has-clash { background: #fff5f5; box-shadow: inset 0 3px 0 var(--red); }
.time-axis { position: relative; background: #fbfdff; }
.time-label { position: absolute; right: 8px; transform: translateY(-7px); color: #7a8997; font-size: .68rem; }
.week-column { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 59px, #edf2f6 59px, #edf2f6 60px); }
.week-column.has-travel:not(.has-clash) { background-color: #fffbf3; }
.week-column.has-clash { background-color: #fff7f7; }
.week-event { position: absolute; min-width: 0; min-height: 25px; padding: 5px 6px; border-left: 4px solid var(--course-color); border-radius: 5px; background: color-mix(in srgb, var(--course-color) 13%, white); overflow: hidden; color: var(--ink); font-size: .68rem; line-height: 1.2; }
.week-event.exam { background: var(--purple-soft); border-left-color: var(--purple); }
.week-event strong, .month-event strong { color: var(--navy); }
.week-event span { display: block; margin-top: 2px; }
.event-kind { width: max-content; margin: 0 0 3px !important; padding: 1px 4px; border-radius: 3px; background: var(--purple); color: white; font-size: .58rem; font-style: normal; font-weight: 850; letter-spacing: .05em; }
.calendar-empty { min-height: 500px; display: grid; place-items: center; padding: 30px; color: var(--muted); text-align: center; }
.month-grid { min-width: 760px; display: grid; grid-template-columns: repeat(7, 1fr); }
.month-weekday { padding: 10px; background: #f7fafc; border-bottom: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .73rem; font-weight: 800; }
.month-day { min-height: 112px; padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.month-day:nth-child(7n) { border-right: 0; }
.month-day.outside { background: #fafcfd; color: #a2aebb; }
.month-day.has-travel:not(.has-clash) { background: #fffbf3; box-shadow: inset 0 3px 0 var(--amber); }
.month-day.has-clash { background: #fff7f7; box-shadow: inset 0 3px 0 var(--red); }
.day-heading { min-height: 21px; display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; margin-bottom: 5px; }
.day-number { font-size: .74rem; font-weight: 800; }
.day-alerts { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
.alert-chip { padding: 1px 4px; border-radius: 999px; font-size: .55rem; font-style: normal; font-weight: 850; line-height: 1.45; }
.alert-chip.clash { background: var(--red-soft); color: var(--red); }
.alert-chip.travel { background: var(--amber-soft); color: var(--amber); }
.month-event { margin-bottom: 4px; padding: 4px 5px; border-left: 3px solid var(--course-color); border-radius: 4px; background: color-mix(in srgb, var(--course-color) 11%, white); font-size: .66rem; line-height: 1.25; }
.month-event.exam { border-left-color: var(--purple); background: var(--purple-soft); }
.month-event .event-kind { display: inline-block; margin-right: 4px !important; }
.month-day, .week-day, .week-column, .month-event, .week-event { transition: opacity .28s ease, filter .28s ease, box-shadow .28s ease, transform .28s ease; }
.calendar.spotlight-active .month-day:not(.spotlight-target),
.calendar.spotlight-active .week-day:not(.spotlight-target),
.calendar.spotlight-active .week-column:not(.spotlight-target) { opacity: .48; filter: saturate(.62); }
.spotlight-target { position: relative; z-index: 6 !important; opacity: 1 !important; filter: saturate(1.16) !important; box-shadow: 0 10px 28px rgba(15,54,82,.24); transform: scale(1.012); }
.spotlight-event { position: relative; z-index: 7 !important; filter: saturate(1.2); box-shadow: 0 7px 17px rgba(15,54,82,.2); }
.calendar-focus-flag { position: absolute; top: 5px; left: 50%; z-index: 12; display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 999px; color: white; box-shadow: 0 7px 18px rgba(15,37,57,.28); white-space: nowrap; pointer-events: none; font-size: .65rem; font-weight: 850; line-height: 1; animation: flag-arrive 2.15s ease both; }
.calendar-focus-flag::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: inherit; }
.calendar-focus-flag.clash { background: var(--red); border-top-color: var(--red); }
.calendar-focus-flag.travel { background: var(--amber); border-top-color: var(--amber); }
.calendar-focus-flag > span { font-size: .78rem; transform: translateY(-1px); }
@keyframes flag-arrive {
  0% { opacity: 0; transform: translate(-50%, -12px) scale(.84); }
  18% { opacity: 1; transform: translate(-50%, 3px) scale(1.04); }
  34%, 82% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -3px) scale(.98); }
}

.site-footer { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.footer-card { padding: 19px 21px; border-radius: 14px; box-shadow: none; }
.footer-card h2 { margin-bottom: 7px; font-size: 1rem; }
.footer-card p:last-child { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.feedback-card { background: #f8fbfd; }
.disclaimer-card { background: #fffaf0; border-color: #f0dfbd; }
.disclaimer-card .step-label { color: var(--amber); }
.feedback-card[hidden] + .disclaimer-card { grid-column: 1 / -1; }
.print-report { display: none; }
dialog { width: min(660px, calc(100% - 32px)); max-height: min(760px, calc(100vh - 40px)); padding: 0; overflow: hidden; border: 0; border-radius: 16px; box-shadow: 0 25px 80px rgba(15,37,57,.3); color: var(--ink); }
dialog::backdrop { background: rgba(8,28,44,.55); backdrop-filter: blur(2px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 22px; border-bottom: 1px solid var(--line); background: white; }
#dialog-content { max-height: min(684px, calc(100vh - 116px)); padding: 24px 32px 30px; overflow-x: hidden; overflow-y: auto; }
.session-group { min-width: 0; margin-bottom: 18px; padding: 4px 8px 0; overflow: hidden; }
.session-group:last-child { margin-bottom: 0; }
.session-group h3 { margin: 0 0 12px; padding: 0 8px; color: var(--navy); font-size: .92rem; line-height: 1.4; overflow-wrap: anywhere; }
.session-row { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(90px, 110px) minmax(0, 1fr) minmax(88px, 116px); align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid #edf2f5; font-size: .8rem; }
.session-row span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.session-row:last-child { border-bottom: 0; }
.session-row span:last-child { color: var(--muted); }
.exam-label { color: var(--purple); font-weight: 800; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 50; transform: translate(-50%, 22px); padding: 11px 15px; border-radius: 9px; background: #15344d; color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s; font-size: .86rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1050px) {
  .app-shell { width: min(900px, calc(100% - 32px)); display: flex; flex-direction: column; align-items: stretch; }
  .planning-notice, .layout-column, .selection-panel, .plan-panel, .checks-panel, .calendar-panel, .site-footer { width: 100%; min-width: 0; }
  .site-footer { order: 5; }
  .search-results { width: calc(100% - 82px); }
}

@media (max-width: 640px) {
  .site-header { min-height: 88px; padding: 17px 16px; }
  .brand-mark { width: 46px; height: 46px; border-radius: 12px; }
  .brand-mark img { width: 43px; height: 43px; }
  .dataset-status { display: none; }
  .unofficial-badge { font-size: .64rem; }
  .app-shell { width: calc(100% - 20px); margin-top: 10px; gap: 10px; }
  .planning-notice { padding: 12px 14px; }
  .selection-panel, .plan-panel, .checks-panel, .calendar-panel { padding: 18px 15px; border-radius: 14px; }
  .search-results { width: calc(100% - 50px); }
  .run-card { grid-template-columns: 72px 1fr; gap: 11px; }
  .run-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; }
  .location-key { gap: 5px 10px; }
  .calendar-controls { width: 100%; }
  .view-tabs { flex: 1; }
  .view-tabs button { flex: 1; }
  .course-title-row { flex-direction: column; }
  .badges { justify-content: flex-start; }
  .search-option { align-items: flex-start; }
  .search-traits { flex-direction: column; align-items: flex-end; gap: 4px; }
  #dialog-content { padding: 20px 24px 26px; }
  .session-group { padding-inline: 6px; }
  .session-group h3 { padding-inline: 6px; }
  .session-row { grid-template-columns: 82px minmax(0, 1fr); gap: 8px 10px; padding: 10px 6px; }
  .session-row span:last-child { grid-column: 2; }
  .site-footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .calendar-locator.is-locating { animation: none !important; }
  .calendar-focus-flag { animation: none !important; opacity: 1; transform: translate(-50%, 0); }
}

@media print {
  @page { size: A4 portrait; margin: 12mm 10mm 15mm; }
  :root { background: white; }
  body { min-width: 0; background: white; color: #14273a; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .site-header, .app-shell, dialog, .toast { display: none !important; }
  .print-report { display: block !important; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: white; font-size: 9pt; }
  .print-report * { box-sizing: border-box; }
  .print-header { display: grid; grid-template-columns: 18mm 1fr 55mm; align-items: center; gap: 5mm; padding-bottom: 5mm; border-bottom: 1.5mm solid #2db9a3; }
  .print-logo { width: 18mm; height: 18mm; object-fit: contain; }
  .print-kicker { margin: 0 0 1.5mm; color: #0b8577; font-size: 7pt; font-weight: 800; letter-spacing: .08em; }
  .print-header h1 { margin: 0; color: #0b3558; font-size: 20pt; line-height: 1.08; }
  .print-subtitle { margin: 1.5mm 0 0; color: #607184; font-size: 8.5pt; }
  .print-meta { padding: 3.5mm; border: .3mm solid #dce5ec; background: #f4f7fa; color: #607184; font-size: 7.5pt; line-height: 1.5; text-align: right; }
  .print-meta strong { color: #0b3558; }
  .print-section { margin-top: 6mm; break-inside: avoid; }
  .print-section.schedule-section { break-inside: auto; }
  .print-label { margin: 0 0 1.5mm; color: #0b8577; font-size: 7pt; font-weight: 800; letter-spacing: .08em; }
  .print-section h2 { margin: 0 0 3mm; color: #0b3558; font-size: 13pt; }
  .print-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .print-table th { padding: 2.4mm 2mm; border: .25mm solid #dce5ec; background: #0b3558; color: white; font-size: 7pt; text-align: left; }
  .print-table td { padding: 2.3mm 2mm; border: .25mm solid #dce5ec; color: #14273a; font-size: 7pt; line-height: 1.35; vertical-align: top; overflow-wrap: anywhere; }
  .print-table tbody tr:nth-child(even) { background: #f8fbfd; }
  .print-table thead { display: table-header-group; }
  .print-table tr { break-inside: avoid; }
  .print-course { color: #0b3558; font-weight: 800; }
  .print-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm; }
  .print-check { padding: 3.5mm; border: .3mm solid; font-size: 8pt; line-height: 1.45; }
  .print-check.clash { border-color: #b43b3b; background: #ffeded; }
  .print-check.travel { border-color: #a56008; background: #fff4dc; }
  .print-check.clear { grid-column: 1 / -1; border-color: #18785f; background: #e5f5ef; }
  .print-row-clash { background: #ffeded !important; }
  .print-row-travel { background: #fff4dc !important; }
  .print-row-exam { background: #efedff !important; }
  .print-tag { display: inline-block; margin-bottom: 1mm; color: #b43b3b; font-size: 6.5pt; font-weight: 850; }
  .print-tag.exam { color: #5b4ab0; }
  .print-tag.travel { color: #a56008; }
  .print-disclaimer { margin-top: 7mm; padding: 4mm; border: .3mm solid #f0dfbd; background: #fffaf0; color: #607184; font-size: 7.5pt; line-height: 1.5; break-inside: avoid; }
}
