/* ==========================================================================
   ULY'S FANTASY S2 — board.css
   The Hottie Big Board. Requires tokens.css + base.css loaded first.
   Layout values transcribed from references/board-design.dc.html.
   ========================================================================== */

/* ---- Page shell ---- */
.board-wrap {
  /* Reference is content-box: 1360px content + 40px gutters outside it.
     We are border-box, so budget the max gutters into the max-width. */
  max-width: calc(var(--max-board) + 80px);
  margin: 0 auto;
  padding-left: clamp(16px, 3vw, 40px);
  padding-right: clamp(16px, 3vw, 40px);
}

/* ==========================================================================
   STICKY HEADER — broadcast chrome band
   ========================================================================== */
.board-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy-deep);
  border-bottom: 2px solid var(--cyan);
}
.board-header__inner {
  padding-top: 14px;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.board-header__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.board-header__logo-link {
  display: inline-flex;
  align-items: center;
}
.board-header__logo {
  height: 30px;
  width: auto;
}
.board-header__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.board-header__cd {
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 20px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.board-header__closes {
  background: var(--pink);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: var(--ls-display);
  padding: 6px 12px;
  text-transform: uppercase;
  white-space: nowrap;
}
/* header live badge is slightly smaller than base */
.board-header .badge-live {
  font-size: var(--fs-label-sm);
  letter-spacing: 0.2em;
  padding: 5px 10px;
  gap: 7px;
}
.board-header .badge-live__dot { width: 7px; height: 7px; }

/* ==========================================================================
   TITLE BAR — pink gradient band
   ========================================================================== */
.board-title {
  background: var(--grad-pink);
}
.board-title__inner {
  padding-top: 18px;
  padding-bottom: 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.board-title__h1 {
  font-size: var(--fs-h1);
  color: #fff;
  line-height: 1;
}
.board-title__count {
  font-size: var(--fs-label);
  letter-spacing: 0.2em;
  color: var(--bubblegum);
  text-transform: uppercase;
}
/* Shown by board.js only when the live backend is unreachable AND the
   approved cache is empty (remote adapter's 'ufstore:error'). */
.board-title__offline {
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  color: #3A0B26;
  margin: 0.35em 0 0;
}

/* ==========================================================================
   GRID
   ========================================================================== */
.board-main {
  padding-top: clamp(20px, 3vw, 36px);
  padding-bottom: 72px;
}
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

/* ---- Slot card ---- */
.slot {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 380px;
  background: var(--card);
  border: 1px solid var(--line-card);
}
.slot--gold { border-color: var(--line-gold); }
.slot--empty {
  background: #0B0F35;
  border-color: rgba(255, 255, 255, 0.08);
}

/* ---- № tag ---- */
.slot__num {
  position: absolute;
  top: -1px;
  left: -1px;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.5;
  padding: 7px 15px;
}
.slot__num--gold { background: var(--grad-gold-tag); color: var(--gold-ink); }
.slot__num--pink { background: var(--pink); color: #fff; }
/* #6E74A8 = reference photo-label tone; used instead of --faint for text so
   empty-slot copy clears the 3:1 contrast rule (base.css: faint is non-text). */
.slot__num--empty { background: var(--card-alt-2); color: #6E74A8; }

/* ---- Photo area ---- */
.slot__photo {
  height: 250px;
  margin: 14px 14px 0;
  flex-shrink: 0;
}
.slot__photo--stripes {
  background: repeating-linear-gradient(45deg, #1A2058 0 10px, #141A4C 10px 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-label-sm);
  letter-spacing: 0.16em;
  color: #6E74A8;
  text-transform: uppercase;
  text-align: center;
  padding: 0 12px;
}
/* Photoless FAN card: two-line callout (commissioner variant keeps one line) */
.slot__photo--nofan {
  flex-direction: column;
  gap: 8px;
}
.slot__photo-main { font-size: 12px; }
.slot__photo-sub {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: none; /* client copy is lowercase — the stripes rule uppercases */
  color: var(--pink);
}

/* ---- Crowd photo attach (photoless fan cards only) ---- */
.slot__attach {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}
.slot__attach-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: none; /* client copy is lowercase */
  color: var(--pink);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: var(--tap-min);
  padding: 6px 12px;
  transition: color var(--dur-fast) var(--ease);
}
.slot__attach-btn:hover { text-decoration-thickness: 2.5px; }
.slot__attach-btn:disabled { cursor: wait; opacity: 0.7; }
.slot__attach-done,
.slot__attach-note {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: none;
  color: var(--pink);
  line-height: 1.5;
}
.slot__attach-note:empty { display: none; }

.slot__photo--img {
  overflow: hidden;
  background: var(--card-alt);
}
.slot__photo--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}

/* ---- Card body ---- */
.slot__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.slot__name {
  font-size: var(--fs-card-name);
  line-height: var(--lh-display);
  overflow-wrap: anywhere;
}
.slot__team {
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.slot__quote {
  font-size: 16px;
  line-height: 1.4;
  flex: 1;
  overflow-wrap: anywhere;
}
.slot__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  font-size: var(--fs-label);
}
.slot__credit { color: var(--muted); overflow-wrap: anywhere; }
.slot__credit-handle { color: var(--pink); }
.slot__commish {
  background: var(--gold);
  color: var(--gold-ink);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: var(--ls-display);
  padding: 3px 8px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Kisses (fan-card voting) ---- */
.slot__kiss {
  position: relative; /* anchors the ::before tap-target extender */
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  background: transparent;
  color: var(--pink);
  border: 1px solid var(--pink);
  padding: 6px 11px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
/* Button box is ~27px tall; -12px/-8px inset = 51px effective hit area (>=44px). */
.slot__kiss::before { content: ""; position: absolute; inset: -12px -8px; }
.slot__kiss:hover {
  background: var(--pink);
  color: #fff;
}
.slot__kiss:active {
  background: var(--pink-deep);
  border-color: var(--pink-deep);
  color: #fff;
}
.slot__kiss:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
/* Already kissed: filled + deepened, reads as pressed, no pointer affordance. */
.slot__kiss--kissed,
.slot__kiss--kissed:hover,
.slot__kiss--kissed:active {
  background: var(--pink-deep);
  border-color: var(--pink-deep);
  color: #fff; /* 5.3:1 on pink-deep — bubblegum misses the 4.5:1 bar at 11px */
  cursor: default;
}
.slot__kiss-lips { font-size: 13px; line-height: 1; }

/* ---- 🃏 trading-card button (same vocabulary as the kiss button) ---- */
.slot__acts {
  display: inline-flex;
  align-items: center;
  /* 14px = the two ::before tap extenders (6px + 8px) meeting exactly, so
     neither button steals the other's hit area. */
  gap: 14px;
  flex-shrink: 0;
}
.slot__card {
  position: relative; /* anchors the ::before tap-target extender */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--cyan);
  border: 1px solid var(--line-cyan);
  padding: 6px 9px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
/* Button box is ~27px tall; -12px/-8px inset = 51px effective hit area (>=44px). */
.slot__card::before { content: ""; position: absolute; inset: -12px -6px; }
.slot__card:hover { background: rgba(67, 232, 255, 0.16); border-color: var(--cyan); }
.slot__card:active { background: rgba(67, 232, 255, 0.28); border-color: var(--cyan); }
.slot__card:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.slot__card--busy { cursor: progress; border-color: var(--cyan); }
.slot__card--done { background: rgba(67, 232, 255, 0.28); border-color: var(--cyan); }
.slot__card-glyph { font-size: 13px; line-height: 1; }

/* ---- FAN FAVORITE badge (pink — gold stays reserved for Uly/№1) ---- */
.slot__fave {
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 2;
  background: var(--pink);
  color: #fff;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: var(--ls-display);
  padding: 5px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---- Empty slot ---- */
.slot__empty-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 24px;
  text-align: center;
}
.slot__dot { width: 12px; height: 12px; animation-duration: 1.4s; }
.slot__clock {
  font-size: 22px;
  letter-spacing: 0.06em;
  color: #6E74A8;
  line-height: 1.2;
}
.slot__scout {
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid var(--cyan);
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.slot__scout:hover { color: var(--pink); border-color: var(--pink); }
/* Link is 19.5px tall; -14px vertical inset yields a 47.5px effective hit area (>=44px). */
.slot__scout.link-tap::before { inset: -14px -8px; }

/* ---- Bottom CTA ---- */
.board-cta {
  margin-top: 36px;
  text-align: center;
}
.board-cta .btn {
  font-size: 20px;
  padding: 16px 32px;
  white-space: normal;
  line-height: 1.3;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.board-footer {
  max-width: calc(var(--max-board) + 80px);
  margin: 0 auto;
  padding: 22px clamp(16px, 3vw, 40px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: var(--fs-label-sm);
  letter-spacing: var(--ls-label);
  color: var(--muted);
  text-transform: uppercase;
}
.board-footer__xoxo { color: var(--pink); }
.board-footer__cast {
  display: none;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.board-footer__cast:hover,
.board-footer__cast:focus-visible { color: var(--text); }
.board-footer__cast.link-tap::before { inset: -16px -10px; } /* >=44px tap target */

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
  .board-header__inner { gap: 10px 16px; padding-top: 12px; padding-bottom: 12px; }
  .board-header__meta { gap: 10px 14px; }
}
@media (max-width: 480px) {
  /* cast-piece surgical fix (round 4): keep the spec-mandated countdown +
     closes badge visible on small phones. The "Season 1 Cast" nav link moves
     out of the sticky header into the board footer instead, so the header
     returns to its approved two-row layout. */
  .board-header__cast { display: none; }
  .board-footer__cast { display: inline; }
}
@media (max-width: 359px) {
  .board-header__logo { height: 26px; }
  .board-cta .btn {
    font-size: 17px;
    padding: 14px 20px;
  }
}

/* Deep-linked cards (#pick-<id>) land clear of the sticky header —
   same pattern as cast.css's anchor offsets. */
.slot {
  scroll-margin-top: calc(var(--header-h, 84px) + 24px);
}
