/* ============================================================================
   Treehouse Games — picker + list (crimsoncatevents.com/games)
   Brand per handoff brief: page #0f0a0c · cards #1A1216 · crimson #88142e · text #f3ede9 · muted #a89a9e
   Font: Plus Jakarta Sans. Mobile-first, fits 360px; ~560px column on desktop.
   ============================================================================ */
.th{--th-bg:#0f0a0c;--th-card:#1A1216;--th-line:rgba(255,255,255,.07);--th-crimson:#88142e;--th-crimson-deep:#5e0f20;
    --th-text:#f3ede9;--th-muted:#a89a9e;--th-gold:rgba(201,162,71,.35);--th-green:#3aa564;
    font-family:'Plus Jakarta Sans',var(--font-body),system-ui,sans-serif;color:var(--th-text);
    max-width:560px;margin-inline:auto;padding-bottom:48px}
.th *{box-sizing:border-box}
.th button{font-family:inherit}

/* ---------- tabs ---------- */
.th-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;border-radius:14px;background:var(--th-card);border:1px solid var(--th-line);margin-bottom:18px}
.th-tab{height:42px;border:0;border-radius:10px;background:transparent;color:var(--th-muted);font-weight:700;font-size:14px;cursor:pointer;
  transition:background .15s ease,color .15s ease}
.th-tab[aria-selected="true"]{background:var(--th-crimson);color:#fff}
.th-tab:focus-visible{outline:2px solid #f7e9c6;outline-offset:2px}
.th-panel[hidden]{display:none}

/* ---------- picker ---------- */
.th-intro{margin:0 0 14px;color:var(--th-muted);font-size:14.5px}
.th-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.th-field{display:flex;flex-direction:column;gap:5px}
.th-field label{font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--th-muted)}
.th-select{position:relative}
.th-select select{width:100%;height:44px;appearance:none;-webkit-appearance:none;padding:0 38px 0 12px;border-radius:12px;
  background:var(--th-card);border:1px solid var(--th-line);color:var(--th-text);font:600 14px 'Plus Jakarta Sans',var(--font-body),sans-serif;cursor:pointer}
.th-select::after{content:"";position:absolute;right:14px;top:50%;width:8px;height:8px;border-right:2px solid var(--th-muted);border-bottom:2px solid var(--th-muted);
  transform:translateY(-70%) rotate(45deg);pointer-events:none}
.th-select select:focus-visible{outline:2px solid #f7e9c6;outline-offset:1px}
.th-row{display:flex;align-items:center;gap:8px;align-self:end;min-width:0}   /* 4th cell of the controls grid, lined up with the selects */
.th-seg{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:6px}
.th-seg button{height:44px;min-width:0;padding:0 4px;border-radius:10px;border:1px solid var(--th-line);background:var(--th-card);color:var(--th-muted);font-weight:700;font-size:13.5px;cursor:pointer;
  transition:background .15s ease,color .15s ease}
.th-seg button[aria-pressed="true"]{background:var(--th-crimson);border-color:var(--th-crimson);color:#fff}
.th-seg button:focus-visible,.th-sound:focus-visible{outline:2px solid #f7e9c6;outline-offset:2px}
.th-sound{flex:none;width:44px;height:44px;border-radius:10px;border:1px solid var(--th-line);background:var(--th-card);color:var(--th-muted);display:grid;place-items:center;cursor:pointer}
.th-sound[aria-pressed="true"]{color:var(--th-text);border-color:rgba(255,255,255,.18)}
.th-sound svg{width:20px;height:20px;display:block;grid-area:1/1}   /* both icons share one centred cell… */
.th-sound[aria-pressed="true"] svg.off,.th-sound[aria-pressed="false"] svg.on{display:none}   /* …and only the current one shows */
.th-btn3d{width:100%;border:none;border-radius:14px;background:#88142e;color:#fff;font-weight:800;font-size:15px;padding:14px;cursor:pointer;
  box-shadow:0 5px 0 #5e0f20,0 7px 12px rgba(0,0,0,.34);transition:transform .06s,box-shadow .06s}
.th-btn3d:active:not([disabled]){transform:translateY(5px);box-shadow:0 1px 0 #5e0f20,0 2px 6px rgba(0,0,0,.3)}
.th-btn3d[disabled]{opacity:.62;cursor:default}
.th-btn3d:focus-visible{outline:2px solid #f7e9c6;outline-offset:3px}

/* reel — vintage mechanical drum: dark housing, warm ivory drum, brass row lines, crimson window on the middle row */
.th-reel{--row:46px;--bez:10px;position:relative;margin:16px 0 0;padding:var(--bez);border-radius:16px;
  background:linear-gradient(#211619,#110b0d);border:1px solid rgba(201,162,71,.34);   /* brass edge */
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 3px #0d0809,inset 0 0 0 4px rgba(201,162,71,.16),0 14px 30px -16px rgba(0,0,0,.9)}   /* dark ring inside the brass */
.th-reel__drum{position:relative;height:calc(var(--row) * 3);overflow:hidden;border-radius:8px;
  background:linear-gradient(180deg,#cdbd9c 0%,#ede2cc 22%,#f6efe0 50%,#ede2cc 78%,#cdbd9c 100%);   /* cylinder shading */
  box-shadow:inset 0 10px 16px -6px rgba(50,28,16,.7),inset 0 -10px 16px -6px rgba(50,28,16,.7),inset 0 0 0 1px rgba(150,110,45,.55),inset 0 0 14px rgba(50,28,16,.25)}   /* set into the machine */
.th-reel__strip{position:absolute;left:0;right:0;top:0;will-change:transform}
.th-reel__row{height:var(--row);box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:0 22px;
  font-family:var(--font-head),Georgia,serif;font-weight:500;font-size:20px;letter-spacing:.005em;color:#2a1a14;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-bottom:1px solid rgba(150,108,40,.42)}   /* thin brass dividers */
.th-reel__row.is-win{color:#5e0f20;font-weight:600}
/* idle state: quiet rows + the prompt in the window; the crimson frame stays so the space reads the same */
.th-reel__row.is-blank{color:rgba(60,35,20,.28);letter-spacing:.3em;font-size:.8em}
.th-reel__row.is-prompt{color:rgba(60,35,20,.62);font-style:italic}
.th-reel.is-idle .th-reel__win{border-color:rgba(142,23,41,.55)}
.th-reel.is-idle .th-reel__win::before{border-left-color:rgba(142,23,41,.55)}.th-reel.is-idle .th-reel__win::after{border-right-color:rgba(142,23,41,.55)}
/* crimson window frame around the middle (winning) row */
.th-reel__win{position:absolute;left:0;right:0;top:var(--row);height:var(--row);pointer-events:none;
  border-top:2px solid #8E1729;border-bottom:2px solid #8E1729;box-shadow:inset 0 0 0 1px rgba(142,23,41,.18);transition:box-shadow .3s ease}
.th-reel__win::before,.th-reel__win::after{content:"";position:absolute;top:50%;width:0;height:0;border:6px solid transparent;transform:translateY(-50%)}
.th-reel__win::before{left:0;border-left:8px solid #8E1729}
.th-reel__win::after{right:0;border-right:8px solid #8E1729}
.th-reel.is-landed .th-reel__win{box-shadow:inset 0 0 0 1px rgba(142,23,41,.35),inset 0 0 18px rgba(142,23,41,.14)}
.th-reel.is-landed .th-reel__row.is-win{animation:thPop .3s ease}
@keyframes thPop{0%{transform:scale(.98)}50%{transform:scale(1.03)}100%{transform:scale(1)}}

/* result / states — the area under the reel is always present (reserved height), so nothing jumps when a game lands */
#thOut{min-height:112px}
.th-hint{margin:12px 0 0;padding:6px 4px;text-align:center;color:var(--th-muted);font-size:13.5px}
.th-hint--warn{color:#e2b7bf}
.th-state{margin:14px 0 0;padding:22px 16px;border:1px dashed var(--th-line);border-radius:12px;text-align:center;color:var(--th-muted);font-size:14px}
.th-state b{display:block;color:var(--th-text);font-weight:700;margin-bottom:3px}
.th-result{margin-top:12px;display:flex;flex-direction:column;gap:8px}
.th-result .th-card{animation:thLand .32s ease}
.th-sub{margin:4px 0 0;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--th-muted)}
@keyframes thLand{0%{transform:scale(.94);opacity:.4}60%{transform:scale(1.03)}100%{transform:scale(1);opacity:1}}
@media(prefers-reduced-motion:reduce){.th-result .th-card,.th-reel__row.is-win{animation:none}}

/* ---------- game card (list row + result) ---------- */
.th-card{display:block;width:100%;text-align:left;padding:12px 14px;border-radius:12px;background:var(--th-card);border:1px solid var(--th-line);color:var(--th-text);cursor:pointer;
  transition:border-color .15s ease,background .15s ease}
.th-card:hover{border-color:rgba(255,255,255,.16);background:#1f161a}
.th-card:focus-visible{outline:2px solid #f7e9c6;outline-offset:2px}
.th-card__top{display:flex;align-items:center;gap:8px}
.th-card__name{flex:1;min-width:0;font-weight:700;font-size:14px;white-space:normal;overflow-wrap:anywhere}   /* game names are never truncated */
.th-marks{display:inline-flex;align-items:center;gap:6px;flex:none}
.th-mark{width:18px;height:18px;display:inline-grid;place-items:center}
.th-mark img{width:18px;height:18px;display:block;border-radius:50%}
.th-mark.c{font-weight:800;font-size:15px;line-height:1;color:var(--th-green)}
.th-card__meta{margin-top:3px;font-size:12.5px;color:var(--th-muted)}
.th-card__desc{margin-top:5px;font-size:13px;line-height:1.45;color:#d6ccd0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ---- result tickets: printed slips from the machine (ivory paper, brass edge, one crimson accent) ---- */
.th-card.th-card--win,.th-card.th-card--mini{background:linear-gradient(180deg,#f6efe2,#efe5d4);border:1px solid rgba(150,110,45,.55);color:#2a1a14;border-radius:8px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}
.th-card.th-card--win:hover,.th-card.th-card--mini:hover{background:linear-gradient(180deg,#faf4e8,#f3eadb);border-color:rgba(142,23,41,.6)}
/* winner: title leads in the reel's serif; a short crimson rule ties it to the reel above */
.th-card.th-card--win{position:relative;padding:14px 16px 13px;border-top-left-radius:4px;border-top-right-radius:4px}
.th-card.th-card--win::before{content:"";position:absolute;left:50%;top:-1px;width:56px;height:3px;transform:translateX(-50%);background:var(--th-crimson);border-radius:0 0 2px 2px}
.th-card--win .th-card__name{font-family:var(--font-head),Georgia,serif;font-weight:500;font-size:22px;line-height:1.15;letter-spacing:-.005em;color:#2a1a14;white-space:normal;overflow:visible;text-overflow:clip}
.th-card--win .th-card__meta{margin-top:4px;font-size:12.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#8a6a32}
.th-card--win .th-card__desc{margin-top:6px;-webkit-line-clamp:2;color:#4a3a30;font-size:13.5px;border-top:1px solid rgba(150,110,45,.28);padding-top:6px}
.th-card--win .th-mark.c{color:#2f8a52}
/* runners-up: slimmer slips, title left, facts right */
.th-card.th-card--mini{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;row-gap:2px;align-items:center;padding:8px 12px;border-radius:6px}
/* runner-ups: full title (wraps if long) + status icons on the first row, facts underneath */
.th-card--mini .th-card__name{grid-column:1;grid-row:1;min-width:0;font-family:var(--font-head),Georgia,serif;font-weight:500;font-size:15.5px;line-height:1.2;color:#2a1a14;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:break-word}
.th-card--mini .th-marks{grid-column:2;grid-row:1}
.th-card--mini .th-card__meta{grid-column:1 / -1;grid-row:2;margin:0;font-size:11px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:#8a6a32;line-height:1.3}
.th-card--mini .th-mark.c{color:#2f8a52}
.th-result{gap:6px}
.th-sub{color:rgba(201,162,71,.85)}

/* ---------- list: the machine's index drawer (dark housing · ivory index strips · brass structure · crimson accents) ---------- */
#panel-list{padding:12px;border-radius:16px;background:linear-gradient(#1c1316,#120c0e);border:1px solid rgba(201,162,71,.34);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),inset 0 0 0 3px #0d0809,inset 0 0 0 4px rgba(201,162,71,.16),0 14px 30px -16px rgba(0,0,0,.9)}
/* search: a recessed ivory field */
.th-search{position:relative;margin-bottom:10px}
.th-search svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:17px;height:17px;color:#8a6a32;pointer-events:none}
.th-search input{width:100%;height:46px;padding:0 40px 0 40px;border-radius:10px;background:linear-gradient(180deg,#e9dfcc,#f4ecdf);border:1px solid rgba(150,110,45,.6);color:#2a1a14;
  font:500 15px 'Plus Jakarta Sans',var(--font-body),sans-serif;box-shadow:inset 0 2px 6px rgba(60,35,20,.35)}
.th-search input::placeholder{color:#8f7a68}
.th-search input:focus-visible{outline:2px solid #f7e9c6;outline-offset:1px;border-color:var(--th-crimson)}
.th-search input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.th-search .clear{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:8px;background:none;color:#6a5648;cursor:pointer;display:none}
.th-search .clear:hover{color:var(--th-crimson)}
.th-search.has-q .clear{display:block}
/* legend: quiet, on the housing */
.th-legend{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;padding:6px 2px 10px;margin-bottom:6px;font-size:13px;color:var(--th-muted)}
.th-legend span{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.th-legend img{width:20px;height:20px;flex:none}
.th-legend b{font-size:20px;line-height:20px;width:20px;text-align:center;flex:none;font-weight:800}
@media(max-width:380px){.th-legend{gap:6px 10px;font-size:12.5px}}
/* category index strips */
.th-groups{display:flex;flex-direction:column;gap:0;border-radius:10px;overflow:hidden;border:1px solid rgba(150,110,45,.5);
  box-shadow:inset 0 2px 8px rgba(60,35,20,.35)}
.th-group{border:0;border-top:1px solid rgba(150,110,45,.42);border-radius:0;background:linear-gradient(180deg,#f3ebdc,#ece2d0);overflow:hidden}
.th-group:first-child{border-top:0}
.th .th-group__btn{position:relative;width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 16px 13px 18px;border:0;background:none;color:#2a1a14;cursor:pointer;text-align:left;
  font-family:var(--font-head),Georgia,serif;font-weight:500;font-size:17px;letter-spacing:.005em;transition:background .15s ease}
.th-group__btn::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--th-crimson);transform:scaleY(0);transform-origin:50% 50%;transition:transform .2s ease}   /* crimson notch */
.th-group__btn:hover{background:rgba(255,255,255,.35)}
.th-group__btn:hover::before,.th-group__btn[aria-expanded="true"]::before{transform:scaleY(1)}
.th-group__btn[aria-expanded="true"]{background:rgba(255,255,255,.4);border-bottom:1px solid rgba(142,23,41,.35)}
.th-group__btn .n{font-family:'Plus Jakarta Sans',var(--font-body),sans-serif;color:#8a6a32;font-weight:600;font-size:12px;white-space:nowrap;letter-spacing:.02em}
.th-group__btn .n::after{content:"";display:inline-block;width:6px;height:6px;margin-left:10px;border-right:1.5px solid #8a6a32;border-bottom:1.5px solid #8a6a32;transform:rotate(45deg);transition:transform .2s ease;vertical-align:2px}
.th-group__btn[aria-expanded="true"] .n::after{transform:rotate(-135deg);vertical-align:-2px}
.th-group__btn:focus-visible{outline:2px solid var(--th-crimson);outline-offset:-3px}
/* open drawer: game slips on a slightly darker paper */
.th-group__body{display:flex;flex-direction:column;gap:6px;padding:8px 10px 10px;background:#e4d9c6;box-shadow:inset 0 3px 6px rgba(60,35,20,.18)}
.th-group__body[hidden]{display:none}
.th-flat[hidden],.th-groups[hidden]{display:none}
.th-flat{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:10px;background:#e4d9c6;border:1px solid rgba(150,110,45,.5);box-shadow:inset 0 2px 8px rgba(60,35,20,.35)}
.th-empty{padding:22px 14px;text-align:center;color:#6a5648;font-size:14px;border:1px dashed rgba(150,110,45,.5);border-radius:10px}
/* game slips (list rows) */
#panel-list .th-card{background:linear-gradient(180deg,#f8f2e6,#f1e8d8);border:1px solid rgba(150,110,45,.45);color:#2a1a14;border-radius:6px;padding:10px 12px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}
#panel-list .th-card:hover{border-color:rgba(142,23,41,.6);background:linear-gradient(180deg,#fbf6ec,#f4ecdd)}
#panel-list .th-card:focus-visible{outline:2px solid var(--th-crimson);outline-offset:2px}
#panel-list .th-card__name{font-family:var(--font-head),Georgia,serif;font-weight:500;font-size:16px;color:#2a1a14}
#panel-list .th-card__meta{font-size:11.5px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:#8a6a32}
#panel-list .th-card--index{padding:10px 14px;min-height:44px;display:flex;align-items:center}   /* index row: game name + status icons only */
#panel-list .th-card--index .th-card__top{width:100%;gap:10px}
#panel-list .th-card--index .th-card__name{font-size:17px;font-weight:500;line-height:1.2;white-space:normal;overflow:visible;text-overflow:clip}
#panel-list .th-card--index .th-marks{flex:none;gap:8px;margin-left:auto;padding-left:6px}   /* list-row status icons: 21px wide screens, 23px phones */
#panel-list .th-card--index .th-mark,#panel-list .th-card--index .th-mark img{width:21px;height:21px}
#panel-list .th-card--index .th-mark.c{font-size:19px}
@media(max-width:640px){
  /* mobile list type scale: category 20 / game 18 */
  .th .th-group__btn{font-size:20px;font-weight:500;line-height:1.2;padding:17px 16px 17px 18px}
  .th-group__btn .n{font-size:14px}
  .th-group__btn .n::after{width:11px;height:11px;margin-left:12px;border-right-width:2px;border-bottom-width:2px}   /* ≈18px chevron box */
  #panel-list .th-card--index{padding:13px 14px}
  #panel-list .th-card--index .th-card__name{font-size:18px}
  #panel-list .th-card--index .th-marks{gap:9px}
  #panel-list .th-card--index .th-mark,#panel-list .th-card--index .th-mark img{width:23px;height:23px}
  #panel-list .th-card--index .th-mark.c{font-size:21px}
}
#panel-list .th-mark.c{color:#2f8a52}

/* ---------- game detail: a miniature rulebook (bottom sheet on phones, spread on desktop) ---------- */
.th-modal{position:fixed;inset:0;z-index:80;display:none}
.th-modal.is-open{display:block}
.th-modal__bg{position:absolute;inset:0;background:rgba(6,3,4,.72);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}
.th-modal__box{position:absolute;left:0;right:0;bottom:0;max-height:90vh;max-height:90dvh;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;
  background:#14100f;border:1px solid rgba(201,162,71,.22);border-bottom:0;border-radius:20px 20px 0 0;
  padding:14px 20px calc(24px + env(safe-area-inset-bottom));color:var(--th-text);font-size:15px;line-height:1.55;animation:thUp .28s cubic-bezier(.2,.7,.2,1)}
.th-modal__box::before{content:"";display:block;width:36px;height:4px;margin:0 auto 12px;border-radius:2px;background:rgba(243,235,225,.18)}   /* sheet handle */
@keyframes thUp{from{transform:translateY(28px);opacity:0}to{transform:none;opacity:1}}
.th-modal__close{position:sticky;top:0;float:right;z-index:3;width:44px;height:44px;margin:-6px -8px 0 0;padding:0;border:0;border-radius:50%;
  background:none;color:rgba(243,235,225,.62);cursor:pointer;display:grid;place-items:center;transition:color .15s ease}   /* 44px hit area */
.th-modal__close::before{content:"";position:absolute;inset:7px;border-radius:50%;border:1px solid rgba(243,235,225,.09);background:rgba(20,16,15,.55);
  transition:border-color .15s ease,background .15s ease}   /* the visible 30px circle: quiet by default */
.th-modal__close svg{position:relative;width:14px;height:14px;stroke-width:2.2}
.th-modal__close:hover,.th-modal__close:focus-visible{color:#f7f0e6}
.th-modal__close:hover::before,.th-modal__close:focus-visible::before{border-color:rgba(243,235,225,.26);background:rgba(36,27,29,.9)}
.th-modal__close:focus-visible{outline:none}
.th-modal__close:focus-visible::before{box-shadow:0 0 0 2px rgba(247,233,198,.55)}
.th-d{clear:none}
/* header */
.th-d__head{padding-right:44px}
.th-d__cat{display:block;font-size:11px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:rgba(201,162,71,.9);margin-bottom:6px}
.th-d__name{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;margin:0;font-family:var(--font-head),Georgia,serif;font-weight:500;font-size:28px;line-height:1.1;letter-spacing:-.01em;color:#f7f0e6}
.th-d__name .th-marks{gap:8px}.th-d__name .th-mark,.th-d__name .th-mark img{width:20px;height:20px}
.th-stats{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.25fr) minmax(0,.95fr);margin:16px 0 0;border-top:1px solid rgba(201,162,71,.28);border-bottom:1px solid rgba(201,162,71,.28)}
.th-stat{padding:10px 10px 10px 12px;border-left:1px solid rgba(201,162,71,.2)}
.th-stat:first-child{padding-left:0;border-left:0}
.th-stat__k{display:block;line-height:0;color:rgba(201,162,71,.8)}
.th-stat__ic{display:inline-block;width:16px;height:16px}
.th-stat__ic svg{width:100%;height:100%;display:block}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.th-stat__v{display:block;margin-top:5px;font-family:var(--font-head),Georgia,serif;font-size:19px;line-height:1.15;color:#f7f0e6;white-space:nowrap}
/* overview + small facts */
.th-d__lead{margin:18px 0 0;font-family:var(--font-head),Georgia,serif;font-size:17.5px;line-height:1.45;color:#efe6db}
.th-kv{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin:20px 0 0;padding:12px 16px 12px 14px;font-size:14.5px;line-height:1.5;
  background:rgba(243,235,225,.045);border-left:2px solid rgba(201,162,71,.55);border-radius:0 8px 8px 0}   /* Best for: a quiet summary strip */
.th-kv__k{flex:none;font-size:10.5px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:rgba(201,162,71,.95)}
.th-kv__v{flex:1 1 200px;min-width:0;color:#e6dcd8}
/* how to win / host note: bodies inside the accordion */
.th-win{margin:0;font-family:var(--font-head),Georgia,serif;font-size:17px;line-height:1.45;color:#f7f0e6;padding-left:14px;border-left:2px solid var(--th-crimson)}
.th-note{margin:0;padding:12px 16px 12px 16px;border-radius:0 12px 12px 0;border-left:2px solid rgba(201,162,71,.75);background:rgba(243,235,225,.05)}
.th-note__k{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:.15em;text-transform:uppercase;color:rgba(201,162,71,.95);margin-bottom:6px}
.th-note__k img{width:18px;height:18px;border-radius:50%}
.th-note p{margin:0;font-family:var(--font-head),Georgia,serif;font-style:italic;font-size:16px;line-height:1.45;color:#eadfd3}
.th-yt{display:inline-flex;align-items:center;gap:9px;margin:22px 0 0;padding:11px 18px;border-radius:12px;background:#3a1f22;color:#f3e6d6;font-weight:600;font-size:14px;text-decoration:none;
  border:1px solid rgba(201,162,71,.28);box-shadow:inset 0 1px 0 rgba(255,255,255,.05);transition:background .18s ease,border-color .18s ease,transform .18s ease}
.th-yt:hover{background:#46252a;border-color:rgba(201,162,71,.45);transform:translateY(-1px)}
.th-yt svg{color:var(--th-crimson,#88142e);filter:brightness(1.35)}
.th-yt svg{width:16px;height:16px}
.th-yt:active{transform:translateY(0)}
.th-yt:focus-visible{outline:2px solid #f7e9c6;outline-offset:3px}
/* accordion: Setup / How to play / How to win / Host note */
.th-acc{border-top:1px solid rgba(201,162,71,.16)}
.th-acc:first-child{border-top:0}
.th-acc__h{margin:0}
.th-acc__btn{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:14px 0;border:0;background:none;color:rgba(201,162,71,.92);font:700 11.5px/1 'Plus Jakarta Sans',var(--font-body),sans-serif;letter-spacing:.18em;text-transform:uppercase;text-align:left;cursor:pointer}
.th-acc__btn:hover{color:#e2c46f}
.th-acc__btn:focus-visible{outline:2px solid #f7e9c6;outline-offset:-2px;border-radius:6px}
.th-acc__btn[aria-expanded="true"]{color:#f0d68a}
.th-acc__chev{flex:none;width:16px;height:16px;color:rgba(201,162,71,.7);transition:transform .22s ease}
.th-acc__btn[aria-expanded="true"] .th-acc__chev{transform:rotate(180deg)}
.th-acc__body{padding:0 0 18px}
.th-acc__body[hidden]{display:none}
.th-ch__p{margin:0;color:#e6dcd8;font-size:15px;line-height:1.55}
.th-soon{color:var(--th-muted);font-style:italic}
/* oversized editorial step numbers */
.th-steps{list-style:none;margin:0;padding:0}
.th-steps li{display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:8px;align-items:start;padding:7px 0}
.th-steps li:first-child{border-top:0;padding-top:0}
.th-steps__n{font-family:var(--font-head),Georgia,serif;font-size:30px;line-height:1;font-weight:400;color:rgba(201,162,71,.85);font-variant-numeric:lining-nums;margin-top:1px}
.th-steps--play .th-steps__n{color:#c9a247}
.th-steps__t{font-size:15px;line-height:1.5;color:#eadfd3;padding-top:2px}
.th-steps--setup .th-steps__n{font-size:24px;color:rgba(201,162,71,.6);margin-top:3px}
/* desktop / tablet: a two-column spread — facts on the left, the rules on the right */
@media(min-width:641px){
  .th-modal__box{left:50%;right:auto;top:50%;bottom:auto;width:min(960px,calc(100% - 48px));max-height:88vh;max-height:88dvh;transform:translate(-50%,-50%);
    border-bottom:1px solid rgba(201,162,71,.22);border-radius:18px;padding:28px 34px 32px;animation:thIn .28s cubic-bezier(.2,.7,.2,1)}
  .th-modal__box::before{display:none}
  @keyframes thIn{from{transform:translate(-50%,-48%);opacity:0}to{transform:translate(-50%,-50%);opacity:1}}
  .th-modal__close{position:absolute;top:12px;right:12px;float:none;margin:0}
  .th-d{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);column-gap:36px;align-items:start}
  .th-d__side{position:sticky;top:0}
  .th-d__main{padding-left:36px;border-left:1px solid rgba(201,162,71,.18);min-height:100%}
  .th-d__main .th-acc:first-child .th-acc__btn{padding-top:4px}
  .th-d__name{font-size:30px}
  .th-stats{margin-top:18px}
  .th-stat{padding:12px 14px 12px 18px}
  .th-stat__ic{width:18px;height:18px}
  .th-stat:first-child{padding-left:0}
  .th-stat:last-child{padding-right:0}
  .th-steps__t,.th-ch__p{font-size:16px}
  .th-yt{width:100%;justify-content:center}
}
/* tablet & narrow desktop: one column rather than two cramped ones */
@media(min-width:641px) and (max-width:899px){
  .th-modal__box{width:min(680px,calc(100% - 40px))}
  .th-d{grid-template-columns:minmax(0,1fr);column-gap:0}
  .th-d__side{position:static}
  .th-d__main{padding-left:0;border-left:0;margin-top:8px}
}
@media(prefers-reduced-motion:reduce){.th-modal__box{animation:none}.th-yt{transition:none}}
/* footer line */
.th-foot{margin:4px auto 48px;max-width:560px;text-align:center;font-family:'Plus Jakarta Sans',var(--font-body),sans-serif;font-size:14px;color:#a89a9e}
.th-foot a{color:#f3ede9;border-bottom:1px solid rgba(255,255,255,.3)}
.th-foot a:hover{color:var(--coral,#E08A77);border-color:currentColor}
body.th-lock{overflow:hidden}

/* ============ PICKER LAYOUT ============
   Tablet/desktop (≥760px): one contained console, ~940px — tabs across the top, then controls (42%) | reel + result (58%).
   Phones (≤640px): one compact column sized to fit a single screen (see the phone block below). */
.th-pick__out:empty{display:none}
@media(min-width:760px){
  .th{max-width:940px;padding:14px 22px 24px;border-radius:20px;background:#140e11;border:1px solid var(--th-line);
    box-shadow:0 20px 50px -30px rgba(0,0,0,.8)}
  .th-tabs{margin-bottom:22px}
  #panel-list{max-width:620px;margin-inline:auto}
  .th-pick{display:grid;grid-template-columns:minmax(0,42fr) minmax(0,58fr);gap:26px;align-items:start}
  .th-pick__ctl{display:flex;flex-direction:column}
  .th-intro{margin:0 0 12px}
  .th-controls{margin-bottom:16px}
  .th-pick__out{display:block}
  .th-pick__out .th-reel,.th-pick__out .th-state,.th-pick__out .th-result{margin-top:0}
  .th-pick__out .th-reel + #thOut .th-result{margin-top:12px}
  #thOut{min-height:124px}
  .th-foot{margin-top:22px}
}
@media(min-width:641px){body.games-page{--hero-heading-gap:10px;--hero-bottom:24px}
  body.games-page .page-head h1{font-size:clamp(2.2rem,4.2vw,2.8rem)}}   /* tighter hero so the picker + result sit in one screen */
@media(max-width:640px){
  .th-d__main{margin-top:20px;border-top:1px solid rgba(201,162,71,.22);padding-top:4px}
  /* hero: tighter spacing on this page only */
  body.games-page{--hero-eyebrow-gap:6px;--hero-heading-gap:0px;--hero-intro-gap:0px;--hero-bottom:12px}
  body.games-page .page-head h1{font-size:2rem}
  /* the tool explains itself on phones: the page intro and the picker intro line give way so the whole picker fits one screen */
  body.games-page .page-head p.lede{display:none}
  .th-intro{display:none}
  .th{padding-bottom:28px}
  .th-tabs{margin-bottom:10px}
  .th-tab{height:38px}
  .th-controls{gap:8px;margin-bottom:12px}
  .th-field{gap:4px}
  .th-field label{font-size:10.5px}
  .th-seg{gap:4px}
  .th-seg button{font-size:13px}
  .th-btn3d{padding:12px}
  .th-reel{--row:32px;--bez:6px;margin-top:12px;border-radius:13px}
  .th-reel__drum{border-radius:7px}
  .th-reel__row{font-size:16px;padding:0 16px}
  .th-reel__win::before,.th-reel__win::after{border-width:5px}.th-reel__win::before{border-left-width:7px}.th-reel__win::after{border-right-width:7px}
  #thOut{min-height:86px}
  .th-hint{margin-top:8px;font-size:13px}
  .th-result{margin-top:8px;gap:6px}
  .th-result .th-card{padding:10px 12px}
  .th-card--win .th-card__desc{-webkit-line-clamp:1;margin-top:3px;font-size:12.5px}   /* one line of description on phones; tap for more */
  .th-card--mini{padding:7px 10px}.th-card--mini .th-card__meta{font-size:11.5px}
  .th-sub{margin-top:2px}
}
