:root {
  --ink: #E9ECF6; --night: #070A16; --panel: rgba(13,17,36,.94); --panel-solid: #0D1124; /* same palette as the intro site (about/about.css) */
  --orbit: #4C8DF6; --violet: #C9A86A; --star: #F3E2A6; --line: #222842; --mute: #8D93B3; --brass: #C9A86A;
  --display: Manrope, "Pretendard Variable", Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --sans: "Pretendard Variable", Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Pretendard Variable", "Malgun Gothic", "Apple SD Gothic Neo", monospace; /* Hangul falls to Pretendard, never GulimChe */
}
* { box-sizing: border-box; }
html, body { -webkit-user-select: none; user-select: none; margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--ink);
  font: 13px/1.45 var(--sans); }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#c.drag { cursor: grabbing; }

/* loading screen */
#loader { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--night); transition: opacity .8s ease, visibility .8s; }
body.ready #loader { opacity: 0; visibility: hidden; }
.loader-mark { width: 104px; height: 104px; animation: rise 2.6s ease-in-out infinite; }
@keyframes rise { 0%,100% { transform: translateY(0); filter: none); }
  50% { transform: translateY(-4px); filter: none); } }
.wordmark { font: 800 36px/1 var(--display); letter-spacing: -0.03em; }
.wordmark span { color: var(--orbit); }
.tagline { color: var(--mute); font-size: 13px; letter-spacing: .02em; }
.loader-bar { width: 180px; height: 3px; border-radius: 0; background: var(--line); overflow: hidden; margin-top: 14px; }
.loader-bar i { display: block; width: 40%; height: 100%; background: var(--orbit); border-radius: 0; animation: slide 1.3s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
#loader-step { color: var(--mute); font: 11px var(--mono); }

/* sky labels */
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; white-space: nowrap; transform: translate(6px, -50%); font-size: 12px;
  text-shadow: 0 0 3px var(--black), 0 0 2px var(--black); }
.lbl.star { color: #D9C49A; }
.lbl.dso { color: #ffb37a; }
.lbl.planet { color: var(--star); font-weight: 700; font-size: 12px; }
.lbl.card { color: #ff8a73; font-weight: 800; font-size: 14px; transform: translate(-50%, -120%); }
.lbl.const { color: #6b7aa3; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; transform: translate(-50%, -50%); }
#sel-ring { position: fixed; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 2px solid var(--orbit);
  border-radius: 50%; pointer-events: none; box-shadow: 0 0 8px var(--orbit); }

/* chrome */
#topbar { position: fixed; top: 12px; left: 12px; right: 12px; display: flex; gap: 12px; align-items: center; pointer-events: none; }
#brand { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding-right: 6px; color: var(--ink); text-decoration: none;
  font: 800 15px var(--display); letter-spacing: -0.025em; white-space: nowrap; text-shadow: 0 0 6px var(--black); }
#brand img { width: 18px; height: 18px; margin: 0 0 0 8px; } /* the mark sits inside the bar with air around it */
#brand em { font-style: normal; color: var(--orbit); }
#brand span { word-spacing: 0.22em; } /* the tight letter-spacing of the wordmark also squeezed the gap between the two words */ /* Space in ink, Commons in blue, as in the original identity */
#search { pointer-events: auto; width: min(340px, 60vw); padding: 8px 12px; border-radius: 0; border: 1px solid var(--line);
  background: var(--panel); color: inherit; font: inherit; outline: none; }
#search:focus { border-color: var(--orbit); }
#status { color: var(--mute); font: 11px var(--mono); text-shadow: 0 0 3px var(--black); }
#panel { position: fixed; left: 12px; bottom: 12px; padding: 10px 12px; border-radius: 0; background: var(--panel);
  border: 1px solid var(--line); max-width: calc(100vw - 24px); backdrop-filter: blur(6px); }
#panel .row { margin: 4px 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
#clock { font: 500 13px var(--mono); }
#panel input[type=number] { width: 80px; background: var(--panel-solid); color: inherit; border: 1px solid var(--line); border-radius: 0; padding: 2px 5px; font: 12px var(--mono); }
input[type=checkbox] { accent-color: #CFC8BB; }
button { background: var(--panel-solid); color: inherit; border: 1px solid var(--line); border-radius: 0; padding: 3px 9px; cursor: pointer; font: inherit; }
button:hover { border-color: var(--orbit); }
button.on { background: var(--orbit); color: var(--night); border-color: var(--orbit); font-weight: 700; }
.small { font: 11px var(--mono); color: var(--mute); }
#info { position: fixed; top: 60px; right: 12px; width: min(310px, calc(100vw - 24px)); max-height: calc(100vh - 84px); overflow: auto;
  padding: 14px; border-radius: 0; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(6px); }
#info h2 { margin: 0 26px 2px 0; font: 800 19px/1.3 var(--display); letter-spacing: -0.02em; }
#info-sub { color: var(--orbit); margin-bottom: 10px; font-size: 12px; }
#info table { width: 100%; border-collapse: collapse; }
#info td { padding: 3px 0; vertical-align: top; border-top: 1px solid rgba(46,54,88,.5); }
#info td:first-child { color: var(--mute); width: 42%; }
#info td:last-child { font-family: var(--mono); font-size: 12px; }
#info-img { width: 100%; margin-top: 10px; border-radius: 0; background: var(--black); aspect-ratio: 1; }
#info-close { position: absolute; top: 10px; right: 10px; padding: 0 8px; }
#info-goto { background: var(--orbit); color: var(--night); border-color: var(--orbit); font-weight: 700; margin-top: 8px; }
#help { text-align: right; position: fixed; right: 12px; bottom: 12px; color: var(--mute); font-size: 12px; text-shadow: 0 0 3px var(--black); }
#help a { color: inherit; }
@media (max-width: 640px) { #help, #status { display: none; } #brand span { display: none; } #info { top: auto; bottom: 210px; max-height: 40vh; } }

/* mode switch */
#modes { pointer-events: auto; display: flex; padding: 3px; gap: 2px; border-radius: 0; background: var(--panel); border: 1px solid var(--line); }
#modes button { white-space: nowrap; border: 0; background: transparent; padding: 5px 14px; border-radius: 0; font-weight: 600; }
#modes button.on { background: var(--orbit); color: var(--night); }
.space-only { display: none !important; }
body.space .space-only { display: revert !important; }
body.space .ground-only { display: none !important; }
#panel .row.space-only { display: none !important; }
body.space #panel .row.space-only { display: flex !important; }
#sp-target { color: var(--star); }

/* tools and the "tonight" list */
#tools { pointer-events: auto; display: flex; gap: 4px; }
#tools button { white-space: nowrap; background: var(--panel); }
select, input[type=datetime-local] { background: var(--panel-solid); color: inherit; border: 1px solid var(--line); border-radius: 0; padding: 2px 5px; font: 12px var(--sans); color-scheme: dark; }
#tonight { position: fixed; top: 60px; left: 12px; width: min(300px, calc(100vw - 24px)); max-height: calc(100vh - 300px); overflow: auto;
  padding: 14px; border-radius: 0; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(6px); }
#tonight h2 { margin: 0 26px 4px 0; font: 800 16px var(--display); }
#tonight ul { list-style: none; margin: 10px 0 0; padding: 0; }
#tonight li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid rgba(34,40,66,.6); }
#tonight li button { background: none; border: 0; padding: 2px 0; color: var(--ink); font-weight: 600; text-align: left; }
#tonight li button:hover { color: var(--orbit); }
#tonight li span { color: var(--mute); font-size: 12px; white-space: nowrap; }
#tonight-close { position: absolute; top: 10px; right: 10px; padding: 0 8px; }
@media (max-width: 640px) { #tools #full { display: none; } #tonight { max-height: 40vh; } }

/* wikipedia summary, time slider */
#info-wiki { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
#info-wiki p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.6; color: #D6D0C4; }
#info-wiki a { color: var(--orbit); font-size: 12px; text-decoration: none; }
#wiki-img { width: 100%; border-radius: 0; margin-bottom: 8px; background: var(--black); }
.scrub { display: flex; align-items: center; gap: 8px; }
#scrub { width: min(260px, 50vw); accent-color: #CFC8BB; }

/* guided tour */
#tour { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); width: min(460px, calc(100vw - 24px)); z-index: 5;
  padding: 14px 16px; border-radius: 0; background: var(--panel); border: 1px solid var(--orbit); backdrop-filter: blur(8px); }
#tour p { margin: 6px 0 10px; font-size: 14px; line-height: 1.6; }
#tour .tour-head { display: flex; justify-content: space-between; align-items: center; }
#tour .row { display: flex; gap: 6px; justify-content: flex-end; }
#tour-next { background: var(--orbit); color: var(--night); border-color: var(--orbit); font-weight: 700; }

/* exoplanets */
.lbl.exo { color: var(--orbit); font-size: 12px; }
#info-exo { margin-top: 10px; }
.sysmap { width: 100%; height: auto; background: rgba(7,10,22,.6); border-radius: 0; border: 1px solid var(--line); }
.sysmap text { font: 9px var(--mono); fill: var(--warm-mute); }
.sysmap text.pl { fill: #ECE6DA; font-size: 12px; }
.sysmap text.hz { fill: var(--orbit); }
.pltable { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12px; }
.pltable th { color: var(--mute); font-weight: 500; text-align: left; padding: 3px 4px 3px 0; border-bottom: 1px solid var(--line); }
.pltable td { padding: 3px 4px 3px 0; font-family: var(--mono); border-top: 1px solid rgba(34,40,66,.5) !important; width: auto !important; color: var(--ink) !important; }
/* eyepiece circle */
#eye-ring { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(76,141,246,.8); box-shadow: 0 0 0 9999px rgba(0,0,0,.55); }
#eye-label { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); white-space: nowrap; font: 11px var(--mono); color: var(--orbit); }
/* night vision: everything in deep red so dark-adapted eyes stay adapted */
body.red { filter: grayscale(1) sepia(1) saturate(9) hue-rotate(-45deg) brightness(.7); }
body { position: fixed; inset: 0; } /* never let focus/scrollIntoView shift the whole page */

/* version */
.version { margin-top: 2px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 0; font: 11px var(--mono); color: var(--orbit); letter-spacing: .06em; }
#version-tag { position: fixed; right: 12px; top: 54px; font: 10px var(--mono); color: var(--mute); opacity: .7; pointer-events: none; }
@media (max-width: 640px) { #version-tag { display: none; } }

/* side panels: today, observing list (share the "tonight" look) */
.side { position: fixed; top: 60px; left: 12px; width: min(330px, calc(100vw - 24px)); max-height: calc(100vh - 300px); overflow: auto; z-index: 4;
  padding: 14px; border-radius: 0; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(6px); }
.side h2 { margin: 0 26px 4px 0; font: 800 16px var(--display); }
.side .x { position: absolute; top: 10px; right: 10px; padding: 0 8px; }
.side ul { list-style: none; margin: 10px 0 0; padding: 0; }
#today-list li { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 5px 0; border-top: 1px solid rgba(34,40,66,.6); font-size: 12px; }
#today-list li b { font: 500 12px var(--mono); color: var(--ink); }
#today-list li span { color: #CEC8BC; }
#today-list li.best b, #today-list li.best span { color: var(--orbit); }
#obs-list li { display: grid; grid-template-columns: 18px 1fr 24px; gap: 4px 8px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(34,40,66,.6); }
#obs-list li button:not(.del) { background: none; border: 0; padding: 0; text-align: left; font-weight: 600; color: var(--ink); }
#obs-list li button.done { color: var(--mute); text-decoration: line-through; }
#obs-list li .del { padding: 0 6px; }
#obs-list li input[type=text], #obs-list li input:not([type]) { grid-column: 2 / 4; background: var(--panel-solid); color: inherit; border: 1px solid var(--line); border-radius: 0; padding: 3px 6px; font: 12px var(--sans); }
#obs-add { margin-top: 8px; }
#obs-add.on { border-color: var(--orbit); color: var(--orbit); }
.lbl.shower { color: #ffd27a; font-weight: 600; }
.lbl.shower::before { content: ''; position: absolute; left: -11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  border: 1.5px dashed #ffd27a; }
.tour-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tour-pick button { padding: 6px 10px; }
#gyro.on { background: var(--orbit); color: var(--night); }
.mobile-only { display: none; }

/* phone */
@media (max-width: 640px) {
  .mobile-only { display: inline-block; }
  #topbar { flex-wrap: wrap; gap: 6px; }
  #search { width: calc(100vw - 150px); }
  #tools { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  #tools button { flex: 0 0 auto; }
  #panel { left: 8px; right: 8px; bottom: 8px; max-width: none; padding: 8px 10px; }
  body.collapsed #panel .row:not(:first-child) { display: none !important; }
  #panel-toggle { margin-left: auto; }
  .side, #tonight { top: auto; bottom: 80px; left: 8px; right: 8px; width: auto; max-height: 50vh; }
  #info { left: 8px; right: 8px; width: auto; bottom: 80px; max-height: 55vh; }
  #tour { top: auto; bottom: 80px; }
  button { padding: 6px 10px; } /* finger-sized */
}

/* calendar, flybys */
#cal-list li, #flyby-list li { display: flex; flex-direction: column; gap: 1px; padding: 5px 0; border-top: 1px solid rgba(34,40,66,.6); }
#cal-list li.day { border: 0; padding: 10px 0 2px; color: var(--orbit); font: 600 12px var(--sans); }
#cal-list li button, #flyby-list li button { background: none; border: 0; padding: 0; text-align: left; color: var(--ink); font-weight: 600; }
#cal-list li button:hover, #flyby-list li button:hover { color: var(--orbit); }
#cal-list li span, #flyby-list li span { color: var(--mute); font-size: 12px; line-height: 1.5; }
/* satellites */
.lbl.sat { color: #9aa3c2; font-size: 12px; }
.lbl.sat::before { content: ''; position: absolute; left: -8px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: #6b7394; }
.lbl.sat.lit { color: #EFE9DD; }
.lbl.sat.lit::before { background: var(--white); box-shadow: 0 0 4px var(--white); }
.lbl.sat.iss { color: var(--orbit); font-weight: 700; font-size: 12px; }
.lbl.sat.iss::before { width: 6px; height: 6px; margin-top: -3px; background: var(--orbit); }
/* Korean satellites, landing sites */
.lbl.sat.kr { color: #b4ece0; font-weight: 600; } /* calm teal: pink read as alarming to testers */
.lbl.sat.kr::before { background: #4fd1b5; box-shadow: 0 0 4px #4fd1b5; }
.lbl.site { color: #ffe0a3; font-size: 12px; }
.lbl.site::before { content: ''; position: absolute; left: -9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; transform: rotate(45deg); border: 1.5px solid #ffe0a3; }

/* Korean traditional constellations */
.lbl.const.kr { color: #d9a46c; letter-spacing: 0; text-transform: none; font-size: 12px; }
.lbl.const.kr.mansion { color: #f0c38a; font-weight: 700; font-size: 12px; }

/* 0.0.2d: altitude graph, weather, gear, photo frame */
#info-alt { margin-top: 8px; }
#info-alt svg { width: 100%; height: auto; display: block; border-radius: 0; }
#info-alt .small { margin-top: 4px; }
#frame-rect { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 1.5px dashed var(--orbit); pointer-events: none; z-index: 3; }
#frame-label { position: absolute; left: 0; top: 100%; transform: translateY(4px); white-space: nowrap; font: 11px var(--mono); color: var(--orbit); }
.wx-sum { margin: 8px 0; font-size: 13px; }
#wx-table td, #wx-table th { text-align: right; padding: 2px 4px; font-family: var(--mono); font-size: 12px; }
#wx-table td:first-child, #wx-table th:first-child { text-align: left; }
#wx-table tr.day td { color: var(--mute); }
#wx-table .bar { display: inline-block; height: 7px; border-radius: 0; background: var(--warm-mute); vertical-align: middle; margin-right: 4px; }
.gear-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin: 8px 0; }
.gear-grid label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--mute); }
.gear-grid input { width: 100%; }

/* 0.0.2f: journey timeline */
ul.journey { list-style: none; margin: 6px 0 0; padding: 0; }
ul.journey li { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; border-top: 1px solid rgba(46,54,88,.5); }
ul.journey li span { font: 11px var(--mono); color: var(--mute); flex: none; width: 74px; }
ul.journey button { background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; font-size: 12.5px; }
ul.journey button:hover { color: var(--orbit); }

/* 0.0.3a: sandbox mode */
body.sandbox #panel, body.sandbox #info, body.sandbox .side, body.sandbox #labels, body.sandbox #tour, body.sandbox #tonight,
body.sandbox #version-tag, body.sandbox #eye-ring, body.sandbox #frame-rect, body.sandbox #sel-ring, body.sandbox #tools, body.sandbox #search { display: none !important; }
.sb-root { position: fixed; inset: 0; z-index: 1; background: var(--night); }
.sb-root[hidden] { display: none; }
.sb-root canvas { display: block; }
.sb-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sb-label { position: absolute; left: 0; top: 0; font: 600 11.5px var(--sans, sans-serif); color: #D8D2C6; text-shadow: 0 0 4px var(--black); white-space: nowrap; }
.sb-label.probe { color: var(--orbit, var(--orbit)); }
.sb-panel { position: absolute; left: 12px; bottom: 12px; width: min(330px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow: auto; padding: 10px 12px; border-radius: 0;
  background: var(--panel, rgba(13,17,36,.86)); border: 1px solid var(--line, var(--warm-line)); display: flex; flex-direction: column; gap: 7px; }
.sb-title { display: flex; flex-direction: column; } .sb-title b { font: 800 16px var(--display, sans-serif); }
.sb-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sb-panel button.on { border-color: var(--orbit); color: var(--orbit); }
.sb-date { font: 12px var(--mono); }
.sb-sel { border-top: 1px solid var(--line, var(--warm-line)); padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.sb-labs { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line, var(--warm-line)); padding-top: 6px; }
.sb-labs button { text-align: left; }
.sb-hint { color: var(--orbit, var(--orbit)); min-height: 1em; }
.sb-lab { position: absolute; top: 64px; right: 12px; width: min(360px, calc(100vw - 24px)); max-height: calc(100vh - 80px); overflow: auto; padding: 12px 14px; border-radius: 0;
  background: var(--panel, rgba(13,17,36,.9)); border: 1px solid var(--line, var(--warm-line)); display: block !important; }
.sb-lab[hidden] { display: none !important; }
.sb-lab h2 { margin: 0 24px 4px 0; font: 800 17px var(--display, sans-serif); }
.sb-lab .x { position: absolute; top: 8px; right: 10px; }
.sb-steps { padding-left: 18px; margin: 8px 0; font-size: 13px; line-height: 1.5; }
.sb-field { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 4px 0; font-size: 12.5px; }
.sb-field input, .sb-field select { width: 150px; }
.sb-res { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12px; }
.sb-res td { padding: 3px 0; border-top: 1px solid rgba(46,54,88,.6); vertical-align: top; } .sb-res td:first-child { color: var(--mute, var(--warm-mute)); width: 38%; }
.sb-res td:last-child { font-family: var(--mono); }
.sb-go { border-color: var(--orbit) !important; color: var(--orbit); margin: 4px 4px 4px 0; }
.sb-lab > button { margin: 4px 4px 4px 0; }
.sb-check { margin: 8px 0; padding: 8px; border: 1px dashed var(--line, var(--warm-line)); border-radius: 0; font-size: 12.5px; }
.sb-deep { margin: 8px 0; font-size: 12.5px; line-height: 1.55; } .sb-deep summary { cursor: pointer; color: var(--orbit, var(--orbit)); }
.sb-deep code { font-family: var(--mono); background: rgba(76,141,246,.08); padding: 0 3px; border-radius: 0; }
.sb-note { width: 100%; min-height: 48px; margin-top: 6px; background: transparent; color: inherit; border: 1px solid var(--line, var(--warm-line)); border-radius: 0; padding: 4px; }
.sb-pork, .sb-vec { width: 100%; border-radius: 0; margin: 6px 0; background: #0a0f1c; cursor: crosshair; }
.sb-pinfo { font-size: 12px; font-family: var(--mono); }
.sb-legs { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.sb-leg { display: flex; gap: 4px; align-items: center; font-size: 12px; } .sb-leg select { flex: 1; } .sb-leg input { width: 128px; }
.sb-recs { list-style: none; padding: 0; margin: 8px 0; font-size: 12px; } .sb-recs li { padding: 6px 0; border-top: 1px solid rgba(46,54,88,.6); }
.sb-recs span { color: var(--mute, var(--warm-mute)); margin-left: 6px; } .sb-recs .note { color: var(--orbit, var(--orbit)); }
.sb-toast { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); padding: 8px 14px; border-radius: 0; background: rgba(13,17,36,.92); border: 1px solid var(--orbit, var(--orbit)); font-size: 13px; }
@media (max-width: 640px) { .sb-panel { bottom: 8px; left: 8px; max-height: 42vh; } .sb-lab { top: auto; bottom: 8px; left: 8px; right: 8px; width: auto; max-height: 48vh; } }
body.sandbox #topbar { z-index: 5; }
.sb-sel[hidden] { display: none; }
body.sandbox #status { display: none !important; }
body.sandbox #loader { display: none; }

/* 0.0.3b: concept cards */
.cc-root { position: fixed; inset: 0; z-index: 30; background: rgba(7,10,22,.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-root[hidden] { display: none; }
.cc-win { width: min(1040px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 0; background: #0c1120; border: 1px solid var(--line, var(--warm-line)); padding: 14px 16px; }
.cc-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; } .cc-head b { font: 800 18px var(--display, sans-serif); } .cc-head .cc-x { margin-left: auto; }
.cc-grid { display: block; }
.cc-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 6px; }
.cc-grid[hidden], .cc-detail[hidden] { display: none; }
.cc-card { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; text-align: left; padding: 12px; border-radius: 0; background: #161617; border: 1px solid var(--line, var(--warm-line)); min-height: 140px; }
.cc-card:hover { border-color: var(--orbit, var(--orbit)); }
.cc-card b { font: 700 15px var(--display, sans-serif); } .cc-tag { color: var(--mute, var(--warm-mute)); font-size: 12px; }
.cc-mini { margin-top: auto; font-size: 12px; color: #D8D2C6; max-width: 100%; overflow: hidden; }
.cc-level { font: 700 10.5px var(--mono); padding: 1px 7px; border-radius: 0; border: 1px solid; }
.cc-level.기초 { color: #9fe0e6; } .cc-level.교양 { color: #ffb454; } .cc-level.전공 { color: #ff7aa2; }
.cc-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; margin-top: 8px; }
.cc-left h2 { margin: 6px 0 2px; font: 800 20px var(--display, sans-serif); } .cc-left p { line-height: 1.65; font-size: 14px; }
.cc-eq { margin: 10px 0; padding: 8px; border-radius: 0; background: rgba(76,141,246,.06); overflow-x: auto; }
.cc-deep { font-size: 13px; line-height: 1.65; } .cc-deep summary { cursor: pointer; color: var(--orbit, var(--orbit)); margin: 6px 0; }
.cc-right { display: flex; flex-direction: column; gap: 6px; }
.cc-canvas { width: 100%; border-radius: 0; display: block; }
.cc-slider { display: grid; grid-template-columns: 1fr 120px 60px; gap: 6px; align-items: center; font-size: 12px; color: var(--mute, var(--warm-mute)); }
.cc-slider b { font: 12px var(--mono); color: #E9E3D7; text-align: right; }
.cc-read { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12px; margin-top: 4px; } .cc-read span { color: var(--mute, var(--warm-mute)); } .cc-read b { font: 12px var(--mono); font-weight: 400; }
.cc-lab { margin-top: 10px; border-color: var(--orbit) !important; color: var(--orbit); } .cc-back { margin-bottom: 4px; }
@media (max-width: 760px) { .cc-body { grid-template-columns: minmax(0, 1fr); } .cc-left, .cc-right { min-width: 0; } .cc-head .small { display: none; } .cc-slider { grid-template-columns: 1fr 1fr 52px; } }
.cc-left .cc-level { display: inline-block; margin-top: 8px; }

/* 0.0.3d: textbook */
.cc-ch { margin: 14px 0 8px; font: 800 16px var(--display); } .cc-ch span { font: 12px var(--mono); color: var(--mute); margin-left: 6px; }
.cc-num { font: 600 11px var(--mono); color: var(--orbit); }
.cc-card.seen { border-color: rgba(76,141,246,.35); } .cc-card.seen .cc-num::after { content: ' · 읽음'; color: var(--mute); }
.cc-pre { font-size: 12px; color: var(--mute); }
.cc-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; font-size: 12px; } .cc-links > span { color: var(--mute); margin-right: 2px; }
.cc-chip { font-size: 12px; padding: 3px 9px; border-radius: 0; }
.cc-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.cc-progress { margin: 4px 0 2px; font: 12px var(--mono); color: var(--orbit); }
.cc-intro { color: var(--mute); font-size: 12.5px; margin: -4px 0 8px; }
.cc-quiz { margin: 12px 0; padding: 10px 12px; border-radius: 0; border: 1px dashed var(--line); background: rgba(255,180,84,.04); }
.cc-quiz p { margin: 4px 0 8px; font-size: 13.5px; }
.cc-opts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .cc-opts input { width: 110px; }
.cc-fb { margin-top: 8px; font-size: 13px; min-height: 1em; } .cc-fb.ok { color: var(--orbit); } .cc-fb.no { color: #ff7aa2; }
.cc-show { margin-top: 6px; font-size: 12px; }

/* 0.0.3f: sandbox tabs, learning entry, scenarios, graph */
.sb-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 0; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.sb-tabs button { flex: 1; border: 0; background: transparent; padding: 5px 4px; border-radius: 0; font-size: 12px; white-space: nowrap; }
.sb-tabs button.on { background: var(--orbit); color: var(--night); font-weight: 700; }
.sb-tab { display: flex; flex-direction: column; gap: 6px; } .sb-tab[hidden] { display: none; }
.sb-bigcard { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 0; border: 1px solid var(--orbit) !important; background: rgba(76,141,246,.08); }
.sb-bigcard b { font: 800 15px var(--display); color: var(--orbit); } .sb-bigcard b::after { content: '  →'; } .sb-bigcard span { font-size: 12px; color: var(--mute); }
.sb-sub { margin-top: 2px; }
.sb-labs { border-top: 0; padding-top: 0; }
.sb-labrow { display: flex; gap: 4px; } .sb-labrow > button:first-child { flex: 1; text-align: left; }
.sb-concept { font-size: 12px; color: var(--orbit); border-color: rgba(76,141,246,.45) !important; }
.sb-concept-wide { margin: 6px 0 2px; color: var(--orbit); border-color: rgba(76,141,246,.45) !important; }
.sb-scens { display: flex; flex-direction: column; gap: 4px; }
.sb-scenbtn { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 1px; } .sb-scenbtn span { font-size: 12px; color: var(--mute); }
.sb-graph { width: 100%; height: 60px; border-radius: 0; }
.sb-center { color: var(--orbit); }
/* no system fallback anywhere: form controls do not inherit fonts by default (Windows shows Gulim), and KaTeX \text{} has no Hangul glyphs */
input, textarea, select, button, option, optgroup { font-family: var(--sans); }
input[type=number], input[type=date], input[type=datetime-local] { font-family: var(--mono); }
.katex .text, .katex .mord.text, .katex .textrm { font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif !important; }
.sb-level { margin: 8px 0 2px; font: 700 11.5px var(--mono); color: var(--orbit); }
#status { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* a long message must not wrap into a tall column and push the top bar down */
@media (min-width: 641px) { #topbar { max-height: 44px; } } /* never let the top bar grow into the sky and swallow drags */

.lbl.grid { color: #7fc4d8; font: 10px var(--mono); opacity: .8; }
.lbl.feat { color: #d9dcea; font: 11px var(--sans, sans-serif); opacity: .85; text-shadow: 0 0 3px var(--black); }
.lbl.sep { color: var(--ink); background: rgba(76,141,246,.85); padding: 1px 5px; font: 600 12px var(--mono); }
/* narrow screens: the top bar scrolls sideways instead of hiding its right end */
@media (max-width: 900px) {
  #topbar { flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; pointer-events: auto; max-height: none; padding-bottom: 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  #topbar > * { flex: none; } #topbar #status { display: none; } #search { width: 46vw; }
}
@media (max-width: 900px) { #topbar { scrollbar-width: none; } #topbar::-webkit-scrollbar { display: none; } } /* swipe sideways, no visible bar */
.cc-explain { margin: 6px 0 12px; padding: 10px 12px; border: 1px solid rgba(201,168,106,.25); background: rgba(201,168,106,.06); border-radius: 0; }
.cc-explain > b { display: block; margin-bottom: 6px; font-size: 13px; color: var(--brass); }
.cc-explain .cc-sym { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13px; margin-bottom: 8px; align-items: baseline; }
.cc-explain p { margin: 4px 0 0; font-size: 13px; line-height: 1.6; }
#info-about { margin: 8px 0 10px; font-size: 13px; line-height: 1.6; }
#info-about p { margin: 0 0 6px; }
#info-about b { display: block; font-size: 12px; color: var(--brass); margin-top: 4px; }
#info-about ul { margin: 2px 0 0; padding-left: 18px; }
#info-about li { margin: 2px 0; }
/* card index as a list: number, title, one-line hook, level */
.cc-row { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line, var(--warm-line)); }
.cc-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.3fr) 48px; align-items: baseline; gap: 4px 12px; min-height: 0; padding: 9px 10px; background: none; border: 0; border-bottom: 1px solid var(--line, var(--warm-line)); }
.cc-card:hover { background: rgba(76,141,246,.06); }
.cc-card .cc-num { font: 12px var(--mono); color: var(--mute, var(--warm-mute)); }
.cc-card .cc-level { justify-self: end; }
.cc-card .cc-pre { grid-column: 2 / -1; }
.cc-card.seen { border-color: var(--line, var(--warm-line)); } .cc-card.seen b { color: #9fe9d6; }
@media (max-width: 640px) { .cc-card { grid-template-columns: 38px minmax(0, 1fr) 44px; } .cc-card .cc-tag { grid-column: 2; grid-row: 2; } .cc-card .cc-level { grid-row: 1; grid-column: 3; } }
.cc-card.seen .cc-num::after { content: none; }
#plan h3 { margin: 12px 0 4px; font-size: 15px; }
#plan .pltable { width: 100%; font-size: 12.5px; }
#plan .plan-go { background: none; border: 0; padding: 0; color: var(--orbit, var(--orbit)); font: inherit; cursor: pointer; text-align: left; }
@media print { body.print-plan > *:not(#obs) { display: none !important; } body.print-plan #obs { position: static; display: block; width: auto; max-height: none; background: var(--white); color: var(--black); }
  body.print-plan #obs > *:not(#plan) { display: none; } body.print-plan #plan .plan-go { color: var(--black); } }
/* prerequisite note sits under the one-line hook, so every row keeps the same height */
.cc-card { grid-template-rows: auto auto; min-height: 60px; align-items: center; }
.cc-card .cc-num, .cc-card > b, .cc-card .cc-level { grid-row: 1 / 3; }
.cc-card .cc-tag { grid-column: 3; grid-row: 1; align-self: end; }
.cc-card .cc-pre { grid-column: 3; grid-row: 2; align-self: start; font-size: 12px; line-height: 1.3; }
@media (max-width: 640px) { .cc-card .cc-num, .cc-card > b, .cc-card .cc-level { grid-row: 1; } .cc-card .cc-tag { grid-column: 2; grid-row: 2; } .cc-card .cc-pre { grid-column: 2; grid-row: 3; } }
.sz-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }

.sz-canvas { display: block; width: 100%; background: var(--night); }
.sz-info { margin-top: 8px; }
.sz-tabs button.on { color: var(--night); }
.lbl.small { color: #d8c79a; font-size: 12px; padding-left: 9px; }
.lbl.small::before { content: ''; position: absolute; left: 0; top: 50%; width: 4px; height: 4px; margin-top: -2px; background: #d8c79a; }
.lbl.small.comet { color: #9fd6ff; } .lbl.small.comet::before { background: #9fd6ff; width: 5px; height: 5px; border-radius: 50%; }

/* ---- 0.0.4f restyle: star-atlas look ---- */
h1, h2, h3, .wordmark, .cc-head b, .cc-left h2, .cc-ch { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; }
.wordmark span { color: var(--orbit); } /* Space in ink, Commons in blue, as in the top bar */
.wordmark { word-spacing: 0.22em; }
body, button, input, select { font-variant-numeric: tabular-nums; }
button { background: transparent; border: 1px solid var(--line); color: var(--ink); }
button:hover { border-color: #5a5650; }
button.on, .on > button { background: var(--orbit); border-color: var(--orbit); color: var(--white); }
#topbar { background: rgba(7,10,22,.9); border-bottom: 1px solid var(--line); }
.side, #info, .cc-win { background: var(--panel-solid); border: 1px solid var(--line); box-shadow: none; }
.cc-explain { background: var(--panel-solid); border-color: var(--line); }
.cc-explain > b, #info-about b { color: var(--brass); }
.cc-level { border-color: var(--line) !important; color: var(--mute) !important; background: none !important; }
.cc-card.seen b { color: var(--ink); opacity: .62; }
.cc-num { color: var(--brass); }
.cc-eq { background: var(--panel-solid); border: 1px solid var(--line); } .cc-deep summary { color: var(--brass); }
.cc-eq-h { margin: 14px 0 -4px; font-size: 12px; color: var(--brass); }
/* the wordmark keeps its original geometric face */
.wordmark, #brand span { font-family: Manrope, "Pretendard Variable", sans-serif; font-weight: 800; letter-spacing: -0.03em; }
.wordmark span, #brand em { font-weight: 800; }

#log-list { list-style: none; padding: 0; margin: 8px 0; } #log-list li { border-bottom: 1px solid var(--line); padding: 8px 0; }
#log-list textarea { width: 100%; min-height: 48px; margin: 6px 0; background: var(--panel-solid); color: var(--ink); border: 1px solid var(--line); font: inherit; }
.log-photo { max-width: 100%; display: block; margin: 4px 0; }
.vs-box { margin-top: 8px; padding: 8px; border: 1px solid var(--line); } .vs-box input { width: 80px; }
#ecl.wide { width: min(560px, 94vw); }
#ar-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
body.ar { background: var(--black); } body.ar #c { background: transparent; }

.cc-qnav { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.cc-qdot { min-width: 28px; } .cc-qdot.ok { border-color: #6fbf73; color: #9fd8a2; } .cc-qdot.on { border-color: var(--ink); }
.cc-rec { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; padding: 10px; border: 1px solid var(--line); }
.cc-rec > b { font-size: 13px; color: var(--brass); } .cc-rec .cc-why { margin-left: 8px; font-size: 12px; color: var(--mute); }
.hist { list-style: none; padding: 0; margin: 10px 0; } .hist li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hist-y { color: var(--brass); font-weight: 700; } .hist p { margin: 4px 0 8px; line-height: 1.6; font-size: 13.5px; }
#ls label, #lesson label { display: block; margin: 6px 0; font-size: 12.5px; } #ls input, #ls textarea, #lesson input, #lesson textarea { display: block; width: 100%; margin-top: 3px; background: var(--panel-solid); color: var(--ink); border: 1px solid var(--line); font: inherit; padding: 4px; }
#lesson-qs { padding-left: 18px; } #lesson-qs li { margin: 8px 0; } #lesson-qs textarea { min-height: 44px; }

/* ---- E5 accessibility ---- */
:focus-visible { outline: 2px solid #ffd27a; outline-offset: 2px; }
body.large { font-size: 15.5px; } body.large button, body.large select, body.large input, body.large label { font-size: 15px; } body.large .cc-left p { font-size: 16.5px; } body.large .lbl { font-size: 13.5px; }
body.cvd { --orbit: #0072B2; --brass: #E69F00; } body.cvd button.on, body.cvd .on > button { color: var(--white); }
body.cvd .lbl.small.comet, body.cvd .lbl.sat { color: #56B4E9; }
@media (prefers-reduced-motion: reduce) { #loader, .loader-mark, .loader-bar i { animation: none !important; transition: none !important; } }
body.calm .loader-mark, body.calm .loader-bar i { animation: none; }

/* grouped top-bar menus */
.menu-pop { position: fixed; z-index: 30; display: flex; flex-direction: column; min-width: 180px; padding: 4px; background: var(--panel-solid); border: 1px solid var(--line); }
.menu-pop[hidden] { display: none; } .menu-pop button { text-align: left; border: 0; padding: 8px 10px; } .menu-pop button:hover { background: rgba(76,141,246,.12); }
body.space .menu-pop .ground-only, body:not(.space) .menu-pop .space-only { display: none; }
.more-toggles summary { cursor: pointer; color: var(--mute); font-size: 12.5px; margin: 4px 0; } .more-toggles .row { flex-wrap: wrap; }

.guide { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.guide-box { pointer-events: auto; position: fixed; left: 50%; top: 40%; transform: none; width: min(300px, 92vw); padding: 12px 14px; background: var(--panel-solid); border: 1px solid var(--orbit); }
.guide-box p { margin: 6px 0 10px; line-height: 1.55; font-size: 13.5px; } .guide-box .row { justify-content: flex-end; gap: 8px; align-items: center; } .guide-box .small { margin-right: auto; }
.guide-hl { outline: 2px solid var(--orbit); outline-offset: 3px; }
.sb-atm { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); } .sb-atm .sb-field { display: grid; grid-template-columns: 1fr 1.2fr 64px; gap: 6px; align-items: center; }

.sb-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 6px 0 10px; }
.sb-quick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 10px; }
.sb-quick button span { font-size: 12px; opacity: .7; }
.sb-num input[type=number] { width: 90px; }

.sb-drawer .sb-tab > label { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 13.5px; }
.sb-quick { list-style: none; counter-reset: q; margin: 0; padding: 0; display: block; }
.sb-quick li { counter-increment: q; display: grid; grid-template-columns: 22px 1fr; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.sb-quick li::before { content: counter(q); font: 700 12px var(--mono); color: var(--orbit); padding-top: 3px; grid-row: span 2; }
.sb-quick button { all: unset; cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--text, var(--paper)); }
.sb-quick button:hover { color: var(--orbit); }
.sb-quick span { font-size: 12px; color: var(--mute); opacity: 1; }
.sb-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.sb-line > label { min-width: 72px; font-size: 12.5px; color: var(--mute); display: flex; gap: 6px; align-items: center; }
.sb-line select { flex: 1; min-width: 0; }
.sb-drawer .sb-bigcard { display: block; width: 100%; padding: 10px 12px; margin-bottom: 8px; font-weight: 700; text-align: left; border: 1px solid var(--orbit) !important; background: transparent; color: var(--orbit); }
.sb-drawer .sb-bigcard::after { content: '  →'; }
.sb-drawer .sb-scenbtn { padding: 9px 0; border: 0 !important; border-bottom: 1px solid rgba(255, 255, 255, .06) !important; background: transparent; }
.sb-drawer .sb-scenbtn b { font-size: 14px; }
.sb-sel header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.sb-sel header b { font: 800 18px var(--display, sans-serif); letter-spacing: -.02em; }
.sb-selx { height: 24px; padding: 0 8px; font-size: 12px; }
.sb-nums { width: 100%; border-collapse: collapse; margin: 8px 0 4px; }
.sb-nums th { text-align: left; font-weight: 500; font-size: 12px; color: var(--mute); width: 74px; padding: 4px 0; vertical-align: middle; }
.sb-nums td { padding: 4px 0; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.sb-nums input[type=number] { width: 92px; height: 28px; font: 13px var(--mono); }
.sb-nums select { height: 28px; } .sb-nums .u { font-size: 12px; color: var(--mute); }
.sb-nums button { height: 26px; padding: 0 8px; font-size: 12px; }
.sb-acts { display: flex; gap: 4px; margin-top: 8px; } .sb-acts button { flex: 1; }
.sb-sel .sb-sel-data { line-height: 1.55; color: #B9BCC8; }
.sb-sel .sb-atm .sb-field { grid-template-columns: 104px 1fr 58px; font-size: 12px; } .sb-sel .sb-atm .sb-field input { width: 100%; }
.sb-sel .sb-atm > b { display: block; margin-bottom: 6px; font-size: 13px; } .sb-sel .sb-atm .sb-row button { height: 26px; padding: 0 8px; font-size: 12px; }
.sb-sec { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px -14px 6px; padding: 5px 14px; background: rgba(255, 255, 255, .045); border-top: 1px solid rgba(255, 255, 255, .07); }
.sb-sec > span { font: 700 11px var(--mono); letter-spacing: .08em; color: #AEB4C6; }
.sb-sec select { height: 24px; font-size: 12px; max-width: 150px; }
.sb-sel .sb-atm { margin: 0; padding: 0; border: 0; }
.sb-prop { display: grid; grid-template-columns: 92px 76px 28px; grid-template-areas: "l n u" "s s s"; align-items: center; column-gap: 6px; padding: 5px 0 3px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.sb-prop > label { grid-area: l; font-size: 12.5px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.sb-prop > input[type=number] { grid-area: n; height: 26px; width: 100%; font: 12.5px var(--mono); text-align: right; padding: 0 6px; }
.sb-prop > .u { grid-area: u; font-size: 12px; color: var(--mute); }
.sb-prop > input[type=range] { grid-area: s; width: 100%; height: 14px; margin: 2px 0 0; accent-color: var(--orbit); }
.sb-prop .sw { display: inline-block; width: 9px; height: 9px; }
.sb-mixbar { display: flex; height: 20px; margin: 4px 0 8px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.sb-mixbar i { display: block; height: 100%; font: 600 10.5px/20px var(--sans, sans-serif); color: #0b0d14; text-align: center; white-space: nowrap; overflow: hidden; font-style: normal; }
.sb-mixbar em { font-size: 12px; color: var(--mute); padding: 0 6px; line-height: 20px; }
.sb-norm { width: 100%; margin: 8px 0 4px; height: 28px; font-size: 12px; }
.sb-atmnote { color: var(--mute); line-height: 1.5; }

#sc-caption { position: fixed; left: 50%; bottom: 22%; transform: translateX(-50%); max-width: min(900px, 90vw); padding: 12px 22px; background: rgba(8, 10, 18, .82); border: 1px solid rgba(255, 255, 255, .12); color: #F2F3F8; font-size: clamp(17px, 2.1vw, 24px); line-height: 1.5; text-align: center; z-index: 20; pointer-events: none; }
#sc-caption[hidden] { display: none; } #sc-caption[data-pos=top] { bottom: auto; top: 90px; }

/* ---- sandbox stage 5: palette, dock, inspector tabs, speed slider ---- */
.sb-palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 8px; }
.sb-pal { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .08); }
.sb-pal canvas { width: 44px; height: 44px; } .sb-pal b { font-size: 12.5px; } .sb-pal span { font-size: 12px; color: var(--mute); }
.sb-pal.on { border-color: var(--orbit); background: rgba(76, 141, 246, .12); }
.sb-itabs { display: flex; margin: 6px -14px 8px; border-bottom: 1px solid var(--line); }
.sb-itabs button { flex: 1; height: 32px; border: 0; background: transparent; color: var(--mute); font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; }
.sb-itabs button.on { color: var(--text, var(--paper)); border-bottom-color: var(--orbit); }
.sb-ipane[hidden] { display: none; } .sb-noatm { color: var(--mute); padding: 8px 0; } .sb-noatm[hidden] { display: none; }
.sb-line[hidden] { display: none; }

.lbl.cluster { color: #F3E2A6; font-weight: 700; letter-spacing: .02em; }

.sb-drawer .sb-gprop { grid-template-columns: 72px 70px 20px; }

/* mission timeline (space mode) */
#mtl { position: fixed; left: 50%; transform: translateX(-50%); bottom: 10px; width: min(720px, calc(100vw - 680px)); min-width: 320px; z-index: 6; padding: 6px 10px 2px; background: rgba(10, 12, 18, .82); border: 1px solid var(--line); }
#mtl[hidden] { display: none; }
.mtl-track { position: relative; height: 18px; cursor: ew-resize; } .mtl-track::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: rgba(255, 255, 255, .14); }
.mtl-past { position: absolute; left: 0; top: 8px; height: 2px; background: var(--orbit); }
.mtl-now { position: absolute; top: 1px; width: 2px; height: 16px; margin-left: -1px; background: var(--white); }
.mtl-ev { position: absolute; top: 5px; width: 8px; height: 8px; margin-left: -4px; padding: 0; border: 0; border-radius: 50%; background: #8fb8c9; cursor: pointer; }
.mtl-ev.future { background: #ffb454; } .mtl-ev:hover { transform: scale(1.6); }
.mtl-years { position: relative; height: 13px; font: 10px var(--mono); color: var(--mute); } .mtl-years span { position: absolute; transform: translateX(-50%); }
.mtl-tip { position: absolute; bottom: 100%; transform: translateX(-50%); margin-bottom: 4px; padding: 3px 8px; white-space: nowrap; font-size: 12px; background: #0b0d14; border: 1px solid var(--line); }
@media (max-width: 1100px) { #mtl { left: 8px; right: 8px; width: auto; transform: none; bottom: auto; top: 64px; } }
/* embed mode: only the view */
body.embed #topbar, body.embed #panel, body.embed #info, body.embed #mtl, body.embed #credits, body.embed .credits, body.embed #version-tag, body.embed #status { display: none !important; }
#embed-link { position: fixed; right: 10px; bottom: 10px; z-index: 30; padding: 6px 10px; font-size: 12px; color: var(--white); background: rgba(10, 12, 18, .8); border: 1px solid var(--line); text-decoration: none; }

/* terraforming programme panel */

/* ---- sliders: thin track that fills with the accent up to the value, square thumb (no browser-default blue) ---- */
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; height: 18px; cursor: pointer; accent-color: unset; --p: 50%; }
input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(90deg, var(--orbit, var(--orbit)) 0 var(--p), rgba(255, 255, 255, .16) var(--p) 100%); }
input[type=range]::-moz-range-track { height: 3px; background: rgba(255, 255, 255, .16); }
input[type=range]::-moz-range-progress { height: 3px; background: var(--orbit, var(--orbit)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; background: var(--paper); border: 2px solid var(--orbit, var(--orbit)); border-radius: 0; box-shadow: 0 0 0 3px rgba(10, 13, 28, .9); transition: transform .12s; }
input[type=range]::-moz-range-thumb { width: 10px; height: 10px; background: var(--paper); border: 2px solid var(--orbit, var(--orbit)); border-radius: 0; box-shadow: 0 0 0 3px rgba(10, 13, 28, .9); }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:active::-webkit-slider-thumb { transform: scale(1.25); }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(10, 13, 28, .9), 0 0 0 5px var(--orbit, var(--orbit)); }

.sb-burnrow input[type=number] { width: 62px !important; } .sb-burnrow button { margin-right: 4px; } .sb-agerow[hidden], .sb-burnrow[hidden] { display: none; }
.sb-rulerlb { position: absolute; left: 0; top: 0; padding: 3px 8px; font: 12px var(--mono); color: var(--gold); background: rgba(8, 10, 16, .85); border: 1px solid rgba(255, 211, 106, .4); pointer-events: none; white-space: nowrap; z-index: 2; }
.sb-rulerlb[hidden] { display: none; }

/* ---- sandbox as an instrument: reticle, readout tag, scale bar, drafting-style panels, tabular numbers ---- */
.sb-root { --ink: #E9ECF4; --tick: rgba(233, 236, 244, .55); font-variant-numeric: tabular-nums; }
.sb-reticle { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; }
.sb-reticle[hidden] { display: none; }
.sb-reticle i { position: absolute; width: 10px; height: 10px; border: 1.5px solid var(--gold); }
.sb-reticle i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; } .sb-reticle i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.sb-reticle i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; } .sb-reticle i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.sb-tag { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; padding: 4px 9px 5px; background: rgba(6, 8, 13, .82); border: 1px solid rgba(255, 211, 106, .45); white-space: nowrap; }
.sb-tag[hidden], .sb-leader[hidden] { display: none; }
.sb-tag b { display: block; font: 700 13px var(--display, sans-serif); color: var(--white); letter-spacing: .01em; } .sb-tag span { font: 11.5px var(--mono); color: var(--gold); }
.sb-leader { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; } .sb-leader line { stroke: rgba(255, 211, 106, .7); stroke-width: 1; }
.sb-scale { position: absolute; left: 16px; bottom: 64px; z-index: 2; pointer-events: none; font: 11px var(--mono); color: var(--tick); }
.sb-scalebar { height: 6px; border: 1px solid var(--tick); border-top: 0; margin-bottom: 3px; }
.sb-gridlbl span { position: absolute; left: 0; top: 0; font: 10.5px var(--mono); color: rgba(150, 165, 200, .55); pointer-events: none; }
.sb-gridlbl span[hidden] { display: none; }
/* drafting corner ticks on the panels instead of plain boxes */
.sb-sel .sb-sel-data, .sb-clock .sb-date, .sb-speedl, .sb-nums input, .sb-prop input[type=number] { font-family: var(--mono); }
.sb-sec > span { letter-spacing: .14em; }
.sb-sel header b::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--gold); vertical-align: 2px; }
.sb-sel .sb-graph { height: auto; aspect-ratio: 560 / 120; }

.krcard b { display: block; font-size: 15px; margin-bottom: 4px; } .krcard p { margin: 0 0 8px; line-height: 1.6; }
.krcard dl { display: grid; grid-template-columns: 64px 1fr; gap: 3px 8px; margin: 0 0 8px; font-size: 12.5px; } .krcard dt { color: var(--mute); } .krcard dd { margin: 0; }
.kracts { display: flex; flex-wrap: wrap; gap: 4px; } .kracts button { font-size: 12px; }
.krtl { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12.5px; } .krtl li { padding: 3px 0; border-top: 1px solid var(--line); } .krtl span { display: inline-block; width: 86px; color: var(--mute); font-family: var(--mono); }
.tn-head { padding: 10px 0 4px; font-size: 12px; color: var(--mute); border-top: 1px solid var(--line); margin-top: 6px; }
#fps-meter { position: fixed; right: 8px; bottom: 8px; z-index: 9999; padding: 4px 8px; font: 500 11px/1.4 var(--mono); color: #cfe0ff; background: rgba(8, 12, 24, .82); border: 1px solid rgba(120, 150, 210, .35); pointer-events: none; }
/* phones: the search box keeps a usable width; the bar scrolls sideways for the space tools */
@media (max-width: 480px) {
  #topbar { gap: 6px; }
  #topbar #search { flex: 1 0 110px; min-width: 0; width: auto; padding: 7px 8px; }
  #modes { flex: none; } #modes button { padding: 5px 8px; font-size: 13px; }
}

/* concept-card links and check questions beside sandbox experiments */
.sb-learn { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
.sb-learn .small { color: var(--mute); margin-right: 2px; }
.sb-learn button { height: 26px; padding: 0 8px; font-size: 12px; }
.sb-quiz { flex: 1 0 100%; margin-top: 6px; padding: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.sb-quiz p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.55; }
.sb-quiz .sb-qopt { display: block; width: 100%; height: auto; min-height: 28px; margin-bottom: 4px; padding: 5px 8px; text-align: left; white-space: normal; }
.sb-quiz .sb-qopt.ok { border-color: #5fb37c; color: #bfe8cc; } .sb-quiz .sb-qopt.no { border-color: #d0705a; color: #f2c0b4; }
/* tour maker */
#tourmk, #kvn { position: fixed; top: 60px; right: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--text, var(--paper)); width: min(380px, calc(100vw - 24px)); max-height: calc(100vh - 220px); overflow: auto; z-index: 30; padding: 12px; }
#tourmk header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
#tourmk .tm-list { margin: 8px 0; padding-left: 20px; } #tourmk .tm-list li { margin-bottom: 10px; }
#tourmk .tm-head { display: flex; gap: 4px; align-items: center; font-size: 12px; color: var(--mute); } #tourmk .tm-head span { flex: 1; }
#tourmk .tm-head button { height: 22px; min-width: 22px; padding: 0 5px; }
#tourmk textarea { width: 100%; box-sizing: border-box; margin: 4px 0; resize: vertical; font: inherit; font-size: 13px; background: rgba(255, 255, 255, .04); color: inherit; border: 1px solid var(--line); padding: 5px 7px; }
#tourmk label { font-size: 12px; color: var(--mute); } #tourmk label input { width: 56px; }
#tourmk .row { display: flex; flex-wrap: wrap; gap: 4px; }

/* ==== sandbox 0.1.0a: one instrument frame ====
   status strip on top, tool rail on the left, inspector on the right, time strip at the bottom.
   Everything is flush with hairlines; panels are bays of the frame, not floating cards. */
.sb-root { --num: "IBM Plex Mono", "Pretendard Variable", "Malgun Gothic", monospace; --bay: rgba(13, 17, 36, .94); --hair: rgba(255, 255, 255, .07);
  --top: 56px; --strip: 28px; --rail: 68px; --foot: 40px; --insp: 320px; --lib: 340px; }
.sb-root .sb-panel { display: none; }
.sb-root button, .sb-root select, .sb-root input { border-radius: 0; }
.sb-bar, .sb-rail, .sb-time, .sb-sel, .sb-drawer, .sb-lab { position: absolute; z-index: 3; background: var(--bay); }
/* status strip */
.sb-bar { left: 0; right: 0; top: var(--top); height: var(--strip); display: flex; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line); }
.sb-clock { display: flex; align-items: baseline; gap: 22px; white-space: nowrap; min-width: 0; overflow: hidden; }
.sb-clock .sb-date { font: 500 12.5px var(--num); color: var(--ink); letter-spacing: .01em; }
.sb-clock .sb-energy { font: 11px var(--num); color: var(--mute); }
/* rail: tools, then the library sections */
.sb-rail { left: 0; top: calc(var(--top) + var(--strip)); bottom: 0; width: var(--rail); display: flex; flex-direction: column; border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: none; }
.sb-rail::-webkit-scrollbar { display: none; }
.sb-dock, .sb-rail .sb-tabs { display: flex; flex-direction: column; }
.sb-rail .sb-tabs { gap: 0; padding: 0; background: none; border: 0; }
.sb-rail button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 50px; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--hair);
  background: transparent; color: #C9CCD6; font: 600 12px/1.2 var(--sans); text-align: center; word-break: keep-all; }
.sb-rail button b { font-weight: 600; } .sb-rail button span { font: 10px var(--num); color: var(--mute); letter-spacing: .04em; }
.sb-rail button:hover { color: var(--white); background: rgba(255, 255, 255, .04); }
.sb-rail button.on { background: var(--orbit); color: var(--white); } .sb-rail button.on span { color: #DCE7FF; }
.sb-railsep { display: block; flex: none; height: 18px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(90deg, var(--hair) 0 1px, transparent 1px 8px); }
.sb-rail .sb-tabs button { min-height: 46px; font-size: 12px; color: var(--mute); }
.sb-rail .sb-tabs button.on { color: var(--white); }
/* time strip */
.sb-time { left: var(--rail); right: 0; bottom: 0; height: var(--foot); display: flex; align-items: center; padding: 0 12px; border-top: 1px solid var(--line); }
.sb-transport { display: flex; align-items: center; gap: 0; width: 100%; }
.sb-transport button { height: 26px; padding: 0 10px; font-size: 12.5px; background: transparent; border: 1px solid var(--line); margin-right: -1px; white-space: nowrap; }
.sb-transport .sb-play { min-width: 56px; color: var(--white); border-color: var(--orbit); position: relative; }
.sb-transport .sb-speedr { min-width: 60px; }
.sb-speedl { font: 12px var(--num); color: #C8CDDA; white-space: nowrap; min-width: 96px; }
/* inspector bay */
.sb-sel { right: 0; top: calc(var(--top) + var(--strip)); bottom: var(--foot); width: var(--insp); overflow-y: auto; padding: 12px 14px 18px; border-left: 1px solid var(--line); display: block; }
.sb-sel[hidden] { display: none; }
.sb-sel header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.sb-sel header b { font: 800 18px var(--display); letter-spacing: -.02em; }
.sb-selx, .sb-libx { height: 24px; padding: 0 8px; font-size: 12px; background: transparent; }
.sb-sel .sb-sel-data { font-family: var(--num); font-size: 12px; }
.sb-nums input[type=number], .sb-prop input[type=number], .sb-speedl, .sb-res td:last-child, .sb-pinfo { font-family: var(--num) !important; }
.sb-sec { margin: 12px -14px 6px; padding: 4px 14px; background: transparent; border-top: 1px solid var(--line); border-bottom: 1px solid var(--hair); }
.sb-sec > span, .sb-drawer h3, .sb-level { font: 600 10.5px var(--num) !important; letter-spacing: .14em; text-transform: uppercase; color: #9AA0B0; }
.sb-itabs { margin: 8px -14px 8px; border-top: 1px solid var(--line); }
/* terraforming programme: a section of the inspector, not its own box */
.sb-terra { position: static; margin: 8px -14px 4px; padding: 10px 14px 12px; border-top: 1px solid var(--line); background: rgba(95, 191, 106, .05); font-size: 13px; }
.sb-terra[hidden] { display: none; }
.sb-terra header { display: flex; align-items: baseline; gap: 8px; margin: 0; } .sb-terra header b { font: 700 14px var(--display); }
.sb-terra header span { color: var(--mute); font: 11.5px var(--num); } .sb-terra header button { margin-left: auto; height: 22px; padding: 0 8px; font-size: 12px; background: transparent; }
.sb-terra ol { list-style: none; counter-reset: t; margin: 8px 0; padding: 0; }
.sb-terra li { counter-increment: t; display: grid; grid-template-columns: 22px 1fr; padding: 3px 0; color: var(--mute); border-bottom: 1px solid var(--hair); }
.sb-terra li::before { content: counter(t, decimal-leading-zero); font: 10.5px/1.9 var(--num); color: #6C7180; }
.sb-terra li.done { color: #8FD39A; } .sb-terra li.done::before { color: #8FD39A; }
.sb-terra li.next { color: var(--white); font-weight: 600; } .sb-terra li.next::before { color: var(--white); }
.sb-terra p { line-height: 1.6; color: #C8CDDA; margin: 8px 0 10px; }
.sb-tgo { width: 100%; height: 32px; background: #2f7a3a; border: 1px solid #3c9149; color: var(--white); font-weight: 700; }
/* library bay */
.sb-drawer { left: var(--rail); top: calc(var(--top) + var(--strip)); bottom: var(--foot); width: var(--lib); overflow-y: auto; padding: 0 16px 24px; border-right: 1px solid var(--line); display: none; z-index: 4; }
.sb-root.drawer .sb-drawer { display: block; }
.sb-root:has(.sb-lab:not([hidden])) .sb-drawer { display: none; }
.sb-libhead { position: sticky; top: 0; z-index: 1; display: flex; gap: 0; margin: 0 -16px 6px; padding: 10px 16px; background: #0D0E11; border-bottom: 1px solid var(--line); }
.sb-find { flex: 1; min-width: 0; height: 28px; padding: 0 8px; background: transparent; color: inherit; border: 1px solid var(--line); font: 13px var(--sans); }
.sb-find:focus { outline: none; border-color: var(--orbit); }
.sb-libx { height: 28px; margin-left: -1px; }
.sb-drawer h3 { margin: 18px 0 4px; } .sb-drawer .sb-tab > h3:first-child { margin-top: 8px; }
.sb-drawer .sb-tab { gap: 0; }
.sb-drawer .sb-tab > label { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; }
.sb-root.finding .sb-drawer h3, .sb-miss { display: none !important; }
.sb-quick { list-style: none; counter-reset: q; margin: 0; padding: 0; display: block; }
.sb-quick li { counter-increment: q; display: grid; grid-template-columns: 26px 1fr; padding: 7px 0; border-bottom: 1px solid var(--hair); }
.sb-quick li::before { content: counter(q, decimal-leading-zero); font: 11px var(--num); color: var(--orbit); padding-top: 3px; grid-row: span 2; }
.sb-quick button { all: unset; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--paper); }
.sb-quick button:hover { color: var(--orbit); } .sb-quick span { font-size: 12px; color: var(--mute); opacity: 1; }
.sb-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.sb-line > label { min-width: 72px; font-size: 12.5px; color: var(--mute); display: flex; gap: 6px; align-items: center; }
.sb-line select { flex: 1; min-width: 0; }
.sb-palette { gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sb-pal { background: transparent; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sb-pal.on { background: rgba(76, 141, 246, .14); box-shadow: inset 0 0 0 1px var(--orbit); }
.sb-drawer .sb-bigcard { display: block; width: 100%; margin: 10px 0 8px; padding: 10px 12px; font-weight: 700; text-align: left; border: 1px solid var(--orbit) !important; background: transparent; color: var(--orbit); }
.sb-drawer .sb-scenbtn { width: 100%; padding: 9px 0; border: 0 !important; border-bottom: 1px solid var(--hair) !important; background: transparent; }
.sb-drawer .sb-scenbtn b { font-size: 14px; }
.sb-drawer .sb-gprop { grid-template-columns: 72px 70px 20px; }
/* lab sheets take the library bay */
.sb-lab { left: var(--rail); top: calc(var(--top) + var(--strip)); bottom: var(--foot); right: auto; width: var(--lib); max-height: none; overflow-y: auto; padding: 12px 16px; border: 0; border-right: 1px solid var(--line); z-index: 4; }
/* overlays sit inside the frame */
.sb-scale { top: calc(var(--top) + var(--strip) + 14px); bottom: auto; left: calc(var(--rail) + 16px); }
.sb-root.drawer .sb-scale, .sb-root:has(.sb-lab:not([hidden])) .sb-scale { left: calc(var(--rail) + var(--lib) + 16px); }
.sb-hint { position: absolute; left: 50%; bottom: calc(var(--foot) + 14px); transform: translateX(-50%); color: var(--orbit); font-size: 13px; pointer-events: none; text-shadow: 0 0 6px var(--black); z-index: 2; }
.sb-toast { top: calc(var(--top) + var(--strip) + 12px); z-index: 6; }

/* phones: the rail becomes a tab bar, the inspector and library become bottom sheets */
@media (max-width: 760px) {
  .sb-root { --rail: 0px; --strip: 26px; --foot: 40px; --tabs: 52px; }
  .sb-bar { padding: 0 10px; }
  .sb-clock { gap: 12px; } .sb-clock .sb-date { font-size: 12px; } .sb-clock .sb-energy { font-size: 12px; }
  .sb-rail { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: var(--tabs); flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-top: 1px solid var(--line); }
  .sb-dock, .sb-rail .sb-tabs { flex-direction: row; flex: none; }
  .sb-rail .sb-tabs { order: -1; } .sb-railsep { order: -1; width: 1px; height: auto; border: 0; background: var(--line); }
  .sb-rail button { width: auto; min-width: 58px; min-height: 0; height: var(--tabs); padding: 4px 9px; border-bottom: 0; border-right: 1px solid var(--hair); white-space: nowrap; }
  .sb-rail .sb-tabs button { min-height: 0; color: #C9CCD6; }
  .sb-dock button[data-tool=play], .sb-dock button[data-tool=reset] { display: none; } /* the time strip has them */
  .sb-time { left: 0; bottom: var(--tabs); padding: 0 8px; }
  .sb-transport button { padding: 0 8px; } .sb-speedl { min-width: 0; font-size: 12px; }
  .sb-sel, .sb-drawer, .sb-lab { top: auto; left: 0; right: 0; width: auto; bottom: calc(var(--tabs) + var(--foot)); max-height: 46vh; border: 0; border-top: 1px solid var(--line); }
  .sb-sel { padding-top: 10px; }
  .sb-root.drawer .sb-sel, .sb-root:has(.sb-lab:not([hidden])) .sb-sel { display: none; }
  .sb-scale, .sb-root.drawer .sb-scale, .sb-root:has(.sb-lab:not([hidden])) .sb-scale { left: 10px; top: calc(var(--top) + var(--strip) + 10px); }
  .sb-hint { bottom: calc(var(--tabs) + var(--foot) + 10px); }
}

/* ---- sandbox instrument sliders: hairline track, graduated scale with labelled stops, editable readout ---- */
.sb-gauge { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; min-width: 0; padding-bottom: 13px; }
.sb-gauge.read { grid-template-columns: minmax(0, 1fr) 62px; column-gap: 10px; }
.sb-gauge > input[type=range] { grid-column: 1; grid-row: 1; width: 100%; height: 16px; margin: 0; }
.sb-root .sb-gauge > input[type=range]::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(90deg, var(--orbit) 0 var(--p), rgba(255, 255, 255, .22) var(--p) 100%); }
.sb-root .sb-gauge > input[type=range]::-moz-range-track { height: 1px; }
.sb-root .sb-gauge > input[type=range]::-moz-range-progress { height: 1px; }
.sb-root .sb-gauge > input[type=range]::-webkit-slider-thumb { width: 7px; height: 14px; margin-top: -6.5px; background: var(--paper); border: 1px solid var(--orbit); box-shadow: 0 0 0 2px rgba(10, 12, 16, .95); }
.sb-root .sb-gauge > input[type=range]::-moz-range-thumb { width: 5px; height: 12px; background: var(--paper); border: 1px solid var(--orbit); }
.sb-root .sb-gauge > input[type=range]:hover::-webkit-slider-thumb, .sb-root .sb-gauge > input[type=range]:active::-webkit-slider-thumb { transform: none; background: var(--orbit); }
/* the graduated scale: minor ticks every tenth, labelled stops below */
.sb-scale-t { grid-column: 1; grid-row: 1; position: relative; display: block; margin: 12px 3.5px 0; height: 4px; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .22) 0 1px, transparent 1px 10%); border-right: 1px solid rgba(255, 255, 255, .22); }
.sb-scale-t i { position: absolute; top: 0; font: 9.5px/1 var(--num); font-style: normal; color: #7E8494; white-space: nowrap; transform: translateX(-50%); padding-top: 7px; }
.sb-scale-t i::before { content: ''; position: absolute; left: 50%; top: 0; width: 1px; height: 6px; background: rgba(233, 236, 244, .6); }
.sb-scale-t i.lo { transform: none; } .sb-scale-t i.lo::before { left: 0; }
.sb-scale-t i.hi { transform: translateX(-100%); } .sb-scale-t i.hi::before { left: auto; right: 0; }
.sb-gnum, .sb-speedn { height: 22px; width: 100%; padding: 0 5px; text-align: right; font: 11.5px var(--num); color: var(--ink); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 0; -moz-appearance: textfield; }
.sb-gnum:focus, .sb-speedn:focus, .sb-root input[type=number]:focus { outline: none; border-color: var(--orbit); }
.sb-gnum { grid-column: 2; grid-row: 1; }
.sb-root input[type=number]::-webkit-inner-spin-button, .sb-root input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sb-prop > .sb-gauge { grid-area: s; margin-top: 2px; }
.sb-field .sb-gauge { width: 200px; flex: none; } .sb-field .sb-gauge > input { width: 100%; }
.sb-nums td > .sb-gauge { flex: 1; }
/* time strip with the gauge */
.sb-transport > .sb-gauge { flex: 1; max-width: 560px; margin: 12px 14px 0 18px; }
.sb-speedread { display: inline-flex; align-items: center; gap: 5px; margin-right: 12px; } .sb-speedread .u { font-size: 12px; color: var(--mute); white-space: nowrap; }
.sb-speedn { width: 70px; }
.sb-speedl { color: var(--mute); }
@media (max-width: 760px) { .sb-transport > .sb-gauge { margin: 12px 10px 0; } .sb-speedl { display: none; } .sb-speedn { width: 56px; } .sb-speedread { margin-right: 0; } .sb-scale-t i { font-size: 8.5px; } }
.sb-root, .sb-root * { scrollbar-width: thin; scrollbar-color: #34363D transparent; }
.sb-root ::-webkit-scrollbar { width: 6px; height: 6px; } .sb-root ::-webkit-scrollbar-thumb { background: #34363D; } .sb-root ::-webkit-scrollbar-track { background: transparent; }
.sb-root.finding .sb-palette, .sb-root.finding .sb-bigcard, .sb-root.finding .sb-sub, .sb-root.finding .sb-recbtn { display: none; }
@media (max-width: 760px) { .sb-transport .sb-scale-t i { font-size: 0; padding: 0; } .sb-transport > .sb-gauge { padding-bottom: 4px; } }

#kvn header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } #kvn p { font-size: 13px; line-height: 1.65; margin: 0 0 8px; }

/* classroom sync (classsync.js) */
#sync-panel { position: fixed; top: 60px; right: 12px; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 140px); overflow: auto; z-index: 31; padding: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 0; color: var(--ink); }
#sync-panel[hidden], #sync-banner[hidden] { display: none; }
#sync-panel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
#sync-panel header b, #sync-panel h4 { font: 700 15px/1.3 var(--display); letter-spacing: -0.01em; }
#sync-panel h4 { margin: 14px 0 6px; font-size: 13px; color: var(--mute); }
#sync-panel button { border-radius: 0; }
#sync-panel .sync-open { width: 100%; height: 34px; background: var(--orbit); border-color: var(--orbit); color: var(--white); font-weight: 700; }
.sync-code { font: 800 34px/1.1 var(--display); letter-spacing: .16em; color: var(--orbit); text-align: center; margin: 6px 0; user-select: text; -webkit-user-select: text; }
.sync-qr { display: flex; justify-content: center; margin: 6px 0 8px; } .sync-qr svg { max-width: 100%; height: auto; border-radius: 0; }
.sync-count { display: flex; justify-content: center; gap: 8px; align-items: baseline; margin: 4px 0 8px; color: var(--mute); }
.sync-count b { font: 800 22px/1 var(--display); color: var(--ink); }
.sync-names { text-align: center; color: var(--mute); word-break: break-all; }
#sync-panel .row { display: flex; flex-wrap: wrap; gap: 6px; }
#sync-panel .row button.on { border-color: var(--orbit); color: var(--orbit); }
.sync-join { display: flex; flex-wrap: wrap; gap: 6px; }
.sync-join input { flex: 1 1 120px; min-width: 0; height: 30px; border-radius: 0; border: 1px solid var(--line); background: var(--panel-solid); color: var(--ink); padding: 0 8px; user-select: text; -webkit-user-select: text; }
.sync-join input:first-child { text-transform: uppercase; letter-spacing: .12em; font-family: var(--display); font-weight: 700; }
.sync-err { color: #F2A65A; border-left: 3px solid #F2A65A; padding-left: 8px; margin-top: 10px; }
#sync-banner { position: fixed; top: 56px; left: 50%; transform: translateX(-50%); z-index: 32; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  max-width: calc(100vw - 32px); padding: 6px 12px; background: var(--panel-solid); border: 1px solid var(--orbit); border-radius: 0; color: var(--ink); font-weight: 600; }
#sync-banner button { border-radius: 0; height: 26px; } #sync-banner .sync-leave { color: var(--mute); }
/* observing score strip and telescope wizard (observing.js, telescope.js) */
.os-strip { display: flex; gap: 2px; align-items: flex-end; height: 104px; margin: 8px 0; border-bottom: 1px solid var(--line); }
.os-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; min-width: 0; }
.os-bar { display: block; width: 100%; background: var(--orbit); border-radius: 0; }
.os-n { font: 10px var(--mono); color: var(--ink); }
.os-h { font: 10px var(--mono); color: var(--mute); }
#os-events li { padding: 3px 0; border-bottom: 1px solid var(--line); }
#obs-score-btn, #tel-btn.on { border-color: var(--orbit); }
#tel h3 { font: 700 14px var(--display); margin: 10px 0 6px; }
.tel-steps { display: flex; gap: 4px; list-style: none; padding: 0; margin: 6px 0; font-size: 12px; color: var(--mute); }
.tel-steps li { flex: 1; padding: 3px 4px; border-top: 2px solid var(--line); }
.tel-steps li.done { border-color: var(--mute); color: var(--ink); }
.tel-steps li.on { border-color: var(--orbit); color: var(--ink); font-weight: 700; }
.tel-choices { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.tel-choices.tel-row { flex-direction: row; flex-wrap: wrap; gap: 12px; }
.tel-choices button { text-align: left; padding: 8px 10px; }
.tel-choices button span { display: block; color: var(--mute); font-size: 12px; }
.tel-shapes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tel-shapes button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; color: var(--ink); }
.tel-shapes button span { font-size: 12px; color: var(--mute); }
.tel-link { border: none; background: none; color: var(--orbit); padding: 4px 0; text-decoration: underline; }
.tel-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
button.primary { background: var(--orbit); border-color: var(--orbit); color: var(--white); }
.tel-list { padding-left: 18px; margin: 6px 0; }
.tel-list li { margin: 3px 0; }
.tel-gloss { color: var(--mute); font-size: 12px; }
dfn { font-style: normal; border-bottom: 1px dotted var(--mute); }
.tel-err { border: 1px solid #E0796B; padding: 8px; margin: 8px 0; }
.tel-err div { color: var(--mute); margin-top: 4px; }
.tel-warn { border: 1px solid var(--star); padding: 8px; margin: 8px 0; }
.tel-warn p { margin: 4px 0 6px; }
.tel-input { width: 100%; background: var(--panel-solid); color: inherit; border: 1px solid var(--line); border-radius: 0; padding: 5px 7px; font: 12px var(--mono); }
.tel-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 210px; margin: 6px 0; }
.tel-pad select { background: var(--panel-solid); color: inherit; border: 1px solid var(--line); border-radius: 0; font-size: 12px; }
.tel-eyepiece { position: relative; width: 120px; height: 120px; border-radius: 50%; border: 1px solid var(--line); background: var(--black); margin: 6px auto; overflow: hidden; }
.tel-eyepiece b { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; border: 1px solid var(--orbit); }
.tel-eyepiece i { position: absolute; width: 5px; height: 5px; margin: -2.5px; background: var(--white); border-radius: 50%; box-shadow: 0 0 4px var(--white); }
#tel-reticle { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 3; }
#tel-reticle i { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border: 2px solid var(--orbit); border-radius: 0;
  background: linear-gradient(var(--orbit), var(--orbit)) center / 2px 100% no-repeat, linear-gradient(var(--orbit), var(--orbit)) center / 100% 2px no-repeat; opacity: .85; }
#tel-reticle b { position: absolute; left: 20px; top: -22px; font: 11px var(--sans); color: var(--orbit); white-space: nowrap; }
/* landing (landing.js) and WebXR (xr.js) */
body.landing > :not(canvas):not(#land-ui):not(#land-cap):not(#land-labels):not(script) { display: none !important; }
#land-cap { position: fixed; inset: 0; z-index: 5; cursor: grab; touch-action: none; }
#land-cap:active { cursor: grabbing; }
#land-labels { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
#land-labels span { position: absolute; left: 0; top: 0; font: 12px var(--sans); color: var(--ink); text-shadow: 0 0 3px var(--black), 0 0 6px var(--black); white-space: nowrap; }
.land-ui { position: fixed; left: 12px; top: 12px; z-index: 10; width: min(320px, calc(100vw - 32px)); padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 0; display: flex; flex-direction: column; gap: 7px; }
.land-ui .lu-title { font: 600 15px var(--display); }
.land-ui .lu-sub, .land-ui .lu-hint, .land-ui .lu-credit { color: var(--mute); font-size: 12px; }
.land-ui .lu-credit { font-size: 12px; }
.land-ui .lu-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.land-ui button { border-radius: 0; }
.land-ui .lu-exit, .land-here { background: var(--orbit) !important; border-color: var(--orbit) !important; color: var(--white); }
.land-ui .lu-exit { margin-left: auto; }
.xr-note { display: block; max-width: 240px; padding: 4px 9px; color: var(--mute); font-size: 12px; white-space: normal; }
.xr-note[hidden] { display: none; }
body.xr-ar > :not(#labels):not(script) { visibility: hidden; }
body.xr-ar #labels { visibility: visible; }
@media (max-width: 640px) { .land-ui { top: auto; bottom: 12px; left: 8px; width: calc(100vw - 16px); } .land-ui .lu-hint { display: none; } }
/* ---- sandbox stage 6 add-ons (sandbox-plus.js, sandbox-missions.js, orbits-gallery.js, sandbox-nuri.js) ---- */
.sb-cmpcv { width: 100%; height: auto; display: block; margin: 6px 0; background: #0a0f1c; border: 1px solid var(--line); }
.sb-cmp .sb-row button { flex: 1; }
.sb-diag td:first-child { width: 44%; }
.sb-diagnote { margin-bottom: 6px; }
.sb-mbar { height: 4px; background: var(--line); margin: 6px 0; } .sb-mbar i { display: block; height: 100%; width: 0; background: var(--orbit); }
.sb-nuri { display: grid; grid-template-columns: 1fr 72px; gap: 6px; align-items: stretch; }
.sb-nuri3d { width: 72px; height: 100%; min-height: 160px; background: #0a0f1c; border: 1px solid var(--line); }
.sb-gallery li .sb-row { margin-top: 4px; }
.sb-gallery li .note { white-space: pre-wrap; }
.sb-lab h2 { font-family: Manrope, var(--sans); }

.sb-tip { position: absolute; left: 0; top: 0; z-index: 40; padding: 8px 10px; background: var(--panel-solid); border: 1px solid var(--line); font: 12.5px/1.5 var(--sans); color: var(--ink); pointer-events: auto; }
.sb-tip details { margin-top: 4px; } .sb-tip summary { cursor: pointer; color: var(--orbit); font-size: 12px; }
.sb-more > summary { cursor: pointer; color: var(--orbit); font-size: 12.5px; margin: 6px 0; }
.sb-tabs .sb-tabminor { opacity: .8; font-size: 12px; }
.sb-helpbtn { margin: 8px 6px; font-size: 12px; white-space: normal; line-height: 1.3; }
.sb-tuthl { position: absolute; z-index: 45; border: 2px solid var(--orbit); pointer-events: none; box-shadow: 0 0 0 9999px rgba(7,10,22,.45); }
.sb-tutcard { position: absolute; z-index: 46; padding: 12px 14px; background: var(--panel-solid); border: 1px solid var(--orbit); font: 13px/1.55 var(--sans); }
.sb-tutcard b { font-family: Manrope, var(--sans); } .sb-tutcard p { margin: 6px 0 10px; }
.sb-rail .sb-tabs button { white-space: normal; word-break: keep-all; font-size: 12px; line-height: 1.25; }
/* ---- plain-language layer (ux.js) ---- */
#ux-tip { position: fixed; z-index: 60; padding: 7px 10px; background: var(--panel-solid); border: 1px solid var(--orbit); color: var(--ink);
  font: 12.5px/1.5 var(--sans); pointer-events: none; max-width: 260px; }
#ux-tip[hidden] { display: none; }
.menu-btn { font: 700 12.5px var(--display); }
.menu-pop { min-width: 250px; max-width: min(320px, calc(100vw - 16px)); }
.menu-pop button { display: block; width: 100%; font-weight: 600; }
.menu-pop button[data-desc]::after { content: attr(data-desc); display: block; margin-top: 2px; font-weight: 400; font-size: 12px; line-height: 1.4; color: var(--mute); white-space: normal; }
#tools #first-btn { background: var(--orbit); color: var(--night); border-color: var(--orbit); font: 700 12.5px var(--display); }
#sp-free.on { background: var(--orbit); color: var(--night); border-color: var(--orbit); }
#sp-home { font-weight: 700; }
#info-brief { list-style: none; margin: 4px 0 8px; padding: 0; }
#info-brief li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid rgba(46,54,88,.5); font-size: 13px; }
#info-brief li:first-child { border-top: 0; }
#info-brief .k { color: var(--mute); flex: none; max-width: 55%; } #info-brief .k small { display: block; font-size: 12px; opacity: .8; line-height: 1.35; }
#info-brief .v { text-align: right; font-family: var(--mono); font-size: 12.5px; }
#info-brief li:has(.k:only-child) .v, #info-brief li .v:not(:empty) { overflow-wrap: anywhere; }
#info-more summary { cursor: pointer; color: var(--orbit); font-size: 12.5px; margin: 4px 0 6px; }
#info td .term { color: var(--mute); font-size: 12px; line-height: 1.35; margin-top: 1px; opacity: .85; }
#ux-hint { position: fixed; z-index: 35; left: 12px; top: 64px; display: flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 12px; background: var(--panel-solid); border: 1px solid var(--line); font-size: 13px; transition: opacity 1s; }
#ux-hint.fade { opacity: .55; } #ux-hint .go { background: var(--orbit); color: var(--night); border-color: var(--orbit); font-weight: 700; } #ux-hint .x { padding: 0 8px; }
.guide-box .ux-tname { color: var(--orbit); margin-bottom: 2px; } .guide-box b { font: 700 15px var(--display); }
.ux-pick { width: min(340px, 92vw); } .ux-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.ux-list button { text-align: left; padding: 8px 10px; font-weight: 700; }
.ux-list button::after { content: attr(data-desc); display: block; font-weight: 400; font-size: 12px; color: var(--mute); margin-top: 2px; }
.lbl.planet.minor { font-weight: 500; font-size: 12px; opacity: .85; }
body.sandbox #ux-hint { display: none; }
@media (max-width: 640px) { #ux-hint { top: auto; left: 8px; bottom: 96px; width: calc(100vw - 16px); } }
.menu-pop button[hidden], #tools button[hidden] { display: none !important; }

/* explore mode: distance from Earth (app.js earthDist) */
#earth-dist { position: fixed; z-index: 30; top: 62px; left: 50%; transform: translateX(-50%); padding: 5px 12px; background: rgba(13,17,36,.86); border: 1px solid var(--line); color: var(--ink); font: 500 13px/1.4 var(--mono); white-space: nowrap; pointer-events: auto; }
body:not(.space) #earth-dist { display: none; }
@media (max-width: 560px) { #earth-dist { top: 10px; font-size: 12px; } } /* phones: clear of the bottom button bar */
#labels .agn, .lbl.agn { color: #C69BFF; }
/* search autocomplete (search-ac.js) */
#search-ac { position: fixed; z-index: 70; margin: 0; padding: 4px 0; list-style: none; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(0,0,0,.5); max-height: 60vh; overflow: auto; }
#search-ac li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 12px; cursor: pointer; font-size: 14px; color: var(--ink); }
#search-ac li b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#search-ac li span { color: var(--mute); font-size: 12px; white-space: nowrap; }
#search-ac li:hover, #search-ac li[aria-selected="true"] { background: var(--panel-raise); }
#search-ac li[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--orbit); }
#search-ac mark { background: none; color: var(--orbit); font-weight: 700; }
/* class sync: teacher's overview (classsync.js) */
.sync-dash { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 6px 0; }
.sync-dash th, .sync-dash td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.sync-dash th { color: var(--mute); font-weight: 500; }

/* 천체 찾기 filter row in the 지금 하늘 panel */
#tn-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-top: 8px; font-size: 12px; color: var(--muted, var(--mute)); }
#tn-filter label { display: flex; flex-direction: column; gap: 2px; }
#tn-filter select, #tn-filter input { width: 100%; background: var(--night); color: var(--ink); border: 1px solid var(--line); border-radius: 0; padding: 4px; font: inherit; font-size: 13px; }
#tn-count { align-self: end; }

/* 천문 달력: window and kinds */
#cal-ctl { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: end; margin: 6px 0; font-size: 12px; color: var(--mute); }
#cal-ctl label { display: flex; flex-direction: column; gap: 2px; }
#cal-ctl input, #cal-ctl select { background: var(--night); color: var(--ink); border: 1px solid var(--line); border-radius: 0; padding: 4px; font: inherit; font-size: 13px; }
#cal-kinds { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 4px; }

/* space mode: how wide the view is at the picked body's distance */
#scale-w { position: fixed; left: 12px; bottom: 112px; z-index: 5; padding: 3px 8px; background: rgba(7,10,22,.75); border: 1px solid var(--line); color: var(--ink); font-size: 12px; pointer-events: none; }

/* one line about tonight's sky (observing.js), shown once a visit */
#tonight-chip { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 6; max-width: calc(100vw - 32px); padding: 6px 12px; background: rgba(7,10,22,.88); border: 1px solid var(--orbit); border-radius: 0; color: var(--ink); font: 13px var(--sans, sans-serif); cursor: pointer; }

/* info table: where a number comes from (rowBasis in app.js) */
#info-table .rb { display: inline-block; margin-left: 6px; padding: 0 4px; border: 1px solid var(--line); color: var(--mute); font-size: 12px; line-height: 16px; vertical-align: 1px; cursor: help; }
/* 28 lunar lodges panel (app.js renderXiu) */
#xiu-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 60vh; overflow: auto; }
#xiu-list li { padding: 3px 0; color: var(--mute); }
#xiu-list li.up { color: var(--ink); }
#xiu-list li.xiu-side { font-family: Manrope, Pretendard, sans-serif; font-weight: 700; color: var(--orbit); margin-top: 8px; }
#xiu-list button { background: none; border: 0; color: inherit; padding: 0; cursor: pointer; font: inherit; text-align: left; }
#xiu-list small { display: block; font-size: 12px; }
/* heritage.js dialogs: sundial reading beside the drawing, Chiljeongsan table */
.hg-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.hg-read p { margin: 4px 0; }
.hg-tab { border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.hg-tab th, .hg-tab td { border: 1px solid var(--line); padding: 4px 8px; text-align: right; }
.hg-tab td:first-child { text-align: left; }
.hg-tab tr.hg-future td { color: var(--orbit); }

/* N-body lab (nbody.js) */
.nb-box { position: fixed; inset: 4vh 4vw; z-index: 60; background: var(--night); border: 1px solid var(--line); color: var(--ink); padding: 14px 16px; overflow: auto; }
.nb-head { display: flex; justify-content: space-between; align-items: center; font: 800 18px/1.3 Manrope, "Pretendard Variable", sans-serif; }
.nb-x { background: none; border: 0; color: var(--ink); font-size: 22px; cursor: pointer; }
.nb-sub { color: var(--mute); font-size: 13px; line-height: 1.55; max-width: 900px; }
.nb-wrap { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.nb-cv { width: min(560px, 100%); aspect-ratio: 1; border: 1px solid var(--line); }
.nb-side { min-width: 220px; font-size: 13px; line-height: 1.6; }
.nb-side button { background: var(--line); color: var(--ink); border: 1px solid var(--orbit); padding: 6px 12px; cursor: pointer; }
