/* ============ CYBER EYES — core layout ============ */

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }

/* ---------- per-theme variables ---------- */
body[data-theme="datastorm"] {
  --bg: #020608; --fg: #bdf3ff; --dim: #6fa8b5; --prompt: #53e9ff;
  --accent: #53e9ff; --panel: #051014; --line: rgba(83,233,255,.28);
  --glow: 0 0 12px rgba(83,233,255,.45); --titlebar: #04141a;
}
body[data-theme="binary"] {
  --bg: #020409; --fg: #cfe2ff; --dim: #6d84a8; --prompt: #5f9dff;
  --accent: #5f9dff; --panel: #070d18; --line: rgba(95,157,255,.28);
  --glow: 0 0 12px rgba(95,157,255,.45); --titlebar: #060b16;
}
body[data-theme="operator"] {
  --bg: #010503; --fg: #8dffab; --dim: #4d8a5f; --prompt: #4dff7c;
  --accent: #4dff7c; --panel: #02100a; --line: rgba(77,255,124,.28);
  --glow: 0 0 12px rgba(77,255,124,.4); --titlebar: #031207;
}
body[data-theme="sysgrid"] {
  --bg: #0a0400; --fg: #ffdcb0; --dim: #a0723f; --prompt: #ff7b24;
  --accent: #ff7b24; --panel: #130a02; --line: rgba(255,123,36,.3);
  --glow: 0 0 12px rgba(255,123,36,.4); --titlebar: #170b02;
}
body[data-theme="crimson"] {
  --bg: #0b0206; --fg: #ffb3c6; --dim: #a05a6e; --prompt: #ff2e63;
  --accent: #ff2e63; --panel: #140309; --line: rgba(255,46,99,.32);
  --glow: 0 0 12px rgba(255,46,99,.45); --titlebar: #170309;
}
body[data-theme="white"] {
  --bg: #ffffff; --fg: #16191b; --dim: #6b7a80; --prompt: #006b81;
  --accent: #006b81; --panel: #f4f8f9; --line: rgba(0,107,129,.25);
  --glow: none; --titlebar: #eef4f5;
}
body[data-theme="dark"] {
  --bg: #06030c; --fg: #d9ccff; --dim: #6f5fa0; --prompt: #a179ff;
  --accent: #a179ff; --panel: #0b0716; --line: rgba(161,121,255,.28);
  --glow: 0 0 12px rgba(161,121,255,.4); --titlebar: #0a0614;
}
body[data-theme="vip"] {
  --bg: #020711; --fg: #a8f2ff; --dim: #5f7fa0; --prompt: #ffb13b;
  --accent: #ffb13b; --panel: #060d1d; --line: rgba(255,177,59,.32);
  --glow: 0 0 14px rgba(140,244,255,.4); --titlebar: #040a18;
}
body[data-theme="specter"] {
  --bg: #070313; --fg: #d9ccff; --dim: #7a68b0; --prompt: #9d7bff;
  --accent: #5f8dff; --panel: #0b0718; --line: rgba(141,123,255,.3);
  --glow: 0 0 12px rgba(141,123,255,.45); --titlebar: #0a0616;
}
body[data-theme="slot0"] {
  --bg: #100a0a; --fg: #c9ffd9; --dim: #4dff7c; --prompt: #4dff7c;
  --accent: #ff3131; --panel: #160b0b; --line: rgba(255,43,43,.32);
  --glow: 0 0 12px rgba(77,255,124,.4); --titlebar: #0d0606;
}
body[data-theme="cmd"] {
  --bg: #0a0c0a; --fg: #d8d8d8; --dim: #7f8a7f; --prompt: #4dff7c;
  --accent: #4dff7c; --panel: #0d100d; --line: rgba(77,255,124,.3);
  --glow: 0 0 12px rgba(77,255,124,.35); --titlebar: #0b0e0b;
}

/* ---------- environment wallpaper (the operator's own artwork) ---------- */
#envWall {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: .68; transition: opacity .5s ease;
}
#envWall::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.72));
}
/* ---------- live html preview ---------- */
.html-preview { margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.html-preview iframe { width: 100%; height: 230px; border: 0; display: block; background: #fff; }
.html-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel); font-size: 11px; letter-spacing: .12em; color: var(--dim); }
.html-bar button { background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 4px; padding: 2px 10px; font-size: 11px; letter-spacing: .1em; }

/* ---------- global fx layers ---------- */
#rain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .5;
}
/* Boot cinematic: the tetris-stack rain plays above everything. */
body.rain-cinema #rain { z-index: 80; opacity: 1; }
body[data-theme="white"] #rain { opacity: .12; }
#radarFx {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none; opacity: .6; display: none;
}
body[data-theme="slot0"] #radarFx { display: block; }
.scanlines {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}
body[data-theme="white"] .scanlines { opacity: .35; }

/* ============ COVER ============ */
.cover {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: #020608; overflow: hidden;
  transition: opacity .7s ease, visibility .7s;
}
.cover.gone { opacity: 0; visibility: hidden; }
.cover-bg {
  position: absolute; inset: 0;
  background: #020608 url('assets/cover.jpg') center / contain no-repeat;
}
.cover::after { display: none; }
/* The phrase lives inside the original artwork — show it untouched. */
.cover-kicker, .cover-title, .cover-sub { display: none; }
.cover .cover-inner {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 34px;
  display: flex; justify-content: center; padding: 0 24px;
  max-width: none; text-align: center;
}
.cover-inner {
  position: relative; z-index: 2; text-align: center;
  padding: 24px; max-width: 860px;
}
.cover-kicker {
  margin: 0 0 18px; font-size: 11px; letter-spacing: .42em; text-transform: uppercase;
  color: #7de9ff; text-shadow: 0 0 14px rgba(83,233,255,.8);
  animation: flicker 4s linear infinite;
}
.cover-title {
  margin: 0; font-family: "Rajdhani", sans-serif; font-weight: 700;
  font-size: clamp(38px, 9vw, 96px); line-height: .98; letter-spacing: -.01em;
  color: #eafcff; text-transform: lowercase;
}
.cover-title span { display: block; opacity: 0; animation: riseIn .8s ease forwards; }
.cover-title span:nth-child(1) { animation-delay: .15s; }
.cover-title span:nth-child(2) { animation-delay: .45s; }
.cover-title span:nth-child(3) { animation-delay: .75s; }
.cover-title span:nth-child(4) { animation-delay: 1.05s; }
.cover-accent {
  background: linear-gradient(92deg, #53e9ff, #b06bff 55%, #ff2e63);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(83,233,255,.55));
}
.cover-title em {
  font-style: normal; color: #53e9ff;
  text-shadow: 0 0 18px rgba(83,233,255,.9), 0 0 60px rgba(83,233,255,.5);
  animation: neonPulse 2.6s ease-in-out infinite;
}
.cover-sub {
  margin: 22px 0 30px; color: #9dc5cc; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; animation: riseIn .8s ease 1.35s forwards;
}
.enter-btn {
  min-height: 56px; padding: 0 34px;
  font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #001316; background: #53e9ff; border: 0; border-radius: 6px;
  box-shadow: 0 0 34px rgba(83,233,255,.55);
  animation: enterPulse 2s ease-in-out infinite, riseIn .8s ease 1.55s backwards;
}
.enter-btn:hover, .enter-btn:focus-visible { background: #9df3ff; outline: 3px solid #fff; outline-offset: 3px; }
.cover-legal { margin: 18px 0 0; font-size: 11px; letter-spacing: .1em; opacity: 0; animation: riseIn .8s ease 1.75s forwards; }
.cover-legal a { color: #6f9aa2; text-decoration: underline; text-underline-offset: 3px; }
.cover-legal a:hover, .cover-legal a:focus-visible { color: #9df3ff; outline: 2px solid #fff; outline-offset: 2px; }
.ios-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(2,8,12,.82); }
.ios-modal.hidden { display: none; }
.ios-modal-box { max-width: 420px; margin: 16px; padding: 26px 26px 22px; background: #06121a; border: 1px solid rgba(83,233,255,.35); border-radius: 10px; box-shadow: 0 0 44px rgba(83,233,255,.25); color: #cfeef4; }
.ios-modal-box h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: .06em; color: #9df3ff; }
.ios-steps { margin: 0 0 14px; padding-left: 22px; line-height: 1.75; font-size: 14px; }
.ios-steps .dim { color: #6f9aa2; }
.ios-note { font-size: 12px; line-height: 1.6; color: #8fb6bd; margin: 0 0 18px; }
.ios-modal-box .enter-btn { width: 100%; }
@keyframes riseIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes neonPulse { 0%,100% { text-shadow: 0 0 18px rgba(83,233,255,.9), 0 0 60px rgba(83,233,255,.5);} 50% { text-shadow: 0 0 30px rgba(83,233,255,1), 0 0 90px rgba(83,233,255,.7);} }
@keyframes enterPulse { 0%,100% { box-shadow: 0 0 24px rgba(83,233,255,.45);} 50% { box-shadow: 0 0 46px rgba(83,233,255,.8);} }
@keyframes flicker { 0%,100% {opacity:1;} 92% {opacity:1;} 93% {opacity:.4;} 94% {opacity:1;} 96% {opacity:.6;} 97% {opacity:1;} }

/* ============ BOOT ============ */
.boot {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  background: var(--bg); padding: 20px;
}
/* login stage wears the operator's own artwork, full-bleed */
.boot.login-live { background: #020608 url('assets/login.jpg') center / cover no-repeat; }
.boot.login-live::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,6,8,.30), rgba(2,6,8,.72));
}
.boot.login-live .boot-box {
  position: relative; z-index: 1;
  background: rgba(4,12,16,.78);
}
.boot-box {
  width: min(680px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 22px; box-shadow: var(--glow);
}
.boot-log { margin: 0 0 8px; white-space: pre-wrap; font-size: 13px; line-height: 1.7; color: var(--fg); }
.boot-log .ok { color: var(--prompt); }
.login { display: grid; gap: 12px; margin-top: 14px; }
.login label { display: grid; gap: 6px; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.login input {
  font: inherit; font-size: 16px; color: var(--fg);
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  padding: 12px; width: 100%;
}
.login input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.login button {
  min-height: 48px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 13px;
  color: var(--bg); background: var(--accent); border: 0; border-radius: 4px;
}
.login button:hover, .login button:focus-visible { filter: brightness(1.15); outline: 3px solid var(--fg); outline-offset: 2px; }

/* ============ CONSOLE ============ */
.console {
  position: relative; z-index: 2;
  min-height: 100svh; display: flex; flex-direction: column;
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
}
body[data-theme="white"] .console {
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 84px; padding: 12px 16px; background: var(--titlebar);
  border-bottom: 1px solid var(--line); color: var(--fg);
  position: sticky; top: 0; z-index: 20;
}
.brand { font-family: "Rajdhani", sans-serif; font-weight: 700; font-size: 19px; letter-spacing: .06em; color: var(--prompt); text-shadow: var(--glow); }
.brand .ver { font-family: "IBM Plex Mono", monospace; font-weight: 400; font-size: 11px; color: var(--dim); margin-left: 8px; text-shadow: none; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
#clock { font-size: 12px; color: var(--dim); }
.theme-btn {
  min-height: 44px; padding: 0 18px; font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--bg); background: var(--accent); border: 0; border-radius: 4px;
}
.theme-btn:hover, .theme-btn:focus-visible { filter: brightness(1.12); outline: 3px solid var(--fg); outline-offset: 2px; }

/* ---------- theme drawer ---------- */
.drawer {
  border-bottom: 1px solid var(--line); background: var(--panel);
  padding: 18px 16px 22px; max-height: 62vh; overflow-y: auto;
}
.drawer h2 { margin: 0 0 4px; font-family: "Rajdhani", sans-serif; font-size: 24px; color: var(--fg); }
.drawer p { margin: 0 0 14px; font-size: 11px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.theme-card {
  position: relative; display: grid; grid-template-rows: auto 1fr;
  padding: 0; overflow: hidden; text-align: left;
  color: #f0fdff; background: #051014;
  border: 1px solid var(--line); border-radius: 5px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.theme-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.theme-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--line), 0 14px 34px rgba(0,0,0,.35); }
.theme-card[aria-pressed="true"] .option-number { color: #001418; background: var(--accent); }
.thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #020506; }
.thumb > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.option-number {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  min-width: 32px; padding: 4px 6px; text-align: center; font-size: 10px;
  color: #b8f6ff; background: rgba(2,10,13,.88);
  border: 1px solid rgba(105,235,255,.38); border-radius: 3px;
}
.theme-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; background: #071115; }
.theme-label strong { display: block; font-family: "Rajdhani", sans-serif; font-size: 17px; line-height: 1; }
.theme-label small { display: block; margin-top: 4px; color: #8fb8bf; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.check { color: #6eeafa; font-size: 18px; opacity: 0; flex: 0 0 auto; }
.theme-card[aria-pressed="true"] .check { opacity: 1; }
.mini-term { width: 100%; height: 100%; padding: 12px; font-size: 8px; line-height: 1.55; overflow: hidden; text-align: left; }
.mini-term .tbar { display: flex; gap: 4px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid currentColor; opacity: .5; }
.mini-term .tbar i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mini-white { color: #16191b; background: #fff; }
.mini-white .pr { color: #006b81; font-weight: 600; }
.mini-dark { color: #77f3a6; background: #010403; }
.mini-dark .pr { color: #62e7ff; }

/* ---------- terminal ---------- */
.terminal {
  flex: 1; width: min(980px, 100%); margin: 0 auto;
  padding: 20px 16px 12px; font-size: calc(14px * var(--tzoom, 1)); line-height: 1.65;
  color: var(--fg); text-shadow: var(--glow);
}
body[data-theme="white"] .terminal { text-shadow: none; }
#output { white-space: pre-wrap; word-break: break-word; }
#output .dim { color: var(--dim); }
#output .acc { color: var(--accent); font-weight: 600; }
#output .prm { color: var(--prompt); font-weight: 600; }
#output .err { color: #ff5d5d; }
#output .dym { color: var(--prompt); font-weight: 600; cursor: pointer; border-bottom: 1px dotted var(--dim); }
#output .dym:hover { color: var(--accent); }
#output .tut-hero { display: block; max-width: 230px; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; }
#output .about-photo { display: block; width: 120px; height: 120px; object-fit: cover; border: 1px solid var(--accent); border-radius: 10px; margin: 4px 0 10px; box-shadow: 0 0 18px rgba(0,255,255,.25); }
#output .tut-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
#output .tut-tile { width: 68px; text-align: center; }
#output .tut-tile img, #output .tut-swatch { display: block; width: 68px; height: 42px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
#output .tut-tile span { font-size: 9px; color: var(--dim); }
#output .diploma { border: 1px solid var(--accent); border-radius: 8px; padding: 10px 12px; margin: 8px 0; color: var(--fg); white-space: pre-wrap; }
#output .wavefx { margin: 4px 0; color: var(--accent); font-size: 11px; line-height: 1.15; }
body[data-theme="white"] #output .err { color: #c00; }
.input-row { display: flex; align-items: baseline; gap: 8px; padding: 6px 0 18px; }

/* ============ COMMAND SUGGESTION BAR ============ */
.suggest-bar {
  display: flex; align-items: center; gap: 8px;
  overflow-x: auto; padding: 8px 2px; margin-top: 6px;
  border-top: 1px dashed var(--line);
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.sug-label {
  flex: 0 0 auto; color: var(--dim); font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.sug-chip {
  flex: 0 0 auto; font: inherit; font-size: 13px;
  color: var(--accent); background: transparent;
  border: 1px solid var(--line); border-radius: 20px;
  padding: 7px 13px; cursor: pointer; white-space: nowrap;
}
.sug-chip:hover, .sug-chip:focus-visible { border-color: var(--accent); background: var(--line); outline: none; }
.sug-chip:active { transform: scale(.96); }

/* ============ COMMAND TOOLBOX ============ */
.toolbox { border-top: 1px dashed var(--line); margin-top: 8px; }
.toolbox-toggle {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: transparent; border: 0; cursor: pointer; font: inherit;
  color: var(--accent); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  padding: 8px 2px; text-align: left;
}
.toolbox-toggle .dim { color: var(--dim); font-size: 11px; letter-spacing: .04em; text-transform: none; }
.toolbox-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.toolbox.collapsed .toolbox-body { display: none; }
.toolbox-body { max-height: 190px; overflow-y: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.tb-cat { color: var(--dim); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; margin: 8px 0 4px; }
.tb-cat:first-child { margin-top: 2px; }
.tb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-chip {
  font: inherit; font-size: 12px; color: var(--fg); background: transparent;
  border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 10px; cursor: pointer; white-space: nowrap;
}
.tb-chip:hover, .tb-chip:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.tb-chip:active { transform: scale(.95); }
.tb-chip.tb-locked, .sug-chip.tb-locked { color: var(--dim); border-style: dashed; }

/* ============ TIER BADGE ============ */
.tier-badge {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 20px;
  padding: 5px 10px; white-space: nowrap;
}

/* ============ TOPBAR ACTION BUTTONS ============ */
.top-btn {
  min-height: 44px; padding: 0 14px; font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; font-family: inherit;
  color: var(--fg); background: transparent;
  border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
}
.top-btn:hover, .top-btn:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.top-btn-accent { color: var(--accent); border-color: var(--accent); }
.top-btn-accent:hover, .top-btn-accent:focus-visible { background: var(--line); }
/* Type-0-Way hero badge: the one AI presence, centered at the top of the screen */
.t0way-badge {
  position: relative; padding: 0; cursor: pointer;
  background: transparent; border: none; border-radius: 50%; flex: none;
}
.t0way-hero {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 60px; height: 60px;
}
.t0way-badge img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block;
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--accent), 0 0 22px rgba(0, 255, 255, .25);
  animation: eye-breathe 3.2s ease-in-out infinite;
}
.t0way-badge:hover img, .t0way-badge:focus-visible img { outline: none; box-shadow: 0 0 14px var(--accent), 0 0 34px rgba(0, 255, 255, .45); }
.t0way-badge .t0way-dot {
  position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: #39ff6a; border: 2px solid #000;
}
@media (prefers-reduced-motion: reduce) {
  .t0way-badge img { animation: none; }
}
@keyframes eye-breathe {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.06); filter: brightness(1.18); }
}
#output .t0way-photo { display: block; width: 96px; height: 96px; object-fit: cover; border: 2px solid var(--accent); border-radius: 50%; margin: 4px 0 10px; box-shadow: 0 0 18px rgba(0,255,255,.35); }
.prompt { color: var(--prompt); font-weight: 600; white-space: nowrap; }
.chat-t .t0w-code {
  display: block; background: #02070a; border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; margin: 8px 0; overflow-x: auto; white-space: pre;
  font-size: 12px; line-height: 1.5; color: var(--fg);
}
#cmdInput {
  flex: 1; min-width: 0; font: inherit; font-size: 16px;
  color: var(--fg); background: transparent; border: 0; outline: none;
  caret-color: var(--accent); text-shadow: var(--glow);
}
body[data-theme="white"] #cmdInput { text-shadow: none; }
.console-foot {
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--titlebar);
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}

/* ============ PRICING ============ */
.price-btn {
  min-height: 44px; padding: 0 18px; font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: transparent;
  border: 1px solid var(--accent); border-radius: 4px;
}
.price-btn:hover, .price-btn:focus-visible { background: var(--line); outline: 3px solid var(--fg); outline-offset: 2px; }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.price-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 20px 18px; color: var(--fg);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.price-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.price-card.vip { border-color: var(--accent); box-shadow: var(--glow); }
.tier-tag {
  align-self: flex-start; font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim); border: 1px solid var(--line); border-radius: 3px; padding: 4px 8px;
}
.price-card.vip .tier-tag {
  color: var(--bg); background: var(--accent); border-color: var(--accent); font-weight: 600;
}
.price-card h3 { margin: 0; font-family: "Rajdhani", sans-serif; font-size: 26px; letter-spacing: .04em; color: var(--fg); }
.tier-price { display: flex; align-items: baseline; gap: 8px; }
.tier-price .amount {
  font-family: "Rajdhani", sans-serif; font-size: 40px; font-weight: 700;
  color: var(--prompt); text-shadow: var(--glow);
}
.tier-price .per { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.tier-features { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 12.5px; line-height: 1.5; flex: 1; }
.tier-features li { padding-left: 18px; position: relative; }
.tier-features li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }
.get-btn {
  min-height: 52px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--bg); background: var(--accent); border: 0; border-radius: 4px;
}
.get-btn:hover, .get-btn:focus-visible { filter: brightness(1.12); outline: 3px solid var(--fg); outline-offset: 2px; }
.price-card.vip .get-btn { box-shadow: var(--glow); }
.tier-note { margin: 0; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .theme-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .price-grid { grid-template-columns: 1fr; }
  .topbar-right { gap: 8px; }
  .price-btn, .theme-btn { padding: 0 12px; }
  .t0way-hero { width: 44px; height: 44px; }
  .topbar { min-height: 0; }
}
@media (max-width: 520px) {
  .theme-grid { grid-template-columns: 1fr; }
  .terminal { font-size: calc(13px * var(--tzoom, 1)); }
  #clock { display: none; }
  .brand { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cover-title span, .cover-sub, .enter-btn { animation: none !important; opacity: 1 !important; }
  .cover { transition: none; }
  .theme-card { transition: none; }
}

/* ---------- always-landscape: rotate the whole app when the viewport is portrait ----------
   (opt-out: body.orient-portrait keeps the natural straight up-and-down view) ---------- */
@media (orientation: portrait) {
  body:not(.orient-portrait) {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 100vh;
    width: 100dvh;
    height: 100vw;
    overflow: hidden;
    transform: translate(-50%, -50%) rotate(90deg);
  }
}

/* ---------- display drawer: rotation + zoom ---------- */
.display-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 10px 0; font-size: 14px;
}
.display-row > span:first-child { min-width: 130px; color: var(--dim); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.disp-btn {
  border: 1px solid var(--line); background: #0a1418; color: var(--fg);
  padding: 10px 14px; border-radius: 6px; font-size: 15px; cursor: pointer;
}
.disp-btn.active { border-color: var(--accent); color: var(--accent); box-shadow: var(--glow); }
#zoomLabel { min-width: 56px; text-align: center; color: var(--accent); font-weight: 700; }

/* ---------- SPECTER: QR code display ---------- */
.qrimg {
  display: block;
  width: 220px; height: 220px;
  image-rendering: pixelated;
  background: #fff; padding: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--glow);
  margin: 8px 0;
}
#qrcam-slot .qrimg { background: #000; padding: 0; }

/* ---------- copy-shield: cover copyright line ---------- */
.cover-copy {
  margin: 10px 0 0;
  font-size: 12px;
  color: #4dff7c;
  letter-spacing: .04em;
}

/* ---------- Talk to Type-0-Way: live chat ---------- */
.t0wbtn {
  display: inline-block;
  margin: 10px 4px 2px 0;
  padding: 9px 16px;
  border: 1px solid rgba(168, 85, 247, .65);
  border-radius: 999px;
  background: rgba(88, 28, 135, .35);
  color: #e9d5ff;
  font-size: 13px;
  letter-spacing: .03em;
  cursor: pointer;
  user-select: none;
}
.t0wbtn:hover, .t0wbtn:active { background: rgba(88, 28, 135, .6); box-shadow: 0 0 14px rgba(168, 85, 247, .45); }
.chat-u-row { display: flex; justify-content: flex-end; margin: 8px 0 3px; }
.chat-u {
  max-width: 85%;
  background: rgba(34, 211, 238, .13);
  border: 1px solid rgba(34, 211, 238, .45);
  color: #cffafe;
  border-radius: 14px 14px 4px 14px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}
.chat-t-row { display: flex; gap: 8px; align-items: flex-start; margin: 3px 0 8px; }
.chat-t-row img.chat-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(168, 85, 247, .7);
  box-shadow: 0 0 10px rgba(168, 85, 247, .4);
  flex: none;
  margin-top: 2px;
  object-fit: cover;
}
.chat-t {
  max-width: 88%;
  background: rgba(88, 28, 135, .28);
  border: 1px solid rgba(168, 85, 247, .45);
  color: #f3e8ff;
  border-radius: 4px 14px 14px 14px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}
.chat-t.typing { opacity: .6; font-style: italic; }

/* ---------- quick menu: point, click, go ---------- */
.quick-drawer .quick-h {
  margin: 18px 0 10px; font-family: "Rajdhani", sans-serif; font-size: 15px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
.quick-drawer .quick-h:first-of-type { margin-top: 0; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.quick-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 118px; padding: 12px 8px 10px; cursor: pointer;
  color: var(--fg); background: var(--panel2, #0a1216);
  border: 1px solid var(--line); border-radius: 8px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.quick-tile:hover, .quick-tile:focus-visible { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 22px rgba(0,0,0,.35); outline: none; }
.quick-tile img.q-pic { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); box-shadow: 0 0 12px rgba(105,235,255,.35); }
.quick-tile .q-emoji { font-size: 40px; line-height: 54px; }
.quick-tile img.q-thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.quick-tile .q-thumb-plain { display: block; width: 100%; aspect-ratio: 16/10; border-radius: 6px; border: 1px solid var(--line); background: #eef3f6; }
.quick-grid-themes { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.quick-tile .q-name { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-align: center; }
.quick-tile .q-sub { font-size: 10px; color: var(--dim); text-align: center; line-height: 1.3; }
.quick-tile .q-mine { font-size: 10px; color: var(--accent); font-weight: 700; }
.tier-badge { cursor: pointer; }
@media (max-width: 560px) {
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* geolocation: satellite grid view with radar beacon on the target */
.geo-wrap { position: relative; margin: 8px 0 2px; border: 1px solid rgba(0,255,255,.35); border-radius: 10px; overflow: hidden; max-width: 560px; }
.geo-wrap iframe { width: 100%; height: 230px; border: 0; display: block; background: #02131a; }
.geo-tag { position: absolute; left: 8px; top: 8px; z-index: 2; font-size: 11px; letter-spacing: 1px; color: #0ff; background: rgba(0,10,14,.72); border: 1px solid rgba(0,255,255,.4); border-radius: 6px; padding: 3px 8px; pointer-events: none; }
.geo-beacon { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; z-index: 2; }
.geo-beacon::before { content: ""; position: absolute; left: 26px; top: 26px; width: 12px; height: 12px; background: #ff2b2b; border-radius: 50%; box-shadow: 0 0 14px #ff2b2b, 0 0 4px #fff; }
.geo-beacon::after { content: ""; position: absolute; inset: 0; border: 2px solid rgba(255,43,43,.9); border-radius: 50%; animation: geoping 1.8s ease-out infinite; }
@keyframes geoping { 0% { transform: scale(.25); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.geo-links { margin: 6px 0 2px; }
#output .geo-link { color: var(--prompt); font-weight: 600; cursor: pointer; border-bottom: 1px dotted var(--dim); text-decoration: none; }
#output .geo-link:hover { color: var(--accent); }
