/* THE FLOOR — 1990s trading floor. One accent: the lamp (#fcd86c), the same one the
   landing measured out of the pixel art. Green and red are reserved for up and down. */

:root {
  --bg:       #131110;
  --panel:    #1b1917;
  --panel-2:  #242120;
  --raised:   #302c2a;
  --line:     rgba(255,240,214,.09);
  --line-2:   rgba(255,240,214,.17);
  --ink:      #f0ece4;
  --ink-2:    #a8a29a;
  --ink-3:    #6e6862;
  --accent:   #fcd86c;
  --accent-hi:#fff0b0;
  --brass:    #c9a83f;
  --danger:   #e0776a;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r: 3px;
  --ease: cubic-bezier(.2,.7,.3,1);
  --dur: 160ms;

  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul { list-style: none; }

.screen { position: fixed; inset: 0; display: none; }
.screen[data-active] { display: block; }

/* ───────────────────────────────────────────────────── shared bits */

.btn {
  height: 38px; padding: 0 var(--s4);
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--panel-2); color: var(--ink);
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform 90ms var(--ease);
}
.btn:hover { background: var(--raised); border-color: rgba(255,255,255,.26); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--primary {
  background: var(--accent); border-color: var(--accent); color: #2a1e08; font-weight: 700;
}
.btn--primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn--sm { height: 32px; font-size: 11px; width: 100%; }

.card { background: var(--panel); display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.card--fill { flex: 1; min-height: 0; }
.card__head {
  height: 36px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--s4); border-bottom: 1px solid var(--line);
}
.card__head h2 {
  font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2);
}
.card__body { padding: var(--s4); min-height: 0; overflow-y: auto; }

.status { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.status div { background: var(--panel); padding: var(--s3); display: grid; gap: 2px; }
.status i { font-style: normal; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.status b { font-family: var(--mono); font-size: 20px; font-weight: 500; }
.status b.live { color: var(--accent); }

.kv { display: flex; align-items: baseline; gap: var(--s2); }
.kv i { font-style: normal; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.kv b { font-size: 13px; font-weight: 600; }

/* ───────────────────────────────────────────────────── door */

/* ───────────────────────────────────────────────────── gate

   One card, one button. Picking a desk used to be a five-step errand —
   walk in, hunt the floor, click a chair, claim it, switch the machine on.
   Now the only thing the player decides is who they are.
   ──────────────────────────────────────────────────────────────────── */

.gate {
  height: 100%;
  display: grid; align-content: center; justify-items: center;
  gap: var(--s5); padding: var(--s6) var(--s5);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(252,216,108,.07) 0%, transparent 60%),
    var(--bg);
}

.gate__card {
  width: min(440px, 100%);
  display: grid; gap: var(--s4);
  padding: var(--s6) var(--s5) var(--s5);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}

.gate__head { display: grid; gap: 6px; justify-items: center; text-align: center; }
.gate__mark {
  font-size: 26px; font-weight: 800; letter-spacing: -.02em; text-transform: uppercase;
}
.gate__sub { font-size: 13px; color: var(--ink-2); }

/* ── who you are ── */

.idbox {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: var(--s3);
  padding: var(--s3);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r);
}
.idbox__pic {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--raised) center / cover no-repeat;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 17px; color: var(--ink-3);
}
.idbox__pic.has { border-color: var(--accent); }
.idbox__txt { display: grid; gap: 2px; min-width: 0; }
.idbox__txt b {
  font-size: 14.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idbox__txt i { font-style: normal; font-size: 11px; color: var(--ink-3); }
.idbox__clear {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  padding: 5px var(--s2); border: 1px solid var(--line); border-radius: var(--r);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.idbox__clear:hover { color: var(--ink); border-color: var(--line-2); }

/* ── the two ways in ── */

.ways { display: grid; gap: var(--s3); }
.way { display: grid; gap: 7px; }
.way__lbl {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.xmark { width: 11px; height: 11px; flex: none; color: var(--ink-2); }
.way__row {
  display: flex; align-items: stretch;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color var(--dur) var(--ease);
}
.way__row:focus-within { border-color: var(--accent); }
.way__at {
  display: grid; place-items: center; width: 30px; flex: none;
  font-family: var(--mono); font-size: 14px; color: var(--ink-3);
  border-right: 1px solid var(--line);
}
.way__in {
  flex: 1; min-width: 0; height: 40px; padding: 0 var(--s3);
  background: none; border: 0;
  font-family: var(--mono); font-size: 14px; letter-spacing: .04em; color: var(--ink);
}
.way__in:focus { outline: none; }
.way__in::placeholder { color: var(--ink-3); letter-spacing: .1em; }
#door-name { text-transform: uppercase; }
.way__go {
  flex: none; padding: 0 var(--s4);
  border-left: 1px solid var(--line);
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.way__go:hover:not(:disabled) { color: var(--ink); background: var(--raised); }
.way__go:disabled { color: var(--ink-3); cursor: default; }
.way__note { font-size: 11px; color: var(--ink-3); line-height: 1.45; }

.ways__or {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s3);
}
.ways__or::before, .ways__or::after { content: ''; height: 1px; background: var(--line); }
.ways__or span {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}

/* ── the one button ── */

.gate__enter {
  height: 48px;
  background: var(--accent); color: #2a1e08;
  border: 1px solid var(--accent); border-radius: var(--r);
  font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  transition: background var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.gate__enter:hover:not(:disabled) { background: var(--accent-hi); }
.gate__enter:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.gate__enter:disabled {
  background: var(--raised); border-color: var(--line); color: var(--ink-3); cursor: default;
}

/* Reserved so an error never shifts the button, but pulled tight against it
   so an empty line does not read as a gap in the card. */
.gate__enter + .gate__err { margin-top: -10px; margin-bottom: -8px; }
.gate__err { min-height: 14px; font-size: 11.5px; color: var(--danger); text-align: center; }

.gate__facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden;
}
.gate__facts li {
  background: var(--panel-2); padding: var(--s3);
  display: grid; gap: 2px; justify-items: center; text-align: center;
}
.gate__facts b { font-family: var(--mono); font-size: 19px; font-weight: 500; }
.gate__facts span { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.kv--you { position: relative; padding-right: 24px; }
.mug {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--raised) center / cover no-repeat;
  border: 1px solid var(--accent);
}

.gate__foot { font-size: 11.5px; color: var(--ink-3); text-align: center; max-width: 380px; }

/* Once you have picked a name, the two input rows stop competing with the
   button that actually does something. */
.gate__card.ready .ways { opacity: .5; transition: opacity var(--dur) var(--ease); }
.gate__card.ready .ways:hover, .gate__card.ready .ways:focus-within { opacity: 1; }

/* ───────────────────────────────────────────────────── chat */

.chat { display: grid; gap: 6px; align-content: start; }
.chat li { font-size: 12px; color: var(--ink-2); word-break: break-word; line-height: 1.5; }
.chat li b { color: var(--ink); font-weight: 600; }
.chat li.sys { color: var(--ink-3); font-style: italic; font-size: 11.5px; }
.chat li.sys::before { content: '· '; }

/* ───────────────────────────────────────────────────── floor */

#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }

.bar {
  position: absolute; top: 0; left: 0; right: 0; height: 48px; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--s5);
  background: rgba(19,17,16,.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.bar__brand { font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.bar__meta { display: flex; gap: var(--s5); }

.tools {
  position: absolute; top: 64px; left: var(--s5); z-index: 4;
  display: flex; flex-direction: column; gap: var(--s1); align-items: flex-start;
}
.tool {
  padding: 7px var(--s3);
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: rgba(19,17,16,.86);
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  backdrop-filter: blur(6px);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.tool:hover { border-color: var(--line-2); color: var(--ink); }
.tool[data-on] { border-color: var(--accent); color: var(--accent); }

.hint {
  position: absolute; bottom: var(--s4); left: 50%; transform: translateX(-50%); z-index: 4;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  background: rgba(19,17,16,.84); padding: 6px var(--s3);
  border: 1px solid var(--line); border-radius: var(--r);
}

.side {
  position: absolute; right: 0; top: 48px; bottom: 0; width: 252px; z-index: 4;
  background: rgba(19,17,16,.92);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  backdrop-filter: blur(8px);
}
.chat--live { flex: 1; overflow-y: auto; padding: var(--s4); scrollbar-width: thin; }

.saybox { display: flex; gap: var(--s1); padding: var(--s3); border-top: 1px solid var(--line); }
.saybox__in {
  flex: 1; min-width: 0; height: 34px; padding: 0 var(--s3);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r);
  font-size: 12.5px;
}
.saybox__in:focus { outline: none; border-color: var(--accent); }
.saybox__go {
  padding: 0 var(--s3); border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--panel-2); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
}
.saybox__go:hover { background: var(--raised); }

.deskcard[hidden] { display: none; }
.deskcard {
  position: absolute; z-index: 6; width: 190px;
  padding: var(--s3);
  background: rgba(26,23,21,.96);
  border: 1px solid var(--line-2); border-radius: var(--r);
  display: grid; gap: 6px;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.deskcard__id {
  font-family: var(--mono); font-size: 18px; font-weight: 500; letter-spacing: -.02em;
}
.deskcard__row {
  display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3);
}
.deskcard__row b { color: var(--ink-2); font-family: var(--mono); font-weight: 500; }
.deskcard__row b.free { color: var(--accent); }
.deskcard__row b.mine { color: var(--accent); }

.bellflash {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.9);
  z-index: 8; pointer-events: none; opacity: 0;
  display: grid; justify-items: center; gap: var(--s1);
  padding: var(--s4) var(--s6);
  border: 2px solid var(--brass); border-radius: var(--r);
  background: rgba(19,17,16,.92);
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}
.bellflash[data-on] { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.bellflash b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--brass); }
.bellflash span { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-2); }

/* ───────────────────────────────────────────────────── machine */

.crt {
  height: 100%; display: grid; place-content: center; gap: var(--s2);
  justify-items: center; padding: var(--s3);
  background: radial-gradient(ellipse at 50% 40%, #221d19 0%, #0c0a09 70%);
}
.crt__bezel {
  /* Sized off the glass, not a fixed width — the screen should take the room. */
  padding: 14px 14px 0;
  background: linear-gradient(#ddd7c5, #c6c0ae);
  border-radius: 12px 12px 5px 5px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6), inset 0 2px 0 rgba(255,255,255,.5);
}
.crt__glass {
  /* Height drives it and the 4:3 tube follows, so it fills whatever screen the
     player has instead of sitting in a small box in the middle. */
  height: min(87vh, 1060px);
  aspect-ratio: 4 / 3;
  max-width: 94vw;
  background: #17110a;
  border-radius: 8px;
  border: 2px solid #6f6a5c;
  box-shadow: inset 0 0 60px rgba(0,0,0,.75), inset 0 0 120px rgba(252,216,108,.12);
  overflow: hidden;
  position: relative;
}
.crt__chin {
  height: 34px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--s3);
}
.crt__brand {
  font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: #6c6656;
}
.crt__led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-hi);
  box-shadow: 0 0 8px var(--accent-hi);
}
.crt__eject {
  padding: 5px var(--s3);
  border: 1px solid #a8a294;
  border-radius: 2px;
  background: linear-gradient(#eeeade, #d6d1c2);
  color: #4a463c;
  font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  transition: background 120ms var(--ease), border-color 120ms var(--ease);
}
.crt__eject:hover { background: linear-gradient(#fbf8ef, #e2ddcd); border-color: #8d8779; }
.crt__eject:active { transform: translateY(1px); }

.crt__desk[hidden] { display: none; }
.crt__desk {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; display: block;
  background: #3f2d1e;
}

@media (max-width: 1080px) {
  .side { width: 240px; }
  .door { grid-template-columns: minmax(0,1fr); }
  .door__side { display: none; }
}


/* The way back to your own machine, from anywhere in the room. Everything else in
   this rail toggles a view; this one is the thing you came here to do. */
.tool--go {
  border-color: var(--accent); color: var(--accent);
  background: rgba(252,216,108,.08);
}
.tool--go:hover { background: rgba(252,216,108,.16); color: var(--accent-hi); border-color: var(--accent-hi); }
.tool--go:active { transform: translateY(1px); }

/* ── the account screen ───────────────────────────────────── */

.step { display: grid; grid-template-columns: 22px 1fr; gap: var(--s3); align-items: start; }
.step__n {
  width: 22px; height: 22px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 50%;
  font-family: var(--mono); font-size: 11px; color: var(--ink-2);
}
.step.is-done .step__n { background: var(--accent); border-color: var(--accent); color: #2a1e08; }
.step__body { display: grid; gap: 8px; min-width: 0; }
.step__lbl { font-size: 13px; font-weight: 600; }
.step__note { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.step.is-done .step__note { display: none; }

.way__go--wide {
  width: 100%; height: 40px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--panel-2);
}
.way__go--wide:hover { background: var(--raised); color: var(--ink); }

.wal {
  display: flex; align-items: center; gap: var(--s2);
  padding: 9px var(--s3);
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r);
}
.wal__k { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.wal__v {
  flex: 1; min-width: 0;
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Step two means nothing until step one is done, and saying so beats hiding it. */
.step--locked { opacity: .38; pointer-events: none; }

.lnk-back {
  color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px;
  font-size: inherit;
}
.lnk-back:hover { color: var(--ink); }

.bar__meta .enter--ghost { height: 26px; padding: 0 var(--s3); border-radius: var(--r); }
