:root {
  --green: #1f4d3a;
  --green-2: #2d6a50;
  --red: #c8102e;
  --red-soft: #fbe9ec;
  --gold: #f6c453;
  --cream: #fbf7f0;
  --paper: #ffffff;
  --ink: #1d2320;
  --muted: #5d6762;
  --line: #e6dfd2;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.6 var(--sans); }
a { color: var(--green-2); text-underline-offset: 2px; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--green); }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: .2em 0 .4em; letter-spacing: -.01em; }
h2 { font-size: 1.6rem; margin: 2em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--red); margin: 2rem 0 0; }
.lede { font-size: 1.15rem; color: #333c38; }
.muted, .small { color: var(--muted); }
.small { font-size: .88rem; margin-top: 1.5rem; }

/* header / footer */
.site-header { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.logo { color: #fff; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; white-space: nowrap; }
.logo:hover { color: var(--gold); }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { color: #e9f1ec; text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.main-nav a:hover, .main-nav a[aria-current] { background: rgba(255,255,255,.12); color: #fff; }
.site-footer { background: #17392b; color: #cfe0d6; margin-top: 4rem; padding: 2.5rem 0; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.site-footer a { display: block; color: #cfe0d6; text-decoration: none; padding: 3px 0; }
.site-footer a:hover { color: var(--gold); }
.footer-title { color: #fff; font-weight: 700; margin: 0 0 6px; }

/* hero */
.hero { background: radial-gradient(1200px 400px at 80% -10%, #2d6a50 0, var(--green) 60%); color: #fff; padding: 2.5rem 0 3rem; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--gold); }
.hero .lede { color: #e4efe8; max-width: 620px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.5rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid currentColor; background: transparent; color: inherit; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; }
.hero .btn { color: #fff; }
.btn:hover { color: var(--gold); }
.btn-primary, .hero .btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: #a50d26; border-color: #a50d26; color: #fff; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-2); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn-ghost:hover { border-color: var(--green-2); color: var(--green); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* home */
.steps { padding-left: 1.3em; }
.steps li { margin: .5em 0; }
.cards { display: grid; gap: 16px; margin-top: 2.5rem; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-link { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(31,77,58,.12); color: inherit; }
.card h3 { margin: .3em 0; }
.card p { margin: 0; color: var(--muted); }
.card-icon { font-size: 1.8rem; }
.budget-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.budget-grid a { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; text-decoration: none; color: var(--ink); }
.budget-grid a:hover { border-color: var(--red); }
.budget-grid strong { display: block; font: 700 2rem var(--serif); color: var(--red); }
.mini-list li { margin: .35em 0; }

/* rules */
.callout { background: var(--red-soft); border-left: 4px solid var(--red); padding: 14px 16px; border-radius: 8px; margin: 1.5rem 0; }
.faq { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0 16px 28px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ""; position: absolute; left: 4px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: translateY(-70%) rotate(-45deg); transition: transform .15s; }
.faq[open] summary::before { transform: translateY(-70%) rotate(45deg); }
.faq summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }
.faq p { margin-top: 0; padding-left: 28px; }
.cta-box { background: var(--green); color: #e4efe8; border-radius: var(--radius); padding: 20px 22px; margin-top: 2.5rem; }
.cta-box h2 { color: #fff; margin-top: 0; }
.cta-box a { color: var(--gold); }

/* gift lists */
.party-filter { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 1.5rem 0 1rem; }
.party-filter input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; min-height: 44px; }
.filter-note { margin: 0; flex-basis: 100%; color: var(--muted); font-size: .92rem; }
.legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 1rem; }
.gift-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.gift { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; scroll-margin-top: 80px; }
.gift[hidden] { display: none; }
.gift:target { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.gift-head { display: flex; align-items: baseline; gap: 10px; }
.gift h3 { margin: 0; flex: 1; font-size: 1.15rem; }
.rank { font: 700 1rem var(--serif); color: var(--red); min-width: 1.6em; }
.price { font-weight: 700; color: var(--green); white-space: nowrap; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.speed { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.speed-store { background: #ddf3e4; color: #135c33; }
.speed-fast { background: #fff1cc; color: #7a5300; }
.speed-ship { background: #ececec; color: #4a4a4a; }
.steal { font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
.gift p { margin: 6px 0; }
.buy, .where { font-size: .92rem; color: var(--muted); }
.buy a { margin-left: 10px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { background: var(--paper); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); }
.chips a:hover { border-color: var(--red); color: var(--red); }


/* game */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.game { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 1.5rem 0 2rem; }
.game h2 { margin: .4rem 0 .8rem; font-size: 1.5rem; }
.game h3 { margin: 0 0 .6rem; font-size: 1.1rem; }
.btn-lg { min-height: 54px; padding: 12px 26px; font-size: 1.08rem; }
.center { justify-content: center; text-align: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--green-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkish:hover { color: var(--red); }
.g-hint { color: var(--muted); font-size: .95rem; margin: .4rem 0; }
.g-cta { margin: 20px 0 6px; display: flex; justify-content: center; }
.g-cta .btn { width: 100%; max-width: 420px; }

.g-steps { display: flex; list-style: none; padding: 0; margin: 0 0 6px; gap: 6px; counter-reset: s; font-size: .82rem; }
.g-steps li { flex: 1; text-align: center; color: var(--muted); padding-top: 8px; border-top: 4px solid var(--line); counter-increment: s; }
.g-steps li::before { content: counter(s) ". "; }
.g-steps li.done { border-color: var(--green-2); color: var(--green-2); }
.g-steps li.now { border-color: var(--red); color: var(--ink); font-weight: 700; }

/* setup */
.g-add { display: flex; gap: 8px; }
.g-add input, .g-panel input[type=text] { flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; min-height: 48px; }
.g-add input:focus, .g-panel input:focus, .g-alt textarea:focus { outline: none; border-color: var(--green-2); }
.g-chips { list-style: none; padding: 0; margin: 14px 0 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.g-chips li { display: inline-flex; align-items: center; gap: 4px; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 14px; font-weight: 600; }
.chip-x { border: 0; background: none; width: 30px; height: 30px; border-radius: 50%; font-size: 1.2rem; line-height: 1; color: var(--muted); cursor: pointer; }
.chip-x:hover { background: var(--red-soft); color: var(--red); }
.g-alt { margin: 14px 0; font-size: .95rem; display: grid; gap: 10px; justify-items: start; }
.g-alt form { width: 100%; }
.g-alt textarea { width: 100%; font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; margin-top: 6px; }
.g-count { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.g-count label { flex: 0 1 auto; }
.g-count input { width: 5em; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; min-height: 40px; }
.g-rules { background: var(--cream); border-radius: 10px; padding: 10px 14px; font-size: .93rem; }
.g-rules p { margin: 0; }
.opts { display: grid; gap: 10px; margin: 12px 0 4px; }
.opts label { display: flex; gap: 10px; align-items: center; }
.opts input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--green); }
.opts input[type=number] { width: 4em; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }

/* order */
.g-order { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.g-order li { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.num { display: inline-grid; place-items: center; min-width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; font: 700 .95rem var(--sans); flex: none; }
.g-order.results { grid-template-columns: 1fr; }
.g-order.results .g-gift { margin-left: auto; text-align: right; }
.share-box { background: var(--cream); border-radius: 10px; padding: 12px 14px; margin-top: 18px; font-size: .95rem; }

/* play */
.g-progress { text-align: center; color: var(--muted); font-size: .9rem; margin: 8px 0 10px; }
.g-last { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: .95rem; background: #eef5f0; border-left: 4px solid var(--green-2); }
.g-last.steal { background: var(--red-soft); border-left-color: var(--red); }
.g-turn { background: var(--green); color: #fff; border-radius: 16px; padding: 18px; text-align: center; }
.g-turn.chain { background: #8e1c2f; }
.g-turn.final { background: #6b4b0f; }
.g-turn-label { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--gold); }
.g-turn-name { display: block; font: 700 clamp(1.8rem, 6vw, 2.4rem)/1.15 var(--serif); margin: 2px 0 6px; overflow-wrap: anywhere; }
.g-turn p { margin: 0 auto 14px; max-width: 460px; color: #e8f0eb; }
.g-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 104px; border: 0; border-radius: 14px; background: #fff; color: var(--ink); font: 700 1.1rem var(--sans); cursor: pointer; padding: 12px; }
.choice:hover:not(:disabled) { box-shadow: 0 0 0 3px var(--gold); }
.choice:disabled { opacity: .55; cursor: not-allowed; }
.choice small { font: 500 .8rem var(--sans); color: var(--muted); }
.choice-icon { font-size: 1.8rem; line-height: 1; }
.g-panel { background: #fff; color: var(--ink); border-radius: 14px; padding: 14px; text-align: left; }
.g-panel label, .g-panel .panel-title { display: block; font-weight: 700; margin: 0 0 8px; color: var(--ink); max-width: none; }
.g-panel .g-hint { color: var(--muted); margin: 8px 0 0; max-width: none; }
.g-panel .row { margin-top: 10px; }
.g-pick { display: grid; gap: 8px; margin-bottom: 10px; }
.pick { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 12px; padding: 10px 14px; font: inherit; cursor: pointer; }
.pick:hover:not(:disabled) { border-color: var(--red); background: var(--red-soft); }
.pick-name { font-weight: 700; }
.pick-from { grid-column: 1; color: var(--muted); font-size: .9rem; }
.pick-meta { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: .8rem; color: var(--red); font-weight: 600; text-align: right; max-width: 8.5em; }
.pick.no { cursor: not-allowed; opacity: .6; }
.pick.no .pick-meta { color: var(--muted); }
.g-turn.final .g-pick { margin-top: 4px; }

.g-table { margin-top: 20px; }
.g-table ol { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.g-table li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.g-table li:first-child { border-top: 0; }
.g-table li.now { background: #fff7e0; }
.g-table .num { min-width: 28px; height: 28px; font-size: .85rem; }
.g-table li { flex-wrap: nowrap; }
.g-table .who { font-weight: 700; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.g-table .st { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; justify-content: flex-end; text-align: right; min-width: 0; }
.g-table .g-gift { overflow-wrap: anywhere; }
.g-gift { font-weight: 600; }
.dots { display: inline-flex; gap: 3px; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--red); }
.dot.on { background: var(--red); }
.tag-frozen { font-size: .75rem; font-weight: 700; background: #d5e8f7; color: #1d4f7a; padding: 2px 8px; border-radius: 999px; }
.g-more { margin-top: 18px; font-size: .93rem; }
.g-more summary { cursor: pointer; color: var(--muted); }
.log { color: var(--muted); max-height: 220px; overflow: auto; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
.log p { margin: 2px 0; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: .92rem; z-index: 20; max-width: calc(100% - 32px); text-align: center; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header { position: static; }
  .main-nav a { padding: 6px 8px; font-size: .88rem; }
  .gift-head { flex-wrap: wrap; }
}

/* printable rules */
.flyer-preview { display: block; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 6px 24px rgba(31,77,58,.12); }
.flyer-preview img { display: block; width: 100%; height: auto; }
.printables { display: grid; gap: 20px; margin: 1.5rem 0; }
.printable { display: grid; grid-template-columns: 220px 1fr; gap: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; align-items: start; }
.printable-img { display: block; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.printable-img img { display: block; width: 100%; height: auto; }
.printable h2 { margin: 0 0 2px; font-size: 1.35rem; }
.small-meta { font-size: .9rem; margin: 0 0 8px; }
.printable p { margin: 0 0 8px; }
@media (max-width: 560px) { .printable { grid-template-columns: 1fr; } .printable-img { max-width: 260px; } }

/* hand-drawn infographics */
.sketch { margin: 1.8rem auto; max-width: 640px; }
.sketch-paper { background-color: #fffdf7; background-image: linear-gradient(90deg, transparent 22px, #f3b5bd 22px, #f3b5bd 24px, transparent 24px), repeating-linear-gradient(#fffdf7 0 31px, #dbe7f3 31px 32px); border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(31,77,58,.10); padding: 14px 10px 10px 28px; transform: rotate(-.4deg); }
.sketch:nth-of-type(even) .sketch-paper { transform: rotate(.4deg); }
.sketch-svg { display: block; width: 100%; height: auto; }
.sketch figcaption { font: 1.05rem 'Patrick Hand', 'Comic Sans MS', cursive; color: var(--muted); text-align: center; margin-top: 10px; }
.sketch figcaption a { margin-left: 6px; font-size: .95rem; }
.sketch-link:hover path { stroke-width: 3; }
.sketch-link:focus-visible { outline: 3px solid var(--gold); }
@media (max-width: 560px) { .sketch-paper { padding: 8px 4px 6px 16px; transform: none; } .sketch:nth-of-type(even) .sketch-paper { transform: none; } }
.about-hero { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; margin-top: 24px; }
.about-hero .sketch { margin: 0; }
.about-hero h1 { margin-top: 0; }
@media (max-width: 560px) { .about-hero { grid-template-columns: 1fr; } .about-hero .sketch { max-width: 240px; margin: 0 auto; } }
.sketch-paper.sketch-pad { background: none; box-shadow: none; padding: 0; transform: none; }
.about-hero .sketch figcaption { font-size: .82rem; line-height: 1.3; margin-top: 8px; }
.disclosure { font-size: .9rem; color: var(--muted); margin-top: -.4rem; }
.footer-disclosure { font-size: .85rem; opacity: .85; margin-top: 18px; }
.site-footer .footer-about a { display: inline; }
h2[id], h3[id], .gift[id] { scroll-margin-top: 120px; }
