/* The 3D game's screens. Same office materials as party mode: LCDs, manila, green-bar paper. */

html { font-size: clamp(12px, 0.85vw, 18px); }
body.game { overflow: hidden; height: 100vh; }
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
[hidden] { display: none !important; }
kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 0 0.35em;
  border-radius: 4px;
  background: #f1ebdd;
  color: var(--ink);
  border-bottom: 2px solid var(--beige-shade);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.85em;
  text-align: center;
}
.key.blue { background: linear-gradient(to bottom, #5d82c9, var(--stamp-blue)); color: #fff; box-shadow: 0 4px 0 #1f3a75, 0 8px 14px rgba(0, 0, 0, 0.25); }
.key.big { font-size: 1.4rem; width: 100%; margin-top: 0.6rem; }
.fine { font-size: 0.85rem; color: var(--ink-soft); margin: 0.4rem 0 0; }

.memo { position: relative; background: var(--paper); padding: 1.2rem 1.3rem; box-shadow: 0 16px 26px -12px rgba(0, 0, 0, 0.5); }
.memo-head { display: grid; gap: 0.1rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.5rem; margin-bottom: 0.8rem; font-size: 0.9rem; }
.memo-head b { font-family: var(--font-label); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- title ---------- */
.screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: auto;
  background-color: var(--fabric);
  background-image:
    linear-gradient(to bottom, rgba(255, 255, 235, 0.13), rgba(255, 255, 235, 0) 38%),
    radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1.6px),
    radial-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1.6px);
  background-size: 100% 100%, 7px 7px, 11px 11px;
  background-position: 0 0, 0 0, 3px 5px;
}
.title-inner { max-width: 78rem; margin: 0 auto; padding: 2rem 1.6rem 3rem; display: flex; flex-direction: column; gap: 1.6rem; }
.title-phone { padding: 10px; border-radius: 16px; }
.title-lcd { padding: 0.9rem 1.4rem 0.8rem; }
.title-lcd h1 { margin: 0.1rem 0 0.2rem; font-family: var(--font-lcd); font-weight: 900; font-size: clamp(3rem, 9vw, 9.5rem); line-height: 0.95; white-space: nowrap; }
.lcd-small { display: flex; justify-content: space-between; gap: 1rem; font-size: 1.15rem; opacity: 0.85; }
.title-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.title-side { display: grid; gap: 1.6rem; }
.title-card label { display: block; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; margin-bottom: 0.3rem; }
.title-card input { width: 100%; font: inherit; font-size: 1.3rem; padding: 0.55rem 0.7rem; border: 2px solid var(--ink); border-radius: 6px; background: #fff; }
.opt { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.opt > span { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; }
.seg { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.seg button {
  appearance: none;
  border: 2px solid var(--tape);
  background: #fff;
  color: var(--ink);
  border-radius: 4px;
  padding: 0.3rem 0.55rem;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.seg button[aria-pressed='true'] { background: var(--tape); color: #fff; }
.seg button:disabled { opacity: 0.45; cursor: not-allowed; }
.join-row { display: flex; gap: 0.6rem; }
.join-row input { text-transform: uppercase; letter-spacing: 0.3em; font-family: var(--font-lcd); font-weight: 900; }
.rooms-k { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; margin: 1rem 0 0.4rem; }
.rooms { display: grid; gap: 0.4rem; max-height: 16rem; overflow: auto; }
.room-row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.7rem; align-items: center; padding: 0.5rem 0.6rem; background: #f2efe5; border-left: 4px solid var(--stamp-green); }
.room-row b { font-family: var(--font-lcd); font-weight: 900; font-size: 1.3rem; letter-spacing: 0.1em; }
.room-row small { display: block; color: var(--ink-soft); }
.room-row .key { padding: 0.35rem 0.8rem; font-size: 0.9rem; }
.title-foot { color: #eef0f3; margin: 0; }
.title-foot a { color: var(--sticky); }
.title-error { color: #ffd0c8; font-family: var(--font-label); font-weight: 700; font-size: 1.2rem; margin: 0; min-height: 1.4em; }

/* ---------- character creator ---------- */
#char-editor { margin-top: 1rem; border-top: 2px dashed rgba(0, 0, 0, 0.18); padding-top: 0.9rem; }
.ce { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.ce-stage { position: relative; background: radial-gradient(circle at 50% 40%, #4a586e, #2a3240); border-radius: 8px; aspect-ratio: 3 / 4.4; overflow: hidden; }
.ce-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.ce-dice { position: absolute; left: 50%; bottom: 0.5rem; transform: translateX(-50%); white-space: nowrap; }
.ce-rows { display: grid; gap: 0.45rem; }
.ce-k { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; }
.ce-k small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ce-alias { display: flex; gap: 0.4rem; align-items: center; }
.ce-alias input { flex: 1; min-width: 0; font: inherit; font-size: 1rem !important; padding: 0.35rem 0.5rem !important; }
.ce-alias .mini, .ce-hear { background: var(--tape); }
.ce-row { display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.5rem; align-items: center; }
.ce-opts { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.ce-opts button:not(.ce-sw):not(.mini) {
  appearance: none;
  border: 2px solid var(--tape);
  background: #fff;
  color: var(--ink);
  border-radius: 4px;
  padding: 0.12rem 0.4rem;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  cursor: pointer;
}
.ce-opts button[aria-pressed='true']:not(.ce-sw) { background: var(--tape); color: #fff; }
.ce-sw { appearance: none; width: 1.45rem; height: 1.45rem; border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.25); background: var(--sw); cursor: pointer; padding: 0; }
.ce-sw[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--stamp-red); }
.charmodal { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; background: rgba(16, 21, 31, 0.6); padding: 1rem; }
.charmodal-card { width: min(46rem, 96vw); max-height: 94vh; overflow: auto; }
.charmodal-card .ce { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); }
.charmodal-btns { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1rem; }
.lobby #edit-char { width: 100%; margin: 0.2rem 0 0.4rem; font-size: 0.95rem; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#hud .hud-bar, #hud .lobby, #hud .paused, #hud .hud-btns, #hud .toasts { pointer-events: auto; }
.hud-bar { position: absolute; top: 0.8rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.8rem; align-items: center; }
.hud-bar .bezel { padding: 5px; border-radius: 10px; }
.hud-lcd { display: flex; gap: 1.3rem; padding: 0.3rem 0.9rem; font-size: 1.35rem; white-space: nowrap; }
.hud-lcd .hurry { animation: blink 0.5s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
.hud-btns { display: flex; gap: 0.35rem; }
.mini {
  font-family: var(--font-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  background: rgba(16, 21, 31, 0.6);
  color: #eef0f3;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}
.mini[aria-pressed='false'] { color: #ffb4a8; }
.crosshair { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255, 255, 255, 0.8); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); }
.prompt {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translateX(-50%);
  background: var(--tape);
  color: #fff;
  font-family: var(--font-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 1.15rem;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
.prompt kbd { margin-right: 0.4em; }
.toasts { position: absolute; top: 4.6rem; right: 1rem; width: min(26rem, 40vw); display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: var(--paper);
  padding: 0.6rem 0.8rem;
  box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.5);
  font-size: 0.95rem;
  line-height: 1.35;
  border-left: 5px solid var(--ink);
  animation: toastIn 0.35s var(--ease-slam) both;
}
.toast.big { font-size: 1.05rem; }
.toast.win { border-left-color: var(--stamp-green); }
.toast.trap, .toast.lose { border-left-color: var(--stamp-red); }
.toast .ico { font-size: 1.5rem; line-height: 1; }
.toast.out { animation: toastOut 0.4s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(2rem); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(2rem); } }
.subs { position: absolute; left: 50%; bottom: 3.8rem; transform: translateX(-50%); width: min(52rem, 80vw); display: flex; flex-direction: column; gap: 0.35rem; align-items: center; }
.sub { background: rgba(10, 12, 18, 0.78); color: #fff; padding: 0.35rem 0.8rem; border-radius: 4px; font-size: 1.05rem; line-height: 1.35; text-align: center; animation: toastIn 0.25s both; }
.sub b { font-family: var(--font-label); letter-spacing: 0.04em; text-transform: uppercase; color: var(--sticky); }
.sub.boss b { color: #ffb02e; }
.keys { position: absolute; left: 1rem; bottom: 1rem; display: flex; gap: 0.9rem; color: #eef0f3; font-family: var(--font-label); font-weight: 600; font-size: 0.9rem; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.paused { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 12, 18, 0.35); cursor: pointer; }
.paused-card { background: var(--paper); padding: 1rem 1.4rem; display: grid; gap: 0.3rem; text-align: center; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45); transform: rotate(-0.8deg); }
.paused-card b { font-family: var(--font-label); font-weight: 800; font-size: 1.8rem; text-transform: uppercase; }
.reconnect { position: absolute; top: 0; left: 0; right: 0; background: var(--stamp-red); color: #fff; text-align: center; padding: 0.4rem; font-family: var(--font-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

body.incall .toasts { right: auto; left: 1rem; width: min(24rem, 33vw); top: 4.6rem; }
body.incall .subs { left: 18vw; width: 33vw; }
body.incall .hud-bar { left: 1rem; transform: scale(0.8); transform-origin: left top; }
body.incall .hud-btns { display: none; }

/* lobby sticky */
.lobby { position: absolute; left: 1rem; top: 4.6rem; width: min(24rem, 34vw); padding: 1rem 1.1rem; --c: #fff7b8; --r: -0.8deg; font-size: 0.95rem; line-height: 1.4; }
.lobby h2 { margin: 0 0 0.2rem; font-family: var(--font-label); font-weight: 800; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.1em; }
.lobby .code { font-family: var(--font-lcd); font-weight: 900; font-size: 3.2rem; letter-spacing: 0.15em; line-height: 1; margin: 0.2rem 0 0.4rem; }
.lobby .invite { display: flex; gap: 0.4rem; align-items: center; margin-bottom: 0.7rem; }
.lobby .invite input { flex: 1; min-width: 0; font: inherit; font-size: 0.8rem; padding: 0.3rem 0.4rem; border: 1px solid rgba(0, 0, 0, 0.3); background: #fff; }
.lobby .invite button { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.lobby ul { list-style: none; margin: 0 0 0.7rem; padding: 0; display: grid; gap: 0.25rem; }
.lobby li { display: flex; gap: 0.5rem; align-items: center; }
.lobby li i { width: 0.8em; height: 0.8em; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3); }
.lobby .opt { grid-template-columns: 5.5rem 1fr; }
.lobby .key.big { margin-top: 0.4rem; }
.lobby .note { font-size: 0.85rem; margin: 0.5rem 0 0; }

/* ---------- call screen ---------- */
.callui {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(62rem, 64vw);
  z-index: 10;
  background: rgba(46, 55, 70, 0.94);
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.cp { height: 100%; display: flex; flex-direction: column; gap: 0.8rem; padding: 0.9rem 1.1rem 1rem; position: relative; }
.cp-head { display: flex; gap: 0.8rem; align-items: center; }
.cp-bezel { flex: 1; min-width: 0; padding: 5px; border-radius: 10px; }
.cp-lcd { display: flex; gap: 1.1rem; padding: 0.3rem 0.8rem; font-size: 1.25rem; white-space: nowrap; }
.cp-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cp-btns { display: flex; gap: 0.45rem; }
.cp-btns .key { font-size: 0.95rem; padding: 0.55rem 0.9rem 0.5rem; }
.cp-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 15.5rem) minmax(0, 1fr); gap: 1rem; }
.cp-file {
  position: relative;
  margin-top: 1.4rem;
  background: linear-gradient(to bottom, #f0d6a0, var(--manila) 30%);
  border-radius: 0 10px 10px 10px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow: auto;
  box-shadow: 0 2px 0 var(--manila-edge), 0 14px 22px -10px rgba(0, 0, 0, 0.5);
}
.cp-tab { position: absolute; left: 0; top: -1.45rem; height: 1.5rem; padding: 0.25rem 0.9rem 0; background: #f0d6a0; border-radius: 8px 8px 0 0; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; color: #6b5328; }
.cp-id { display: flex; gap: 0.7rem; align-items: center; }
.cp-polaroid { background: #fffdf6; padding: 0.35rem 0.35rem 1rem; transform: rotate(-4deg); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25); }
.cp-polaroid span { display: grid; place-items: center; width: 3.8rem; height: 3.8rem; background: #d8d2c3; font-size: 2.5rem; }
.cp-id h2 { margin: 0; font-family: var(--font-label); font-weight: 800; font-size: 1.3rem; line-height: 1; text-transform: uppercase; }
.cp-meta { font-size: 0.85rem; margin-top: 0.25rem; }
.cp-bio { margin: 0; font-size: 0.92rem; line-height: 1.42; }
.cp-intel > span { display: block; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; color: #6b5328; margin-bottom: 0.2rem; }
.cp-intel div { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.cp-intel i { font-size: 0.85rem; color: rgba(0, 0, 0, 0.45); }
.cp-script { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; border-top: 2px dashed rgba(107, 83, 40, 0.35); padding-top: 0.6rem; font-size: 0.85rem; }
.cp-script b { font-family: var(--font-label); font-weight: 800; font-size: 1.1rem; }
.cp-main { min-height: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.cp-gauge { padding: 5px; }
.cp-gauge-lcd { padding: 0.35rem 0.7rem 0.3rem; }
.cp-gauge-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; }
.cp-gauge-top b { font-size: 1.8rem; line-height: 1; }
.cp-segs { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; height: 1.2rem; margin: 0.25rem 0 0.2rem; }
.cp-segs i { background: var(--lcd-ghost); border-radius: 1px; }
.cp-segs i.zone { background: rgba(30, 42, 20, 0.2); }
.cp-segs i.on { background: var(--lcd-ink); }
.cp-gauge-scale { display: flex; justify-content: space-between; font-size: 0.75rem; }

.printout { position: relative; background: var(--paper); padding: 0 2rem; box-shadow: 0 14px 24px -12px rgba(0, 0, 0, 0.5); }
.printout::before, .printout::after { content: ''; position: absolute; top: 0; bottom: 0; width: 2rem; background-image: radial-gradient(circle, var(--fabric-deep) 0.25rem, transparent 0.29rem); background-size: 2rem 1.4rem; background-position: center 0.7rem; }
.printout::before { left: 0; border-right: 1px dashed rgba(0, 0, 0, 0.16); }
.printout::after { right: 0; border-left: 1px dashed rgba(0, 0, 0, 0.16); }
.cp-printout { flex: 1; min-height: 8rem; }
.feed { height: 100%; overflow-y: auto; scrollbar-width: thin; padding: 1rem 1rem 1.4rem; font-size: 1.05rem; line-height: 1.4rem; background-image: repeating-linear-gradient(to bottom, var(--greenbar) 0 2.8rem, transparent 2.8rem 5.6rem); background-attachment: local; }
.pl { margin: 0 0 0.9rem; }
.pl .who { font-weight: 700; text-transform: uppercase; }
.pl .tape { font-size: 0.7em; vertical-align: 0.1em; }
.pl-event { text-align: center; font-style: italic; color: var(--ink-soft); }
.pen { display: inline-block; width: 0.72em; height: 0.72em; border-radius: 50%; margin-right: 0.35em; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3); }
.verdict { display: inline-block; font-family: var(--font-label); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8em; padding: 0 0.4em; border: 2px solid currentColor; border-radius: 3px; transform: rotate(-3deg); color: var(--stamp-blue); margin-left: 0.3em; }
.verdict.good { color: var(--stamp-green); }
.verdict.bad { color: var(--stamp-red); }
.thinking .dots { display: inline-flex; gap: 0.3em; vertical-align: middle; }
.thinking .dots i { width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--ink-soft); animation: dot 1s infinite ease-in-out; }
.thinking .dots i:nth-child(2) { animation-delay: 0.15s; }
.thinking .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }
.cp-stage { color: #eef0f3; font-size: 0.95rem; }
.cp-stage b { font-family: var(--font-label); text-transform: uppercase; letter-spacing: 0.08em; color: var(--sticky); }
.cp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.cp-card {
  appearance: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  background: #fff;
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-type);
  font-size: 0.9rem;
  line-height: 1.3;
  box-shadow: 0 8px 14px -8px rgba(0, 0, 0, 0.5);
}
.cp-card:hover:not(:disabled) { box-shadow: 0 0 0 3px var(--stamp-red), 0 8px 14px -8px rgba(0, 0, 0, 0.5); }
.cp-card:disabled { opacity: 0.5; cursor: default; }
.cp-card-top { display: flex; gap: 0.4rem; align-items: center; }
.cp-input { display: flex; gap: 0.5rem; align-items: center; }
.cp-input input { flex: 1; min-width: 0; font: inherit; font-size: 1.1rem; padding: 0.55rem 0.7rem; border: 2px solid var(--ink); border-radius: 6px; background: #fff; }
.cp-mic {
  appearance: none;
  border: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  background: linear-gradient(to bottom, #f1ebdd, var(--beige));
  box-shadow: 0 3px 0 var(--beige-shade);
}
.cp-mic.on { background: var(--stamp-red); box-shadow: 0 0 0 5px rgba(207, 59, 40, 0.35); animation: pulse 1s infinite; }
.cp-mic:disabled { opacity: 0.45; cursor: not-allowed; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(207, 59, 40, 0.15); } }
.cp-voicehint { color: #e3e7ee; font-size: 0.9rem; min-height: 1.3em; }
.cp-crew { color: #e3e7ee; font-size: 0.85rem; }
.cp-chip { display: inline-block; background: var(--c); color: var(--ink); font-family: var(--font-label); font-weight: 700; padding: 0 0.45em; border-radius: 3px; text-transform: uppercase; }
.cp-result { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(16, 21, 31, 0.55); }
.cp-result-card { background: var(--paper); padding: 1.6rem 2rem; display: grid; gap: 0.8rem; justify-items: center; text-align: center; max-width: 30rem; box-shadow: 0 30px 50px rgba(0, 0, 0, 0.5); }
.cp-result-card .stamp { font-size: 4rem; }
.cp-result-card p { margin: 0; }
.cp-cash { font-size: 2.6rem; padding: 0.2rem 0.9rem; }
.cp-result-hint { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- remote desktop ---------- */
.remote { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; background: rgba(8, 10, 16, 0.72); }
.rd { width: min(76rem, 94vw); height: min(46rem, 90vh); }
.rd-window { height: 100%; display: flex; flex-direction: column; background: #c9c3b3; border: 3px solid #f4efe2; border-right-color: #6f6a5e; border-bottom-color: #6f6a5e; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6); }
.rd-title { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(to right, #2b4a7a, #5b7fb8); color: #fff; font-family: var(--font-label); font-weight: 700; letter-spacing: 0.06em; padding: 0.3rem 0.6rem; font-size: 1.05rem; }
.rd-timer { font-family: var(--font-lcd); font-weight: 900; font-size: 1.4rem; }
.rd-timer.hurry { color: #ffd0c8; animation: blink 0.5s steps(1) infinite; }
.rd-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 19rem); }
.rd-desktop { position: relative; overflow: hidden; background: radial-gradient(circle at 30% 30%, #3a8a86, #23605e); display: flex; flex-direction: column; }
.rd-desktop.flash { animation: sirenFlash 0.3s steps(1) 8; }
.rd-desktop.spin .rd-icons { animation: spin 1.2s ease-in-out; }
@keyframes sirenFlash { 50% { background: #b3261e; } }
@keyframes spin { to { transform: rotate(360deg); } }
.rd-icons { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); grid-auto-rows: 6.6rem; gap: 0.5rem; padding: 1rem; align-content: start; }
.rd-icon { appearance: none; border: 0; background: none; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; cursor: pointer; padding: 0.3rem; border-radius: 3px; font-family: var(--font-type); font-size: 0.8rem; line-height: 1.15; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); text-align: center; }
.rd-icon:hover, .rd-icon:focus-visible { background: rgba(255, 255, 255, 0.18); }
.rd-icon.found { background: rgba(166, 227, 154, 0.45); }
.rd-ico { font-size: 2.3rem; line-height: 1; text-shadow: none; }
.rd-name { word-break: break-word; }
.rd-taskbar { display: flex; justify-content: space-between; align-items: center; background: #c9c3b3; border-top: 2px solid #f4efe2; padding: 0.25rem 0.5rem; font-family: var(--font-label); font-weight: 700; color: var(--ink); }
.rd-start { border: 2px solid #f4efe2; border-right-color: #6f6a5e; border-bottom-color: #6f6a5e; padding: 0 0.6rem; }
.rd-pop { position: absolute; width: 20rem; background: #f4efe2; border: 2px solid #fff; border-right-color: #6f6a5e; border-bottom-color: #6f6a5e; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); z-index: 2; animation: toastIn 0.2s both; }
.rd-pop-title { display: flex; justify-content: space-between; align-items: center; background: #2b4a7a; color: #fff; font-family: var(--font-label); font-weight: 700; padding: 0.15rem 0.4rem; }
.rd-pop-title button { appearance: none; border: 0; background: #c9c3b3; width: 1.3rem; height: 1.2rem; line-height: 1; cursor: pointer; }
.rd-pop-body { padding: 0.7rem; font-size: 0.9rem; line-height: 1.35; }
.rd-pop.alert .rd-pop-title { background: #b3261e; }
.rd-pop.alert .rd-pop-body { color: #b3261e; font-weight: 700; }
.rd-pop.win .rd-pop-title { background: var(--stamp-green); }
.rd-dog { position: absolute; display: flex; gap: 0.5rem; align-items: center; background: #fff7d6; border: 3px solid #e3b23c; padding: 0.5rem 0.6rem; font-size: 0.85rem; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45); z-index: 3; animation: toastIn 0.2s both; }
.rd-dog-ico { font-size: 2rem; }
.rd-dog button { appearance: none; border: 2px solid var(--ink); background: #fff; font-family: var(--font-label); font-weight: 800; text-transform: uppercase; cursor: pointer; padding: 0.2rem 0.5rem; }
.rd-dog.bark { background: #ffd0c8; border-color: var(--stamp-red); animation: shake 0.3s 2; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.rd-tools { background: #e6e0d1; padding: 0.9rem; display: flex; flex-direction: column; gap: 0.55rem; overflow: auto; font-size: 0.9rem; }
.rd-tools h3 { margin: 0; font-family: var(--font-label); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 1.15rem; }
.rd-tasks { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.3rem; line-height: 1.35; }
.rd-tasks .done { text-decoration: line-through; color: var(--stamp-green); }
.rd-k { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
.rd-k small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.rd-scares { display: grid; gap: 0.35rem; }
.rd-scares button { appearance: none; border: 2px solid #fff; border-right-color: #6f6a5e; border-bottom-color: #6f6a5e; background: #c9c3b3; padding: 0.4rem; font-family: var(--font-label); font-weight: 700; font-size: 1rem; cursor: pointer; text-align: left; }
.rd-scares button:active { border-color: #6f6a5e #fff #fff #6f6a5e; }
.rd-score { font-family: var(--font-type); font-size: 0.85rem; }
.rd-tools textarea { font: inherit; padding: 0.4rem; border: 2px solid var(--ink); resize: none; }

/* ---------- case file: security question and dirt from their PC ---------- */
.cp-verify { background: #fff7b8; padding: 0.5rem 0.6rem; transform: rotate(-1deg); box-shadow: 0 6px 10px -6px rgba(0, 0, 0, 0.45); border-left: 4px solid var(--stamp-red); font-size: 0.88rem; line-height: 1.35; }
.cp-verify > span { display: block; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: #6b5328; }
.cp-verify b { color: var(--stamp-red); }
.cp-verify q { display: block; margin-top: 0.15rem; font-style: italic; }
.cp-verify.good { border-left-color: var(--stamp-green); }
.cp-verify.good b { color: var(--stamp-green); }
.cp-verify.bad { opacity: 0.75; }
.cp-dirt ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.82rem; line-height: 1.3; }
.cp-dirt li { background: rgba(255, 255, 255, 0.55); padding: 0.3rem 0.45rem; border-radius: 3px; }
.cp-dirt li b { display: block; font-family: var(--font-type); font-size: 0.78rem; color: #6b5328; }
.cp-dirt li.none { background: none; padding: 0; color: rgba(0, 0, 0, 0.45); font-style: italic; }

/* ---------- suspicion strikes ---------- */
.cp-sus { display: inline-flex; align-items: center; gap: 0.25rem; }
.cp-sus i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid var(--lcd-ink); }
.cp-sus i.on { background: var(--stamp-red); border-color: var(--stamp-red); }
.verdict.strike { transform: rotate(2deg); }

/* ---------- voice chat, fire alarm ---------- */
.mini.live { background: var(--stamp-green); color: #fff; }
body.alarm::after { content: ''; position: fixed; inset: 0; z-index: 40; pointer-events: none; background: rgba(220, 30, 20, 0.28); animation: alarmFlash 0.5s steps(1) 6; }
@keyframes alarmFlash { 50% { background: rgba(220, 30, 20, 0); } }

/* ---------- your own PC (RemoteDesk) ---------- */
.pc-code { font-family: var(--font-lcd); font-weight: 900; font-size: 2rem; letter-spacing: 0.25em; text-align: center; padding: 0.3rem 0.4rem; border: 2px solid var(--ink); border-radius: 4px; background: #fff; width: 100%; box-sizing: border-box; }
.pc-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pc-row .key { font-size: 0.9rem; padding: 0.45rem 0.7rem 0.4rem; }
.pc-msg { margin: 0; font-size: 0.85rem; line-height: 1.3; }
.pc-msg.bad { color: var(--stamp-red); font-weight: 700; }
.pc-tries { margin: 0; font-size: 0.78rem; color: var(--ink-soft); }
.rd-pop small { display: block; margin-top: 0.35rem; color: var(--stamp-green); font-weight: 700; }

/* ---------- results ---------- */
.results { position: fixed; inset: 0; z-index: 18; overflow: auto; background: rgba(36, 42, 54, 0.92); }
.res { max-width: 76rem; margin: 0 auto; padding: 2rem 1.6rem; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.res-total { display: flex; align-items: center; gap: 1.6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.res-total .lcd { display: flex; flex-direction: column; padding: 0.5rem 1rem; font-size: 1rem; }
.res-total .lcd b { font-size: 3.2rem; line-height: 1; margin: 0.15rem 0; }
.res-total .stamp { font-size: 3rem; }
.res p { line-height: 1.5; }
.res .epilogue { color: var(--ink-soft); font-style: italic; font-size: 0.95rem; border-top: 1px dashed rgba(0, 0, 0, 0.3); padding-top: 0.8rem; }
.res-side { display: grid; gap: 0.9rem; }
.cert { display: flex; gap: 0.8rem; align-items: center; padding: 0.7rem 0.9rem; animation: toastIn 0.4s both; }
.cert-ico { font-size: 2rem; }
.cert b { display: block; font-family: var(--font-label); font-weight: 800; text-transform: uppercase; font-size: 1.05rem; }
.cert small { display: block; font-size: 0.85rem; }
.standings { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; counter-reset: rank; }
.standings li { display: grid; grid-template-columns: 1.6rem auto 1fr auto; align-items: center; gap: 0.4rem; background: var(--paper); padding: 0.45rem 0.7rem; counter-increment: rank; }
.standings li::before { content: counter(rank) '.'; font-weight: 700; }
.standings b { font-family: var(--font-label); font-weight: 800; }
.res-k { color: #eef0f3; font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.res-boss { background: #fff7b8; padding: 0.6rem 0.8rem; border-left: 4px solid var(--ink); }
.res-boss b { font-family: var(--font-label); text-transform: uppercase; letter-spacing: 0.06em; }
.res-run .res-k { color: var(--ink); font-size: 0.85rem; }
.res-run ol { list-style: none; margin: 0.4rem 0 0.8rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.res-run li { display: grid; padding: 0.35rem 0.6rem; background: #f2efe5; border-top: 4px solid var(--stamp-green); font-size: 0.85rem; min-width: 6.5rem; }
.res-run li.missed { border-top-color: var(--stamp-red); }
.res-run li b { font-family: var(--font-label); font-size: 1.1rem; }
.res-run li small { color: var(--ink-soft); }
.res .key.big + .key { margin-top: 0.5rem; width: 100%; }
.shop { border-top: 2px solid var(--ink); padding-top: 0.7rem; margin: 0.4rem 0 0.6rem; }
.shop-head { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0.1rem 0.8rem; margin-bottom: 0.6rem; }
.shop-head b { font-family: var(--font-label); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 1.1rem; }
.shop-bank { font-family: var(--font-lcd); font-weight: 900; font-size: 1.8rem; color: var(--stamp-green); }
.shop-head small { grid-column: 1 / -1; color: var(--ink-soft); font-size: 0.82rem; }
.shop-items { display: grid; gap: 0.4rem; }
.shop-item { appearance: none; border: 2px solid var(--ink); background: #fff; display: grid; grid-template-columns: 2rem 1fr auto; gap: 0.6rem; align-items: center; text-align: left; padding: 0.45rem 0.6rem; cursor: pointer; font: inherit; }
.shop-item:hover:not(:disabled) { box-shadow: 0 0 0 3px var(--stamp-red); }
.shop-item:disabled { cursor: default; opacity: 0.55; }
.shop-item.owned { opacity: 1; background: #e9f3e6; border-color: var(--stamp-green); }
.si-ico { font-size: 1.5rem; text-align: center; }
.si-txt b { display: block; font-family: var(--font-label); font-weight: 800; text-transform: uppercase; font-size: 0.95rem; }
.si-txt small { display: block; font-size: 0.8rem; line-height: 1.3; color: var(--ink-soft); }
.si-price { font-family: var(--font-label); font-weight: 800; font-size: 1.05rem; text-align: right; }
.si-price em { display: block; font-style: normal; font-weight: 600; font-size: 0.72rem; color: var(--ink-soft); }

@media (max-width: 900px) {
  .title-grid { grid-template-columns: 1fr; }
  .callui { width: 100vw; }
  .cp-grid { grid-template-columns: 1fr; }
  .res { grid-template-columns: 1fr; }
}

/* ---------- your webcam (the 3D view shows through the empty window) ---------- */
.webcam { position: fixed; z-index: 9; left: 1rem; bottom: 1rem; width: min(18rem, 27vw); border: 3px solid #f4efe2; border-right-color: #6f6a5e; border-bottom-color: #6f6a5e; box-shadow: 0 16px 30px rgba(0, 0, 0, 0.5); pointer-events: none; }
.webcam-title { display: flex; justify-content: space-between; background: linear-gradient(to right, #2b4a7a, #5b7fb8); color: #fff; font-family: var(--font-label); font-weight: 700; letter-spacing: 0.06em; padding: 0.15rem 0.5rem; font-size: 0.9rem; }
.webcam-rec { color: #ffb4a8; animation: blink 1s steps(1) infinite; }
.webcam-view { aspect-ratio: 4 / 3; width: 100%; }
body.incall .subs { bottom: calc(min(18rem, 27vw) * 0.75 + 3.4rem); }

/* ---------- caller portrait and mood ---------- */
.cp-polaroid { position: relative; }
.cp-polaroid canvas { display: block; width: 6.6rem; height: 6.6rem; background: #4c6a72; }
.cp-polaroid span { position: absolute; right: -0.4rem; bottom: 0.2rem; width: 1.8rem; height: 1.8rem; font-size: 1.2rem; background: #fffdf6; border-radius: 50%; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
.cp-mood { font-family: var(--font-label); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; padding: 0.05rem 0.5rem; border-radius: 3px; background: var(--lcd-ink); color: #c9d6b0; }
.cp-mood.good { background: var(--stamp-green); color: #fff; }
.cp-mood.warn { background: #c98a12; color: #fff; }
.cp-mood.bad { background: var(--stamp-red); color: #fff; animation: pulse 1s infinite; }

/* ---------- chaos: banner, raid lights, weapons, hits on your own screen ---------- */
.banner { position: absolute; top: 4.4rem; left: 50%; transform: translateX(-50%); z-index: 20; background: var(--stamp-red); color: #fff; font-family: var(--font-label); font-weight: 800; font-size: 1.3rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.35rem 1.1rem; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); white-space: nowrap; }
body.incall .banner { left: 1rem; transform: none; top: 3.6rem; font-size: 1rem; }
body.raid::before { content: ""; position: fixed; inset: 0; z-index: 8; pointer-events: none; box-shadow: inset 0 0 120px 30px rgba(255, 30, 30, 0.55); animation: raidFlash 0.5s steps(1) infinite; }
@keyframes raidFlash { 50% { box-shadow: inset 0 0 120px 30px rgba(40, 80, 255, 0.6); } }
.weapon { position: absolute; right: 1rem; bottom: 1rem; display: flex; gap: 0.6rem; align-items: center; background: var(--paper); padding: 0.4rem 0.8rem; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); font-size: 0.95rem; transform: rotate(1deg); }
.weapon b { font-family: var(--font-label); text-transform: uppercase; }
.wp-ico { font-size: 1.6rem; }
.wp-keys { color: var(--ink-soft); font-size: 0.85rem; }
body.incall .weapon { display: none; }
.fxover { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
.fxover.maced { background: radial-gradient(circle, rgba(255, 120, 20, 0.25), rgba(255, 70, 0, 0.75)); backdrop-filter: blur(6px); animation: fadeOut 3.6s ease-in forwards; }
.fxover.zap { background: rgba(255, 250, 200, 0.6); animation: zapFlash 0.12s steps(1) 10; }
.fxover.blast { background: #fff3d0; animation: fadeOut 0.7s ease-out forwards; }
.fxover.sleep { background: #050608; animation: sleepy 7s ease-in-out forwards; }
.fxover.sleep::after { content: "Z z z"; position: absolute; left: 50%; top: 40%; transform: translateX(-50%); color: #9fb7ff; font-family: var(--font-label); font-weight: 800; font-size: 4rem; letter-spacing: 0.3em; }
.fxover.pied {
  background:
    radial-gradient(circle at 30% 35%, #fbf8f0 0 14%, transparent 15%),
    radial-gradient(circle at 62% 30%, #fbf8f0 0 18%, transparent 19%),
    radial-gradient(circle at 48% 62%, #fbf8f0 0 22%, transparent 23%),
    radial-gradient(circle at 78% 70%, #fbf8f0 0 12%, transparent 13%),
    radial-gradient(circle at 18% 75%, #fbf8f0 0 10%, transparent 11%),
    rgba(251, 248, 240, 0.35);
  animation: fadeOut 9s ease-in forwards;
}
@keyframes fadeOut { to { opacity: 0; } }
@keyframes zapFlash { 50% { background: rgba(80, 120, 255, 0.35); } }
@keyframes sleepy { 0% { opacity: 0; } 12% { opacity: 0.92; } 85% { opacity: 0.92; } 100% { opacity: 0; } }

/* ---------- Scamazon ---------- */
.kiosk { position: fixed; inset: 0; z-index: 22; display: grid; place-items: center; background: rgba(16, 21, 31, 0.6); }
.kiosk-card { width: min(34rem, 92vw); max-height: 90vh; overflow: auto; display: grid; gap: 0.7rem; }
.kiosk-card .memo-head b { color: #c86f00; }
.kiosk-bank { font-size: 0.95rem; }
.kiosk-bank b { font-family: var(--font-lcd); font-weight: 900; font-size: 1.6rem; color: var(--stamp-green); margin-left: 0.4rem; }
.kiosk-bank b.neg { color: var(--stamp-red); }
.kiosk-card .fine { margin: 0; font-size: 0.85rem; }

/* ---------- the scambaiter's virus ---------- */
.virus { position: fixed; inset: 0; z-index: 30; overflow: hidden; }
.vx-bg { position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg, #ff3b2a 0 15deg, #ffd23a 15deg 30deg, #3bff6a 30deg 45deg, #2a8cff 45deg 60deg, #b04bff 60deg 75deg); animation: spin 3s linear infinite; opacity: 0.85; }
.vx-head { position: absolute; top: 1rem; left: 50%; transform: translateX(-50%); background: #000; color: #3bff6a; font-family: var(--font-lcd); padding: 0.6rem 1.2rem; text-align: center; display: grid; gap: 0.2rem; box-shadow: 0 0 0 4px #3bff6a; z-index: 2; }
.vx-head b { font-size: 2rem; text-transform: uppercase; animation: blink 0.6s steps(1) infinite; }
.vx-head span { font-size: 1.1rem; color: #fff; }
.vx-hamsters { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; font-size: 3.5rem; animation: hamster 0.4s ease-in-out infinite alternate; z-index: 1; }
@keyframes hamster { to { transform: translateY(-14px) rotate(4deg); } }
.vx-pop { position: absolute; width: min(20rem, 40vw); background: #f4efe2; border: 2px solid #fff; border-right-color: #6f6a5e; border-bottom-color: #6f6a5e; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5); z-index: 3; animation: wobble 1.4s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -0.3s); transition: left 0.25s, top 0.25s; }
@keyframes wobble { from { transform: translate(-6px, -4px) rotate(-1.5deg); } to { transform: translate(6px, 4px) rotate(1.5deg); } }
.vx-title { display: flex; justify-content: space-between; align-items: center; background: #b3261e; color: #fff; font-family: var(--font-label); font-weight: 700; padding: 0.15rem 0.4rem; }
.vx-title button { appearance: none; border: 0; background: #c9c3b3; width: 1.6rem; height: 1.4rem; font-weight: 800; cursor: pointer; }
.vx-pop p { margin: 0; padding: 0.7rem; font-family: var(--font-type); font-size: 0.95rem; }

/* ---------- end of day: the tapes and the tier list ---------- */
.tapes { margin: 0.9rem 0 1rem; display: grid; gap: 0.7rem; }
.tapes-k { font-family: var(--font-label); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.95rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.2rem; }
.tape-clip { margin: 0; background: #1d1b22; color: #f4f1ea; padding: 0.8rem 1rem; transform: rotate(var(--r)); box-shadow: 0 10px 18px -8px rgba(0, 0, 0, 0.6); border-left: 6px solid var(--stamp-blue); }
.tape-clip.best { border-left-color: var(--stamp-green); }
.tape-clip.worst, .tape-clip.busted { border-left-color: var(--stamp-red); }
.tape-clip.payout { border-left-color: #e3b23c; }
.tape-clip figcaption { font-family: var(--font-label); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; color: #ffb02e; }
.tape-clip blockquote { margin: 0.35rem 0; font-size: 1.25rem; font-style: italic; line-height: 1.35; }
.tape-by { font-size: 0.85rem; color: #c9c3b3; display: flex; align-items: center; gap: 0.4rem; }
.tape-reply { margin: 0.45rem 0 0; font-size: 0.92rem; color: #e3e7ee; }
.tape-reply .verdict { background: #f4f1ea; }
.tape-bunty { margin: 0.45rem 0 0; font-size: 0.92rem; background: #fff7b8; color: var(--ink); padding: 0.35rem 0.6rem; }
.tierlist { display: grid; gap: 0.3rem; }
.tier { display: grid; grid-template-columns: 2.6rem 1fr; background: var(--paper); min-height: 2.6rem; }
.tier-l { display: grid; place-items: center; font-family: var(--font-label); font-weight: 800; font-size: 1.6rem; color: var(--ink); }
.t-S .tier-l { background: #ff7f7f; }
.t-A .tier-l { background: #ffbf7f; }
.t-B .tier-l { background: #ffdf7f; }
.t-C .tier-l { background: #bfff7f; }
.t-F .tier-l { background: #9aa0a8; }
.tier-row { display: flex; flex-direction: column; justify-content: center; padding: 0.25rem 0.6rem; gap: 0.15rem; }
.tier-title { font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.75rem; color: var(--ink-soft); }
.tier-people i { color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Legit OS (the desk computer) ---------- */
.osroot { position: fixed; inset: 0; z-index: 13; pointer-events: none; }
.os { position: fixed; pointer-events: auto; overflow: hidden; background: #1d1b22; border: 12px solid #1d1b22; border-radius: 12px; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 0 2px #3a3e48; font-family: var(--font-type); color: var(--ink); }
.os.full { inset: 3.9rem 4vw 1.4rem; }
.os.side { left: 1rem; top: 6.2rem; bottom: 1rem; width: calc(100vw - min(62rem, 64vw) - 2rem); border-width: 7px; }
.os-wall { position: absolute; inset: 0 0 2.4rem 0; background: radial-gradient(circle at 70% 25%, #f2a33a 0, #c8571f 22%, #3a2a5a 60%, #1d2244 100%); }
.os-logo { position: absolute; right: 1.2rem; bottom: 0.8rem; font-family: var(--font-label); font-weight: 800; font-size: 2.6rem; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.22); text-align: right; line-height: 1; }
.os-logo small { display: block; font-size: 0.8rem; letter-spacing: 0.15em; }
.os-icons { position: absolute; left: 0.5rem; top: 0.5rem; bottom: 2.9rem; display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 0.2rem; }
.os-icon { position: relative; appearance: none; border: 0; background: none; color: #fff; width: 5.2rem; padding: 0.3rem 0.2rem; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; cursor: pointer; font-family: var(--font-label); font-weight: 600; font-size: 0.78rem; line-height: 1.1; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); border-radius: 4px; }
.os-icon:hover, .os-icon:focus-visible { background: rgba(255, 255, 255, 0.16); }
.os-ico { font-size: 1.7rem; line-height: 1; text-shadow: none; }
.os-badge { position: absolute; top: 0.1rem; right: 0.9rem; min-width: 1.1rem; padding: 0 0.25rem; border-radius: 0.6rem; background: var(--stamp-red); color: #fff; font-style: normal; font-size: 0.7rem; line-height: 1.1rem; text-align: center; }
.os-wins { position: absolute; inset: 0 0 2.4rem 0; pointer-events: none; }
.os-win { position: absolute; pointer-events: auto; display: flex; flex-direction: column; background: #f4efe2; border: 2px solid #fff; border-right-color: #6f6a5e; border-bottom-color: #6f6a5e; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45); min-width: 200px; }
.os-title { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; background: linear-gradient(to right, #2b4a7a, #5b7fb8); color: #fff; font-family: var(--font-label); font-weight: 700; letter-spacing: 0.04em; padding: 0.2rem 0.4rem; cursor: grab; user-select: none; touch-action: none; }
.os-title button { appearance: none; border: 0; background: #c9c3b3; width: 1.4rem; height: 1.25rem; line-height: 1; cursor: pointer; font-weight: 800; }
.os-body { flex: 1; min-height: 0; overflow: auto; padding: 0.6rem; font-size: 0.88rem; display: flex; flex-direction: column; gap: 0.45rem; }
.os-p { margin: 0; line-height: 1.35; }
.os-p.small { font-size: 0.78rem; color: var(--ink-soft); }
.os-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2.4rem; display: flex; align-items: center; gap: 0.4rem; padding: 0 0.3rem; background: #c9c3b3; border-top: 2px solid #f4efe2; font-family: var(--font-label); font-weight: 700; }
.os-bar button { appearance: none; border: 2px solid #f4efe2; border-right-color: #6f6a5e; border-bottom-color: #6f6a5e; background: #c9c3b3; font: inherit; padding: 0.15rem 0.5rem; cursor: pointer; white-space: nowrap; }
.os-start { font-weight: 800; }
.os-tasks { flex: 1; min-width: 0; display: flex; gap: 0.25rem; overflow: hidden; }
.os-tasks button { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; font-size: 0.8rem; }
.os-tray { display: flex; gap: 0.7rem; align-items: center; font-size: 0.82rem; white-space: nowrap; border: 2px solid #6f6a5e; border-right-color: #f4efe2; border-bottom-color: #f4efe2; padding: 0.1rem 0.5rem; }
.os-tray b { font-family: var(--font-lcd); }
.os-review.hurry { color: var(--stamp-red); animation: blink 0.6s steps(1) infinite; }
.os.side .os-money { display: none; }
.os-menu { position: absolute; left: 0.3rem; bottom: 2.4rem; z-index: 999; display: grid; background: #c9c3b3; border: 2px solid #f4efe2; border-right-color: #6f6a5e; border-bottom-color: #6f6a5e; min-width: 14rem; }
.os-menu button { appearance: none; border: 0; background: none; text-align: left; padding: 0.55rem 0.8rem; font-family: var(--font-label); font-weight: 700; font-size: 1rem; cursor: pointer; }
.os-menu button:hover { background: #2b4a7a; color: #fff; }
.os-notes { position: absolute; right: 0.5rem; bottom: 2.9rem; z-index: 998; display: grid; gap: 0.3rem; width: min(18rem, 60%); }
.os-note { display: flex; gap: 0.5rem; background: #fffdf6; border-left: 4px solid #2b4a7a; padding: 0.45rem 0.6rem; font-size: 0.8rem; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35); animation: toastIn 0.2s both; }
.os-call { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 1000; display: grid; justify-items: center; gap: 0.3rem; background: #1d1b22; color: #fff; padding: 1rem 1.6rem; border-radius: 10px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6); font-family: var(--font-label); }
.os-call b { font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.08em; }
.os-call-ico { font-size: 2.4rem; animation: shake 0.3s infinite; }
.os-call-btns { display: flex; gap: 1.6rem; margin-top: 0.4rem; }
.os-call-btns button { appearance: none; border: 0; width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.4rem; color: #fff; cursor: pointer; }
.os-call .accept { background: var(--stamp-green); }
.os-call .decline { background: var(--stamp-red); }
.os-phone, .os-rec { display: grid; justify-items: center; text-align: center; gap: 0.3rem; }
.os-big { font-size: 2.6rem; line-height: 1; }
#rec-dot.on { color: var(--stamp-red); animation: blink 0.8s steps(1) infinite; }
.os-rec video { width: 100%; max-height: 9rem; background: #000; }
.os-chat { display: flex; flex-direction: column; gap: 0.4rem; height: 100%; }
.os-msgs { flex: 1; min-height: 6rem; overflow: auto; background: #fff; border: 2px solid #6f6a5e; border-right-color: #f4efe2; border-bottom-color: #f4efe2; padding: 0.4rem; display: grid; align-content: start; gap: 0.25rem; font-size: 0.85rem; line-height: 1.3; }
.os-msg b { font-family: var(--font-label); text-shadow: 0 0 1px rgba(0, 0, 0, 0.6); }
.os-msg.bot span { font-style: italic; }
.os-say { display: flex; gap: 0.3rem; }
.os-say input { flex: 1; min-width: 0; font: inherit; padding: 0.35rem; border: 2px solid var(--ink); }
.os-say .key { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.os-bounties { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.os-bounties li { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.5rem; background: #fff; padding: 0.4rem 0.5rem; border-left: 4px solid #c98a12; }
.os-bounties li.done { border-left-color: var(--stamp-green); opacity: 0.75; }
.os-bounties li b { color: var(--stamp-green); font-family: var(--font-label); }
.os-bounties li i { grid-column: 1 / -1; height: 6px; background: linear-gradient(to right, var(--stamp-green) calc(var(--k) * 100%), #ddd6c6 0); }
.os-bounties li small { grid-column: 1 / -1; color: var(--ink-soft); font-size: 0.72rem; }
.os-paint { display: grid; gap: 0.35rem; }
.os-paint canvas { width: 100%; aspect-ratio: 4 / 3; background: #fbfbf7; border: 2px solid #6f6a5e; cursor: crosshair; touch-action: none; }
.os-tools { display: flex; flex-wrap: wrap; gap: 0.2rem; }
.os-tools button { appearance: none; border: 2px solid #6f6a5e; background: #fff; min-width: 1.6rem; height: 1.6rem; padding: 0 0.25rem; cursor: pointer; font-family: var(--font-label); font-weight: 700; }
.os-tools .sw { background: var(--c); width: 1.4rem; min-width: 1.4rem; }
.os-tools .on { outline: 3px solid var(--stamp-red); outline-offset: 1px; }
.os-cam canvas { width: 100%; aspect-ratio: 4 / 3; background: #111; display: block; }
.os-cam { display: grid; gap: 0.4rem; }
.os-polaroid { background: #fffdf6; padding: 0.4rem 0.4rem 0.6rem; transform: rotate(-2deg); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); display: grid; gap: 0.4rem; }
.os-polaroid img { width: 100%; display: block; }
.os-scripts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.os-scripts li { background: #fff; padding: 0.35rem 0.5rem; display: grid; }
.os-scripts li.locked { opacity: 0.5; background: #e6e0d1; }
.os-scripts small { color: var(--ink-soft); }
.os-bank { display: grid; gap: 0.35rem; }
.os-bank div { display: flex; justify-content: space-between; gap: 0.6rem; background: #fff; padding: 0.4rem 0.5rem; }
.os-bank b { font-family: var(--font-lcd); font-weight: 900; }
.os-bank b.bad { color: var(--stamp-red); }
.os-tycoon { display: grid; justify-items: center; gap: 0.35rem; }
.os-card { appearance: none; border: 0; background: radial-gradient(circle, #fff7b8, #e3b23c); width: 6.5rem; height: 6.5rem; border-radius: 50%; font-size: 3.4rem; cursor: pointer; box-shadow: 0 6px 0 #a87b14; }
.os-card:active { transform: translateY(3px); box-shadow: 0 3px 0 #a87b14; }
.os-cards { font-family: var(--font-lcd); font-size: 1.25rem; }
.os-rate { color: var(--ink-soft); }
.os-ups { display: grid; gap: 0.25rem; width: 100%; }
.os-ups button { appearance: none; display: flex; justify-content: space-between; border: 2px solid var(--ink); background: #fff; padding: 0.3rem 0.5rem; cursor: pointer; font: inherit; }
.os-ups button:disabled { opacity: 0.45; cursor: default; }
.res-unlock { display: grid; gap: 0.2rem; background: #e9f3e6; border-left: 4px solid var(--stamp-green); padding: 0.5rem 0.7rem; margin: 0.6rem 0; font-size: 0.92rem; }
.res-unlock b { font-family: var(--font-label); text-transform: uppercase; letter-spacing: 0.06em; }
