/* BREWDECK — the command deck. Dark glass over a slow aurora, one bright
   accent, and the live screen as the focal object. Mobile first. */

:root {
  --bg: #04050b;
  --bg-2: #080b17;
  --panel: rgba(13, 17, 33, 0.68);
  --panel-2: rgba(20, 26, 48, 0.72);
  --panel-solid: #0c1022;
  --line: rgba(150, 175, 255, 0.11);
  --line-2: rgba(150, 175, 255, 0.22);
  --ink: #eef3ff;
  --ink-2: #c6d0ec;
  --dim: #8592b6;
  --mute: #56607f;
  --cyan: #5ee7ff;
  --cyan-2: #1fb8e8;
  --violet: #9d8bff;
  --amber: #ffb547;
  --green: #45f3a0;
  --red: #ff3d5e;
  --r-xl: 26px;
  --r-lg: 20px;
  --r: 15px;
  --r-sm: 11px;
  --font: "Space Grotesk", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--font);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
select {
  background: transparent; border: 0; outline: 0; appearance: none; -webkit-appearance: none;
  padding-right: 14px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-size: 4px 4px; background-position: right 4px center, right 0 center; background-repeat: no-repeat;
}
select option { background: var(--panel-solid); color: var(--ink); }
a { color: var(--cyan); text-decoration: none; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }

/* ---------------------------------------------------------- atmosphere */
#aurora { position: fixed; inset: -20%; z-index: 0; pointer-events: none; filter: blur(70px) saturate(1.2); opacity: 0.55; }
#aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; will-change: transform; }
#aurora i:nth-child(1) { width: 60vmax; height: 60vmax; left: -10%; top: -15%; background: radial-gradient(circle, rgba(34, 120, 255, 0.55), transparent 62%); animation: drift1 38s ease-in-out infinite alternate; }
#aurora i:nth-child(2) { width: 55vmax; height: 55vmax; right: -15%; top: 10%; background: radial-gradient(circle, rgba(130, 90, 255, 0.45), transparent 60%); animation: drift2 46s ease-in-out infinite alternate; }
#aurora i:nth-child(3) { width: 50vmax; height: 50vmax; left: 15%; bottom: -25%; background: radial-gradient(circle, rgba(0, 210, 230, 0.32), transparent 60%); animation: drift3 52s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vw, 12vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vw, 18vh) scale(0.9); } }
@keyframes drift3 { to { transform: translate(10vw, -20vh) scale(1.2); } }
#grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wordmark { font-weight: 600; letter-spacing: 0.22em; font-size: 13px; color: var(--ink-2); }
.wordmark b { font-weight: 700; color: var(--ink); }
.wordmark.big { font-size: 26px; letter-spacing: 0.3em; margin-top: 26px; }

/* ---------------------------------------------------------- lock */
#lock { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px; }
.lock-core { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lock-orb { width: 108px; height: 108px; border-radius: 50%; position: relative; display: grid; place-items: center; }
.lock-orb::before, .lock-orb::after, .lock-orb span { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.lock-orb::before { background: radial-gradient(circle at 38% 32%, #eafcff, #5ee7ff 26%, #2a5bff 58%, #120a40 80%); box-shadow: 0 0 60px rgba(94, 231, 255, 0.45), inset -10px -14px 30px rgba(10, 0, 60, 0.6); animation: breathe 4.2s ease-in-out infinite; }
.lock-orb::after { inset: -14px; border: 1px solid rgba(94, 231, 255, 0.25); animation: halo 4.2s ease-in-out infinite; }
.lock-orb span { inset: -30px; border: 1px dashed rgba(157, 139, 255, 0.18); animation: spin 26s linear infinite; }
@keyframes breathe { 50% { transform: scale(1.05); filter: brightness(1.15); } }
@keyframes halo { 50% { transform: scale(1.08); opacity: 0.4; } }
@keyframes spin { to { transform: rotate(360deg); } }
.lock-sub { color: var(--dim); letter-spacing: 0.08em; margin-top: 2px; }
.pin-dots { display: flex; gap: 14px; margin: 18px 0 22px; min-height: 16px; }
.pin-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--line-2); transition: all 0.18s var(--spring); }
.pin-dots i.fill { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 14px var(--cyan); transform: scale(1.15); }
.pin-dots.shake { animation: shake 0.42s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.pad { display: grid; grid-template-columns: repeat(3, 74px); gap: 14px; }
.pad button {
  height: 74px; border-radius: 50%; font-size: 26px; font-weight: 500; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.12s ease, background 0.2s, border-color 0.2s;
}
.pad button:active { transform: scale(0.92); background: rgba(94, 231, 255, 0.12); border-color: rgba(94, 231, 255, 0.5); }
.pad button.fn { font-size: 15px; color: var(--dim); background: transparent; border-color: transparent; }
.lock-hint { margin-top: 26px; color: var(--mute); font-size: 12px; }

/* ---------------------------------------------------------- app frame */
#app { position: fixed; inset: 0; z-index: 2; display: flex; flex-direction: column; }
#topbar {
  display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--sat)) 14px 10px;
  background: linear-gradient(to bottom, rgba(4, 5, 11, 0.92), rgba(4, 5, 11, 0.55));
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); position: relative; z-index: 6;
}
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.logo { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e9fcff, var(--cyan) 30%, #2a5bff 70%); box-shadow: 0 0 16px rgba(94, 231, 255, 0.55); }
#conn { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); transition: background 0.3s, box-shadow 0.3s; }
#conn.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
@media (max-width: 420px) { .brand .wordmark { display: none; } }

.target-chip {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); transition: border-color 0.2s;
}
.target-chip:active { border-color: var(--line-2); }
.target-chip .i { width: 16px; height: 16px; color: var(--dim); }
#target-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: left; }
.target-chip em { font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; padding: 3px 6px; border-radius: 6px; flex: none; }
#self-badge { color: #120a3a; background: var(--violet); box-shadow: 0 0 12px rgba(157, 139, 255, 0.6); }
#link-badge { color: #022; background: var(--cyan); box-shadow: 0 0 12px rgba(94, 231, 255, 0.5); }

.kill {
  flex: none; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 11px; border-radius: 999px;
  background: rgba(255, 61, 94, 0.12); border: 1px solid rgba(255, 61, 94, 0.55); color: #ffd6dd;
  font-size: 12px; letter-spacing: 0.16em; transition: transform 0.12s ease, background 0.2s;
  box-shadow: 0 0 22px -6px rgba(255, 61, 94, 0.7);
}
.kill:active { transform: scale(0.94); }
.k-core { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: kpulse 2.2s ease-in-out infinite; }
@keyframes kpulse { 50% { box-shadow: 0 0 2px var(--red); opacity: 0.6; } }
body.halted .kill { background: var(--red); color: #fff; border-color: #ff8ea1; box-shadow: 0 0 30px rgba(255, 61, 94, 0.8); }
body.halted .k-core { background: #fff; box-shadow: 0 0 10px #fff; }

#halt-banner {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; z-index: 5; position: relative;
  background: linear-gradient(90deg, rgba(255, 61, 94, 0.32), rgba(255, 61, 94, 0.12)); border-bottom: 1px solid rgba(255, 61, 94, 0.45);
  animation: slideDown 0.35s var(--ease);
}
.hb-text { flex: 1; font-size: 13px; min-width: 0; }
.hb-text span { color: #ffc2cc; }
.hold { position: relative; overflow: hidden; flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.35); font-size: 12.5px; font-weight: 600; }
.hold-fill { position: absolute; inset: 0; width: 0; background: rgba(255, 255, 255, 0.28); transition: width 0.15s linear; }
.hold.holding .hold-fill { width: 100%; transition: width 1.1s linear; }
.hold-label { position: relative; }

#act-banner {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; z-index: 4; position: relative; font-size: 13px;
  background: linear-gradient(90deg, rgba(255, 181, 71, 0.26), rgba(255, 181, 71, 0.06)); border-bottom: 1px solid rgba(255, 181, 71, 0.35);
  animation: slideDown 0.3s var(--ease);
}
#act-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ffe2b5; }
#act-stop { flex: none; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255, 181, 71, 0.18); border: 1px solid rgba(255, 181, 71, 0.5); color: #ffe2b5; font-size: 12px; font-weight: 600; }
.act-spark { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); animation: kpulse 1s ease-in-out infinite; flex: none; }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } }

#views { flex: 1; position: relative; min-height: 0; z-index: 3; }
.view { position: absolute; inset: 0; display: none; flex-direction: column; }
.view.on { display: flex; animation: viewIn 0.42s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px) scale(0.995); } }
.view-scroll { flex: 1; overflow-y: auto; padding: 18px 16px calc(110px + var(--sab)); -webkit-overflow-scrolling: touch; }
.view-scroll > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.view-head { margin-bottom: 16px; }
.view-head.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.view-head h2, #chat-head h2, .bp-head h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.view-head p { margin-top: 4px; font-size: 13.5px; }

/* ---------------------------------------------------------- dock */
#dock {
  position: relative; z-index: 6; display: flex; padding: 6px 8px calc(6px + var(--sab));
  background: linear-gradient(to top, rgba(4, 5, 11, 0.95), rgba(6, 8, 18, 0.72));
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--line);
}
#dock button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 5px; color: var(--mute); position: relative; transition: color 0.25s; }
#dock button span { font-size: 10.5px; letter-spacing: 0.04em; }
#dock button.on { color: var(--ink); }
#dock button.on .i { color: var(--cyan); filter: drop-shadow(0 0 8px rgba(94, 231, 255, 0.7)); }
#dock .dot { position: absolute; top: 6px; right: calc(50% - 16px); width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
#dock .count { position: absolute; top: 3px; right: calc(50% - 20px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--cyan); color: #022; font: 700 10px/16px var(--font); font-style: normal; }
#dock-glow { position: absolute; top: -1px; height: 2px; width: 34px; border-radius: 2px; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); left: calc((100% - 16px) / 5 * var(--i, 0) + 8px + (100% - 16px) / 10 - 17px); transition: left 0.45s var(--spring); }
@media (min-width: 760px) { #dock { justify-content: center; } #dock button { flex: 0 0 110px; } #dock-glow { left: calc(50% - 275px + 110px * var(--i, 0) + 38px); } }

/* ---------------------------------------------------------- buttons, pills, rows */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 600; letter-spacing: 0.02em; transition: transform 0.12s ease, box-shadow 0.25s; }
.btn:active { transform: scale(0.96); }
.btn.primary { color: #021018; background: linear-gradient(135deg, #9ff3ff, var(--cyan) 45%, #3aa0ff); box-shadow: 0 8px 30px -8px rgba(94, 231, 255, 0.7); }
.btn.ghost { border: 1px solid var(--line-2); background: var(--panel); }
.btn.danger { color: #ffb3c0; border-color: rgba(255, 61, 94, 0.45); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn .i { width: 18px; height: 18px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid transparent; transition: background 0.2s, border-color 0.2s; flex: none; }
.icon-btn:active, .icon-btn.on { background: rgba(94, 231, 255, 0.1); border-color: rgba(94, 231, 255, 0.35); color: var(--cyan); }
.switch { width: 50px; height: 30px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-2); position: relative; flex: none; transition: background 0.25s, border-color 0.25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink-2); transition: transform 0.3s var(--spring), background 0.25s; }
.switch.on { background: rgba(94, 231, 255, 0.25); border-color: rgba(94, 231, 255, 0.6); }
.switch.on::after { transform: translateX(20px); background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
#set-self.on, #ts-self.on { background: rgba(157, 139, 255, 0.28); border-color: rgba(157, 139, 255, 0.7); }
#set-self.on::after, #ts-self.on::after { background: var(--violet); box-shadow: 0 0 12px var(--violet); }
.seg { display: flex; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); gap: 4px; margin-bottom: 10px; }
.seg button { flex: 1; height: 36px; border-radius: 10px; font-size: 13px; color: var(--dim); transition: background 0.25s, color 0.25s; }
.seg button.on { background: rgba(94, 231, 255, 0.14); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(94, 231, 255, 0.4); }
.seg button:disabled { opacity: 0.4; }

/* ---------------------------------------------------------- screen */
#view-screen { background: radial-gradient(120% 80% at 50% 40%, rgba(14, 20, 44, 0.6), rgba(2, 3, 8, 0.9)); }
#stage { flex: 1; position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
#stage-inner { position: absolute; left: 50%; top: 50%; transform-origin: 50% 50%; will-change: transform; --inv: 1; }
#feed { display: block; width: 100%; height: 100%; border-radius: 6px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(150, 175, 255, 0.12); background: #000; }
#overlay { position: absolute; inset: 0; pointer-events: none; }
.ripple { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 2px solid var(--cyan); transform: scale(var(--inv)); animation: ripple 0.7s var(--ease) forwards; box-shadow: 0 0 18px rgba(94, 231, 255, 0.6); }
.ripple.pending { border-style: dashed; animation: rpend 0.9s linear infinite; }
.ripple.ok { border-color: var(--green); box-shadow: 0 0 18px rgba(69, 243, 160, 0.6); }
.ripple.err { border-color: var(--red); box-shadow: 0 0 18px rgba(255, 61, 94, 0.6); }
.ripple.bot { border-color: var(--amber); box-shadow: 0 0 22px rgba(255, 181, 71, 0.7); }
@keyframes ripple { from { transform: scale(calc(var(--inv) * 0.3)); opacity: 1; } to { transform: scale(calc(var(--inv) * 1.5)); opacity: 0; } }
@keyframes rpend { to { transform: scale(var(--inv)) rotate(360deg); } }
#ghost { position: absolute; left: 50%; top: 50%; transform: scale(var(--inv)); transform-origin: 0 0; transition: left 0.5s var(--ease), top 0.5s var(--ease), opacity 0.4s; display: flex; align-items: flex-start; gap: 6px; }
#ghost svg { width: 26px; height: 26px; fill: var(--amber); stroke: #2a1600; stroke-width: 1.2; filter: drop-shadow(0 0 10px rgba(255, 181, 71, 0.9)); margin: -3px 0 0 -3px; }
#ghost span { margin-top: 18px; padding: 4px 9px; border-radius: 8px; background: rgba(40, 24, 0, 0.82); border: 1px solid rgba(255, 181, 71, 0.55); color: #ffe2b5; font: 600 11px/1.2 var(--mono); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
#ghost.fade { opacity: 0; }
#feed-off { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; }
.feed-card { max-width: 360px; text-align: center; padding: 30px 24px; border-radius: var(--r-xl); background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); }
.feed-card h2 { font-size: 22px; font-weight: 600; margin: 14px 0 6px; }
.feed-card p { color: var(--dim); font-size: 14px; margin-bottom: 20px; }
.feed-card .small { margin: 14px 0 0; }
.feed-ico { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(94, 231, 255, 0.25), transparent 70%); color: var(--cyan); }
.feed-ico .i { width: 30px; height: 30px; }
#feed-hud { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; background: rgba(4, 5, 11, 0.7); border: 1px solid var(--line); font-size: 11px; color: var(--dim); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); pointer-events: none; }
#feed-hud b { color: var(--ink); letter-spacing: 0.14em; font-size: 10.5px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: kpulse 1.6s ease-in-out infinite; }
#gesture-hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: rgba(4, 5, 11, 0.75); border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); width: max-content; max-width: calc(100% - 24px); text-align: center; pointer-events: none; animation: viewIn 0.4s var(--ease); }
#screen-tools { position: relative; z-index: 2; padding: 8px 10px 8px; background: linear-gradient(to top, rgba(4, 5, 11, 0.85), rgba(4, 5, 11, 0.4)); border-top: 1px solid var(--line); }
.tool-row { display: flex; justify-content: space-between; gap: 4px; max-width: 640px; margin: 0 auto; }
.tool-row button { flex: 1; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid transparent; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.tool-row button:active, .tool-row button.on { background: rgba(94, 231, 255, 0.1); border-color: rgba(94, 231, 255, 0.35); color: var(--cyan); }
.tray { max-width: 640px; margin: 0 auto 8px; padding: 10px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: viewIn 0.3s var(--ease); }
#keys-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
#keys-tray button { height: 38px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font: 600 11.5px var(--mono); color: var(--ink-2); }
#keys-tray button:active { background: rgba(94, 231, 255, 0.16); border-color: rgba(94, 231, 255, 0.5); color: var(--ink); }
#type-bar { display: flex; gap: 8px; align-items: center; }
#type-bar input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.3); outline: none; }
#type-bar input:focus { border-color: rgba(94, 231, 255, 0.6); }
.enter-toggle { display: flex; align-items: center; gap: 4px; font-size: 15px; color: var(--dim); }
.enter-toggle input { accent-color: var(--cyan); }
#feed-settings { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--dim); }
#feed-settings label { display: flex; gap: 6px; align-items: center; }
#feed-settings select { color: var(--ink); }
#feed-settings .btn { margin-left: auto; }

/* ---------------------------------------------------------- chat */
#chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 8px; max-width: 840px; width: 100%; margin: 0 auto; }
#chat-head b { color: var(--ink-2); font-weight: 600; }
#chat-scroll { flex: 1; overflow-y: auto; padding: 6px 14px 16px; -webkit-overflow-scrolling: touch; }
#chat-list { max-width: 840px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.empty-chat { margin: 40px auto; text-align: center; color: var(--dim); max-width: 320px; }
.empty-chat .i { width: 34px; height: 34px; color: var(--cyan); margin-bottom: 10px; }
.msg { animation: viewIn 0.35s var(--ease); }
.msg.user { align-self: flex-end; max-width: 86%; }
.msg.user .bubble { padding: 11px 14px; border-radius: 18px 18px 5px 18px; background: linear-gradient(135deg, rgba(94, 231, 255, 0.2), rgba(58, 120, 255, 0.16)); border: 1px solid rgba(94, 231, 255, 0.28); white-space: pre-wrap; word-break: break-word; }
.msg.user .meta { text-align: right; font-size: 11px; color: var(--mute); margin-top: 4px; }
.msg.bot { padding: 14px 15px 12px; border-radius: 6px 20px 20px 20px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.msg.bot.live { border-color: rgba(94, 231, 255, 0.35); box-shadow: 0 0 40px -18px rgba(94, 231, 255, 0.6); }
.tools { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tools span { font: 11px/1.3 var(--mono); padding: 3px 8px; border-radius: 7px; background: rgba(157, 139, 255, 0.1); border: 1px solid rgba(157, 139, 255, 0.22); color: #cfc6ff; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tools .more { background: transparent; color: var(--dim); cursor: pointer; }
.md { font-size: 14.5px; line-height: 1.6; word-break: break-word; color: var(--ink-2); }
.md p { margin: 0 0 9px; }
.md h1, .md h2, .md h3, .md h4 { font-size: 15.5px; color: var(--ink); margin: 12px 0 6px; font-weight: 600; }
.md ul, .md ol { padding-left: 20px; margin: 0 0 9px; }
.md li { margin: 3px 0; }
.md code { font: 12.5px var(--mono); padding: 1px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.07); color: #bdf6ff; }
.md pre { margin: 6px 0 10px; padding: 11px 12px; border-radius: 11px; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); overflow-x: auto; }
.md pre code { padding: 0; background: none; color: #d7e3ff; font-size: 12px; line-height: 1.55; }
.md strong { color: var(--ink); }
.md a { text-decoration: underline; text-underline-offset: 2px; }
.caret::after { content: ""; display: inline-block; width: 8px; height: 15px; margin-left: 2px; vertical-align: -2px; background: var(--cyan); animation: blink 1s steps(2) infinite; border-radius: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.foot { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 10.5px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status.running { color: var(--cyan); }
.status.running::before { animation: kpulse 1s infinite; }
.status.done { color: var(--green); }
.status.error, .status.interrupted { color: var(--red); }
.status.stopped { color: var(--amber); }
.err { margin-top: 8px; font: 12px/1.5 var(--mono); color: #ffb3c0; white-space: pre-wrap; word-break: break-word; }
#composer { padding: 8px 12px calc(10px); background: linear-gradient(to top, rgba(4, 5, 11, 0.92), rgba(4, 5, 11, 0.5)); border-top: 1px solid var(--line); }
#composer > * { max-width: 840px; margin-left: auto; margin-right: auto; }
#composer-opts { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
#composer-opts::-webkit-scrollbar { display: none; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.pill span { color: var(--mute); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.pill select { color: var(--ink); font-weight: 600; }
.pill.toggle.on { border-color: rgba(94, 231, 255, 0.5); color: var(--cyan); background: rgba(94, 231, 255, 0.1); }
#resume-note, #attach-row { font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#resume-note { padding: 8px 12px; border-radius: 12px; background: rgba(157, 139, 255, 0.12); border: 1px solid rgba(157, 139, 255, 0.35); }
#resume-note button, #attach-row button { color: var(--dim); text-decoration: underline; font-size: 12px; }
#attach-row img { width: 44px; height: 44px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line-2); }
.composer-box { display: flex; align-items: flex-end; gap: 6px; padding: 6px; border-radius: 22px; background: var(--panel-2); border: 1px solid var(--line-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: border-color 0.2s, box-shadow 0.2s; }
.composer-box:focus-within { border-color: rgba(94, 231, 255, 0.5); box-shadow: 0 0 30px -12px rgba(94, 231, 255, 0.6); }
#c-input { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; padding: 9px 4px; max-height: 160px; line-height: 1.4; }
#c-input::placeholder { color: var(--mute); }
#c-mic.on { color: var(--red); background: rgba(255, 61, 94, 0.12); border-color: rgba(255, 61, 94, 0.45); animation: kpulse 1.2s infinite; }
.send { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #021018; background: linear-gradient(135deg, #9ff3ff, var(--cyan) 45%, #3aa0ff); box-shadow: 0 6px 20px -6px rgba(94, 231, 255, 0.8); transition: transform 0.12s ease, opacity 0.2s; }
.send:active { transform: scale(0.9); }
.send:disabled { opacity: 0.4; }
.send.stop { background: linear-gradient(135deg, #ff9aac, var(--red)); color: #fff; box-shadow: 0 6px 20px -6px rgba(255, 61, 94, 0.8); }

/* ---------------------------------------------------------- sessions */
#link-explain { margin: -2px 2px 14px; }
.sess { padding: 14px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); margin-bottom: 12px; animation: viewIn 0.35s var(--ease) both; }
.sess.linked { border-color: rgba(94, 231, 255, 0.5); box-shadow: 0 0 40px -18px rgba(94, 231, 255, 0.7); }
.sess-top { display: flex; align-items: center; gap: 10px; }
.sdot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--green); box-shadow: 0 0 10px var(--green); }
.sdot.busy { background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: kpulse 1s infinite; }
.sess-name { font-weight: 600; font-size: 15.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-tag { font-size: 10px; letter-spacing: 0.12em; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: rgba(94, 231, 255, 0.15); color: var(--cyan); }
.sess-tag.dim { background: rgba(255, 255, 255, 0.06); color: var(--dim); }
.sess-meta { margin: 6px 0 12px 20px; font-size: 12.5px; color: var(--dim); }
.sess-meta b { color: var(--ink-2); font-weight: 500; }
.sess-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.sess-actions button { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.sess-actions button.on { background: rgba(94, 231, 255, 0.14); border-color: rgba(94, 231, 255, 0.55); color: var(--cyan); }
.sess-actions .i { width: 15px; height: 15px; }
.sess-more { margin-top: 12px; }
.sess-send { display: flex; gap: 6px; }
.sess-send input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.3); outline: none; }
.peek { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.peek div { font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.035); white-space: pre-wrap; word-break: break-word; max-height: 140px; overflow: hidden; }
.peek div.user { background: rgba(94, 231, 255, 0.08); color: var(--ink); }
.peek div.assistant { color: var(--ink-2); }
.none-card { text-align: center; padding: 34px 20px; color: var(--dim); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }

/* ---------------------------------------------------------- usage */
.u-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.u-stat { padding: 16px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.u-stat small { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.u-stat b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; background: linear-gradient(120deg, #fff, #9fe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.u-stat span { font-size: 12px; color: var(--dim); }
.u-card { padding: 16px 14px 12px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); margin-bottom: 14px; }
.u-card h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; letter-spacing: 0.02em; }
.u-bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; }
.u-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.u-bar i { width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; background: linear-gradient(to top, rgba(94, 231, 255, 0.35), var(--cyan)); box-shadow: 0 0 18px -6px rgba(94, 231, 255, 0.8); min-height: 2px; transform-origin: bottom; animation: grow 0.7s var(--ease) both; }
.u-bar.today i { background: linear-gradient(to top, rgba(157, 139, 255, 0.45), var(--violet)); box-shadow: 0 0 18px -6px rgba(157, 139, 255, 0.9); }
.u-bar span { font-size: 9.5px; color: var(--mute); }
@keyframes grow { from { transform: scaleY(0); } }
.u-model { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; margin: 9px 0; font-size: 13px; }
.u-model .track { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.u-model .track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--cyan-2), var(--cyan)); animation: growx 0.8s var(--ease) both; transform-origin: left; }
@keyframes growx { from { transform: scaleX(0); } }
.u-model b { font-weight: 600; text-transform: capitalize; }
.u-model span { color: var(--dim); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- settings */
.group { padding: 16px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); margin-bottom: 14px; }
.group h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.group h3 .i { width: 17px; height: 17px; color: var(--cyan); }
.group > p { margin-bottom: 10px; line-height: 1.55; }
.row-list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); text-align: left; width: 100%; color: var(--ink); }
.row:first-child { border-top: 0; }
.row span small { display: block; color: var(--dim); font-size: 12px; margin-top: 1px; }
.row select { color: var(--cyan); font-weight: 600; }
.row .chev { color: var(--dim); font-size: 22px; line-height: 1; }
.mem-list { list-style: none; margin: 4px 0 12px; display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.mem-list li { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.035); color: var(--ink-2); }

/* ---------------------------------------------------------- sheets */
#veil { position: fixed; inset: 0; z-index: 20; background: rgba(2, 3, 8, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 86dvh; overflow-y: auto; padding: 10px 18px calc(22px + var(--sab));
  background: linear-gradient(to bottom, rgba(16, 21, 42, 0.97), rgba(8, 11, 24, 0.98)); border-top: 1px solid var(--line-2); border-radius: 26px 26px 0 0;
  box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, 0.8); animation: sheetUp 0.42s var(--spring);
}
@media (min-width: 700px) { .sheet { left: 50%; width: 560px; transform: translateX(-50%); } }
@keyframes sheetUp { from { transform: translateY(100%); } }
@media (min-width: 700px) { @keyframes sheetUp { from { transform: translate(-50%, 100%); } } }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 14px; }
.bp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.sheet-h { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); margin: 18px 0 8px; font-weight: 600; }
#bp-caps { min-height: 66px; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); margin-bottom: 12px; }
#bp-heard { font-size: 13px; font-style: italic; min-height: 1.3em; }
#bp-said { font-size: 16px; margin-top: 6px; color: var(--ink); text-shadow: 0 0 18px rgba(94, 231, 255, 0.35); }
.bp-target { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.bp-target b { color: var(--cyan); }
.bp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 13px; border-radius: 16px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); text-align: left; transition: border-color 0.2s, background 0.2s; }
.tile .i { color: var(--dim); margin-bottom: 6px; }
.tile b { font-size: 14px; font-weight: 600; }
.tile small { font-size: 11.5px; color: var(--dim); }
.tile.on { border-color: rgba(94, 231, 255, 0.55); background: rgba(94, 231, 255, 0.1); }
.tile.on .i { color: var(--cyan); }
#bp-self.on { border-color: rgba(157, 139, 255, 0.6); background: rgba(157, 139, 255, 0.13); }
#bp-self.on .i { color: var(--violet); }
#bp-type { display: flex; gap: 8px; }
#bp-type input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.3); outline: none; }
#bp-type input:focus { border-color: rgba(94, 231, 255, 0.6); }
#bp-type .attach { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; align-self: center; color: var(--ink); background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-2); }
#bp-type .attach:active { transform: scale(0.9); }
#bp-preview { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 6px 8px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); }
#bp-preview[hidden] { display: none; }
#bp-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; }
#bp-preview img[hidden], #bp-preview svg[hidden] { display: none; }
#bp-preview > svg.i { width: 32px; height: 32px; flex: none; color: var(--ink-2); }
.doc-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--ink); }
.doc-chip .i { width: 18px; height: 18px; flex: none; }
.doc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bp-preview-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.light #bp-type .attach, html.light #bp-preview { background: rgba(255, 255, 255, 0.85); }
.folder-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.folder-list button { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); text-align: left; font-size: 14px; }
.folder-list button .i { color: var(--dim); width: 18px; height: 18px; }
.folder-list button.on { border-color: rgba(94, 231, 255, 0.55); background: rgba(94, 231, 255, 0.1); }
.folder-list button.on .i { color: var(--cyan); }

/* ---------------------------------------------------------- the bot */
#bot { position: fixed; z-index: 15; width: 86px; height: 86px; left: calc(100% - 100px); top: calc(100% - 300px); touch-action: none; }
#bot-frame { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
#bot-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: transparent; color-scheme: normal; }
#bot-ring { position: absolute; inset: -7px; border-radius: 50%; pointer-events: none; border: 1.5px solid rgba(94, 231, 255, 0.0); transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s; }
#bot.awake #bot-ring { border-color: rgba(94, 231, 255, 0.35); box-shadow: 0 0 26px -4px rgba(94, 231, 255, 0.55); }
#bot.hearing #bot-ring { border-color: rgba(94, 231, 255, 0.8); transform: scale(1.06); }
#bot.thinking #bot-ring { border-color: rgba(157, 139, 255, 0.8); box-shadow: 0 0 30px -4px rgba(157, 139, 255, 0.7); border-style: dashed; animation: spin 3s linear infinite; }
#bot.acting #bot-ring { border-color: rgba(255, 181, 71, 0.85); box-shadow: 0 0 30px -4px rgba(255, 181, 71, 0.75); border-style: dashed; animation: spin 2s linear infinite; }
#bot.halted #bot-ring { border-color: rgba(255, 61, 94, 0.9); box-shadow: 0 0 30px -2px rgba(255, 61, 94, 0.8); }
#bot.dragging { transition: none; }
body.bot-panel #bot { z-index: 23; }
#bot.snapping { transition: left 0.45s var(--spring), top 0.45s var(--spring); }
#bot-bubble {
  position: absolute; bottom: 8px; right: calc(100% + 10px); width: max-content; max-width: min(250px, 62vw); padding: 10px 13px; border-radius: 16px 16px 5px 16px;
  background: rgba(10, 14, 30, 0.88); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 13px; line-height: 1.4; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.8); animation: viewIn 0.3s var(--ease); pointer-events: none;
}
#bot.left #bot-bubble { right: auto; left: calc(100% + 10px); border-radius: 16px 16px 16px 5px; }
#bot-heard { color: var(--dim); font-style: italic; font-size: 12px; }
#bot-heard:empty { display: none; }
#bot-said { color: var(--ink); }
#bot-said:empty { display: none; }

/* ---------------------------------------------------------- toast */
#toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--sab)); transform: translateX(-50%); z-index: 30; max-width: min(90vw, 460px);
  padding: 11px 16px; border-radius: 14px; background: rgba(14, 19, 38, 0.96); border: 1px solid var(--line-2); font-size: 13.5px;
  box-shadow: 0 20px 50px -14px rgba(0, 0, 0, 0.8); animation: toastIn 0.35s var(--spring);
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px) scale(0.96); } }

/* ---------------------------------------------------------- light mode
   Same deck, daylight: frosted white glass on a pale sky, accents deepened
   so they still read on white. Toggled in Settings → Appearance. */
html.light {
  --bg: #eef2fa;
  --bg-2: #e4eaf6;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-2: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --line: rgba(30, 50, 110, 0.12);
  --line-2: rgba(30, 50, 110, 0.22);
  --ink: #0b1330;
  --ink-2: #27324f;
  --dim: #56627f;
  --mute: #8791ab;
  --cyan: #00a3d4;
  --cyan-2: #0079b8;
  --violet: #6a55f0;
  --amber: #d58700;
  --green: #0fa968;
  --red: #e22d4d;
  color-scheme: light;
}
html.light #aurora { opacity: 0.32; }
html.light #aurora i { mix-blend-mode: multiply; }
html.light #grain { opacity: 0.025; }
html.light #topbar { background: linear-gradient(to bottom, rgba(246, 248, 253, 0.94), rgba(246, 248, 253, 0.7)); }
html.light #dock { background: linear-gradient(to top, rgba(248, 250, 254, 0.97), rgba(246, 248, 253, 0.8)); }
html.light #view-screen { background: radial-gradient(120% 80% at 50% 40%, #e9eef8, #d6deec); }
html.light #feed { box-shadow: 0 24px 60px -20px rgba(20, 30, 70, 0.45), 0 0 0 1px rgba(30, 50, 110, 0.15); }
html.light #screen-tools, html.light #composer { background: linear-gradient(to top, rgba(248, 250, 254, 0.95), rgba(248, 250, 254, 0.6)); }
html.light .sheet { background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(244, 247, 253, 0.99)); box-shadow: 0 -30px 80px -20px rgba(20, 30, 70, 0.35); }
html.light #veil { background: rgba(20, 30, 60, 0.28); }
html.light #toast, html.light #bot-bubble { background: rgba(255, 255, 255, 0.96); box-shadow: 0 18px 44px -14px rgba(20, 30, 70, 0.35); }
html.light #feed-hud, html.light #gesture-hint { background: rgba(255, 255, 255, 0.85); }
html.light .kill { color: #b31f3c; background: rgba(226, 45, 77, 0.08); }
html.light body.halted .kill { color: #fff; background: var(--red); }
html.light .hb-text span { color: #a31b36; }
html.light #act-text, html.light #act-stop { color: #7a4a00; }
html.light .md code { color: #006f93; background: rgba(10, 30, 80, 0.06); }
html.light .md pre { background: rgba(10, 30, 80, 0.05); }
html.light .md pre code { color: var(--ink-2); }
html.light .tools span { color: #4a37c9; background: rgba(106, 85, 240, 0.08); }
html.light .u-stat b { background: linear-gradient(120deg, var(--ink), var(--cyan-2)); -webkit-background-clip: text; background-clip: text; }
html.light .switch { background: rgba(10, 20, 60, 0.08); }
html.light .switch::after { background: #fff; box-shadow: 0 1px 4px rgba(10, 20, 60, 0.3); }
html.light #type-bar input, html.light .sess-send input, html.light #bp-type input, html.light #bp-caps { background: rgba(255, 255, 255, 0.85); }
html.light #keys-tray button, html.light .mem-list li, html.light .tile, html.light .folder-list button,
html.light .peek div, html.light .sess-actions button, html.light .u-model .track { background: rgba(10, 30, 80, 0.045); }
html.light #bp-said { text-shadow: none; }
html.light .pad button:active { background: rgba(0, 163, 212, 0.12); }

/* a phone on its side: every pixel of height goes to the screen */
@media (orientation: landscape) and (max-height: 540px) {
  #topbar { padding-top: calc(4px + var(--sat)); padding-bottom: 4px; }
  #dock { padding-top: 2px; }
  #dock button { padding: 4px 0 2px; }
  #dock button span { display: none; }
  #screen-tools { padding: 4px 10px; }
  .tool-row button { height: 34px; }
  #bot { width: 70px; height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  #aurora { display: none; }
}
