/* RiverBid - design system. Red / white / blue / black playing-card palette. */
:root {
  --font-scale: 1;
  --red: #cc2a36;        /* card red */
  --red-dark: #a81f2a;
  --blue: #17457a;       /* card / river blue */
  --blue-deep: #0b2a4a;  /* deep river (theme) */
  --blue-light: #e8f0f8;
  --gold: #e8b23c;       /* crown / accent */
  --ink: #111317;        /* black */
  --paper: #ffffff;
  --cream: #f7f3ea;      /* card face */
  --line: #d9dee6;
  --muted: #5b6672;
  --good: #1f7a46;
  --bad: #cc2a36;
  --shadow: 0 2px 8px rgba(11, 42, 74, 0.12);
  --radius: 14px;
  font-size: calc(17px * var(--font-scale));
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  /* Blue "card-table" background echoing the logo's sky and sea. */
  background: var(--blue-deep);
  background-image: linear-gradient(180deg, #2f6aa6 0%, #1a5088 42%, #0b2a4a 100%);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
}
h1, h2, h3, .game-code, .hero-title, .round-no { font-family: "Lilita One", "Nunito", sans-serif; font-weight: 400; letter-spacing: .2px; }
/* On the blue background, page-level text is light; text inside white cards is restored to dark
   in the "card interiors" block below. */
h1 { font-size: 1.7rem; color: #fff; margin: .2em 0 .4em; }
h2 { font-size: 1.25rem; color: #fff; margin: 1em 0 .4em; }
h3 { font-size: 1.1rem; color: #fff; margin: .2em 0 .3em; }
p { line-height: 1.5; }
sup { font-size: .6em; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 12px;
  background: var(--blue-deep); color: #fff;
  box-shadow: var(--shadow);
  padding-top: calc(8px + env(safe-area-inset-top));
}
.topbar #btn-home { visibility: hidden; }
.topbar.ingame #btn-home { visibility: visible; }
.topbar-right { display: flex; gap: 8px; }
.icon-btn {
  background: rgba(255,255,255,.14); color: #fff; border: 0;
  border-radius: 10px; padding: 8px 14px; font-weight: 800; font-size: .95rem;
  min-height: 40px; cursor: pointer; font-family: inherit;
}
.icon-btn:active { transform: translateY(1px); }
.game-code { font-size: 1.1rem; letter-spacing: 2px; color: var(--gold); }

/* ---- layout ---- */
.app { max-width: 640px; margin: 0 auto; padding: 14px 14px 48px; }
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin: 12px 0; box-shadow: var(--shadow);
}
.sub { color: #cfe0f1; margin: .2em 0 1em; }
.center { text-align: center; }
.small { font-size: .9rem; }
.muted { color: #c3d6ea; }
.nowrap { white-space: nowrap; }
.row { display: flex; gap: 8px; flex-wrap: nowrap; align-items: center; }
.row.center { justify-content: center; }
.row.wrap { flex-wrap: wrap; }

/* ---- buttons ---- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin: 8px 0; padding: 14px 16px;
  font-family: inherit; font-size: 1.05rem; font-weight: 800;
  border: 2px solid var(--blue); background: var(--paper); color: var(--blue);
  border-radius: 12px; cursor: pointer; min-height: 52px; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: var(--line); color: var(--muted); background: transparent; }
.btn.small { width: auto; padding: 9px 14px; font-size: .95rem; min-height: 44px; margin: 4px 0; }
.btn.tiny { width: auto; padding: 4px 10px; min-height: 36px; font-size: 1rem; margin: 0; border-width: 1.5px; }
.btn.disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.bad.tiny { color: var(--bad); border-color: var(--bad); background: transparent; }
.linkbtn { background: none; border: 0; color: #dbe8f5; font-weight: 800; cursor: pointer; font-family: inherit; font-size: .95rem; padding: 4px; text-decoration: underline; text-underline-offset: 3px; }

label { display: block; font-weight: 800; margin: 12px 0 4px; color: #e4eef8; }
input[type=text], input[type=number] {
  width: 100%; padding: 13px 14px; font-size: 1.1rem; font-family: inherit;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
input:focus, .btn:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.badge { display: inline-block; font-size: .7rem; font-weight: 800; background: var(--blue-light); color: var(--blue-deep); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }

/* Card interiors: white/cream cards and list rows sit on the blue background, so their text is
   restored to the dark palette (the base colors above are tuned for text directly on the blue). */
.card, .lb li, .stat, .shop-card, .scorecard { color: var(--ink); }
.card h1, .card h2, .card h3 { color: var(--blue-deep); }
.card .sub, .card .muted, .card label, .card .affnote-text { color: var(--muted); }
.card .btn.ghost { color: var(--muted); border-color: var(--line); }
.btn.ghost { color: #e4eef8; border-color: rgba(255, 255, 255, .4); }
.affnote-text { color: #cfe0f1; }

/* ---- hero / home ---- */
.hero { text-align: center; margin: 6px 0 2px; }
/* Fixed-aspect frame so the intro GIF and the static hero swap without the page jumping; the
   static hero fills it exactly, the slightly taller GIF is cropped from the bottom (object-position
   top keeps the king's crown). */
.hero-frame { width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1672 / 941; border-radius: var(--radius); box-shadow: var(--shadow); border: 3px solid #fff; overflow: hidden; background: var(--blue-deep); }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: opacity .3s ease; }
.hero-img.settling { opacity: 0; }
.hero-title { font-size: 2.4rem; color: #fff; margin: .35em 0 .05em; line-height: 1.05; letter-spacing: .5px; }
.tagline { color: var(--gold); font-weight: 900; margin: .1em 0 .2em; letter-spacing: .3px; }

/* Keep the home column no wider than the hero, so the buttons never overhang the image. */
.home { max-width: 560px; margin: 0 auto; }

/* Full-screen intro splash: plays the RiverBid animation once on first open, then fades to the app. */
.intro-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--blue-deep);
  background-image: linear-gradient(180deg, #2f6aa6 0%, #1a5088 45%, #0b2a4a 100%);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity .55s ease;
}
.intro-overlay[hidden] { display: none; }
.intro-overlay.fade { opacity: 0; }
/* Framed and centered, capped near the art's native size so it stays crisp instead of upscaling to
   full screen and pixelating. */
.intro-overlay img {
  width: min(84vw, 440px); height: auto; max-height: 72vh; object-fit: contain;
  border-radius: var(--radius); border: 3px solid #fff; box-shadow: 0 8px 28px rgba(0,0,0,.35);
  background: var(--blue-deep);
}

.footer { margin-top: 26px; text-align: center; color: #c3d6ea; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.footer-copy { font-size: .8rem; margin-top: 8px; }

/* ---- lobby ---- */
.qr-wrap { text-align: center; }
.qr-wrap img { width: 190px; height: 190px; image-rendering: pixelated; border: 8px solid #fff; border-radius: 12px; background: #fff; }
.game-code.big { font-size: 2.4rem; color: var(--blue-deep); letter-spacing: 4px; }
.sharelink { font-size: .85rem; color: var(--muted); word-break: break-all; margin: 6px 0; }
.add-row { margin: 10px 0; }
.add-row input { flex: 1; }

ul.lb, ol.lb { list-style: none; padding: 0; margin: 8px 0; }
.lb li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; margin-bottom: 7px;
}
.lb li.current { border-color: var(--pc, var(--blue)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc, var(--blue)) 25%, transparent); }
.pchip { width: 12px; height: 12px; border-radius: 50%; background: var(--pc, var(--blue)); flex: none; }
.lb .rank { font-weight: 900; color: var(--muted); min-width: 1.4em; text-align: center; }
.lb .name { flex: 1; font-weight: 800; }
.lb .lb-bid { font-size: .82rem; font-weight: 800; color: var(--muted); background: var(--blue-light); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.lb .score { font-family: "Lilita One", sans-serif; font-size: 1.3rem; color: var(--blue-deep); }
.seat-ctrls { display: flex; gap: 4px; }
.summary { margin: 6px 0; padding-left: 18px; }
.summary li { margin: 3px 0; }

/* ---- settings panel ---- */
.settings-card .setting { padding: 10px 0; border-top: 1px solid var(--line); }
.settings-card .setting:first-of-type { border-top: 0; }
.setting-label { font-weight: 900; color: var(--blue-deep); margin-bottom: 6px; }
.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper-val { font-family: "Lilita One", sans-serif; font-size: 1.4rem; min-width: 1.6em; text-align: center; color: var(--blue-deep); }
.river-preview { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.river-cell { min-width: 30px; text-align: center; padding: 4px 6px; border-radius: 8px; background: var(--blue-light); color: var(--blue-deep); font-weight: 800; font-size: .9rem; }
.river-cell.nt { background: var(--cream); border: 1px dashed var(--gold); }

/* ---- roles ---- */
.roles { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.roles-label { font-weight: 900; color: var(--blue-deep); }
.roles-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- suits ---- */
.suit.red { color: var(--red); } .suit.black { color: var(--ink); } .suit.stars { color: #8a6d12; }
.riptide-banner { background: var(--gold); border-color: #d8b24a; color: #5a4210; font-weight: 800; text-align: center; }
.suit { font-weight: 900; }
.notrump { font-weight: 900; color: var(--muted); }

/* ---- round head ---- */
.round-head { padding: 12px 14px; }
.round-line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.round-no { font-size: 1.5rem; color: var(--blue-deep); }
.round-no .of { font-size: .9rem; color: var(--muted); }
.cards-no { font-weight: 900; color: var(--red); }
.trump-no { margin-left: auto; font-size: 1.1rem; }
.trump-label { font-weight: 800; font-size: .82rem; color: var(--muted); }
.rdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line); margin-right: 3px; }
.rdot.done { background: var(--blue); }
.rdot.on { background: var(--red); transform: scale(1.4); }
.rdot.nt { border: 1.5px solid var(--gold); }

.phase-label { text-align: center; font-weight: 900; color: #fff; margin: 10px 0; }
.tally-ok { color: var(--good); } .tally-wait { color: var(--red); }

/* How over/under-subscribed the round is (shown during trick play). */
.book-note { text-align: center; border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: .95rem; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.book-note.over { background: #fbe6e8; border-color: #f0b9bf; color: #8f1f28; }
.book-note.under { background: var(--blue-light); border-color: #bcd3ea; color: var(--blue-deep); }
.book-note.even { background: var(--cream); border-color: var(--gold); color: #7a5a12; }
.code-chip { display: inline-block; font-size: .8rem; font-weight: 800; background: var(--blue-light); color: var(--blue-deep); border-radius: 999px; padding: 2px 10px; letter-spacing: 1px; }

/* ---- trump phase ---- */
.suit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.suit-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff;
  cursor: pointer; font-family: inherit; min-height: 90px; justify-content: center;
}
.suit-btn .sg { font-size: 2.4rem; line-height: 1; }
.suit-btn .sn { font-weight: 800; color: var(--blue-deep); }
.suit-btn.red .sg { color: var(--red); } .suit-btn.black .sg { color: var(--ink); }
.suit-btn:active { transform: translateY(1px); }

/* ---- bidding ---- */
.bid-entry { text-align: center; }
.bid-who { font-size: 1.1rem; margin-bottom: 10px; }
.bid-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 8px; }
.bidkey {
  font-family: "Lilita One", sans-serif; font-size: 1.6rem; padding: 14px 0;
  border: 2px solid var(--blue); border-radius: 12px; background: #fff; color: var(--blue-deep);
  cursor: pointer; min-height: 62px;
}
.bidkey:active { transform: translateY(1px); background: var(--blue-light); }
.bidkey.forbidden { border-color: var(--line); color: var(--line); background: repeating-linear-gradient(45deg, #fff, #fff 6px, #f3f3f3 6px, #f3f3f3 12px); cursor: not-allowed; }
.hook-note { color: var(--red); }
.bid-list .bidval { font-weight: 800; color: var(--blue-deep); }
.bid-list li.current { background: var(--blue-light); }

/* ---- playing / tricks ---- */
.trick-step { display: inline-flex; align-items: center; gap: 10px; }
.trick-val { font-family: "Lilita One", sans-serif; font-size: 1.5rem; min-width: 1.3em; text-align: center; color: var(--blue-deep); }
.trick-val.readonly { color: var(--muted); }
.bid-ref { font-weight: 800; color: var(--muted); font-size: .9rem; }
.bid-ref.ontrack { color: var(--good); }

/* ---- last round banner ---- */
.last-round { background: var(--cream); border-color: var(--gold); }
.lr-head { font-weight: 900; color: var(--blue-deep); margin-bottom: 6px; }
.lr-items { display: flex; flex-wrap: wrap; gap: 8px; }
.lr-item { font-weight: 800; padding: 3px 9px; border-radius: 999px; font-size: .9rem; }
.lr-item.made { background: #e3f3ea; color: var(--good); }
.lr-item.missed { background: #fbe6e8; color: var(--red); }

/* ---- stat grid (recap) ---- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat .big { font-family: "Lilita One", sans-serif; font-size: 1.6rem; color: var(--blue-deep); }
.stat .lbl { font-size: .85rem; color: var(--muted); margin-top: 2px; }

/* ---- scorecard table ---- */
.scorecard-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scorecard { border-collapse: collapse; width: 100%; font-size: .9rem; background: #fff; }
.scorecard th, .scorecard td { border: 1px solid var(--line); padding: 5px 7px; text-align: center; }
.scorecard thead th { background: var(--blue-deep); color: #fff; position: sticky; top: 0; }
.scorecard .cur-row { background: var(--blue-light); }
.sc-cell { line-height: 1.25; }
.sc-bid { display: block; font-weight: 800; }
.sc-pts { display: block; color: var(--red); font-weight: 800; }
.sc-run { display: block; color: var(--muted); font-size: .8rem; }
.sc-cell.live { background: var(--cream); }
.sc-cell.empty { color: var(--line); }
.total-row td { background: var(--cream); font-size: 1.05rem; }

/* ---- shop ---- */
.shop-list { display: flex; flex-direction: column; gap: 10px; }
.shop-card { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; color: inherit; }
.shop-title { display: block; font-weight: 900; color: var(--blue-deep); }
.shop-desc { display: block; color: var(--muted); font-size: .9rem; }
.shop-thumb { flex: none; display: inline-flex; }
.shop-photo { width: 120px; height: 84px; display: block; object-fit: contain; }
.affnote-text { font-size: .82rem; color: var(--muted); margin-top: 14px; }

/* ---- page header (overlays) ---- */
.page-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.page-head h1 { margin: 0; }
.back-btn { width: auto; margin: 0; padding: 9px 14px; min-height: 44px; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-weight: 800; z-index: 60; box-shadow: var(--shadow); max-width: 90vw; text-align: center;
}

/* ---- celebration animation overlay (the card-splash-burst GIF) ---- */
.celebration-gif { position: fixed; inset: 0; margin: auto; width: min(80vw, 440px); height: auto; pointer-events: none; z-index: 55; opacity: 0; transition: opacity .3s ease; }
.celebration-gif.show { opacity: 1; }

/* ---- round-results pause screen ---- */
.round-done { background: var(--cream); border-color: var(--gold); }
.rd-list li { display: flex; align-items: center; gap: 8px; }
.rd-list .name { flex: 1; }
.rd-call { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.rd-pts { font-weight: 900; min-width: 56px; text-align: right; }
.lb li.made { border-color: var(--good); }
.lb li.missed { border-color: var(--red); }
.lb li.made .rd-pts { color: var(--good); }
.lb li.missed .rd-pts { color: var(--red); }
.rd-predict { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.rd-predict h4 { margin: 2px 0 6px; color: var(--blue-deep); font-family: "Lilita One", sans-serif; font-weight: 400; }
.lb.mini li { padding: 6px 10px; margin: 4px 0; display: flex; gap: 8px; }
.lb.mini .name { flex: 1; font-weight: 800; }

/* ---- per-round predictions (call the round) ---- */
.predict-round { border-color: var(--blue); }
.predict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.predict-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 10px 12px; border-radius: 12px; cursor: pointer; font-family: inherit; text-align: left;
  border: 2px solid var(--line); background: #fff; color: var(--ink);
  border-left: 6px solid var(--pc, var(--blue));
}
.predict-tile.make { background: #e3f3ea; border-color: var(--good); }
.predict-tile.miss { background: #fff; }
.pt-name { font-weight: 900; }
.pt-bid { font-size: .8rem; color: var(--muted); }
.pt-call { font-size: .85rem; font-weight: 800; color: var(--muted); }
.predict-tile.make .pt-call { color: var(--good); }
@media (max-width: 380px) { .predict-grid { grid-template-columns: 1fr; } }

/* ---- big-screen scoreboard (TV mode) ---- */
.tv-board { color: #fff; }
.tv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tv-brand { font-family: "Lilita One", sans-serif; font-size: clamp(1.8rem, 6vw, 3rem); color: var(--gold); }
.tv-line { color: #dbe8f5; font-weight: 800; margin-bottom: 12px; font-size: clamp(1rem, 2.6vw, 1.5rem); }
.tv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tv-row {
  display: flex; align-items: center; gap: 14px;
  background: #fff; color: var(--ink); border-radius: 14px; padding: 14px 18px;
  border-left: 10px solid var(--pc, var(--blue)); box-shadow: var(--shadow);
}
.tv-row.lead { outline: 3px solid var(--gold); }
.tv-rank { font-family: "Lilita One", sans-serif; font-size: clamp(1.4rem, 4vw, 2.4rem); color: var(--muted); min-width: 1.4em; }
.tv-name { flex: 1; font-weight: 900; font-size: clamp(1.3rem, 4vw, 2.4rem); }
.tv-sub { display: block; font-size: .5em; font-weight: 800; color: var(--muted); }
.tv-score { font-family: "Lilita One", sans-serif; font-size: clamp(1.8rem, 6vw, 3.4rem); color: var(--blue-deep); }

/* ---- blank (printable) scorecard ---- */
.scorecard.blank td.blank-cell { height: 36px; min-width: 56px; }
.print-title { display: none; }

/* ---- rules glossary + printable cheat sheet ---- */
.glossary { margin: 4px 0 0; }
.glossary dt { font-weight: 900; color: var(--blue-deep); margin-top: 10px; }
.glossary dd { margin: 2px 0 0; color: var(--ink); }
.cheat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cheat-sec h4 { margin: 0 0 3px; color: var(--blue-deep); font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1rem; }
.cheat-sec p { margin: 0 0 6px; font-size: .9rem; line-height: 1.4; }
.cheat-river { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 6px; }
@media (max-width: 480px) { .cheat-grid { grid-template-columns: 1fr; } }

/* ---- solo practice: cards, hand, trick mat ---- */
.hand { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card-face {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 46px; height: 64px; padding: 4px; border-radius: 8px; background: #fff;
  border: 1.5px solid var(--line); box-shadow: 0 1px 3px rgba(11,42,74,.18);
  font-family: "Nunito", sans-serif; font-weight: 900; line-height: 1; cursor: default;
}
button.card-face { cursor: pointer; }
.card-face.red { color: var(--red); }
.card-face.black { color: var(--ink); }
.card-face.stars { color: #8a6d12; } /* Stars, the optional 5th suit (virtual only) */
.card-face.back {
  color: #cfe0f1; background: var(--blue-deep); border-color: var(--blue-deep);
  font-size: 1.5rem; align-items: center; justify-content: center;
}
.card-face .cf-rank { font-size: 1.1rem; }
.card-face .cf-suit { font-size: 1.3rem; margin-top: 2px; }
.card-face.playable { border-color: var(--good); box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 30%, transparent); }
.card-face.playable:active { transform: translateY(1px); }
.card-face.disabled, .card-face[disabled] { opacity: .4; cursor: not-allowed; filter: grayscale(.3); }
.trick-area { background: var(--cream); }
.trick-mat { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: flex-end; min-height: 80px; }
.trick-card { text-align: center; }
.tc-name { font-size: .78rem; font-weight: 800; margin-bottom: 3px; }

/* ---- print ---- */
@media print {
  .topbar, .no-print, .footer, .celebration-gif, .toast { display: none !important; }
  body { background: #fff; }
  .app { max-width: none; }
  .scorecard thead th { background: #333 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card { box-shadow: none; border: 1px solid #999; }
  .print-title { display: block; font-family: "Lilita One", sans-serif; font-size: 1.6rem; margin: 0 0 8px; color: #000; }
}

@media (min-width: 560px) {
  .suit-grid { grid-template-columns: repeat(4, 1fr); }
}
/* On phones the hero goes full-bleed: edge to edge, no white box. */
@media (max-width: 600px) {
  .hero-frame {
    width: 100vw; max-width: none;
    margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
    border: 0; border-radius: 0; box-shadow: none;
  }
  .hero { margin-top: -14px; } /* meet the top padding so it's truly edge to edge */
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
