@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@600;700;800&family=Patrick+Hand&display=swap');
/* Wobblox — shared styles */
:root {
  /* Playful hand-drawn type + per-category sticker palettes */
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-hand: 'Patrick Hand', 'Fredoka', cursive;
  --ink: #2c2748; --ink-soft: #6a6390; --cream: #fffaf1;
  --cat-board: #5b8cff;  --cat-board2: #7a6bff;
  --cat-card:  #ff6b9d;  --cat-card2:  #ff8e6b;
  --cat-puzzle:#27cbb8;  --cat-puzzle2:#3bd17a;
  --cat-paper: #ffb43c;  --cat-paper2: #ff9b2e;
  --cat-arcade:#b06bff;  --cat-arcade2:#ff6bce;
  --bg: #0e1020; --bg2: #171b30; --card: #1d2240; --card-h: #252b52;
  --text: #e8eaf6; --muted: #9aa1c7; --accent: #ffc93c; --accent2: #7c5cff;
  --good: #4cd97b; --bad: #ff5d73; --radius: 14px;
  --easy: #4cd97b; --medium: #ffc93c; --hard: #ff5d73;
  /* Stable brand palette — intentionally NOT overridden by the background
     theme picker, so the logo/hero/buttons keep their identity on any theme. */
  --brand1: #7c5cff; --brand2: #ff6b9d; --brand3: #ffc93c; --brand4: #3dd6c4;
  --brand-grad: linear-gradient(120deg, var(--brand1) 0%, var(--brand2) 55%, var(--brand3) 100%);
  --ctrl-border: #3a4280;  /* border for header controls; stays visible on light + dark */
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 12% -8%, rgba(124,92,255,.16), transparent 60%),
    radial-gradient(1000px 560px at 98% 0%, rgba(255,107,157,.14), transparent 55%),
    var(--bg);
  color: var(--text); min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; background: var(--bg-header, rgba(14,16,32,.9));
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--ctrl-border);
}
/* Logo lockup: wobbly-blocks mark + wordmark + tagline */
.logo { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.logo-mark { width: 34px; height: 34px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-word { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; letter-spacing: .2px; color: var(--text); }
.logo b, .logo-word b {
  font-weight: 900;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo small { display:block; font-size:.58rem; font-weight:700; color:var(--muted); letter-spacing:1.8px; margin-top:3px; }

.search { flex: 1; max-width: 380px; margin-left: auto; }
.search input {
  width: 100%; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--ctrl-border);
  background: var(--bg2); color: var(--text); outline: none; font-size: .95rem;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--brand1); box-shadow: 0 0 0 3px rgba(124,92,255,.25); }

/* ── Header controls: language selector (theme-safe, high contrast) ── */
.lang-wrap {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--ctrl-border); color: var(--text);
}
.lang-wrap .globe { font-size: .95rem; line-height: 1; }
.lang-select {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 0; color: var(--text);
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  padding-right: 15px; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239aa1c7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center;
}
/* Explicit option colors so the dropdown list is readable on every OS/theme */
.lang-select option { background: var(--card); color: var(--text); font-weight: 600; }

/* Layout */
.wrap { max-width: 1240px; margin: 0 auto; padding: 20px 16px 60px; }

/* ── Playful animated hero ── */
.hero { position: relative; text-align: center; padding: 58px 10px 42px; min-height: 330px; overflow: hidden; }

/* drifting aurora light blobs */
.hero-aurora { position: absolute; inset: -25% -12%; z-index: 0; pointer-events: none; filter: blur(54px); opacity: .5; }
.hero-aurora span { position: absolute; display: block; width: 44%; height: 64%; border-radius: 50%; mix-blend-mode: screen; animation: drift 17s ease-in-out infinite; }
.hero-aurora span:nth-child(1) { left: 1%;  top: 2%;  background: radial-gradient(circle, var(--brand1), transparent 70%); }
.hero-aurora span:nth-child(2) { right: 0;  top: -6%; background: radial-gradient(circle, var(--brand2), transparent 70%); animation-duration: 14s; animation-delay: -4s; }
.hero-aurora span:nth-child(3) { left: 32%; bottom: -14%; background: radial-gradient(circle, var(--brand4), transparent 70%); animation-duration: 21s; animation-delay: -8s; }
@keyframes drift { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(7%,-6%) scale(1.12); } 66% { transform: translate(-6%,5%) scale(.92); } }

/* synapse constellation (brain-development motif) */
.hero-synapse { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* headline + supporting text reveal */
.hero h1 { position: relative; z-index: 2; font-family: var(--font-display); font-size: clamp(2.1rem, 5.6vw, 3.7rem); font-weight: 700; line-height: 1.12; color: var(--text); animation: heroRise .7s cubic-bezier(.16,1,.3,1) both .12s; }
.hero h1 b {
  font-weight: 700; color: var(--ink); white-space: nowrap; display: inline-block;
  background: linear-gradient(98deg, var(--brand3) 0%, #ffe27a 100%);
  background-repeat: no-repeat; background-position: left center; background-size: 0% 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: .04em .28em; margin: 0 .04em;
  border-radius: 14px 9px 16px 8px / 9px 15px 8px 14px;
  transform: rotate(-1.4deg); box-shadow: 0 3px 0 rgba(0,0,0,.12);
  animation: heroHi .55s cubic-bezier(.16,1,.3,1) both .58s;
}
@keyframes heroHi { to { background-size: 100% 100%; } }
.hero .scribble { position: relative; z-index: 2; display: block; margin: 6px auto 0; width: min(360px, 70%); height: 18px; color: var(--brand2); }
.hero .scribble path { stroke-dasharray: 430; stroke-dashoffset: 430; animation: heroDraw .9s ease .7s forwards; }
@keyframes heroDraw { to { stroke-dashoffset: 0; } }
.hero p { position: relative; z-index: 2; color: var(--muted); margin: 16px auto 0; font-size: clamp(1rem, 2.2vw, 1.18rem); max-width: 640px; line-height: 1.55; font-weight: 700; animation: heroRise .7s cubic-bezier(.16,1,.3,1) both .5s; }
.hero .hero-tag { position: relative; z-index: 2; display: inline-block; margin-top: 14px; font-family: var(--font-hand); font-size: 1.2rem; color: var(--brand3); transform: rotate(-2deg); animation: heroRise .6s cubic-bezier(.16,1,.3,1) both .82s, tagWobble 4.6s ease-in-out 1.7s infinite; }
@keyframes heroRise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; } }
@keyframes tagWobble { 0%,100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(1.5deg) translateY(-3px); } }

/* floating game-icon CHARACTERS: fade in, then each plays a fun looping motion */
.hero-blocks { position: absolute; inset: 0; z-index: 1; pointer-events: none; perspective: 900px; }
.hb { position: absolute; width: var(--s,60px); height: auto; opacity: 0; pointer-events: none; will-change: transform; filter: drop-shadow(0 8px 12px rgba(0,0,0,.42)); }
.hb.stage  { animation: hbFade .6s ease .30s forwards, hbSway   5.4s ease-in-out 1.0s infinite; }
.hb.hop    { animation: hbFade .6s ease .45s forwards, hbHop    2.3s ease-in-out 1.1s infinite; transform-origin: 50% 90%; }
.hb.flip   { animation: hbFade .6s ease .50s forwards, hbFlip   4.0s ease-in-out 1.3s infinite; }
.hb.bounce { animation: hbFade .6s ease .55s forwards, hbBounce 2.4s ease-in-out 1.2s infinite; transform-origin: 50% 92%; }
.hb.drift  { animation: hbFade .6s ease var(--pd,.6s) forwards, hbDrift var(--d,7s) ease-in-out 1.2s infinite; }
.hb.sway   { animation: hbFade .6s ease var(--pd,.6s) forwards, hbSway  var(--d,8s) ease-in-out 1.2s infinite; }
.hb.slither{ animation: hbFade .8s ease .6s forwards, hbSlither 17s linear 1.2s infinite; }
@keyframes hbFade { to { opacity: 1; } }
@keyframes hbHop { 0%,100% { transform: translateY(0) rotate(-5deg) scaleY(1); } 10% { transform: translateY(0) rotate(-5deg) scaleY(.84); } 42% { transform: translateY(-44px) rotate(10deg) scaleY(1.07); } 70% { transform: translateY(0) rotate(-4deg) scaleY(.9); } 82% { transform: translateY(0) rotate(-4deg) scaleY(1); } }
@keyframes hbBounce { 0%,100% { transform: translateY(0) scaleY(1); } 45% { transform: translateY(-24px) scaleY(1.04); } 60% { transform: translateY(0) scaleY(.88); } 72% { transform: translateY(0) scaleY(1); } }
@keyframes hbFlip { 0%,100% { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(360deg) translateY(-10px); } }
@keyframes hbDrift { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-16px) rotate(4deg); } }
@keyframes hbSway { 0%,100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(7deg) translateY(-7px); } }
@keyframes hbSlither { 0%{transform:translateX(-8vw) translateY(0) rotate(-4deg);} 25%{transform:translateX(20vw) translateY(-12px) rotate(5deg);} 50%{transform:translateX(45vw) translateY(0) rotate(-4deg);} 75%{transform:translateX(70vw) translateY(-12px) rotate(5deg);} 100%{transform:translateX(98vw) translateY(0) rotate(-4deg);} }
@media (max-width: 640px) { .hb-extra { display: none; } .hb.stage { --s: 68px; } .hb.hop { --s: 58px; } .hb.flip, .hb.bounce { --s: 50px; } .hb.slither { --s: 46px; } }

@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero p, .hero .hero-tag, .hb { animation: none !important; opacity: 1 !important; transform: none !important; }
  .hero h1 b { background-size: 100% 100% !important; }
  .hero .scribble path { stroke-dashoffset: 0 !important; animation: none !important; }
  .hero-aurora span { animation: none !important; }
  .hero-synapse { display: none !important; }
}

/* Category filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 26px 0 6px; }
.chip {
  padding: 9px 18px; border-radius: 999px; background: var(--card);
  color: var(--text); border: 2px solid var(--ctrl-border); font-family: var(--font-display);
  font-size: .92rem; font-weight: 600;
  transition: border-color .15s, transform .12s, box-shadow .15s;
}
.chip:hover { border-color: var(--brand1); transform: translateY(-2px) rotate(-1deg); }
.chip.active {
  background: var(--brand-grad); color: #fff; border-color: transparent;
  box-shadow: 0 4px 0 rgba(0,0,0,.18), 0 6px 16px rgba(124,92,255,.45);
  transform: translateY(-1px);
}

/* Game grid */
.cat-title { margin: 34px 4px 16px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: 0; color: var(--text); display:flex; align-items:center; gap:8px; }
.cat-title small { font-family: var(--font-body); }
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
}
/* Playful sticker cards (one bright palette per category) */
.gcard {
  --c: #8a93c8; --c2: #aab0e0;
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px;
  background: var(--cream); color: var(--ink);
  border: 3px solid var(--c); border-radius: 22px;
  padding: 18px 14px 15px;
  box-shadow: 0 6px 0 rgba(0,0,0,.16), 0 12px 22px rgba(0,0,0,.26);
  transition: transform .16s ease, box-shadow .16s ease;
}
.gcard:hover { transform: translateY(-7px) rotate(-1.4deg); box-shadow: 0 13px 0 rgba(0,0,0,.14), 0 22px 36px rgba(0,0,0,.34); }
.gcard.cat-board  { --c: var(--cat-board);  --c2: var(--cat-board2);  }
.gcard.cat-card   { --c: var(--cat-card);   --c2: var(--cat-card2);   }
.gcard.cat-puzzle { --c: var(--cat-puzzle); --c2: var(--cat-puzzle2); }
.gcard.cat-paper  { --c: var(--cat-paper);  --c2: var(--cat-paper2);  }
.gcard.cat-arcade { --c: var(--cat-arcade); --c2: var(--cat-arcade2); }
.gcard .ic {
  font-size: 2.3rem; width: 68px; height: 68px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 3px solid #fff;
  background: radial-gradient(circle at 34% 28%, var(--c2), var(--c));
  box-shadow: inset 0 -5px 9px rgba(0,0,0,.18), 0 7px 15px rgba(0,0,0,.28);
  transform: rotate(-4deg); transition: transform .18s ease;
  line-height: 1;
}
.gcard:hover .ic { transform: rotate(5deg) scale(1.09); }
.gcard .ic.has-img { background: none; border: none; box-shadow: none; transform: none; width: 84px; height: 84px; }
.ic-img { width: 100%; height: 100%; object-fit: contain; transform: rotate(-3deg); transition: transform .18s ease; filter: drop-shadow(0 6px 9px rgba(0,0,0,.32)); }
.gcard:hover .ic-img { transform: rotate(4deg) scale(1.09); }
.title-ic { width: 42px; height: 42px; object-fit: contain; vertical-align: -11px; margin-right: 2px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.gcard h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.12; color: var(--ink); }
.gcard p { font-size: .77rem; color: var(--ink-soft); line-height: 1.36; flex: 1; font-weight: 600; }
.badge {
  position: absolute; top: 10px; right: 10px; font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 999px; color: #10131f;
}
.badge.easy { background: var(--easy); } .badge.medium { background: var(--medium); } .badge.hard { background: var(--hard); }
.soon {
  display: inline-block; margin-top: 2px; font-family: var(--font-display); font-weight: 600;
  font-size: .76rem; padding: 5px 15px; border-radius: 999px;
  background: var(--c, #8a93c8); color: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.18);
}
.soon.coming { background: #ded6c6; color: #6a6048; box-shadow: 0 3px 0 rgba(0,0,0,.10); }

/* Game page layout: left ad | game | right ad */
.game-layout { display: grid; grid-template-columns: 180px minmax(0,1fr) 180px; gap: 18px; align-items: start; }
.ad-rail { position: sticky; top: 70px; min-height: 600px; }
.ad-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2); border: 1px dashed #34407a; border-radius: var(--radius);
  color: #4a5390; font-size: .8rem; min-height: inherit;
}
.ad-banner { min-height: 90px; margin-bottom: 14px; }
@media (max-width: 1000px) { .game-layout { grid-template-columns: 1fr; } .ad-rail { display: none; } }
/* When no ads are configured, drop the side ad columns so the game uses full width (#layout) */
.game-layout.no-ads { grid-template-columns: 1fr; }

/* Game panel */
.game-panel { background: var(--card); border: 1px solid #2c3260; border-radius: var(--radius); padding: 18px; }
.game-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.game-head h1, .game-head h2 { font-size: 1.35rem; margin-right: auto; font-weight: 800; }
.crumb { font-size: .8rem; color: var(--muted); margin-bottom: 6px; display: block; }
.crumb a:hover { color: var(--accent); }

/* Difficulty selector */
.level-picker { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.level-picker .lbl { font-size: .85rem; color: var(--muted); }
.lvl {
  padding: 8px 18px; border-radius: 999px; background: var(--bg2);
  color: var(--muted); border: 1px solid #2c3260; font-weight: 600; font-size: .9rem;
}
.lvl[data-l="1"].active { background: var(--easy); color: #10131f; border-color: var(--easy); }
.lvl[data-l="2"].active { background: var(--medium); color: #10131f; border-color: var(--medium); }
.lvl[data-l="3"].active { background: var(--hard); color: #fff; border-color: var(--hard); }
.btn {
  padding: 9px 20px; border-radius: 999px; background: var(--accent2); color: #fff; font-weight: 700;
}
.btn:hover { filter: brightness(1.15); }
.btn.ghost { background: var(--bg2); border: 1px solid #2c3260; color: var(--text); }

/* Game stage */
#game-root { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 320px; }
.status { font-size: 1rem; font-weight: 600; min-height: 1.4em; text-align: center; }
.status.good { color: var(--good); } .status.bad { color: var(--bad); }
canvas.stage { background: #0b0e1a; border-radius: 10px; border: 1px solid #2c3260; max-width: 100%; touch-action: none; }
.score-row { display: flex; gap: 18px; font-size: .95rem; color: var(--muted); }
.score-row b { color: var(--text); }
.gstats { font-size: .82rem; color: var(--muted); text-align: center; margin: -2px 0 10px; min-height: 1em; font-weight: 700; }
.gstats b { color: var(--accent); }
.gstats:empty { display: none; }
.gplays { font-size: .7rem; color: var(--ink-soft); font-weight: 700; margin-top: 1px; }

/* Generic board grid (DOM games) */
.board { display: grid; gap: 6px; user-select: none; }
.cell {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg2); border: 1px solid #2c3260; border-radius: 8px;
  font-weight: 800; cursor: pointer; transition: background .1s;
}
.cell:hover { background: var(--card-h); }

/* Touch d-pad */
.dpad { display: none; grid-template-columns: repeat(3, 56px); gap: 6px; margin-top: 6px; }
.dpad button { height: 50px; border-radius: 10px; background: var(--bg2); color: var(--text); font-size: 1.2rem; border: 1px solid #2c3260; }
@media (pointer: coarse) { .dpad { display: grid; } }

/* Coming soon + related */
.coming { text-align: center; padding: 60px 20px; }
.coming .big { font-size: 3rem; }
.coming p { color: var(--muted); margin: 10px 0 20px; }
.related { margin-top: 26px; }
.related h2 { font-size: 1rem; color: var(--muted); margin-bottom: 10px; }

footer { text-align: center; color: #4a5390; font-size: .8rem; padding: 30px 10px; }
footer a { color: var(--muted); }
.foot-note { display:block; max-width:720px; margin:10px auto 0; font-size:.78rem; line-height:1.55; color: var(--muted); }
.foot-notice { margin-top:5px; font-size:.74rem; opacity:.82; }
.hidden { display: none !important; }

/* ── Shared playing-card system (war, whist, etc.) ── */
.pcard {
  position: relative; border-radius: 8px; box-sizing: border-box;
  background: linear-gradient(160deg,#fdfbf5,#ece6d6);
  color: #1a1d2e; border: 1px solid rgba(0,0,0,.18);
  box-shadow: 0 4px 12px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.7);
  font-weight: 800; user-select: none; overflow: hidden;
}
.pcard.red { color: #c0392b; }
.pcard .pc-i { position: absolute; line-height: 1; font-weight: 800; letter-spacing: -.5px; }
.pcard .pc-tl { top: 5%; left: 7%; text-align: left; }
.pcard .pc-br { bottom: 5%; right: 7%; transform: rotate(180deg); }
.pcard .pc-mid { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pcard.back {
  background:
    repeating-linear-gradient(45deg,#3a4790 0 7px,#2c3674 7px 14px),
    linear-gradient(160deg,#3a4790,#222a5e);
  border: 1px solid #4a57a0;
  box-shadow: 0 4px 12px rgba(0,0,0,.45), inset 0 0 0 4px rgba(255,255,255,.08), inset 0 0 0 5px #1a2050;
}
@keyframes pc-deal { from { opacity: 0; transform: translateY(-14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes pc-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
@keyframes ph-flash { 0%,100% { box-shadow: 0 0 0 0 rgba(255,181,71,0); } 50% { box-shadow: 0 0 26px 4px rgba(255,181,71,.55); } }
@keyframes ph-float { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-38px); } }
.ph-win-flash { animation: ph-flash 1.1s ease 2; }

/* ── How to Play / SEO content block ── */
.howto {
  margin: 22px 0 4px; border: 1px solid #2c3260; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--bg2), var(--card));
  overflow: hidden;
}
.howto details { width: 100%; }
.howto summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; font-weight: 800; font-size: 1.02rem; color: var(--text);
}
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before {
  content: "▸"; color: var(--accent); font-size: 1.1rem; transition: transform .2s;
}
.howto details[open] summary::before { transform: rotate(90deg); }
.howto summary .ht-ic { font-size: 1.2rem; }
.howto-body { padding: 0 18px 18px; color: var(--muted); line-height: 1.6; font-size: .92rem; }
.howto-body p { margin: 0 0 12px; }
.howto-body h3 {
  color: var(--accent); font-size: .82rem; text-transform: uppercase; letter-spacing: 1px;
  margin: 16px 0 6px; border-left: 3px solid var(--accent2); padding-left: 8px;
}
.howto-body b, .howto-body strong { color: var(--text); }
.howto-body kbd {
  display: inline-block; background: var(--card-h); border: 1px solid #3a4280;
  border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; font-size: .85em;
  font-weight: 700; color: var(--text); margin: 0 1px;
}


/* ── Accessibility: visible keyboard focus for cards, chips and buttons (#55) ── */
.gcard:focus-visible, .chip:focus-visible, .btn:focus-visible,
.lvl:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--brand1);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Keep action-button labels (e.g. Blackjack "Hit") from being clipped (#16) */
.btn, .lvl { white-space: nowrap; min-width: max-content; }

/* Screen-reader-only: keeps a crawlable <h1> in the markup without altering the visual design */
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
