:root {
  --device: #d6d2c6;
  --device-dark: #b6b0a3;
  --ink: #222428;
  --screen-frame: #585b61;
  --lcd: #9cab72;
  --lcd-dark: #243520;
  --accent: #6e1e50;
  --shadow: rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: #efede7; color: var(--ink); font-family: "Courier New", Courier, monospace; }
button, input { font: inherit; }
.stage { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.device { position: relative; width: min(94vw, 440px); min-height: 720px; padding: 28px 28px 24px; border-radius: 26px 26px 64px 26px; background: var(--device); border: 1px solid #c5c0b5; box-shadow: 0 28px 60px var(--shadow), inset 0 2px 0 rgba(255,255,255,.75), inset 0 -3px 0 rgba(0,0,0,.08); }
.lab-back { position: absolute; top: 24px; right: 28px; z-index: 4; padding: 5px 8px 4px; border: 1px solid rgba(34,36,40,.32); border-radius: 3px; color: rgba(34,36,40,.7); background: rgba(255,255,255,.16); font: 700 9px/1 Arial, sans-serif; letter-spacing: .1em; text-decoration: none; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.lab-back:hover, .lab-back:focus-visible { color: #fff; background: var(--accent); border-color: var(--accent); outline: none; }
.lab-back:active { transform: translateY(2px); box-shadow: none; }
.brand-row { margin: 2px 8px 12px; }
.brand { font: 700 20px/1 Arial, sans-serif; letter-spacing: .12em; font-style: italic; }
.subbrand { margin-top: 5px; font: 700 8px/1.2 Arial, sans-serif; letter-spacing: .13em; opacity: .62; }
.screen-shell { background: var(--screen-frame); padding: 18px 18px 22px; border-radius: 14px 14px 34px 14px; box-shadow: inset 0 3px 8px rgba(0,0,0,.35); }
.screen-meta { display: flex; justify-content: space-between; color: #d3d4d6; font-size: 9px; letter-spacing: .08em; margin-bottom: 8px; }
.screen { height: 300px; overflow-y: auto; padding: 14px; border: 4px solid #2f3333; border-radius: 3px; background: repeating-linear-gradient(to bottom,rgba(255,255,255,.025) 0,rgba(255,255,255,.025) 2px,rgba(0,0,0,.015) 3px,rgba(0,0,0,.015) 4px), var(--lcd); color: var(--lcd-dark); font-size: 13px; line-height: 1.38; text-transform: uppercase; text-shadow: 0 0 1px rgba(36,53,32,.25); box-shadow: inset 0 0 18px rgba(45,60,32,.35); scrollbar-width: thin; }
.boot .spacer { height: 18px; }
.cursor-line { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.conversation { display: grid; gap: 13px; }
.turn { display: grid; gap: 5px; }
.user-line { opacity: .78; }
.bot-line { font-weight: 700; white-space: pre-wrap; }
.system-line { opacity: .7; }
.input-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; padding: 7px 10px; background: #2f3333; color: var(--lcd); border-radius: 2px; }
.prompt { font-weight: 700; }
.input-row input { width: 100%; border: 0; outline: 0; color: var(--lcd); background: transparent; text-transform: none; caret-color: var(--lcd); font-size: 13px; }
.input-row input::placeholder { color: rgba(156,171,114,.58); }
.controls { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; margin: 48px 8px 24px; }
.dpad { width: 118px; height: 118px; position: relative; filter: drop-shadow(0 5px 2px rgba(0,0,0,.2)); }
.dpad span { position: absolute; background: #303135; }
.d-up, .d-down { width: 40px; height: 118px; left: 39px; border-radius: 6px; }
.d-left, .d-right { width: 118px; height: 40px; top: 39px; border-radius: 6px; }
.d-center { width: 40px; height: 40px; left: 39px; top: 39px; box-shadow: inset 0 0 0 2px #27282b; }
.right-controls { position: relative; height: 132px; transform: rotate(-19deg); }
.round-button { position: absolute; width: 62px; height: 62px; border-radius: 50%; border: 0; color: #d7c8d2; background: var(--accent); font: 700 20px/1 Arial, sans-serif; box-shadow: 0 6px 0 #50153a, 0 9px 12px rgba(0,0,0,.2); cursor: pointer; }
.round-button:active { transform: translateY(4px); box-shadow: 0 2px 0 #50153a; }
.b-button { left: 8px; top: 50px; }
.a-button { right: 8px; top: 10px; }
.button-labels { position: absolute; left: 4px; right: 0; bottom: -7px; display: flex; justify-content: space-between; font: 700 8px/1 Arial, sans-serif; letter-spacing: .1em; }
.system-buttons { display: flex; justify-content: center; gap: 18px; transform: rotate(-19deg); }
.pill { width: 74px; height: 18px; border-radius: 100px; border: 0; background: #77736f; color: transparent; box-shadow: inset 0 2px 2px rgba(255,255,255,.25), 0 3px 2px rgba(0,0,0,.18); cursor: pointer; }
.pill:active { transform: translateY(2px); }
.system-labels { display: flex; justify-content: center; gap: 56px; margin: 9px 0 0; font: 700 8px/1 Arial, sans-serif; letter-spacing: .12em; opacity: .65; }
.speaker { position: absolute; right: 34px; bottom: 26px; display: flex; gap: 8px; transform: rotate(-31deg); }
.speaker span { display: block; width: 5px; height: 44px; border-radius: 6px; background: #aaa59b; box-shadow: inset 1px 0 1px rgba(0,0,0,.2); }
.lab-mark { position: absolute; left: 34px; bottom: 30px; font: 700 8px/1 Arial, sans-serif; letter-spacing: .12em; opacity: .5; }
@media (max-width: 480px) { .stage { padding: 0; align-items: start; } .device { width: 100%; min-height: 100vh; border-radius: 0 0 44px 0; padding: 22px 18px; } .lab-back { top: 18px; right: 18px; } .screen { height: min(38vh, 300px); } .controls { margin-top: 38px; gap: 18px; } .speaker { right: 22px; bottom: 22px; } .lab-mark { left: 22px; bottom: 25px; } }
.thinking-line { opacity: .62; font-weight: 400; animation: compute-blink .52s steps(1) infinite; }
.screen.busy { filter: saturate(.92) contrast(1.03); }
@keyframes compute-blink { 50% { opacity: .35; } }
.round-button:disabled { cursor: default; opacity: .72; }
