@font-face{font-family:'Archivo';font-style:normal;font-display:swap;font-weight:100 900;font-stretch:62% 125%;src:url(../fonts/archivo-latin-ext-standard-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Archivo';font-style:normal;font-display:swap;font-weight:100 900;font-stretch:62% 125%;src:url(../fonts/archivo-latin-standard-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Archivo';font-style:italic;font-display:swap;font-weight:100 900;font-stretch:62% 125%;src:url(../fonts/archivo-latin-ext-standard-italic.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Archivo';font-style:italic;font-display:swap;font-weight:100 900;font-stretch:62% 125%;src:url(../fonts/archivo-latin-standard-italic.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Martian Mono';font-style:normal;font-display:swap;font-weight:100 800;font-stretch:75% 112.5%;src:url(../fonts/martian-mono-latin-ext-standard-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Martian Mono';font-style:normal;font-display:swap;font-weight:100 800;font-stretch:75% 112.5%;src:url(../fonts/martian-mono-latin-standard-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Martian Mono Narrow';font-style:normal;font-display:swap;font-weight:100 800;font-stretch:75% 80%;src:url(../fonts/martian-mono-latin-ext-standard-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Martian Mono Narrow';font-style:normal;font-display:swap;font-weight:100 800;font-stretch:75% 80%;src:url(../fonts/martian-mono-latin-standard-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  color-scheme: dark;
  --stage-0: #05090B;
  --stage-1: #0A1115;
  --stage-2: #16242A;
  --ink: #E6EEEC;
  --ink-2: #AEBEC0;
  --ink-3: #7E9195;
  --ink-4: #5A6B6F;
  --line: rgba(230, 238, 236, 0.09);
  --line-2: rgba(230, 238, 236, 0.17);
  --glass: rgba(7, 13, 16, 0.76);
  --glass-2: rgba(10, 18, 22, 0.88);
  --nissl: #2EA88D;
  --nissl-2: #6EC9B4;
  --nissl-ink: #03211D;
  --logo-a: #F2F6F5;
  --logo-b: #269F8F;
  --tissue: #e6b3a3;
  --radius: 14px;
  --f-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-serif: 'Archivo', system-ui, sans-serif;
  --f-mono: 'Martian Mono Narrow', 'Martian Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--stage-0); color: var(--ink); font-family: var(--f-sans); font-size: 14px; overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--nissl); outline-offset: 2px; }
.stage { position: fixed; inset: 0; background: radial-gradient(115% 85% at 56% 42%, #17262c 0%, #0A1115 46%, #05090B 100%); }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 45% at 56% 88%, rgba(0,0,0,0) 0%, rgba(0,0,0,.35) 100%); mix-blend-mode: multiply; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: grab; }
#gl:active { cursor: grabbing; }

/* ---------- brand ---------- */
.brand { position: fixed; top: calc(18px + env(safe-area-inset-top, 0px)); left: 20px; z-index: 5; display: flex; align-items: flex-start; gap: 12px; }
.brand-col { display: grid; gap: 5px; }
.brand-top { display: flex; align-items: center; gap: 12px; }
.brand-home { display: block; line-height: 0; }
.brand-home svg { display: block; height: 17px; width: auto; aspect-ratio: 4722 / 1026; }
.brand h1 { margin: 3px 0 0; font-family: var(--f-sans); font-weight: 800; font-stretch: 64%; font-size: 30px; line-height: .92; letter-spacing: -0.005em; text-transform: uppercase; }
.brand-back { font: 500 9.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); text-decoration: none; padding: 3px 0; }
.brand-back:hover { color: var(--nissl); }
.brand .sub { margin-top: 0; font: 500 10.5px/1.45 var(--f-mono); letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); }
.brand .sub b { color: var(--ink-2); font-weight: 500; }
.icon-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); display: grid; place-items: center; font: 500 13px var(--f-serif); font-style: italic; flex: none; }
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }

/* ---------- panels ---------- */
.panel { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15); box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.eyebrow { font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }

#browser { position: fixed; z-index: 4; left: 16px; top: 108px; bottom: 96px; width: 292px; display: flex; flex-direction: column; overflow: hidden; }
#browser .hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px; gap: 8px; }
#browser .hd .count { font: 400 11px var(--f-mono); color: var(--ink-4); white-space: nowrap; }
.search { margin: 0 12px 8px; position: relative; }
.search input { width: 100%; box-sizing: border-box; padding: 9px 12px 9px 32px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.035); font-size: 13.5px; }
.search input::placeholder { color: var(--ink-4); }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; stroke: var(--ink-3); }
#list { flex: 1; overflow-y: auto; padding: 2px 6px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
.grp { margin-top: 6px; }
.grp-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 8px 6px; border: 0; background: none; text-align: left; font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); }
.grp-h .dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.grp-h .n { margin-left: auto; color: var(--ink-4); letter-spacing: 0; }
.grp-h .chev { width: 10px; height: 10px; stroke: var(--ink-4); transition: transform .2s; }
.grp.closed .chev { transform: rotate(-90deg); }
.grp.closed .items { display: none; }
.item { display: grid; grid-template-columns: 10px 1fr; column-gap: 10px; align-items: baseline; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; text-align: left; }
.item .sw { width: 10px; height: 10px; border-radius: 3px; align-self: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.item .t { font-size: 13.5px; line-height: 1.25; color: var(--ink); }
.item .l { grid-column: 2; font: italic 400 12.5px/1.25 var(--f-serif); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item:hover { background: rgba(255,255,255,.05); }
.item[aria-current="true"] { background: rgba(46, 168, 141,.14); box-shadow: inset 0 0 0 1px rgba(46, 168, 141,.38); }
.empty { padding: 18px 12px; color: var(--ink-3); font-size: 13px; }

/* ---------- info card ---------- */
#info { position: fixed; z-index: 6; right: 16px; top: 18px; width: 384px; max-height: calc(100% - 128px); overflow-y: auto; padding: 18px 18px 16px; scrollbar-width: thin; }
#info .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: relative; padding-right: 38px; min-height: 28px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line-2); font: 500 11px/1 var(--f-mono); letter-spacing: 0.06em; color: var(--ink-2); }
.chip .dot { width: 7px; height: 7px; border-radius: 2px; }
#info .close { position: absolute; right: 0; top: 0; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink-3); display: grid; place-items: center; }
#info .close:hover { color: var(--ink); }
#info h2 { margin: 14px 0 2px; font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
#info .latin { font: italic 400 17px/1.3 var(--f-serif); color: var(--tissue); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 14px 0 4px; border-radius: 10px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.fact { background: rgba(14,11,13,.75); padding: 9px 10px; min-width: 0; }
.fact .k { font: 500 10px/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); }
.fact .v { margin-top: 5px; font: 500 13px/1.25 var(--f-mono); color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fact.wide { grid-column: 1 / -1; }
#info h3 { margin: 16px 0 6px; font: 500 10.5px/1 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
#info p { margin: 0; font-size: 14px; line-height: 1.58; color: var(--ink-2); }
#info .actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); font-size: 13px; font-weight: 500; }
.btn:hover { background: rgba(255,255,255,.08); }
.btn[aria-pressed="true"] { background: var(--nissl); color: var(--nissl-ink); border-color: var(--nissl); }
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; }

/* ---------- dock ---------- */
#dock { position: fixed; z-index: 7; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 7px; max-width: calc(100% - 32px); box-sizing: border-box; }
.seg { display: flex; padding: 3px; gap: 2px; border-radius: 11px; background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 7px 11px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #181214; }
.sep { width: 1px; height: 26px; background: var(--line-2); margin: 0 4px; flex: none; }
.views { display: flex; gap: 2px; }
.views button, .tool { border: 0; background: none; padding: 7px 9px; border-radius: 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.views button:hover, .tool:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.tool { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.tool svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.tool[aria-expanded="true"], .tool.on { color: var(--nissl); }
.tool.on::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--nissl); }
.only-mobile { display: none; }

.pop { position: fixed; z-index: 8; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); width: 300px; padding: 14px; box-sizing: border-box; }
.pop h4 { margin: 0 0 10px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; }
.row label { font-size: 13.5px; color: var(--ink); }
.switch { position: relative; width: 34px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.14); transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform .15s; }
.switch input:checked + span { background: var(--nissl-2); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--nissl); outline-offset: 2px; }
.slider { padding: 8px 0 4px; }
.slider .lab { display: flex; justify-content: space-between; font-size: 13.5px; }
.slider .lab output { font: 500 12px var(--f-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; margin: 10px 0 2px; accent-color: var(--nissl); }
.pop .seg { margin: 4px 0 8px; }
.pop .seg button { flex: 1; padding: 7px 6px; }
.hint { font-size: 12px; line-height: 1.5; color: var(--ink-3); margin: 8px 0 0; }
.vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vgrid button { padding: 10px 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-size: 13.5px; }
.vgrid button:hover { background: rgba(255,255,255,.08); }
.pop .btn { width: 100%; justify-content: center; margin-top: 6px; }


/* ---------- chapters ---------- */
.chapters { position: fixed; z-index: 6; top: calc(16px + env(safe-area-inset-top, 0px)); left: 262px; display: flex; gap: 2px; padding: 4px; border-radius: 13px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.chapters button { border: 0; background: none; padding: 8px 13px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.chapters button:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.chapters button[aria-selected="true"] { background: var(--nissl); color: var(--nissl-ink); }
#info { top: 80px; max-height: calc(100% - 190px); box-sizing: border-box; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 5px 9px; border-radius: 2px; background: rgba(46, 168, 141,.10); border: 1px solid rgba(46, 168, 141,.26); font-size: 12.5px; line-height: 1.3; color: var(--ink); }
.blist { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.blist li { margin: 3px 0; }
.blist b { color: var(--ink); font-weight: 500; }
#info .foot { margin-top: 14px; font-size: 12px; line-height: 1.5; color: var(--ink-4); }
#labels { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
#labels .lab { position: absolute; left: 0; top: 0; margin: -9px 0 0 7px; padding: 2px 6px; border-radius: 6px; font: 600 11px/1.3 var(--f-mono); letter-spacing: .03em; color: #fff; background: rgba(12,9,11,.62); border-left: 2px solid var(--c, var(--nissl)); white-space: nowrap; transition: opacity .15s; }
#labels .lab.dot { margin: -9px 0 0 -12px; border-left: 0; background: rgba(12,9,11,.55); }
#labels .lab.big { font-size: 12.5px; }
.lblock[hidden] { display: none; }

/* ---------- EEG panel ---------- */
#eeg { position: fixed; z-index: 4; left: 324px; right: 16px; bottom: 96px; height: 286px; display: flex; flex-direction: column; padding: 10px 12px 8px; box-sizing: border-box; }
.eeg-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eeg-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin-right: auto; }
.eeg-title b { font-size: 14.5px; font-weight: 600; }
#eeg .seg button { padding: 5px 9px; font-size: 12.5px; }
#eeg .seg button .gl { font-family: var(--f-serif); font-style: italic; font-size: 15px; margin-right: 3px; }
#eegCanvas { flex: 1; width: 100%; min-height: 0; margin-top: 6px; display: block; }
.eeg-ft { display: flex; gap: 14px; font: 500 10.5px var(--f-mono); color: var(--ink-3); letter-spacing: .04em; }
.eeg-ft #eegNote { margin-left: auto; color: var(--ink-4); text-align: right; }
body[data-ch="waves"] #info { max-height: calc(100% - 80px - 400px); min-height: 180px; }
body[data-ch="waves"] #gizmo { bottom: 396px; }

/* ---------- neuron membrane potential + synapse panels ---------- */
.side-panel { position: fixed; z-index: 4; right: 16px; bottom: 96px; width: 348px; padding: 12px 14px; box-sizing: border-box; }
.side-panel .hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.side-panel .hd b { font: 500 13px var(--f-mono); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
#vmCanvas { width: 100%; height: 118px; display: block; margin-top: 8px; }
.side-panel .acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.side-panel .acts .btn { padding: 7px 10px; font-size: 12.5px; }
.side-panel .hint { margin-top: 8px; }
body[data-ch="neuron"] #info, body.syn-view #info { max-height: calc(100% - 80px - 372px); min-height: 170px; }
body.syn-view #gizmo { display: none; }
.meters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.meter span { display: block; font: 500 10px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.meter i { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.meter i b { display: block; height: 100%; width: 0%; border-radius: 3px; background: var(--c, var(--nissl)); transition: width .12s linear; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.syn-step { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--ink); min-height: 3em; }
.syn-step b { color: var(--nissl); font-weight: 500; }

/* ---------- tooltip, gizmo, loader ---------- */
#tip { position: fixed; z-index: 9; left: 0; top: 0; pointer-events: none; padding: 8px 11px 9px; border-radius: 10px; background: rgba(12,9,11,.9); border: 1px solid var(--line-2); max-width: 280px; }
#tip .t { font-size: 13.5px; font-weight: 500; }
#tip .l { font: italic 400 13px/1.3 var(--f-serif); color: var(--tissue); }
#tip .m { margin-top: 4px; font: 500 10px/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
#gizmo { position: fixed; z-index: 3; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
#gizmo canvas { width: 84px; height: 84px; }
.scalebar { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font: 500 10.5px var(--f-mono); color: var(--ink-3); }
.scalebar i { display: block; height: 5px; border: 1px solid var(--ink-3); border-top: 0; }
#loader { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: radial-gradient(90% 70% at 50% 45%, #13211f 0%, #05090B 100%); transition: opacity .6s ease; }
#loader.done { opacity: 0; pointer-events: none; }
#loader .box { width: min(320px, 80vw); }
#loader .name { font: 800 44px/1 var(--f-sans); font-stretch: 64%; text-transform: uppercase; letter-spacing: -.005em; }
#loader .lg { display: block; width: 150px; margin-bottom: 18px; }
#loader .lg svg { display: block; width: 100%; height: auto; aspect-ratio: 4722 / 1026; }
#loader .msg { margin-top: 14px; font: 500 11px/1.5 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); min-height: 1.5em; }
#loader .bar { margin-top: 12px; height: 2px; background: rgba(255,255,255,.08); overflow: hidden; border-radius: 2px; }
#loader .bar i { display: block; height: 100%; width: 0%; background: var(--nissl); transition: width .25s ease; }
#loader .err { margin-top: 14px; font-size: 13.5px; line-height: 1.5; color: #f0b4a8; }
#about { position: fixed; z-index: 10; left: 16px; top: 104px; width: min(400px, calc(100% - 32px)); padding: 18px; box-sizing: border-box; }
#about p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
#about p b { color: var(--ink); font-weight: 500; }
#about .src { font: 400 11.5px/1.6 var(--f-mono); color: var(--ink-3); margin-top: 12px; }
.help { position: fixed; z-index: 3; left: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); font: 400 11px/1.7 var(--f-mono); color: var(--ink-4); text-align: left; pointer-events: none; transition: opacity .3s; }
.help kbd { font: inherit; color: var(--ink-3); }
body:not([data-ch="anat"]) .help { opacity: 0; }

@media (max-width: 1500px) { .help { display: none; } }
@media (max-width: 1080px) {
  .views button[data-view="arka"], .views button[data-view="on"] { display: none; }
}
@media (max-width: 1020px) and (min-width: 761px) {
  .chapters { left: 16px; top: calc(78px + env(safe-area-inset-top, 0px)); }
  #browser { top: 138px; }
  #info { top: 138px; max-height: calc(100% - 250px); }
}
@media (max-width: 860px) {
  .help { display: none; }
  #browser { width: 256px; }
}
@media (max-width: 760px) {
  .brand { left: 10px; right: 10px; top: calc(8px + env(safe-area-inset-top, 0px)); justify-content: space-between; align-items: center; }
  .brand h1 { font-size: 18px; margin: 0; }
  .brand-col { grid-template-columns: auto auto; align-items: center; column-gap: 10px; }
  .brand-home svg { height: 14px; }
  .brand-back { font-size: 9px; padding: 4px 7px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--ink-2); }
  .brand .sub { display: none; }
  .only-mobile { display: inline-flex; }
  #labels .lab { max-width: 44vw; overflow: hidden; text-overflow: ellipsis; font-size: 9.5px; padding: 2px 5px; }
  #browser { left: 8px; right: 8px; width: auto; top: auto; bottom: calc(106px + env(safe-area-inset-bottom, 0px)); height: 54dvh; z-index: 9; }
  #browser:not(.open) { display: none; }
  #dock { left: 6px; right: 6px; transform: none; max-width: none; flex-wrap: wrap; justify-content: space-between; gap: 4px; padding: 5px; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
  #dock .seg { order: -1; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  #dock .seg::-webkit-scrollbar { display: none; }
  #dock .seg button { flex: 0 0 auto; padding: 7px 9px; font-size: 11.5px; scroll-snap-align: start; }
  #dock .sep, .views { display: none; }
  #dock .tool { flex: 1; justify-content: center; padding: 7px 4px; font-size: 12px; gap: 5px; }
  #dock .tool svg { width: 14px; height: 14px; }
  #info { left: 8px; right: 8px; width: auto; top: auto; bottom: calc(106px + env(safe-area-inset-bottom, 0px)); max-height: 44dvh; padding: 14px 16px; z-index: 10; }
  #info h2 { font-size: 19px; margin-top: 10px; }
  #info .latin { font-size: 15px; }
  .facts { margin-top: 10px; }
  .pop { left: 8px !important; right: 8px; width: auto; bottom: calc(106px + env(safe-area-inset-bottom, 0px)); z-index: 10; }
  #gizmo { top: calc(100px + env(safe-area-inset-top, 0px)); bottom: auto; right: 10px; }
  body[data-ch="waves"] #gizmo { bottom: auto; }
  .chapters { left: 8px; right: 8px; max-width: none !important; width: auto; top: calc(48px + env(safe-area-inset-top, 0px)); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; padding: 3px; }
  .chapters::-webkit-scrollbar { display: none; }
  .chapters button { position: relative; flex: 0 0 auto; padding: 6px 10px; font-size: 12px; scroll-snap-align: start; }
  .chapters button[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 2px; border-bottom: 2px solid #03211d; }
  #eeg { left: 8px; right: 8px; bottom: calc(106px + env(safe-area-inset-bottom, 0px)); height: 34dvh; min-height: 190px; padding: 8px 10px 6px; }
  .eeg-hd { gap: 6px; flex-wrap: nowrap; }
  .eeg-title .eyebrow, #eegNote { display: none; }
  .eeg-title b { font-size: 12px; }
  #eeg .seg button { padding: 5px 6px; font-size: 11px; }
  #eeg .seg button .gl { margin-right: 0; }
  #eeg .seg button .nm { display: none; }
  #eegPause span { display: none; }
  #eegPause { padding: 6px; }
  .side-panel { left: 8px; right: 8px; width: auto; bottom: calc(106px + env(safe-area-inset-bottom, 0px)); padding: 10px 12px; }
  #vmCanvas { height: 70px; }
  .side-panel .hint { display: none; }
  body[data-ch="waves"] #info, body[data-ch="neuron"] #info, body[data-ch="drugs"] #info, body[data-ch="states"] #info { top: auto; bottom: calc(106px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 44dvh; z-index: 10; }
  body.has-info .side-panel, body.has-info #eeg, body.has-info #maStateDock { visibility: hidden; pointer-events: none; }
  #gizmo canvas { width: 54px; height: 54px; }
  #about { top: 100px; left: 8px; }
}
@media (max-width: 760px) and (min-width: 0) {
  body.has-info #gizmo { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Biyosera additions */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
#about .lic { margin-top: 10px; font-size: 12px; line-height: 1.55; color: var(--ink-3); }
#about .lic a { color: var(--ink-2); }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; z-index: 30; background: var(--stage-0); }
