/* stocks.fish - chrome over the reef. Frosted diving slates, brass engraving,
   Fraunces for words, DM Mono for readings. All classes are tb-* (see js/ui.js). */

:root {
  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --mono: 'DM Mono', ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;
  --abyss: #03101a;
  --pan-a: rgba(16, 44, 56, .70);
  --pan-b: rgba(5, 22, 31, .64);
  --pan-solid: #0a2330;
  --rule: rgba(255, 255, 255, .022);
  --ink: #e8eee6;
  --ink-2: #a8bbb9;
  --ink-3: #6d888c;
  --hair: rgba(190, 222, 226, .15);
  --hair-2: rgba(190, 222, 226, .28);
  --brass: #dcb872;
  --brass-dim: rgba(220, 184, 114, .52);
  --glass: #8fe6d1;
  --buy: 94, 234, 164;
  --sell: 255, 110, 120;
  --warm: #f0b25f;
  --cold: #63c9e6;
  --shadow: 0 14px 34px -14px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .4);
  --blur: blur(14px) saturate(1.35);
  --r: 14px;
  --gap: 16px;
  --top: 82px;
  color-scheme: dark;
}
/* sky modes: day = bright frosted slates with dark ink; dark = the abyss, dimmer chrome */
:root[data-sky="day"] {
  --pan-a: rgba(240, 247, 245, .80);
  --pan-b: rgba(214, 232, 232, .72);
  --pan-solid: #e9f2f0;
  --rule: rgba(10, 50, 60, .035);
  --ink: #0e2630;
  --ink-2: #3a5a61;
  --ink-3: #6b8589;
  --hair: rgba(12, 52, 62, .16);
  --hair-2: rgba(12, 52, 62, .3);
  --brass: #8d6620;
  --brass-dim: rgba(141, 102, 32, .55);
  --glass: #117a69;
  --buy: 18, 150, 96;
  --sell: 206, 58, 74;
  --warm: #b86a10;
  --cold: #1b7fa1;
  --shadow: 0 14px 30px -16px rgba(10, 40, 50, .45), 0 1px 3px rgba(10, 40, 50, .18);
  color-scheme: light;
}
:root[data-sky="dark"] {
  --pan-a: rgba(4, 14, 20, .56);
  --pan-b: rgba(2, 8, 12, .5);
  --pan-solid: #040d13;
  --rule: rgba(255, 255, 255, .012);
  --ink: #c3cfcc;
  --ink-2: #7f9594;
  --ink-3: #536a6d;
  --hair: rgba(170, 210, 215, .09);
  --hair-2: rgba(170, 210, 215, .18);
  --brass: #b39a64;
  --brass-dim: rgba(179, 154, 100, .38);
  --shadow: 0 10px 28px -14px rgba(0, 0, 0, .8);
}
:root[data-sky="dusk"] { --brass: #e8b36a; --pan-a: rgba(34, 36, 52, .70); --pan-b: rgba(14, 20, 32, .64); }

:root[data-quality="low"], :root[data-quality="potato"] {
  --blur: none;
  --shadow: 0 4px 12px -6px rgba(0, 0, 0, .55);
  --pan-a: rgba(12, 36, 47, .9);
  --pan-b: rgba(6, 22, 30, .88);
}
:root[data-quality="low"][data-sky="day"], :root[data-quality="potato"][data-sky="day"] { --pan-a: rgba(236, 244, 242, .94); --pan-b: rgba(214, 232, 232, .9); }
:root[data-quality="low"] .tb-panel, :root[data-quality="potato"] .tb-panel { background: linear-gradient(170deg, var(--pan-a), var(--pan-b)); }
:root[data-quality="potato"] .tb-lamp, :root[data-quality="potato"] .tb-lamp::after, :root[data-quality="potato"] .tb-flow i,
:root[data-quality="potato"] .tb-eq i, :root[data-quality="low"] .tb-lamp::after { animation: none !important; }

* { box-sizing: border-box; }
/* numbers that update in place never change width */
.tb-app { font-variant-numeric: tabular-nums; }
/* exits: a short fade, then JS sets [hidden] (see hideAnim) */
.tb-app .is-out { animation: tb-fade-out .16s ease-in forwards !important; pointer-events: none; }
@keyframes tb-fade-out { to { opacity: 0; } }
@keyframes tb-fade-in { from { opacity: 0; } }
.tb-tile { animation: tb-tile-in .35s cubic-bezier(.2, .8, .3, 1); }
@keyframes tb-tile-in { from { opacity: 0; transform: translateY(-6px); } }
.tb-tile-top kbd:empty { display: none; }
.tb-emo { font-style: normal; width: 18px; text-align: center; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; background: var(--abyss); color: var(--ink);
  font: 400 13px/1.45 var(--serif); font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--glass); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 1.5px solid var(--brass); outline-offset: 2px; }
code { font-family: var(--mono); font-size: .92em; color: var(--brass); }

#reef { position: fixed; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; }
#app, .tb-app { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.tb-app > * { pointer-events: auto; }
.tb-app [hidden] { display: none !important; }

/* ---------- shared: the dive slate ---------- */
.tb-panel {
  position: absolute;
  background:
    repeating-linear-gradient(180deg, transparent 0 21px, var(--rule) 21px 22px),
    linear-gradient(170deg, var(--pan-a), var(--pan-b));
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--hair); border-radius: var(--r);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
  color: var(--ink);
}
/* brass corner brackets, like the screw plates on a slate */
.tb-panel::before {
  content: ''; position: absolute; inset: 5px; pointer-events: none; border-radius: calc(var(--r) - 5px);
  --c: var(--brass-dim);
  background:
    linear-gradient(var(--c), var(--c)) left top / 9px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1px 9px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 9px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 1px 9px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 9px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 1px 9px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 9px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 1px 9px no-repeat;
}
.tb-eng { /* engraved label */
  margin: 0; font: 500 9.5px/1.2 var(--mono); letter-spacing: .17em; text-transform: uppercase; color: var(--brass);
}
.tb-gly { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tb-gly .k { fill: var(--pan-solid); }
.tb-art { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tb-art .f { fill: currentColor; stroke: none; }
.tb-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.tb-dot.buy { background: rgb(var(--buy)); box-shadow: 0 0 8px rgba(var(--buy), .6); }
.tb-dot.sell { background: rgb(var(--sell)); box-shadow: 0 0 8px rgba(var(--sell), .6); }
.tb-x {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  color: var(--ink-2); border: 1px solid transparent; transition: .2s;
}
.tb-x:hover { color: var(--ink); border-color: var(--hair-2); }
.tb-slate-head .tb-x, .tb-card > .tb-x, .tb-music-head .tb-x { flex: none; }
.tb-facts dd a, .tb-facts dd .tb-link, .tb-mu-reset, .tb-slate-foot .tb-link { display: inline-block; padding: 11px 0; margin: -11px 0; }
.tb-card-foot a { min-height: 40px; }
@media (hover: none) and (pointer: coarse) { .tb-keys-h, .tb-keys { display: none; } }
.tb-link { color: var(--glass); font: italic 400 13px var(--serif); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }

/* ---------- masthead: brand + reef map ---------- */
.tb-mast {
  position: absolute; top: 12px; left: var(--gap); right: var(--gap);
  display: flex; align-items: flex-start; gap: 8px; pointer-events: none;
}
.tb-mast > * { pointer-events: auto; }
.tb-brand {
  position: relative; flex: none; height: 56px; margin-top: 2px;
  display: flex; align-items: center; gap: 11px; padding: 0 16px 0 14px;
}
.tb-brand-txt { display: flex; flex-direction: column; min-width: 0; }
.tb-word { font: italic 400 26px/1 var(--serif); font-variation-settings: 'opsz' 144; letter-spacing: -.01em; }
.tb-word i { font-style: normal; color: var(--brass, #d9b36a); }
.tb-lamp-txt { font: 400 10px/1.4 var(--mono); letter-spacing: .08em; color: var(--ink-3); margin-top: 3px; }
/* the depth light: a small lamp that glows by connection state */
.tb-lamp {
  position: relative; width: 11px; height: 11px; border-radius: 50%; flex: none;
  background: var(--warm); box-shadow: 0 0 0 3px rgba(240, 178, 95, .12), 0 0 12px var(--warm);
  animation: tb-breathe 2.4s ease-in-out infinite;
}
.tb-lamp::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid currentColor; color: var(--warm); opacity: 0; animation: tb-sonar 2.4s ease-out infinite; }
.tb-lamp[data-state="live"] { background: var(--glass); box-shadow: 0 0 0 3px rgba(143, 230, 209, .12), 0 0 12px var(--glass); animation: none; }
.tb-lamp[data-state="live"]::after { color: var(--glass); animation-duration: 4s; }
.tb-lamp[data-state="reconnecting"] { animation-duration: .9s; }
.tb-lamp[data-state="error"] { background: rgb(var(--sell)); box-shadow: 0 0 12px rgb(var(--sell)); animation: none; }
.tb-lamp[data-state="error"]::after { display: none; }
@keyframes tb-breathe { 50% { opacity: .35; } }
@keyframes tb-sonar { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.tb-mapwrap { position: relative; flex: 1; min-width: 0; display: flex; }
.tb-map-arrow {
  position: absolute; top: 2px; z-index: 2; width: 24px; height: 56px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--hair-2); color: var(--ink);
  background: linear-gradient(170deg, var(--pan-a), var(--pan-b)); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow); animation: tb-fade-in .2s ease-out;
}
.tb-map-arrow:hover { border-color: var(--brass-dim); color: var(--brass); }
.tb-map-arrow.l { left: 0; } .tb-map-arrow.l .tb-gly { transform: rotate(180deg); }
.tb-map-arrow.r { right: 0; }
.tb-map-arrow .tb-gly { width: 14px; height: 14px; }
.tb-reefmap.is-drag { cursor: grabbing; user-select: none; }
.tb-reefmap.is-drag .tb-tile { pointer-events: none; }
@media (hover: none) { .tb-map-arrow { display: none !important; } }
.tb-reefmap {
  flex: 1; min-width: 0; display: flex; gap: 8px; justify-content: safe center;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 2px 2px 12px; margin-bottom: -12px;
}
.tb-reefmap::-webkit-scrollbar { display: none; }
.tb-tiles { display: flex; gap: 8px; }
.tb-tile {
  --tint: 150, 170, 190; --tint-a: .08;
  position: relative; flex: none; width: var(--tile-w, 118px); height: 56px; padding: 7px 8px 0;
  display: flex; flex-direction: column; text-align: left; overflow: hidden;
  border-radius: 11px; border: 1px solid var(--hair);
  background:
    linear-gradient(180deg, rgba(var(--tint), var(--tint-a)), rgba(var(--tint), 0) 75%),
    linear-gradient(170deg, var(--pan-a), var(--pan-b));
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2, .7, .3, 1), border-color .25s;
}
.tb-tile:hover { transform: translateY(-2px); border-color: var(--hair-2); }
.tb-tile-top { display: flex; align-items: center; gap: 5px; min-width: 0; font: 500 12px/1 var(--mono); letter-spacing: .03em; }
.tb-tile-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-tile-glyph { flex: none; color: var(--brass); font-size: 11px; width: 11px; text-align: center; }
.tb-tile-top kbd { display: none; }
/* narrow fitted tiles (< 124px): drop the habitat glyph so the ticker keeps its room */
.tb-reefmap.is-tight .tb-tile-glyph { display: none; }
.tb-reefmap.is-tight .tb-tile-top { letter-spacing: 0; }
.tb-tile-mid { position: relative; z-index: 1; display: flex; align-items: baseline; margin-top: 6px; font-family: var(--mono); }
.tb-tile-px { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.tb-tile-chg { flex: none; margin-left: auto; padding-left: 4px; font: 400 10.5px/1 var(--mono); letter-spacing: 0; color: var(--ink-3); white-space: nowrap; }
.tb-tile[data-dir="up"] .tb-tile-chg { color: rgb(var(--buy)); }
.tb-tile[data-dir="down"] .tb-tile-chg { color: rgb(var(--sell)); }
.tb-spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 14px; display: block; }
.tb-ping { position: absolute; top: 9px; right: 9px; width: 6px; height: 6px; border-radius: 50%; opacity: 0; pointer-events: none; background: rgb(var(--pc, 150, 170, 190)); }
/* trade pulse: class toggled from JS; animates opacity/transform only */
.tb-tile::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--pc, 150, 170, 190), .95), inset 0 0 16px rgba(var(--pc, 150, 170, 190), .45);
}
.tb-tile.is-big::before { box-shadow: inset 0 0 0 1.5px rgba(var(--pc), 1), inset 0 0 26px rgba(var(--pc), .7); }
@keyframes tb-flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes tb-ping { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(2.6); } }
.tb-reefmap.is-more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.tb-reefmap.is-less { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px); mask-image: linear-gradient(90deg, transparent, #000 44px); }
.tb-reefmap.is-less.is-more { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
.tb-tile.is-focus { border-color: var(--brass-dim); box-shadow: var(--shadow), inset 0 0 0 1px var(--brass-dim); }
.tb-tile.is-focus::after { /* "you are here" notch */
  content: ''; position: absolute; left: 50%; bottom: 0; width: 22px; height: 3px; margin-left: -11px;
  border-radius: 3px 3px 0 0; background: var(--brass);
}
.tb-tile-add {
  width: 50px; align-items: center; justify-content: center; gap: 4px; padding: 0; color: var(--brass);
  border-style: dashed; border-color: var(--brass-dim);
  font: 500 9px var(--mono); letter-spacing: .16em; text-transform: uppercase;
}
.tb-tile-add .tb-gly { width: 18px; height: 18px; }

/* ---------- depth gauge ---------- */
.tb-gauge {
  left: var(--gap); top: var(--top); width: 236px; max-height: calc(100% - var(--top) - 84px);
  display: flex; flex-direction: column; overflow: hidden;
}
.tb-gauge-head {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px 10px 16px; text-align: left;
  border-bottom: 1px solid var(--hair);
}
.tb-g-glyph { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--brass-dim); color: var(--brass); font-size: 14px; flex: none; }
.tb-g-id { display: flex; flex-direction: column; min-width: 0; }
.tb-g-coin { font: 500 17px/1 var(--mono); letter-spacing: .03em; }
.tb-g-hab { font: italic 400 12px/1.3 var(--serif); color: var(--ink-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-g-quick { display: none; margin-left: auto; font: 400 12px var(--mono); white-space: pre; }
.tb-g-quick[data-tone="up"] { color: rgb(var(--buy)); }
.tb-g-quick[data-tone="down"] { color: rgb(var(--sell)); }
.tb-fold { margin-left: auto; width: 14px; height: 14px; color: var(--ink-3); transform: rotate(90deg); transition: transform .3s; }
.is-folded .tb-fold { transform: rotate(-90deg); }
.tb-gauge.is-folded .tb-stations { display: none; }
.tb-gauge.is-folded .tb-gauge-head { border-bottom: 0; }
.tb-gauge.is-folded .tb-g-quick { display: block; }
.tb-gauge.is-folded .tb-g-quick + .tb-fold { margin-left: 8px; }

.tb-stations, .tb-board { min-height: 0; flex: 1 1 auto; }
.tb-stations {
  position: relative; list-style: none; margin: 0; padding: 6px 14px 14px 46px; overflow-y: auto; scrollbar-width: thin;
}
.tb-stations::before { /* the depth scale */
  content: ''; position: absolute; left: 30px; top: 0; bottom: 0; width: 7px;
  background:
    linear-gradient(90deg, var(--hair-2) 0 1px, transparent 1px) 0 0 / 1px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--hair-2) 0 1px, transparent 1px 8px) 0 0 / 5px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--brass-dim) 0 1px, transparent 1px 40px) 0 0 / 7px 100% no-repeat;
}
.tb-st { position: relative; padding: 8px 0 7px; border-bottom: 1px dashed var(--hair); }
.tb-st:last-child { border-bottom: 0; }
.tb-st::before { /* station marker on the scale */
  content: ''; position: absolute; left: -19px; top: 15px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--pan-solid); border: 1.5px solid var(--brass);
}
.tb-st-depth { position: absolute; left: -46px; top: 12px; width: 22px; text-align: right; font: 400 8.5px var(--mono); color: var(--ink-3); white-space: nowrap; }
.tb-st-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tb-st-sub { font: 400 10.5px var(--mono); color: var(--ink-3); white-space: nowrap; }
.tb-st-val { font: 400 19px/1.25 var(--mono); letter-spacing: -.01em; margin-top: 3px; font-variant-numeric: tabular-nums; }
[data-st="mood"] .tb-st-val, [data-st="sky"] .tb-st-val { font: italic 400 20px/1.2 var(--serif); letter-spacing: 0; }
[data-st="sky"] .tb-st-val { font-size: 17px; }
.tb-st-cap { margin: 3px 0 0; font: italic 300 12.5px/1.35 var(--serif); color: var(--ink-2); }
.tb-st-cap:empty { display: none; }
[data-tone="up"] { color: rgb(var(--buy)); }
[data-tone="warm"] { color: var(--warm); }
[data-tone="cold"] { color: var(--cold); }
[data-tone="down"] { color: rgb(var(--sell)); }
.tb-st-val[data-tone="warm"], .tb-st-sub[data-tone="warm"] { color: var(--warm); }
.tb-st-val[data-tone="cold"], .tb-st-sub[data-tone="cold"] { color: var(--cold); }
/* tide meter */
.tb-tide {
  position: relative; height: 6px; margin: 8px 0 4px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(var(--sell), .35), var(--hair) 50%, rgba(var(--buy), .35));
}
.tb-tide i { position: absolute; top: 50%; left: 50%; width: 3px; height: 14px; margin: -7px 0 0 -1.5px; border-radius: 2px; background: var(--brass); box-shadow: 0 0 8px var(--brass); transition: left .8s cubic-bezier(.2, .7, .3, 1); }
.tb-tide-ends { display: flex; justify-content: space-between; font: 400 9.5px var(--mono); color: var(--ink-3); }
/* sea state */
.tb-moodbar { display: flex; gap: 4px; margin: 7px 0 2px; }
.tb-moodbar i { flex: 1; height: 5px; border-radius: 3px; background: var(--hair); transition: background .4s; }
.tb-moodbar i.on:nth-child(1) { background: var(--glass); }
.tb-moodbar i.on:nth-child(2) { background: var(--brass); }
.tb-moodbar i.on:nth-child(3) { background: rgb(var(--sell)); }
/* current: drifting ticks */
.tb-flow { --flow-s: 3s; position: relative; height: 8px; margin: 8px 0 2px; overflow: hidden; border-radius: 4px; background: var(--hair); }
.tb-flow i { position: absolute; top: 3px; width: 12px; height: 2px; border-radius: 2px; background: var(--glass); opacity: .8; animation: tb-drift var(--flow-s) linear infinite; }
.tb-flow i:nth-child(2) { animation-delay: calc(var(--flow-s) * -.2); top: 1px; }
.tb-flow i:nth-child(3) { animation-delay: calc(var(--flow-s) * -.4); top: 5px; }
.tb-flow i:nth-child(4) { animation-delay: calc(var(--flow-s) * -.6); }
.tb-flow i:nth-child(5) { animation-delay: calc(var(--flow-s) * -.8); top: 1px; }
.tb-flow[data-dir="l"] i { animation-direction: reverse; }
@keyframes tb-drift { from { left: -14px; } to { left: 100%; } }
/* water temp */
.tb-therm { position: relative; height: 6px; margin: 8px 0 2px; border-radius: 3px; background: linear-gradient(90deg, rgba(99, 201, 230, .18), var(--hair) 50%, rgba(240, 178, 95, .18)); }
.tb-therm::after { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--ink-3); }
.tb-therm i { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; border-radius: 3px; transition: .8s; }
.tb-therm i[data-tone="warm"] { background: var(--warm); }
.tb-therm i[data-tone="cold"] { background: var(--cold); }

/* ---------- view toggle: Panorama / Dive ---------- */
.tb-view {
  flex: none; display: flex; flex-direction: column; gap: 3px; width: 100px; margin-top: 2px; height: 56px; padding: 3px;
  border-radius: 11px; border: 1px solid var(--hair);
  background: linear-gradient(170deg, var(--pan-a), var(--pan-b));
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
.tb-view button {
  flex: 1; display: flex; align-items: center; gap: 7px; padding: 0 9px; border-radius: 8px;
  font: italic 500 13.5px/1 var(--serif); color: var(--ink-2); transition: background .2s, color .2s;
}
.tb-view button::before { content: ''; width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; flex: none; }
.tb-view button:hover { color: var(--ink); }
.tb-view button.is-on { background: rgba(220, 184, 114, .15); color: var(--brass); }
.tb-view button.is-on::before { background: currentColor; box-shadow: 0 0 6px currentColor; }
.tb-app[data-view="all"] .tb-tile.is-focus { border-color: var(--hair); box-shadow: var(--shadow); }
.tb-app[data-view="all"] .tb-tile.is-focus::after { display: none; }

/* ---------- panorama board (gauge in 'all' view) ---------- */
.tb-app[data-view="all"] .tb-gauge .tb-stations { display: none !important; }
.tb-app[data-view="dive"] .tb-gauge .tb-board { display: none !important; }
.tb-board { padding: 6px 8px 12px; overflow-y: auto; scrollbar-width: thin; }
.tb-gauge.is-folded .tb-board { display: none; }
.tb-board-rows { list-style: none; margin: 0; padding: 0; }
.tb-row {
  display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 50px 12px; grid-template-rows: 17px 14px; column-gap: 6px; row-gap: 1px;
  align-items: center; width: 100%; padding: 6px 6px 6px 4px; border-radius: 9px; text-align: left; transition: background .2s;
}
.tb-board-rows li + li { border-top: 1px dashed var(--hair); }
.tb-row:hover { background: var(--hair); }
.tb-row-g { grid-row: 1 / 3; grid-column: 1; text-align: center; color: var(--brass); font-size: 12px; }
.tb-row b { grid-column: 2; font: 500 12.5px/1 var(--mono); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-row-px { grid-column: 3; font: 400 12.5px/1 var(--mono); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-row-chg { grid-column: 4; font: 400 11px/1 var(--mono); text-align: right; color: var(--ink-3); white-space: nowrap; }
.tb-row-go { grid-column: 5; grid-row: 1 / 3; width: 12px; height: 12px; color: var(--ink-3); opacity: .35; transition: opacity .2s, transform .2s, color .2s; }
.tb-row:hover .tb-row-go { opacity: 1; color: var(--brass); transform: translateX(2px); }
.tb-row-meta { grid-column: 2 / 5; grid-row: 2; display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; font: 400 10px/1 var(--mono); color: var(--ink-3); white-space: nowrap; }
.tb-sea { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--hair-2); }
.tb-sea[data-sea="quiet"] { background: var(--glass); }
.tb-sea[data-sea="busy"] { background: var(--brass); }
.tb-sea[data-sea="frantic"] { background: rgb(var(--sell)); box-shadow: 0 0 6px rgb(var(--sell)); }
.tb-board-foot { flex-wrap: wrap; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 10px 8px 0; padding-top: 10px; border-top: 1px solid var(--hair); }
.tb-board-foot b { font: italic 400 15px var(--serif); }
.tb-board-hint { margin: 6px 8px 0; font: italic 300 12.5px var(--serif); color: var(--ink-3); }

/* ---------- regulars roster ---------- */
.tb-roster { right: var(--gap); top: var(--top); width: 224px; max-height: min(44%, calc(100% - var(--top) - 84px)); display: flex; flex-direction: column; overflow: hidden; }
.tb-roster-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px 14px; width: 100%; border-bottom: 1px solid var(--hair); }
.tb-roster-head em { font: normal 400 11px var(--mono); color: var(--ink-2); padding: 1px 7px; border-radius: 9px; border: 1px solid var(--hair-2); }
.tb-roster.is-folded .tb-roster-head { border-bottom: 0; }
.tb-roster.is-folded .tb-roster-list, .tb-roster.is-folded .tb-roster-empty { display: none; }
.tb-roster-empty { margin: 0; padding: 12px 16px 14px; font: italic 300 12.5px/1.4 var(--serif); color: var(--ink-2); }
.tb-roster-list { list-style: none; margin: 0; padding: 4px 6px 8px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.tb-reg {
  display: grid; grid-template-columns: 28px 1fr auto; grid-template-rows: auto auto; column-gap: 9px; align-items: center;
  width: 100%; padding: 6px 8px; border-radius: 9px; text-align: left; transition: background .2s;
}
.tb-reg:hover { background: var(--hair); }
.tb-reg-art { grid-row: 1 / 3; color: var(--glass); }
.tb-reg-art .tb-art { width: 26px; height: 26px; }
.tb-reg-name { font: italic 500 14px/1.2 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-reg-meta { grid-column: 2; font: 400 10px var(--mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-reg-tick { font: normal 500 9px var(--mono); letter-spacing: .04em; color: var(--brass); padding: 0 4px; margin-right: 5px; border: 1px solid var(--brass-dim); border-radius: 4px; }
.tb-reg .tb-dot { grid-column: 3; grid-row: 1 / 3; }
.tb-reg.is-new { animation: tb-arrive 1.6s ease-out; }
@keyframes tb-arrive { 0% { background: rgba(220, 184, 114, .3); transform: translateX(10px); } 30% { transform: none; } 100% { background: transparent; } }

/* ---------- inspect card ---------- */
.tb-card {
  right: var(--gap); bottom: 76px; width: 336px; max-height: calc(100% - var(--top) - 96px);
  overflow-y: auto; padding: 16px 18px 14px; z-index: 3; scrollbar-width: thin;
}
.tb-card { animation: tb-rise .45s cubic-bezier(.2, .8, .3, 1); }
.tb-card > .tb-x { position: absolute; top: 10px; right: 10px; z-index: 1; }
.tb-card-head { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding-right: 26px; }
.tb-card-art { grid-row: 1 / 3; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--hair-2); color: var(--ink); }
.tb-card-art .tb-art { width: 34px; height: 34px; }
.tb-card-head[data-tone="buy"] .tb-card-art { color: rgb(var(--buy)); border-color: rgba(var(--buy), .4); background: radial-gradient(circle, rgba(var(--buy), .14), transparent 70%); }
.tb-card-head[data-tone="sell"] .tb-card-art { color: rgb(var(--sell)); border-color: rgba(var(--sell), .4); background: radial-gradient(circle, rgba(var(--sell), .14), transparent 70%); }
.tb-card-head h3 small { font: 300 14px var(--serif); color: var(--ink-2); }
.tb-card-head h3 { margin: 3px 0 0; font: italic 400 22px/1.1 var(--serif); font-variation-settings: 'opsz' 96; }
.tb-card-big { grid-column: 2; font: 400 15px var(--mono); color: var(--brass); margin-top: 3px; }
.tb-card-note { margin: 12px 0 0; font: italic 300 13px/1.4 var(--serif); color: var(--ink-2); }
.tb-card-sub { margin-top: 14px; }
.tb-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 14px 0 0; border: 1px solid var(--hair); border-radius: 10px; overflow: hidden; background: var(--hair); }
.tb-facts > div { padding: 7px 10px 8px; background: var(--pan-solid); background: color-mix(in srgb, var(--pan-solid) 82%, transparent); min-width: 0; }
.tb-facts dt { font: 500 8.5px var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); }
.tb-facts dd { margin: 2px 0 0; font: 400 13px/1.3 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-facts dd small { font-size: 10px; color: var(--ink-3); }
.tb-facts dd.buy { color: rgb(var(--buy)); } .tb-facts dd.sell { color: rgb(var(--sell)); }
.tb-facts dd .tb-link { font-size: 14px; }
.tb-chart { margin: 14px 0 0; }
.tb-chart-in { margin-top: 7px; min-height: 60px; }
.tb-chart-empty { margin: 8px 0 0; font: italic 300 12.5px var(--serif); color: var(--ink-3); }
.tb-candles { display: block; width: 100%; height: auto; overflow: visible; }
.tb-candles text { font: 400 8px var(--mono); fill: var(--ink-3); }
.tb-candles .mk { stroke: var(--brass); stroke-dasharray: 3 3; stroke-width: 1; }
.tb-candles .mkd { fill: var(--brass); stroke: var(--pan-solid); stroke-width: 1.5; }
.tb-sightings { list-style: none; margin: 8px 0 0; padding: 0; font: 400 11px var(--mono); }
.tb-sightings li { display: grid; grid-template-columns: 62px 44px 1fr auto; gap: 6px; align-items: baseline; padding: 4px 0; border-bottom: 1px dashed var(--hair); }
.tb-sightings time, .tb-sightings small { color: var(--ink-3); }
.tb-sightings small { grid-column: 3 / 5; text-align: right; margin-top: -2px; font-size: 10px; }
.tb-sightings .buy { color: rgb(var(--buy)); } .tb-sightings .sell { color: rgb(var(--sell)); }
.tb-card-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hair); }
.tb-card-foot a { display: inline-flex; align-items: center; gap: 6px; font: italic 400 13px var(--serif); }
.tb-card-foot .tb-gly { width: 14px; height: 14px; }

/* ---------- helm ---------- */
.tb-helm {
  position: absolute; right: var(--gap); bottom: var(--gap); display: flex; gap: 2px; padding: 4px;
  border-radius: 999px; border: 1px solid var(--hair);
  background: linear-gradient(170deg, var(--pan-a), var(--pan-b));
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
.tb-helm button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-2); transition: color .2s, background .2s; }
.tb-helm button:hover, .tb-helm button.is-on { color: var(--ink); background: var(--hair); }
.tb-helm button.is-on { color: var(--brass); }
.tb-helm .off { display: none; }
.tb-helm.is-muted [data-act="sound"] .on, .tb-helm.is-paused [data-act="pause"] .on { display: none; }
.tb-helm.is-muted [data-act="sound"] .off, .tb-helm.is-paused [data-act="pause"] .off { display: block; }
.tb-helm.is-muted [data-act="sound"], .tb-helm.is-paused [data-act="pause"] { color: var(--brass); }
.tb-helm [data-act="sky"] { position: relative; }
.tb-helm .tb-more-btn { display: none; }
.tb-morebox { right: var(--gap); bottom: 64px; width: 230px; padding: 6px; z-index: 5; animation: tb-rise .25s cubic-bezier(.2, .8, .3, 1); }
.tb-morebox button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; border-radius: 9px; font: italic 400 14px var(--serif); color: var(--ink-2); text-align: left; }
.tb-morebox button:hover { background: var(--hair); color: var(--ink); }
.tb-morebox .tb-rec { display: none; }
.tb-seg-4 { grid-template-columns: repeat(4, 1fr); }
.tb-seg-2 { grid-template-columns: repeat(2, 1fr); }
.tb-netbar {
  left: 50%; top: calc(var(--top) + 36px); transform: translateX(-50%); z-index: 7; width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; animation: tb-rise-c .35s cubic-bezier(.2, .8, .3, 1);
}
.tb-netbar p { margin: 0; flex: 1; font: 400 13.5px/1.4 var(--serif); color: var(--ink); }
.tb-netbar .tb-btn { flex: none; height: 36px; padding: 0 16px; font-size: 14px; }
.tb-toast.has-act { flex-direction: row; align-items: center; gap: 12px; text-align: left; }
.tb-row-sea { display: none; }
.tb-toast-act { height: 32px; padding: 0 14px; font-size: 13.5px; flex: none; }
.tb-clipbox { right: var(--gap); bottom: 70px; width: 300px; padding: 12px 8px 10px; z-index: 5; animation: tb-rise .25s cubic-bezier(.2, .8, .3, 1); }
.tb-clipbox .tb-eng { margin: 0 8px 6px; }
.tb-clipbox button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 10px; border-radius: 9px; text-align: left; border: 1px solid transparent; }
.tb-clipbox button:hover { background: var(--hair); }
.tb-clipbox button.is-on { border-color: var(--brass-dim); }
.tb-clipbox span { font: 300 12.5px/1.3 var(--serif); color: var(--ink-2); }
.tb-clipbox b { display: block; font: italic 500 14.5px var(--serif); color: var(--ink); }
.tb-shape { flex: none; border: 1.5px solid var(--brass); border-radius: 3px; }
.tb-shape.w { width: 28px; height: 16px; }
.tb-shape.v { width: 14px; height: 24px; margin: 0 7px; }
.tb-clip-note { margin: 6px 10px 0; font: italic 300 12px var(--serif); color: var(--ink-3); }
.tb-rec { display: none; align-items: center; gap: 6px; }
.tb-rec i { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--sell)); box-shadow: 0 0 8px rgb(var(--sell)); animation: tb-breathe 1s ease-in-out infinite; }
.tb-rec b { font: 500 11px var(--mono); color: rgb(var(--sell)); }
.tb-helm button[data-act="clip"].is-rec { width: auto; padding: 0 12px; border-radius: 19px; background: rgba(var(--sell), .12); cursor: default; }
.tb-helm button[data-act="clip"].is-rec .tb-gly { display: none; }
.tb-helm button[data-act="clip"].is-rec .tb-rec { display: flex; }

.tb-mix, .tb-skybox { right: var(--gap); bottom: 70px; width: 272px; padding: 14px 16px 12px; z-index: 4; animation: tb-rise .3s cubic-bezier(.2, .8, .3, 1); }
.tb-mix-mute .tb-gly { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.tb-mix-mute + .tb-mix-mute { margin-top: 6px; }

/* ---------- music player ---------- */
.tb-np-tick {
  width: auto !important; max-width: 170px; padding: 0 12px 0 10px !important; border-radius: 19px !important;
  display: flex !important; align-items: center; gap: 7px; font: italic 400 12.5px var(--serif); color: var(--glass) !important;
}
.tb-np-tick[hidden] { display: none !important; }
.tb-np-tick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 12px; height: 11px; flex: none; }
.tb-eq i { flex: 1; height: 30%; border-radius: 1px; background: currentColor; }
.tb-np-tick .tb-eq i, .tb-music.is-on .tb-mu-list .is-playing .tb-eq i { animation: tb-eq .9s ease-in-out infinite alternate; }
.tb-eq i:nth-child(2) { animation-delay: -.3s !important; }
.tb-eq i:nth-child(3) { animation-delay: -.6s !important; }
@keyframes tb-eq { from { height: 25%; } to { height: 100%; } }
.tb-music {
  right: var(--gap); bottom: 70px; width: 392px; max-height: calc(100% - var(--top) - 84px);
  display: flex; flex-direction: column; overflow: hidden; padding: 14px 16px 10px; z-index: 4;
}
.tb-music-head, .tb-mu-top { flex: none; }
.tb-mu-list { flex: 1 1 auto; min-height: 90px; overflow-y: auto; scrollbar-width: thin; margin-right: -8px !important; padding-right: 8px !important; }
.tb-music { animation: tb-rise .3s cubic-bezier(.2, .8, .3, 1); }
.tb-music-head { display: flex; align-items: center; justify-content: space-between; margin: -4px -6px 4px 0; }
.tb-mu-vols { padding: 4px 12px 8px; margin-bottom: 10px; border-radius: 12px; border: 1px solid var(--hair); }
.tb-mu-vols .tb-mix-row { grid-template-columns: 104px 1fr 38px; margin-top: 6px; }
.tb-mu-vols .tb-mix-row span { font-size: 13px; color: var(--ink); }
.tb-mu-reset { display: block; margin: 6px 0 0 auto; font-size: 12px; }
.tb-np { position: relative; padding: 14px 14px 12px; border-radius: 12px; border: 1px solid var(--hair); background: radial-gradient(120% 90% at 0% 0%, rgba(143, 230, 209, .10), transparent 60%); }
.tb-zone { display: inline-block; font: 500 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 2px 7px; border-radius: 9px; border: 1px solid var(--brass-dim); color: var(--brass); }
.tb-zone[data-zone="the deep"] { border-color: rgba(99, 201, 230, .45); color: var(--cold); }
.tb-zone[data-zone="shallows"] { border-color: rgba(143, 230, 209, .45); color: var(--glass); }
.tb-np-name { margin: 8px 0 0; font: italic 400 26px/1.1 var(--serif); font-variation-settings: 'opsz' 144; }
.tb-np-credit { margin: 4px 0 0; font: 400 10.5px var(--mono); color: var(--ink-3); letter-spacing: .02em; }
.tb-np-credit:empty, .tb-np-blurb:empty { display: none; }
.tb-np-blurb { margin: 8px 0 0; font: italic 300 13px/1.4 var(--serif); color: var(--ink-2); }
.tb-np-bar { position: relative; height: 3px; margin-top: 12px; border-radius: 2px; background: var(--hair-2); overflow: hidden; }
.tb-np-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--brass); transition: width .5s linear; }
.tb-np-times { display: flex; justify-content: space-between; margin-top: 4px; font: 400 9.5px var(--mono); color: var(--ink-3); }
.tb-np-ctrl { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
.tb-np-ctrl button { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink-2); transition: color .2s, background .2s; }
.tb-np-ctrl button:hover { color: var(--ink); background: var(--hair); }
.tb-np-ctrl .tb-np-play { width: 46px; height: 46px; background: var(--brass); color: #1a1408; box-shadow: 0 6px 18px -8px var(--brass); }
.tb-np-ctrl .tb-np-play:hover { background: var(--brass); filter: brightness(1.08); color: #1a1408; }
.tb-np-play .tb-gly { width: 18px; height: 18px; }
.tb-np-ctrl .tb-np-play { margin: 0 2px; }
.tb-np-play .off, .tb-music.is-on .tb-np-play .on { display: none; }
.tb-music.is-on .tb-np-play .off { display: block; }
.tb-np-shuf .tb-gly { width: 16px; height: 16px; }
.tb-np-ctrl [hidden] { display: none !important; }
.tb-np-vol {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; margin-left: 6px; padding: 0 10px; height: 38px;
  border-radius: 19px; border: 1px solid var(--hair); color: var(--ink-2);
}
.tb-np-vol:hover, .tb-np-vol:focus-within { border-color: var(--brass-dim); color: var(--ink); }
.tb-np-vol .tb-gly { width: 16px; height: 16px; }
.tb-np-vol input { flex: 1; min-width: 50px; }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(220, 184, 114, .35); }
.tb-np-vol output { flex: none; width: 34px; text-align: right; font: 400 11px var(--mono); color: var(--ink); }
.tb-mu-more { margin-top: 8px; border-radius: 10px; border: 1px solid var(--hair); }
.tb-mu-more summary { cursor: pointer; padding: 8px 12px; font: italic 400 13px var(--serif); color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.tb-mu-more summary::-webkit-details-marker { display: none; }
.tb-mu-more summary::before { content: '▸'; font-style: normal; font-size: 10px; color: var(--brass); transition: transform .2s; }
.tb-mu-more[open] summary::before { transform: rotate(90deg); }
.tb-mu-more summary:hover { color: var(--ink); }
.tb-mu-more .tb-mix-row { grid-template-columns: 1fr 40px; row-gap: 0; margin: 0 12px 10px; }
.tb-mu-more .tb-mix-row span { grid-column: 1 / 3; font-size: 12.5px; }
.tb-np-shuf.is-on { color: var(--brass) !important; background: rgba(220, 184, 114, .12) !important; }
.tb-mu-mode { grid-template-columns: repeat(3, 1fr); }
.tb-mu-mode button { font: italic 500 13px var(--serif); letter-spacing: 0; padding: 6px 0; }
.tb-mu-note { margin: 6px 2px 0; font: italic 300 12.5px var(--serif); color: var(--ink-2); }
.tb-mu-zones { display: flex; gap: 2px; margin-top: 12px; border-bottom: 1px solid var(--hair); }
.tb-mu-zones button { padding: 6px 9px 7px; font: 500 9.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tb-mu-zones button:hover { color: var(--ink); }
.tb-mu-zones button.is-on { color: var(--brass); border-bottom-color: var(--brass); }
.tb-mu-list { list-style: none; margin: 6px 0 0; padding: 0; }
.tb-mu-list button {
  display: grid; grid-template-columns: 14px 1fr auto; column-gap: 9px; row-gap: 1px; align-items: baseline;
  width: 100%; padding: 7px 8px; border-radius: 9px; text-align: left; transition: background .2s;
}
.tb-mu-list button:hover { background: var(--hair); }
.tb-mu-list .tb-eq { grid-row: 1 / 3; align-self: center; color: var(--brass); opacity: 0; }
.tb-mu-list .is-playing { background: rgba(220, 184, 114, .09); }
.tb-mu-list .is-playing .tb-eq { opacity: 1; }
.tb-mu-list .is-playing b { color: var(--brass); }
.tb-mu-list b { font: italic 500 14.5px/1.25 var(--serif); }
.tb-mu-dur { font: 400 10.5px var(--mono); color: var(--ink-3); }
.tb-mu-blurb { grid-column: 2 / 4; font: 300 12px/1.35 var(--serif); color: var(--ink-2); }
.tb-mu-blurb em { font: normal 500 8.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-left: 4px; }
.tb-mu-empty { padding: 10px 8px; font: italic 300 13px var(--serif); color: var(--ink-3); }
.tb-mix-row { display: grid; grid-template-columns: 72px 1fr 38px; align-items: center; gap: 10px; margin-top: 10px; font: italic 400 13px var(--serif); color: var(--ink-2); }
.tb-mix-row output { font: 400 11px var(--mono); color: var(--ink); text-align: right; }
.tb-mix-sub { margin-top: 14px; }
.tb-mix-mute { margin-top: 12px; width: 100%; padding: 7px; border-radius: 8px; border: 1px solid var(--hair-2); font: italic 400 13px var(--serif); color: var(--ink-2); }
.tb-mix-mute:hover { color: var(--ink); border-color: var(--brass-dim); }
input[type="range"] {
  --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--brass) var(--p), var(--hair-2) var(--p)); }
input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--brass) var(--p), var(--hair-2) var(--p)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -5px; border-radius: 50%; background: var(--pan-solid); border: 2px solid var(--brass); }
input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--pan-solid); border: 2px solid var(--brass); }
.tb-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.tb-seg button { padding: 5px 0; border-radius: 7px; border: 1px solid var(--hair); font: 400 10.5px var(--mono); letter-spacing: .05em; color: var(--ink-2); }
.tb-seg button:hover { border-color: var(--hair-2); color: var(--ink); }
.tb-seg button.is-on { border-color: var(--brass-dim); color: var(--brass); background: rgba(220, 184, 114, .08); }
.tb-skybox { width: 290px; padding-bottom: 8px; }
.tb-skybox .tb-eng { margin-bottom: 6px; }
.tb-skybox button {
  display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; align-items: center; width: 100%;
  padding: 6px 8px; border-radius: 9px; text-align: left; border: 1px solid transparent;
}
.tb-skybox button:hover { background: var(--hair); }
.tb-skybox button.is-on { border-color: var(--brass-dim); }
.tb-skybox b { font: italic 500 14px/1.2 var(--serif); }
.tb-skybox span { grid-column: 2; font: 300 12px/1.3 var(--serif); color: var(--ink-2); }
.tb-sky-swatch { grid-row: 1 / 3; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--hair-2); }
.tb-sky-swatch[data-m="auto"] { background: conic-gradient(#f6d58a 0 25%, #e28b5b 0 50%, #1c3350 0 75%, #03070c 0); }
.tb-sky-swatch[data-m="market"] { background: linear-gradient(180deg, #9fd6ee, #2c7fa8); }
.tb-sky-swatch[data-m="day"] { background: radial-gradient(circle at 35% 30%, #fff6d4, #7cc7e8 60%); }
.tb-sky-swatch[data-m="dusk"] { background: linear-gradient(180deg, #f2a36a, #6a3d63 70%); }
.tb-sky-swatch[data-m="night"] { background: radial-gradient(circle at 65% 30%, #dfe8f2 0 12%, #10213a 16%); }
.tb-sky-swatch[data-m="dark"] { background: radial-gradient(circle at 50% 60%, #3fe0c4 0 8%, #02060a 22%); }

/* ---------- slates (picker / guide / about) ---------- */
.tb-veil { position: absolute; inset: 0; z-index: 5; background: rgba(2, 10, 16, .38); animation: tb-fade-in .25s ease-out; }
:root[data-sky="day"] .tb-veil { background: rgba(200, 225, 230, .3); }
.tb-slate {
  z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(680px, calc(100% - 32px)); max-height: calc(100% - 56px); overflow-y: auto;
  padding: 22px 26px 22px; scrollbar-width: thin;
  --pan-a: color-mix(in srgb, var(--pan-solid) 88%, transparent);
  --pan-b: color-mix(in srgb, var(--pan-solid) 80%, transparent);
}
.tb-slate { animation: tb-surface .4s cubic-bezier(.2, .8, .3, 1); }
.tb-slate-head { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--hair); }
.tb-slate-head h2 { margin: 5px 0 0; font: italic 350 34px/1.05 var(--serif); font-variation-settings: 'opsz' 144; letter-spacing: -.015em; }
.tb-slate-sub { margin: 7px 0 0; font: 300 14px/1.4 var(--serif); color: var(--ink-2); max-width: 46ch; }
.tb-guide-h { margin: 22px 0 10px; font: 500 9.5px var(--mono); letter-spacing: .17em; text-transform: uppercase; color: var(--brass); display: flex; align-items: center; gap: 10px; }
.tb-guide-h::after { content: ''; flex: 1; height: 1px; background: var(--hair); }
.tb-slate-head + .tb-guide-h { margin-top: 4px; }

/* picker */
.tb-kind-tabs { display: flex; gap: 2px; margin-bottom: 12px; border-bottom: 1px solid var(--hair); }
.tb-kind-tabs button { padding: 7px 14px 8px; font: italic 500 15px var(--serif); color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tb-kind-tabs button:hover { color: var(--ink); }
.tb-kind-tabs button.is-on { color: var(--brass); border-bottom-color: var(--brass); }
.tb-kind { display: inline-block; font: normal 500 8px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 0 4px; border-radius: 4px; border: 1px solid var(--hair-2); color: var(--ink-3); vertical-align: 1px; }
.tb-kind[data-kind="crypto"] { border-color: rgba(143, 230, 209, .4); color: var(--glass); }
.tb-tile[data-kind="crypto"] .tb-tile-glyph { color: var(--glass); }
.tb-pick-search { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--hair-2); background: rgba(0, 0, 0, .12); color: var(--ink-3); }
:root[data-sky="day"] .tb-pick-search { background: rgba(255, 255, 255, .5); }
.tb-pick-search:focus-within { border-color: var(--brass-dim); }
.tb-pick-q { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: none; font: 400 14px var(--mono); color: var(--ink); }
.tb-pick-q::placeholder { color: var(--ink-3); font: italic 300 14px var(--serif); }
.tb-pick-sugg {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 2; list-style: none; margin: 0; padding: 5px;
  border-radius: 11px; border: 1px solid var(--hair-2); background: var(--pan-solid); box-shadow: var(--shadow); max-height: 320px; overflow-y: auto;
}
.tb-pick-sugg li { display: grid; grid-template-columns: 18px 66px 1fr auto 56px 84px; gap: 8px; align-items: baseline; padding: 7px 9px; border-radius: 7px; cursor: pointer; font: 400 12px var(--mono); color: var(--ink); }
.tb-pick-sugg li.is-act { background: var(--hair); }
.tb-pick-sugg li.is-on b::after { content: ' ✓'; color: var(--glass); }
.tb-sugg-g { color: var(--brass); text-align: center; }
.tb-sugg-hab { font: italic 300 12px var(--serif); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-sugg-chg, .tb-sugg-vol { text-align: right; } .tb-sugg-vol { color: var(--ink-3); font-size: 10.5px; }
.tb-sugg-none { padding: 10px; font: italic 300 13px var(--serif); color: var(--ink-3); cursor: default; }
.tb-pick-slate { margin-top: 16px; padding: 12px 14px; border-radius: 11px; border: 1px dashed var(--hair-2); }
.tb-pick-slate-head { display: flex; justify-content: space-between; align-items: baseline; }
.tb-pick-count { font: 400 11px var(--mono); color: var(--ink-3); }
.tb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 30px; }
.tb-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 10px; border-radius: 15px; border: 1px solid var(--hair-2); font: 500 12px var(--mono); letter-spacing: .03em; }
.tb-chip i { font-style: normal; color: var(--brass); font-size: 10px; }
.tb-chip button { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--ink-3); }
.tb-chip button:hover { color: rgb(var(--sell)); background: var(--hair); }
.tb-chip .tb-gly { width: 13px; height: 13px; }
.tb-chips-empty { font: italic 300 13px var(--serif); color: var(--ink-3); align-self: center; }
.tb-pick-note { margin: 10px 2px 0; min-height: 19px; font: italic 300 13px var(--serif); color: var(--glass); }
.tb-pick-note[data-tone="err"] { color: rgb(var(--sell)); }
.tb-pick-or { margin-top: 12px; }
.tb-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.tb-col {
  position: relative; display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; text-align: left;
  padding: 12px 14px; border-radius: 11px; border: 1px solid var(--hair); transition: border-color .2s, background .2s;
}
.tb-col:hover { border-color: var(--brass-dim); background: rgba(220, 184, 114, .05); }
.tb-col .tb-art { grid-row: 1 / 3; width: 32px; height: 32px; color: var(--brass); }
.tb-col b { font: italic 500 16px/1.2 var(--serif); }
.tb-col span { font: 300 12.5px/1.35 var(--serif); color: var(--ink-2); }
.tb-col.is-busy { border-color: var(--brass-dim); }
.tb-col.is-busy::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--brass), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: tb-sound 1s linear infinite; }
@keyframes tb-sound { from { background-position: -100% 0; } to { background-position: 200% 0; } }
.tb-slate-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--hair); }
.tb-grow { flex: 1; }
.tb-btn, .tb-btn-ghost { height: 40px; padding: 0 20px; border-radius: 20px; font: italic 500 15px var(--serif); }
.tb-btn { background: var(--brass); color: #1a1408; box-shadow: 0 6px 18px -8px var(--brass); }
.tb-btn:hover { filter: brightness(1.08); }
.tb-btn:disabled { opacity: .4; cursor: default; }
.tb-btn-ghost { color: var(--ink-2); border: 1px solid var(--hair-2); }
.tb-btn-ghost:hover { color: var(--ink); }

/* field guide */
.tb-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tb-ladder li {
  display: grid; grid-template-columns: 44px 84px 104px 1fr; gap: 12px; align-items: center; padding: 7px 10px;
  border-radius: 9px; background: linear-gradient(90deg, rgba(220, 184, 114, calc(.03 + var(--rung) * .025)), transparent 70%);
}
.tb-ladder-art { color: var(--glass); display: grid; place-items: center; }
.tb-ladder li:nth-child(n+4) .tb-ladder-art { color: var(--brass); }
.tb-ladder-art .tb-art { width: calc(24px + var(--rung) * 3px); height: calc(24px + var(--rung) * 3px); }
.tb-ladder-name { font: italic 500 16px var(--serif); }
.tb-ladder-amt { font: 400 12px var(--mono); color: var(--brass); }
.tb-ladder-note { font: 300 13px/1.35 var(--serif); color: var(--ink-2); }
.tb-guide-aside { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 12px 0 0; font: italic 300 13px var(--serif); color: var(--ink-2); }
.tb-guide-aside .tb-dot.sell { margin-left: 10px; }
.tb-marks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 22px; margin: 0; }
.tb-marks > div { display: grid; align-content: start; grid-template-columns: 36px 1fr; column-gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--hair); }
.tb-marks dt { display: contents; }
.tb-marks dt .tb-art { grid-row: 1 / 3; width: 34px; height: 34px; color: var(--glass); }
.tb-marks dt span { font: italic 500 15px var(--serif); }
.tb-marks dd { margin: 2px 0 0; font: 300 13px/1.4 var(--serif); color: var(--ink-2); }

/* about */
.tb-prose p { margin: 0 0 12px; font: 300 14.5px/1.55 var(--serif); color: var(--ink-2); max-width: 60ch; }
.tb-prose b { font-weight: 500; color: var(--ink); }
.tb-prose .tb-credit { margin-bottom: 4px; font-style: italic; }
.tb-keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 22px; margin: 0; }
.tb-keys div { display: flex; gap: 12px; align-items: baseline; }
.tb-keys dt { min-width: 38px; font: 500 11px var(--mono); color: var(--brass); padding: 2px 6px; border: 1px solid var(--hair-2); border-radius: 5px; text-align: center; }
.tb-keys dd { margin: 0; font: italic 300 13.5px var(--serif); color: var(--ink-2); }

/* ---------- little things ---------- */

.tb-toast {
  /* bottom-centre, clear of the surface band (the fisherman's boat lives at the waterline) */
  position: absolute; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 8; max-width: min(520px, calc(100% - 32px));
  display: flex; flex-direction: column; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--hair-2);
  background: var(--pan-solid); color: var(--ink); box-shadow: var(--shadow); font: italic 400 13.5px var(--serif); text-align: center;
}
.tb-toast { animation: tb-rise-c .35s cubic-bezier(.2, .8, .3, 1); }
/* toasts never eat taps meant for the scene: only their own controls are clickable */
.tb-app > .tb-toast { pointer-events: none; }
.tb-app > .tb-toast button, .tb-app > .tb-toast input { pointer-events: auto; }
.tb-toast input { width: 100%; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--hair-2); background: rgba(0, 0, 0, .2); font: 400 11px var(--mono); color: var(--ink); }

@keyframes tb-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes tb-rise-c { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes tb-surface { from { opacity: 0; transform: translate(-50%, calc(-50% + 18px)); } }

/* ---------- narrow screens ---------- */
html.tb-short .tb-st { padding: 6px 0 5px; }
html.tb-short .tb-st-val { font-size: 16px; }
html.tb-short .tb-st-cap { font-size: 11.5px; margin-top: 1px; }
html.tb-short .tb-st::before { top: 10px; }
html.tb-short .tb-st-depth { top: 7px; }
html.tb-short .tb-row { padding-top: 4px; padding-bottom: 4px; }
html.tb-short .tb-gauge-head, html.tb-short .tb-roster-head { padding-top: 8px; padding-bottom: 7px; }

@media (max-width: 900px) {
  .tb-roster { width: 196px; }
  .tb-brand { width: auto; }
  .tb-brand .tb-lamp-txt { display: none; }
}
/* ---------- phones (portrait <= 600px wide, or landscape <= 500px tall) ---------- */
@media (max-width: 600px), (max-height: 500px) and (orientation: landscape) {
  :root {
    --gap: 8px;
    --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px);
    --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
    --top: calc(68px + var(--st));
  }
  .tb-mast { top: calc(8px + var(--st)); left: calc(var(--gap) + var(--sl)); right: calc(var(--gap) + var(--sr)); gap: 6px; }
  .tb-brand { width: 30px; height: 48px; padding: 0; justify-content: center; border-radius: 11px; }
  .tb-brand::before { display: none; }
  .tb-brand-txt { display: none; }
  /* the two-line switch is one 84x48 tap target on phones: a tap anywhere flips the view */
  .tb-view { width: 84px; height: 48px; }
  .tb-view button { font-size: 12px; padding: 0 7px; gap: 5px; }
  .tb-reefmap { justify-content: flex-start; scroll-snap-type: x proximity; }
  .tb-tile { width: var(--tile-w, 84px); height: 48px; padding: 7px 8px 0; scroll-snap-align: start; }
  .tb-tile-px, .tb-spark { display: none; }
  .tb-tile-mid { margin-top: 0; }
  .tb-tile-top { flex-wrap: wrap; row-gap: 7px; }
  .tb-tile-chg { flex-basis: 100%; margin-left: 0; padding-left: 0; font-size: 12px; }
  .tb-tile-glyph { display: none; }
  .tb-tile-top kbd { display: none; }
  .tb-tile-add { width: 44px; }
  .tb-tile-add span { display: none; }

  /* gauge -> bottom drawer */
  .tb-gauge {
    left: var(--sl); right: var(--sr); top: auto; bottom: 0; width: auto; max-height: min(62vh, calc(100% - var(--top) - 8px));
    border-radius: 18px 18px 0 0; border-bottom: 0; z-index: 2;
    padding-bottom: var(--sb);
  }
  .tb-gauge::before { inset: 5px 5px 0; }
  /* handle: glyph | name + subtitle (one line) | price + % | chevron — nothing can overlap */
  .tb-gauge-head {
    position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 10px; align-items: center;
    min-height: 52px; padding: 14px 14px 8px 16px; border-bottom: 0;
  }
  .tb-gauge-head::before { content: ''; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--hair-2); }
  .tb-gauge .tb-g-glyph { width: 26px; height: 26px; font-size: 12px; }
  .tb-g-id { flex-direction: row; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
  .tb-g-coin { flex: none; }
  .tb-g-hab { display: block; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tb-g-quick, .tb-gauge.is-folded .tb-g-quick { display: block; margin: 0; white-space: nowrap; text-align: right; }
  .tb-fold, .tb-gauge.is-folded .tb-g-quick + .tb-fold { margin: 0; }
  /* phones: closed unless .is-open, regardless of the desktop fold */
  .tb-gauge .tb-stations, .tb-gauge .tb-board { display: none; }
  .tb-gauge.is-open .tb-stations { display: grid; }
  .tb-gauge.is-open .tb-board { display: block; }
  .tb-gauge.is-open .tb-gauge-head { border-bottom: 1px solid var(--hair); }
  .tb-fold, .tb-gauge.is-folded .tb-fold, .tb-roster.is-folded .tb-fold { transform: rotate(-90deg); }
  .tb-gauge.is-open .tb-fold, .tb-roster.is-open .tb-fold { transform: rotate(90deg); }
  .tb-stations { grid-template-columns: 1fr 1fr; column-gap: 18px; padding-left: 16px; }
  .tb-stations::before, .tb-st::before, .tb-st-depth { display: none; }
  .tb-st-val { font-size: 16px; }
  .tb-row { min-height: 44px; }

  .tb-roster { top: var(--top); right: calc(var(--gap) + var(--sr)); width: auto; max-width: 200px; max-height: calc(100% - var(--top) - 140px); border-radius: 18px; }
  .tb-roster::before { display: none; }
  .tb-roster-head { min-height: 40px; padding: 7px 10px 7px 12px; border-bottom: 0; }
  .tb-roster .tb-roster-list, .tb-roster .tb-roster-empty { display: none; }
  .tb-roster.is-open { width: 210px; border-radius: var(--r); }
  .tb-roster.is-open .tb-roster-head { border-bottom: 1px solid var(--hair); }
  .tb-roster.is-open .tb-roster-list, .tb-roster.is-open .tb-roster-empty:not([hidden]) { display: block; }
  .tb-reg { min-height: 44px; }

  /* dock: essentials only (sound, music, settings, light, pause) + the ⋯ menu; 40px targets */
  .tb-helm { bottom: calc(66px + var(--sb)); right: calc(var(--gap) + var(--sr)); padding: 3px; gap: 0; }
  .tb-helm button { width: 40px; height: 40px; }
  .tb-helm [data-act="snap"], .tb-helm [data-act="clip"], .tb-helm [data-act="full"], .tb-helm [data-act="guide"], .tb-helm [data-act="about"] { display: none !important; }
  .tb-helm .tb-more-btn { display: grid; }
  .tb-np-tick, .tb-np-tick:not([hidden]) { display: none !important; }
  .tb-mix, .tb-skybox, .tb-morebox, .tb-clipbox {
    left: calc(var(--gap) + var(--sl)); right: calc(var(--gap) + var(--sr)); width: auto; bottom: calc(118px + var(--sb));
    max-height: calc(100% - var(--top) - 126px - var(--sb)); overflow-y: auto;
  }
  .tb-morebox button { min-height: 44px; }
  .tb-seg button { min-height: 40px; }
  .tb-mix-mute { min-height: 42px; }

  /* card, slates, music -> bottom sheets that always scroll to their end */
  .tb-card, .tb-slate, .tb-music {
    left: var(--sl); right: var(--sr); bottom: 0; top: auto; width: auto; max-height: calc(100% - var(--st) - 24px); transform: none;
    border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: calc(18px + var(--sb));
    overscroll-behavior: contain;
  }
  .tb-card, .tb-slate { max-height: min(82%, calc(100% - var(--st) - 24px)); }
  .tb-music { z-index: 6; max-height: min(88%, calc(100% - var(--st) - 16px)); }
  .tb-slate { padding: 18px 16px calc(18px + var(--sb)); }
  .tb-slate, .tb-card, .tb-music { animation: tb-sheet .4s cubic-bezier(.2, .8, .3, 1); }
  .tb-x { width: 40px; height: 40px; }
  .tb-slate-head h2 { font-size: 28px; }
  .tb-cols, .tb-marks, .tb-keys { grid-template-columns: 1fr; }
  .tb-ladder li { grid-template-columns: 36px 1fr auto; row-gap: 2px; }
  .tb-ladder-note { grid-column: 2 / 4; }
  .tb-pick-q, .tb-pick-q::placeholder { font-size: 16px; } /* < 16px makes iOS zoom the page on focus */
  .tb-pick-sugg li { grid-template-columns: 18px minmax(0, 1fr) auto 54px; min-height: 40px; align-items: center; }
  .tb-pick-sugg b { overflow: hidden; text-overflow: ellipsis; }
  .tb-sugg-hab, .tb-sugg-vol { display: none; }
  .tb-chip { height: 36px; }
  .tb-chip button { width: 36px; height: 36px; margin-right: -2px; }
  .tb-kind-tabs button, .tb-mu-zones button { min-height: 40px; }
  .tb-np-ctrl button { width: 42px; height: 42px; }
  .tb-np-ctrl .tb-np-play { width: 50px; height: 50px; }
  .tb-mu-list button { min-height: 44px; }
  .tb-toast { bottom: calc(122px + var(--sb)); } /* above the dock (66px + 46px) */
  .tb-toast-act { min-height: 40px; }
  .tb-netbar { top: calc(var(--top) + 8px); flex-wrap: wrap; }
  .tb-netbar .tb-btn { min-height: 40px; }
}
/* 360-class phones: the handle drops its subtitle before anything can collide */
@media (max-width: 380px) {
  .tb-g-hab { display: none !important; }
}
/* landscape phones: the scene is short, so the drawer and dock share one bottom row */
@media (max-height: 500px) and (orientation: landscape) {
  .tb-gauge { right: auto; width: min(440px, 56%); }
  .tb-gauge.is-open { max-height: calc(100% - var(--top) - 6px); }
  .tb-helm { bottom: calc(6px + var(--sb)); }
  .tb-mix, .tb-skybox, .tb-morebox, .tb-clipbox { left: auto; width: min(340px, calc(100% - 32px)); bottom: calc(58px + var(--sb)); max-height: calc(100% - 70px - var(--sb)); }
  .tb-roster { max-height: calc(100% - var(--top) - 62px); }
  .tb-card, .tb-slate, .tb-music { left: 0; right: 0; margin: 0 auto; width: min(600px, 100%); }
  .tb-toast { bottom: calc(62px + var(--sb)); } /* above the shared drawer/dock row */
}
@keyframes tb-sheet { from { transform: translateY(100%); } }
/* touch screens: no hover, bigger slider thumbs, affordances always visible */
@media (hover: none) {
  .tb-row-go { opacity: .7; }
}
@media (pointer: coarse) {
  input[type="range"] { height: 32px; }
  input[type="range"]::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -9.5px; }
  input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .tb-app *, .tb-app *::before, .tb-app *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
