:root {
  --paper: #f4efe5;
  --paper-2: #fffaf1;
  --ink: #18222f;
  --muted: #6f766f;
  --line: #d8d0c2;
  --red: #f05b43;
  --yellow: #f6c85f;
  --blue: #3e7cb1;
  --green: #73a580;
  --purple: #8064a2;
  --shadow: 0 16px 35px rgba(55, 43, 26, .11);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; min-width: 320px; background: var(--paper); overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: #e9e1d4; }
body::-webkit-scrollbar-thumb { background: #aaa18f; border: 2px solid #e9e1d4; border-radius: 999px; }

.app-shell { min-height: 100vh; }
.screen { display: none; min-height: 100vh; }
.screen.is-active { display: block; animation: screenIn .35s ease both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.topbar, .game-header {
  height: 78px;
  border-bottom: 1px solid rgba(24,34,47,.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 64px);
}

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: .08em; font-size: 14px; }
.brand.compact { margin-right: auto; }
.brand-mark { width: 34px; height: 34px; display: grid; grid-template-columns: repeat(2,1fr); grid-template-rows: repeat(2,1fr); gap: 3px; transform: rotate(-4deg); }
.brand-mark span { display: block; border-radius: 4px; }
.brand-mark span:nth-child(1) { background: var(--red); }
.brand-mark span:nth-child(2) { background: var(--yellow); }
.brand-mark span:nth-child(3) { background: var(--blue); }
.brand-mark span:nth-child(4) { background: var(--green); }
.tiny-badge { font-size: 11px; letter-spacing: .14em; font-weight: 800; border: 1px solid var(--ink); border-radius: 999px; padding: 7px 11px 6px; }

.setup-grid { max-width: 1380px; margin: 0 auto; min-height: calc(100vh - 78px); padding: clamp(36px, 6vw, 78px) clamp(20px, 5vw, 72px) 54px; display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(390px, .77fr); gap: clamp(44px, 8vw, 120px); align-items: center; }
.hero-copy { align-self: center; }
.eyebrow { margin: 0 0 16px; font-size: 12px; letter-spacing: .17em; font-weight: 900; color: #7e7567; }
h1 { margin: 0; font-size: clamp(64px, 8vw, 122px); line-height: .83; letter-spacing: -.075em; max-width: 780px; font-weight: 950; }
.hero-sub { max-width: 600px; margin: 28px 0 0; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.6; color: #5f655f; }

.hero-demo { height: 235px; position: relative; margin: 26px 0 8px; max-width: 560px; }
.demo-card { position: absolute; width: 150px; aspect-ratio: 1; border-radius: 23px; display: grid; place-items: center; font-size: 68px; font-weight: 950; box-shadow: var(--shadow); border: 4px solid #fff9ef; transition: transform .3s ease; }
.demo-card-a { left: 3%; top: 36px; background: #f6c85f; transform: rotate(-9deg); animation: floatA 4.5s ease-in-out infinite; }
.demo-card-b { left: 30%; top: 6px; background: #f6c85f; transform: rotate(7deg); animation: floatB 5s ease-in-out infinite; }
.demo-card-c, .demo-card-d { background: var(--ink); color: #fff5de; overflow: hidden; }
.demo-card-c::before, .demo-card-d::before { content:""; position:absolute; inset:0; background-image: radial-gradient(circle, rgba(255,255,255,.18) 1.5px, transparent 1.5px); background-size: 17px 17px; }
.demo-card-c span, .demo-card-d span { position: relative; z-index: 1; font-size: 60px; }
.demo-card-c { left: 56%; top: 54px; transform: rotate(-4deg); animation: floatC 5.3s ease-in-out infinite; }
.demo-card-d { left: 76%; top: 20px; transform: rotate(8deg); animation: floatD 4.9s ease-in-out infinite; }
.demo-icon { font-size: 76px; line-height: 1; }
@keyframes floatA { 50% { transform: translateY(-8px) rotate(-7deg); } }
@keyframes floatB { 50% { transform: translateY(7px) rotate(5deg); } }
@keyframes floatC { 50% { transform: translateY(-9px) rotate(-2deg); } }
@keyframes floatD { 50% { transform: translateY(6px) rotate(10deg); } }

.rule-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: 680px; }
.rule-strip div { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 17px 18px 17px 0; align-items: start; }
.rule-strip div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.rule-strip b { font-size: 11px; color: var(--red); letter-spacing: .08em; }
.rule-strip span { font-size: 13px; line-height: 1.4; color: #65695f; font-weight: 700; }

.setup-card { background: var(--paper-2); border: 1px solid rgba(71,61,46,.14); border-radius: 30px; padding: clamp(22px, 3.4vw, 38px); box-shadow: 0 20px 60px rgba(70, 55, 33, .12); }
.setup-section + .setup-section { margin-top: 29px; }
.section-heading { margin-bottom: 12px; }
.section-heading label { display: block; font-size: 13px; font-weight: 900; letter-spacing: .025em; }
.section-heading > span { font-size: 12px; color: #7c7d76; }
.inline-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.segmented { display: grid; gap: 10px; }
.segmented.two { grid-template-columns: 1fr 1fr; }
.segment { border: 1px solid var(--line); border-radius: 17px; background: #fff; min-height: 75px; padding: 14px 15px; display: flex; gap: 12px; align-items: center; text-align: left; cursor: pointer; transition: .2s ease; }
.segment:hover { transform: translateY(-2px); border-color: #a99d8c; }
.segment.is-selected { border: 2px solid var(--ink); background: #f4efe5; padding: 13px 14px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.8); }
.segment-icon { width: 38px; height: 38px; display: grid; place-items: center; background: #eee8dc; border-radius: 11px; font-weight: 900; font-size: 18px; }
.segment b, .segment small { display:block; }
.segment b { font-size: 13px; }
.segment small { margin-top: 3px; font-size: 11px; color: #777970; }

.count-picker { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.count-picker button { width: 36px; height: 30px; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 12px; font-weight: 850; }
.count-picker button:last-child { border-right:0; }
.count-picker button.is-selected { background: var(--ink); color: #fff; }
.player-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.player-field { position: relative; }
.player-field input { width:100%; height: 47px; border: 1px solid var(--line); border-radius: 13px; background:#fff; padding: 0 12px 0 43px; outline:none; font-weight: 800; font-size: 13px; transition: .2s ease; }
.player-field input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(24,34,47,.08); }
.player-dot { position:absolute; left:12px; top:50%; transform:translateY(-50%); width:20px; height:20px; border-radius:7px; color:#fff; display:grid; place-items:center; font-size:10px; font-weight:950; }

.choice-grid.sizes { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.choice-grid button { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 8px; cursor:pointer; transition:.2s ease; }
.choice-grid button:hover { transform: translateY(-2px); }
.choice-grid button.is-selected { border: 2px solid var(--ink); padding: 11px 7px; background:#f4efe5; }
.choice-grid b, .choice-grid small { display:block; }
.choice-grid b { font-size: 12px; }
.choice-grid small { font-size: 10px; color:#858078; margin-top:2px; }
.theme-picker { display:grid; grid-template-columns: repeat(3,1fr); gap:8px; }
.theme-option { min-width:0; border:1px solid var(--line); background:#fff; border-radius:14px; padding:10px; cursor:pointer; text-align:left; transition:.2s ease; }
.theme-option:hover { transform: translateY(-2px); }
.theme-option.is-selected { border:2px solid var(--ink); padding:9px; background:#f4efe5; }
.theme-swatches { display:flex; height:27px; overflow:hidden; border-radius:8px; margin-bottom:8px; }
.theme-swatches i { flex:1; }
.theme-swatches i:nth-child(1) { background:#f05b43; }
.theme-swatches i:nth-child(2) { background:#f6c85f; }
.theme-swatches i:nth-child(3) { background:#3e7cb1; }
.theme-swatches.night i:nth-child(1) { background:#1a1532; }
.theme-swatches.night i:nth-child(2) { background:#ad62ff; }
.theme-swatches.night i:nth-child(3) { background:#34d7d1; }
.theme-swatches.nature i:nth-child(1) { background:#415f49; }
.theme-swatches.nature i:nth-child(2) { background:#90a955; }
.theme-swatches.nature i:nth-child(3) { background:#d7c59a; }
.theme-option b, .theme-option small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.theme-option b { font-size:11px; }
.theme-option small { font-size:9px; color:#7d7f77; margin-top:2px; }

.start-button { width:100%; border:0; background:var(--ink); color:#fff; border-radius:16px; min-height:58px; padding:0 20px; display:flex; align-items:center; justify-content:space-between; font-weight:900; cursor:pointer; margin-top:30px; box-shadow: 0 10px 22px rgba(24,34,47,.18); transition: transform .17s ease, box-shadow .17s ease; }
.start-button:hover { transform: translateY(-2px); box-shadow: 0 14px 26px rgba(24,34,47,.22); }
.start-button:active { transform: translateY(1px) scale(.99); }
.start-arrow { font-size:22px; transition:transform .2s ease; }
.start-button:hover .start-arrow { transform:translateX(4px); }
.setup-footnote { margin:11px 3px 0; text-align:center; font-size:10px; color:#8b877f; line-height:1.4; }

.game-screen { background: #ede7dc; }
.game-header { height: 72px; padding:0 24px; background:rgba(255,250,241,.96); position:sticky; top:0; z-index:20; }
.icon-button, .text-button { border:1px solid var(--line); background:#fff; height:38px; border-radius:12px; cursor:pointer; font-weight:850; }
.icon-button { width:38px; margin-right:14px; font-size:18px; }
.text-button { padding:0 15px; margin-left:14px; font-size:12px; }
.icon-button:hover, .text-button:hover { border-color:#9d9486; transform:translateY(-1px); }
.game-stats { display:flex; align-items:center; height:100%; }
.game-stats div { min-width:86px; padding:0 18px; border-left:1px solid var(--line); }
.game-stats div:last-child { border-right:1px solid var(--line); }
.game-stats span, .game-stats b { display:block; text-align:center; }
.game-stats span { text-transform:uppercase; letter-spacing:.12em; font-size:8px; color:#8a857c; font-weight:850; }
.game-stats b { font-size:13px; margin-top:2px; }

.game-content { min-height:calc(100vh - 72px); display:grid; grid-template-columns:290px minmax(0,1fr); }
.score-panel { border-right:1px solid var(--line); padding:32px 24px; background:#f8f3ea; }
.turn-label { font-size:9px; letter-spacing:.16em; font-weight:950; color:#8b857a; margin-bottom:8px; }
.turn-hero { display:flex; gap:12px; align-items:center; padding:13px; border-radius:16px; background:var(--ink); color:white; box-shadow:0 10px 22px rgba(24,34,47,.16); }
.turn-hero .avatar { width:42px; height:42px; border-radius:13px; display:grid; place-items:center; background:var(--red); font-weight:950; }
.turn-hero b, .turn-hero small { display:block; }
.turn-hero b { font-size:13px; }
.turn-hero small { font-size:10px; color:#d5d8dc; margin-top:3px; }
.score-list { margin-top:22px; display:grid; gap:8px; }
.score-row { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; min-height:48px; padding:8px 10px; border:1px solid var(--line); background:white; border-radius:13px; transition:.25s ease; }
.score-row.is-active { border-color:var(--ink); box-shadow:0 5px 16px rgba(24,34,47,.07); transform:translateX(3px); }
.mini-avatar { width:29px; height:29px; border-radius:9px; color:white; display:grid; place-items:center; font-size:10px; font-weight:950; }
.score-row b { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.score-value { text-align:right; }
.score-value strong, .score-value small { display:block; }
.score-value strong { font-size:15px; }
.score-value small { font-size:8px; color:#8e8b84; text-transform:uppercase; letter-spacing:.08em; }
.tip-card { margin-top:24px; border-top:1px solid var(--line); padding-top:20px; }
.tip-card b { font-size:11px; }
.tip-card p { font-size:11px; line-height:1.55; color:#77796f; margin:6px 0 0; }

.board-area { min-width:0; position:relative; display:grid; place-items:center; padding:clamp(22px,4vw,50px); overflow:hidden; }
.board-area::before { content:""; position:absolute; inset:0; pointer-events:none; background-image: radial-gradient(circle at 20% 10%, rgba(255,255,255,.5), transparent 30%), radial-gradient(circle at 80% 80%, rgba(255,255,255,.35), transparent 28%); }
.memory-board { --cols:5; --gap:14px; width:min(920px, 100%); display:grid; grid-template-columns:repeat(var(--cols), minmax(0,1fr)); gap:var(--gap); position:relative; z-index:1; perspective:1200px; }
.memory-card { aspect-ratio:1; min-width:0; padding:0; border:0; background:transparent; cursor:pointer; perspective:900px; border-radius:18px; outline:none; }
.memory-card:focus-visible { box-shadow:0 0 0 4px rgba(62,124,177,.25); }
.card-inner { position:relative; display:block; width:100%; height:100%; transform-style:preserve-3d; transition:transform .48s cubic-bezier(.2,.7,.2,1); }
.memory-card.is-flipped .card-inner, .memory-card.is-matched .card-inner { transform:rotateY(180deg); }
.card-face { position:absolute; inset:0; border-radius:18px; backface-visibility:hidden; -webkit-backface-visibility:hidden; overflow:hidden; }
.card-back { background:var(--ink); border:3px solid #fff8ec; box-shadow:0 8px 18px rgba(51,42,29,.18); display:grid; place-items:center; transform:translateZ(1px); transition:transform .18s ease, box-shadow .18s ease; }
.memory-card:not(.is-flipped):not(.is-matched):hover .card-back { transform:translateY(-4px) translateZ(1px); box-shadow:0 12px 23px rgba(51,42,29,.23); }
.card-back::before { content:""; position:absolute; inset:8px; border-radius:12px; border:1px solid rgba(255,255,255,.28); }
.card-back::after { content:""; position:absolute; inset:0; background-image:radial-gradient(circle, rgba(255,255,255,.16) 1.5px, transparent 1.5px); background-size:15px 15px; }
.back-mark { position:relative; z-index:2; width:34%; aspect-ratio:1; border:2px solid rgba(255,255,255,.9); border-radius:12px; display:grid; place-items:center; font-size:clamp(18px,2.6vw,34px); color:#fff; font-weight:950; transform:rotate(4deg); }
.card-front { transform:rotateY(180deg); background:var(--card-color,#f6c85f); border:3px solid #fff8ec; box-shadow:0 8px 18px rgba(51,42,29,.16); display:grid; place-items:center; }
.card-art { width:68%; height:68%; display:grid; place-items:center; }
.card-art svg { width:100%; height:100%; overflow:visible; filter:drop-shadow(0 5px 0 rgba(0,0,0,.07)); }
.memory-card.is-matched { cursor:default; }
.memory-card.is-matched .card-front { animation:matchPop .5s ease both; box-shadow:0 0 0 4px rgba(255,255,255,.9), 0 8px 22px rgba(51,42,29,.14); }
.memory-card.is-wrong .card-inner { animation:wrongShake .36s ease; }
@keyframes matchPop { 0%{transform:rotateY(180deg) scale(.92)} 55%{transform:rotateY(180deg) scale(1.09)} 100%{transform:rotateY(180deg) scale(1)} }
@keyframes wrongShake { 0%,100%{translate:0} 25%{translate:-5px} 75%{translate:5px} }

.turn-toast { position:absolute; top:16px; left:50%; transform:translate(-50%,-10px); background:var(--ink); color:#fff; border-radius:999px; padding:9px 14px; font-size:11px; font-weight:850; opacity:0; z-index:10; pointer-events:none; transition:.25s ease; box-shadow:0 7px 18px rgba(24,34,47,.2); }
.turn-toast.is-visible { opacity:1; transform:translate(-50%,0); }

body.theme-night .game-screen { background:#0f0d19; }
body.theme-night .game-header, body.theme-night .score-panel { background:#171322; border-color:#29213b; color:#f7f3ff; }
body.theme-night .brand-mark span:nth-child(1){background:#ff5db1}
body.theme-night .brand-mark span:nth-child(2){background:#ad62ff}
body.theme-night .brand-mark span:nth-child(3){background:#34d7d1}
body.theme-night .brand-mark span:nth-child(4){background:#ffe16b}
body.theme-night .game-stats div, body.theme-night .score-panel, body.theme-night .game-header { border-color:#332a43; }
body.theme-night .game-stats span, body.theme-night .turn-label, body.theme-night .score-value small, body.theme-night .tip-card p { color:#a89db8; }
body.theme-night .icon-button, body.theme-night .text-button, body.theme-night .score-row { background:#211a2c; color:#f7f3ff; border-color:#3a2f4d; }
body.theme-night .tip-card { border-color:#332a43; }
body.theme-night .card-back { background:#231936; border-color:#3e3156; }
body.theme-night .back-mark { color:#69fff7; border-color:#69fff7; }

body.theme-nature .game-screen { background:#dfe5d6; }
body.theme-nature .game-header, body.theme-nature .score-panel { background:#f4f0df; }
body.theme-nature .turn-hero, body.theme-nature .card-back { background:#30483a; }
body.theme-nature .turn-hero .avatar { background:#91a95c; }

.modal-layer, .confirm-layer { position:fixed; inset:0; display:grid; place-items:center; padding:20px; background:rgba(24,34,47,.54); opacity:0; visibility:hidden; transition:.25s ease; z-index:100; }
.modal-layer.is-open, .confirm-layer.is-open { opacity:1; visibility:visible; }
.modal-card { width:min(520px,100%); background:var(--paper-2); border-radius:28px; padding:34px; text-align:center; box-shadow:0 28px 80px rgba(0,0,0,.24); position:relative; overflow:hidden; transform:translateY(18px) scale(.98); transition:.3s cubic-bezier(.2,.8,.2,1); }
.modal-layer.is-open .modal-card { transform:none; }
.winner-medal { width:68px; height:68px; display:grid; place-items:center; margin:0 auto 14px; border-radius:22px; background:var(--yellow); font-size:34px; box-shadow:0 10px 20px rgba(91,69,18,.15); transform:rotate(-5deg); }
.modal-card h2 { margin:0; font-size:36px; letter-spacing:-.04em; }
.result-subtitle { color:#74776f; margin:7px 0 20px; }
.result-ranking { display:grid; gap:8px; margin:18px 0 10px; }
.rank-row { display:grid; grid-template-columns:28px 1fr auto; gap:10px; align-items:center; text-align:left; border:1px solid var(--line); background:#fff; border-radius:13px; padding:10px 12px; }
.rank-row b { font-size:12px; }
.rank-row strong { font-size:14px; }
.rank-num { width:28px; height:28px; display:grid; place-items:center; border-radius:9px; background:#efe8dc; font-size:10px; font-weight:950; }
.modal-actions { display:grid; grid-template-columns:1.25fr .75fr; gap:9px; margin-top:22px; }
.modal-actions .start-button { margin:0; min-height:52px; }
.secondary-button, .danger-button { border-radius:14px; min-height:52px; padding:0 16px; font-weight:850; cursor:pointer; background:#fff; border:1px solid var(--line); }
.danger-button { background:#9f3228; color:white; border-color:#9f3228; }
.secondary-button:hover { border-color:#918778; }
.confirm-card { width:min(420px,100%); background:var(--paper-2); border-radius:24px; padding:28px; box-shadow:0 22px 60px rgba(0,0,0,.2); }
.confirm-card h2 { margin:0; font-size:23px; }
.confirm-card p { color:#73766f; font-size:13px; line-height:1.5; }
.confirm-card > div { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:20px; }

.confetti { position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.confetti-piece { position:absolute; width:8px; height:15px; border-radius:2px; top:-20px; animation:confettiFall var(--dur) cubic-bezier(.12,.62,.33,1) forwards; animation-delay:var(--delay); transform:rotate(var(--rot)); }
@keyframes confettiFall { to { transform:translate(var(--drift), 560px) rotate(calc(var(--rot) + 560deg)); } }

@media (max-width: 1100px) {
  .setup-grid { grid-template-columns:1fr; max-width:760px; gap:40px; align-items:start; }
  .hero-copy { padding-top:10px; }
  h1 { font-size:clamp(64px,14vw,104px); }
  .hero-demo { max-width:620px; }
  .setup-card { width:100%; }
  .game-content { grid-template-columns:230px minmax(0,1fr); }
  .score-panel { padding:24px 17px; }
  .memory-board { --gap:10px; }
}

@media (max-width: 760px) {
  .setup-topbar { height:66px; padding:0 16px; }
  .setup-grid { padding:28px 16px 38px; min-height:calc(100vh - 66px); }
  h1 { font-size:clamp(56px,20vw,82px); }
  .hero-sub { margin-top:20px; font-size:15px; }
  .hero-demo { height:170px; margin-top:12px; }
  .demo-card { width:100px; border-radius:17px; font-size:44px; }
  .demo-card-a { left:0; }
  .demo-card-b { left:23%; }
  .demo-card-c { left:50%; }
  .demo-card-d { left:72%; }
  .rule-strip { grid-template-columns:1fr; }
  .rule-strip div + div { padding-left:0; border-left:0; border-top:1px solid var(--line); }
  .setup-card { border-radius:24px; padding:21px 17px; }
  .choice-grid.sizes { grid-template-columns:1fr 1fr; }
  .theme-picker { grid-template-columns:1fr; }
  .theme-option { display:grid; grid-template-columns:92px 1fr; align-items:center; gap:10px; }
  .theme-swatches { margin:0; }
  .player-inputs { grid-template-columns:1fr; }

  .game-header { height:66px; padding:0 12px; }
  .brand.compact span:last-child { display:none; }
  .game-stats div { min-width:58px; padding:0 8px; }
  .game-stats div:nth-child(2) { display:none; }
  .text-button { margin-left:8px; padding:0 10px; }
  .icon-button { margin-right:7px; }
  .game-content { display:block; min-height:calc(100vh - 66px); }
  .score-panel { border-right:0; border-bottom:1px solid var(--line); padding:12px; position:relative; z-index:5; }
  .turn-label, .tip-card { display:none; }
  .turn-hero { min-height:52px; padding:7px 10px; border-radius:13px; }
  .turn-hero .avatar { width:35px; height:35px; }
  .score-list { margin-top:9px; display:flex; overflow-x:auto; gap:7px; padding-bottom:2px; scrollbar-width:none; }
  .score-list::-webkit-scrollbar { display:none; }
  .score-row { min-width:145px; height:45px; flex:0 0 auto; }
  .board-area { padding:24px 12px 35px; min-height:calc(100vh - 190px); align-items:start; }
  .memory-board { gap:7px; width:100%; }
  .card-face { border-radius:12px; border-width:2px; }
  .card-back::before { inset:5px; border-radius:8px; }
  .back-mark { border-radius:8px; }
  .modal-card { padding:27px 18px 20px; border-radius:24px; }
  .modal-card h2 { font-size:30px; }
  .modal-actions { grid-template-columns:1fr; }
}

@media (max-width: 420px) {
  .tiny-badge { display:none; }
  .segmented.two { grid-template-columns:1fr; }
  .game-stats div:nth-child(1) { border-left:0; }
  .game-stats div:last-child { border-right:0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
