* { box-sizing: border-box }
:root {
    color-scheme: dark;
    --bg: #090913; --panel: #131222; --ink: #f5efff; --mute: #b5adc9;
    --violet: #dfabff; --cyan: #7af9ff; --line: #4d3c63;
    --mono: "IBM Plex Mono", Consolas, monospace;
    font-family: "Barlow", "Segoe UI", sans-serif;
    background: var(--bg); color: var(--ink);
}
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 70% 0,#291536,transparent 60%),#090913 }
button,input { font: inherit; color: inherit }
button {
    border: 1px solid #72568b; border-radius: 4px; background: linear-gradient(#272038,#181524);
    padding: 8px 12px; cursor: pointer; font-size: 13px; font-weight: 650;
}
button:hover:enabled { background: #40274f; border-color: var(--violet) }
button:disabled { cursor: default; color: #a39ab4; border-color: #493e56; background: #201d2c }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px }
[hidden] { display: none !important }
h1,h2,h3,p,ol { margin: 0 }
h2 { font-size: 20px; letter-spacing: -.025em }
h3 { font-size: 16px }
small,label,.reading { font: 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute) }
header,main { max-width: 1640px; margin: auto }
header {
    display: flex; gap: clamp(16px,3vw,48px); align-items: center;
    min-height: 86px; padding: 10px clamp(12px,2.6vw,42px);
    border-bottom: 1px solid #765287; background: linear-gradient(110deg,#100b1b,#13101e 68%,#191024);
}
.identity { display: flex; gap: 16px; align-items: center }
.identity h1 {
    width: 168px; aspect-ratio: 225/78; text-indent: -9999px; overflow: hidden;
    background: url(assets/wordmark.webp) center / contain no-repeat;
}
.identity>span { color: #e8cbff; max-width: 112px; padding-left: 15px; border-left: 1px solid var(--line); font-size: 15px; font-weight: 600 }
.telemetry { flex: 1; display: flex; justify-content: space-around; border: 1px solid var(--line); border-radius: 8px; background: #0c0e19; padding: 8px 14px; gap: 16px }
.telemetry>div { display: flex; gap: 9px; align-items: center; min-width: 0 }
.telemetry strong,.operator strong { display: block; font-variant-numeric: tabular-nums }
.telemetry strong { font-size: 21px; line-height: 1.1; overflow-wrap: anywhere }
.telemetry i { font: 28px var(--mono); color: #ffd479; text-shadow: 0 0 12px currentColor }
.telemetry>div:nth-child(2) i { color: var(--cyan) }
.telemetry>div:nth-child(3) i { color: #d89bff }
.header-actions { display: flex; gap: 7px }
main { padding: 16px clamp(12px,2.6vw,42px) 0 }
.layout { display: grid; grid-template-columns: minmax(0,2.55fr) minmax(250px,1fr); gap: 14px }
.panel { min-width: 0; background: linear-gradient(125deg,#1a1628,#100f1c 65%); border: 1px solid var(--line); border-radius: 8px; overflow: hidden }
.reactor { display: flex; flex-direction: column; border-color: #675478 }
.chamber { position: relative; min-height: clamp(340px,35vw,530px); flex: 1; isolation: isolate; overflow: hidden; background: #0b121e; container-type: inline-size }
.core { position: absolute; inset: 0; overflow: hidden; z-index: -2; container-type: size }
.facility-art {
    position: absolute; width: max(100cqw,242cqh); aspect-ratio: 970/401;
    left: 53%; top: 50%; transform: translate(-50%,-50%);
    background: url(assets/reactor.webp) center / 100% 100% no-repeat;
}
.chamber::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#070a17ad,transparent 45%),linear-gradient(0deg,#090c1ae8,transparent 33%) }
.mission { padding: clamp(12px,1.5vw,22px); max-width: 220px; display: grid; gap: 12px }
.operator,.objective { background: linear-gradient(120deg,#151225f5,#100f21d9); padding: 12px 14px; border: 1px solid #805c9d; border-left: 3px solid #bd80ec; border-radius: 3px }
.mission small { display: block; color: var(--violet); margin-bottom: 4px }
.operator strong { overflow-wrap: anywhere }
.objective p { font-size: 15px; line-height: 1.4 }
.reactor-control { position: absolute; bottom: 22px; left: 54%; transform: translateX(-50%); text-align: center }
.online,.wave { color: var(--cyan); font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase }
.reactor-control h2 { text-transform: uppercase; font-size: 15px; letter-spacing: .13em; margin: 3px 0 9px; text-shadow: 0 2px 5px black }
#harvest {
    min-width: 216px; padding: 14px 15px; text-transform: uppercase; font-size: 17px; letter-spacing: .06em;
    background: linear-gradient(#14394b,#125269); color: #d7ffff; border: 2px solid #71fbff; border-radius: 12px 3px;
    box-shadow: inset 0 0 13px #42e4ffd0,0 0 0 3px #241731,0 0 0 4px #c27cff,0 0 19px #ae58f7;
}
#harvest:hover:enabled { background: #187185 }
#harvest:disabled { filter: saturate(.55); color: #c5d6df }
.readings,footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 11px var(--mono); color: var(--mute) }
.readings { background: #10111f; padding: 10px 15px; border-top: 1px solid var(--line); flex-wrap: wrap }
.readings b { color: var(--ink) }
#combo { color: var(--cyan); position: relative }
#combo.active-streak::after {
    content: ''; position: absolute; inset: auto 0 -3px; height: 2px;
    background: currentColor; transform-origin: left; transform: scaleX(var(--streak-left));
}
@media (prefers-reduced-motion: no-preference) {
    html:not([data-still]) #combo.active-streak::after { transition: transform .18s linear }
}
.comm { display: flex; flex-direction: column; border-color: #865da3 }
.portrait { position: relative; flex: 1; min-height: 150px; overflow: hidden; container-type: size; background: #1e1234 }
.portrait-art { position: absolute; width: max(100cqw,128cqh); aspect-ratio: 378/295; top: 48%; left: 50%; transform: translate(-50%,-50%); background: url(assets/sentinel.webp) center / 100% 100% no-repeat }
.comm-body { border-top: 1px solid #ba7ae2; background: linear-gradient(120deg,#241633,#111222 64%); padding: 14px 16px 17px }
.section-title,.supply-head,.dialogbar,.intervention-head { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.comm h2 { color: #efc6ff; letter-spacing: .07em; font-size: 16px }
.wave { color: #db8fff }
#transmission { margin-top: 9px; font-size: 16px; line-height: 1.45 }
#enroll { margin-top: 12px }
#enroll div { display: flex; gap: 7px; margin-top: 4px }
input { width: 100%; min-width: 0; background: #0a0915; border: 1px solid #6a537d; padding: 9px; border-radius: 3px }
#enroll button { white-space: nowrap; background: #58316f }
.supply-head,.journal .section-title { border-bottom: 1px solid var(--line); padding: 12px 15px }
nav,#quantities,.log-filters { display: flex; gap: 5px }
button[aria-pressed=true] { border-color: #d59ef0; background: linear-gradient(#5b3373,#382244); color: white; box-shadow: inset 0 0 9px #bd6cef35 }
.qty { font: 12px var(--mono); padding: 6px }
#shop { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 9px; padding: 12px 14px 0 }
.row { display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; min-width: 0; padding: 10px; border: 1px solid #59426c; border-radius: 7px 2px; background: radial-gradient(at 50% 60%,#29213a,#141122 75%) }
.row>div { order: -1 }
.row p,#unlock { color: var(--mute); font-size: 12px; line-height: 1.45 }
.row h3 { font-size: 15px }
.symbol { display: grid; place-items: center; font: 29px var(--mono); color: #d197ef; width: 118px; max-width: 100%; height: 64px; margin: 6px 0; }
.row[data-id=drone] .symbol,.row[data-id=algo] .symbol,.row[data-id=probe] .symbol {
    font-size: 0; background-image: url(assets/machines.webp); background-repeat: no-repeat;
    width: 112px; height: 76px; background-size: 300% 100%; mask-image: radial-gradient(ellipse,black 53%,transparent 77%);
}
.row[data-id=drone] .symbol { background-position: 0 center }
.row[data-id=algo] .symbol { background-position: 50% center }
.row[data-id=probe] .symbol { background-position: 100% center }
.price { width: 100%; color: #f5dbff; border-color: #c182e9; background: linear-gradient(#48275d,#23142d) }
#unlock { padding: 8px 15px 12px }
.journal { padding-bottom: 8px }
.journal h2 { font-size: 17px }
#recentLines { padding: 0 15px; list-style: none; max-height: 210px; overflow: auto }
#recentLines li { border-bottom: 1px solid #332c43; padding: 10px 0; font-size: 13px; line-height: 1.4 }
#recentLines small { color: var(--violet); font-size: 10px; margin-right: 6px }
footer { margin: 12px 0; padding: 8px 0; flex-wrap: wrap }
dialog { background: linear-gradient(145deg,#251a32,#131220); border: 1px solid #ae7acb; border-radius: 8px; color: var(--ink); width: min(470px,94vw); max-height: 84vh; padding: 20px }
dialog::backdrop { background: #070711bf }
.dialogbar { margin-bottom: 15px }
#close { font-size: 18px }
#dialogBody { display: grid; gap: 10px; line-height: 1.5 }
#dialogBody button { text-align: left }
#intervention,.ending-scene { background: #281d33; border-left: 3px solid var(--violet); padding: 12px; margin-top: 12px }
#interventionText,.ending-scene p,.log-entry p { line-height: 1.45; margin-top: 7px }
.ending-mark { font: 32px var(--mono); color: var(--cyan) }
.log-entry { padding: 8px 0; border-top: 1px solid var(--line) }
.log-note { color: var(--violet) }
.under-inspection { outline: 2px dashed var(--violet) }
.rgb-installed #harvest { border-color: #ffb7ee }
#notice { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 3; background: #262032; border-radius: 5px; font-size: 13px }
#notice:not(:empty) { padding: 9px 14px; border: 1px solid var(--violet) }
.pulse { animation: pulse .3s ease-out }
.yield { position: absolute; top: 42%; left: 56%; font: bold 20px var(--mono); color: white; text-shadow: 0 1px 5px #000; pointer-events: none; animation: yield .65s forwards }
@keyframes pulse { 35% { filter: brightness(1.3) } }
@keyframes yield { to { transform: translateY(-20px); opacity: 0 } }
@media(max-width: 960px) {
    .identity>span { display: none }
    .identity h1 { width: 135px }
    header { gap: 12px }
    .layout { grid-template-columns: minmax(0,1.9fr) minmax(230px,1fr) }
    .mission { max-width: 169px }
}
@media(max-width: 700px) {
    header { flex-wrap: wrap; justify-content: space-between; padding: 6px 12px 10px }
    .identity h1 { width: 124px }
    .telemetry { order: 2; flex-basis: 100%; padding: 7px 8px; gap: 5px }
    .telemetry strong { font-size: 17px }
    .telemetry small { font-size: 9px }
    .telemetry i { font-size: 20px }
    main { padding: 10px 10px 0 }
    .layout { grid-template-columns: minmax(0,1fr); gap: 10px }
    .chamber { min-height: 290px }
    .mission { max-width: 160px; padding: 10px; gap: 6px }
    .operator,.objective { padding: 7px 9px }
    .objective p { font-size: 13px }
    .reactor-control { left: 54%; bottom: 15px }
    #harvest { padding: 10px; min-width: 180px; font-size: 14px }
    .comm { display: grid; grid-template-columns: 92px minmax(0,1fr) }
    .portrait { min-height: 100px }
    .comm-body { border: 0; border-left: 1px solid #744b8d; padding: 11px }
    #transmission { font-size: 14px }
    #enroll div { flex-wrap: wrap }
    #enroll input { flex: 1 1 90px }
    .supply-head { padding: 10px; flex-wrap: wrap }
    #shop { grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); padding: 10px 10px 0 }
    .readings { font-size: 10px; padding: 8px }
}
@media(prefers-reduced-motion: reduce) {
    *,*::before,*::after { animation: none !important; scroll-behavior: auto !important }
}
.identity>span { max-width: 138px; }
.online {
    display: inline-block;
    padding: 3px 8px;
    background: #080f1ee8;
    border: 1px solid #477c83;
    border-radius: 3px;
}

/* Scene controls and lights share the artwork's coordinates at every crop. */
.chamber::before, .reactor-control { pointer-events: none; }
#harvest { pointer-events: auto; }
#coreTap {
    position: absolute; left: 54%; top: 70%; transform: translate(-50%,-50%);
    width: 13%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%;
    background: transparent; touch-action: manipulation;
}
#coreTap:hover:enabled, #coreTap:focus-visible {
    background: radial-gradient(circle,#baffff55,transparent 70%);
    box-shadow: inset 0 0 16px #8affff75;
}
#coreTap:disabled { cursor: default; }
.drone-light,.processor-light {
    position: absolute; pointer-events: none; opacity: 0;
    transition: opacity .35s; color: #90ffff;
}
.drone-light {
    left: 20.8%; top: 72.5%; width: 1.8%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle,#fff 8%,#9fffff 32%,#1abfff88 55%,transparent 80%);
    box-shadow: 0 0 13px #17ceff;
}
.processor-light {
    left: 87%; top: 90%; width: 4%; height: 8%; transform: skewY(-6deg);
    background: repeating-linear-gradient(0deg,#40d8ff 0 2px,transparent 2px 6px);
    filter: drop-shadow(0 0 4px #3bbfff);
}
.drone-active .drone-light,.processor-active .processor-light { opacity: 1; }
.drone-active .drone-light::after {
    content: ''; position: absolute; top: 60%; left: 50%; width: 280%; height: 380%;
    transform-origin: top left; background: linear-gradient(#92ffff94,transparent);
    clip-path: polygon(0 0,100% 100%,0 90%); animation: scan 3.8s ease-in-out infinite alternate;
}
.processor-active .processor-light { animation: processing 1.8s ease-in-out infinite alternate; }
@keyframes scan { from {transform:rotate(-18deg)} to {transform:rotate(28deg)} }
@keyframes processing { from {filter:drop-shadow(0 0 2px #268acc)} to {filter:drop-shadow(0 0 9px #53ffff)} }
.harvest-burst { position: absolute; z-index: 2; pointer-events: none; color: #a7ffff; }
.harvest-burst::before {
    content: ''; position: absolute; inset: -25px; border: 2px solid currentColor;
    border-radius: 50%; box-shadow: inset 0 0 18px currentColor; animation: discharge .42s ease-out forwards;
}
@keyframes discharge { from {transform:scale(.6);opacity:.8} to {transform:scale(1.9);opacity:0} }
.harvest-burst .yield { left: 6px; top: -30px; white-space: nowrap; color: inherit; text-shadow: 0 1px 4px #071120,0 0 3px #071120; }
.harvest-burst.critical { color: #ffe68b; }
.spark { position: absolute; width: 3px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 5px currentColor; animation: scatter .55s ease-out forwards; }
@keyframes scatter {
    from { transform: rotate(var(--angle)) translateY(-7px); opacity: .95; }
    to { transform: rotate(var(--angle)) translateY(-55px) scale(.3); opacity: 0; }
}
.funding { width: 100%; position: relative; text-align: left; font: 10px/1.4 var(--mono); padding-top: 6px; margin: 3px 0 6px; text-transform: none; letter-spacing: 0; }
.funding::before { content: ''; position: absolute; top: 0; inset-inline: 0; height: 2px; background: linear-gradient(to right,#7dcbd9 var(--funded),#3c354a var(--funded)); }
[data-ready=true] .funding { color: #a0f5e3; }
.newly-funded { animation: funded 1s ease-out; }
.just-bought .symbol { animation: installed .55s ease-out; }
@keyframes funded { from {box-shadow:inset 0 0 14px #60f0ed55;border-color:#9dfff4} }
@keyframes installed { 45% {transform:translateY(-4px);filter:brightness(1.4)} }
#replyBtn { margin-top: 9px; text-align: left; }
.comm-body { transition: padding-block .25s ease, background-color .25s; }
.comm.key-line .comm-body { padding-block: 23px; border-color: #edb2ff; background: linear-gradient(115deg,#3a204d,#161527 80%); }
.comm.key-line #transmission { font-size: 18px; line-height: 1.48; }
.comm.speaking .wave { transform-origin: center; animation: voice .28s ease-in-out infinite alternate; }
@keyframes voice { from {transform:scaleY(.45)} to {transform:scaleY(1.18);color:#ffd3ff} }

/* Eye and lip details are registered to each pose in the supplied concept art. */
.portrait-art {
    --lx: 34%; --ly: 45%; --rx: 66%; --ry: 31%; --mx: 48%; --my: 76%; --tilt: -18deg;
}
.comm:not([data-face=rest]) .portrait-art {
    aspect-ratio: 124/122; width: max(100cqw,102cqh);
    background-image: url(assets/expressions.webp); background-size: 400% 100%;
    background-position: var(--pose-x) center; --tilt: -5deg;
}
.comm[data-face=amused] { --pose-x:0%; }
.comm[data-face=amused] .portrait-art { --lx: 29%;--ly: 48%;--rx: 66%;--ry: 37%;--mx: 51%;--my: 74%;--tilt:-12deg; }
.comm[data-face=annoyed] { --pose-x:33.3333%; }
.comm[data-face=annoyed] .portrait-art { --lx:36%;--ly:43%;--rx:71%;--ry:40%;--mx:53%;--my:74%; }
.comm[data-face=curious] { --pose-x:66.6667%; }
.comm[data-face=curious] .portrait-art { --lx:26%;--ly:43%;--rx:59%;--ry:27%;--mx:39%;--my:62%;--tilt:-20deg; }
.comm[data-face=vulnerable] { --pose-x:100%; }
.comm[data-face=vulnerable] .portrait-art { --lx:35%;--ly:42%;--rx:71%;--ry:40%;--mx:53%;--my:72%; }
.gaze,.mouth { position:absolute; inset:0; background:inherit; pointer-events:none; }
.gaze {
    mask-image: radial-gradient(ellipse 5% 3% at var(--lx) var(--ly),black 45%,transparent),radial-gradient(ellipse 5% 3% at var(--rx) var(--ry),black 45%,transparent);
    animation: glance 6.3s infinite;
}
@keyframes glance { 0%,35%,70%,100%{transform:none} 38%,55%{transform:translateX(1.5px)} 75%,87%{transform:translate(-1px,.5px)} }
.lid { position:absolute; width:14%; height:7%; border-radius:50%; background:linear-gradient(#76629c,#997bb3 75%,#332240 90%); opacity:0; animation: blink 5.2s infinite; }
.left-lid { left:var(--lx);top:var(--ly); }.right-lid { left:var(--rx);top:var(--ry); }
@keyframes blink { 0%,90%,95%,100%{opacity:0;transform:translate(-50%,-80%) rotate(var(--tilt)) scaleY(.05)} 92%,93%{opacity:1;transform:translate(-50%,-50%) rotate(var(--tilt)) scaleY(1)} }
.mouth { display:none; mask-image:radial-gradient(ellipse 10% 4% at var(--mx) var(--my),black 45%,transparent); transform-origin:var(--mx) var(--my); }
.speaking .mouth { display:block;animation: articulate .32s ease-in-out infinite alternate; }
@keyframes articulate { from {transform:translateY(0) scaleY(.98)} to {transform:translateY(1px) scaleY(1.22)} }
@media(max-width:700px) {
    .comm.key-line .comm-body {padding-block:17px}
    .comm.key-line #transmission {font-size:16px}
    .chamber:has(.drone-active)::after,.chamber:has(.processor-active) .core::after {
        content:'';position:absolute;pointer-events:none;bottom:5%;width:62px;height:49px;
        background-image:url(assets/machines.webp);background-size:300% 100%;
        mask-image:radial-gradient(ellipse,black 48%,transparent 77%);
    }
    .chamber:has(.drone-active)::after {left:3%;background-position:0 center;animation:hover-drone 2.5s ease-in-out infinite alternate}
    .chamber:has(.processor-active) .core::after {right:3%;background-position:50% center;filter:brightness(1.5)}
}
@keyframes hover-drone { to { transform:translateY(-5px) } }
@media(prefers-reduced-motion:reduce) {
    *,*::before,*::after { transition:none !important; }
    .spark,.harvest-burst::before,.lid,.gaze,.mouth {display:none!important}
}

/* Control preferences, keyboard feedback and compact facility navigation. */
.sr-only,.skip-link:not(:focus) {
    position:absolute; width:1px; height:1px; padding:0; margin:-1px;
    overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
.skip-link:focus {
    position:fixed; top:8px; left:8px; z-index:8;
    padding:12px; background:var(--bg); color:var(--cyan);
}
.mobile-dock { display:none; }
.preferences {
    margin:0; padding:10px 12px; border:1px solid var(--line); border-radius:5px;
    display:grid; gap:6px;
}
.preferences legend { font-weight:650; padding-inline:5px; }
.preferences label {
    display:flex; align-items:center; gap:9px; min-height:32px;
    color:var(--ink); font-family:inherit; font-size:14px; line-height:1.4;
    text-transform:none; letter-spacing:0;
}
.preferences input[type=checkbox] { width:20px; height:20px; accent-color:var(--violet); }
.preferences .volume-label { flex-wrap:wrap; justify-content:space-between; }
.preferences input[type=range] { height:28px; padding:0; accent-color:var(--cyan); }
.dialogbar {
    position:sticky; top:-20px; z-index:1; padding-block:6px;
    background:#211a2e;
}
#dialogTitle:focus { outline:none; }
:focus-visible { outline-width:3px; }
.row:focus-visible, .panel:focus-visible { outline-offset:-3px; }
#notice { max-width:calc(100% - 24px); width:max-content; text-align:center; }
[data-still] *,[data-still] *::before,[data-still] *::after {
    animation:none!important; transition:none!important; scroll-behavior:auto!important;
}
[data-still] :is(.spark,.lid,.gaze,.mouth),[data-still] .harvest-burst::before { display:none!important; }
@media(max-width:700px), (pointer:coarse) and (max-height:520px) {
    html { scroll-padding-bottom:calc(76px + env(safe-area-inset-bottom)); }
    button,.preferences label { min-height:44px; }
    .qty,.dialogbar #close { min-width:44px; }
    input { font-size:16px; }
    .supply-head, #quantities, .header-actions { flex-wrap:wrap; }
    .mobile-dock:not([hidden]) {
        position:fixed; bottom:0; inset-inline:0; z-index:2;
        display:grid; grid-template-columns:1fr 1fr auto; gap:6px;
        padding:6px max(10px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
        border-top:1px solid #785a91; background:#100e1bf5;
    }
    .mobile-dock a { display:grid; align-content:center; text-decoration:none; font-size:14px; font-weight:650; color:var(--ink); padding-inline:8px; min-height:44px; }
    .mobile-dock span { font:12px var(--mono); color:var(--cyan); }
    body:has(#mobileDock:not([hidden])) { padding-bottom:calc(68px + env(safe-area-inset-bottom)); }
    body:has(#mobileDock:not([hidden])) #notice { bottom:calc(66px + env(safe-area-inset-bottom)); }
    dialog { max-height:88dvh; overscroll-behavior:contain; }
    .funding,.telemetry small,.readings { font-size:11px; }
}
@media (max-width:700px) {
    .layout:has(#enroll:not([hidden])) .comm { order:-1; }
}
@media (max-width:380px) {
    .identity h1 { width:105px; }
    .header-actions { gap:4px; }
    .header-actions button { padding-inline:8px; }
    .telemetry { gap:4px; padding-inline:5px; }
    .telemetry>div { gap:4px; }
    .mission { max-width:145px; }
}
@media (forced-colors:active) {
    .identity h1 { text-indent:0; width:auto; aspect-ratio:auto; font-size:20px; background:none; }
    .funding::before { border-top:1px solid CanvasText; }
    button[aria-pressed=true] { outline:2px solid Highlight; }
    #coreTap:enabled { border:2px solid ButtonText; }
}

@media (min-width:701px) and (min-height:600px) {
    header { position:sticky; top:0; z-index:3; }
    html { scroll-padding-top:98px; }
}
@media (max-width:700px) {
    .portrait { align-self:start; min-height:0; aspect-ratio:1; margin:10px 0 10px 10px; border:1px solid var(--line); border-radius:5px; }
    .comm-body { border-left:0; }
}
@media (pointer:coarse) {
    header,main {
        padding-left:max(12px,env(safe-area-inset-left));
        padding-right:max(12px,env(safe-area-inset-right));
    }
}
#coreTap:focus-visible { outline:3px solid #112536; box-shadow:0 0 0 6px var(--cyan); }

@media (max-width:700px), (pointer:coarse) {
    input:not([type=checkbox]):not([type=file]) { min-height:44px; }
}

.telemetry { position:relative; }
#outputInfo {
    position:relative; padding:2px 14px 2px 0; color:inherit; border:0;
    background:transparent; text-align:left; cursor:help;
}
#outputInfo::after { content:'ⓘ'; position:absolute; right:0; top:3px; font:11px var(--mono); color:var(--violet); }
#outputInfo:hover:enabled { background:transparent; }
#productionTip {
    position:absolute; z-index:5; top:100%; left:50%; transform:translateX(-50%);
    width:min(365px,calc(100vw - 32px)); max-height:55vh; overflow:auto;
    padding:14px 16px; border:1px solid var(--violet); border-radius:6px;
    color:var(--ink); background:#171321; box-shadow:0 8px 24px #08061199;
    font-size:14px; line-height:1.5; overflow-wrap:anywhere;
}
#productionTip p { white-space:pre-line; margin-top:8px; }
#layerMath,#harvestMath { padding-top:8px; border-top:1px solid var(--line); }

.suggestion-form fieldset { display:grid; gap:8px; margin:0; padding:0; border:0; min-width:0; }
.suggestion-form textarea,.suggestion-form select { width:100%; min-width:0; color:var(--ink); background:#100d1b; border:1px solid #806394; border-radius:4px; padding:10px; font:inherit; }
.suggestion-form textarea { resize:vertical; }
.suggestion-form label { text-transform:none; letter-spacing:0; color:var(--ink); }
.suggestion-consent { display:flex; align-items:center; gap:8px; min-height:44px; }
.suggestion-consent input { width:20px; height:20px; flex-shrink:0; }
.suggestion-voice { border-left:2px solid var(--violet); padding-left:10px; }
.privacy-note,.suggestion-status { font-size:13px; color:var(--mute); }
.suggestion-status:not(:empty) { margin-top:8px; }
.suggestion-trap { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
