@font-face {
  font-family:"Roboto Condensed"; src:url("/oni-condensed.woff") format("woff");
  font-weight:100 900; font-style:normal; font-display:swap;
}
:root {
  color-scheme:dark;
  --bg:#060d09; --card:#0c1811; --ink:#f1f7f2; --soft:#acbeb1;
  --line:#294133; --muted:#14271c; --accent:#82e2a8; --signal:#71dd98;
  --tint:#123221; --good:#8ce5a7; --bad:#ffa69e; --console:#07100b;
  --console-soft:#a4b8aa; --console-ink:var(--ink);
  --display:"Roboto Condensed","Arial Narrow",system-ui,sans-serif;
  --body:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --mono:ui-monospace,"Cascadia Mono",Consolas,monospace;
  --edge:inset 0 1px 0 #c1ffd009;
  --surface:linear-gradient(140deg,#122118 0%,#0d1912 42%,#0b1510 100%);
  --selected:linear-gradient(145deg,#284d34,#183b27 60%,#163523);
  --radius:14px;
  --top:calc(max(env(safe-area-inset-top),var(--tg-safe-area-inset-top,0px)) + var(--tg-content-safe-area-inset-top,0px));
  --bottom:calc(max(env(safe-area-inset-bottom),var(--tg-safe-area-inset-bottom,0px)) + var(--tg-content-safe-area-inset-bottom,0px));
  --left:max(14px,env(safe-area-inset-left),var(--tg-safe-area-inset-left,0px));
  --right:max(14px,env(safe-area-inset-right),var(--tg-safe-area-inset-right,0px));
}
*,*::before,*::after { box-sizing:border-box; }
[hidden] { display:none!important; }
html { background:var(--bg); }
body {
  margin:0; min-height:100svh; color:var(--ink); background:radial-gradient(ellipse at 94% 0%,#0d2517 0,transparent 405px),var(--bg);
  font:15px/1.45 var(--body); -webkit-text-size-adjust:100%;
}
main { width:min(100%,1180px); margin:auto; padding:var(--top) var(--right) calc(98px + var(--bottom)) var(--left); }
h1,h2,h3,p,dl,dd { margin:0; }
h1,h2,h3 { line-height:1.14; }
h1 { font-size:clamp(28px,4vw,45px); letter-spacing:-.046em; font-weight:620; }
h2,h3 { font-size:20px; letter-spacing:-.025em; font-weight:620; }
button,select,input { font:inherit; color:inherit; }
button,select,input,.bot-link {
  min-height:44px; border:1px solid var(--line); border-radius:8px;
  background:var(--card); padding:8px 12px;
}
button,select,summary,a { -webkit-tap-highlight-color:transparent; }
button,select,summary,.export-file { cursor:pointer; }
button { font-weight:590; }
button:disabled,[aria-disabled=true] { opacity:.55; cursor:default; }
:focus-visible,.shift-toolbar:focus-within,.scope-switch label:focus-within { outline:2px solid var(--accent); outline-offset:3px; }
@media (hover:hover) {
  button:not(:disabled):hover,.export-file:hover,summary:hover { color:var(--accent); border-color:#4e775b; }
}
input,select { font-size:16px; min-width:0; max-width:100%; }
input::placeholder { color:#a0afa4; }
summary { min-height:44px; padding:12px 0; font-weight:590; }
summary::marker { color:var(--soft); font-size:.75em; }
.small,.section-date,.note { font-size:13px; }
.soft,.section-date,.note { color:var(--soft); }
.note,dd,.what,.small,#basis,#connection-text { overflow-wrap:anywhere; }
.error,.issues,.chip.bad { color:var(--bad); }
.chip.good { color:var(--good); }
svg { width:20px; height:20px; vertical-align:middle; }
.symbol-bank,.sr-only,.skip-link:not(:focus) { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.skip-link:focus { position:fixed; z-index:90; top:var(--top); left:var(--left); padding:12px; background:var(--card); color:var(--ink); }

.app-header {
  isolation:isolate; position:relative; overflow:hidden; display:flex; align-items:center; justify-content:space-between; gap:10px;
  min-height:62px; margin-bottom:20px; border-bottom:1px solid var(--line);
}
.mast-art { position:absolute; z-index:-1; inset:0 0 0 auto; width:min(72%,440px); pointer-events:none; display:none;
  background:url("/oni-camera-forest.webp") right center / cover no-repeat;
  mask-image:linear-gradient(90deg,transparent,#000 24%); }
body[data-screen-active=overview] .app-header {
  min-height:128px; flex-direction:column; justify-content:center; align-items:start; gap:12px;
  margin-inline:calc(0px - var(--left)) calc(0px - var(--right)); padding:12px var(--right) 17px var(--left);
  background:linear-gradient(105deg,#08120c,#0a190f 57%,#050b07);
}
body[data-screen-active=overview] .mast-art { display:block; }
.brand,.viewer-name,.chips,.sheet-header,.section-heading,.chart-heading,.panel-caption,.camera-heading,.viewer-bar,.viewer-controls,.account,.event-toolbar { display:flex; align-items:center; gap:9px; }
.brand { flex-wrap:wrap; width:max-content; max-width:100%; gap:7px; }
.oni-mark { width:40px; height:28px; flex:none; }
.brand strong { white-space:nowrap; font:760 23px/1 var(--body); letter-spacing:-.07em; text-transform:uppercase; }
.brand strong span { font-weight:340; margin-left:.15em; color:#b5e6c4; }
.brand-caption { display:none; }
body[data-screen-active=overview] .brand strong { font-size:clamp(27px,5.2vw,38px); }
body[data-screen-active=overview] .brand .oni-mark { width:48px; height:34px; }
.chip { display:inline-flex; align-items:center; gap:7px; padding:5px 9px; font-size:11px; line-height:1.25; font-weight:570;
  border:1px solid var(--line); background:#0b1810; color:var(--soft); border-radius:99px; }
.chip::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.chip.good::before { box-shadow:0 0 7px #67e39566; }

.navigation {
  position:fixed; inset:auto var(--right) calc(6px + var(--bottom)) var(--left); z-index:20;
  display:flex; padding:4px; gap:3px; border:1px solid #364c3c; border-radius:15px; background:#0c1710;
  box-shadow:0 5px 20px #0008,inset 0 1px 0 #ffffff0c;
}
.navigation button { position:relative; flex:1; min-width:0; min-height:49px; border:1px solid transparent; border-radius:10px;
  background:transparent; color:var(--soft); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:3px; font-size:11px; }
.navigation button[aria-current=page],.metric-switch button[aria-pressed=true],.switch button[aria-pressed=true],.journal-modes button[aria-pressed=true],.scope-switch label:has(:checked) {
  color:#e2fbe7; background:var(--selected); border-color:#447459; box-shadow:inset 0 -2px 0 #61b97e;
}
.navigation button[aria-current=page] [data-icon] { color:var(--signal); }
.nav-badge { position:absolute; top:1px; left:calc(50% + 8px); border-radius:5px; padding:0 3px; color:#c6f8d7; background:#285135; font:600 10px/1.4 var(--mono); }

.section-heading { justify-content:space-between; flex-wrap:wrap; gap:9px; margin-bottom:14px; }
.section-kicker { font:600 10px/1.45 var(--mono); text-transform:uppercase; letter-spacing:.16em; color:var(--soft); margin-bottom:3px; }
.section-date { margin-top:5px; }
.shift-toolbar { position:relative; display:inline-flex; gap:7px; align-items:center; min-height:44px; padding:6px 10px; font-size:12px; font-weight:580;
  background:linear-gradient(#18271c,#101b14); border:1px solid #354e3d; border-radius:9px; }
.shift-toolbar svg { width:16px; }
.shift-toolbar::after { content:""; width:6px; height:6px; margin:-3px 2px 0 1px; border:solid var(--soft); border-width:0 1px 1px 0; transform:rotate(45deg); }
.shift-toolbar select,.scope-switch input { position:absolute; inset:0; width:100%; height:100%; cursor:pointer; margin:0; opacity:0; }
.shift-layout,.shift-tools,.cards,.system-layout { display:grid; align-items:start; min-width:0; gap:12px; }
.shift-sheet,.report-desk,.cards>.card,.operation-panel,.server-details,.events {
  min-width:0; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:var(--edge);
}
.shift-sheet { overflow:hidden; border-color:#375e45; }
.shift-cover { isolation:isolate; overflow:hidden; position:relative; color:var(--ink);
  background:radial-gradient(ellipse at 92% 120%,#17593480,transparent 52%),linear-gradient(115deg,#142f1e,#0c1e13 55%,#132c1b); }
.counter-ribbon { width:100%; height:47%; position:absolute; z-index:-1; inset:auto 0 -9px; opacity:.9; pointer-events:none; }
.sheet-header { justify-content:space-between; flex-wrap:wrap; gap:3px 8px; padding:9px 15px; border-bottom:1px solid #30553c;
  font-size:11px; color:#c0d8c7; background:linear-gradient(115deg,#1c4028,#122c1b 65%,#193a25); }
.sheet-header #shift { display:inline-flex; align-items:center; gap:7px; }
.sheet-header #shift::before { content:""; width:6px; height:6px; border-radius:50%; border:1px solid #9acbab; }
#shift-range,.facts dd,.sheet-numbers strong,#hour-detail { font-variant-numeric:tabular-nums; }
#shift-range { font-family:var(--mono); font-size:10px; }
.sheet-numbers { display:grid; grid-template-columns:1fr 1fr; padding:17px 15px 20px; }
.sheet-numbers>div+div { border-left:1px solid #437450; padding-left:14px; }
.sheet-numbers h2,.chart-heading h2 { display:flex; align-items:center; gap:6px; }
.sheet-numbers h2 { font:550 13px/1.3 var(--body); color:#d6e6da; letter-spacing:-.015em; }
.sheet-numbers h2 svg,.chart-heading h2 svg { width:17px; height:17px; color:var(--accent); flex:none; }
.sheet-numbers strong { display:block; margin-top:4px; color:#f1fff4; font:595 clamp(47px,8vw,80px)/1 var(--display); letter-spacing:-.035em; white-space:nowrap; }
.sheet-chart { padding:13px 15px 12px; border-top:1px solid #2a4d34; background:#0b1710; }
.chart-heading { justify-content:space-between; flex-wrap:wrap; }
.chart-heading h2,.panel-caption h2 { font-size:18px; }
.metric-switch,.switch,.scope-switch { display:inline-flex; gap:2px; padding:2px; border:1px solid #2b4031; border-radius:9px; background:#09140d; }
.metric-switch button,.switch button,.journal-modes button,.scope-switch label { min-height:38px; padding:5px 9px; border-radius:6px; border:1px solid transparent; background:transparent; font-size:13px; color:var(--soft); }
#hours { display:flex; gap:3px; overflow-x:auto; scrollbar-width:thin; margin-top:10px; }
.hour-column { flex:1 0 22px; min-width:0; padding:0; border:0; background:transparent; color:var(--soft); font:11px var(--mono); }
.hour-column small { display:block; font-size:10px; padding:5px 0; }
.hour-plot { height:clamp(58px,7vw,95px); display:flex; align-items:end; justify-content:center; border-bottom:1px solid var(--line); }
.hour-plot i { display:block; width:65%; max-width:34px; background:linear-gradient(#508e65,#315640); border-radius:3px 3px 0 0; }
.hour-column[aria-pressed=true] i,.hour-column:hover i { background:linear-gradient(#80df9e,#368b57); }
.hour-column[aria-pressed=true] { color:var(--accent); }
#hours.empty-chart { justify-content:center; align-items:center; min-height:57px; font-size:13px; color:var(--soft); }
#hour-detail:not(:empty) { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:5px; margin-top:5px; padding-top:8px; border-top:1px solid var(--line); font-size:12px; color:var(--soft); }
#hour-detail strong { color:var(--ink); }

.review-link { display:flex; gap:9px; align-items:center; width:100%; min-height:52px; padding:10px 13px; text-align:left; border-color:#32543d;
  background:linear-gradient(105deg,#142f1d,#0d2015 68%,#193824); color:var(--ink); border-radius:12px; }
.review-link .review-icon,.review-link span:last-child,.panel-caption>span { color:var(--accent); }
.review-link b { margin-left:auto; padding:2px 7px; border-radius:6px; border:1px solid #345c40; background:#142f1d; color:#abefbc; font:620 17px var(--display); }
.review-link span:last-child svg { width:14px; }
.report-desk,.operation-panel,.cards>.card,.server-details { padding:15px; }
.panel-caption svg { width:20px; }
#export-hint,.export-file small { font-size:12px; color:var(--soft); }
#export-hint { margin:5px 0 12px; }
.export-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.export-file { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:6px; min-height:56px;
  color:var(--ink); text-decoration:none; border:1px solid #344e3b; background:linear-gradient(150deg,#1a2c1f,#0e1b13); border-radius:9px; padding:8px 9px; }
.export-file>span:nth-child(2) { display:grid; gap:1px; }
.export-file strong { font-size:15px; font-weight:650; }
.export-file small { font-size:10px; line-height:1.3; }
.export-file .file-icon,.export-file>span:last-child { color:var(--accent); }
.export-file>span:last-child svg { width:15px; }
.export-file[aria-busy=true] { opacity:.8; border-style:dashed; }
#local-exports { margin-top:10px; font-size:13px; color:var(--soft); }
#local-exports a { display:inline-block; padding:12px 4px; color:var(--accent); }
#export-status { white-space:pre-line; font-size:13px; line-height:1.6; }
#export-status:not(:empty) { border-inline-start:2px solid var(--accent); padding-left:9px; margin-top:10px; }
#export-chat:not([hidden]) { display:inline-block; min-height:44px; padding-top:10px; color:var(--accent); }
.calculation { border-block:1px solid var(--line); }
.calculation summary { font-size:14px; }
#updated,.camera-role { color:var(--soft); font-size:12px; }
.facts { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); }
.facts dt,.facts dd { padding:10px 0; border-bottom:1px solid var(--line); font-size:13px; }
.facts dt { color:var(--soft); padding-right:8px; }
.facts dd { text-align:right; }
.facts dt:last-of-type,.facts dd:last-of-type { border-bottom:0; }
#birth-source { margin:4px 0; }

.journal-modes { margin-bottom:9px; }
.journal-modes button { min-height:42px; }
.event-toolbar,.camera-heading,.viewer-controls,.viewer-bar { justify-content:space-between; flex-wrap:wrap; }
.event-toolbar { margin-bottom:9px; }
.scope-switch label { position:relative; display:flex; align-items:center; gap:5px; }
.scope-switch b,.event .time { color:var(--accent); }
.time-search { display:flex; align-items:center; min-height:44px; gap:8px; border:1px solid var(--line); border-radius:8px; padding:0 12px; background:var(--card); color:var(--soft); }
.time-search input { flex:1; background:none; border:none; padding:7px 0; }
.time-search button { border:0; background:none; }
.time-search input::-webkit-search-cancel-button { display:none; }
.events { margin:8px 0 14px; padding:14px; }
.events:empty { display:none; }
.events>p { margin-top:6px; }
.empty-inbox { position:relative; isolation:isolate; overflow:hidden; text-align:center; padding:18px 18px 24px; }
.empty-optic { height:108px; position:relative; display:grid; place-items:center; color:var(--accent); }
.empty-optic .scan-mark { width:76px; height:76px; }
.scan-ribbon { position:absolute; z-index:-1; width:calc(100% + 36px); height:70px; inset:auto -18px -3px; opacity:.48; }
.empty-inbox p { max-width:48ch; margin-inline:auto; }
.event { display:grid; grid-template-columns:64px minmax(0,1fr); align-items:baseline; gap:6px 9px; border-bottom:1px solid var(--line); padding:12px 0; }
.event:last-child { border-bottom:0; }
.time,.journal-hour { font:12px var(--mono); }
.journal-hour { color:var(--soft); padding:14px 0 7px; border-bottom:1px solid var(--line); }
.what { font-weight:610; }
.event[data-status=NEEDS_REVIEW] .what { color:#ffdc9d; }
.event[data-status=HUMAN_CONFIRMED] .what { color:var(--good); }
.actions,.clip { grid-column:1/-1; }
.actions { display:flex; flex-wrap:wrap; gap:5px; }
.actions button,.clip button { font-size:13px; }
.actions button:first-child { color:var(--accent); }
.clip video { display:block; width:100%; max-height:60vh; background:var(--bg); }
.events>button { width:100%; margin-top:10px; }
.second-pass>h3,.second-pass>.small { margin-bottom:9px; }
.password-form,.add-form,.add-form label { display:grid; gap:7px; }
.add-form { padding-bottom:14px; }
#switch-status,.connection,#message:not(:empty) { border-inline-start:2px solid var(--accent); background:var(--tint); border-radius:5px; padding:10px 12px; margin-bottom:12px; }
.connection button { margin-left:7px; }
.offline-title { display:none; }
#message.error { color:var(--bad); }
.camera-heading h3 { font-size:22px; }
.camera-role { margin:3px 0 10px; }
.camera-preview,.preview-state { position:relative; display:grid; place-items:center; aspect-ratio:16/9; overflow:hidden; margin:10px 0;
  border:1px solid #213a2a; border-radius:8px; background:#050d08; color:var(--soft); font-size:13px; }
.preview { display:block; width:100%; cursor:pointer; }
.camera-preview[data-caption]::after { content:attr(data-caption); position:absolute; inset:0; display:grid; place-items:center; background:var(--console); pointer-events:none; }
button.primary,.open,.access-panel #password-submit,.bot-link { color:#d9f8e0; background:var(--selected); border:1px solid #50815d; }
.open { display:flex; justify-content:center; align-items:center; gap:9px; width:100%; }
.open:not(:disabled)::before { content:""; border-block:4px solid transparent; border-left:6px solid var(--accent); }
.camera-facts summary,.server-details summary { font-size:14px; }
.server-details summary { padding:2px 0; display:list-item; min-height:30px; line-height:30px; }
.account { margin-top:14px; padding:12px; border-block:1px solid var(--line); color:var(--soft); }
.account svg { color:var(--accent); }
.operation-panel .panel-caption { margin-bottom:6px; }

#viewer { position:fixed; inset:0; z-index:30; height:var(--tg-viewport-height,100dvh); display:flex; flex-direction:column;
  padding:calc(9px + var(--top)) var(--right) calc(8px + var(--bottom)) var(--left); background:#060d09; }
.viewer-name .oni-mark { width:30px; }
.viewer-bar { padding-bottom:9px; border-bottom:1px solid var(--line); }
.stage { position:relative; display:grid; place-items:center; flex:1; min-height:0; }
.stage canvas { width:100%; height:100%; min-height:0; max-width:100%; max-height:100%; object-fit:contain; }
.frame-wait { position:absolute; inset:0; display:grid; align-content:center; justify-items:center; gap:12px; background:#050c08; color:var(--soft); }
.frame-wait .oni-mark { width:56px; height:34px; }
.viewer-controls { padding-block:9px; }
.viewer-foot { color:var(--soft); font-size:12px; }
.legend { display:flex; flex-wrap:wrap; gap:4px 12px; }
.legend i { display:inline-block; width:9px; height:9px; margin-right:4px; }

body:not([data-phase=ready]) .app-header { display:none; }
body:not([data-phase=ready]) main { min-height:var(--tg-viewport-height,100svh); display:grid; align-content:center; justify-items:center; padding:calc(20px + var(--top)) var(--right) calc(20px + var(--bottom)) var(--left); }
.launch-lockup { text-align:center; }
.launch-viewfinder { display:grid; place-items:center; width:88px; height:74px; margin:0 auto 12px; border-block:1px solid #375c42; color:var(--ink); }
.launch-viewfinder .oni-mark { width:72px; height:45px; }
.loading-state h1 { font-size:40px; letter-spacing:-.065em; text-transform:uppercase; font-weight:740; }
.loading-state h1 span { color:#b5e6c4; font-weight:340; }
.loading-state p { margin-top:9px; color:var(--soft); }
.access-panel,body[data-phase=offline] .connection { width:min(100%,380px); padding:24px; border:1px solid #395841; background:var(--surface); border-radius:var(--radius); }
.access-brand { margin-bottom:26px; }
.access-panel p,body[data-phase=offline] #connection-text { display:block; margin:8px 0 17px; color:var(--soft); }
.access-panel button,.bot-link,body[data-phase=offline] #retry { width:100%; margin:4px 0 0; }
.bot-link { display:grid; place-items:center; text-decoration:none; font-weight:600; }
.secret-entry { position:relative; }
.secret-entry input { width:100%; padding-right:92px; }
.secret-entry #reveal-password { position:absolute; inset:1px 1px 1px auto; min-height:40px; width:auto; margin:0; padding-inline:10px; border:0; background:transparent; color:var(--soft); }
body[data-phase=offline] .offline-title { display:block; }

@media (max-width:365px) {
  .section-heading { gap:6px; }
  .shift-toolbar { padding-inline:7px; }
  .shift-heading h1 { font-size:26px; }
  .sheet-numbers h2 { gap:4px; font-size:12px; }
  .sheet-numbers>div+div { padding-left:10px; }
  .export-file { padding-inline:7px; gap:4px; }
  .brand .oni-mark { width:32px; }
}
@media (min-width:740px) {
  main { padding-inline:max(28px,var(--left)) max(28px,var(--right)); padding-bottom:46px; }
  .app-header,body[data-screen-active=overview] .app-header { min-height:132px; margin:0; padding:20px 24px; align-items:start; justify-content:center; flex-direction:column; gap:9px; }
  .mast-art { display:block; width:410px; }
  .brand strong,.app-header .brand strong { font-size:36px; }
  .navigation { position:sticky; top:var(--top); inset-inline:auto; bottom:auto; border:0; border-bottom:1px solid var(--line);
    padding:5px 0; margin:0 0 22px; border-radius:0; gap:6px; background:var(--bg); box-shadow:none; }
  .navigation button { flex:0 1 auto; flex-direction:row; gap:8px; padding-inline:18px; min-height:43px; font-size:14px; }
  .nav-badge { position:static; }
  .section-heading { margin-bottom:18px; }
  .shift-layout { grid-template-columns:minmax(0,1.45fr) minmax(260px,1fr); gap:18px; }
  .cards,.system-layout { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .sheet-header,.sheet-chart,.sheet-numbers { padding-inline:23px; }
  .sheet-numbers { padding-block:24px 30px; }
  .report-desk,.cards>.card,.operation-panel,.server-details { padding:20px; }
  .actions,.clip { grid-column:2; }
}
@media (prefers-reduced-motion:no-preference) {
  button,.export-file { transition:border-color .14s,color .14s; }
}
@media (forced-colors:active) {
  .navigation button[aria-current=page],button[aria-pressed=true] { outline:2px solid Highlight; }
}