:root {
  --void: #05060a; --deep: #0a0c13; --raise: #12151f;
  --glass: rgba(255, 255, 255, .042); --glass-2: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .085); --line-2: rgba(255, 255, 255, .17);
  --pearl: #f4f1ea; --mist: #aeadb8; --haze: #73737f;
  --solar: #ffb547; --ember: #ff6a4d; --plasma: #b45cff; --ion: #63e6ff; --mint: #6ff2b4; --red: #ff5f69;
  --accent: var(--solar);
  --spark: linear-gradient(105deg, #ffd27a, #ff8a4a 46%, #e8528f 78%, #a35cff);
  --card: linear-gradient(180deg, rgba(255, 255, 255, .062), rgba(255, 255, 255, .022));
  --lift: inset 0 1px 0 rgba(255, 255, 255, .075), 0 10px 30px rgba(0, 0, 0, .28);
  --sans: 'Sora', 'Segoe UI', system-ui, -apple-system, 'Noto Sans Devanagari', 'Noto Nastaliq Urdu', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --logo: 'Michroma', 'Sora', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* The app is one fixed screen: nothing stretches, bounces or slides sideways. */
html, body { position: fixed; inset: 0; width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; touch-action: manipulation; }
body { background: var(--void); color: var(--pearl); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; user-select: none; -webkit-user-select: none; }
input, textarea, .say, .selectable { user-select: text; -webkit-user-select: text; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; outline: 0; width: 100%; min-width: 0; font-size: 16px; }
input:focus, textarea:focus, select:focus { border-color: rgba(255, 181, 71, .6); outline: 0; }
select option { background: var(--deep); }
input::placeholder { color: var(--haze); }
:focus-visible { outline: 2px solid var(--solar); outline-offset: 2px; }
h1 { font: 600 28px/1.15 var(--sans); letter-spacing: -.02em; margin: 8px 0 16px; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 3px; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font: 500 10.5px/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--haze); }
.lead { color: var(--mist); margin: -8px 0 16px; font-size: 14px; }
.wordmark { font: 400 15px/1 var(--logo); letter-spacing: .32em; background: var(--spark); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark.large { font-size: 34px; letter-spacing: .3em; margin-right: -.3em; }
html[lang=ur] body, html[lang=ur] input { font-family: 'Noto Nastaliq Urdu', 'Sora', serif; }
html[lang=ur] h1 { font-family: 'Noto Nastaliq Urdu', serif; font-weight: 500; line-height: 1.7; }
html[lang=hi] body, html[lang=hi] input { font-family: 'Noto Sans Devanagari', 'Sora', sans-serif; }

#stars { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(100% 52% at 50% 16%, color-mix(in srgb, var(--accent) 17%, transparent), transparent 72%), radial-gradient(80% 42% at 90% 100%, rgba(150, 70, 255, .13), transparent 70%), radial-gradient(70% 36% at 0% 92%, rgba(255, 106, 77, .08), transparent 70%);
  transition: background .8s; }
body[data-mode=listening] { --accent: #ff5fa2; }
body[data-mode=thinking] { --accent: var(--plasma); }
body[data-mode=acting], body[data-mode=working] { --accent: var(--ion); }
body[data-mode=waiting] { --accent: var(--ember); }

/* Boot */
#boot { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 12px; background: var(--void); transition: opacity .55s, visibility .55s; }
#boot.gone { opacity: 0; visibility: hidden; }
.boot-mark { font: 400 clamp(32px, 9vw, 54px)/1 var(--logo); letter-spacing: .36em; margin-right: -.36em; background: var(--spark); -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.boot-sub { font: 400 11px/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--haze); animation: rise .8s .12s cubic-bezier(.2, .8, .2, 1) both; }
.boot-line { width: 150px; height: 1px; background: var(--line); margin-top: 18px; overflow: hidden; }
.boot-line i { display: block; height: 100%; width: 40%; background: var(--spark); animation: sweep 1.05s ease-in-out infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); filter: blur(5px); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(280%); } }

/* Gate and welcome */
#gate, #welcome { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
.gate-card, .welcome-card { width: min(420px, 100%); text-align: center; display: grid; gap: 12px; animation: rise .45s both; }
.gate-lead { font-size: 20px; margin: 22px 0 0; }
.gate-note, .welcome-card p { color: var(--mist); margin: 0 0 8px; font-size: 14px; }
.welcome-card h2 { font-size: 23px; font-weight: 500; margin: 14px 0 2px; }
#gateForm { display: grid; gap: 10px; }
.gate-error { color: var(--red); min-height: 22px; margin: 0; font-size: 14px; }
.langs { display: grid; gap: 9px; margin-top: 12px; }
.langs button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--lift); text-align: start; transition: border-color .2s, transform .15s; }
.langs button:active { transform: scale(.98); border-color: rgba(255, 181, 71, .6); }
.langs b { font-weight: 500; font-size: 16px; flex: none; }
.langs span { color: var(--haze); font-size: 12px; text-align: end; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 17px; border-radius: 13px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; text-decoration: none; color: var(--pearl); transition: transform .12s, background .2s, border-color .2s; }
.btn:active { transform: scale(.97); background: var(--glass-2); }
.btn.solid { background: var(--spark); color: #150c05; border: 0; font-weight: 600; box-shadow: 0 8px 24px rgba(255, 120, 70, .25); }
.btn.stop { min-height: 30px; padding: 0 10px 0 6px; color: var(--red); border-color: rgba(255, 95, 105, .4); font-size: 12.5px; }
.btn.stop .i { width: 15px; height: 15px; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn.danger { color: var(--red); border-color: rgba(255, 95, 105, .35); }
.btn[disabled] { opacity: .5; cursor: default; }

/* Shell */
#app { position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
#rail, #feed { display: none; }
#top { grid-row: 1; display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-t)) 16px 6px; min-width: 0; }
#top .wordmark { margin-right: auto; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 31px; padding: 0 11px; border: 1px solid var(--line); border-radius: 99px; font-size: 12px; color: var(--mist); max-width: 44vw; min-width: 0; background: rgba(12, 14, 22, .55); }
.pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill .i { width: 14px; height: 14px; }
.pill.ghost { color: var(--solar); border-color: rgba(255, 181, 71, .28); flex: none; }
#batPill:not(:empty) { color: var(--haze); flex: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 9px var(--mint); flex: none; }
.offline .dot { background: var(--red); box-shadow: 0 0 9px var(--red); }
#views { grid-row: 2; min-height: 0; min-width: 0; position: relative; overflow: hidden; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; min-width: 0; animation: viewIn .28s cubic-bezier(.2, .8, .2, 1); }
.view.scroll { overflow-y: auto; overflow-x: hidden; padding: 6px 16px 24px; display: block; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-y; }
.view.scroll::-webkit-scrollbar { display: none; }
@keyframes viewIn { from { opacity: 0; transform: translateY(7px); } }
#dock { grid-row: 3; display: flex; justify-content: space-around; margin: 0 12px calc(8px + var(--safe-b)); padding: 5px; border: 1px solid var(--line); border-radius: 22px; background: rgba(14, 16, 25, .78); box-shadow: 0 14px 34px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
#dock button { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 7px 0 5px; color: var(--haze); font-size: 10px; border-radius: 16px; transition: color .2s, background .2s; }
#dock button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
#dock button.on { color: var(--pearl); background: rgba(255, 255, 255, .07); }
#dock button.on .i { color: var(--solar); filter: drop-shadow(0 0 7px rgba(255, 181, 71, .65)); }

/* Core */
.core-stage { position: relative; flex: 1 1 0; min-height: 96px; display: grid; place-items: center; transition: flex-basis .35s; }
#orb { position: absolute; inset: 0; width: 100%; height: 100%; }
#hero { position: absolute; left: 16px; right: 16px; top: 3%; text-align: center; font: 300 clamp(21px, 6vw, 32px)/1.25 var(--sans); opacity: 0; transform: translateY(8px); transition: opacity .7s, transform .7s; pointer-events: none; text-shadow: 0 2px 22px rgba(0, 0, 0, .75); }
#hero.on { opacity: 1; transform: none; }
.core-state { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; pointer-events: none; }
#stateLabel { font-size: 15px; font-weight: 300; color: var(--mist); }
#stateSub { font: 400 11.5px/1.5 var(--mono); color: var(--haze); min-height: 17px; padding: 0 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.talking .core-stage { flex: 0 0 25dvh; }
#dialogue { flex: 0 1 auto; min-height: 0; max-height: 34dvh; overflow-y: auto; overflow-x: hidden; padding: 6px 16px 2px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-y; mask-image: linear-gradient(to bottom, transparent, #000 14px); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14px); }
#dialogue::-webkit-scrollbar { display: none; }
body.talking #dialogue { flex: 1 1 0; max-height: none; }
.say { max-width: 86%; font-size: 15px; line-height: 1.45; animation: rise .3s both; overflow-wrap: anywhere; padding: 9px 13px; border-radius: 17px; }
.say.me { align-self: flex-end; color: var(--pearl); font-size: 14px; background: rgba(255, 181, 71, .13); border: 1px solid rgba(255, 181, 71, .24); border-bottom-right-radius: 6px; }
.say.ai { align-self: flex-start; font-weight: 300; background: var(--card); border: 1px solid var(--line); box-shadow: var(--lift); border-bottom-left-radius: 6px; }
.say.ur { font-family: 'Noto Nastaliq Urdu', serif; line-height: 2.1; direction: rtl; }
.say.typing { display: inline-flex; gap: 5px; padding: 13px 15px; }
.say.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: bob 1s infinite; }
.say.typing i:nth-child(2) { animation-delay: .15s; } .say.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 40% { transform: translateY(-5px); opacity: .55; } }
.say img { display: block; width: 100%; border-radius: 10px; margin-top: 2px; border: 1px solid var(--line); }
.say .file { display: inline-flex; margin-top: 7px; }
.opts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.opts button { min-height: 34px; padding: 0 13px; border-radius: 99px; border: 1px solid rgba(255, 181, 71, .42); color: var(--pearl); font-size: 13px; background: rgba(255, 181, 71, .09); }
.opts button:active { background: rgba(255, 181, 71, .26); }

#mission { flex: none; margin: 8px 16px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(13, 15, 24, .8); box-shadow: var(--lift); position: relative; overflow: hidden; }
#mission::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--spark); transform-origin: left; animation: scan 1.6s ease-in-out infinite; }
@keyframes scan { 0% { transform: scaleX(.05); } 50% { transform: scaleX(1); } 100% { transform: scaleX(.05) translateX(1900%); } }
.mission-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ion); box-shadow: 0 0 9px var(--ion); animation: blink 1s infinite; }
#steps { list-style: none; margin: 0; padding: 0; max-height: 66px; overflow-y: auto; display: grid; gap: 3px; scrollbar-width: none; overscroll-behavior: contain; }
#steps li, #feedList li { display: flex; align-items: baseline; gap: 8px; font: 400 12px/1.45 var(--mono); color: var(--mist); min-width: 0; }
#steps li::before, #feedList li::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--haze); transform: translateY(-1px); }
li.running { color: var(--pearl) !important; }
li.running::before { background: var(--ion) !important; box-shadow: 0 0 9px var(--ion); animation: blink 1s infinite; }
li.done::before { background: var(--mint) !important; }
li.error::before, li.denied::before { background: var(--red) !important; }
@keyframes blink { 50% { opacity: .35; } }

.dock-input { flex: none; padding: 8px 0 8px; }
#chips { display: flex; gap: 7px; overflow-x: auto; overflow-y: hidden; padding: 0 16px 9px; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
#chips::-webkit-scrollbar { display: none; }
#chips button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 9px; border: 1px solid var(--line); border-radius: 13px; font-size: 12.5px; color: var(--mist); background: var(--card); transition: border-color .2s, color .2s, transform .12s; }
#chips button .i { width: 17px; height: 17px; color: var(--solar); }
#chips button:active { color: var(--pearl); border-color: var(--line-2); transform: scale(.96); }
#commandForm { display: flex; align-items: center; gap: 7px; padding: 0 12px; }
#command { flex: 1; height: 52px; border-radius: 26px; padding: 0 18px; background: rgba(18, 20, 30, .86); }
#liveBtn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--mist); background: rgba(18, 20, 30, .7); }
#liveBtn.on { color: #150c05; background: var(--ion); border-color: var(--ion); box-shadow: 0 0 22px rgba(99, 230, 255, .55); }
#sendBtn { display: none; width: 52px; height: 52px; flex: none; place-items: center; border-radius: 50%; background: var(--spark); color: #120b06; }
.typing #sendBtn { display: grid; }
.typing #micBtn, .typing #liveBtn { display: none; }
#micBtn { width: 58px; height: 58px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #150c05; background: var(--spark); box-shadow: 0 0 26px rgba(255, 138, 74, .4); transition: transform .15s, box-shadow .3s; }
#micBtn .i { width: 25px; height: 25px; stroke-width: 1.7; }
#micBtn:active { transform: scale(.94); }
body[data-mode=listening] #micBtn { background: #ff5fa2; box-shadow: 0 0 0 7px rgba(255, 95, 162, .18), 0 0 42px rgba(255, 95, 162, .75); animation: breathe 1.1s infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 13px rgba(255, 95, 162, .06), 0 0 56px rgba(255, 95, 162, .55); } }

/* Live laptop screen */
#v-screen { padding: 0; }
#stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; background: #000; }
#live { position: absolute; left: 0; top: 0; transform-origin: 0 0; display: block; }
#tapRing { position: absolute; width: 38px; height: 38px; margin: -19px; border-radius: 50%; border: 2px solid var(--solar); opacity: 0; pointer-events: none; z-index: 2; }
#tapRing.go { animation: ring .4s ease-out; }
@keyframes ring { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.5); } }
#stageMeta { position: absolute; top: 6px; left: 8px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, .5); font: 400 10.5px var(--mono); color: var(--mist); pointer-events: none; z-index: 2; }
#vcur { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; pointer-events: none; z-index: 2; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .8)); }
#vcur path { fill: #fff; stroke: #120b06; stroke-width: 1.3; }
#mousePad { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
#joy { position: absolute; left: 16px; bottom: 14px; width: 112px; height: 112px; border-radius: 50%; pointer-events: auto; touch-action: none; border: 1px solid rgba(255, 255, 255, .22); background: radial-gradient(circle, rgba(255, 181, 71, .14), rgba(10, 12, 19, .34) 70%); }
#knob { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe0a8, #ffb547 60%, #e9803e); box-shadow: 0 0 16px rgba(255, 150, 80, .55); opacity: .86; }
#mBtns { position: absolute; right: 12px; bottom: 12px; display: grid; grid-template-columns: 54px 54px; grid-template-rows: 36px 54px; gap: 6px; pointer-events: auto; }
#mBtns button { border-radius: 13px; border: 1px solid rgba(255, 255, 255, .24); background: rgba(10, 12, 19, .42); color: var(--pearl); font: 600 15px var(--mono); touch-action: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#mBtns #btnL { background: rgba(255, 181, 71, .3); }
#mBtns button.on, #mBtns button:active { background: rgba(255, 181, 71, .72); color: #120b06; }
#toolbar { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
#toolbar button { pointer-events: auto; min-width: 44px; height: 40px; padding: 0 7px; border-radius: 12px; display: grid; place-items: center; font: 500 11px var(--mono); color: var(--pearl); background: rgba(10, 12, 19, .66); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#toolbar button.on { border-color: var(--solar); color: var(--solar); }
#toolbar button:active { background: rgba(255, 181, 71, .25); }
#toolbar .i { width: 19px; height: 19px; }
#tbToggle { position: absolute; right: 5px; top: 42%; opacity: .75; }
#tbItems { position: absolute; left: 6px; right: 54px; top: 6px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; pointer-events: none; }
#toolbar.shut #tbItems { display: none; }
#typeForm { position: fixed; top: 0; left: 0; right: 0; z-index: 35; display: flex; gap: 7px; padding: calc(8px + var(--safe-t)) 10px 8px; background: rgba(12, 14, 22, .95); border-bottom: 1px solid var(--line); }
#typeForm .btn { flex: none; width: 44px; padding: 0; }
@media (max-width: 999px), (max-height: 520px) {
  body[data-view=screen] #dock, body[data-view=screen] #top { display: none; }
  body[data-view=screen] #stage { position: fixed; inset: 0; z-index: 30; }
  body[data-view=screen].rot #stage { inset: auto; left: 50%; top: 50%; width: 100dvh; height: 100dvw; transform: translate(-50%, -50%) rotate(90deg); }
}

/* Control, Mind, System */
.vitals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.vital { position: relative; display: grid; justify-items: center; gap: 5px; padding: 11px 2px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--lift); min-width: 0; }
.vital svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.vital circle { fill: none; stroke-width: 4; stroke: var(--line); }
.vital circle + circle { stroke: var(--solar); stroke-linecap: round; transition: stroke-dashoffset .7s; }
.vital b { position: absolute; top: 31px; left: 0; right: 0; text-align: center; font: 500 11.5px/1 var(--mono); }
.vital span { font-size: 10.5px; color: var(--haze); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.list { display: grid; gap: 8px; }
.card { padding: 13px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--lift); min-width: 0; }
.section { margin-bottom: 22px; }
.section > .eyebrow { display: flex; margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row > .grow { flex: 1; min-width: 0; }
.muted { color: var(--mist); font-size: 13px; overflow-wrap: anywhere; }
.mono { font: 400 11.5px var(--mono); color: var(--haze); }
.tag { flex: none; font: 500 10px var(--mono); letter-spacing: .05em; padding: 3px 7px; border-radius: 7px; border: 1px solid var(--line); color: var(--mist); text-transform: uppercase; }
.tag.done, .tag.ok, .tag.free { color: var(--mint); border-color: rgba(111, 242, 180, .32); }
.tag.failed, .tag.stopped { color: var(--red); border-color: rgba(255, 95, 105, .32); }
.iconbtn { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--haze); }
.iconbtn:active { background: var(--glass-2); color: var(--pearl); }
.iconbtn .i { width: 17px; height: 17px; }
.empty { padding: 26px 14px; text-align: center; color: var(--haze); border: 1px dashed var(--line); border-radius: 16px; font-size: 14px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; height: 34px; padding: 0 13px; color: var(--mist); font-size: 13px; border-radius: 99px; border: 1px solid var(--line); }
.tabs button.on { color: #150c05; background: var(--spark); border-color: transparent; font-weight: 600; }
.adder { display: grid; gap: 8px; margin-bottom: 12px; }
.adder.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.adder .wide { grid-column: 1 / -1; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; }
.seg button { padding: 9px 4px; border-radius: 10px; font-size: 13.5px; color: var(--mist); }
.seg button.on { background: var(--glass-2); color: var(--pearl); box-shadow: inset 0 0 0 1px rgba(255, 181, 71, .45); }
.field { display: grid; gap: 5px; margin-bottom: 10px; font-size: 13px; color: var(--mist); }
.qr { width: min(230px, 66vw); margin: 4px auto 12px; border-radius: 16px; overflow: hidden; display: block; }
.qr svg { display: block; width: 100%; height: auto; }
.keycard { display: grid; gap: 9px; }
.keycard .row a { color: var(--solar); font-size: 12.5px; text-decoration: none; flex: none; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { display: grid; justify-items: center; gap: 6px; padding: 13px 4px 11px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--lift); font-size: 12px; color: var(--mist); transition: transform .12s; }
.tile .i { color: var(--solar); }
.tile:active { transform: scale(.96); background: var(--glass-2); }
.tile.red, .tile.red .i { color: var(--red); }
.slide { display: grid; grid-template-columns: 78px minmax(0, 1fr) 30px; align-items: center; gap: 9px; font-size: 13px; color: var(--mist); margin-bottom: 8px; }
.slide input { padding: 0; height: 26px; border: 0; background: none; accent-color: #ffb547; touch-action: pan-x; }
.slide span { text-align: end; font: 400 12px var(--mono); }
.filerow { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 2px; border-bottom: 1px solid var(--line); text-align: start; min-width: 0; font-size: 14px; }
.filerow span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filerow .mono { flex: none; }

/* Sheet and toast */
#sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(3, 4, 8, .62); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.sheet-card { width: min(480px, 100%); max-height: 84dvh; overflow-y: auto; overscroll-behavior: contain; padding: 20px 18px calc(18px + var(--safe-b)); background: var(--raise); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 24px 24px 0 0; animation: lift .26s cubic-bezier(.2, .8, .2, 1); }
.sheet-card p { color: var(--mist); margin: 6px 0 13px; font-size: 14px; overflow-wrap: anywhere; }
.sheet-card h2 { font-size: 18px; font-weight: 500; }
.sheet-card pre { font: 400 13px/1.5 var(--sans); padding: 11px 12px; border-radius: 12px; background: var(--void); color: var(--pearl); max-height: 160px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 8px 0 14px; user-select: text; -webkit-user-select: text; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
@keyframes lift { from { transform: translateY(26px); opacity: 0; } }
#toast { position: fixed; left: 50%; top: calc(54px + var(--safe-t)); transform: translate(-50%, -10px); z-index: 70; width: max-content; max-width: min(90vw, 420px); padding: 9px 14px; border-radius: 13px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Laptop layout */
@media (min-width: 1000px) {
  #app { grid-template-columns: 76px minmax(0, 1fr) 320px; grid-template-rows: auto minmax(0, 1fr); }
  #dock { display: none; }
  #rail { grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 16px 0; border-right: 1px solid var(--line); }
  .rail-mark { padding: 3px 0 20px; letter-spacing: 0; font-size: 19px; }
  #rail button { width: 60px; display: grid; justify-items: center; gap: 4px; padding: 10px 0; color: var(--haze); border-radius: 13px; font-size: 10.5px; }
  #rail button.on { color: var(--pearl); background: var(--glass-2); }
  #rail button.on .i { color: var(--solar); }
  #top { grid-column: 2; grid-row: 1; padding: 14px 26px 6px; }
  #top .wordmark { visibility: hidden; }
  #views { grid-column: 2; grid-row: 2; }
  #feed { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column; gap: 12px; padding: 20px 18px; border-left: 1px solid var(--line); min-height: 0; background: rgba(8, 9, 15, .42); }
  #feedList { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: 7px; align-content: start; flex: 1; min-height: 0; scrollbar-width: thin; }
  .vitals.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
  .view.scroll { padding: 12px max(26px, calc(50% - 390px)) 36px; }
  #dialogue, #mission, .dock-input { width: min(680px, calc(100% - 32px)); margin-left: auto; margin-right: auto; }
  #chips { justify-content: center; flex-wrap: wrap; overflow: visible; }
  .sheet-card { border-radius: 22px; border-bottom: 1px solid var(--line-2); margin-bottom: 32px; }
  #sheet { align-items: center; }
  #vcur, #mousePad { display: none; }
  #rotBtn, #tbExit { display: none !important; }
  #typeForm { left: 76px; right: 320px; }
  body.talking .core-stage { flex: 0 0 30dvh; }
}
@media (max-height: 620px) and (max-width: 999px) { #chips { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Attachments on the way to SEETA */
#commandForm { position: relative; }
#attachBtn { position: absolute; right: 83px; top: 50%; width: 38px; height: 38px; margin-top: -19px; display: grid; place-items: center; border-radius: 50%; color: var(--haze); }
.typing #attachBtn { right: 77px; }
#command { padding-right: 46px; }
#command::placeholder { font-size: 14px; }
#tray { display: flex; gap: 8px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
#tray[hidden] { display: none; }
.pick { position: relative; flex: none; display: flex; align-items: center; gap: 8px; max-width: 190px; height: 52px; padding: 4px 30px 4px 5px; border: 1px solid var(--line-2); border-radius: 13px; background: var(--raise); font-size: 12px; color: var(--mist); }
.pick img { width: 42px; height: 42px; object-fit: cover; border-radius: 9px; }
.pick span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pick button { position: absolute; top: 50%; right: 5px; width: 22px; height: 22px; margin-top: -11px; display: grid; place-items: center; color: var(--mist); }
.pick button .i { width: 15px; height: 15px; }
.pick.busy { opacity: .55; }

/* Laptop health */
.gauge { display: flex; align-items: center; gap: 14px; }
.gauge svg { width: 66px; height: 66px; flex: none; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 7; stroke: rgba(255, 255, 255, .08); }
.gauge circle + circle { stroke: var(--mint); stroke-linecap: round; transition: stroke-dashoffset .5s; }
.gauge.warn circle + circle { stroke: var(--solar); }
.gauge.bad circle + circle { stroke: var(--red); }
.gauge b { display: block; font: 500 21px/1.1 var(--sans); }
.approw { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.approw .nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.approw .bar { grid-column: 1 / -1; height: 3px; margin-top: -3px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.approw .bar i { display: block; height: 100%; background: var(--spark); }
.approw .btn { min-height: 30px; }

/* History search and routines */
.searchbar { display: flex; gap: 8px; margin-bottom: 12px; }
.searchbar input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 13px; }
.routines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
.routine { display: flex; flex-direction: column; gap: 3px; min-height: 86px; padding: 12px 13px; text-align: left; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: var(--lift); transition: transform .12s, border-color .2s; }
.routine:active { transform: scale(.97); border-color: var(--line-2); }
.routine b { font-weight: 500; font-size: 14px; }
.routine span { font-size: 12px; line-height: 1.35; color: var(--haze); }

/* App lock */
#lock { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(5, 6, 10, .97); backdrop-filter: blur(18px); }
#lock[hidden] { display: none; }
.lock-box { width: min(300px, 100%); text-align: center; }
#lockDots { display: flex; justify-content: center; gap: 15px; margin: 8px 0 24px; }
#lockDots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--line-2); transition: background .12s, transform .12s; }
#lockDots i.on { background: var(--solar); border-color: var(--solar); transform: scale(1.12); }
#lockDots.bad { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
#lockPad { display: grid; grid-template-columns: repeat(3, 72px); justify-content: center; gap: 13px; }
#lockPad button { height: 72px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 23px; transition: transform .1s; }
#lockPad button:active { transform: scale(.93); border-color: var(--solar); }
#lockPad button.ghost { border: 0; background: none; font-size: 13px; color: var(--mist); }

/* Readiness */
.ready { display: grid; grid-template-columns: 20px 1fr; gap: 9px 8px; align-items: center; font-size: 13.5px; }
.ready i { width: 11px; height: 11px; justify-self: center; border-radius: 50%; border: 1.5px solid var(--haze); }
.ready i.on { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 9px rgba(111, 242, 180, .5); }
.ready span { color: var(--mist); }
.ready span.on { color: var(--pearl); }
#histAll .card { position: relative; }
.rerun { position: absolute; right: 10px; bottom: 8px; min-height: 30px; padding: 0 10px; }
.trail { margin-top: 6px; font-size: 12.5px; color: var(--mist); }
.trail summary { cursor: pointer; color: var(--haze); }
.trail ol { margin: 6px 0 0; padding-left: 18px; }
.trail li { padding: 1px 0; }

/* SEETA herself */
#face { position: absolute; left: 50%; top: 42%; width: min(42vw, 176px); height: min(42vw, 176px); transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; animation: sway 7s ease-in-out infinite; filter: drop-shadow(0 8px 26px rgba(0, 0, 0, .55)); }
@keyframes sway { 0%, 100% { transform: translate(-50%, -50%) rotate(-.7deg); } 50% { transform: translate(-50%, -51.5%) rotate(.7deg); } }
body[data-mode=listening] #face { filter: drop-shadow(0 0 24px rgba(255, 95, 162, .75)); }
body[data-mode=thinking] #face, body[data-mode=acting] #face, body[data-mode=working] #face { filter: drop-shadow(0 0 22px rgba(99, 230, 255, .6)); }

/* Small keypad on the live screen: every key goes straight to the laptop */
#pad { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 5px 4px 6px; display: grid; gap: 4px; background: rgba(8, 10, 16, .9); border-top: 1px solid var(--line-2); touch-action: none; }
#pad[hidden] { display: none; }
#pad div { display: flex; gap: 3px; justify-content: center; }
#pad button { flex: 1 1 0; max-width: 62px; height: 34px; border-radius: 7px; background: rgba(255, 255, 255, .1); font-size: 14px; color: var(--pearl); }
#pad button:active { background: var(--solar); color: #150c05; }
#pad button.wide { max-width: 150px; flex-grow: 3; }
#pad button.on { color: var(--solar); }
#dictBtn.on { background: #ff5fa2; color: #150c05; }

/* Launch and Core */
:root { --solar: #5aa9ff; --ion: #27f2b6; --ember: #5aa9ff; --accent: #5aa9ff; --pearl: #f2f6fb; --mist: #a4aebd; --haze: #667080; --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .18); }
html, body { background: #000; }
#orb { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
#app { z-index: 1; background: transparent; }
#top { background: none; padding-left: 20px; padding-right: 14px; }
.wordmark { font: 300 13px/1 var(--sans); letter-spacing: .5em; color: var(--pearl); background: none; -webkit-text-fill-color: currentColor; }
#langLabel, #deviceName { display: none; }
.pill { min-height: 30px; padding: 0 10px; border-radius: 99px; background: none; border: 1px solid var(--line); color: var(--mist); }
.core-stage { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1 1 0; min-height: 0; padding: 0 20px 6px; }
.reactor, .hud, #hero { display: none; }
.core-state { position: static; flex: none; text-align: center; }
body.talking .core-stage { flex: 0 0 25dvh; }
#stateLabel { font: 400 10.5px/1.4 var(--sans); letter-spacing: .36em; text-transform: uppercase; color: var(--mist); }
#stateSub { font-size: 13px; color: var(--haze); }
body[data-mode=listening] #stateLabel { color: var(--solar); }
body[data-mode=acting] #stateLabel, body[data-mode=working] #stateLabel { color: var(--ion); }
#dialogue { padding: 0 22px; mask-image: linear-gradient(180deg, transparent, #000 22px); -webkit-mask-image: linear-gradient(180deg, transparent, #000 22px); }
.say { max-width: 100%; padding: 0; margin: 0 0 16px; border: 0; border-radius: 0; background: none; box-shadow: none; font: 300 17px/1.5 var(--sans); color: var(--pearl); text-shadow: 0 1px 12px #000; backdrop-filter: none; -webkit-backdrop-filter: none; }
.say.me { padding: 0; background: none; color: var(--solar); font-size: 15px; text-align: right; box-shadow: none; }
.say.typing { background: none; }
#chips { padding: 0 20px; }
#chips button { height: 32px; padding: 0 13px; border: 1px solid var(--line); border-radius: 99px; color: var(--mist); background: rgba(255, 255, 255, .025); font-size: 12px; }
#chips button svg { display: none; }
#commandForm { background: none; padding: 8px 16px; gap: 8px; }
#command { height: 50px; border: 1px solid var(--line-2); border-radius: 99px; padding: 0 22px; background: rgba(12, 16, 26, .66); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: var(--pearl); }
#micBtn { width: 50px; height: 50px; border-radius: 50%; color: #03121a; background: linear-gradient(135deg, #7cc0ff, #27f2b6); box-shadow: 0 0 30px rgba(70, 170, 255, .35); }
#liveBtn { width: 42px; height: 50px; border: 0; border-radius: 50%; background: none; color: var(--haze); }
#liveBtn.on { color: var(--ion); box-shadow: none; background: none; }
#dock { margin: 0; padding: 4px 8px calc(6px + var(--safe-b)); border: 0; border-top: 1px solid var(--line); border-radius: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
#dock button.on { background: none; box-shadow: none; }
#dock button.on .i { color: var(--pearl); filter: none; }
#team { display: flex; gap: 6px; overflow-x: auto; padding: 2px 20px 6px; font: 400 12px/1 var(--sans); flex: none; }
#team[hidden] { display: none; }
#team span, #team a { flex: none; padding: 7px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--mist); text-decoration: none; }
#team .me { color: #000; background: var(--pearl); border-color: var(--pearl); }
#mission { border-radius: 16px; border: 1px solid var(--line); background: rgba(12, 16, 26, .66); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
@media (min-width: 1000px) { #rail, #feed { background: rgba(0, 0, 0, .5); border-color: var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); } }

#launch { position: fixed; inset: 0; z-index: 58; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 28px calc(var(--safe-b) + 56px); background: none; transition: opacity .7s; }
#launch[hidden] { display: none; }
#launch.out { opacity: 0; pointer-events: none; }
.ln-name { font: 200 clamp(38px, 11vw, 60px)/1 var(--sans); letter-spacing: .42em; margin-right: -.42em; color: #fff; animation: lnup 1.6s .3s cubic-bezier(.2, .8, .2, 1) both; }
.ln-sub { margin-top: 14px; font: 400 10px/1 var(--sans); letter-spacing: .34em; color: var(--mist); animation: lnup 1.6s .55s cubic-bezier(.2, .8, .2, 1) both; }
#lnGo { margin-top: 44px; height: 50px; padding: 0 34px; border: 1px solid var(--line-2); border-radius: 99px; background: rgba(255, 255, 255, .04); font: 400 13px/1 var(--sans); letter-spacing: .06em; color: var(--pearl); animation: lnup 1.6s .9s cubic-bezier(.2, .8, .2, 1) both; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
#launch.awake .ln-name, #launch.awake .ln-sub, #launch.awake #lnGo { opacity: 0; transition: opacity .5s; animation: none; }
@keyframes lnup { from { opacity: 0; transform: translateY(16px); } }
.say, .say.me, .say.ai { border: none !important; outline: none; clip-path: none; }
#dots { width: 64px; height: 64px; margin: -14px 0 -14px -14px; flex: none; }
#top { padding-left: 14px; }
.say, .say.me, .say.ai { background: none !important; box-shadow: none !important; }
#devicePill { margin-left: auto; }

/* Options panel: nothing extra stays on the screen */
#feed { position: fixed; z-index: 30; display: flex; flex-direction: column; gap: 12px; right: 14px; bottom: calc(var(--safe-b) + 142px); width: min(420px, calc(100vw - 28px)); max-height: 62dvh; overflow-y: auto; padding: 18px; border: 1px solid var(--line-2); border-radius: 22px; background: rgba(8, 11, 20, .78); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); box-shadow: 0 24px 70px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(14px) scale(.98); pointer-events: none; transition: opacity .22s, transform .22s; scrollbar-width: none; }
#feed.open { opacity: 1; transform: none; pointer-events: auto; }
#feed #chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; overflow: visible; }
#feed .vitals.mini { grid-template-columns: 1fr; gap: 7px; margin: 0; }
#feed #feedList { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; max-height: 24dvh; overflow-y: auto; }
#moreBtn { flex: none; width: 42px; height: 50px; border: 0; background: none; color: var(--mist); display: grid; place-items: center; }
#moreBtn.on { color: var(--accent); }
#attachBtn { display: none; }
@media (min-width: 1000px) {
  #app { grid-template-columns: 76px minmax(0, 1fr); }
  #feed { grid-column: auto; grid-row: auto; right: 30px; bottom: 96px; border-left: 1px solid var(--line-2); padding: 18px; background: rgba(8, 11, 20, .78); }
  .core-stage { padding-bottom: 2px; }
  #dialogue { max-width: 760px; margin: 0 auto; width: 100%; }
  .core-state { margin-top: 44vh; }
  #commandForm { max-width: 760px; margin: 0 auto; width: 100%; }
}
/* Each working page has its own colours */
body[data-view=studio] { --accent: #2fdcf0; --solar: #f94fb8; }
body[data-view=control] { --accent: #35f08f; --solar: #ffd93b; }
body[data-view=mind] { --accent: #e0a15c; --solar: #f7ecdb; }
body[data-view=system] { --accent: #ff5c80; --solar: #ffb15c; }
body[data-view=studio] .card, body[data-view=control] .card, body[data-view=mind] .card, body[data-view=system] .card { background: rgba(10, 12, 18, .6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
#feed .vitals > * { display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 6px 12px; min-height: 0; flex-direction: row; text-align: left; }
#feed .vitals svg { width: 38px; height: 38px; flex: none; }
body[data-view=control] input[type=range], body[data-view=mind] input[type=range], body[data-view=system] input[type=range] { accent-color: var(--accent); }

/* Screen: always a way out */
#scrBack, #scrMini { position: absolute; top: calc(var(--safe-t) + 10px); z-index: 12; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; color: #fff; background: rgba(0, 0, 0, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#scrBack { left: 10px; } #scrMini { left: 60px; }
body.mini #v-screen { position: fixed; display: block; z-index: 25; top: calc(var(--safe-t) + 58px); right: 12px; left: auto; bottom: auto; width: min(46vw, 320px); aspect-ratio: 16 / 9; height: auto; overflow: hidden; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .7); }
body.mini #v-screen #stage { position: absolute; inset: 0; width: 100%; height: 100%; }
body.mini #v-screen #toolbar, body.mini #v-screen #mousePad, body.mini #v-screen #pad, body.mini #v-screen #scrBack, body.mini #v-screen #scrMini, body.mini #v-screen #stageMeta { display: none; }
#liveBtn.live { color: #fff; }
#liveBtn.live .i { filter: drop-shadow(0 0 8px var(--ion)); animation: livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse { 50% { transform: scale(1.22); } }

/* Studio: OneGo inside SEETA */
#stateLabel.tap { cursor: pointer; }
#stateLabel.off { color: var(--red); }
#rail button, #dock button { position: relative; }
.dockdot { position: absolute; top: 5px; right: calc(50% - 17px); min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px; background: #f94fb8; color: #1a0612; font: 700 10px/15px var(--mono); text-align: center; }
.st-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.st-stats div { padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(10, 12, 18, .6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.st-stats b { display: block; font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-stats span { font: 400 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--haze); }
.st-bar { height: 7px; margin: 9px 0 7px; border-radius: 99px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--solar)); transition: width .5s linear; }
.st-title { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.st-card video, .chatvid video { display: block; width: 100%; max-height: 420px; margin-bottom: 10px; border-radius: 12px; background: #000; object-fit: contain; }
.st-acts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.st-acts .btn { flex: 1 1 auto; }
.st-acts .btn.solid, .st-form .btn.solid, .chatvid .btn.solid { background: var(--accent); color: #04151a; box-shadow: none; }
.st-tag { display: inline-block; padding: 2px 8px; margin: 3px 4px 0 0; border-radius: 99px; border: 1px solid var(--line); font: 400 10.5px var(--mono); color: var(--mist); }
.st-tag.good { color: #52e6a0; border-color: rgba(82, 230, 160, .35); }
.st-tag.bad { color: var(--red); border-color: rgba(255, 95, 105, .4); }
.st-post { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line); }
.st-post:first-child { border-top: 0; padding-top: 0; }
.st-post:last-child { padding-bottom: 0; }
.st-post a { color: var(--accent); }
.st-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-form input, .st-form select { min-width: 0; }
.st-form .wide { grid-column: 1 / -1; }
.st-note { width: 100%; margin-top: 8px; }
.chatvid { width: min(320px, 100%); margin-top: 9px; }
.chatvid .row { flex-wrap: wrap; gap: 7px; }

/* Small pictures in the chat, opened big on a tap */
.thumb { position: relative; display: block; width: 168px; max-width: 100%; margin-top: 8px; padding: 0; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #000; cursor: zoom-in; }
.thumb img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: cover; margin: 0; border: 0; border-radius: 0; }
.thumb.play::after { content: ''; position: absolute; left: 50%; top: 50%; width: 0; height: 0; margin: -13px 0 0 -8px; border-left: 22px solid rgba(255,255,255,.92); border-top: 13px solid transparent; border-bottom: 13px solid transparent; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.lcard { display: flex; gap: 12px; align-items: flex-start; margin-top: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(10,12,18,.55); max-width: 420px; }
.lcard .thumb { width: 110px; margin: 0; flex: none; }
.lcard-t { min-width: 0; display: grid; gap: 6px; }
.lcard-t b { font-weight: 600; font-size: 14.5px; }
.lcard-t .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcard-t .row { gap: 7px; flex-wrap: wrap; }
#lb { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; align-content: center; gap: 12px; padding: 16px; background: rgba(0,0,0,.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#lb[hidden] { display: none; }
#lb img, #lb video { max-width: min(96vw, 1100px); max-height: 80dvh; border-radius: 12px; background: #000; }
#lb .lb-x { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(20,22,30,.8); color: #fff; font-size: 26px; line-height: 1; }
#lb .lb-acts { justify-content: center; gap: 8px; }

.rec .recimg .thumb { width: 200px; }
#recDay { width: auto; min-height: 36px; }

.gate-cam{width:100%;max-width:320px;aspect-ratio:1;object-fit:cover;border-radius:16px;margin:12px auto;display:block;background:#000}
#gateScan{width:100%;margin:8px 0 14px}
