/* Inter (SIL Open Font License, fonts/OFL.txt), served with the site: one variable font covers weights 400–700. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/inter-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #000000;
  --muted: #515151;
  --line: #d7d7d7;
  --teal: #46a5ff;
  --teal-dark: #006bb6;
  --teal-pale: #eaf5ff;
  --coral: #fd6360;
  --coral-pale: #fff0ef;
  --gold: #f7e159;
  --gold-pale: #fff9d7;
  --science-orange: #ff8d4f;
  --elec-violet: #9a6bff;
  /* Target courses and their prior-course paths: orange, to stand apart from the blue of the selected course. */
  --target: #b85000;
  --target-text: #a84900;
  --target-pale: #fff4ec;
  /* Aalto design system type scale (brand.aalto.fi/ds): 14 px is the smallest size, 16 px is body text. */
  --fs-1: .875rem;
  --fs-2: 1rem;
  --fs-3: 1.125rem;
  --fs-4: 1.25rem;
  --fs-5: 1.5rem;
  --fs-6: 2rem;
  /* Aalto neutral theme text colours: foreground and secondary foreground (8:1 contrast on white). */
  --fg: #151515;
  --fg-tint: #505050;
  --mono: 'Inter', Arial, sans-serif;
  --sans: 'Inter', Arial, sans-serif;
  --serif: 'Inter', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 360px;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-2);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .55; }

.app-shell {
  width: min(1680px, calc(100% - 48px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid #e6e5de;
  box-shadow: 0 16px 50px rgb(46 52 46 / 7%);
}

.topbar {
  height: 66px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  gap: 27px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.brand { width: 58px; height: 58px; flex: 0 0 58px; display: flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; }
.brand-logo { width: 58px; height: 56px; object-fit: contain; }
.topbar-context { display: flex; flex-direction: column; gap: 3px; padding-left: 25px; border-left: 1px solid var(--line); }
.context-kicker, .eyebrow, .catalog-label-row, .target-summary-top, .section-title, .drag-hint { font-family: var(--mono); font-size: var(--fs-1); font-weight: 500; letter-spacing: 0; }
.context-kicker, .eyebrow { color: var(--muted); }
.context-title { font-size: var(--fs-2); font-weight: 600; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.data-status { display: inline-flex; align-items: center; gap: 7px; color: var(--fg-tint); font-size: var(--fs-2); }
.status-dot, .footer-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.source-link { color: var(--teal-dark); font-size: var(--fs-2); font-weight: 600; text-decoration: none; }
.source-link span { margin-left: 3px; }
.help-button { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--fg); font-size: var(--fs-1); font-weight: 600; cursor: pointer; }
.help-button:hover { border-color: var(--fg); }
.help-mark { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: var(--fs-1); line-height: 1; }
.reset-button { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: #fff; color: #9f4f3a; font-size: var(--fs-1); font-weight: 600; cursor: pointer; }
.reset-button:hover { border-color: #d8765d; background: #fff4f0; }
.language-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); background: #fff; }
.language-option { min-width: 36px; height: 32px; border: 0; background: transparent; color: var(--ink); font-size: var(--fs-1); font-weight: 700; cursor: pointer; }
.language-option.is-active { background: var(--gold); }

.workspace { flex: 1 1 auto; min-height: 680px; display: grid; grid-template-columns: 300px minmax(480px, 1fr) 320px; }
.course-sidebar, .detail-panel { min-width: 0; background: #fffefa; }
.course-sidebar { display: flex; flex-direction: column; padding: 23px 17px 15px; border-right: 1px solid var(--line); }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.sidebar-heading .eyebrow, .map-caption-row .eyebrow, .detail-panel .eyebrow, .plan-intro .eyebrow { margin: 0 0 8px; }
.sidebar-heading h1 { margin: 0; font-family: var(--serif); font-size: var(--fs-5); font-weight: 500; line-height: 1.1; }
.count-badge { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-family: var(--mono); font-size: var(--fs-1); }
.search-box { height: 37px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid #dedfd7; background: #fff; }
.search-icon { color: var(--fg-tint); font-size: var(--fs-4); transform: rotate(-20deg); }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); font-size: var(--fs-2); background: transparent; }
.search-box input::placeholder { color: var(--fg-tint); }
.search-box kbd { padding: 2px 4px; border: 1px solid #e5e5df; color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.target-summary { min-height: 95px; margin: 16px 0 17px; padding: 12px; background: var(--target-pale); border-left: 2px solid var(--target); }
.target-summary-top { display: flex; align-items: center; gap: 7px; color: var(--target-text); }
.target-spark { font-size: var(--fs-2); }
.text-button { margin-left: auto; padding: 0; border: 0; color: var(--teal-dark); background: transparent; font-size: var(--fs-1); font-weight: 600; cursor: pointer; }
.target-summary p { margin: 9px 0 0; color: var(--fg-tint); font-size: var(--fs-2); line-height: 1.5; }
.catalog-label-row { display: flex; justify-content: space-between; gap: 5px; margin: 0 0 9px; color: var(--fg-tint); font-size: var(--fs-1); }
.drag-hint { color: var(--fg-tint); font-size: var(--fs-1); white-space: nowrap; }
.course-list { flex: 1 1 auto; overflow: auto; min-height: 80px; margin: 0 -7px; padding: 0 5px 6px 0; }
.course-group { margin: 8px 7px 0 0; border-top: 1px solid var(--line); }
.course-group-heading { display: flex; align-items: center; gap: 6px; padding: 9px 2px 7px 7px; color: var(--fg-tint); font-size: var(--fs-1); font-weight: 600; cursor: pointer; list-style: none; }
.course-group-heading::-webkit-details-marker { display: none; }
.course-group-heading::before { content: '▸'; width: 9px; color: var(--fg-tint); }
.course-group[open] > .course-group-heading::before { content: '▾'; }
.course-group-count { margin-left: auto; color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); font-weight: 500; }
/* Master's programmes' courses: programme, then major, as nested collapsible groups. */
.course-group-note { margin: 0 2px 6px 7px; color: var(--fg-tint); font-size: var(--fs-1); line-height: 1.45; }
.course-subgroup { margin: 0 0 0 7px; border-top: 1px solid #eeeeea; }
.course-subgroup-heading { display: flex; align-items: center; gap: 6px; padding: 8px 2px 6px 4px; color: var(--fg); font-size: var(--fs-1); font-weight: 600; cursor: pointer; list-style: none; }
.course-subgroup-heading::-webkit-details-marker { display: none; }
.course-subgroup-heading::before { content: '▸'; width: 9px; flex: 0 0 9px; color: var(--fg-tint); }
.course-subgroup[open] > .course-subgroup-heading::before { content: '▾'; }
.course-subgroup.is-section .course-subgroup-heading { color: var(--fg-tint); }
.course-subgroup-heading .course-group-count { margin-left: auto; }
.course-item { position: relative; width: 100%; min-height: 46px; padding: 7px 8px; display: flex; align-items: center; gap: 9px; border: 1px solid transparent; background: transparent; text-align: left; cursor: grab; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.course-item:hover { border-color: #e4e7df; background: #fbfcf8; }
.course-item:active { cursor: grabbing; }
.course-item.is-selected { border-color: #9ccbef; background: var(--teal-pale); }
.course-item.is-target::after { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--target); content: ''; }
.course-chip { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 3px; font-family: var(--mono); font-size: var(--fs-1); }
.course-chip.mathematics { color: var(--fg); background: var(--gold-pale); }
.course-chip.physics { color: var(--fg); background: #fff0e7; }
.course-chip.computing { color: var(--fg); background: var(--teal-pale); }
.course-chip.business { color: var(--fg); background: var(--coral-pale); }
.course-chip.general { color: #fff; background: #000; }
.course-chip.electrical { color: var(--fg); background: #efe9ff; }
.course-item-name { min-width: 0; display: block; overflow: hidden; color: var(--fg); font-size: var(--fs-1); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.course-item-meta { margin-top: 3px; color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.sidebar-footnote { display: flex; gap: 8px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.info-mark { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; border: 1px solid #a9b0ab; border-radius: 50%; color: var(--fg-tint); font-family: var(--serif); font-size: var(--fs-1); }
.sidebar-footnote p { margin: 0; color: var(--fg-tint); font-size: var(--fs-1); line-height: 1.5; }

.main-panel { min-width: 0; display: flex; flex-direction: column; background: #fbfcf9; }
/* The major tabs wrap onto a second row instead of scrolling: Safari's scrollbar would cover the tabs. */
.major-tabs { min-height: 43px; display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 4px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #fff; }
.major-tab { position: relative; flex: 0 0 auto; min-height: 42px; padding: 0 10px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--fg-tint); font-size: var(--fs-1); font-weight: 600; white-space: nowrap; cursor: pointer; }
.major-tab.is-active { border-bottom-color: var(--teal-dark); color: var(--fg); }
.major-tab:hover { background: #f7f7f7; }
.panel-toolbar { min-height: 57px; padding: 0 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; border-bottom: 1px solid var(--line); }
.view-tabs { height: 57px; display: flex; align-items: stretch; gap: 19px; }
.view-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 1px; border: 0; color: var(--fg-tint); background: transparent; font-size: var(--fs-2); font-weight: 600; cursor: pointer; }
.view-tab.is-active { color: var(--ink); }
.view-tab.is-active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: var(--teal-dark); content: ''; }
.tab-icon { color: var(--fg-tint); font-size: var(--fs-3); }
.is-active .tab-icon { color: var(--teal-dark); }
.guide-icon { width: 18px; height: 18px; display: grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; font-size: var(--fs-1); font-weight: 700; line-height: 1; }
.map-icon, .calendar-icon { flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.map-icon { width: 30px; height: 18px; }
.calendar-icon { width: 18px; height: 18px; }
.calendar-icon .icon-fill { fill: currentColor; stroke: none; }
.tab-count { min-width: 24px; height: 24px; padding: 0 5px; display: grid; place-items: center; border-radius: 12px; background: #edf0eb; color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.toolbar-actions { margin-left: auto; padding: 8px 0; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.icon-button[hidden] { display: none; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #e0e2d9; background: transparent; color: var(--fg-tint); font-size: var(--fs-4); cursor: pointer; }
.action-button[hidden] { display: none; }
.action-button { min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--fg); background: var(--fg); color: white; font-size: var(--fs-2); white-space: nowrap; font-weight: 600; cursor: pointer; transition: background .15s ease; }
.action-button:hover { background: #3a3a3a; }
.action-button.secondary { border: 1px solid var(--fg); background: transparent; color: var(--fg); }
.action-button.secondary:hover { background: rgb(0 0 0 / .1); }
.map-caption-row { padding: 22px 23px 15px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.map-caption-row[hidden] { display: none !important; }
.map-caption-row .eyebrow { font-size: var(--fs-1); }
.caption-dot { padding: 0 4px; color: #b8302d; }
.map-caption-row h2 { margin: 0; font-family: var(--serif); font-size: var(--fs-5); font-weight: 500; line-height: 1.1; }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; max-width: 100%; padding-bottom: 3px; color: var(--fg-tint); font-size: var(--fs-1); }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.legend-dot.mathematics { background: var(--gold); }
.legend-dot.physics { background: var(--science-orange); }
.legend-dot.computing { background: var(--teal); }
.legend-dot.business { background: var(--coral); }
.legend-dot.general { background: #000; }
.legend-dot.electrical { background: var(--elec-violet); }
.view-content { min-height: 0; flex: 1 1 auto; }
.view-content[hidden] { display: none !important; }
.map-view { padding: 0 16px; display: flex; flex-direction: column; }
.pick-bar { min-height: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 0 0 10px; }
.pick-toggle { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--fg); background: transparent; color: var(--fg); font-size: var(--fs-2); font-weight: 600; cursor: pointer; }
.pick-toggle:hover { background: rgb(0 0 0 / .06); }
.pick-toggle.is-active { background: var(--fg); color: #fff; }
.pick-box { width: 16px; height: 16px; display: grid; place-items: center; border: 1.5px solid currentColor; font-size: var(--fs-1); line-height: 1; }
.pick-toggle.is-active .pick-box::after { content: '✓'; }
.pick-status { color: var(--fg-tint); font-size: var(--fs-1); }
.pick-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 14px; }
.pick-actions .text-button { margin-left: 0; }
.pick-actions .text-button[hidden] { display: none; }
.graph-scroll { position: relative; min-height: 400px; flex: 1 1 auto; overflow: auto; border: 1px solid #e8e9e2; background-color: #fffefa; background-image: radial-gradient(#e3e5dd 0.7px, transparent 0.7px); background-size: 18px 18px; scrollbar-color: #c7cdc7 transparent; scrollbar-width: thin; }
.dependency-graph { display: block; overflow: visible; }
.graph-edge { fill: none; stroke: #c9cec8; stroke-width: 1.3; marker-end: url(#arrowhead); transition: opacity .18s ease, stroke .18s ease, stroke-width .18s ease; }
.graph-edge.is-dimmed { opacity: .16; }
.graph-edge.is-active { stroke: var(--target); stroke-width: 2; marker-end: url(#arrowhead-active); }
.graph-edge.is-selected-path { stroke: var(--teal-dark); stroke-width: 2; marker-end: url(#arrowhead-selected); }
.graph-node { cursor: pointer; transition: opacity .18s ease, filter .18s ease; }
.graph-node.is-dimmed { opacity: .27; }
.node-card { fill: #fffefa; stroke: #dfe3dc; stroke-width: 1; transition: fill .15s ease, stroke .15s ease; }
.graph-node:hover .node-card { stroke: #96bdb0; }
.graph-node.is-in-path .node-card { fill: var(--target-pale); stroke: #e3a97c; }
.graph-node.is-target .node-card { fill: #ffe9d9; stroke: var(--target); stroke-width: 1.7; }
.graph-node.is-in-selection .node-card { fill: #f2f8ff; stroke: #8dbfe6; }
.graph-node.is-selected .node-card { fill: var(--teal-pale); stroke: var(--teal-dark); stroke-width: 2; }
.graph-node.is-picked .node-card { stroke: var(--fg); stroke-width: 2.5; }
.node-pick-box { fill: #fff; stroke: #767676; stroke-width: 1.5; }
.graph-node.is-picked .node-pick-box { fill: var(--fg); stroke: var(--fg); }
.node-pick-tick { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.node-accent { rx: 2; }
.node-accent.mathematics { fill: var(--gold); }
.node-accent.physics { fill: var(--science-orange); }
.node-accent.computing { fill: var(--teal); }
.node-accent.business { fill: var(--coral); }
.node-accent.general { fill: #000; }
.node-accent.electrical { fill: var(--elec-violet); }
.node-label { fill: var(--fg); font-family: var(--sans); font-size: var(--fs-2); font-weight: 600; }
.node-period { fill: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.node-target-tag { fill: var(--target-text); font-family: var(--mono); font-size: var(--fs-1); font-weight: 500; }
.graph-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: var(--fs-2); }
.graph-empty[hidden] { display: none !important; }
.map-footer { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-instruction { color: var(--fg-tint); font-size: var(--fs-1); }
.path-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.path-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.path-swatch { width: 18px; height: 2px; display: inline-block; }
.path-swatch.is-selected-path { background: var(--teal-dark); }
.path-swatch.is-target-path { background: var(--target); }
.graph-zoom { display: flex; align-items: center; gap: 6px; color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.graph-zoom button { width: 32px; height: 32px; border: 1px solid #e1e3dc; background: white; color: var(--fg-tint); font-size: var(--fs-3); cursor: pointer; }
.graph-zoom span { min-width: 34px; text-align: center; }

.detail-panel { padding: 24px 19px; border-left: 1px solid var(--line); }
.detail-empty { min-height: 350px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.detail-empty[hidden] { display: none !important; }
.detail-empty .eyebrow { margin: 0 0 9px; }
.detail-empty h2 { max-width: 220px; margin: 0 0 9px; font-family: var(--serif); font-size: var(--fs-5); font-weight: 500; line-height: 1.15; }
.detail-empty > p:last-of-type { margin: 0; color: var(--fg-tint); font-size: var(--fs-2); line-height: 1.6; }
.detail-empty .help-link { margin: 14px 0 0; display: inline-flex; gap: 4px; }
.detail-topline { display: flex; justify-content: space-between; align-items: center; }
.detail-topline .eyebrow { margin: 0; }
.close-button { width: 32px; height: 32px; border: 1px solid #e3e5de; background: transparent; color: var(--fg-tint); font-size: var(--fs-4); line-height: 1; cursor: pointer; }
.detail-category { width: max-content; margin-top: 22px; padding: 5px 7px; font-family: var(--mono); font-size: var(--fs-1); text-transform: uppercase; }
.detail-category.mathematics { color: var(--fg); background: var(--gold-pale); }
.detail-category.physics { color: var(--fg); background: #fff0e7; }
.detail-category.computing { color: var(--fg); background: var(--teal-pale); }
.detail-category.business { color: var(--fg); background: var(--coral-pale); }
.detail-category.general { color: #fff; background: #000; }
.detail-category.electrical { color: var(--fg); background: #efe9ff; }
.detail-panel h2 { margin: 10px 0 7px; font-family: var(--serif); font-size: var(--fs-5); font-weight: 500; line-height: 1.12; }
.detail-meta { margin: 0; color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.detail-section { padding: 14px 0 13px; border-top: 1px solid var(--line); }
.section-title { display: flex; align-items: center; justify-content: space-between; color: var(--fg-tint); font-size: var(--fs-1); }
.section-count { color: var(--fg-tint); }
.prerequisite-list { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.prerequisite-item { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.prerequisite-item:hover { background: #f5f7f3; }
.prerequisite-arrow { color: var(--teal-dark); font-size: var(--fs-2); }
.prerequisite-name { color: var(--fg); font-size: var(--fs-1); font-weight: 600; }
.no-prerequisites { margin: 9px 0 2px; color: var(--fg-tint); font-size: var(--fs-1); }
.prerequisite-note { margin: 9px 0 2px; color: var(--fg-tint); font-size: var(--fs-1); line-height: 1.5; }
.prerequisite-note[hidden] { display: none; }
.master-note { margin: 12px 0 2px; padding: 9px 11px; border-left: 3px solid #b07d00; background: var(--gold-pale); color: var(--fg); font-size: var(--fs-1); line-height: 1.5; }
.master-note[hidden], .count-toward-note[hidden], #count-toward[hidden] { display: none; }
.master-note-title { margin: 0 0 4px; font-weight: 600; }
.master-note ul { margin: 0; padding-left: 18px; }
.master-note li + li { margin-top: 3px; }
.master-note-places { margin: 6px 0 0; color: var(--fg-tint); }
.master-note-places span { font-weight: 600; }
.count-toward-note { margin: 4px 0 0; color: #7a5a00; font-size: var(--fs-1); line-height: 1.45; }
.review-early { color: #7a5a00; }
.prerequisite-note-label { display: block; margin-bottom: 3px; color: var(--fg-tint); font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .04em; }
#take-with-section[hidden] { display: none; }
.offering-section { padding-bottom: 17px; }
.sample-label { color: var(--fg-tint); font-size: var(--fs-1); }
.offering-periods { margin-top: 10px; display: flex; gap: 5px; }
.period-pill { min-width: 29px; padding: 5px 6px; border: 1px solid #e2e5dc; color: var(--fg-tint); background: #fbfcf9; font-family: var(--mono); font-size: var(--fs-1); text-align: center; }
.detail-actions { display: flex; gap: 7px; }
.target-button { min-height: 40px; flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--fg); background: var(--fg); color: white; font-size: var(--fs-2); font-weight: 600; cursor: pointer; }
.target-button:hover { background: #3a3a3a; }
.target-button.is-target { background: white; color: var(--fg); }
.target-button span:first-child { font-size: var(--fs-3); }
.add-plan-button { width: 36px; height: 35px; border: 1px solid #dfe2da; background: transparent; color: var(--fg-tint); font-size: var(--fs-4); cursor: pointer; }
.add-plan-button:hover { border-color: var(--fg); color: var(--fg); }
.detail-drag-note { margin: 11px 0 0; color: var(--fg-tint); font-size: var(--fs-1); line-height: 1.5; }
.course-source { display: inline-block; margin-top: 10px; color: var(--teal-dark); font-size: var(--fs-1); font-weight: 600; text-decoration: none; }
.course-source[hidden] { display: none; }
.completed-button { width: 100%; min-height: 32px; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dfe2da; background: transparent; color: var(--fg-tint); font-size: var(--fs-1); font-weight: 600; cursor: pointer; }
.move-period { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; color: var(--fg-tint); font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .04em; }
.move-period select { min-height: 32px; padding: 0 6px; border: 1px solid #dfe2da; background: white; color: var(--fg); font: inherit; font-size: var(--fs-1); text-transform: none; letter-spacing: 0; }
.completed-button.is-completed { border-color: #6aa884; background: #eef7f1; color: #2f6b49; }
.course-item.is-completed .course-item-name { color: var(--fg-tint); }
.course-item.is-completed .course-chip { color: #2f6b49; background: #e3f2e8; }
.graph-node.is-completed .node-card { fill: #f3f8f4; stroke: #a9cdb7; }
.graph-node.is-completed .node-label { fill: var(--fg-tint); }
.graph-node.is-completed .node-target-tag { fill: #2f6b49; }
.offering-periods:has(.offering-year) { flex-direction: column; }
.offering-year { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.offering-year-label { min-width: 68px; color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.offering-year-periods { display: flex; flex-wrap: wrap; gap: 4px; }

/* Instructions tab: numbered first steps, then the features in more detail. */
.guide-view { padding: 28px 23px 32px; }
.guide-inner { max-width: 1000px; }
.guide-inner > .eyebrow { margin: 0 0 8px; }
.guide-inner h2 { margin: 0 0 14px; font-size: var(--fs-6); font-weight: 600; line-height: 1.15; }
.guide-lead { max-width: 720px; margin: 0; color: var(--fg-tint); font-size: var(--fs-3); line-height: 1.55; }
.guide-steps { margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; list-style: none; }
.guide-step { padding: 18px 18px 20px; border: 1px solid var(--line); border-top: 4px solid var(--fg); background: #fff; }
.guide-step-number { width: 40px; height: 40px; margin-bottom: 14px; display: grid; place-items: center; background: var(--gold); color: var(--fg); font-size: var(--fs-4); font-weight: 700; }
.guide-step h3 { margin: 0 0 8px; font-size: var(--fs-3); font-weight: 600; line-height: 1.3; }
.guide-step p { margin: 0; color: var(--fg-tint); font-size: var(--fs-2); line-height: 1.5; }
.guide-subheading { margin: 40px 0 4px; font-size: var(--fs-4); font-weight: 600; }
.guide-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 32px; }
.guide-sections section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.guide-sections h4 { margin: 0 0 4px; color: var(--fg); font-size: var(--fs-2); font-weight: 600; }
.guide-sections p { margin: 0; color: var(--fg-tint); font-size: var(--fs-2); line-height: 1.5; }
.guide-footer { margin-top: 32px; padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: #f2f2f2; }
.guide-footer p { max-width: 560px; margin: 0; color: var(--fg-tint); font-size: var(--fs-1); line-height: 1.5; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.plan-view { padding: 20px 22px 14px; display: flex; flex-direction: column; }
.plan-intro { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.plan-intro h3 { margin: 0; font-family: var(--serif); font-size: var(--fs-5); font-weight: 500; }
.plan-tools { display: flex; align-items: center; gap: 14px; }
.plan-status { color: var(--fg-tint); font-size: var(--fs-1); }
.plan-grid-scroll { flex: 1 1 auto; overflow: auto; border: 1px solid var(--line); background: white; scrollbar-color: #c7cdc7 transparent; scrollbar-width: thin; }
.plan-grid { min-width: 850px; min-height: 420px; display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(128px, .8fr)); grid-template-rows: 40px 34px minmax(330px, 1fr); }
.plan-year { grid-row: 1; display: flex; align-items: center; padding: 0 10px; border-right: 1px solid #e8e9e3; border-bottom: 1px solid var(--line); color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.plan-period-heading { display: flex; align-items: center; justify-content: center; border-right: 1px solid #edeee8; border-bottom: 1px solid var(--line); color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.plan-slot { position: relative; min-height: 300px; padding: 7px 6px; border-right: 1px solid #edeee8; border-bottom: 1px solid #edeee8; background: #fffefa; transition: background .12s ease; }
.plan-slot.is-over { background: #eaf5ef; box-shadow: inset 0 0 0 1px #89bca9; }
.plan-period-heading.is-summer, .plan-slot.is-summer { background: #f8f8f3; }
.plan-slot.is-summer { border-right-color: #dcded6; }
.plan-grid.is-dragging .plan-slot:not(.is-offered) { background: #f4f4f0; }
.plan-grid.is-dragging .plan-slot.is-offered { background: #f1f8f4; box-shadow: inset 0 0 0 1px #c3dfd1; }
.plan-grid.is-dragging .plan-slot.is-offered.is-over { background: #eaf5ef; box-shadow: inset 0 0 0 1px #89bca9; }
.plan-slot-label { margin-bottom: 7px; color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.planned-course { position: relative; margin-bottom: 6px; padding: 7px 7px 8px; border-left: 2px solid var(--teal); background: #f0f6f1; cursor: grab; animation: card-in .18s ease-out both; }
.planned-course.category-physics { border-color: var(--science-orange); background: #fff0e7; }
.planned-course.category-mathematics { border-color: var(--gold); background: #fffbe4; }
.planned-course.category-business { border-color: var(--coral); background: #fff0ef; }
.planned-course.category-general { border-color: #000; background: #f1f1f1; }
.planned-course.category-electrical { border-color: var(--elec-violet); background: #f5f1ff; }
.planned-course.is-conflict { outline: 1px solid #d8765d; }
.planned-course.is-early { outline: 1px dashed #b07d00; }
.planned-master { color: #7a5a00; }
.planned-course-name { width: 100%; display: block; padding: 0; border: 0; background: none; color: var(--fg); font-family: inherit; font-size: var(--fs-1); font-weight: 600; line-height: 1.35; text-align: left; }
button.planned-course-name { cursor: pointer; }
button.planned-course-name:hover { text-decoration: underline; }
.planned-course-meta { margin-top: 5px; display: flex; gap: 4px; justify-content: space-between; align-items: center; color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.planned-target { color: var(--target-text); }
.remove-planned { position: absolute; top: 3px; right: 4px; padding: 0 2px; border: 0; background: transparent; color: var(--fg-tint); font-size: var(--fs-2); line-height: 1; cursor: pointer; opacity: 0; }
.planned-course:hover .remove-planned, .remove-planned:focus-visible { opacity: 1; }
@media (hover: none) { .remove-planned { opacity: 1; font-size: var(--fs-3); } }
.plan-legend { min-height: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--fg-tint); font-size: var(--fs-1); }
.plan-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.legend-swatch { width: 11px; height: 9px; display: inline-block; border: 1px solid #c9cfc8; background: #fff; }
.legend-conflict { outline: 1px solid #d8765d; border-color: transparent; }
.legend-completed { border: 0; border-left: 3px solid #2f6b49; background: #dff0e5; }
.legend-early { outline: 1px dashed #b07d00; border-color: transparent; }
.legend-placeholder { border: 1px dashed #000; border-left-width: 3px; background: #fafaf7; }
.plan-note { margin-left: auto; }
.plan-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: -6px 0 12px; color: var(--fg-tint); font-size: var(--fs-1); }
.plan-settings label { display: inline-flex; align-items: center; gap: 6px; }
.plan-settings select { padding: 3px 4px; border: 1px solid #dedfd7; background: #fff; color: var(--ink); font-size: var(--fs-1); }
.plan-file-actions { display: inline-flex; gap: 14px; margin-left: auto; }
.plan-file-actions .text-button { margin-left: 0; }
.plan-year { justify-content: space-between; gap: 8px; }
.plan-year.is-projected { color: var(--fg-tint); font-style: italic; }
.plan-year-credits { color: var(--fg-tint); font-style: normal; }
.credits-box { margin: 0 0 10px; padding: 9px 10px 10px; border: 1px solid var(--line); background: #fff; }
.credits-box[hidden] { display: none; }
.credits-box h4 { margin: 0 0 7px; font-family: var(--mono); font-size: var(--fs-1); font-weight: 600; color: var(--fg-tint); }
.credits-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.credits-row { display: flex; flex-direction: column; gap: 3px; padding: 6px 7px; border: 1px solid transparent; border-left: 3px solid #c9cec8; background: #fafaf7; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.credits-row.module-total { cursor: default; border-left-color: #27332f; background: #f4f4ef; }
.credits-row.is-highlighted { border-color: #27332f; }
.credits-row.module-basic { border-left-color: #6d8bc7; }
.credits-row.module-language { border-left-color: #a77cc9; }
.credits-row.module-major { border-left-color: #4f9a70; }
.credits-row.module-other { border-left-color: #b8a46a; }
.credits-name { font-size: var(--fs-1); font-weight: 600; color: var(--fg-tint); }
.credits-value { font-size: var(--fs-2); color: var(--fg-tint); }
.credits-value strong { font-size: var(--fs-3); color: var(--fg); }
.credits-row.is-met .credits-value strong { color: #2f6b49; }
.credits-row.is-over .credits-value strong { color: #9f4f3a; }
.credits-bar { position: relative; display: flex; height: 5px; overflow: hidden; background: #e8e9e3; }
.credits-bar i { display: block; height: 100%; }
.credits-studied { background: #2f6b49; }
.credits-planned { background: #8fc3a5; }
.credits-detail { color: var(--fg-tint); font-size: var(--fs-1); line-height: 1.4; }
.planned-module { padding: 1px 4px; border-radius: 2px; font-size: var(--fs-1); }
.planned-module.module-basic { color: #36508a; background: #e9eef7; }
.planned-module.module-language { color: #6b3f8f; background: #f3eafa; }
.planned-module.module-major { color: #2f6b49; background: #e7f4ee; }
.planned-module.module-other { color: #6d5f33; background: #f5f0e1; }
.planned-course.is-faded { opacity: .28; animation: none; }
.planned-course.is-completed { border-left: 3px solid #2f6b49; background: #dff0e5; }
.planned-course.is-placeholder { border-style: dashed; border-width: 1px 1px 1px 3px; background: #fafaf7; }
.planned-options { margin-top: 4px; display: block; color: var(--fg-tint); font-size: var(--fs-1); line-height: 1.45; }
.planned-option { padding: 0; border: 0; background: none; color: var(--teal-dark); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.planned-completed { display: inline-block; margin-bottom: 4px; padding: 1px 5px; border-radius: 2px; color: #fff; background: #2f6b49; font-family: var(--mono); font-size: var(--fs-1); font-weight: 600; letter-spacing: .02em; }
@media (max-width: 1200px) { .credits-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.plan-review { margin: 0 0 10px; border: 1px solid var(--line); padding: 0 10px; background: #fff; color: var(--fg-tint); font-size: var(--fs-1); }
.plan-review summary { padding: 9px 0; cursor: pointer; font-family: var(--mono); font-size: var(--fs-1); font-weight: 600; }
.review-summary { margin-left: 8px; color: var(--fg-tint); font-weight: 400; }
.review-body { max-height: 260px; overflow: auto; padding-bottom: 10px; }
.review-body p { margin: 4px 0 8px; line-height: 1.5; }
.review-body h4 { margin: 12px 0 6px; font-size: var(--fs-1); }
.review-warning { color: #9f4f3a; }
.review-disclaimer { color: var(--fg-tint); font-size: var(--fs-1); }
.review-table { border-collapse: collapse; font-size: var(--fs-1); }
.review-table th, .review-table td { padding: 3px 14px 3px 0; text-align: left; font-weight: 400; }
.review-table thead th { color: var(--fg-tint); font-family: var(--mono); font-size: var(--fs-1); }
.review-table td.is-over { color: #9f4f3a; font-weight: 600; }
.review-missing { display: flex; flex-wrap: wrap; gap: 0 14px; }

.app-footer { min-height: 35px; padding: 6px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 17px; border-top: 1px solid var(--line); color: var(--fg-tint); font-size: var(--fs-1); }
.app-footer > span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-tint); font-weight: 600; }
.footer-dot { width: 6px; height: 6px; background: var(--teal); }
.footer-disclaimer { margin-left: auto; font-family: var(--mono); font-size: var(--fs-1); }
.footer-copyright a, .unofficial-banner a { color: var(--teal-dark); font-weight: 600; text-decoration: none; }
.footer-copyright a:hover, .unofficial-banner a:hover { text-decoration: underline; }
.unofficial-banner { margin: 0; padding: 7px 26px; border-bottom: 1px solid #ece3a8; background: var(--gold-pale); color: var(--fg); font-size: var(--fs-1); line-height: 1.45; }
.toast { position: fixed; z-index: 30; bottom: 26px; left: 50%; max-width: calc(100% - 32px); padding: 10px 14px; transform: translate(-50%, 12px); border: 1px solid #dce3dd; background: #fffefa; box-shadow: 0 6px 24px rgb(35 46 39 / 12%); color: var(--fg-tint); font-size: var(--fs-2); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast.is-warning { border-color: #eac3b6; color: #9f4f3a; }

@keyframes card-in { from { transform: translateY(4px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (min-width: 1500px) {
  .workspace { grid-template-columns: 340px minmax(640px, 1fr) 360px; }
  .course-sidebar { padding-right: 20px; padding-left: 20px; }
  .detail-panel { padding-right: 24px; padding-left: 24px; }
  .graph-scroll { min-height: 540px; }
}

@media (max-width: 900px) {
  .panel-toolbar { flex-wrap: wrap; padding-bottom: 10px; }
  .toolbar-actions { margin-left: auto; }
}

@media (max-width: 1200px) {
  .app-shell { width: calc(100% - 24px); margin: 12px auto; }
  .workspace { grid-template-columns: minmax(250px, 290px) minmax(0, 1fr); }
  .detail-panel { grid-column: 1 / -1; min-height: 190px; border-top: 1px solid var(--line); border-left: 0; }
  .detail-empty { min-height: 150px; }
  .detail-empty h2 { max-width: none; font-size: var(--fs-4); }
  .detail-empty > p:last-of-type { margin: 0; }
  #detail-content { max-width: 640px; }
}

@media (max-width: 700px) {
  body { min-width: 360px; }
  .app-shell { width: 100%; min-height: 100vh; margin: 0; border: 0; box-shadow: none; }
  .topbar { height: 58px; padding: 0 12px; gap: 8px; }
  .brand { gap: 7px; }
  .topbar-context { padding-left: 8px; }
  .context-kicker { display: none; }
  .language-option { min-width: 32px; }
  .context-title { font-size: var(--fs-1); }
  .topbar-actions { gap: 0; }
  .data-status { display: none; }
  .status-dot { width: 8px; height: 8px; }
  .source-link { display: none; }
  .reset-button { min-width: 30px; margin-right: 6px; justify-content: center; padding: 0 6px; font-size: var(--fs-3); }
  .reset-label, .help-label { display: none; }
  .help-button { min-width: 30px; margin-right: 6px; justify-content: center; padding: 0 6px; }
  .workspace { min-height: 0; display: flex; flex-direction: column; }
  .course-sidebar { order: 2; max-height: 440px; padding: 17px 14px 12px; border-top: 1px solid var(--line); border-right: 0; }
  .sidebar-heading { margin-bottom: 12px; }
  .sidebar-heading h1 { font-size: var(--fs-5); }
  .target-summary { min-height: 75px; margin: 12px 0; padding: 9px 10px; }
  .course-list { max-height: 200px; }
  .main-panel { order: 1; min-height: 570px; }
  .major-tabs { min-height: 40px; padding: 0 9px; }
  .major-tab { padding: 0 8px; font-size: var(--fs-1); }
  .panel-toolbar { min-height: 52px; padding: 0 12px 10px; flex-wrap: wrap; row-gap: 0; }
  .toolbar-actions { width: 100%; justify-content: flex-end; }
  .view-tabs { height: 52px; max-width: 100%; gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .view-tab { flex: 0 0 auto; gap: 5px; font-size: var(--fs-1); }
  .guide-view { padding: 20px 13px 24px; }
  .guide-inner h2 { font-size: var(--fs-5); }
  .guide-lead { font-size: var(--fs-2); }
  .guide-steps { margin-top: 20px; grid-template-columns: 1fr; gap: 12px; }
  .guide-subheading { margin-top: 28px; }
  .guide-footer { padding: 16px; }
  .pick-toggle { font-size: var(--fs-1); }
  .toolbar-actions { gap: 6px; }
  .icon-button { width: 36px; height: 36px; }
  .action-button { min-height: 36px; padding: 0 10px; font-size: var(--fs-1); }
  .map-caption-row { padding: 17px 13px 12px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .map-caption-row h2 { font-size: var(--fs-5); }
  .map-legend { flex-wrap: wrap; justify-content: flex-start; gap: 4px 12px; max-width: none; }
  .map-view { padding: 0 10px; }
  .graph-scroll { min-height: 370px; max-height: 445px; }
  .map-footer { min-height: 39px; }
  .map-instruction { max-width: 220px; font-size: var(--fs-1); }
  .detail-panel { order: 3; min-height: 0; padding: 15px; }
  .detail-empty { min-height: 160px; }
  .detail-empty h2 { font-size: var(--fs-4); }
  .detail-empty > p:last-of-type { font-size: var(--fs-1); }
  .plan-view { min-height: 510px; padding: 16px 12px 10px; }
  .plan-intro { align-items: start; flex-direction: column; gap: 10px; }
  .plan-intro h3 { font-size: var(--fs-5); }
  .plan-tools { width: 100%; }
  .plan-grid { min-height: 360px; grid-template-rows: 40px 34px minmax(300px, 1fr); }
  .plan-legend { flex-wrap: wrap; gap: 8px 12px; padding: 7px 0; }
  .plan-note { width: 100%; margin-left: 0; }
  .app-footer { min-height: 34px; padding: 6px 12px; gap: 4px 11px; font-size: var(--fs-1); }
  .unofficial-banner { padding: 7px 12px; }
  .footer-disclaimer { font-size: var(--fs-1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Phones: course details as a full-screen sheet, the plan as a list, 44 px touch targets. */
@media (max-width: 700px) {
  .detail-panel { display: none; }
  .detail-panel.is-sheet-open { position: fixed; z-index: 20; inset: 0; display: block; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 32px; border: 0; background: #fff; }
  .detail-panel.is-sheet-open .detail-topline { position: sticky; z-index: 1; top: 0; margin: 0 -16px 16px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); background: #fff; }
  .detail-panel.is-sheet-open #detail-content { max-width: none; }
  body.has-sheet { overflow: hidden; }
  .close-button { width: 44px; height: 44px; }

  .plan-grid-scroll { overflow: visible; border: 0; background: transparent; }
  .plan-grid { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
  .plan-period-heading { display: none; }
  .plan-year { min-height: 44px; margin-top: 16px; border: 1px solid var(--line); background: #f2f2f2; color: var(--fg); font-weight: 600; }
  .plan-slot { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 6px; padding: 10px; border: 1px solid var(--line); border-top: 0; }
  .plan-slot .planned-course { margin: 0; }
  .plan-slot-label { grid-column: 1 / -1; margin: 0; color: var(--fg); font-weight: 600; }
  .plan-slot.is-empty { padding: 8px 10px; }
  .plan-slot.is-empty .plan-slot-label { color: var(--fg-tint); font-weight: 400; }
  .plan-slot.is-empty.is-summer { display: none; }

  .course-list { max-height: 60vh; }
  .graph-scroll { height: 60vh; min-height: 320px; max-height: none; }
  /* Phones keep one row that scrolls by swiping, without a scrollbar over the tabs. */
  .major-tabs { min-height: 44px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .major-tabs::-webkit-scrollbar { display: none; }
  .major-tab { min-height: 44px; }
  .language-option { min-width: 40px; height: 40px; }
  .reset-button, .help-button { min-width: 40px; min-height: 40px; }
  .pick-toggle { min-height: 44px; }
  .view-tab { min-height: 44px; }
  .guide-actions .action-button { flex: 1 1 auto; justify-content: center; }
  .icon-button { width: 44px; height: 44px; }
  .action-button { min-height: 44px; }
  .graph-zoom button { width: 40px; height: 40px; }
  .course-item { min-height: 52px; }
  .target-button, .completed-button, #move-period { min-height: 44px; }
  .add-plan-button { width: 44px; height: 44px; }
  .toast { right: 16px; left: 16px; max-width: none; transform: translateY(12px); }
  .toast.is-visible { transform: translateY(0); }
}

/* Narrow phones: the major's name is in the active major tab, so the top bar leaves room for its buttons. */
@media (max-width: 440px) {
  .topbar-context { display: none; }
  .topbar { gap: 0; }
}

/* Narrow phones: the three view tabs fit without their icons. */
@media (max-width: 440px) {
  .view-tabs .tab-icon { display: none; }
}

/* Touch screens cannot drag courses; hide the drag hints there. */
@media (pointer: coarse) {
  .drag-hint, .detail-drag-note { display: none; }
}
