:root { color-scheme: dark; }
html, body { margin: 0; height: 100%; background: #04060a; color: #cfe8ee;
  font: 13px/1.4 system-ui, sans-serif; overflow: hidden; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#panel { position: fixed; top: 12px; left: 12px; padding: 10px 14px; width: 250px;
  background: rgba(6, 12, 18, .72); border: 1px solid #16303a; border-radius: 8px;
  max-height: calc(100vh - 12px - var(--cap-h, 130px) - 62px); overflow-y: auto; }   /* stays clear of the source caption (--cap-h is set from its real height in main.js) */
#panel h1 { font-size: 14px; margin: 0 0 8px; font-weight: 600; letter-spacing: .03em; }
#panel input[type=range] { width: 100%; }
#exag-text { color: #7fe3f0; margin-bottom: 8px; }
.row { display: flex; gap: 6px; margin-top: 6px; align-items: center; }
button { background: #0b1a22; color: #cfe8ee; border: 1px solid #1d3b47; border-radius: 5px;
  padding: 3px 9px; cursor: pointer; font: inherit; }
button.on { border-color: #7fe3f0; color: #fff; }
.tag { position: fixed; left: 0; top: 0; pointer-events: none; padding: 1px 6px;
  font-size: 12px; color: #fff; background: rgba(0, 0, 0, .45); border-radius: 4px;
  transform: translate(8px, -50%); white-space: nowrap; }
.tag.dim { color: #aab; font-size: 11px; }
#tip { position: fixed; display: none; pointer-events: none; padding: 3px 8px;
  background: rgba(0, 0, 0, .75); border: 1px solid #2a5260; border-radius: 4px; }
#caption { position: fixed; left: 12px; bottom: 28px; max-width: min(520px, 80vw);
  color: #7d97a0; font-size: 12px; }
#status { position: fixed; right: 12px; bottom: 10px; color: #7d97a0; font-size: 12px; }
#panel .row { flex-wrap: wrap; }
#caption a { color: #7fb7c4; }
#marks { margin-top: 8px; font-size: 12px; }
#marks .hint { color: #9ab; margin-bottom: 4px; }
.mark-row { display: flex; gap: 6px; align-items: flex-start; margin: 3px 0; color: #3dffa0; }
.mark-row span { flex: 1; }
.mark-x { padding: 0 6px; line-height: 16px; }
#brk { margin-top: 8px; font-size: 12px; }
#brk .row { margin-top: 0; }
#brk .hint { color: #9ab; margin-top: 3px; }
#swl { margin-top: 8px; font-size: 12px; }
#swl .row { margin-top: 0; }
#swl .hint { color: #9ab; margin-top: 3px; }
#swl-speed-row { display: none; }
#scene { touch-action: none; }   /* the page handles one-finger look, pinch and two-finger pan itself */
#loading { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); padding: 4px 12px; z-index: 5;
  background: rgba(6, 12, 18, .85); border: 1px solid #2a5260; border-radius: 6px; color: #7fe3f0; font-size: 12px; max-width: 90vw; }
#loading.err { color: #ff8a8a; border-color: #7a2f2f; }
#panel h1 .sub { display: block; font-size: 12px; font-weight: 400; color: #9ab; letter-spacing: 0; }

#credits { position: fixed; left: 12px; bottom: 6px; right: 120px; color: #5f7882; font-size: 10px; line-height: 1.3; pointer-events: none; }
#key { margin-top: 8px; font-size: 12px; color: #9ab; }
#key summary { cursor: pointer; color: #cfe8ee; }
#key ul { margin: 4px 0 0; padding-left: 16px; }
#key li { margin: 3px 0; }
#intro { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 25; width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box; padding: 16px 18px; background: rgba(6, 12, 18, .94);
  border: 1px solid #2a5260; border-radius: 10px; box-shadow: 0 6px 30px rgba(0,0,0,.55); font-size: 13px; }
#intro h2 { font-size: 17px; margin: 0 0 8px; color: #fff; font-weight: 600; }
#intro p { margin: 0 0 8px; }
#intro .intro-phone { display: none; }
#intro .intro-ctl { color: #9ab; font-size: 12px; }
.intro-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.intro-btns button { padding: 7px 14px; }
@media (max-width: 600px), (pointer: coarse) { #intro .intro-desk { display: none; } #intro .intro-phone { display: inline; } }
@media (max-width: 600px) { #credits { right: 12px; bottom: 4px; font-size: 9px; } #caption { bottom: 70px; } #status { bottom: 70px; } }
