/* The Fifth Day: layout. The look is Tidal Glass (ui/tidal-glass.css); this file only places things.
   Every colour here is a token: the theme engine (ui/tidal-glass.js) rewrites them from the ocean in view. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("./fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("./fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("./fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 300; font-display: swap; src: url("./fonts/barlow-semi-condensed-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 400; font-display: swap; src: url("./fonts/barlow-semi-condensed-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-display: swap; src: url("./fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("./fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("./fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("./fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 500; font-display: swap; src: url("./fonts/caveat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 600; font-display: swap; src: url("./fonts/caveat-latin-600-normal.woff2") format("woff2"); }

:root { --m: 28px; --bar-h: 56px; --shell-w: min(1240px, calc(100% - var(--m))); --sh-h: 72px; --sh-pad: 0 20px 0 28px; --sh-title: 26px; --top: calc(var(--m) / 2 + var(--bar-h) + var(--s-3) + env(safe-area-inset-top, 0px));
  --sl: max(var(--m), env(safe-area-inset-left, 0px)); --sr: max(var(--m), env(safe-area-inset-right, 0px)); --sb: max(var(--m), env(safe-area-inset-bottom, 0px)); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: rgb(var(--lens)); color: rgb(var(--ink)); font: 400 16px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body { position: fixed; inset: 0; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, code { -webkit-user-select: text; user-select: text; }
#sea { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; touch-action: manipulation; } p, h1, h2, h3, h4, figure { margin: 0; }
.row { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; } .stack { display: grid; gap: var(--s-3); } .push { margin-left: auto; }
.tg-specimen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } .tg-specimen > svg { color: rgb(var(--ink-3)); }
.tg-kbd { flex: none; } .tg-btn .tg-kbd { margin-right: -8px; height: 22px; min-width: 22px; }

#prep { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 12px; padding: 22px 26px; z-index: 9; width: min(460px, calc(100vw - 32px)); text-align: center; border-radius: var(--r-lg); } #prep[hidden] { display: none; }
#prep .prep-title { font-size: 13px; letter-spacing: .22em; } #prep .prep-facts { margin: 0; font-size: 15px; line-height: 1.5; color: rgb(var(--ink)); } #prep .prep-next { margin: 0; color: rgb(var(--ink-2)); } #prep .prep-line { display: flex; align-items: center; gap: var(--s-3); }
#prep .prep-bar { width: 100%; height: 4px; border-radius: 2px; background: rgb(var(--rim) / .14); overflow: hidden; } #prep .prep-bar i { display: block; height: 100%; width: 12%; border-radius: 2px; background: rgb(var(--signal)); transition: width .6s ease; animation: prep-creep 25s cubic-bezier(.1, .7, .2, 1) both; } @keyframes prep-creep { from { width: 0; } to { width: 22%; } }   /* it never stands still while the server is being reached: quick at first, slower and slower */

/* ── one scrollbar everywhere (the guide's .tg-scroll, finished): a thin rim-coloured thumb that lights when used, no track,
   kept clear of the rounded corners, and never sideways unless the thing is a strip ── */
.tg-scroll { overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgb(var(--rim) / .28) transparent; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.tg-scroll::-webkit-scrollbar { width: 12px; height: 12px; } .tg-scroll::-webkit-scrollbar-track, .tg-scroll::-webkit-scrollbar-corner { background: transparent; }
.tg-scroll::-webkit-scrollbar-track { margin: 14px 0; }
.tg-scroll::-webkit-scrollbar-thumb { min-height: 44px; border: 3.5px solid transparent; border-radius: 99px; background-clip: padding-box; background-color: rgb(var(--rim) / .3); }
.tg-scroll:hover::-webkit-scrollbar-thumb { background-color: rgb(var(--rim) / .45); } .tg-scroll::-webkit-scrollbar-thumb:hover { background-color: rgb(var(--signal) / .7); } .tg-scroll::-webkit-scrollbar-thumb:active { background-color: rgb(var(--signal)); border-width: 3px; }
@supports selector(::-webkit-scrollbar) { .tg-scroll { scrollbar-width: auto; scrollbar-color: auto; } }
.tg-copy code { text-overflow: ellipsis; }

/* ── the bar ── */
#bar { position: fixed; z-index: 8; left: 50%; transform: translateX(-50%); top: calc(var(--m) / 2 + env(safe-area-inset-top, 0px)); width: var(--shell-w); height: var(--bar-h);
  display: flex; align-items: center; gap: var(--s-4); padding: 0 var(--s-3) 0 var(--s-5); border-radius: var(--r-lg); }
.brand b { font: 500 15px/1 var(--font-label); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
#nav { display: flex; gap: var(--s-1); margin-right: auto; }
#nav button { display: inline-flex; align-items: center; gap: var(--s-2); height: 40px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-sm); cursor: pointer; background: transparent; color: rgb(var(--ink-2));
  font: 600 13px/1 var(--font-label); letter-spacing: .13em; text-transform: uppercase; transition: color var(--t-quick), background var(--t-base) var(--ease-settle), box-shadow var(--t-base); }
#nav button:hover { color: rgb(var(--ink)); background: rgb(var(--rim) / .06); }
#nav button[aria-current="page"] { color: rgb(var(--ink)); background: linear-gradient(180deg, rgb(var(--signal) / .22), rgb(var(--signal) / .1)); box-shadow: inset 0 0 0 1px rgb(var(--signal) / .5), 0 0 16px -6px rgb(var(--signal) / .8); }
#nav button:focus-visible { outline: 2px solid rgb(var(--signal) / .9); outline-offset: 2px; }
#nav button.has-news::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--agent)); box-shadow: 0 0 10px rgb(var(--agent)); }
#nav .tg-kbd { height: 20px; min-width: 20px; font-size: 11px; }
#status { display: flex; align-items: center; gap: var(--s-2); white-space: nowrap; }
#status > button { position: relative; display: inline-flex; align-items: center; gap: var(--s-2); height: 40px; min-width: 40px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-pill); cursor: pointer; color: rgb(var(--ink-2));
  background: rgb(var(--lens) / .4); box-shadow: inset 0 0 0 1px rgb(var(--rim) / .1); transition: color var(--t-quick), box-shadow var(--t-base), background var(--t-base); }
#status > button:hover, #status > button[aria-expanded="true"] { color: rgb(var(--ink)); box-shadow: inset 0 0 0 1px rgb(var(--signal) / .5), 0 0 16px -6px rgb(var(--signal) / .8); }
#status > button:focus-visible { outline: 2px solid rgb(var(--signal) / .9); outline-offset: 2px; }
#status .tg-data { font-size: 13.5px; color: rgb(var(--ink)); } #status .tg-label { font-size: 11.5px; }
#status .n { font: 500 13px/1 var(--font-data); } #status .alerts.is-live { color: rgb(var(--danger)); box-shadow: inset 0 0 0 1px rgb(var(--danger) / .5), 0 0 16px -6px rgb(var(--danger) / .8); } #status .alerts.is-quiet .n { display: none; }
#status .agent .tg-i { color: rgb(var(--agent)); } #status .agent .dot { position: absolute; top: 7px; left: 27px; width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--agent)); box-shadow: 0 0 10px rgb(var(--agent)); }
#status .agent.is-off .tg-i { color: rgb(var(--ink-3)); } #status .agent.is-away .tg-i { color: rgb(var(--warm)); }
#status .where .sep { color: rgb(var(--ink-3)); }
#pop { position: fixed; z-index: 8; top: var(--top); right: max(calc((100% - 1240px) / 2), calc(var(--m) / 2)); width: min(360px, calc(100vw - var(--m))); max-height: calc(100dvh - var(--top) - var(--m)); padding: var(--s-4) var(--s-3) var(--s-4) var(--s-5); display: grid; gap: var(--s-3); align-content: start; border-radius: var(--r-lg); }
#pop .head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); } #pop .head .tg-label { display: flex; gap: var(--s-2); align-items: center; color: rgb(var(--ink-2)); }
#pop .head .tg-data { font-size: 12px; color: rgb(var(--ink-3)); } #pop .head.is-off .tg-live { background: rgb(var(--ink-3)); box-shadow: none; animation: none; } #pop .head.is-away .tg-live { background: rgb(var(--warm)); box-shadow: none; animation: none; }
#pop .tg-log { gap: var(--s-3); } #pop .tg-msg p { font-size: 14.5px; }
#pop .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3) var(--s-2); } #pop .grid .tg-data { font-size: 15px; } #pop .grid .wide { grid-column: span 2; }
#pop .line { display: flex; align-items: center; gap: var(--s-3); min-height: 32px; } #pop .line .tg-range { flex: 1; min-width: 0; } #pop .line .tg-seg { margin-left: auto; } #pop .line .tg-seg button { padding: 0 10px; }
#pop .alerts-list { display: grid; gap: 2px; margin: 0 -6px; }
#pop .alert { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; min-height: 52px; padding: 6px 6px 6px 8px; border-radius: var(--r-sm); --k: var(--danger); transition: background var(--t-base), opacity var(--t-base); }
#pop .alert:hover { background: rgb(var(--rim) / .05); } #pop .alert.is-warm { --k: var(--warm); } #pop .alert.is-life { --k: var(--life); } #pop .alert.is-old { opacity: .55; }
#pop .alert .ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: rgb(var(--k)); background: rgb(var(--k) / .12); box-shadow: inset 0 0 0 1px rgb(var(--k) / .35); } #pop .alert .ic .tg-i { width: 16px; height: 16px; }
#pop .alert.is-unread .ic { box-shadow: inset 0 0 0 1px rgb(var(--k) / .7), 0 0 14px -3px rgb(var(--k) / .9); } #pop .alert.is-unread::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: rgb(var(--k)); box-shadow: 0 0 10px rgb(var(--k)); }
#pop .alert.is-new { animation: tg-surface var(--t-slow, .5s) var(--ease-settle, ease) both; }
#pop .alert p { font: 500 14px/1.25 var(--font-label); letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--ink)); overflow-wrap: anywhere; } #pop .alert.is-old p { color: rgb(var(--ink-2)); }
#pop .alert small { display: block; margin-top: 3px; font: 400 12px/1.3 var(--font-data); letter-spacing: 0; text-transform: none; color: rgb(var(--ink-3)); }
#pop .empty { display: grid; justify-items: center; gap: var(--s-2); padding: var(--s-5) 0 var(--s-4); text-align: center; color: rgb(var(--ink-3)); } #pop .empty .tg-i { width: 26px; height: 26px; opacity: .7; }
@media (prefers-reduced-motion: reduce) { #pop .alert.is-new { animation: none; } }

/* ── the ocean view ── */
#hud > * { position: fixed; }
.sense { display: grid; gap: 3px; padding-left: 14px; position: relative; } .sense::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, rgb(var(--signal) / .7), rgb(var(--signal) / .05)); }
.sense .tg-data { font-size: 12.5px; line-height: 1.45; color: rgb(var(--ink-2)); white-space: normal; letter-spacing: -.02em; }
#aim { left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
#reticle { position: absolute; left: -66px; top: -66px; opacity: .7; transition: opacity var(--t-base); } #reticle.is-locked { opacity: 1; }
#target { position: absolute; left: 86px; top: -22px; white-space: nowrap; }
#toasts .toast-go { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } #toasts { left: 50%; top: var(--top); transform: translateX(-50%); width: min(400px, calc(100vw - 2 * var(--m))); display: grid; gap: var(--s-2); pointer-events: none; }
#toasts .tg-toast { padding: 10px 14px 10px 12px; gap: var(--s-3); } #toasts .tg-toast-icon { width: 32px; height: 32px; } #toasts .tg-toast-title { font-size: 13px; letter-spacing: .1em; } #toasts .tg-toast-time { animation-duration: 6s; }
#coords { font-size: 11.5px; letter-spacing: .04em; opacity: .85; white-space: nowrap; text-align: right; } html[data-watch] #coords { display: none; }
#br { right: var(--sr); bottom: var(--sb); display: grid; gap: var(--s-3); justify-items: end; }
#actions { display: flex; gap: var(--s-2); }
#actions button { display: grid; justify-items: center; align-content: center; gap: 5px; width: 48px; height: 56px; padding: 0; border: 0; border-radius: var(--r-sm); cursor: pointer; }
#actions button .tg-kbd { height: 18px; min-width: 18px; padding: 0 4px; font-size: 10px; } #actions button.is-alert, #actions button.is-alert .tg-i { color: rgb(var(--danger)); }
#sonarBox { width: 112px; height: 112px; opacity: .92; } #sonar { position: absolute; inset: 0; width: 100%; height: 100%; } html[data-sonar="off"] #sonarBox { display: none; }
#prompt { left: 50%; bottom: var(--sb); transform: translateX(-50%); max-width: calc(100vw - 2 * var(--m)); }
#prompt button { max-width: 100%; height: 44px; } #prompt button span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #prompt .is-agent .tg-i { color: rgb(var(--agent)); } #prompt .is-agent { box-shadow: inset 0 0 0 1px rgb(var(--agent) / .45), 0 0 22px -8px rgb(var(--agent) / .7); }
#hint { left: 50%; bottom: calc(var(--sb) + 56px); transform: translateX(-50%); white-space: nowrap; } #flash { left: 50%; top: 26%; transform: translateX(-50%); padding: 10px 16px; font-size: 15px; max-width: calc(100vw - 32px); text-align: center; }

/* ── the frame-rate readout: instrument data on the water, bottom left, out of the way ── */
#perf { position: fixed; z-index: 6; left: var(--sl); bottom: calc(var(--sb) - 14px); display: flex; gap: 12px; pointer-events: none; font: 400 11px/1 var(--font-data); color: rgb(var(--ink-2)); opacity: .62; white-space: nowrap; }
#perf b { font-weight: 500; color: rgb(var(--ink)); } #perf i { font-style: normal; margin-left: 3px; color: rgb(var(--ink-3)); } #perf.is-slow span:first-child b { color: rgb(var(--warm)); }
html[data-input="touch"] #perf { left: auto; right: var(--sr); bottom: auto; top: calc(var(--top) + 92px); flex-direction: column; gap: 5px; align-items: flex-end; } html[data-watch] #perf { display: none !important; }

/* ── the quick menu ── */
#menu { position: fixed; z-index: 9; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(380px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: var(--s-4); display: grid; gap: var(--s-3); border-radius: var(--r-lg); }
#menu .head { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--s-2); }
#menu .sh-head { padding: 0 var(--s-2); } #menu .keys { display: flex; gap: var(--s-2) var(--s-4); align-items: center; flex-wrap: wrap; padding: 0 var(--s-2); } #menu .keys span { display: inline-flex; gap: 6px; align-items: center; } #menu { overflow-y: auto; }
.rows { display: grid; gap: 2px; }
.rows button { display: grid; grid-template-columns: 22px 1fr auto; gap: var(--s-3); align-items: center; width: 100%; min-height: 44px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; text-align: left;
  font: 600 13.5px/1.2 var(--font-label); letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--ink)); transition: background var(--t-base), color var(--t-quick), box-shadow var(--t-base); }
.rows button .tg-i { color: rgb(var(--signal)); } .rows button:hover:not(:disabled) { background: rgb(var(--signal) / .1); box-shadow: inset 0 0 0 1px rgb(var(--signal) / .35); }
.rows button:disabled { opacity: .38; cursor: default; } .rows button.is-alert, .rows button.is-alert .tg-i { color: rgb(var(--danger)); } .rows button.is-ready, .rows button.is-ready .tg-i { color: rgb(var(--life)); } .rows button.is-agent .tg-i { color: rgb(var(--agent)); }
.rows button:focus-visible { outline: 2px solid rgb(var(--signal) / .9); outline-offset: 2px; }

/* ── sheets: the field book, set-up and the lab share one frame. It is exactly as wide as the bar and starts the same
   distance under it; the header is one row of one height (ui/dom.js sheetHead); only what is below it differs. ── */
.sheet { position: fixed; inset: 0; z-index: 7; display: grid; justify-items: center; align-items: stretch; padding: var(--top) 0 max(calc(var(--m) / 2), env(safe-area-inset-bottom, 0px)); }
.sheet > .tg-scrim { position: absolute; inset: 0; }
.shell { position: relative; width: var(--shell-w); height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--sh-h) minmax(0, 1fr); border-radius: var(--r-xl); }
.shell.tg-well { overflow: hidden; }
.sh-head { display: flex; align-items: center; gap: var(--s-4); height: var(--sh-h); padding: var(--sh-pad); min-width: 0; } .sh-head > .tg-i { flex: none; }
.sh-head .tg-h1 { font-size: var(--sh-title); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sh-close { margin-left: auto; display: flex; gap: 10px; align-items: center; flex: none; }
.sh-body { min-height: 0; padding: 6px 28px 28px; }
.fb-body { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 0; }
.fb-nav { padding: 6px 6px 20px 18px; min-height: 0; }
.fb-page { padding: 6px 28px 28px 22px; display: grid; gap: var(--s-5); align-content: start; min-height: 0; }
.fb-top > *, .fb-cols > *, .fb-page > * { min-width: 0; } .fb-top { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.fb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); } .sec { display: grid; gap: 10px; align-content: start; }
.fb-actions { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); } .stat { display: inline-flex; align-items: baseline; gap: var(--s-2); padding: 8px 12px; border-radius: var(--r-sm); }
.stat b { font: 600 11px/1 var(--font-label); letter-spacing: .16em; text-transform: uppercase; color: rgb(var(--ink-3)); } .stat span { font: 400 15px/1 var(--font-data); color: rgb(var(--ink)); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--s-2); } .thumbs .tg-specimen { aspect-ratio: 16 / 10; } .table-wrap { min-width: 0; }
.agent-label { display: flex; gap: var(--s-2); align-items: center; color: rgb(var(--agent)); }
.su-col { width: min(760px, 100%); margin: 0 auto; display: grid; gap: var(--s-5); padding-top: var(--s-2); } .su-col > *, .su-col .sec > * { min-width: 0; } .su-lead { font-size: 17px; color: rgb(var(--ink)); }
.su-step { display: grid; gap: 10px; min-width: 0; } .tg-steps li > * { min-width: 0; }
.su-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 48px; flex-wrap: wrap; } .su-row > div:first-child { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; } .su-row b { font: 500 15px/1.2 var(--font-label); letter-spacing: .12em; text-transform: uppercase; }
.su-ctl { display: inline-flex; align-items: center; gap: var(--s-3); } label.su-row { cursor: pointer; } .tg-seg button:disabled { opacity: .35; cursor: default; } .tg-notice .tg-btn { margin-left: auto; flex: none; }
#setup .keys { display: flex; gap: var(--s-3) var(--s-4); align-items: center; flex-wrap: wrap; } #setup .keys span { display: inline-flex; gap: 6px; align-items: center; }

/* ── the lab: the same frame with the tank showing through, so the header sits on a veil and the panes float below it ── */
#lab { z-index: 4; } #lab > .tg-scrim { background: radial-gradient(ellipse at 60% 50%, rgb(var(--sea) / .05), rgb(0 0 0 / .4)); }
#labHead { border-radius: var(--r-xl) var(--r-xl) var(--r-lg) var(--r-lg); } #labHead .sh-head { width: 100%; }
#labSide, #tank, .choice { min-width: 0; } #labBody { min-height: 0; margin-top: var(--s-3); padding-right: 2px; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: var(--s-5); align-items: start; align-content: start; }
#labSide { display: grid; gap: var(--s-4); align-content: start; } #labSide .tg-pane { padding: 22px; display: grid; gap: var(--s-4); }
#tank { padding: 22px 24px; display: grid; grid-template-rows: auto 1fr; gap: 18px; min-height: 100%; align-content: start; }
#tank .head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); } #tank .head > .tg-h2, #tank .head > .tg-label { flex: none; } .tank-tabs { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; } .tank-tabs::-webkit-scrollbar { display: none; } .tank-tabs button { flex: none; white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis; } .tank-tabs button .n { margin-left: 6px; opacity: .6; } #tank .head .tg-label { display: flex; gap: var(--s-2); align-items: center; }
.lab-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); align-items: start; }   /* minmax(0, ...): a bare 1fr cannot shrink under its widest word or picture, and the cards then spill over each other */
.choice > * { min-width: 0; max-width: 100%; } .choice h4, .choice p { overflow-wrap: anywhere; }
.choice { padding: 18px 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; justify-items: center; text-align: center; transition: transform var(--t-base) var(--ease-settle), box-shadow var(--t-base); }
.choice:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgb(var(--signal) / .4), 0 18px 30px -18px rgb(var(--signal) / .5); }
.choice .tg-specimen, .solo .tg-specimen { width: 100%; aspect-ratio: 16 / 10; background: radial-gradient(80% 70% at 50% 45%, rgb(var(--glow) / .14), transparent 70%); box-shadow: none; touch-action: pan-y; cursor: ew-resize; }
.choice .tg-specimen::after, .solo .tg-specimen::after { display: none; } .tg-specimen canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; }
.choice h4 { margin: 0; font: 500 18px/1.2 var(--font-label); letter-spacing: .12em; text-transform: uppercase; }
.choice p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.45; color: rgb(var(--ink-2)); min-height: 3em; } .choice p.is-bad { color: rgb(var(--danger)); }
.solo { display: grid; gap: var(--s-4); align-content: start; justify-items: center; } .solo .tg-specimen { max-width: 760px; } .solo .choice { width: 100%; max-width: 800px; cursor: default; } .solo .choice:hover { transform: none; box-shadow: none; }
.pick { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.dna { display: grid; grid-template-columns: 84px 1fr 44px; gap: var(--s-3); align-items: center; } .dna .tg-data { text-align: right; font-size: 13.5px; }

/* ── touch controls ── */
#touch { inset: 0; pointer-events: none; } #touch > * { position: absolute; pointer-events: auto; touch-action: none; }
#stick { left: calc(var(--sl) - 4px); bottom: calc(var(--sb) - 4px); width: 128px; height: 128px; border-radius: 50%; }
#stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: radial-gradient(circle at 38% 35%, rgb(var(--rim) / .5), rgb(var(--signal) / .35) 70%); box-shadow: inset 0 0 0 1px rgb(var(--signal) / .6), 0 0 18px -4px rgb(var(--signal) / .7); pointer-events: none; }
#vert { left: calc(var(--sl) + 132px); bottom: calc(var(--sb) + 8px); display: grid; gap: var(--s-2); }
.tbtn { width: 48px; height: 48px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: rgb(var(--ink)); cursor: pointer; }
.tbtn:active, .tbtn.is-down { transform: scale(.93); box-shadow: inset 0 0 0 1px rgb(var(--signal) / .6), 0 0 20px -6px rgb(var(--signal) / .8); }
.tbtn .tg-i { color: rgb(var(--signal)); } .tbtn.is-ready .tg-i { color: rgb(var(--life)); } .tbtn.is-ready { box-shadow: inset 0 0 0 1px rgb(var(--life) / .5), 0 0 20px -8px rgb(var(--life) / .7); } .tbtn.is-alert .tg-i { color: rgb(var(--danger)); } .tbtn.is-alert { box-shadow: inset 0 0 0 1px rgb(var(--danger) / .5); }
#pad { right: var(--sr); bottom: var(--sb); display: flex; align-items: flex-end; gap: var(--s-2); } #pad .col { display: grid; gap: var(--s-2); }
#shutter { width: 76px; height: 76px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; color: rgb(var(--signal-ink)); cursor: pointer;
  background: radial-gradient(120% 140% at 50% 0%, rgb(var(--rim) / .55), transparent 55%), linear-gradient(180deg, rgb(var(--signal)), rgb(var(--signal-deep))); box-shadow: inset 0 1px 0 rgb(var(--rim) / .7), 0 0 0 1px rgb(var(--signal) / .55), 0 0 0 6px rgb(var(--glass) / .45), 0 10px 28px -10px rgb(var(--signal) / .75); transition: transform var(--t-quick); }
#shutter:active { transform: scale(.94); } #shutter .tg-i { width: 30px; height: 30px; }

html[data-input="touch"] #touch { display: block !important; } html[data-input="touch"] #actions, html[data-input="touch"] #hint { display: none !important; }
html[data-input="touch"] #br { bottom: auto; top: var(--top); } html[data-input="touch"] #sonarBox { width: 84px; height: 84px; } html[data-input="touch"] .tg-kbd { display: none; }
html[data-input="touch"] #prompt { bottom: calc(var(--sb) + 136px); } html[data-input="touch"] #toasts { width: min(400px, calc(100vw - 2 * var(--m) - 200px)); }
html[data-watch] #bar, html[data-watch] #pop, html[data-watch] #br, html[data-watch] #prompt, html[data-watch] #hint, html[data-watch] #lead, html[data-watch] #flash, html[data-watch] #touch, html[data-watch] #toasts, html[data-watch] #perf, html[data-watch] #menu { display: none !important; }   /* a film, not a control panel: nothing to press */

/* ── narrower screens ── */
@media (max-width: 1180px) { #nav .tg-kbd { display: none; } #status .agent .tg-label { display: none; } .lab-choice { gap: var(--s-3); } .choice { padding: 14px; } .choice h4 { font-size: 16px; } }
@media (max-width: 1040px) { .fb-page .tg-table th, .fb-page .tg-table td { padding-left: 7px; padding-right: 7px; } .fb-body { grid-template-columns: 240px minmax(0, 1fr); } .fb-top { grid-template-columns: 200px 1fr; } .fb-cols { grid-template-columns: 1fr; } #labBody { grid-template-columns: 290px minmax(0, 1fr); gap: var(--s-4); } }
@media (max-width: 900px) { :root { --m: 16px; } .brand { display: none; } #bar { padding: 0 var(--s-2); gap: var(--s-2); } #nav .lbl { display: none; } #nav button { width: 44px; padding: 0; justify-content: center; position: relative; } #nav button.has-news::after { position: absolute; top: 8px; right: 8px; }
  #status .where .region, #status .where .sep { display: none; }
  #labBody { display: flex; flex-direction: column; align-items: stretch; } #labBody > * { flex: none; } #tank { min-height: 0; } #lab.is-solo #tank { order: -1; } }
/* phones, upright */
@media (max-width: 620px) {
  :root { --m: 12px; --bar-h: 52px; --sh-h: 56px; --sh-pad: 0 10px 0 16px; --sh-title: 20px; }
  #nav button[data-to="ocean"] { display: none; } #status > button { padding: 0 10px; } #status .alerts.is-quiet { display: none; } #pop { right: calc(var(--m) / 2); width: calc(100vw - var(--m)); }
  #reticle, #reticle.is-locked { transform: scale(.78); } #target { left: -130px; top: 60px; width: 260px; text-align: center; padding: 0; white-space: normal; justify-items: center; } #target::before { display: none; }
  html[data-input="touch"] #toasts { width: calc(100vw - 2 * var(--m) - 96px); left: var(--m); transform: none; } #toasts .tg-toast-icon { display: none; } #toasts .tg-toast { grid-template-columns: 1fr; }
  .shell, #labHead { border-radius: var(--r-lg); } .sh-head { gap: var(--s-3); } .sh-head .tg-kbd { display: none; } .sh-body { padding: 4px 14px 20px; }
  #book { grid-template-rows: auto minmax(0, 1fr); } #book .sh-head { height: auto; min-height: var(--sh-h); flex-wrap: wrap; row-gap: 0; padding-bottom: 10px; } #book .sh-close { height: var(--sh-h); } #book .sh-head .tg-seg { order: 3; width: 100%; } #book .sh-head .tg-seg button { flex: 1; padding: 0 8px; }
  .fb-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); } .fb-nav { padding: 0 12px 10px; overflow: visible; } .fb-nav .tg-list { display: flex; overflow-x: auto; gap: var(--s-2); padding-bottom: 4px; scrollbar-width: none; } .fb-nav .tg-list::-webkit-scrollbar { display: none; }
  .fb-nav .tg-item { width: auto; flex: none; min-width: 150px; } .fb-page { padding: 4px 14px 20px; gap: var(--s-4); } .fb-top { grid-template-columns: 1fr; } .fb-top .tg-specimen { max-width: 280px; }
  .su-col { gap: var(--s-4); } #setup .desk { display: none; } .table-wrap { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 20px; } .table-wrap::-webkit-scrollbar { display: none; }
  #menu { width: calc(100vw - 16px); }
  #labBody { gap: var(--s-3); margin-top: var(--s-2); } #labSide .tg-pane, #tank { padding: var(--s-4); }
  .lab-choice { grid-template-columns: 1fr; } .choice { grid-template-columns: 42% minmax(0, 1fr); justify-items: start; text-align: left; column-gap: var(--s-3); padding: 12px; } .choice .tg-specimen { grid-row: 1 / 4; align-self: center; } .choice p { min-height: 0; font-size: 13.5px; } .choice h4 { font-size: 15px; }
  .solo .choice { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } .solo .choice .tg-specimen { grid-row: auto; }
}
/* phones, on their side */
@media (max-height: 520px) {
  :root { --m: 12px; --bar-h: 46px; --sh-h: 46px; --sh-pad: 0 8px 0 16px; --sh-title: 18px; } .sh-head .tg-iconbtn { width: 34px; height: 34px; } .sh-head .tg-kbd { display: none; } #nav button { height: 36px; } #status > button { height: 34px; }
  #reticle, #reticle.is-locked { transform: scale(.7); } #target { left: 60px; } #stick { width: 112px; height: 112px; } #vert { left: calc(var(--sl) + 116px); }
  html[data-input="touch"] #sonarBox { width: 72px; height: 72px; } html[data-input="touch"] #prompt { bottom: var(--sb); }
  .sh-body { padding: 4px 16px 16px; } .fb-body { grid-template-columns: 210px minmax(0, 1fr); } .fb-top { grid-template-columns: 160px 1fr; gap: var(--s-4); } .fb-page { padding: 4px 16px 16px; gap: var(--s-4); }
  .su-col { gap: var(--s-3); } #setup .desk { display: none; }
  #labBody { display: grid; margin-top: var(--s-2); grid-template-columns: 40% minmax(0, 1fr); gap: var(--s-3); } #tank { min-height: 0; } #labSide .tg-pane, #tank { padding: var(--s-4); } .lab-choice { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); } .choice { grid-template-columns: 40% minmax(0, 1fr); justify-items: start; text-align: left; column-gap: var(--s-3); padding: 10px; } .choice .tg-specimen { grid-row: 1 / 4; align-self: center; } .choice p { font-size: 13px; min-height: 0; } .choice h4 { font-size: 14px; }
  .solo .choice { grid-template-columns: minmax(0, 1fr); } .solo .choice .tg-specimen { grid-row: auto; } #lab.is-solo #tank { order: -1; } .fb-top .tg-specimen figcaption span { display: none; }
}

#pop .alert p .n { color: rgb(var(--ink-3)); margin-left: 6px; font-size: 12px; }

.su-name { width: min(100%, 240px); }
.fb-empty { justify-items: start; max-width: 620px; } .fb-empty > svg { width: 160px; opacity: 0.5; }

/* the field book: what a species is doing now, and the ones being followed */
.fb-now b { font-weight: 600; } .fb-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; } .fb-tag { gap: 8px; padding-right: 4px; } .fb-tag .tg-btn { min-height: 26px; padding: 2px 10px; }

/* under the hood: the compact row, and the full readout a second press of ` opens */
#perf { flex-direction: column; align-items: flex-start; gap: 6px; } #perf .perf-row { display: flex; gap: 12px; }
#perf .perf-more { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgb(var(--sea) / .72); box-shadow: inset 0 0 0 1px rgb(var(--rim) / .16); font: 400 10.5px/1.55 var(--font-data); color: rgb(var(--ink-2)); white-space: pre; max-width: min(92vw, 720px); overflow: hidden; }
#perf.is-full { opacity: .95; z-index: 40; } html[data-input="touch"] #perf .perf-more { white-space: pre-wrap; max-width: 86vw; }
#debugView { position: fixed; z-index: 40; left: 50%; top: calc(var(--top) + 10px); transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgb(var(--sea) / .8); box-shadow: inset 0 0 0 1px rgb(var(--warm) / .5); font: 500 11px/1 var(--font-data); letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--warm)); pointer-events: none; }

/* ── life round: what a body is as food, how it lives, how it is doing ─────────────────────────── */
.tg-seg--sm button { height: 28px; padding: 0 11px; font-size: 12.5px; } .tg-input--sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.tg-link { display: inline; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: rgb(var(--signal)); text-decoration: underline; text-decoration-color: rgb(var(--signal) / .4); text-underline-offset: 3px; } .tg-link:hover { text-decoration-color: rgb(var(--signal)); }
.tg-link:focus-visible { outline: 2px solid rgb(var(--signal) / .9); outline-offset: 2px; border-radius: 4px; }
.nutri { display: grid; gap: 6px; } .nutri-row { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 3px 10px; align-items: center; } .nutri-row .tg-label { grid-row: span 2; font-size: 11px; }
.nutri-row .nutri-bar:only-of-type { grid-row: span 2; }
.nutri-bar { display: block; height: 6px; border-radius: 6px; background: rgb(var(--lens) / .6); box-shadow: inset 0 0 0 1px rgb(var(--rim) / .08); overflow: hidden; } .nutri-bar i { display: block; height: 100%; width: var(--v); min-width: 2px; border-radius: 6px; background: rgb(var(--life)); box-shadow: 0 0 10px -2px rgb(var(--life) / .8); }
.nutri-bar.is-need { height: 4px; } .nutri-bar.is-need i { background: rgb(var(--warm)); box-shadow: none; }
.nutri-key { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .nutri-key .k { width: 14px; height: 5px; border-radius: 5px; background: rgb(var(--life)); } .nutri-key .k.is-need { background: rgb(var(--warm)); margin-left: 8px; }
.metab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .metab .tg-small { flex: 1 1 180px; min-width: 0; }
.tg-chip.metab-chemo { --signal: var(--warm); } .tg-chip.metab-photo { --signal: var(--life); } .tg-chip.metab-breather { --signal: 126 232 236; } .metab .tg-chip { cursor: default; flex: none; }
.life { display: grid; gap: 12px; } .life .step { display: grid; gap: 3px; margin: 0; font-size: 14px; line-height: 1.45; color: rgb(var(--ink)); } .life .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.gates { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } .gates li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 13px; line-height: 1.4; color: rgb(var(--ink-2)); } .gates .tg-i { color: rgb(var(--life)); margin-top: 2px; }
.descent { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-3); align-items: center; padding: 10px; border-radius: var(--r-md); background: rgb(var(--lens) / .4); box-shadow: inset 0 0 0 1px rgb(var(--rim) / .08); }
.descent > div { display: grid; gap: 3px; min-width: 0; } .descent.is-first { grid-template-columns: 1fr; padding: 12px 14px; } .descent.is-first, .descent.is-first > * { display: grid; gap: 4px; } .descent .tg-h2 { font-size: 18px; } .descent p { margin: 0; } .descent > .tg-specimen, .descent > .view { width: 96px; aspect-ratio: 1; min-height: 0; }
.note-prose { display: grid; gap: 10px; } .note-prose p { margin: 0; font: 400 15px/1.55 var(--font-ui); color: rgb(var(--ink)); max-width: 68ch; overflow-wrap: anywhere; }
.tg-chip.health { height: auto; min-height: 30px; padding: 5px 13px 5px 11px; flex-wrap: wrap; text-align: left; cursor: pointer; --k: var(--ink-3); background: rgb(var(--k) / .1); box-shadow: inset 0 0 0 1px rgb(var(--k) / .3); color: rgb(var(--ink)); max-width: 100%; }
.tg-chip.health::before { display: none; } .tg-chip.health .dot, .health-dot, .lk .dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: rgb(var(--k, var(--ink-3))); box-shadow: 0 0 9px rgb(var(--k, var(--ink-3)) / .9); }
.tg-chip.health.is-life, .health-dot.is-life, .lk .dot.is-life { --k: var(--life); } .tg-chip.health.is-warm, .health-dot.is-warm, .lk .dot.is-warm { --k: var(--warm); } .tg-chip.health.is-danger, .health-dot.is-danger, .lk .dot.is-danger { --k: var(--danger); } .tg-chip.health.is-gone, .health-dot.is-gone { --k: var(--ink-3); opacity: .7; }
.tg-chip.health b { font-weight: 600; } .tg-chip.health .tg-data { font-size: 12px; color: rgb(var(--ink-2)); } .tg-chip.health .why { flex-basis: 100%; font-size: 12.5px; color: rgb(var(--ink-2)); white-space: normal; } .health-row { display: flex; flex-wrap: wrap; gap: 8px; }
.health-dot { display: inline-block; margin-right: 7px; vertical-align: 1px; } #target .health { color: rgb(var(--ink-2)); } #target .health.thriving, #target .health.breeding { color: rgb(var(--life)); } #target .health.hungry, #target .health.declining { color: rgb(var(--warm)); } #target .health.hunted, #target .health.suffocating, #target .health.poisoned, #target .health.last-few { color: rgb(var(--danger)); }
/* Chronicles: finding, lineage, the ocean-wide chronicle */
.fb-find { display: grid; gap: 8px; padding: 0 2px 10px; } .fb-find .tg-seg { justify-self: start; max-width: 100%; overflow-x: auto; scrollbar-width: none; } .fb-search { position: relative; display: block; } .fb-search .tg-i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: rgb(var(--ink-3)); pointer-events: none; } .fb-search .tg-input { width: 100%; padding-left: 36px; }
.fb-sort { display: flex; align-items: center; gap: 8px; } .fb-sort select { height: 28px; padding: 0 8px; border: 0; border-radius: 9px; font: inherit; color: rgb(var(--ink)); background: rgb(var(--lens) / .6); box-shadow: inset 0 0 0 1px rgb(var(--rim) / .14); }
.tg-item.is-gone { opacity: .6; } .fb-gone { display: flex; gap: 8px; align-items: baseline; color: rgb(var(--ink-2)); } .fb-life .sec { gap: 12px; } .fb-life p { margin: 0; }
.varieties { display: grid; gap: 8px; } .var-more summary { cursor: pointer; } .var-scroll { max-height: 220px; overflow: auto; margin-top: 8px; padding-right: 4px; } .variety { display: grid; grid-template-columns: 16px minmax(0, 200px) minmax(0, 1fr); gap: 8px; align-items: center; } .variety .tg-i { color: rgb(var(--agent)); }
.chron-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-3); } .chron { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r-md); align-content: start; min-width: 0; }
.chron-head { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; } .chron-head b { font-size: 16px; } .chron-head .tg-btn { margin-left: auto; } .chron-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .chron-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 14px; } .chron-list li span { color: rgb(var(--ink-2)); font-size: 13px; } .chron-list .tg-chip { height: 22px; padding: 0 9px; font-size: 11px; } .chron-list .tg-chip::before { display: none; } .chron p { margin: 0; }
.fb-tree { padding: 0 !important; display: block !important; position: relative; min-height: 0; height: 100%; overflow: hidden; } .fb-tree > .sec { height: 100%; grid-template-rows: auto minmax(0, 1fr); padding: 6px 22px 0; }
.tree { position: relative; height: 100%; min-height: 300px; } .tree-stage { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; border-radius: var(--r-md); background: rgb(var(--lens) / .32); box-shadow: inset 0 0 0 1px rgb(var(--rim) / .07); outline: 0; } .tree-stage.is-dragging { cursor: grabbing; } .tree-stage:focus-visible { box-shadow: inset 0 0 0 2px rgb(var(--signal) / .6); }
.tree-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; } .tree-lines { position: absolute; left: 0; top: 0; overflow: visible; } .tree-lines path { fill: none; stroke: rgb(var(--signal) / .5); stroke-width: 1.6; } .tree-lines path.is-side { stroke: rgb(var(--agent) / .5); stroke-dasharray: 4 5; } .tree-lines path.is-dead { stroke: rgb(var(--ink-3) / .35); }
.tree-node { position: absolute; display: grid; align-content: center; gap: 2px; padding: 8px 14px; border: 0; border-radius: 16px; text-align: left; cursor: pointer; color: rgb(var(--ink)); background: linear-gradient(180deg, rgb(var(--glass) / .92), rgb(var(--lens) / .9)); box-shadow: inset 0 0 0 1px rgb(var(--signal) / .4), 0 6px 18px -10px rgb(0 0 0 / .8); font-family: var(--font-ui); overflow: hidden; }
.tree-node em { font: 400 11.5px/1.25 var(--font-ui); font-style: normal; color: rgb(var(--ink-2)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tree-node.is-pill { display: block; padding: 0 14px; border-radius: 15px; font: 500 12px/30px var(--font-label); letter-spacing: .02em; color: rgb(var(--ink-2)); background: rgb(var(--lens) / .7); box-shadow: inset 0 0 0 1px rgb(var(--agent) / .3); white-space: nowrap; text-overflow: ellipsis; }
.tree-node.is-photo::before, .tree-node.is-chemo::before, .tree-node.is-breather::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: rgb(var(--life) / .8); } .tree-node.is-chemo::before { background: rgb(var(--warm) / .85); } .tree-node.is-breather::before { background: rgb(var(--signal) / .85); }
.tree-fold { position: absolute; z-index: 1; min-width: 26px; height: 26px; padding: 0 6px; border: 0; border-radius: 13px; cursor: pointer; font: 600 12px/26px var(--font-label); color: rgb(var(--ink)); background: rgb(var(--lens)); box-shadow: inset 0 0 0 1px rgb(var(--signal) / .5); } .tree-fold:hover, .tree-fold.is-closed { box-shadow: inset 0 0 0 1px rgb(var(--signal) / .9); } .tree-fold:focus-visible { outline: 2px solid rgb(var(--signal) / .9); outline-offset: 2px; }
.tree-node b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tree-node span, .tree-node small { font-size: 11.5px; color: rgb(var(--ink-2)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tree-node small { color: rgb(var(--ink-3)); }
.tree-node:hover { box-shadow: inset 0 0 0 1px rgb(var(--signal) / .8), 0 0 18px -6px rgb(var(--signal) / .8); } .tree-node:focus-visible { outline: 2px solid rgb(var(--signal) / .9); outline-offset: 2px; }
.tree-node.is-variety { border-radius: 22px; padding: 4px 14px; box-shadow: inset 0 0 0 1px rgb(var(--agent) / .4); } .tree-node.is-variety b { font-size: 13px; font-weight: 500; } .tree-node.is-foreign { box-shadow: inset 0 0 0 1px rgb(var(--rim) / .22); } .tree-node.is-gone { opacity: .55; box-shadow: inset 0 0 0 1px rgb(var(--ink-3) / .3); } .tree-node.is-gone b { text-decoration: line-through; text-decoration-color: rgb(var(--ink-3) / .7); }
.tree-node.is-life { box-shadow: inset 0 0 0 1px rgb(var(--life) / .55); } .tree-node.is-warm { box-shadow: inset 0 0 0 1px rgb(var(--warm) / .55); } .tree-node.is-danger { box-shadow: inset 0 0 0 1px rgb(var(--danger) / .6); }
.tree-tools, .map-tools { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: var(--r-pill); z-index: 2; } .tree-empty { padding: var(--s-5); max-width: 56ch; }
/* The Waters */
#map { display: grid; grid-template-rows: auto minmax(0, 1fr); } .map-body { position: relative; min-height: 0; margin: 0 12px 12px; border-radius: var(--r-lg); overflow: hidden; background: rgb(var(--lens)); box-shadow: inset 0 0 0 1px rgb(var(--rim) / .1); }
.map-stage { position: absolute; inset: 0; cursor: grab; touch-action: none; outline: 0; overflow: hidden; } .map-stage:active { cursor: grabbing; } .map-stage:focus-visible { box-shadow: inset 0 0 0 2px rgb(var(--signal) / .6); } .map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; } .map-over { position: absolute; inset: 0; pointer-events: none; }
.map-info { margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: rgb(var(--ink-2)); }
.mp { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: rgb(var(--ink)); font: 500 12px/1.2 var(--font-label); white-space: nowrap; pointer-events: auto; text-shadow: 0 1px 3px rgb(0 0 0 / .9); } button.mp { cursor: pointer; } button.mp:focus-visible { outline: 2px solid rgb(var(--signal) / .9); outline-offset: 3px; border-radius: 10px; }
.mp-life { --k: var(--ink-2); transform: translate(-6px, -50%); } .mp-life i { display: block; flex: none; border-radius: 50%; background: rgb(var(--k) / .35); box-shadow: inset 0 0 0 1.5px rgb(var(--k)), 0 0 12px -2px rgb(var(--k) / .9); } .mp-life.is-life { --k: var(--life); } .mp-life.is-warm { --k: var(--warm); } .mp-life.is-danger { --k: var(--danger); } .mp-life.is-gone { --k: var(--ink-3); opacity: .6; }
.mp-event i { display: block; width: 9px; height: 9px; transform: rotate(45deg); border-radius: 2px; background: rgb(var(--signal)); box-shadow: 0 0 10px rgb(var(--signal)); } .mp-event.is-danger i { background: rgb(var(--danger)); box-shadow: 0 0 10px rgb(var(--danger)); } .mp-event { opacity: .6; } .mp-event.is-fresh { opacity: 1; }
.mp-event.is-danger.is-fresh::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; box-shadow: 0 0 0 1px rgb(var(--danger)); animation: mp-pulse 1.8s ease-out infinite; } @keyframes mp-pulse { to { transform: scale(4.2); opacity: 0; } } @media (prefers-reduced-motion: reduce) { .mp-event.is-danger.is-fresh::after { animation: none; } }
.mp-tag, .mp-lead { width: 28px; height: 28px; justify-content: center; border-radius: 50%; background: rgb(var(--lens) / .85); box-shadow: inset 0 0 0 1px rgb(var(--signal) / .6); color: rgb(var(--signal)); } .mp-lead { color: rgb(var(--agent)); box-shadow: inset 0 0 0 1px rgb(var(--agent) / .8), 0 0 16px -2px rgb(var(--agent)); }
.mp-me i { display: block; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 17px solid rgb(var(--ink)); filter: drop-shadow(0 0 6px rgb(var(--signal))); } .mp-me { z-index: 1; }
.mp-chron { display: grid; gap: 1px; justify-items: center; padding: 5px 10px; border-radius: 12px; background: rgb(var(--lens) / .72); box-shadow: inset 0 0 0 1px rgb(var(--rim) / .16); max-width: 190px; text-shadow: none; } .mp-chron b { font-weight: 600; max-width: 170px; overflow: hidden; text-overflow: ellipsis; } .mp-chron span { font-size: 10.5px; color: rgb(var(--ink-3)); max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.mp-go { position: absolute; transform: translate(-50%, calc(-100% - 14px)); display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r-md); width: 232px; pointer-events: auto; z-index: 3; } .mp-go .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .mp-go b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.map-note { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: min(520px, calc(100% - 24px)); margin: 0; padding: 8px 14px; border-radius: var(--r-md); z-index: 2; text-align: center; } .map-note[hidden] { display: none; }
.map-legend { position: absolute; left: 12px; bottom: 12px; max-width: min(330px, calc(100% - 24px)); padding: 8px 12px; border-radius: var(--r-md); z-index: 2; } .map-legend summary { cursor: pointer; list-style: none; } .map-legend summary::-webkit-details-marker { display: none; } .map-legend[open] summary { margin-bottom: 8px; }
.map-legend .lg { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: 12px; color: rgb(var(--ink-2)); } .map-legend .lg + .lg { margin-top: 8px; } .lk { display: inline-flex; align-items: center; gap: 6px; } .lk .sw { width: 12px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgb(var(--rim) / .2); }
.lk .ev { width: 8px; height: 8px; transform: rotate(45deg); border-radius: 2px; background: rgb(var(--signal)); } .lk .ld { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgb(var(--agent)); } .lk .vt { width: 8px; height: 8px; border-radius: 50%; background: rgb(255 170 90); box-shadow: 0 0 8px rgb(255 150 70); } .lk .me { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 11px solid rgb(var(--ink)); }
/* Claude's lead: in the bar and at the top of the view */
#status .lead .tg-i { color: rgb(var(--agent)); } #status .lead { box-shadow: inset 0 0 0 1px rgb(var(--agent) / .5), 0 0 16px -6px rgb(var(--agent)); }
#lead { position: absolute; top: calc(var(--top) + 6px); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); white-space: nowrap; color: rgb(var(--agent)); pointer-events: none; transition: left var(--t-base) var(--ease-settle); } #lead[hidden] { display: none; }
#lead .tg-data { font-size: 12.5px; color: rgb(var(--ink)); } #lead .tg-label { font-size: 11px; } #lead.is-left::before, #lead.is-right::after { content: ""; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; } #lead.is-left::before { border-right: 7px solid rgb(var(--agent)); position: static; background: none; } #lead.is-right::after { border-left: 7px solid rgb(var(--agent)); position: static; background: none; }
.su-nokey { margin: 0; }
@media (max-width: 900px) { .fb-life { grid-template-columns: 1fr; } .descent { grid-template-columns: 72px minmax(0, 1fr); } .descent > .tg-specimen, .descent > .view { width: 72px; } }
@media (max-width: 620px) { .map-body { margin: 0 6px 6px; } .map-info { display: none; } .variety { grid-template-columns: 16px minmax(0, 1fr); } .variety .tg-small { grid-column: 2; } .chron-grid { grid-template-columns: 1fr; } .fb-tree > .sec { padding: 4px 10px 0; } .mp-chron { max-width: 130px; } .mp-chron b, .mp-chron span { max-width: 112px; } .map-legend { max-width: calc(100% - 150px); } #lead .tg-label { display: none; } }
@media (max-height: 520px) { .map-body { margin: 0 8px 8px; } .map-legend:not([open]) { padding: 5px 10px; } .tree { min-height: 180px; } }
.life { text-align: left; } #nav button { white-space: nowrap; } @media (max-width: 1400px) { #nav .tg-kbd { display: none; } #status .lead .tg-label { display: none; } }
.tg-item { position: relative; } .tg-item > .health-dot { position: absolute; right: 14px; top: 17px; margin: 0; }
.mp-go.tg-raised { background: linear-gradient(180deg, rgb(var(--glass) / .97), rgb(var(--lens) / .97)); box-shadow: inset 0 0 0 1px rgb(var(--rim) / .2), 0 14px 34px -14px rgb(0 0 0 / .9); } .mp-go .tg-small { color: rgb(var(--ink-2)); }
#lead { border: 0; cursor: pointer; pointer-events: auto; font: inherit; } @media (max-width: 620px) { #status .lead { display: none; } #lead { top: calc(var(--top) + 2px); } }
/* the lens: an optical zoom on the eye */
#lens { position: fixed; inset: 0; pointer-events: none; transition: opacity var(--t-base); background: radial-gradient(circle at 50% 50%, transparent 0, transparent calc(min(50vw, 50vh) * .9 - 2px), rgb(var(--rim) / .16) calc(min(50vw, 50vh) * .9), rgb(4 14 18 / .16) calc(min(50vw, 50vh) * .9 + 3px), rgb(4 14 18 / .32) 100%); } #lens[hidden] { display: none; }
#mag { position: absolute; left: 72px; top: 44px; padding: 3px 9px; border-radius: var(--r-pill); font-size: 12.5px; color: rgb(var(--ink)); background: rgb(var(--lens) / .6); box-shadow: inset 0 0 0 1px rgb(var(--signal) / .4); white-space: nowrap; } #mag[hidden], #scale[hidden] { display: none; }
#scale { position: absolute; top: 84px; left: 0; transform: translateX(-50%); height: 7px; border-radius: 0 0 4px 4px; box-shadow: inset 0 -2px 0 rgb(var(--ink) / .95), inset 2px 0 0 rgb(var(--ink) / .95), inset -2px 0 0 rgb(var(--ink) / .95); filter: drop-shadow(0 1px 2px rgb(0 0 0 / .8)); }
#scale::after { content: attr(data-len); position: absolute; left: 50%; top: 10px; transform: translateX(-50%); font: 500 11.5px/1 var(--font-data); color: rgb(var(--ink)); white-space: nowrap; text-shadow: 0 1px 3px rgb(0 0 0 / .9); }
#reticle.is-mag { opacity: .55; } .lensbtn .tg-i { color: rgb(var(--signal)); }
@media (max-width: 620px) { #mag { left: 56px; top: 34px; } #scale { top: 66px; } #target { top: 96px; } } @media (max-height: 520px) { #mag { left: 50px; top: 30px; } #scale { top: 58px; } }

/* ---- the ocean's ages (bar chip, readings pane, the Chronicles' History) and devices (set-up, the opening screen) ---- */
#status .where .region .age { color: rgb(var(--ink-2, var(--ink)) / .72); text-transform: none; letter-spacing: .02em; }
.wb-age { display: flex; gap: var(--s-3); align-items: flex-start; margin-top: var(--s-3); } .wb-age > div { display: grid; gap: 2px; min-width: 0; } .wb-age .tg-i { flex: none; color: rgb(var(--life)); margin-top: 2px; }
.ag-strip { gap: var(--s-2); margin-bottom: var(--s-4); } .ag-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); flex-wrap: wrap; }
.ag-line { list-style: none; margin: 0; padding: 4px 2px 6px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: 0; overflow-x: auto; scrollbar-width: none; }
.ag-age { position: relative; display: grid; gap: 3px; padding: 18px 10px 0 0; min-width: 0; }
.ag-age::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: rgb(var(--rim) / .14); }
.ag-age.is-past::before, .ag-age.is-now::before { background: linear-gradient(90deg, rgb(var(--life) / .7), rgb(var(--life) / .45)); } .ag-age.is-now::before { background: linear-gradient(90deg, rgb(var(--life) / .7), rgb(var(--rim) / .14) 60%); }
.ag-dot { position: absolute; left: 0; top: 1px; width: 12px; height: 12px; border-radius: 50%; background: rgb(var(--lens)); box-shadow: inset 0 0 0 2px rgb(var(--rim) / .3); }
.ag-age.is-past .ag-dot { background: rgb(var(--life) / .8); box-shadow: none; } .ag-age.is-now .ag-dot { background: rgb(var(--life)); box-shadow: 0 0 0 4px rgb(var(--life) / .22), 0 0 14px rgb(var(--life) / .6); }
.ag-age b { font-weight: 600; font-size: 14px; line-height: 1.25; } .ag-age.is-ahead b, .ag-age.is-future b { color: rgb(var(--ink) / .55); font-weight: 500; } .ag-age.is-future b { font-style: italic; }
.ag-age .tg-small { line-height: 1.35; } .ag-age.is-ahead .tg-small { color: rgb(var(--ink) / .45); }
.su-devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .su-devices li { display: flex; gap: 10px; align-items: center; } .su-devices .tg-i { color: rgb(var(--ink) / .6); }
.su-pair { display: grid; gap: var(--s-2); padding: var(--s-4); border-radius: var(--r-lg); background: rgb(var(--rim) / .05); box-shadow: inset 0 0 0 1px rgb(var(--rim) / .12); min-width: 0; }
.su-paircode { font-size: clamp(28px, 7vw, 40px); letter-spacing: .14em; line-height: 1.1; word-break: break-all; user-select: all; }
.su-rec .su-paircode { font-size: clamp(22px, 5.4vw, 32px); }
.su-copyonly { width: auto; padding: 0; background: none; box-shadow: none; }
.su-claim { display: grid; gap: var(--s-2); min-width: 0; } .su-claimrow { display: flex; gap: var(--s-2); flex-wrap: wrap; } .su-claimrow .tg-input { flex: 1 1 200px; min-width: 0; }
.su-code { font-family: var(--font-data); letter-spacing: .12em; text-transform: uppercase; font-size: 18px; }
.su-err { color: rgb(var(--warm)); margin: 0; min-height: 0; } .su-err:empty, .su-said:empty { display: none; } .su-said { margin: 0; }
.su-masked { font-size: inherit; }
.su-welcome { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: var(--s-4); background: radial-gradient(120% 90% at 50% 30%, rgb(var(--sea, var(--lens)) / .35), rgb(var(--lens) / .92)); overflow-y: auto; }
.su-welcome-card { width: min(520px, 100%); display: grid; gap: var(--s-4); padding: var(--s-6) var(--s-5); border-radius: var(--r-xl); text-align: left; }
.su-welcome-h { margin: 0; font: 300 clamp(26px, 5vw, 34px)/1.15 var(--font-label); letter-spacing: .02em; }
.su-welcome-acts { display: flex; gap: var(--s-3); flex-wrap: wrap; } .su-welcome-acts .tg-btn { flex: 1 1 180px; justify-content: center; }
@media (max-width: 520px) { .su-welcome-card { padding: var(--s-5) var(--s-4); } .ag-line { grid-auto-columns: minmax(104px, 1fr); } }

/* ---- genes (docs/genes.md section 6): the genome as cards in the Cradle. minmax(0, 1fr) so a card cannot push its grid wider than the tank. ---- */
.genome { width: 100%; max-width: 1100px; display: grid; gap: var(--s-3); text-align: left; min-width: 0; }
.genome-head { display: flex; flex-wrap: wrap; gap: 4px var(--s-3); align-items: baseline; justify-content: space-between; min-width: 0; }
.genes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); align-items: start; min-width: 0; }
.gene { display: grid; gap: 8px; padding: 14px; border-radius: var(--r-md, 14px); min-width: 0; align-content: start; }
.gene-head { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; min-width: 0; } .gene-head .tg-label { min-width: 0; overflow-wrap: anywhere; }
.gene-state { flex: none; max-width: 60%; font: 600 11px/1.3 var(--font-label); letter-spacing: .06em; text-transform: uppercase; color: rgb(var(--life)); text-align: right; overflow-wrap: anywhere; }
.gene.is-core .gene-state { color: rgb(var(--ink-3)); } .gene.is-conditional .gene-state { color: rgb(var(--agent)); } .gene.is-dormant .gene-state { color: rgb(var(--ink-3)); } .gene.is-broken .gene-state { color: rgb(var(--danger)); }
.gene.is-dormant, .gene.is-broken { opacity: .78; }
.gene-id { font-size: 13px; color: rgb(var(--ink-2)); overflow-wrap: anywhere; }
.gene-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: var(--s-3); align-items: center; min-width: 0; } .gene-row .tg-data { text-align: right; font-size: 13.5px; }
.gene-does { margin: 0; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.gene-mark { margin: 0; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 12.5px; line-height: 1.4; color: rgb(var(--ink-2)); } .gene-mark .tg-i { margin-top: 2px; } .gene-mark.is-hit { color: rgb(var(--warm)); } .gene-mark.is-from { color: rgb(var(--agent)); }
.gene .tg-btn { justify-self: start; max-width: 100%; white-space: normal; height: auto; min-height: var(--h); text-align: left; }
.splice-bar { display: grid; gap: var(--s-3); padding: 14px; border-radius: var(--r-md, 14px); background: rgb(var(--glow) / .06); min-width: 0; }
.forecast { display: grid; gap: var(--s-3); min-width: 0; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 56px; padding: 4px 0; border-bottom: 1px solid rgb(var(--ink-3) / .4); } .spark i { flex: 1 1 0; min-width: 0; border-radius: 2px 2px 0 0; background: rgb(var(--signal) / .75); }
@media (max-width: 1180px) { .genes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .genes { grid-template-columns: minmax(0, 1fr); } .gene { padding: 12px; } }

/* ---- the splice flow and the genome strip (ui/genes.js): components that fill whatever container they are given ---- */
.genome-bar { width: 100%; max-width: 1100px; display: grid; gap: var(--s-3); padding: 14px 16px; border-radius: var(--r-md); background: rgb(var(--glow) / .06); text-align: left; min-width: 0; }
.genome-acts { align-items: center; gap: var(--s-3); } .genome-acts .tg-small { flex: 1 1 220px; min-width: 0; }
.chain-wrap { display: grid; gap: 6px; min-width: 0; } .chain-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; } .chain-end { font-size: 12px; color: rgb(var(--ink-3)); }
.chain { position: relative; height: 36px; border-radius: 18px; background: linear-gradient(rgb(var(--ink-3) / .3), rgb(var(--ink-3) / .3)) center / 100% 2px no-repeat, rgb(0 0 0 / .22); min-width: 0; margin: 0 8px; }
.chain.is-armed { height: 48px; cursor: copy; touch-action: none; outline: 1px dashed rgb(var(--signal) / .6); } .chain.is-armed:focus-visible { outline: 2px solid rgb(var(--signal)); outline-offset: 2px; }
.bead { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; padding: 0; border: 2px solid rgb(0 0 0 / .45); border-radius: 50%; background: rgb(var(--life)); cursor: pointer; }
.bead::after { content: ""; position: absolute; inset: -9px -5px; }   /* a finger-sized target round a small bead */
.bead.is-core { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: rgb(var(--ink-2) / .7); } .bead.is-broken { background: rgb(var(--danger) / .85); } .bead.is-dormant { background: transparent; border-color: rgb(var(--life)); }
.bead:focus-visible { outline: 2px solid rgb(var(--signal)); outline-offset: 2px; }
.chain.is-armed .bead { cursor: copy; opacity: .5; } .chain.is-armed .bead.is-match { opacity: 1; width: 18px; height: 18px; margin: -9px 0 0 -9px; box-shadow: 0 0 0 3px rgb(var(--signal) / .45); }
.chain.is-armed .bead.is-over { box-shadow: 0 0 0 4px rgb(var(--warm)), 0 0 14px rgb(var(--warm) / .9); }
.gland { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: rgb(var(--warm)); box-shadow: 0 0 10px rgb(var(--warm) / .9); pointer-events: none; } .gland::before { content: ""; position: absolute; left: -5px; top: -5px; border: 6px solid transparent; border-top-color: rgb(var(--warm)); } .gland[hidden] { display: none; }
.chain-say { margin: 0; min-height: 1.45em; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; } .chain-say b { color: rgb(var(--ink)); }
.sec { display: grid; gap: var(--s-3); border-radius: var(--r-sm); padding: 10px 12px; background: rgb(0 0 0 / .14); min-width: 0; } .sec > p { margin: 0; } .sec.pv, .sec.egg { background: rgb(var(--glow) / .09); outline: 1px solid rgb(var(--signal) / .5); scroll-margin-bottom: 12px; }
.sec.pal { scroll-margin-top: 12px; } .browse > summary { cursor: pointer; font: 600 12px/1.6 var(--font-label); letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--ink-2)); }
.ptray { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.pchip-wrap { display: inline-flex; align-items: stretch; gap: 2px; max-width: 100%; min-width: 0; } .pchip-wrap.is-locked { gap: 8px; align-items: center; }
.pchip { display: grid; gap: 1px; text-align: left; padding: 7px 12px; border-radius: 10px 0 0 10px; border: 1px solid rgb(var(--ink-3) / .45); background: rgb(var(--glow) / .08); color: rgb(var(--ink)); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; min-width: 0; font: inherit; }
.pchip b { font: 600 13px/1.3 var(--font-label); letter-spacing: .04em; display: flex; gap: 6px; align-items: center; } .pchip span { font-size: 12px; color: rgb(var(--ink-2)); overflow-wrap: anywhere; }
.pchip.is-armed { border-color: rgb(var(--signal)); background: rgb(var(--signal) / .2); box-shadow: 0 0 0 2px rgb(var(--signal) / .35); } .pchip:focus-visible { outline: 2px solid rgb(var(--signal)); outline-offset: 2px; }
.pchip.is-locked { cursor: default; border-style: dashed; border-radius: 10px; opacity: .85; }
.pchip-x { padding: 0 9px; border: 1px solid rgb(var(--ink-3) / .45); border-left: 0; border-radius: 0 10px 10px 0; background: transparent; color: rgb(var(--ink-2)); font-size: 16px; cursor: pointer; } .pchip-x:hover { color: rgb(var(--ink)); }
.chip-ghost { position: fixed; background: rgb(8 30 40); z-index: 9999; pointer-events: none; transform: translate(-50%, -155%); opacity: .92; border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .5); cursor: grabbing; }
.splice-flow { width: 100%; max-width: 1100px; display: grid; gap: var(--s-3); padding: 16px; border-radius: var(--r-md); border: 1px solid rgb(var(--signal) / .35); background: rgb(var(--glow) / .05); text-align: left; min-width: 0; scroll-margin-top: 12px; } .splice-flow[hidden] { display: none; }
.flow-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.how { border-radius: var(--r-sm); background: rgb(0 0 0 / .18); padding: 8px 12px; } .how summary { cursor: pointer; font: 600 12px/1.6 var(--font-label); letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--ink-2)); } .how p { margin: 6px 0 2px; }
.gene.is-chosen { outline: 2px solid rgb(var(--signal)); } .gene.is-wild { border-style: dashed; }
.land-notes { display: grid; gap: 6px; min-height: 3em; } .land-notes p { margin: 0; } .land-at .tg-data { font-size: 17px; }
.preview { display: grid; gap: 10px; } .pv-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 14px; align-items: start; } .pv-row > .tg-label { padding-top: 3px; } .pv-row p { margin: 0; } .pv-row > :nth-child(n + 3) { grid-column: 2; }
.bench-say { margin: 0; color: rgb(var(--ink)); }
@media (max-width: 760px) { .pv-row { grid-template-columns: minmax(0, 1fr); } .pv-row > :nth-child(n + 3) { grid-column: 1; } .genome-bar, .splice-flow { padding: 12px; } }
/* The Cradle's shelf of eggs (ui/shelf.js), the tank as a place to drop one, and the views of one creature */
.shelf { display: grid; gap: var(--s-2) !important; } .shelf-head { display: flex; gap: 8px; align-items: center; color: rgb(var(--life)); } .shelf > .tg-label:not(.shelf-head) { margin-top: var(--s-2); color: rgb(var(--ink-3)); }
.egg { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 14px; text-align: left; cursor: grab; color: rgb(var(--ink)); background: rgb(var(--lens) / .55); box-shadow: inset 0 0 0 1px rgb(var(--rim) / .12); font-family: var(--font-ui); touch-action: none; user-select: none; }
.egg:hover { box-shadow: inset 0 0 0 1px rgb(var(--signal) / .6); } .egg:focus-visible { outline: 2px solid rgb(var(--signal) / .9); outline-offset: 2px; } .egg.is-on { box-shadow: inset 0 0 0 1.5px rgb(var(--signal) / .9); background: rgb(var(--signal) / .1); }
.egg-text { display: grid; gap: 1px; min-width: 0; } .egg-text b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .egg-text .tg-small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.egg.is-carried { box-shadow: inset 0 0 0 1px rgb(var(--life) / .7); } .egg.is-carried .tg-small { color: rgb(var(--life)); } .egg.is-blocked .tg-small { color: rgb(var(--warm)); } .egg.is-released { opacity: .5; cursor: default; } .egg.is-dragging { opacity: .45; } .egg-by { color: rgb(var(--agent)); display: flex; }
.egg-ghost { position: fixed; left: 0; top: 0; z-index: 50; display: flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 14px; pointer-events: none; font: 600 14px var(--font-ui); color: rgb(var(--ink)); box-shadow: inset 0 0 0 1px rgb(var(--signal) / .8), 0 10px 24px -10px rgb(0 0 0 / .9); }
#tank.is-drop { box-shadow: inset 0 0 0 2px rgb(var(--signal) / .35); } #tank.is-over { box-shadow: inset 0 0 0 2px rgb(var(--signal) / .95); }
.cr-tabs { justify-self: center; } .cr-view { display: grid; gap: var(--s-4); width: 100%; max-width: 800px; justify-items: center; } .cr-view > .tg-field, .cr-view > .pick { width: 100%; } .solo > .tg-pane { width: 100%; max-width: 800px; padding: 22px; display: grid; gap: var(--s-4); }
.solo .choice .tg-specimen { max-width: 520px; }   /* the tank leaves room for the view under it */
/* Watch mode (ui/watch.js): the reticle, its label and the lens ring are the film's caption. They fade in when the eye has closed on one, and out before it leaves. */
html[data-watch] #aim, html[data-watch] #lens { opacity: 0; transition: opacity 1.1s ease; } html[data-watch][data-info] #aim, html[data-watch][data-info] #lens { opacity: 1; }
html[data-watch] #target { left: var(--watch-off, 86px); } #watchNote { position: absolute; left: calc(var(--watch-off, 86px) + 14px); top: 50px; white-space: nowrap; font: 500 12.5px var(--font-data, var(--font-ui)); letter-spacing: .04em; color: rgb(var(--ink-2)); } html:not([data-watch]) #watchNote { display: none; }
#watchNote { white-space: normal !important; width: max-content; max-width: min(320px, 34vw); line-height: 1.35; }
#watchBar { position: fixed; z-index: 8; left: 50%; transform: translateX(-50%); top: calc(var(--m) / 2 + env(safe-area-inset-top, 0px)); width: var(--shell-w); min-height: var(--bar-h); display: flex; align-items: center; gap: var(--s-4); padding: 0 var(--s-5); border-radius: var(--r-lg); opacity: 0; transition: opacity 1.8s ease; pointer-events: none; }
#watchBar.is-on { opacity: 1; } #watchBar .wh { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 4px var(--s-5); padding: 8px 0; white-space: nowrap; } #watchBar .wh-g { display: inline-flex; align-items: baseline; gap: var(--s-2); } #watchBar .wh-g[hidden] { display: none; }
#watchBar .tg-data { font-size: 13.5px; color: rgb(var(--ink)); } #watchBar .tg-label { font-size: 11.5px; } #watchBar .age { text-transform: none; letter-spacing: .02em; color: rgb(var(--ink-2)); } #watchBar .sep { color: rgb(var(--ink-2)); }
@media (max-width: 900px) { #watchBar { padding: 0 var(--s-3); } #watchBar .wh { justify-content: center; margin: 0 auto; } }
#watchLine { position: fixed; left: 50%; bottom: max(40px, 7vh); transform: translateX(-50%); z-index: 6; max-width: 80vw; text-align: center; font: 500 14px var(--font-label); letter-spacing: .14em; text-transform: uppercase; color: rgb(var(--ink)); opacity: 0; transition: opacity 1.2s ease; pointer-events: none; } #watchLine.is-on { opacity: .92; }
/* The easy entry (ui/entry.js): a new visitor's first steps. data-entry on the root is the step; each step shows a little more of the game. */
#opening { position: fixed; left: 50%; bottom: max(28px, 6vh); transform: translate(-50%, 12px); z-index: 30; width: min(420px, calc(100vw - 32px)); display: grid; gap: 10px; justify-items: center; text-align: center; padding: 18px 22px; opacity: 0; pointer-events: none; transition: opacity 1.6s ease, transform 1.6s ease; } #opening.is-in { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; } #opening[hidden] { display: none; } html[data-opening] #watchLine { display: none; }
#entry { position: fixed; left: 50%; bottom: max(28px, 5vh); transform: translate(-50%, 12px); z-index: 30; width: min(440px, calc(100vw - 32px)); display: grid; gap: 10px; justify-items: center; text-align: center; padding: 22px 24px; opacity: 0; transition: opacity .8s ease, transform .8s ease; }
#entry.is-in { opacity: 1; transform: translate(-50%, 0); } #entry[hidden] { display: none; }
.entry-head { display: flex; gap: 8px; align-items: center; color: rgb(var(--life)); } .entry-name { font: 600 22px/1.15 var(--font-label); letter-spacing: .06em; text-transform: uppercase; }
.entry-line { margin: 0; font-size: 15px; line-height: 1.5; color: rgb(var(--ink-2)); } .entry-tip { margin: 0; font-size: 12.5px; color: rgb(var(--ink-3)); } .entry-err { margin: 0; font-size: 13.5px; color: rgb(var(--warm)); }
.entry-skip { border: 0; background: none; cursor: pointer; padding: 4px 8px; font: 500 12.5px var(--font-ui); color: rgb(var(--ink-3)); text-decoration: underline; text-underline-offset: 3px; } .entry-skip:hover, .entry-skip:focus-visible { color: rgb(var(--ink)); }
html[data-entry="0"] #bar, html[data-entry="0"] #br, html[data-entry="0"] #lead, html[data-entry="0"] #prompt, html[data-entry="0"] #hint, html[data-entry="0"] #toasts, html[data-entry="0"] #perf { display: none !important; }
html[data-entry="1"] #nav button:not([data-to="ocean"]):not([data-to="book"]), html[data-entry="2"] #nav button:not([data-to="ocean"]):not([data-to="book"]):not([data-to="map"]), html[data-entry="3"] #nav button[data-to="setup"] { display: none !important; }
html[data-entry="1"] #lead, html[data-entry="2"] #lead { display: none !important; }
#entry { padding: 16px 20px; gap: 8px; } .entry-line { font-size: 14px; } html[data-entry] #prompt { display: none !important; }
@media (max-height: 720px) { #entry { bottom: 14px; } .entry-name { font-size: 18px; } }

.fb-pop { display: block; width: 100%; height: 120px; } .fb-pop-line { fill: none; stroke: rgb(var(--signal)); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; } .fb-pop-fill { fill: rgb(var(--signal) / .14); stroke: none; } .fb-pop-key { display: flex; justify-content: space-between; gap: 12px; margin: 4px 0 0; }
body:has(#prep:not([hidden])) #bar, body:has(#prep:not([hidden])) #br { visibility: hidden; }   /* nothing of the game's furniture while the loading card is up: an empty bar and a sweeping sonar over black looked broken */
