/* Rear Window — shared look for splash, TV and phones. 1954 Paramount by
   night: courtyard navy, rulebook red and teal, cream paper. */
:root {
  --bg: #12141f; --panel: #1c2030; --panel2: #262b3f; --ink: #f1e8d4; --dim: #9aa0b4;
  --red: #c8323a; --teal: #6fb0b8; --gold: #e3b34f; --cream: #f4ecd8; --ok: #5aa469;
  --serif: "Cormorant Garamond", Georgia, serif; --display: "Bebas Neue", Impact, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html, body { min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 16px/1.4 system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: var(--display); font-weight: normal; letter-spacing: 1.5px; }
h1 { color: var(--red); font-size: 44px; line-height: 1; }
h2 { color: var(--teal); font-size: 26px; }
button { background: var(--panel2); border: 1px solid #3b4260; color: var(--ink); padding: 11px 16px;
  border-radius: 10px; font: inherit; font-size: 16px; cursor: pointer; }
button.primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
button.teal { background: var(--teal); border-color: var(--teal); color: #0d1a1c; font-weight: 600; }
button:disabled { opacity: .35; cursor: default; }
.muted { color: var(--dim); }
.tagg { color: var(--dim); font-size: 14px; margin-left: 8px; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(120px); background: var(--cream);
  color: #1b1d2a; padding: 10px 18px; border-radius: 10px; transition: transform .25s; z-index: 50; max-width: 90vw; }
#toast.show { transform: translateX(-50%) translateY(0); }
#conn { position: fixed; top: 8px; right: 8px; background: var(--red); color: #fff; padding: 4px 10px; border-radius: 8px;
  font-size: 13px; display: none; z-index: 60; }
#conn.show { display: block; }
/* humans only: the shell's bot buttons never apply */
#cs-addbot, #cs-add-bot, #cs-remove-bot { display: none !important; }

/* ---- the day board ---- */
.board { position: relative; width: 100%; aspect-ratio: 1600 / 1220; background-size: 100% 100%; border-radius: 1.2%;
  box-shadow: 0 6px 24px #000c; container-type: inline-size; }
.board.facedown { background: repeating-linear-gradient(135deg, #2a2f45 0 14px, #262a3e 14px 28px); display: grid; place-items: center; }
.fd-day { font-family: var(--display); color: var(--red); font-size: 9cqw; text-align: center; line-height: .9; }
.fd-day b { display: block; font-size: 20cqw; font-weight: normal; }
.win { position: absolute; width: 18.6%; height: 34%; transform: translate(-50%, -50%); border-radius: 4%; }
.win img { width: 100%; height: 100%; object-fit: cover; border-radius: 4%; box-shadow: 0 .6cqw 1.6cqw #000b; display: block; }
.win.empty { border: .25cqw dashed #ffffff30; }
.win.peek img { filter: brightness(.55) saturate(.6); }
.win.peek.down img, .win.seen img { outline: .4cqw solid var(--gold); }
.win .badge { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); background: #000c; color: var(--gold);
  font-size: 1.8cqw; padding: .2cqw .8cqw; border-radius: 1cqw; white-space: nowrap; }
.win .badge:empty { display: none; }
.win .ptr { position: absolute; width: 45%; transform: translate(0, -50%); filter: drop-shadow(0 .3cqw .5cqw #000); pointer-events: none; }
.hot { outline: .5cqw solid var(--gold); outline-offset: .3cqw; animation: glow 1.2s ease-in-out infinite alternate; cursor: pointer; }
@keyframes glow { from { outline-color: #e3b34f; } to { outline-color: #e3b34f55; } }
.slot { position: absolute; transform: translate(-50%, -50%); height: 8.6%; display: flex; align-items: center; justify-content: center; border-radius: 50cqw; }
.slot.res { width: 10.5%; }
.slot.attr { width: 19.5%; justify-content: flex-start; }
.slot img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 .3cqw .4cqw #000a); }
.slot.attr > img { height: 100%; width: 100%; object-fit: contain; object-position: left center; }
.slot.sel { outline: .5cqw solid var(--teal); outline-offset: .3cqw; }
.slot .partner { position: absolute; right: 1%; top: 50%; transform: translateY(-50%); height: 100%; aspect-ratio: 1.6;
  display: flex; align-items: center; justify-content: center; border-radius: 50cqw; }
.slot .partner i { color: var(--gold); font-style: normal; font-size: 3cqw; font-weight: bold; }
.slot .partner img { height: 100%; }
.inv { position: absolute; right: -2cqw; top: -2.5cqw; width: 4.5cqw; height: 4.5cqw; z-index: 3; }
.cube { position: absolute; width: 3.4%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: linear-gradient(145deg, #3a3a3e, #0d0d10); border-radius: 12%; box-shadow: 0 .3cqw .6cqw #000, inset .2cqw .2cqw .3cqw #ffffff30; }
.cube.zero { width: auto; aspect-ratio: auto; color: #fff; padding: .4cqw 1cqw; font-size: 2.4cqw; }

.daytabs { display: flex; gap: 6px; margin: 8px 0; }
.daytab { flex: 1; padding: 8px 4px; font-size: 14px; }
.daytab.on { background: var(--teal); color: #0d1a1c; border-color: var(--teal); }
.daytab b { color: var(--gold); }
.daytab.on b { color: #0d1a1c; }

.zoom { position: fixed; inset: 0; background: #000e; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.zoom > img { max-width: 100%; max-height: 80vh; border-radius: 12px; }
.zoom .ptrwrap { position: relative; display: inline-block; }
.zoom .ptrwrap img.card { max-width: 92vw; max-height: 70vh; border-radius: 12px; display: block; }
.zoom .ptrwrap .ptr { position: absolute; width: 45%; transform: translate(0, -50%); pointer-events: none; }

.solution { position: relative; }
.solution .clap { width: 100%; border-radius: 10px; display: block; }
.solrows { display: grid; gap: 6px; margin-top: 8px; }
.solrow { display: flex; align-items: center; gap: 8px; background: var(--panel2); border-radius: 10px; padding: 6px 10px; flex-wrap: wrap; }
.solrow b { font-family: var(--display); color: var(--red); font-size: 24px; width: 18px; }
.solrow .tok { height: 38px; }
.solrow .tile { height: 36px; }

/* ---- pickers ---- */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 78vh; overflow: auto; background: var(--panel); border-radius: 16px 16px 0 0;
  padding: 14px 16px 22px; z-index: 30; box-shadow: 0 -8px 30px #000c; }
.sheet h3 { color: var(--teal); font-size: 22px; margin-bottom: 8px; }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pick { background: var(--panel2); border: 2px solid transparent; border-radius: 12px; padding: 6px; text-align: center; font-size: 13px; color: var(--ink); }
.pick img { width: 100%; height: 56px; object-fit: contain; display: block; margin-bottom: 4px; }
.pick.on { border-color: var(--gold); background: #3a3320; }
.pick.used { opacity: .45; }
.scrim { position: fixed; inset: 0; background: #0008; z-index: 29; }
