/* =========================================================================
   JankenDeck — specialty playing cards by Jeff Daymont
   Mobile-first redesign. Warm parchment + playful suit colors.
   Display: Fraunces (characterful old-world serif). UI/body: Jost (geometric).
   ========================================================================= */

:root {
  /* Color — warm parchment base, drawn from the original site */
  --cream:      #FEF6ED;  /* page background                         */
  --cream-deep: #FBE9D4;  /* alt sections, tints                     */
  --paper:      #FFFFFF;  /* cards / surfaces                        */
  --ink:        #241B12;  /* headlines + body (warm near-black)      */
  --ink-soft:   #6A5C4D;  /* secondary text, captions                */
  --line:       #E7D6C2;  /* borders, dividers                       */

  /* Accents — the suit colors */
  --orange:     #F37121;  /* primary accent: CTAs, links             */
  --orange-ink: #C9530F;  /* orange text on cream (AA)               */
  --red:        #E03B3B;  /* rock / warm highlight                   */
  --rock:       #F37121;
  --paper-suit: #2E6BB8;
  --scissors:   #7C3FAE;
  --water:      #1E9EB0;
  --lizard:     #3E9B4F;

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-display: clamp(2.15rem, 8.7vw, 6rem);
  --t-h2:      clamp(2rem, 6.6vw, 3.4rem);
  --t-h3:      clamp(1.4rem, 4.6vw, 1.9rem);
  --t-lead:    clamp(1.12rem, 3.6vw, 1.4rem);
  --t-body:    clamp(1.02rem, 2.4vw, 1.1rem);
  --t-cap:     0.8rem;

  /* Layout */
  --pad:    clamp(1.15rem, 5vw, 3rem);
  --max:    1180px;
  --sect-y: clamp(3.6rem, 9vw, 7rem);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(36,27,18,.04), 0 12px 30px -16px rgba(36,27,18,.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--orange-ink); text-decoration: none; }
h1, h2, h3, p { margin: 0; text-wrap: pretty; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
  overflow-wrap: break-word;
}
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------- structure */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--sect-y); }
.eyebrow {
  font-family: var(--sans);
  font-size: var(--t-cap);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange-ink);
  margin: 0 0 0.9rem;
}
.lead { font-size: var(--t-lead); font-weight: 400; line-height: 1.45; color: var(--ink-soft); }
.section-head { max-width: 40ch; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-head.center { margin-inline: auto; text-align: center; max-width: 44ch; }
.section-head h2 { font-size: var(--t-h2); margin-bottom: 0.7rem; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  background: var(--orange);
  color: #fff;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.85em 1.4em;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
  box-shadow: 0 10px 22px -10px rgba(243,113,33,.7);
}
.btn:hover { transform: translateY(-2px); background: #ff8438; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--sm { font-size: 0.92rem; padding: 0.6em 1.1em; }
.tlink {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-weight: 600; color: var(--ink);
}
.tlink .arrow { transition: transform .25s var(--ease); }
.tlink:hover .arrow { transform: translateX(4px); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(254,246,237,.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -18px rgba(36,27,18,.5); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 0.6rem; margin-right: auto; }
.brand img { width: 34px; height: 34px; }
.brand b {
  font-family: var(--display); font-weight: 600; font-size: 1.42rem;
  letter-spacing: -0.01em; color: var(--ink);
}
.nav { display: none; align-items: center; gap: 1.7rem; }
.nav a { color: var(--ink); font-weight: 500; font-size: 1rem; }
.nav a:hover { color: var(--orange-ink); }
.header-cta { display: none; }
.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 10px; cursor: pointer; margin-right: -10px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s var(--ease); }

/* mobile drawer */
.mobile-nav {
  position: fixed; inset: 68px 0 auto 0; z-index: 49;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem var(--pad) 1.4rem;
  transform: translateY(-120%);
  transition: transform .38s var(--ease);
  box-shadow: var(--shadow);
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav a { display: block; padding: 0.85rem 0; font-size: 1.18rem; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line); }
.mobile-nav .btn { width: 100%; justify-content: center; margin-top: 1.1rem; }

@media (min-width: 860px) {
  .nav, .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none; }
}

/* ------------------------------------------------------------------ hero */
.hero { padding-block: clamp(2.4rem, 6vw, 4.5rem) clamp(2.6rem, 6vw, 4rem); }
.hero .wrap { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.hero h1 { font-size: var(--t-display); margin: 0.5rem 0 0; }
.hero h1 .ital { font-style: italic; color: var(--orange-ink); }
.hero__lead { margin-top: 1.3rem; max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.9rem; }
.hero__note { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; font-size: var(--t-cap); color: var(--ink-soft); font-weight: 500; }
.hero__note .tick { color: var(--lizard); font-weight: 700; }
.hero__art {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--cream-deep); box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero__art img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.hero__badge {
  position: absolute; left: 16px; bottom: 16px;
  background: var(--paper); color: var(--ink);
  border-radius: 12px; padding: 0.55rem 0.85rem; font-size: 0.82rem; font-weight: 600;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 0.5rem;
}
.hero__badge img { width: 26px; height: 26px; }

@media (min-width: 860px) {
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; }
}

/* ----------------------------------------------------------- trust strip */
.trust { background: var(--ink); color: var(--cream); }
.trust .wrap { display: flex; flex-wrap: wrap; gap: 0.7rem 2rem; justify-content: center; padding-block: 1.1rem; text-align: center; }
.trust span { font-size: 0.86rem; font-weight: 500; letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 0.5rem; color: #f3e7d8; }
.trust .dot { color: var(--orange); }

/* ------------------------------------------------------------ deck grid */
.decks-grid { display: grid; gap: clamp(1.1rem, 3vw, 1.7rem); grid-template-columns: 1fr; }
@media (min-width: 560px) { .decks-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .decks-grid { grid-template-columns: repeat(3, 1fr); } }

.deck {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.deck:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(36,27,18,.06), 0 26px 44px -22px rgba(36,27,18,.42); }
.deck__media { position: relative; background: var(--cream-deep); }
.deck__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.deck__tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--ink); color: var(--cream);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 0.6rem; border-radius: 999px;
}
.deck__tag.is-new { background: var(--red); }
.deck__body { padding: 1.2rem 1.25rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.deck__row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.deck__body h3 { font-size: 1.42rem; }
.deck__price { font-family: var(--sans); font-weight: 600; font-size: 1.18rem; color: var(--orange-ink); white-space: nowrap; }
.deck__hook { font-style: italic; color: var(--ink); font-weight: 500; margin-top: 0.3rem; font-family: var(--display); font-size: 1.02rem; }
.deck__desc { color: var(--ink-soft); font-size: 0.96rem; margin-top: 0.6rem; }
.deck__meta { margin-top: 0.85rem; font-size: 0.8rem; color: var(--ink-soft); font-weight: 500; letter-spacing: 0.02em; }
.deck__cta { margin-top: auto; padding-top: 1.1rem; }
.deck__cta .btn { width: 100%; justify-content: center; }

/* ------------------------------------------------------------ art / story */
.art { background: var(--ink); color: var(--cream); }
.art h2, .art h3 { color: var(--cream); }
.art .eyebrow { color: var(--tan, #E4B88C); color: #F3A968; }
.art .lead { color: #e7d8c6; }
.art-grid { display: grid; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.art-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.art-cards img { border-radius: 12px; box-shadow: 0 18px 36px -20px rgba(0,0,0,.7); background: #fff; }
.art-cards img:nth-child(2) { transform: translateY(-14px); }
.art-names { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.art-names li {
  font-size: 0.82rem; font-weight: 500; color: #f3e7d8;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13);
  padding: 0.32rem 0.7rem; border-radius: 999px;
}
@media (min-width: 860px) { .art-grid { grid-template-columns: 0.95fr 1.05fr; } }

/* ----------------------------------------------------------- how it works */
.mech-grid { display: grid; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.mech-art {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.2rem, 4vw, 2.2rem); box-shadow: var(--shadow);
}
.mech-art img { margin-inline: auto; max-width: 420px; }
.suit-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.3rem; }
.suit-chips li { font-weight: 600; font-size: 0.9rem; padding: 0.35rem 0.85rem; border-radius: 999px; color: #fff; }
.suit-chips .rock { background: var(--rock); }
.suit-chips .paper { background: var(--paper-suit); }
.suit-chips .scissors { background: var(--scissors); }
.suit-chips .water { background: var(--water); }
.suit-chips .lizard { background: var(--lizard); }
@media (min-width: 860px) { .mech-grid { grid-template-columns: 1fr 1fr; } }

/* --------------------------------------------------------------- combos */
.combos { background: var(--cream-deep); }
.combo-grid { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .combo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .combo-grid { grid-template-columns: repeat(3, 1fr); } }
.combo {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 1rem 1.2rem;
}
.combo b { font-family: var(--sans); font-weight: 500; }
.combo .price { font-weight: 600; color: var(--orange-ink); font-size: 1.1rem; }
.combo--best { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }

/* ---------------------------------------------------------------- apps */
.apps-grid { display: grid; gap: clamp(1.4rem,4vw,2.6rem); align-items: center; }
@media (min-width: 860px) { .apps-grid { grid-template-columns: 1fr 1fr; } }
.apps .badges { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }

/* --------------------------------------------------------------- about */
.about { background: var(--ink); color: var(--cream); }
.about h2 { color: var(--cream); }
.about .lead, .about p { color: #e7d8c6; }
.about-wrap { display: grid; gap: clamp(1.4rem, 4vw, 2.6rem); align-items: center; }
.about blockquote { margin: 0; }
.about .sig { margin-top: 1.4rem; font-family: var(--display); font-style: italic; font-size: 1.3rem; color: var(--cream); }
.about .mark { width: 90px; height: 90px; margin-bottom: 1rem; }
@media (min-width: 860px) { .about-wrap { grid-template-columns: 1fr; max-width: 760px; } }

/* ------------------------------------------------------------- final cta */
.cta { text-align: center; }
.cta h2 { font-size: var(--t-h2); max-width: 18ch; margin-inline: auto; }
.cta .lead { margin: 1rem auto 2rem; max-width: 44ch; }
.cta .btn { font-size: 1.1rem; padding: 1em 1.8em; }

/* --------------------------------------------------------------- footer */
.site-footer { background: #1b140d; color: #cbbba6; padding-block: clamp(2.6rem, 6vw, 4rem); font-size: 0.9rem; }
.site-footer .wrap { display: grid; gap: 1.6rem; }
.site-footer .brand b { color: var(--cream); }
.site-footer a { color: #e7d8c6; }
.site-footer a:hover { color: var(--orange); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.9rem 1.6rem; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.4rem; color: #9d8e7b; font-size: 0.82rem; line-height: 1.6; }
.foot-legal a { color: #9d8e7b; text-decoration: underline; }
@media (min-width: 760px) {
  .site-footer .wrap { grid-template-columns: 1.3fr 1fr; }
  .foot-legal { grid-column: 1 / -1; }
}

/* --------------------------------------------------- sticky mobile shop bar */
.shopbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 48;
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  background: rgba(254,246,237,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 0.6rem var(--pad);
  transform: translateY(120%); transition: transform .35s var(--ease);
}
.shopbar.show { transform: translateY(0); }
.shopbar span { font-weight: 500; font-size: 0.92rem; }
.shopbar .btn { padding: 0.6em 1.1em; }
@media (min-width: 860px) { .shopbar { display: none; } }

/* ----------------------------------------------------------- reveal anim */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================================
   LEARN-TO-PLAY additions — games library, rules, deck colors
   ========================================================================= */

/* per-deck accent colors (used on badges + rule cards) */
:root {
  --deck-janken:           #F37121;
  --deck-kings-keys:       #C2912B;
  --deck-dark-hand:        #6C4BB0;
  --deck-french-detective: #B23A48;
  --deck-puzzle:           #1E9EB0;
  --deck-gospel:           #3E9B4F;
}

/* ------------------------------------------------------ generic page hero */
.page-hero { padding-block: clamp(2.2rem, 6vw, 3.6rem) clamp(1.4rem, 4vw, 2.4rem); }
.page-hero h1 { font-size: clamp(2.1rem, 7vw, 3.8rem); margin: 0.4rem 0 0; }
.page-hero .lead { margin-top: 1.1rem; max-width: 52ch; }
.page-hero .eyebrow { margin-bottom: 0.6rem; }

/* breadcrumb / back link */
.backlink { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; color: var(--ink-soft); font-size: 0.92rem; }
.backlink:hover { color: var(--orange-ink); }

/* --------------------------------------------------------- "start" picker */
.start-grid { display: grid; gap: clamp(1rem, 3vw, 1.6rem); grid-template-columns: 1fr; }
@media (min-width: 620px) { .start-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .start-grid { grid-template-columns: repeat(3, 1fr); } }

.startcard {
  display: flex; gap: 1rem; align-items: center;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  border-left: 5px solid var(--accent, var(--orange));
}
.startcard:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(36,27,18,.06), 0 22px 40px -22px rgba(36,27,18,.4); }
.startcard__img { width: 84px; height: 84px; flex: none; border-radius: 12px; overflow: hidden; background: var(--cream-deep); }
.startcard__img img { width: 100%; height: 100%; object-fit: cover; }
.startcard__body { min-width: 0; }
.startcard__body h3 { font-size: 1.24rem; }
.startcard__hook { font-family: var(--display); font-style: italic; color: var(--ink); font-size: 0.98rem; margin-top: 0.15rem; }
.startcard__count { margin-top: 0.5rem; font-size: 0.82rem; font-weight: 600; color: var(--accent, var(--orange-ink)); letter-spacing: 0.02em; }
.startcard__count .arrow { transition: transform .25s var(--ease); display: inline-block; }
.startcard:hover .startcard__count .arrow { transform: translateX(4px); }

/* ------------------------------------------------------------- quick steps */
.steps3 { display: grid; gap: clamp(1rem, 3vw, 1.6rem); grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 760px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.3rem; box-shadow: var(--shadow); position: relative;
}
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 999px;
  background: var(--orange); color: #fff; font-family: var(--display); font-weight: 600; font-size: 1.1rem;
  margin-bottom: 0.9rem;
}
.step h3 { font-size: 1.16rem; margin-bottom: 0.4rem; }
.step p { color: var(--ink-soft); font-size: 0.96rem; }

/* =============================================================== LIBRARY */
.lib-toolbar {
  position: sticky; top: 67px; z-index: 30;
  background: rgba(254,246,237,.94); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-block: 0.9rem;
}
.lib-search {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 0.6rem 1.1rem; box-shadow: var(--shadow);
}
.lib-search:focus-within { border-color: var(--orange); }
.lib-search svg { flex: none; color: var(--ink-soft); }
.lib-search input {
  border: 0; background: transparent; width: 100%; font-family: var(--sans);
  font-size: 1.02rem; color: var(--ink); outline: none;
}
.lib-search input::placeholder { color: var(--ink-soft); }
.lib-clear { border: 0; background: none; color: var(--ink-soft); cursor: pointer; font-size: 1.3rem; line-height: 1; padding: 0 0.2rem; display: none; }
.lib-clear.show { display: block; }

.filter-row { display: flex; gap: 0.5rem; overflow-x: auto; padding-top: 0.75rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filter-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; cursor: pointer; user-select: none;
  background: var(--paper); border: 1.5px solid var(--line); color: var(--ink-soft);
  font-family: var(--sans); font-size: 0.86rem; font-weight: 600;
  padding: 0.4rem 0.85rem; border-radius: 999px; white-space: nowrap;
  transition: background .18s, color .18s, border-color .18s;
}
.chip:hover { border-color: var(--ink-soft); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.chip[data-deck].active { background: var(--accent); border-color: var(--accent); color: #fff; }

.lib-meta { padding-top: 0.9rem; font-size: 0.86rem; color: var(--ink-soft); font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

/* games grid */
.games-grid { display: grid; gap: clamp(0.9rem, 2.5vw, 1.3rem); grid-template-columns: 1fr; margin-top: 1.6rem; }
@media (min-width: 640px) { .games-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .games-grid { grid-template-columns: repeat(3, 1fr); } }

.game {
  background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--accent, var(--orange));
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
}
.game__head {
  width: 100%; text-align: left; cursor: pointer; background: none; border: 0;
  font-family: inherit; color: inherit; padding: 1.05rem 1.15rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.game__head:hover { background: var(--cream); }
.game__toprow { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.game__name { font-family: var(--display); font-weight: 600; font-size: 1.18rem; line-height: 1.1; }
.game__chev { flex: none; color: var(--ink-soft); transition: transform .3s var(--ease); margin-top: 3px; }
.game.open .game__chev { transform: rotate(180deg); }
.game__badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.badge {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.22rem 0.55rem; border-radius: 999px;
  background: var(--cream-deep); color: var(--ink-soft); white-space: nowrap;
}
.badge--deck { background: color-mix(in srgb, var(--accent) 16%, white); color: var(--accent-ink, var(--accent)); }
.badge--players { background: var(--cream-deep); }
.badge--diff-Easy { background: #e6f3e9; color: #2f7d43; }
.badge--diff-Medium { background: #fdeecf; color: #9a6b12; }
.badge--diff-Hard { background: #fbe1de; color: #b23a30; }
.game__summary { color: var(--ink-soft); font-size: 0.94rem; }

/* expandable body */
.game__body { display: none; padding: 0 1.15rem 1.25rem; border-top: 1px solid var(--line); }
.game.open .game__body { display: block; }
.game__body h4 {
  font-family: var(--sans); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--accent, var(--orange-ink)); margin: 1.2rem 0 0.5rem;
}
.game__body p { font-size: 0.95rem; color: var(--ink); }
.game__body ol { margin: 0; padding: 0; list-style: none; counter-reset: pstep; display: grid; gap: 0.6rem; }
.game__body ol li {
  counter-increment: pstep; position: relative; padding-left: 2rem; font-size: 0.95rem; color: var(--ink);
}
.game__body ol li::before {
  content: counter(pstep); position: absolute; left: 0; top: 0;
  width: 1.4rem; height: 1.4rem; border-radius: 999px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, white); color: var(--accent-ink, var(--accent));
  font-size: 0.74rem; font-weight: 700;
}
.game__note { margin-top: 1.2rem; padding: 0.85rem 1rem; background: var(--cream-deep); border-radius: 12px; font-size: 0.9rem; color: var(--ink); }
.game__note b { color: var(--ink); }
.game__official { margin-top: 1.1rem; font-size: 0.84rem; }
.game__official a { font-weight: 600; }

/* empty state */
.lib-empty { text-align: center; padding: 4rem 1rem; color: var(--ink-soft); }
.lib-empty h3 { font-size: 1.4rem; margin-bottom: 0.5rem; color: var(--ink); }

/* deck-page intro banner inside library */
.deck-banner {
  display: flex; gap: 1.1rem; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--accent);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1.4rem;
}
.deck-banner img { width: 76px; height: 76px; flex: none; border-radius: 12px; object-fit: cover; background: var(--cream-deep); }
.deck-banner h2 { font-size: 1.4rem; }
.deck-banner p { color: var(--ink-soft); font-size: 0.94rem; margin-top: 0.25rem; }
.deck-banner .tlink { margin-top: 0.5rem; font-size: 0.86rem; color: var(--accent-ink, var(--accent)); }

/* secondary shop note */
.shop-note { background: var(--cream-deep); }
.shop-note .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.3rem; }
.shop-note p { font-size: 0.96rem; color: var(--ink); }
.shop-note b { font-weight: 600; }

/* =========================================================================
   INTERACTIVE LEARN — cards, suit wheel, guided overlay, playable war
   ========================================================================= */

/* ----------------------------------------------------------------- cards */
.card {
  --w: 62px;
  position: relative; width: var(--w); height: calc(var(--w) * 1.4);
  border-radius: calc(var(--w) * 0.12); background: #fff;
  border: 1px solid var(--line); box-shadow: 0 4px 10px -4px rgba(36,27,18,.4);
  color: var(--suit, var(--ink)); flex: none; overflow: hidden;
  font-family: var(--display);
}
.card--sm { --w: 46px; }
.card--lg { --w: 92px; }
.card__center { position: absolute; inset: 0; display: grid; place-items: center; }
.card__corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: .85; }
.card__corner--tl { top: 5%; left: 7%; }
.card__corner--br { bottom: 5%; right: 7%; transform: rotate(180deg); }
.card__rank { font-weight: 600; font-size: calc(var(--w) * 0.26); color: var(--suit); }
.card .glyph { width: calc(var(--w) * 0.22); height: calc(var(--w) * 0.22); color: var(--suit); display: block; }
.card .glyph--lg { width: calc(var(--w) * 0.5); height: calc(var(--w) * 0.5); opacity: .92; }
.card .glyph--sm { width: calc(var(--w) * 0.2); height: calc(var(--w) * 0.2); }
.card__joker { display: grid; place-items: center; gap: 2px; }
.card__joker b { font-family: var(--sans); font-size: calc(var(--w) * 0.13); letter-spacing: .1em; color: var(--suit); }
.card.is-down { background: linear-gradient(135deg, #b5432a, #7d2d1c); border-color: #5e2114; }
.card__back { position: absolute; inset: 8%; border: 2px solid rgba(255,255,255,.5); border-radius: calc(var(--w) * 0.08); display: grid; place-items: center; }
.card__back .glyph--back { width: calc(var(--w) * 0.4); height: calc(var(--w) * 0.4); color: rgba(255,255,255,.85); }
.card.is-dim { opacity: .4; filter: saturate(.6); }
.card.is-glow { box-shadow: 0 0 0 3px var(--suit), 0 10px 22px -6px var(--suit); }
.card--flip { background: linear-gradient(135deg,#b5432a,#7d2d1c); animation: cardflip .5s var(--ease); }
@keyframes cardflip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }

/* fanned / row layouts share .deal entrance */
.deal { display: inline-block; animation: dealIn .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes dealIn { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .deal { animation: none; } }

/* ------------------------------------------------------------ suit wheel */
.wheel { width: min(78vw, 300px); height: auto; }
.wheel-edge { stroke: var(--line); stroke-width: 2.5; color: var(--ink-soft); transition: opacity .25s, stroke .25s; }
.wheel-edge.off { opacity: .07; }
.wheel-edge.on { stroke: var(--ink); color: var(--ink); stroke-width: 3.5; }
.wheel-node { cursor: pointer; transition: transform .25s var(--ease); transform-box: fill-box; transform-origin: center; }
.wheel-node circle { transition: opacity .25s, filter .25s; }
.wheel-node:focus-visible { outline: none; }
.wheel-node.sel { filter: drop-shadow(0 6px 12px rgba(36,27,18,.45)); }
.wheel-node.sel circle { stroke: var(--ink); stroke-width: 3; }
.wheel-node.lose circle { opacity: .32; }
.wheel-node .glyph--node { width: 24px; height: 24px; color: #fff; }
.wheel-caption { margin-top: 1rem; text-align: center; font-size: 1rem; color: var(--ink-soft); max-width: 30ch; }
.wheel-caption b { color: var(--ink); }


.wheel-label { font-family: var(--sans); font-size: 11px; font-weight: 600; fill: var(--ink-soft); pointer-events: none; }
.scene--wheel .wheel-label { fill: rgba(255,255,255,.82); }
.wheel-node.sel .wheel-label { fill: var(--ink); }
.scene--wheel .wheel-node.sel .wheel-label { fill: #fff; }
.wheel-node.lose .wheel-label { opacity: .4; }
.wheel-glyph { pointer-events: none; }

/* a standalone wheel block (home / how-it-works) */
.wheelbox { display: grid; place-items: center; gap: .4rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem,4vw,2.4rem); box-shadow: var(--shadow); }

/* ----------------------------------------------------- "teach me" button */
.teach-btn {
  display: inline-flex; align-items: center; gap: .5em; cursor: pointer;
  width: 100%; justify-content: center; margin-top: .2rem;
  background: var(--accent, var(--orange)); color: #fff; border: 0;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: .7em 1.1em; border-radius: 999px;
  box-shadow: 0 10px 22px -12px var(--accent, var(--orange));
  transition: transform .2s var(--ease), filter .2s;
}
.teach-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.teach-btn svg { width: 17px; height: 17px; }
.game__play { padding: 0 1.15rem 1.15rem; }

/* ===================================================== GUIDED OVERLAY */
.wt {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(26,17,9,.62); backdrop-filter: blur(5px);
  padding: clamp(0px, 3vw, 2rem);
}
.wt.open { display: grid; place-items: center; animation: wtFade .25s ease; }
@keyframes wtFade { from { opacity: 0; } to { opacity: 1; } }
.wt__panel {
  width: min(560px, 100%);
  height: min(96vh, 860px);
  height: min(96dvh, 860px);  /* dvh excludes mobile browser chrome */
  max-height: 100vh; max-height: 100dvh;
  background: var(--cream); border-radius: clamp(0px, 3vw, 22px);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
  display: flex; flex-direction: column; overflow: hidden;
}
.wt__bar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem .7rem; }
.wt__title { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.wt__deck { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: color-mix(in srgb, var(--accent) 16%, white); color: var(--accent); padding: .25rem .55rem; border-radius: 999px; white-space: nowrap; }
.wt__title b { font-family: var(--display); font-size: 1.2rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt__close { border: 0; background: none; font-size: 1.9rem; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 0 .2rem; }
.wt__close:hover { color: var(--ink); }
.wt__progress { display: flex; gap: 4px; padding: 0 1.2rem .4rem; }
.wt__dot { flex: 1; height: 4px; border-radius: 999px; background: var(--line); transition: background .3s; }
.wt__dot.on { background: var(--orange); }

.wt__stage {
  flex: 1 1 auto; min-height: 0; display: grid; place-items: center;
  padding: 1rem 1.2rem; overflow: auto; -webkit-overflow-scrolling: touch;
  background: radial-gradient(120% 90% at 50% 0%, #2f6d4d 0%, #265a40 60%, #1f4c36 100%);
  margin: 0 0 0; position: relative;
}
.wt__stage.swap .scene { animation: sceneIn .35s var(--ease); }
@keyframes sceneIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.scene { width: 100%; display: grid; place-items: center; gap: 1rem; }
.scene--wheel { color: #fff; }
.scene--wheel .wheel-caption { color: #e8f3ec; }
.scene--wheel .wheel-caption b { color: #fff; }
.scene--wheel .wheel-edge { stroke: rgba(255,255,255,.5); color: rgba(255,255,255,.85); }
.scene--wheel .wheel-edge.off { opacity: .18; }
.scene--wheel .wheel-edge.on { stroke: #fff; color: #fff; }
.scene--wheel .wheel-node.sel circle { stroke: #fff; }
.scene-row { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.scene-row__label { font-family: var(--sans); font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.scene-row__cards { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.scene-row--fan .scene-row__cards { gap: 0; }
.scene-row--fan .card { margin-left: -14px; transition: transform .2s; }
.scene-row--fan .card:first-child { margin-left: 0; }
.scene-row--stack .card { margin-left: -42px; }
.scene-row--grid .scene-row__cards { display: grid; grid-template-columns: repeat(3, auto); gap: .4rem; justify-content: center; }
.scene-row--grid .card { --w: 54px; }
.scene-row__cards .slot-empty { width: 54px; height: 76px; border-radius: 8px; border: 2px dashed rgba(255,255,255,.3); }
.scene-caption { color: #eaf4ee; font-size: 1rem; text-align: center; max-width: 34ch; }
.scene--deck img { max-height: 240px; border-radius: 14px; box-shadow: 0 16px 40px -16px rgba(0,0,0,.7); }

.wt__say { flex: 0 1 auto; min-height: 0; overflow-y: auto; padding: 1rem 1.3rem .4rem; }
.wt__kicker { font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--orange-ink); }
.wt__say p { font-size: 1.08rem; line-height: 1.5; color: var(--ink); margin-top: .35rem; }
.wt__tip { font-size: .9rem !important; color: var(--ink-soft) !important; margin-top: .6rem !important; padding: .6rem .8rem; background: var(--cream-deep); border-radius: 10px; }
/* nav is a pinned, always-tappable bar clear of mobile browser chrome */
.wt__nav {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.3rem;
  padding-bottom: calc(.8rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); background: var(--cream);
}
.wt__nav .btn { min-height: 44px; }
.wt__count { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }

/* ----------------------------------------------------- playable war */
.war { width: 100%; display: grid; gap: .8rem; color: #fff; }
.war__score { display: flex; align-items: center; justify-content: space-between; font-size: .9rem; font-weight: 600; color: #eaf4ee; }
.war__score b { font-size: 1.3rem; font-family: var(--display); }
.war__vs { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.7); }
.war__table { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; min-height: 140px; }
.war__slot { display: grid; place-items: center; gap: .35rem; }
.war__cap { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.75); }
.war__card { min-height: 130px; display: grid; place-items: center; }
.war__card:empty::before { content: ""; width: 92px; height: 129px; border-radius: 11px; border: 2px dashed rgba(255,255,255,.3); }
.war__mid { text-align: center; font-size: .92rem; color: #fff; max-width: 16ch; }
.war__mid b { font-family: var(--display); }
.war__hand { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; padding-top: .4rem; }
.war__pick { border: 0; background: none; padding: 0; cursor: pointer; transition: transform .18s var(--ease); }
.war__pick:hover { transform: translateY(-8px); }
.war__again { justify-self: center; }

@media (max-width: 420px) {
  .war__card:empty::before { width: 70px; height: 98px; }
  .card--lg { --w: 74px; }
}
