:root {
  --ink: #060708;
  --ink-soft: #0b0d0f;
  --bone: #f0eadc;
  --bone-dim: rgba(240, 234, 220, 0.68);
  --bone-faint: rgba(240, 234, 220, 0.36);
  --line: rgba(240, 234, 220, 0.15);
  --line-strong: rgba(240, 234, 220, 0.28);
  --glass: rgba(8, 10, 12, 0.72);
  --glass-strong: rgba(8, 10, 12, 0.9);
  --accent: #d9b26f;
  --danger: #d58c84;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--bone);
  background: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--ink); }
body { color: var(--bone); }
button, input, select { font: inherit; }
button { color: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 3px;
}

#app { position: relative; width: 100%; height: 100%; isolation: isolate; background:
  radial-gradient(ellipse at 52% 46%, rgba(37, 42, 46, 0.23), transparent 47%),
  radial-gradient(ellipse at 20% 20%, rgba(144, 108, 58, 0.055), transparent 30%),
  radial-gradient(ellipse at 82% 74%, rgba(78, 115, 129, 0.055), transparent 28%),
  #060708;
}

#sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#sky.dragging { cursor: grabbing; }
.sky-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 2; background:
  radial-gradient(ellipse at center, transparent 42%, rgba(0,0,0,.22) 70%, rgba(0,0,0,.64) 120%),
  linear-gradient(to bottom, rgba(0,0,0,.22), transparent 20%, transparent 76%, rgba(0,0,0,.28));
}
.grain { position: absolute; inset: -20%; pointer-events: none; z-index: 3; opacity: .08; mix-blend-mode: soft-light;
  background-image:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,.9) 0 .35px, transparent .6px),
    radial-gradient(circle at 71% 31%, rgba(255,255,255,.7) 0 .35px, transparent .65px),
    radial-gradient(circle at 42% 82%, rgba(255,255,255,.65) 0 .3px, transparent .6px);
  background-size: 7px 7px, 11px 11px, 13px 13px;
  transform: rotate(0.001deg);
}

.masthead { position: absolute; z-index: 20; top: calc(18px + var(--safe-top)); left: 20px; right: 20px; display: grid; grid-template-columns: minmax(180px, .72fr) minmax(280px, 1.6fr) auto auto; gap: 14px; align-items: center; pointer-events: none; }
.masthead > * { pointer-events: auto; }
.wordmark { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wordmark-kicker, .eyebrow { font-size: 10px; line-height: 1.2; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-faint); font-weight: 650; }
.wordmark-title { font-family: Iowan Old Style, Baskerville, "Times New Roman", serif; font-size: clamp(18px, 1.8vw, 25px); letter-spacing: -.025em; white-space: nowrap; }

.search-shell { position: relative; height: 50px; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(6, 7, 8, .86); box-shadow: 0 10px 40px rgba(0,0,0,.18); backdrop-filter: blur(18px) saturate(120%); display: flex; align-items: center; transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.search-shell:focus-within { border-color: rgba(240,234,220,.42); background: rgba(7,8,9,.9); box-shadow: 0 16px 55px rgba(0,0,0,.38); }
.search-icon { width: 42px; text-align: center; font-size: 22px; color: var(--bone-dim); transform: translateY(-1px); }
#search-input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--bone); padding: 0 48px 0 0; font-size: 16px; }
#search-input::placeholder { color: rgba(240,234,220,.42); }
.search-shortcut { position: absolute; right: 13px; top: 11px; min-width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 7px; color: var(--bone-faint); font: 11px/22px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; background: rgba(255,255,255,.03); }
.search-results { position: absolute; top: 58px; left: 0; right: 0; max-height: min(65vh, 520px); overflow: auto; border: 1px solid var(--line-strong); border-radius: 4px; background: rgba(7,8,9,.98); box-shadow: var(--shadow); padding: 7px; }
.search-result { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; padding: 12px; border-radius: 0; display: grid; grid-template-columns: 8px 1fr auto; gap: 11px; align-items: start; cursor: pointer; }
.search-result:hover, .search-result[aria-selected="true"] { background: rgba(255,255,255,.07); }
.search-result .result-star { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; background: var(--result-color, var(--accent)); box-shadow: 0 0 12px var(--result-color, var(--accent)); }
.search-result strong { font-size: 14px; font-weight: 620; }
.search-result small { display: block; color: var(--bone-faint); margin-top: 3px; line-height: 1.35; }
.search-result em { font-style: normal; font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--bone-faint); border: 1px solid var(--line); border-radius: 999px; padding: 3px 7px; white-space: nowrap; }
.search-empty { padding: 22px 18px; color: var(--bone-dim); line-height: 1.5; }

.mode-switch, .segmented { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 4px; background: rgba(6,7,8,.72); backdrop-filter: blur(18px); }
.mode-switch button, .segmented button { border: 0; background: transparent; border-radius: 2px; padding: 9px 12px; color: var(--bone-faint); font-size: 11px; cursor: pointer; white-space: nowrap; transition: color .2s ease, background .2s ease; }
.mode-switch button[aria-pressed="true"], .segmented button[aria-pressed="true"] { color: var(--bone); background: rgba(240,234,220,.10); box-shadow: inset 0 0 0 1px rgba(240,234,220,.05); }

.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: rgba(6,7,8,.72); cursor: pointer; font-size: 24px; line-height: 1; backdrop-filter: blur(16px); }
.icon-button:hover { background: rgba(255,255,255,.08); border-color: var(--line-strong); }
.menu-button { display: grid; padding: 11px; gap: 4px; }
.menu-button span { display: block; width: 15px; height: 1px; background: var(--bone-dim); }

.control-drawer { position: absolute; z-index: 16; left: 20px; top: calc(82px + var(--safe-top)); width: 274px; max-height: calc(100vh - 146px - var(--safe-top) - var(--safe-bottom)); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7,8,9,.92); box-shadow: var(--shadow); backdrop-filter: blur(24px) saturate(120%); padding: 15px; scrollbar-width: thin; transform: translateX(calc(-100% - 36px)); opacity: 0; pointer-events: none; transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .22s ease; }
.control-drawer.open { transform: translateX(0); opacity: 1; pointer-events: auto; }
.control-section { padding: 3px 0 15px; margin-bottom: 14px; border-bottom: 1px solid rgba(240,234,220,.10); }
.control-section:last-child { margin-bottom: 0; border-bottom: 0; }
.control-section.compact { padding-bottom: 13px; }
.control-section .eyebrow { margin-bottom: 9px; }
.control-drawer select { width: 100%; height: 40px; color: var(--bone); border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04); padding: 0 10px; outline: none; }
.control-drawer select option { color: #111; }
.microcopy { color: var(--bone-faint); font-size: 11px; line-height: 1.45; margin: 9px 2px 0; }
.area-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.area-filter { border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--bone-dim); border-radius: 999px; padding: 6px 8px; font-size: 10px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.area-filter::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--area-color); box-shadow: 0 0 8px var(--area-color); }
.area-filter[aria-pressed="true"] { color: var(--bone); border-color: rgba(240,234,220,.34); background: rgba(255,255,255,.07); }
.quiet-button, .primary-button { min-height: 40px; border-radius: 999px; padding: 0 14px; cursor: pointer; }
.quiet-button { border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--bone-dim); }
.quiet-button:hover:not(:disabled) { color: var(--bone); background: rgba(255,255,255,.07); }
.quiet-button:disabled { opacity: .35; cursor: default; }
.primary-button { border: 0; background: var(--bone); color: #111315; font-weight: 650; }
#start-course { width: 100%; margin-top: 8px; }
.toggle-row { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: start; cursor: pointer; margin: 10px 0; }
.toggle-row input { appearance: none; width: 30px; height: 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255,255,255,.04); position: relative; margin: 1px 0 0; }
.toggle-row input::after { content: ""; position: absolute; width: 12px; height: 12px; top: 2px; left: 2px; background: var(--bone-faint); border-radius: 50%; transition: transform .18s ease, background .18s ease; }
.toggle-row input:checked { background: rgba(217,178,111,.22); border-color: rgba(217,178,111,.48); }
.toggle-row input:checked::after { transform: translateX(12px); background: var(--bone); }
.toggle-row strong { display: block; font-size: 11px; font-weight: 600; }
.toggle-row small { display: block; color: var(--bone-faint); font-size: 10px; line-height: 1.35; margin-top: 2px; }
.keyboard-help dl { margin: 0; display: grid; gap: 6px; }
.keyboard-help dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--bone-faint); }
.keyboard-help dt { font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--bone-dim); }
.keyboard-help dd { margin: 0; }

.labels { position: absolute; inset: 0; z-index: 7; pointer-events: none; overflow: hidden; }
.sky-label { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; text-shadow: 0 1px 8px #000, 0 0 18px #000; will-change: transform, opacity; }
.sky-label.area { font-family: Iowan Old Style, Baskerville, "Times New Roman", serif; font-size: clamp(15px, 1.35vw, 22px); letter-spacing: .025em; color: rgba(240,234,220,.46); }
.sky-label.discipline { font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; color: rgba(240,234,220,.48); }
.sky-label.topic { font-size: 11px; letter-spacing: .015em; color: rgba(240,234,220,.56); }
.sky-label.term { font-size: 11px; color: rgba(240,234,220,.78); padding-left: 8px; }
.sky-label.term::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--star-color, var(--bone)); box-shadow: 0 0 7px var(--star-color, var(--bone)); }
.sky-label.selected { color: var(--bone); font-weight: 650; font-size: 13px; }

.hover-card { position: absolute; z-index: 25; width: min(280px, calc(100vw - 32px)); pointer-events: none; border: 1px solid var(--line); border-radius: 13px; background: rgba(8,9,10,.9); box-shadow: 0 14px 46px rgba(0,0,0,.38); backdrop-filter: blur(18px); padding: 10px 12px; }
.hover-card strong { display: block; font-size: 13px; }
.hover-card span { display: block; margin-top: 3px; font-size: 10px; color: var(--bone-faint); }

.inspector { position: absolute; z-index: 30; top: calc(18px + var(--safe-top)); bottom: calc(44px + var(--safe-bottom)); right: 20px; width: min(390px, calc(100vw - 40px)); border: 1px solid var(--line); border-radius: 22px; background: rgba(8,9,10,.91); box-shadow: var(--shadow); backdrop-filter: blur(28px) saturate(120%); overflow: hidden; animation: inspector-in .34s cubic-bezier(.2,.8,.2,1); }
.inspector-close { position: absolute; z-index: 2; top: 12px; right: 12px; background: rgba(255,255,255,.04); }
.inspector-scroll { height: 100%; overflow: auto; padding: 29px 26px 36px; scrollbar-width: thin; }
.inspector h1 { font-family: Iowan Old Style, Baskerville, "Times New Roman", serif; font-weight: 500; font-size: clamp(31px, 4vw, 48px); line-height: .98; letter-spacing: -.035em; margin: 12px 42px 13px 0; }
.sense-pill { display: inline-flex; border: 1px solid var(--line); color: var(--bone-faint); border-radius: 999px; padding: 5px 8px; font-size: 10px; margin-bottom: 14px; }
.beginner-card, .conversation-card, .caution-block { margin-top: 13px; border-radius: 15px; padding: 14px 15px; }
.beginner-card { background: rgba(240,234,220,.09); border: 1px solid rgba(240,234,220,.12); }
.conversation-card { border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.caution-block { border: 1px solid rgba(213,140,132,.26); background: rgba(213,140,132,.07); }
.card-label { font: 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--bone-faint); }
.beginner-card p, .caution-block p { margin: 7px 0 0; line-height: 1.48; font-size: 15px; }
.conversation-card blockquote { margin: 7px 0 0; font-family: Iowan Old Style, Baskerville, "Times New Roman", serif; font-size: 18px; line-height: 1.38; color: var(--bone-dim); }
.definition-details { margin: 18px 0 0; border-top: 1px solid var(--line); padding-top: 15px; }
.definition-details summary { cursor: pointer; font-size: 11px; color: var(--bone-faint); letter-spacing: .05em; }
.definition-details p { line-height: 1.55; font-size: 13px; color: var(--bone-dim); }
.definition-details .secondary-copy { color: var(--bone-faint); }
.inspector-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 18px 0 25px; }
.relation-section { border-top: 1px solid var(--line); padding-top: 18px; }
.section-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-heading-row h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin: 0; color: var(--bone-dim); }
.count-badge { font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--bone-faint); }
.relation-list { display: grid; gap: 7px; margin-top: 12px; }
.relation-item { width: 100%; border: 1px solid var(--line); background: rgba(255,255,255,.018); border-radius: 12px; padding: 10px 11px; text-align: left; cursor: pointer; }
.relation-item:hover { background: rgba(255,255,255,.06); }
.relation-item strong { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 620; }
.relation-item b { font: 8px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--bone-faint); font-weight: 500; }
.relation-item p { margin: 4px 0 0; font-size: 10px; line-height: 1.4; color: var(--bone-faint); }

.compare-drawer { position: absolute; z-index: 34; left: 50%; bottom: calc(58px + var(--safe-bottom)); transform: translateX(-50%); width: min(900px, calc(100vw - 36px)); max-height: min(72vh, 700px); overflow: auto; border: 1px solid var(--line); border-radius: 22px; background: rgba(7,8,9,.96); box-shadow: var(--shadow); backdrop-filter: blur(30px); padding: 22px; animation: compare-in .28s ease-out; }
.compare-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.compare-head h2 { font-family: Iowan Old Style, Baskerville, "Times New Roman", serif; font-size: 26px; font-weight: 500; margin: 6px 0 0; }
.compare-content { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.compare-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: rgba(255,255,255,.025); }
.compare-card h3 { font-family: Iowan Old Style, Baskerville, "Times New Roman", serif; font-size: 26px; font-weight: 500; margin: 5px 0 12px; }
.compare-card p { color: var(--bone-dim); font-size: 13px; line-height: 1.5; }
.compare-card .compare-path { color: var(--bone-faint); font-size: 10px; }
.compare-bridge { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 13px; color: var(--bone-dim); font-size: 12px; line-height: 1.5; }

.course-player { position: absolute; z-index: 28; left: 50%; bottom: calc(58px + var(--safe-bottom)); transform: translateX(-50%); width: min(760px, calc(100vw - 36px)); min-height: 74px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(7,8,9,.9); box-shadow: var(--shadow); backdrop-filter: blur(24px); padding: 16px 18px 13px; overflow: hidden; }
.course-progress { position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: rgba(255,255,255,.05); }
.course-progress span { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 11px var(--accent); transition: width .25s ease; }
.course-copy strong { display: block; margin-top: 4px; font-family: Iowan Old Style, Baskerville, "Times New Roman", serif; font-size: 21px; font-weight: 500; }
.course-copy #course-position { display: block; margin-top: 3px; color: var(--bone-faint); font-size: 10px; }
.course-actions { display: flex; gap: 7px; align-items: center; }
.course-actions .icon-button { width: 36px; height: 36px; font-size: 17px; }
.course-slot:empty { display: none; }
.course-slot .course-player {
  position: relative; inset: auto; left: auto; right: auto; bottom: auto; transform: none;
  width: 100%; min-height: 0; margin: 14px 0 2px; padding: 13px 13px 11px;
  border-radius: 14px; box-shadow: none; background: rgba(255,255,255,.026);
}

@media (min-width: 761px) {
  #app[data-inspector-open="true"] .course-player {
    left: calc((100vw - 430px) / 2);
    width: min(760px, calc(100vw - 470px));
  }
}

.orientation-card { display:none; }
.orientation-card.dismissed { opacity: 0; visibility: hidden; transform: translate(-50%, -40%); }
.orientation-card p { font-family: Iowan Old Style, Baskerville, "Times New Roman", serif; font-size: 22px; line-height: 1.32; margin: 18px auto 22px; color: var(--bone-dim); max-width: 390px; }
.orientation-card p strong { color: var(--bone); font-weight: 500; }
.orientation-orbit { position: relative; width: 74px; height: 74px; margin: 0 auto; }
.orientation-orbit::before, .orientation-orbit::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(240,234,220,.2); border-radius: 50%; transform: rotate(26deg) scaleY(.42); }
.orientation-orbit::after { inset: 2px; transform: rotate(-35deg) scaleY(.34); }
.orientation-orbit i { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--bone); box-shadow: 0 0 12px var(--bone); }
.orientation-orbit i:nth-child(1) { transform: translate(-26px, -15px); }
.orientation-orbit i:nth-child(2) { transform: translate(19px, 12px); background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.orientation-orbit i:nth-child(3) { transform: translate(-3px, -2px); width: 6px; height: 6px; }

.statusbar { position: absolute; z-index: 20; left: 20px; right: 20px; bottom: calc(12px + var(--safe-bottom)); display: grid; grid-template-columns: 1fr auto 1fr; gap: 15px; align-items: center; color: var(--bone-faint); font-size: 10px; pointer-events: none; }
.statusbar > * { pointer-events: auto; }
.crumb { display: flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb b { font-weight: 400; opacity: .55; }
.status-actions { display: flex; gap: 12px; }
.status-actions button { border: 0; background: transparent; color: var(--bone-faint); font-size: 10px; cursor: pointer; padding: 4px 0; }
.status-actions button:hover { color: var(--bone); }
.render-status { justify-self: end; font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }

.accessible-dialog { width: min(720px, calc(100vw - 28px)); max-height: min(82vh, 820px); color: var(--bone); border: 1px solid var(--line); border-radius: 22px; background: rgba(7,8,9,.98); box-shadow: var(--shadow); padding: 20px; }
.accessible-dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.dialog-head h2 { font-family: Iowan Old Style, Baskerville, "Times New Roman", serif; font-size: 28px; font-weight: 500; margin: 6px 0 12px; }
.accessible-dialog > label { display: block; font-size: 11px; color: var(--bone-faint); margin: 8px 0 5px; }
#accessible-search { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04); color: var(--bone); padding: 0 12px; }
.accessible-list { margin-top: 12px; display: grid; gap: 6px; max-height: 56vh; overflow: auto; }
.accessible-item { width: 100%; display: grid; grid-template-columns: 8px 1fr; gap: 10px; align-items: start; text-align: left; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.02); color: var(--bone); padding: 10px; cursor: pointer; }
.accessible-item::before { content: ""; width: 5px; height: 5px; margin-top: 6px; border-radius: 50%; background: var(--item-color); box-shadow: 0 0 8px var(--item-color); }
.accessible-item strong { font-size: 12px; }
.accessible-item small { display: block; color: var(--bone-faint); margin-top: 3px; line-height: 1.35; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
[hidden] { display: none !important; }

@keyframes inspector-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes compare-in { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 1120px) {
  .masthead { grid-template-columns: auto minmax(260px, 1fr) auto; }
  .mode-switch { display: none; }
  .control-drawer { background: rgba(7,8,9,.95); box-shadow: var(--shadow); }
}

@media (max-width: 760px) {
  .masthead { top: calc(10px + var(--safe-top)); left: 12px; right: 12px; grid-template-columns: 1fr auto; gap: 9px; }
  .wordmark { grid-column: 1; grid-row: 1; }
  .wordmark-kicker { display: none; }
  .wordmark-title { font-size: 18px; }
  .search-shell { grid-column: 1 / -1; grid-row: 2; height: 44px; }
  .menu-button { grid-column: 2; grid-row: 1; width: 36px; height: 36px; }
  .control-drawer { top: calc(104px + var(--safe-top)); left: 12px; width: min(300px, calc(100vw - 24px)); max-height: calc(100vh - 160px - var(--safe-top) - var(--safe-bottom)); }
  .inspector { top: auto; left: 10px; right: 10px; bottom: calc(48px + var(--safe-bottom)); width: auto; max-height: 68vh; border-radius: 20px; }
  .inspector-scroll { padding: 23px 20px 30px; }
  .inspector h1 { font-size: 36px; }
  .orientation-card { top: 54%; padding: 21px; }
  .orientation-card p { font-size: 19px; }
  .statusbar { left: 12px; right: 12px; grid-template-columns: 1fr auto; }
  .status-actions { justify-self: end; }
  .status-actions button:nth-child(2), .render-status { display: none; }
  .compare-content { grid-template-columns: 1fr; }
  .compare-bridge { grid-column: 1; }
  .course-player { grid-template-columns: 1fr; gap: 10px; bottom: calc(52px + var(--safe-bottom)); }
  .course-slot .course-player { bottom: auto; margin-top: 12px; }
  .course-slot .course-actions { justify-content: flex-start; }
  .course-actions { justify-content: flex-end; }
  .keyboard-help { display: none; }
}

@media (max-width: 430px) {
  .status-actions button[data-action="home"] { display: none; }
  .inspector-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-drawer { padding: 17px; bottom: calc(50px + var(--safe-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
  .grain { display: none; }
}

.mobile-view-switch { display: none; }
@media (max-width: 1120px) { .mobile-view-switch { display: block; } .mobile-view-switch .segmented { width: 100%; } .mobile-view-switch .segmented button { flex: 1; padding-inline: 7px; } }

.back-to-dictionary{position:fixed;left:18px;bottom:56px;z-index:80;color:#ece6d9;background:rgba(7,8,9,.76);border:1px solid rgba(236,230,217,.22);padding:8px 11px;text-decoration:none;font:600 12px/1.2 system-ui,-apple-system,sans-serif;backdrop-filter:blur(12px)}
.back-to-dictionary:hover{border-color:rgba(236,230,217,.65)}
.link-button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
@media(max-width:700px){.back-to-dictionary{left:12px;bottom:54px;font-size:11px}.inspector-actions{display:grid;grid-template-columns:1fr 1fr}}
@media(prefers-reduced-motion:reduce){.grain{display:none}.orientation-orbit{display:none!important}}

.sky-noscript{position:fixed;inset:0;z-index:1000;display:grid;place-content:center;gap:18px;padding:clamp(24px,6vw,80px);background:radial-gradient(circle at 50% 42%,rgba(255,255,255,.045),transparent 34%),#060708;color:var(--bone);text-align:center}
.sky-noscript .eyebrow{color:var(--bone-faint)}
.sky-noscript h1{max-width:760px;margin:0;font:500 clamp(38px,7vw,82px)/.94 Iowan Old Style,Baskerville,"Times New Roman",serif;letter-spacing:-.045em}
.sky-noscript p{max-width:600px;margin:0 auto;color:var(--bone-dim);font-size:clamp(16px,2.5vw,22px);line-height:1.45}
.sky-noscript-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:6px}
.sky-noscript-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:0 18px;border:1px solid var(--line-strong);border-radius:999px;color:var(--bone);text-decoration:none;font:600 13px/1 system-ui,-apple-system,sans-serif}
.sky-noscript-actions a:first-child{background:var(--bone);color:#090a0b;border-color:var(--bone)}
