/* ── Selects ───────────────────────────────────────────────────────────────
   The picking board. Not a film surface — it scrolls, it has hover states,
   it is allowed to transition. What it MAY NOT do is draw its own idea of a
   Movie Matcher card: every card here is the film's own .mm-card, built at
   the film's own 337.68 × 481.6 and SCALED, so a poster that looks right on
   this board looks right in the film. One card, two sizes, no second
   geometry to keep in step.                                                */

body.picks { overflow: auto; overflow-x: hidden; }

#pbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px; height: 56px;
  background: rgba(18,18,20,.82); backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--sunk);
}
.pnav { display: flex; gap: 16px; }
.plink { font-size: 13px; color: var(--dim); text-decoration: none; letter-spacing: .01em; }
.plink:hover { color: var(--tx); }

/* ── slots ──────────────────────────────────────────────────────────────── */
#slots {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 30px; padding: 24px 26px 20px;
  border-bottom: 1px solid var(--sunk);
}
.slotgroup { min-width: 0; }
.sg-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 11px; }
.sg-head b { font-size: 13px; font-weight: 500; color: var(--tx); letter-spacing: .01em; }
.sg-head span { font-size: 11.5px; color: var(--dim); letter-spacing: .005em; }
.sg-row { display: flex; gap: 10px; }

.slot {
  position: relative; flex: none; border-radius: 13px;
  background: var(--sunk); border: 1px dashed rgba(255,255,255,.16);
  cursor: pointer; overflow: hidden;
}
.slot.on { border-style: solid; border-color: transparent; background: none; }
.slot .ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--dim); letter-spacing: .02em;
}
.slot .rm {
  position: absolute; top: 5px; right: 5px; z-index: 12; width: 19px; height: 19px;
  border: none; border-radius: 50%; cursor: pointer; opacity: 0;
  background: rgba(255,255,255,.16); color: #fff; font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.slot:hover .rm { opacity: 1; }
.slot.tgt { border-color: var(--mist-d); background: rgba(143,178,198,.15); }

.slotacts { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.pbtn {
  font: inherit; font-size: 12px; letter-spacing: .005em;
  padding: 7px 13px; border-radius: 9px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--tx);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.pbtn:hover { background: rgba(255,255,255,.11); }
.pbtn-1 { background: var(--hi); color: #141416; border-color: var(--hi); font-weight: 500; }
.pbtn-1:hover { background: #fff; }
.phint { font-size: 11.5px; color: var(--dim); }

/* ── controls ───────────────────────────────────────────────────────────── */
#controls {
  position: sticky; top: 56px; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 26px;
  background: rgba(18,18,20,.86); backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--sunk);
}
.cgroup { display: flex; gap: 4px; background: var(--sunk); padding: 3px; border-radius: 10px; }
.cgroup button {
  font: inherit; font-size: 11.5px; letter-spacing: .005em;
  padding: 5px 11px; border: none; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--dim);
}
.cgroup button.on { background: rgba(255,255,255,.14); color: var(--tx); box-shadow: inset 0 1px 0 rgba(255,255,255,.10); }
.cgroup button .sw {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.ctog { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim); cursor: pointer; }
.ccount { margin-left: auto; font-size: 11.5px; color: var(--dim); }

/* ── board ──────────────────────────────────────────────────────────────── */
#board {
  display: grid; gap: 26px 20px; padding: 24px 26px 40px;
  grid-template-columns: repeat(auto-fill, minmax(206px, 1fr));
  align-items: start;
}
.tile { min-width: 0; }
/* fit-content, so the wrapper is the card. As a plain block it stretched to
   the grid column and the selection outline went round THAT. */
.tile-card { position: relative; cursor: pointer; width: fit-content; }
.tile-card .pin {
  position: absolute; z-index: 12; top: 9px; left: 9px;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 200px;
  display: none; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500; letter-spacing: .02em;
  background: var(--hi); color: #141416; box-shadow: 0 2px 10px rgba(0,0,0,.55);
}
.tile.picked .pin { display: flex; }
/* concentric with the card: an outer radius is the inner one PLUS the gap,
   and the inner one changes with the column, so both are derived from --cr */
.tile.picked .tile-card::after,
.tile.out .tile-card::after {
  content: ''; position: absolute; inset: calc(-1 * var(--gap, 5px));
  border-radius: calc(var(--cr, 21px) + var(--gap, 5px));
  pointer-events: none;
}
.tile.picked .tile-card::after { border: 2px solid var(--hi); }
.tile.out { opacity: .3; }
.tile.out .tile-card::after { border: 2px dashed rgba(255,255,255,.30); }
.tile-foot { padding: 9px 2px 0; }
.tile-name { font-size: 12.5px; color: var(--tx); letter-spacing: .003em; display: flex; align-items: baseline; gap: 6px; }
.tile-name em { font-style: normal; color: var(--dim); font-size: 11px; }
.tile-why { font-size: 11px; line-height: 1.42; color: var(--dim); margin-top: 4px; }
body.nowhy .tile-why { display: none; }
.tile-band {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); flex: none; align-self: center;
}
.tile-acts { display: flex; gap: 7px; margin-top: 7px; }
.tile-acts button {
  font: inherit; font-size: 10.5px; letter-spacing: .01em; padding: 3px 8px;
  border-radius: 6px; cursor: pointer; border: 1px solid var(--glass-line);
  background: transparent; color: var(--dim);
}
.tile-acts button:hover { border-color: rgba(255,255,255,.28); color: var(--tx); }

/* the film's card, shrunk. The holder takes the SCALED size so the grid
   lays out on what you can see, not on the 337.68 the card is drawn at. */
.cardbox { position: relative; }
.cardscale { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.cardscale .mm-card { filter: drop-shadow(0 2px 6px rgba(0,0,0,.45)) drop-shadow(0 16px 34px rgba(0,0,0,.55)); }

#pfoot { padding: 0 26px 34px; font-size: 11px; color: var(--dim); line-height: 1.6; }
#pfoot code { font-size: 10.5px; background: var(--sunk); padding: 1px 5px; border-radius: 4px; }


/* the switch that turns the card headlines off. A checkbox rather than a
   chip, because it is a property of every card at once, not a filter. */
.ctog input { accent-color: var(--hi); }
.tile-band { box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.cgroup button .sw { box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
#pfoot code { background: var(--sunk); color: var(--dim); }
.slot .ph { color: rgba(255,255,255,.34); }

.pbtn-fig { text-decoration: none; display: inline-flex; align-items: center; }

/* ============================================================
   The glow — the app's own ambient, on the board.
   Declared here as tokens because the Figma export READS them back: one
   number for how bright a room is, not one in the stylesheet and another
   in the pusher.
   ============================================================ */
:root { --glow-blur: 34px; --glow-alpha: 0.5; --glow-scale: 1.18; }

.tile { min-width: 0; position: relative; isolation: isolate; }
.tile-glow {
  position: absolute; z-index: 0; pointer-events: none;
  left: 50%; top: 0; width: 100%; height: auto;
  transform: translateX(-50%) scale(var(--glow-scale));
  transform-origin: 50% 34%;
  filter: blur(var(--glow-blur)) saturate(1.35);
  opacity: var(--glow-alpha);
  /* the card sits ON the glow, so the glow may not reach past the card's own
     foot and light the caption — the app's ambient stops at the deck too */
  mask-image: radial-gradient(72% 58% at 50% 34%, #000 38%, transparent 100%);
}
.tile-card, .tile-foot { position: relative; z-index: 1; }
.tile.out .tile-glow { opacity: calc(var(--glow-alpha) * 0.35); }

/* ============================================================
   Screens — the picks, in the app
   ============================================================ */
#screens { padding: 6px 22px 18px; border-bottom: 1px solid var(--glass-line); }
.sc-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.sc-head b { font-size: 12.5px; font-weight: 500; color: var(--tx); }
.sc-head span { font-size: 11px; color: var(--dim); }
.sc-head code { font-size: 10.5px; color: var(--tx); }
.sc-head .sc-sp { flex: 1; }
.sc-row { display: flex; gap: 20px; flex-wrap: wrap; }
.sc-cell { width: 268px; }
.sc-frame {
  position: relative; overflow: hidden; border-radius: 22px;
  background: #0B0B0D;
  box-shadow: 0 18px 44px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.05);
}
/* the app is authored at 402 × 874 and SCALED to the cell — never
   re-laid-out, or every inset in fx.js would need re-deriving here and would
   then disagree with the film */
.sc-holder { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.sc-empty, .sc-miss { padding: 40px 14px; font-size: 12px; color: var(--dim); text-align: center; }
.sc-cap { margin-top: 9px; display: flex; align-items: baseline; gap: 7px; }
.sc-cap b { font-size: 12.5px; font-weight: 500; color: var(--tx); }
.sc-cap span { font-size: 11px; color: var(--dim); }

/* the ground chooser, beside the screens it re-grounds */
.sc-grounds { display: flex; gap: 4px; }
.sc-gr {
  font: inherit; font-size: 10.5px; letter-spacing: .01em; padding: 4px 9px;
  border-radius: 7px; cursor: pointer; border: 1px solid var(--glass-line);
  background: transparent; color: var(--dim);
}
.sc-gr:hover { border-color: rgba(255,255,255,.28); color: var(--tx); }
.sc-gr.on { background: var(--hi); border-color: var(--hi); color: #141416; }
/* the cell's own surround follows the ground, or a white screen sits in a
   dark hole and reads as a cut-out rather than as a screen */
#screens[data-ground="glow"] .sc-frame,
#screens[data-ground="white"] .sc-frame { box-shadow: 0 18px 44px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.10); }
