/* ============================================================
   PERFECT FIVE — front-office terminal
   Tokens: Ink #101418 · Tunnel #1A2027 · Chalk #E8E4D8
           Maple #B98A4F · Amber #FFB52E · Whistle #E2654E
   Type:   Barlow Condensed (display) · Barlow (body) · IBM Plex Mono (data)
   ============================================================ */

:root {
  --ink: #101418;
  --tunnel: #1A2027;
  --tunnel-2: #232B34;
  --chalk: #E8E4D8;
  --chalk-dim: #9AA0A6;
  --maple: #B98A4F;
  --maple-line: #6E5530;
  --amber: #FFB52E;
  --whistle: #E2654E;
  --ok: #8FB99B;
  --disp: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }
body {
  background: var(--ink);
  color: var(--chalk);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono); }
.dim { color: var(--chalk-dim); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ---------- shell ---------- */

.site-head {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid var(--maple-line);
}
.brand-logo { display: block; width: 232px; max-width: 68%; height: auto; }
.round-pips { display: flex; gap: 6px; }
.round-pips span {
  width: 9px; height: 9px;
  border: 1px solid var(--maple);
  transform: rotate(45deg);
}
.round-pips span.done { background: var(--maple); }
.round-pips span.now  { background: var(--amber); border-color: var(--amber); }

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 28px;
}
body.drafting #app { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
body.drafting.has-pick #app { padding-bottom: calc(176px + env(safe-area-inset-bottom)); }
body.drafting .site-foot { display: none; }

.site-foot {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px 20px;
  border-top: 1px solid var(--tunnel-2);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.35;
  color: var(--chalk-dim);
}
.site-foot p { margin: 4px 0; }
.site-foot .games-count { font-size: 11px; letter-spacing: 0.04em; color: var(--maple); margin: 0 0 10px; }
.site-foot details.legal summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  padding: 4px 0;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  -webkit-user-select: none;
  user-select: none;
}
.site-foot details.legal summary::-webkit-details-marker { display: none; }
.site-foot details.legal summary::before {
  content: "\25B8";
  display: inline-block;
  margin-right: 7px;
  transition: transform 0.15s ease;
}
.site-foot details.legal[open] summary::before { transform: rotate(90deg); }
.site-foot details.legal p { margin: 8px 0 0; }
.site-foot a { color: var(--chalk); text-decoration: underline; }

.loading-state { padding: 48px 0; text-align: center; }

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maple);
  margin: 0 0 8px;
}

/* ---------- roll ticket (signature) ---------- */

.ticket {
  background: var(--tunnel);
  border: 1px solid var(--maple-line);
  border-top: 3px solid var(--maple);
  padding: 14px 16px 12px;
  margin-bottom: 14px;
}
.ticket-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ticket-headtext { flex: 1 1 auto; min-width: 0; }   /* grow to fill, pushing the crest zone to the right edge */
.ticket-art {
  flex: 0 0 116px;      /* fixed right zone; crest sits centered in it, so it stays put and lands centered between the longest name and the border */
  width: 96px;
  height: 96px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crest-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.ticket-roll {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
/* While Presti reels spin: one line, clipped reel-window. Padding adds vertical
   headroom for the landing scale-pop; the negative margin keeps layout height
   unchanged so nothing below shifts. Removed once the reels settle. */
.ticket-roll.reeling {
  flex-wrap: nowrap;
  overflow: hidden;
  padding-block: 8px;
  margin-block: -8px;
}
/* during the spin, decoys stay on one line and clip at the window edge (so
   "Trail Blazers" behaves like "Timberwolves"); the real landed name wraps in
   full once .reeling is removed */
.ticket-roll.reeling .ticket-dec,
.ticket-roll.reeling .ticket-fr {
  white-space: nowrap;
}
.ticket-dec {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  color: var(--amber);
  letter-spacing: 0.02em;
}
.ticket-fr {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.ticket-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--chalk-dim);
  margin-top: 6px;
}
.ticket-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.skip-btn {
  flex: 1;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chalk);
  border: 1px solid var(--tunnel-2);
  background: var(--ink);
  padding: 9px 6px;
}
.skip-btn:not(:disabled):active { border-color: var(--maple); }
.skip-btn:disabled { color: #555c63; border-color: var(--tunnel-2); cursor: default; }

/* Presti "spin" buttons: extruded goldenrod, cap mode only.
   Dual shadow = 3D side (0 5px 0) + grounding drop; compresses on :active. */
button.presti-spin {
  --spin-face: #E89A1C;   /* goldenrod: more orange than --amber, still yellow */
  --spin-top:  #F8B647;
  --spin-side: #9E5A0F;
  --spin-ink:  #2A1A05;
  position: relative;
  border: 0;
  border-radius: 9px;
  color: var(--spin-ink);
  font-weight: 600;
  padding: 10px 6px 11px;
  background: linear-gradient(180deg, var(--spin-top) 0%, var(--spin-face) 48%, var(--spin-face) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 5px 0 0 var(--spin-side),
    0 7px 9px -3px rgba(0,0,0,0.5);
  transform: translateY(0);
  transition: transform 70ms ease, box-shadow 70ms ease, background 140ms ease;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
button.presti-spin:not(:disabled):active {
  transform: translateY(4px);   /* compresses into the page */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    0 1px 0 0 var(--spin-side),
    0 2px 4px -2px rgba(0,0,0,0.45);
}
button.presti-spin:disabled {
  color: #6c6048;
  background: #3a352a;
  box-shadow: inset 0 0 0 1px #4a4434;
  transform: none;
}
.skip-btn.presti-spin.refunded {
  --spin-face: #2FA866;   /* money-green flash on the free spin */
  --spin-top:  #4FC487;
  --spin-side: #1B6E40;
  color: #082A1A;
  font-weight: 700;       /* bold the green button text only */
  animation: spinRefund 500ms ease;
}
/* marquee: two interleaved sets of white bulbs around the inner perimeter,
   blinking in antiphase = classic alternating marquee. Bulbs are a masked dot
   grid (gradient + opacity only), so it stays GPU-cheap. */
.skip-btn.presti-spin.refunded::before,
.skip-btn.presti-spin.refunded::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 7px;
  padding: 4px;
  pointer-events: none;
  background: radial-gradient(circle, #fff 0 1.8px, rgba(255,255,255,0) 2.4px);
  background-size: 10px 10px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  filter: drop-shadow(0 0 2px rgba(255,255,255,0.7));
}
.skip-btn.presti-spin.refunded::before { animation: bulbsA 0.26s steps(1, end) infinite; }
.skip-btn.presti-spin.refunded::after  { background-position: 5px 5px; animation: bulbsB 0.26s steps(1, end) infinite; }
@keyframes spinRefund {
  0%   { transform: translateY(4px) scale(0.98); }
  40%  { transform: translateY(-2px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes bulbsA { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0.12; } }
@keyframes bulbsB { 0%, 49.9% { opacity: 0.12; } 50%, 100% { opacity: 1; } }

/* ---------- pool ---------- */

/* while the rows roulette (names/years spinning), block taps so a half-spun row
   can't be picked — but keep their normal colors (no dimming) */
#pool.scrambling {
  pointer-events: none;
}

.pool-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 4px 0 8px;
}
.pool-count { font-family: var(--mono); font-size: 11px; color: var(--chalk-dim); }

/* draft search + sort tools */
.pool-head-tools { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.pool-search {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 11px;
  background: var(--tunnel);
  border: 1px solid var(--maple-line);
  border-radius: 8px;
  color: var(--chalk);
  -webkit-appearance: none;
}
.pool-search::placeholder { color: var(--chalk-dim); }
.pool-search:focus { outline: none; border-color: var(--maple); }
.sort-chips { display: flex; gap: 6px; flex-wrap: nowrap; flex: 0 0 auto; }
.sort-chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 9px;
  background: transparent;
  border: 1px solid var(--maple-line);
  border-radius: 999px;
  color: var(--chalk-dim);
  cursor: pointer;
  white-space: nowrap;
}
.sort-chip.active { background: var(--amber); border-color: var(--amber); color: var(--tunnel); font-weight: 600; }
.pro-hint { font-family: var(--mono); font-size: 11px; line-height: 1.4; color: var(--maple); margin: 8px 0 2px; }
.pro-hint em { font-style: italic; color: var(--amber); }
.info-i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px;
  border: 1.4px solid currentColor; border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700;
  font-size: 9px; line-height: 1;
  margin-right: 2px; vertical-align: -1px;
}

.pool { display: flex; flex-direction: column; gap: 6px; }
.player-row {
  width: 100%;
  text-align: left;
  background: var(--tunnel);
  border: 1px solid var(--tunnel-2);
  border-left: 3px solid var(--tunnel-2);
  padding: 10px 12px;
}
.player-row:active { background: var(--tunnel-2); }
.player-row { cursor: pointer; }
.player-row:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.player-row.off { opacity: 0.35; cursor: default; }

/* season picker inside a draft-pool row */
.year-sel {
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--maple);
  background-color: var(--ink);
  border: 1px solid var(--maple-line);
  padding: 2px 17px 2px 6px;
  line-height: 1.3;
  max-width: 132px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23B98A4F' fill='none' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
  background-size: 8px 5px;
}
.year-sel:focus { outline: none; border-color: var(--maple); color: var(--amber); }
.player-row.sel {
  border-color: var(--maple);
  border-left-color: var(--amber);
  background: var(--tunnel-2);
}
.pr-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.pr-name { font-weight: 500; font-size: 16px; }
.pr-v {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 16px;
  color: var(--amber);
  white-space: nowrap;
}
.pr-v small { color: var(--chalk-dim); font-weight: 400; font-size: 10px; margin-right: 3px; }
.pr-pos {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--maple);
  white-space: nowrap;
}
.pr-stats { color: var(--chalk-dim); font-size: 10.5px; letter-spacing: 0.01em; }
.slot-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--maple);
  padding: 1px 5px;
  margin-right: 7px;
  vertical-align: 2px;
}
.pr-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--chalk-dim);
}
.chips { display: inline-flex; gap: 4px; }
.chip {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border: 1px solid var(--maple-line);
  color: var(--maple);
}
.chip.half { border-style: dashed; }

/* ---------- slots + fit tray ---------- */

.slot-rail { display: flex; gap: 5px; margin-bottom: 6px; }
.slot {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 2px;
  color: var(--chalk-dim);
  border: 1px solid var(--tunnel-2);
}
.slot b { font-weight: 700; color: var(--chalk); }
.slot.filled b { color: var(--ink); }
.slot.filled {
  color: var(--ink);
  background: var(--maple);
  border-color: var(--maple);
}

/* ---------- lineup rail: drafted roster shown in the draft tray ----------
   Ultimate-Team-style token row: 5 across (2 G / 2 F / 1 C), each an initials
   avatar with a corner position badge and the last name beneath. Open slots are
   dashed circles showing the position letter. */
.lineup-rail { display: flex; gap: 6px; justify-content: space-between; align-items: flex-start; margin-bottom: 9px; }
.lineup-slot {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.ls-token {
  position: relative;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: var(--disp); font-weight: 700; font-size: 17px; letter-spacing: 0.01em;
  color: var(--ink); background: var(--maple);
  border: 2px solid var(--amber);
}
.ls-token.is-open {
  color: var(--chalk-dim); background: transparent;
  border: 2px dashed var(--tunnel-2);
  font-family: var(--mono); font-size: 14px; font-weight: 600;
}
.ls-pos {
  position: absolute; bottom: -4px; right: -4px;
  font-family: var(--mono); font-style: normal; font-size: 9px; font-weight: 700; line-height: 1;
  color: var(--ink); background: var(--amber);
  padding: 2px 4px; border-radius: 7px;
  border: 1.5px solid var(--ink);
}
.ls-name {
  max-width: 100%; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--body); font-size: 11px; color: var(--chalk); text-align: center;
}
.ls-name.ls-open { color: var(--chalk-dim); font-style: italic; }


.tray {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--ink);
  border-top: 2px solid var(--maple-line);
  padding: 8px 16px calc(10px + env(safe-area-inset-bottom));
}
.tray-inner { max-width: 528px; margin: 0 auto; }
.tray-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--chalk-dim);
}
.tray-stats b {
  display: block;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--chalk);
}
.tray-stats b.warn { color: var(--whistle); }
.tray-stats b.good { color: var(--ok); }
.tray-stats-3 { grid-template-columns: repeat(3, 1fr); }
.confirm-btn {
  flex: 1;
  margin-top: 8px;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--amber);
  padding: 11px 8px;
}
.confirm-label {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--chalk-dim);
}
.confirm-multi { display: flex; gap: 6px; }
.confirm-multi .confirm-btn { margin-top: 4px; }

/* The draft button(s) wear the same casino style as the rerolls in every mode,
   sized as the hero action and centered at the bottom of the tray. */
.confirm-btn.presti-spin {
  flex: 0 0 auto;
  display: block;
  width: -webkit-fit-content;
  width: fit-content;
  min-width: 240px;
  max-width: 100%;
  margin: 16px auto 6px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 13px 22px;
}
.confirm-label { text-align: center; }
.confirm-multi { justify-content: center; flex-wrap: wrap; }
.confirm-multi .confirm-btn.presti-spin { min-width: 0; margin: 10px 0 0; padding: 12px 18px; }

/* ---------- results ---------- */

.board {
  background: var(--tunnel);
  border: 1px solid var(--maple-line);
  border-top: 3px solid var(--maple);
  padding: 16px;
  margin-bottom: 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.board .big-label .net-base { color: var(--amber); }
.board .big-label .net-bonus { color: #ff5a4a; text-shadow: 0 0 10px rgba(255,65,51,0.55); }
.board .big {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  color: var(--amber);
}
.board .big-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  margin-top: 2px;
}
.board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--mono);
}
.board-cell {
  background: var(--ink);
  border: 1px solid var(--tunnel-2);
  padding: 8px 6px;
}
.board-cell .k { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--chalk-dim); }
.board-cell .v { font-size: 17px; font-weight: 600; margin-top: 2px; }
.share-out {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: var(--ink);
  color: var(--chalk);
  border: 1px solid var(--amber);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  padding: 10px;
  resize: none;
}
.section { margin: 20px 0; }

.pick-card {
  background: var(--tunnel);
  border: 1px solid var(--tunnel-2);
  padding: 10px 12px;
  margin-bottom: 6px;
}
.pick-card.hot-pick {
  border-color: #ff4133;
  box-shadow: 0 0 0 1px #ff4133, 0 0 16px rgba(255,65,51,0.55), inset 0 0 18px rgba(255,65,51,0.12);
}
.hot-pick .pr-name { color: #ff5a4a; }                          /* hot player's name in the bonus red */
.hot-pick .pr-v .hot-bonus { color: #ff5a4a; text-shadow: 0 0 10px rgba(255,65,51,0.6); }   /* base value stays gold; only the bonus is red */
.hot-pick .slot-badge {
  color: #ff5a4a;
  text-shadow: 0 0 10px rgba(255,65,51,0.6);
  background: transparent;
  border: 1px solid #ff4133;
  box-shadow: 0 0 8px rgba(255,65,51,0.5);
}
.pick-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }

.ledger { border: 1px solid var(--tunnel-2); }
.ledger-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--tunnel-2);
  font-size: 13.5px;
}
.ledger-row:last-child { border-bottom: none; }
.ledger-row .why { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--chalk-dim); margin-top: 2px; }
.ledger-amt { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.ledger-amt.tax { color: var(--whistle); }
.ledger-amt.zero { color: var(--ok); }
.ledger-amt.good { color: var(--ok); }
.ledger-amt.hot { color: var(--ok); }
.ledger-row.total { background: var(--tunnel); font-weight: 500; }

/* ---------- two-way profile (results) ---------- */
.twoway-sec { margin-top: 14px; }
.twoway { border: 1px solid var(--tunnel-2); padding: 14px 12px; }
.tw-row { margin-bottom: 14px; }
.tw-row:last-child { margin-bottom: 4px; }
.tw-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.tw-end { font-family: var(--disp); font-size: 17px; letter-spacing: 0.02em; text-transform: uppercase; color: var(--chalk); }
.tw-tier { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.tw-track { height: 9px; background: var(--tunnel-2); border-radius: 5px; overflow: hidden; }
.tw-fill { height: 100%; border-radius: 5px; transition: width 0.5s cubic-bezier(.2,.7,.2,1); }
.tw-fill.tw-off { background: var(--amber); }
.tw-fill.tw-def { background: var(--amber); }
.tw-fill.tw-nub { width: 7px; background: var(--whistle); }
.tier-elite { color: var(--amber); }
.tier-strong { color: var(--chalk); }
.tier-solid { color: var(--chalk-dim); }
.tier-avg { color: var(--chalk-dim); }
.tier-weak { color: var(--whistle); }

/* ---------- Kaman Mode ---------- */
.kaman-ticket { display: flex; align-items: center; justify-content: center; min-height: 96px; padding: 10px 12px; }
.kaman-big {
  font-family: var(--disp);
  font-weight: 800;
  font-size: clamp(52px, 19vw, 104px);
  line-height: 0.92;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  text-align: center;
  text-shadow: 0 3px 0 var(--maple-line);
}
.kaman-board { position: relative; overflow: hidden; }
.kaman-flavor {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--chalk-dim);
  margin: 12px auto 2px;
  max-width: 30em;
}


/* ---------- the climb (results) ---------- */
.climb { position: relative; }
.goat-fw { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 6; }
.spray-layer { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 200; }
.goat-particle {
  position: absolute; line-height: 1; will-change: transform, opacity;
  transform: translate(-50%, -50%) scale(.3);
  animation: goatFly 1.35s cubic-bezier(.16, .7, .3, 1) forwards;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .55));
}
@keyframes goatFly {
  0%   { transform: translate(-50%, -50%) scale(.3) rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 52px)) scale(1) rotate(var(--rot)); opacity: 0; }
}
.climb-track { position: relative; margin: 14px 0 4px; --rail-x: 56%; }
.climb-svg {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  animation: climbFade 600ms ease-out both; animation-delay: 120ms;
}
.rail-path {
  fill: none; stroke: var(--tunnel-2); stroke-width: 8;
  vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round;
}
.fill-path {
  fill: none; stroke: var(--amber); stroke-width: 8;
  vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round;
}
.climb-pin {
  position: absolute; left: calc(var(--rail-x) - 11px);
  width: 7px; height: 7px; margin-left: -3.5px; margin-top: -3.5px;
  border-radius: 50%; background: var(--maple); border: 1px solid var(--ink);
  animation: pinIn 550ms ease-out both; animation-delay: 520ms;
}
.climb-pin.comp {
  width: 10px; height: 10px; margin-left: -5px; margin-top: -5px;
  background: var(--amber); box-shadow: 0 0 0 2px rgba(255, 181, 46, 0.25);
}
.climb-tag {
  position: absolute; right: calc(100% - var(--rail-x) + 22px); transform: translateY(-50%);
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.03em;
  color: var(--chalk-dim); white-space: nowrap;
  animation: climbFade 550ms ease-out both; animation-delay: 580ms;
}
.climb-tag.comp { color: var(--amber); }
.climb-tag b { color: var(--chalk); font-weight: 700; }
.climb-tag.comp b { color: var(--amber); }
@keyframes pinIn { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes climbFade { from { opacity: 0; } to { opacity: 1; } }
.climb-summit-cap {
  position: absolute; top: -14px; right: calc(100% - var(--rail-x) + 10px);
  font-family: var(--disp); font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--amber); background: var(--ink); padding: 0 5px; white-space: nowrap;
  z-index: 7; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.climb-you { position: absolute; left: 0; right: 0; height: 0; z-index: 4; }
.cy-dot {
  position: absolute; left: var(--rail-x); top: 0; transform: translate(-50%, -50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--amber); border: 2px solid var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 181, 46, 0.22);
}
.cy-arrow {
  position: absolute; left: var(--rail-x); top: 0; transform: translate(-50%, -50%);
  font-size: 22px; line-height: 1; color: var(--amber);
  text-shadow: 0 0 6px rgba(255, 181, 46, 0.5);
  animation: climbFade 550ms ease-out both; animation-delay: 380ms;
}
.cy-label {
  position: absolute; left: calc(var(--rail-x) + 18px); top: 0; transform: translateY(-50%);
  max-width: calc(100% - var(--rail-x) - 24px);
  font-family: var(--disp); font-size: 16px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--amber); line-height: 1.05;
  animation: youIn 650ms ease-out both; animation-delay: 380ms;
}
.cy-label small {
  display: block; margin-top: 4px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.03em;
  color: var(--chalk-dim); line-height: 1.3; white-space: normal;
}
@keyframes youIn { from { opacity: 0; transform: translateY(-50%) translateX(-6px); } to { opacity: 1; transform: translateY(-50%) translateX(0); } }

.actions { display: flex; gap: 8px; margin: 18px 0 6px; }
.startover-btn {
  align-self: flex-start;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink); background: var(--amber);
  border: 1px solid var(--amber);
  padding: 5px 11px; margin-bottom: 12px; cursor: pointer;
}
.startover-btn:active { background: var(--maple); border-color: var(--maple); }

.results-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.results-topbar .startover-btn { margin-bottom: 0; }
.donate-btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink); background: var(--amber);
  border: 1px solid var(--amber);
  padding: 5px 11px; cursor: pointer;
  text-decoration: none; display: inline-block;
  max-width: 62%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.donate-btn:active { background: var(--maple); border-color: var(--maple); }
.btn {
  flex: 1;
  font-family: var(--disp);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 8px;
  text-align: center;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-ghost { border: 1px solid var(--maple-line); color: var(--chalk); }

.error-box {
  border: 1px solid var(--whistle);
  padding: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--chalk);
}

/* ---------- motion ---------- */

.flap { animation: flap-pop 200ms ease-out 1; }
@keyframes flap-pop {
  0%   { transform: translateY(-7px); opacity: 0; }
  55%  { opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .flap { animation: none; }
  button.presti-spin { transition: none; }
  button.presti-spin:not(:disabled):active { transform: translateY(2px); }
  .skip-btn.presti-spin.refunded { animation: none; transform: none; }
  .skip-btn.presti-spin.refunded::before,
  .skip-btn.presti-spin.refunded::after { animation: none; opacity: 1; }
}

/* ---------- intro ---------- */

.intro p { margin: 10px 0; font-size: 15px; }
.intro-title {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin: 4px 0 12px;
  color: var(--chalk);
}
.intro-lead { margin: 0 0 4px; color: var(--chalk); }
.intro .eyebrow { margin-top: 20px; font-weight: 600; }
.btn-block { display: block; width: 100%; margin-top: 16px; }

/* ---------- test mode ---------- */
.five-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.five-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--tunnel-2); border: 1px solid var(--maple-line);
  padding: 6px 9px; font-size: 13px; color: var(--chalk);
}
.five-chip small { color: var(--chalk-dim); font-family: var(--mono); font-size: 10px; }
.five-chip .rm { color: var(--whistle); font-weight: 700; margin-left: 2px; font-family: var(--mono); }
.test-empty, .test-need, .test-more { font-size: 11px; margin: 8px 0; }
.test-need { margin-top: 10px; }
.eval-btn { width: 100%; margin-top: 10px; }
.tabs { display: flex; gap: 6px; margin: 4px 0 8px; }
.tab {
  flex: 1; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--chalk-dim);
  border: 1px solid var(--tunnel-2); padding: 9px;
}
.tab.on { color: var(--ink); background: var(--maple); border-color: var(--maple); }
.test-controls { margin-bottom: 8px; }
.search-input {
  width: 100%; background: var(--tunnel); border: 1px solid var(--tunnel-2);
  color: var(--chalk); font-family: var(--body); font-size: 16px; padding: 10px 12px;
}
.search-input:focus { outline: none; border-color: var(--maple); }
.browse-row { display: flex; gap: 6px; }
.browse-sel {
  flex: 1; background: var(--tunnel); border: 1px solid var(--tunnel-2);
  color: var(--chalk); font-family: var(--mono); font-size: 13px; padding: 9px 8px;
}
.pr-v-inline { font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--amber); white-space: nowrap; }
.tray-stats-4 { grid-template-columns: repeat(4, 1fr); }
.tray-hint { text-align: center; padding: 6px; font-size: 12px; }

/* ---------- Salary Cap mode ---------- */
.btn-dark {
  background: var(--ink);
  color: var(--amber);
  border: 1px solid var(--amber);
  box-shadow: inset 0 0 0 1px rgba(255, 181, 46, 0.22);
}
.btn-dark:active { background: var(--tunnel); }
.mode-note {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  color: var(--chalk-dim);
  margin: 2px 2px 6px;
}
.mode-note strong { color: var(--amber); font-weight: 700; }
.cap-bar {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 2px;
  padding: 8px 12px;
  background: var(--tunnel);
  border: 1px solid var(--maple-line);
  border-left: 3px solid var(--amber);
}
.cap-bar-amt { font-family: var(--mono); font-weight: 700; font-size: 22px; color: var(--amber); line-height: 1; }
.cap-bar-sub { font-family: var(--mono); font-size: 12px; color: var(--chalk-dim); }
.cap-cost { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--amber); white-space: nowrap; }
.cap-row .pr-sub {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 3px;
}
.cap-season {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--maple);
  background-color: var(--ink);
  border: 1px solid var(--maple-line);
  padding: 2px 6px;
  line-height: 1.3;
}
.cap-row.off .cap-cost { color: var(--maple); }
.cap-spent { font-family: var(--mono); font-size: 12px; color: var(--maple); margin: 4px 0 2px; }

/* Salary Cap: info (i) + explanation tooltip */
.cap-bar { align-items: center; }
.cap-info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; flex: 0 0 auto; align-self: center;
  border: 1.4px solid var(--maple); border-radius: 50%;
  color: var(--maple); background: transparent; cursor: pointer;
  font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700;
  font-size: 10px; line-height: 1; padding: 0;
}
.cap-info:active { color: var(--amber); border-color: var(--amber); }
.cap-tip {
  font-family: var(--mono); font-size: 11px; line-height: 1.5;
  color: var(--chalk-dim); background: var(--tunnel);
  border: 1px solid var(--maple-line); border-left: 3px solid var(--maple);
  padding: 8px 10px; margin: 2px 0;
}
.cap-note { flex: 1; min-width: 0; font-family: var(--mono); font-weight: 700; font-size: 10.5px; letter-spacing: 0.01em; line-height: 1.2; color: var(--amber); }

/* ---------- Presti "Hot Hand": the 82-0 shot overlay ---------- */
.hh-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 90% at 50% 32%, rgba(30,22,8,0.93), rgba(5,6,8,0.97));
  opacity: 0; transition: opacity 0.45s ease;
  -webkit-tap-highlight-color: transparent;
}
.hh-overlay.in { opacity: 1; }
.hh-card {
  position: relative; width: 100%; max-width: 380px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
}
.hh-card .goat-fw { position: absolute; inset: -30px; pointer-events: none; z-index: 4; }
.hh-eyebrow {
  font-family: var(--disp); font-weight: 700; font-size: 30px; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.02em; color: var(--amber);
  text-shadow: 0 0 16px rgba(255,181,46,0.5);
}
.hh-sub { font-family: var(--mono); font-size: 12px; color: var(--chalk-dim); letter-spacing: 0.02em; max-width: 280px; }
/* pull a basketball down through the hoop (ball sits BEHIND the hoop), igniting at full pull */
.hh-lever {
  position: relative; width: 132px; height: 216px; margin: 6px 0 4px;
  cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; outline: none;
}
.hh-lever:active { cursor: grabbing; }
.hh-ball, .hh-hoop, .hh-fire, .hh-lever-hint { pointer-events: none; }   /* the container handles all pointers */
.hh-ball {                                        /* the basketball — the ONLY moving part, sent to BACK */
  position: absolute; left: 50%; top: 2px; margin-left: -24px; width: 48px; height: 48px;
  z-index: 1; will-change: transform; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.5));
}
.hh-hoop {                                        /* rim + net, in FRONT and dropped DOWN so the ball starts above it */
  position: absolute; left: 50%; top: 44px; margin-left: -48px; width: 96px; height: 76px; z-index: 3;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.55));
}
.hh-fire {                                         /* flames at the bottom, hidden until ignition */
  position: absolute; left: 50%; bottom: 14px; margin-left: -34px; width: 68px; height: 86px;
  z-index: 2; opacity: 0; transition: opacity 0.18s ease;
}
.hh-lever.ignited .hh-fire { opacity: 1; }
.hh-lever.ignited .hh-ball { filter: drop-shadow(0 0 12px #ff8a1e) drop-shadow(0 0 24px #ffd54a); }
.hh-fire i {
  position: absolute; bottom: 0; left: 50%; transform-origin: 50% 100%;
  background: radial-gradient(50% 62% at 50% 78%, #fff 0%, #ffe07a 26%, #ff9a24 56%, #e0531a 78%, rgba(224,83,26,0) 82%);
  border-radius: 50% 50% 48% 48% / 64% 64% 36% 36%;
  animation: hhFlame 0.42s ease-in-out infinite alternate;
}
.hh-fire i:nth-child(1) { width: 46px; height: 80px; margin-left: -23px; }
.hh-fire i:nth-child(2) { width: 28px; height: 54px; margin-left: -32px; animation-duration: 0.33s; animation-delay: 0.08s; }
.hh-fire i:nth-child(3) { width: 28px; height: 54px; margin-left: 4px;   animation-duration: 0.37s; animation-delay: 0.05s; }
@keyframes hhFlame {
  0%   { transform: translateY(0) scaleY(0.92) scaleX(1.04); opacity: 0.85; }
  100% { transform: translateY(-5px) scaleY(1.2) scaleX(0.88); opacity: 1; }
}
.hh-lever-hint {
  position: absolute; left: 0; right: 0; bottom: -2px; text-align: center;
  font-family: var(--disp); font-weight: 700; font-size: 18px; letter-spacing: 0.16em;
  color: var(--amber); text-shadow: 0 0 12px rgba(255,181,46,0.45); z-index: 4;
  transition: opacity 0.2s ease;
}
.hh-lever-hint b { display: block; font-size: 26px; line-height: 0.9; margin-top: 1px; animation: hhHint 1.1s ease-in-out infinite; }
.hh-lever.pulling .hh-lever-hint { opacity: 0; }
@keyframes hhHint { 0%, 100% { transform: translateY(0); opacity: 0.55; } 50% { transform: translateY(5px); opacity: 1; } }

.hh-stage { display: none; width: 100%; flex-direction: column; align-items: center; gap: 20px; }
.hh-overlay.lit .hh-lever, .hh-overlay.lit .hh-sub { display: none; }
.hh-overlay.lit .hh-stage { display: flex; }

.hh-step { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 9px; opacity: 0.22; transition: opacity 0.4s ease; }
.hh-step.on { opacity: 1; }
.hh-cap { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--chalk-dim); }

/* player reel */
.hh-window {
  position: relative; width: 100%; max-width: 320px; height: 162px; overflow: hidden;
  -webkit-mask: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
          mask: linear-gradient(180deg, transparent, #000 28%, #000 72%, transparent);
}
.hh-strip { will-change: transform; }
.hh-name {
  height: 54px; display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-weight: 700; font-size: 27px; text-transform: uppercase;
  letter-spacing: 0.02em; color: var(--chalk); opacity: 0.5;
}
.hh-name.hot { opacity: 1; color: #fff; transform: scale(1.07); text-shadow: 0 0 7px rgba(255,181,46,0.95), 0 0 22px rgba(255,181,46,0.7); }
.hh-payline { position: absolute; left: 0; right: 0; top: 54px; height: 54px; pointer-events: none; border-top: 1px solid rgba(255,181,46,0.32); border-bottom: 1px solid rgba(255,181,46,0.32); }

/* heat meter — intensity is brightness on one gold, not new hues */
.hh-heat { display: flex; gap: 6px; width: 100%; max-width: 320px; }
.hh-seg { flex: 1; height: 18px; border-radius: 3px; background: rgba(185,138,79,0.14); transition: background 0.12s, box-shadow 0.12s, transform 0.12s; }
.hh-seg.fill.lvl0 { background: rgba(185,138,79,0.30); }
.hh-seg.fill.lvl1 { background: rgba(185,138,79,0.55); }
.hh-seg.fill.lvl2 { background: rgba(255,181,46,0.70); }
.hh-seg.fill.lvl3 { background: rgba(255,200,90,0.90); }
.hh-seg.fill.lvl4 { background: #ffe9b0; }
.hh-seg.lit { background: var(--amber); transform: scaleY(1.28); box-shadow: 0 0 14px rgba(255,181,46,0.75); }
.hh-seg.result { box-shadow: 0 0 22px rgba(255,233,176,0.95); }
.hh-heatlabel { min-height: 28px; font-family: var(--disp); font-weight: 700; font-size: 24px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--maple); transition: transform 0.2s ease; }
.hh-heatlabel.lvl0 { color: var(--chalk-dim); }
.hh-heatlabel.lvl1 { color: var(--maple); }
.hh-heatlabel.lvl2 { color: var(--amber); text-shadow: 0 0 10px rgba(255,181,46,0.55); }
.hh-heatlabel.lvl3 { color: #ffd778; text-shadow: 0 0 16px rgba(255,200,90,0.8); }
.hh-heatlabel.lvl4 { color: #fff; text-shadow: 0 0 10px #fff, 0 0 28px rgba(255,210,120,0.9); }

/* climb */
.hh-net { font-family: var(--disp); font-weight: 700; font-size: 62px; line-height: 0.92; color: var(--chalk); font-variant-numeric: tabular-nums; transition: color 0.2s; }
.hh-net.over { color: #fff; text-shadow: 0 0 12px #fff, 0 0 32px rgba(255,210,120,0.95); }
.hh-netcap { font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--chalk-dim); margin: 2px 0 7px; }
.hh-bar { position: relative; width: 100%; max-width: 320px; height: 10px; border-radius: 5px; background: rgba(185,138,79,0.14); overflow: hidden; }
.hh-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, rgba(255,181,46,0.7), #ffe9b0); }
.hh-fill-bonus { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: linear-gradient(90deg, #ff4133, #ff7a5c); box-shadow: 0 0 9px 1px rgba(255,77,51,0.9); }
.hh-thresh { position: absolute; top: -3px; bottom: -3px; right: 0; width: 2px; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.9); }

/* verdict + actions */
.hh-verdict { opacity: 0; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.35s ease; }
.hh-verdict.on { opacity: 1; transform: none; }
.hh-stamp { font-family: var(--disp); font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: 0.03em; color: var(--amber); font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(255,210,120,0.7); }
.hh-stamp.miss { color: var(--chalk-dim); text-shadow: none; }
.hh-netcap + .hh-bar { margin-top: 0; }
.hh-vsub { margin-top: 5px; font-family: var(--mono); font-size: 12px; color: var(--chalk-dim); letter-spacing: 0.02em; }
.hh-actions { display: none; flex-direction: column; align-items: center; gap: 10px; margin-top: 8px; }
.hh-actions.on { display: flex; }
.hh-btn { font-size: 14px; letter-spacing: 0.12em; padding: 14px 26px; }
.hh-dismiss { background: none; border: 0; color: var(--chalk-dim); font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; padding: 6px; }
.hh-skip { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; z-index: 2; background: none; border: 0; color: var(--chalk-dim); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; padding: 8px; }

@media (prefers-reduced-motion: reduce) {
  .hh-overlay { transition: none; }
  .hh-lever-hint { animation: none; }
  .hh-overlay.reduced .hh-step { display: none; }
}
