:root {
  color-scheme: dark;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #f6f4ff;
  background: #0b0c1c;
  font-synthesis: none;
  --arcade-bg: #0b0c1c;
  --arcade-panel: #13152a;
  --arcade-card: #181a31;
  --arcade-line: #292c48;
  --arcade-muted: #a1a3bb;
  --arcade-faint: #72758e;
  --arcade-pink: #ff6684;
  --arcade-gold: #ffc85e;
  --arcade-lime: #b9ed75;
  --arcade-blue: #74c9ff;
  --arcade-violet: #be9bff;
  --arcade-ink: #0b0c1c;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: radial-gradient(ellipse at 50% -18%, #262347 0, var(--arcade-bg) 54%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--arcade-gold); outline-offset: 3px; }
[hidden] { display: none !important; }
.site-header { border-bottom: 1px solid #ffffff12; }
.site-brand { color: #e7e5f5 !important; }
.arcade-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 60px; }
.arcade-view { animation: arcade-in .28s ease both; }
@keyframes arcade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.arcade-hero { text-align: center; padding: 52px 12px 34px; }
.arcade-brand { display: inline-flex; align-items: center; gap: 10px; color: #b8b3d4; font: 500 10px ui-monospace, Consolas, monospace; letter-spacing: .2em; }
.arcade-mark { color: var(--arcade-gold); font-size: 20px; line-height: 1; }
.arcade-hero h1 { margin: 14px 0 12px; color: #fff; font-size: clamp(48px, 8vw, 80px); line-height: .98; letter-spacing: -.075em; font-weight: 800; }
.arcade-hero h1 span { color: var(--arcade-gold); }
.arcade-lede { max-width: 560px; margin: 0 auto; color: #b5b5ca; font-size: clamp(14px, 2vw, 17px); line-height: 1.65; }
.arcade-proof { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 23px; color: #9395ad; font: 11px ui-monospace, Consolas, monospace; }
.arcade-proof span:first-child { color: var(--arcade-lime); }
.game-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.game-card { --game-accent: var(--arcade-pink); position: relative; grid-column: span 2; display: flex; min-width: 0; min-height: 310px; overflow: hidden; flex-direction: column; border: 1px solid #ffffff0d; border-radius: 17px; background: linear-gradient(160deg, color-mix(in srgb, var(--game-accent) 10%, #181a31), #141629 68%); box-shadow: 0 10px 32px #0002; transition: border-color .2s, transform .2s, box-shadow .2s; }
.game-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--game-accent) 45%, #292c48); box-shadow: 0 18px 45px #0004; }
.game-card:nth-child(7) { grid-column: 3 / span 2; }
.game-card-coral { --game-accent: var(--arcade-pink); }
.game-card-gold { --game-accent: var(--arcade-gold); }
.game-card-lime { --game-accent: var(--arcade-lime); }
.game-card-blue { --game-accent: var(--arcade-blue); }
.game-card-violet { --game-accent: var(--arcade-violet); }
.game-card-traitor { --game-accent: #ff8e72; }
.game-card-unknower { --game-accent: #79e1d3; }
.game-art { height: 106px; display: flex; flex: none; align-items: center; justify-content: center; gap: 4px; padding: 16px; color: var(--game-accent); background: radial-gradient(ellipse at center, color-mix(in srgb, var(--game-accent) 10%, transparent), transparent 75%); }
.tic-symbol { display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid color-mix(in srgb, var(--game-accent) 38%, transparent); border-radius: 9px; font-size: 21px; font-weight: 800; }
.tic-symbol:nth-child(2n) { color: #eae8fa; }
.connect-art { display: grid; width: max-content; margin: 12px auto; padding: 12px; grid-template-columns: repeat(7, 19px); grid-template-rows: repeat(2, 19px); gap: 5px; height: 83px; border-radius: 12px; background: #262a56; transform: rotate(-3deg); }
.connect-art span { border-radius: 50%; background: #0c0e24; box-shadow: inset 0 2px 3px #0005; }
.connect-art span:nth-child(4n+1), .connect-art span:nth-child(7) { background: var(--arcade-gold); }
.connect-art span:nth-child(3), .connect-art span:nth-child(6) { background: var(--arcade-pink); }
.memory-art span { display: grid; width: 45px; height: 58px; place-items: center; border: 1px solid #ffffff24; border-radius: 7px; background: #21243a; color: var(--game-accent); font-size: 20px; transform: rotate(-7deg); }
.memory-art span:nth-child(even) { transform: rotate(7deg) translateY(-5px); background: #242746; }
.memory-art span:nth-child(2n) { color: #eeeafa; }
.fleet-art span { width: 26px; display: grid; place-items: center; color: var(--arcade-blue); font-size: 26px; }
.fleet-art span:nth-child(3n) { color: #eeeafa; }
.race-art { position: relative; width: 172px; height: 92px; margin: 7px auto; padding: 9px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; border: 1px solid #454060; border-radius: 8px; transform: rotate(-7deg); }
.race-art span { border-radius: 3px; background: #26283d; }
.race-art span:nth-child(5n+1) { background: #2c2b49; }
.race-art i, .race-art b { position: absolute; width: 15px; height: 15px; border-radius: 50%; }
.race-art i { left: 17px; bottom: 16px; background: var(--arcade-violet); }
.race-art b { right: 25px; top: 13px; background: var(--arcade-gold); }
.traitor-art span, .unknower-art span { display: grid; width: 44px; height: 54px; place-items: center; border: 1px solid color-mix(in srgb, var(--game-accent) 45%, transparent); border-radius: 9px; background: #22243d; color: var(--game-accent); font-size: 24px; font-weight: 850; transform: rotate(-8deg); }
.traitor-art span:nth-child(2), .unknower-art span:nth-child(2) { transform: translateY(-5px); background: color-mix(in srgb, var(--game-accent) 14%, #22243d); }
.traitor-art span:last-child, .unknower-art span:last-child { transform: rotate(8deg); }
.unknower-art span { width: auto; min-width: 46px; padding: 0 7px; font-size: 9px; letter-spacing: .08em; }
.card-copy { display: flex; flex: 1; flex-direction: column; padding: 0 19px 19px; }
.card-kicker { margin: 0 0 8px; color: var(--game-accent, #a7a3c1); font: 500 9px ui-monospace, Consolas, monospace; letter-spacing: .16em; }
.game-card h2 { margin: 0; color: #f6f4ff; font-size: 17px; line-height: 1.3; letter-spacing: -.025em; }
.game-card p:not(.card-kicker) { margin: 8px 0 17px; color: #a1a3bb; font-size: 12px; line-height: 1.6; }
.play-button { display: flex; width: 100%; margin-top: auto; justify-content: space-between; align-items: center; border: 1px solid color-mix(in srgb, var(--game-accent) 43%, transparent); border-radius: 9px; padding: 10px 12px; background: color-mix(in srgb, var(--game-accent) 12%, transparent); color: var(--game-accent); font-size: 12px; font-weight: 750; transition: background .15s; }
.play-button:hover { background: color-mix(in srgb, var(--game-accent) 22%, transparent); }
.privacy-note { margin: 27px 0 0; text-align: center; color: #7e819c; font: 10px ui-monospace, Consolas, monospace; letter-spacing: .04em; }

.setup-view { max-width: 760px; margin: auto; }
.back-button, .rules-button { border: 1px solid #343650; border-radius: 8px; padding: 8px 11px; background: #17192d; color: #cfcee0; font-size: 12px; }
.back-button:hover, .rules-button:hover { border-color: #6f7191; color: white; }
.setup-heading { padding: 33px 0 20px; }
.setup-heading .card-kicker { color: var(--arcade-gold); }
.setup-heading h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.055em; }
.setup-heading p:last-child { margin: 8px 0 0; color: var(--arcade-muted); font-size: 13px; }
.setup-card { padding: clamp(18px, 4vw, 34px); border: 1px solid #ffffff12; border-radius: 16px; background: linear-gradient(145deg, #17192e, #111325); }
.setup-card fieldset { min-width: 0; margin: 0 0 25px; padding: 0; border: 0; }
.setup-card legend { margin-bottom: 11px; color: #e9e7f7; font-size: 13px; font-weight: 750; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice-card { display: flex; align-items: center; gap: 11px; min-height: 74px; padding: 13px; border: 1px solid #343650; border-radius: 10px; background: #111325; cursor: pointer; }
.choice-card:has(input:checked) { border-color: #a48df7; background: #211f3b; }
.choice-card input, .toggle-choice input { accent-color: var(--arcade-violet); }
.choice-card span:nth-child(2), .toggle-choice span { display: grid; gap: 4px; flex: 1; }
.choice-card b, .toggle-choice b { font-size: 12px; }
.choice-card small, .toggle-choice small { color: #a1a3bb; font-size: 10px; }
.choice-icon { color: var(--arcade-violet); font-size: 19px; }
.segmented { display: flex; gap: 7px; }
.segmented label { flex: 1; min-width: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: flex; min-height: 40px; justify-content: center; align-items: center; gap: 2px; flex-direction: column; border: 1px solid #343650; border-radius: 8px; background: #111325; color: #d8d7e8; font-size: 12px; font-weight: 700; }
.segmented input:checked + span { border-color: #8978e5; background: #211f3b; color: #e5ddff; }
.segmented input:focus-visible + span { outline: 3px solid var(--arcade-gold); outline-offset: 3px; }
.segmented small { color: #9294ac; font-size: 9px; font-weight: 500; }
.setup-card select, .custom-count input { border: 1px solid #343650; border-radius: 8px; padding: 10px 12px; background: #111325; color: #eeeefa; }
.setup-card select { width: 100%; }
.toggle-choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px; border: 1px solid #343650; border-radius: 9px; background: #111325; }
.wall-presets { flex-wrap: wrap; }
.wall-presets label { flex: 1 0 12%; }
.custom-count { display: flex; align-items: center; gap: 12px; margin-top: 12px; color: #a1a3bb; font-size: 11px; }
.custom-count input { width: 110px; margin-left: auto; }
.start-button { display: flex; width: 100%; justify-content: space-between; margin-top: 5px; padding: 14px 17px; border: 0; border-radius: 9px; background: var(--arcade-gold); color: #1c1730; font-size: 14px; font-weight: 850; }
.start-button:hover { filter: brightness(1.07); }
.setup-error { color: #ff8b9c; font-size: 12px; }
.play-view { min-height: calc(100svh - 150px); }
.play-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 6px 0 19px; }
.play-title { display: flex; align-items: center; gap: 8px; color: #d9d7e9; font-size: 12px; font-weight: 750; text-align: center; }
.play-title .arcade-mark { font-size: 15px; }
.rules-button { justify-self: end; }
.active-game { min-height: 420px; }
.game-load-error { padding: 25px; color: #ff8b9c; }
.rules-dialog { width: min(500px, calc(100% - 28px)); max-height: min(80svh, 600px); overflow-y: auto; border: 1px solid #393b5a; border-radius: 16px; padding: 24px; background: #17192e; color: #f6f4ff; box-shadow: 0 25px 90px #0009; }
.rules-dialog::backdrop { background: #050611bd; backdrop-filter: blur(5px); }
.dialog-top { display: flex; justify-content: space-between; align-items: center; }
.dialog-top .card-kicker { color: var(--arcade-gold); }
.close-button { width: 34px; height: 34px; border: 1px solid #393b5a; border-radius: 50%; background: #111325; color: #d7d5e7; font-size: 20px; }
.rules-dialog h2 { margin: 11px 0; font-size: 23px; }
.rules-dialog #rules-copy { color: #b8b8cd; font-size: 13px; line-height: 1.75; }

/* Shared game controls and board surfaces. */
.arcade-game { max-width: 1000px; margin: 0 auto; padding: 20px; border: 1px solid #ffffff12; border-radius: 16px; background: linear-gradient(145deg, #17192e, #101224); }
.arcade-game button { border-radius: 8px; }
.arcade-game .game-status, .arcade-game [role="status"] { color: #c9c8da; }
.arcade-game button:not(:disabled) { transition: filter .15s, transform .15s, border-color .15s; }
.arcade-game button:hover:not(:disabled) { filter: brightness(1.14); }
.arcade-game button:disabled { cursor: not-allowed; opacity: .55; }
.arcade-game .game-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.arcade-game .game-actions button, .arcade-game .game-control { border: 1px solid #3a3c58; padding: 9px 12px; background: #20223a; color: #e7e5f5; font-size: 12px; font-weight: 700; }
.arcade-game .board-grid, .arcade-game .board { display: grid; gap: 5px; margin: 18px auto; }
.arcade-game .board-cell, .arcade-game .cell { min-width: 0; border: 1px solid #444660; background: #24263f; color: #fff; }
.arcade-game [aria-live] { min-height: 1.4em; }
.game-winner { color: var(--arcade-lime) !important; font-weight: 800; }
.game-error { color: #ff8b9c !important; }

.arcade-memory, .arcade-battleships { max-width: 900px; margin: 0 auto; padding: clamp(14px, 3vw, 25px); border: 1px solid #ffffff14; border-radius: 16px; background: linear-gradient(145deg, #17192e, #101224); color: #f6f4ff; }
.arcade-memory__title, .arcade-battleships__title { margin: 0 0 9px; text-align: center; font-size: clamp(20px, 4vw, 28px); letter-spacing: -.04em; }
.arcade-memory__status, .arcade-battleships__status { min-height: 23px; margin: 0 0 12px; color: #b9b7ce; text-align: center; font-size: 12px; }
.arcade-memory__body, .arcade-battleships__body { color: #d7d6e8; }
.arcade-memory__turn, .arcade-memory__score, .arcade-memory__peeks, .arcade-battleships__turn { text-align: center; font-size: 13px; }
.arcade-memory__turn strong, .arcade-battleships__turn strong { color: var(--arcade-gold); }
.arcade-memory__score { color: #c3c4d6; }
.arcade-memory__board { width: min(100%, 590px); margin: 17px auto; container-type: inline-size; }
.arcade-memory__card { display: grid; min-width: 0; padding: 0; aspect-ratio: .84; place-items: center; border: 1px solid #474968; border-radius: 9px; background: linear-gradient(145deg, #282a49, #20223a); color: #b7a8ff; font: 800 clamp(1.75rem, calc(70cqi / var(--memory-cols)), 4.5rem)/1 "Segoe UI Symbol", sans-serif; box-shadow: 0 3px 8px #0003; transition: transform .16s, background .16s, border-color .16s; }
.arcade-memory__card:not(:disabled):hover { transform: translateY(-2px); border-color: #9b89f2; }
.arcade-memory__card--up, .arcade-memory__card--peek { border-color: #ddc36f; background: #f5e9c4; color: #202036; }
.arcade-memory__card--matched { border-color: #9ac978; background: #384b38; color: #d6f4b5; }
.arcade-memory__card:disabled { opacity: 1; }
.arcade-memory__controls, .arcade-memory__end, .arcade-battleships__controls, .arcade-battleships__fleet { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 12px 0; text-align: center; }
.arcade-memory__btn, .arcade-battleships__btn { border: 1px solid #484a69; border-radius: 8px; padding: 9px 12px; background: #242641; color: #eeeefa; font-size: 11px; font-weight: 750; }
.arcade-memory__btn:hover, .arcade-battleships__btn:hover { border-color: #9d8af3; background: #302d51; }
.arcade-memory__legal, .arcade-battleships__legal { margin: 17px 0 0; color: #898ba5; text-align: center; font-size: 10px; line-height: 1.6; }
.arcade-memory__cover, .arcade-battleships__cover { display: grid; min-height: 290px; place-content: center; justify-items: center; gap: 10px; border: 1px solid #45476a; border-radius: 12px; padding: 25px; background: radial-gradient(circle at 50% 20%, #302b56, #15172b 70%); text-align: center; }
.arcade-memory__cover h3, .arcade-battleships__cover h3 { margin: 0; color: var(--arcade-gold); font-size: clamp(20px, 4vw, 28px); }
.arcade-memory__cover p, .arcade-battleships__cover p { max-width: 420px; margin: 0 0 9px; color: #c3c1d7; font-size: 13px; line-height: 1.6; }
.arcade-battleships__body > p { font-size: 12px; line-height: 1.6; }
.arcade-battleships__body > p:first-child { text-align: center; }
.arcade-battleships__body > p:nth-child(2) { text-align: center; color: #bfc0d2; }
.arcade-battleships__body h3 { margin: 14px auto 5px; width: min(100%, 520px); color: #c7c5da; font-size: 12px; }
.arcade-battleships__grid { width: min(100%, 520px); margin: 7px auto 17px; }
.arcade-battleships__boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.arcade-battleships__panel { min-width: 0; }
.arcade-battleships__boards h3 { margin-top: 8px; }
.arcade-battleships__body > .arcade-battleships__sonar-result { padding: 12px; border: 2px solid var(--arcade-gold); border-radius: 9px; background: #302d29; color: #fff3cc; font-size: 14px; font-weight: 750; line-height: 1.65; }
.arcade-battleships__sunk-ship { position: relative; z-index: 1; pointer-events: none; margin: 2px; background: #a4a9b0; clip-path: polygon(0 10%, 85% 10%, 100% 50%, 85% 90%, 0 90%); }
.arcade-battleships__sunk-ship::after { content: ""; position: absolute; inset: 30% 28%; border: 2px solid #424852; background: #686e78; }
.arcade-battleships__sunk-ship--vertical { clip-path: polygon(50% 0, 90% 15%, 90% 100%, 10% 100%, 10% 15%); }
.arcade-battleships__sunk-ship--vertical::after { inset: 28% 30%; }
@media (max-width: 600px) {
  .arcade-battleships__boards { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
.arcade-battleships__cell { display: grid; min-width: 0; aspect-ratio: 1; place-items: center; border: 1px solid #3d4665; border-radius: 3px; padding: 0; background: #1d4266; color: #eff5ff; font-size: clamp(9px, 2.8vw, 24px); font-weight: 800; }
.arcade-battleships__cell--ship { border-color: #b7c6d8; background: #a9b8ca; color: #263346; }
.arcade-battleships__cell--hit { border-color: #ff927d; background: #9d3c40; color: #fff; }
.arcade-battleships__cell--miss { border-color: #a4cfe7; background: #d1e7f2; color: #476780; }
.arcade-battleships__cell--sunk { border-color: #69737f; background: #243849; }
.arcade-battleships__cell--scan { outline: 2px solid var(--arcade-gold); outline-offset: -2px; }
.arcade-battleships__cell:not(:disabled):hover { border-color: var(--arcade-gold); filter: brightness(1.2); }
.arcade-battleships__cell:disabled { opacity: 1; }
.arcade-battleships__fleet { align-items: center; }
.arcade-battleships__btn.is-selected { border-color: var(--arcade-gold); background: #47402b; }

.arcade-ttt, .arcade-connect4 { max-width: 740px; margin: 0 auto; padding: clamp(14px, 3vw, 25px); border: 1px solid #ffffff14; border-radius: 16px; background: linear-gradient(145deg, #17192e, #101224); color: #f6f4ff; }
.arcade-ttt h2, .arcade-connect4 h2 { margin: 0 0 10px; text-align: center; font-size: clamp(20px, 4vw, 28px); letter-spacing: -.04em; }
.arcade-ttt p, .arcade-connect4 p { color: #aeb0c7; text-align: center; font-size: 12px; line-height: 1.65; }
.arcade-ttt [data-score], .arcade-connect4 [data-score], .arcade-connect4 [data-inventory] { color: #d7d6e8; font-size: 12px; }
.arcade-ttt [data-status], .arcade-connect4 [data-status] { min-height: 22px; color: var(--arcade-gold); font-weight: 750; }
.arcade-ttt [data-board] { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; width: min(100%, 24rem); margin: 18px auto; container-type: inline-size; }
.arcade-winning-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; }
.arcade-ttt [data-board] button { min-width: 0; padding: 0; aspect-ratio: 1; border: 1px solid #464866; border-radius: 10px; background: #242641; color: #f5f2ff; font-size: clamp(3rem, 23cqi, 6rem); line-height: 1; font-weight: 800; }
.arcade-ttt [data-board] button:not(:disabled):hover { border-color: var(--arcade-pink); background: #34304b; }
.arcade-ttt [data-board] button[aria-label*="select to remove opponent"] { border-color: var(--arcade-gold); box-shadow: inset 0 0 0 2px var(--arcade-gold); }
.arcade-ttt [data-board] button:disabled { opacity: 1; }
.arcade-ttt [data-board] button[aria-label*="blocked"] { border-style: dashed; color: var(--arcade-gold); }
.arcade-connect4__blast-help { position: relative; display: flex; justify-content: center; margin: -4px 0 12px; }
.arcade-connect4__info { display: grid; width: 38px; height: 38px; place-items: center; border: 2px solid var(--arcade-gold); border-radius: 50%; background: #302d29; color: #fff3cc; font-size: 22px; font-weight: 850; line-height: 1; }
.arcade-connect4__info:hover { background: #534629; }
.arcade-connect4__help-panel { position: absolute; z-index: 5; top: calc(100% + 8px); left: 50%; width: min(590px, calc(100vw - 48px)); max-height: min(68svh, 520px); overflow: auto; transform: translateX(-50%); border: 1px solid #6b634b; border-radius: 12px; padding: 16px; background: #17192e; color: #f6f4ff; text-align: left; box-shadow: 0 18px 50px #000b; }
.arcade-connect4__help-panel > strong { color: var(--arcade-gold); font-size: 15px; }
.arcade-connect4__help-panel > p { margin: 7px 0 12px; color: #d3d1e0; text-align: left; }
.arcade-connect4__examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.arcade-connect4__examples figure { display: grid; align-content: start; justify-items: center; gap: 7px; margin: 0; border: 1px solid #343650; border-radius: 9px; padding: 9px; background: #111325; }
.arcade-connect4__examples svg { display: block; width: min(100%, 150px); height: auto; }
.arcade-connect4__examples figure:nth-child(2) svg { width: min(100%, 210px); }
.arcade-connect4__examples figcaption { color: #c9c8da; font-size: 10px; line-height: 1.5; text-align: center; }
.arcade-connect4 [data-columns] button, .arcade-connect4 [data-action] { border: 1px solid #595b78; border-radius: 7px; padding: 8px; background: #262844; color: #e8e5f6; font-size: 11px; }
.arcade-connect4 [data-action="explosive"][aria-pressed="true"] { border-color: var(--arcade-pink); background: #532b45; color: #ffdce5; }
.arcade-connect4 .arcade-connect4__blast-help .arcade-connect4__info { border: 2px solid var(--arcade-gold); border-radius: 50%; padding: 0; background: #302d29; color: #fff3cc; font-size: 22px; }
.arcade-connect4__grid { --c4-border: 5px; --c4-padding: 9px; --c4-gap: 0.2rem; width: min(100%, 36rem); margin: 12px auto; }
.arcade-connect4 [data-columns] { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--c4-gap); padding-inline: calc(var(--c4-border) + var(--c4-padding)); margin-bottom: 7px; }
.arcade-connect4 [data-board] { position: relative; display: grid; gap: var(--c4-gap); padding: var(--c4-padding); border: var(--c4-border) solid #383e78; border-bottom: 12px solid #707bbd; border-radius: 12px 12px 6px 6px; background: #252b61; box-shadow: 0 8px 24px #0003; }
.arcade-connect4 [role="row"] { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--c4-gap); }
.arcade-connect4 [role="cell"] { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; border: 3px solid #1b2049; border-radius: 50%; background: #11142c; font-size: clamp(1.25rem, 5vw, 2.5rem); line-height: 1; color: #281c35; box-shadow: inset 0 2px 4px #0005; }
.arcade-connect4 [role="cell"][data-player="1"] { background: var(--arcade-pink); }
.arcade-connect4 [role="cell"][data-player="2"] { background: var(--arcade-gold); box-shadow: inset 0 0 0 3px #ad792b; }
.arcade-connect4 .arcade-connect4__base { margin: 0; padding: 7px; border-radius: 0 0 10px 10px; background: #383e78; color: #fff; font-weight: 750; }
.arcade-connect4 [data-feedback] { min-height: 22px; color: var(--arcade-lime); }
.arcade-ttt > div:last-child, .arcade-connect4 > div:last-child { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.arcade-ttt > div:last-child button, .arcade-connect4 > div:last-child button { border: 1px solid #444663; border-radius: 8px; padding: 8px 11px; background: #20223b; color: #e6e4f3; font-size: 11px; }
.arcade-ttt > div:last-child button:hover, .arcade-connect4 > div:last-child button:hover { border-color: #8a80bf; }

@media (max-width: 760px) {
  .arcade-shell { width: min(100% - 28px, 600px); padding-top: 12px; }
  .arcade-hero { padding-top: 38px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .game-card, .game-card:nth-child(7) { grid-column: auto; min-height: 300px; }
  .game-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .arcade-shell { width: calc(100% - 20px); }
  .arcade-hero { padding: 31px 6px 25px; }
  .arcade-proof { gap: 8px 12px; font-size: 9px; }
  .game-grid { gap: 9px; }
  .game-card, .game-card:nth-child(7) { min-height: 290px; border-radius: 13px; }
  .game-art { height: 90px; gap: 3px; }
  .tic-symbol { width: 32px; height: 36px; font-size: 17px; }
  .connect-art { grid-template-columns: repeat(7, 16px); grid-template-rows: repeat(2, 16px); gap: 4px; }
  .memory-art span { width: 35px; height: 48px; }
  .card-copy { padding: 0 12px 13px; }
  .game-card h2 { font-size: 14px; }
  .game-card p:not(.card-kicker) { font-size: 10px; }
  .play-button { padding: 8px; font-size: 10px; }
  .choice-row { grid-template-columns: 1fr; }
  .setup-card { padding: 16px; }
  .play-toolbar { grid-template-columns: 1fr 1fr; }
  .play-title { grid-row: 2; grid-column: 1 / -1; justify-content: center; }
  .active-game { min-height: 340px; }
  .arcade-game { padding: 12px; border-radius: 12px; }
}

.social-game { max-width: 760px; min-height: 420px; margin: 0 auto; padding: clamp(16px, 4vw, 30px); color: #f6f4ff; }
.social-game h2 { margin: 7px 0 13px; text-align: center; font-size: clamp(22px, 4vw, 31px); letter-spacing: -.04em; }
.social-game h3 { margin: 18px 0 8px; }
.social-lede, .social-footnote { color: #a9abc2; text-align: center; font-size: 12px; line-height: 1.65; }
.social-meta { display: flex; justify-content: space-between; gap: 12px; color: #a8a9c1; font: 11px ui-monospace, Consolas, monospace; }
.social-game form { display: grid; gap: 14px; }
.social-game form > label { display: grid; gap: 6px; color: #e7e5f5; font-size: 12px; font-weight: 700; }
.social-game input, .social-game select { width: 100%; min-width: 0; border: 1px solid #3c3e5e; border-radius: 8px; padding: 10px 11px; background: #101224; color: #f6f4ff; }
.social-game input[type="number"] { max-width: 170px; }
.social-game label small { color: #999bb4; font-size: 10px; font-weight: 400; line-height: 1.5; }
.social-name-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.social-name-list label { display: grid; min-width: 0; gap: 6px; color: #bfc0d3; font-size: 11px; }
.social-primary { display: inline-flex; min-height: 42px; justify-content: center; align-items: center; border: 1px solid #8175d1; border-radius: 9px; padding: 10px 15px; background: #302d53; color: #f4f1ff; font-size: 12px; font-weight: 800; }
.social-primary:hover { border-color: #c3b4ff; background: #3d3965; }
.social-cover, .social-private { display: grid; min-height: 260px; place-content: center; justify-items: center; gap: 11px; border: 1px solid #3d3f60; border-radius: 12px; margin: 18px 0; padding: clamp(16px, 5vw, 30px); background: radial-gradient(circle at 50% 15%, #302c53, #15172b 72%); text-align: center; }
.social-cover p, .social-private p { max-width: 500px; margin: 0; color: #c5c3d9; font-size: 13px; line-height: 1.65; }
.social-private > h2 { color: var(--arcade-gold); }
.social-private > .social-eyebrow { color: #a99cf4; font: 11px ui-monospace, Consolas, monospace; letter-spacing: .16em; }
.social-game .word-card { border: 1px solid #5b557d; border-radius: 10px; padding: 12px 20px; background: #24213c; color: var(--arcade-gold); font-size: 24px; font-weight: 850; }
.social-game [data-form="vote"] { max-width: 440px; margin: 20px auto; }
.social-game [data-form="vote"] .social-primary { width: 100%; }
.social-turn { margin: 22px 0 7px; color: #e7e4f7; text-align: center; font-size: clamp(16px, 3.2vw, 21px); line-height: 1.6; }
.social-game > p { color: #b8b8cd; text-align: center; font-size: 12px; line-height: 1.65; }
.social-result { border-left: 3px solid var(--arcade-gold); padding: 10px 12px; background: #25243a; color: #fff0c4 !important; }
.social-options { display: flex; width: 100%; flex-wrap: wrap; justify-content: center; gap: 8px; }
.social-options .social-primary { min-width: min(100%, 150px); }
.social-tally { width: min(100%, 400px); margin: 12px auto; padding-left: 24px; color: #d3d1e4; font-size: 13px; line-height: 1.8; }
.social-reveal-roster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; max-width: 500px; margin: 16px auto; }
.social-reveal-roster p { margin: 3px 0; color: #c6c5d8; font-size: 12px; }
.social-game > .social-primary { margin: 5px 5px 0 0; }
.social-scoreboard { max-width: 430px; margin: 24px auto 0; border-top: 1px solid #353750; padding-top: 12px; }
.social-scoreboard h3 { margin: 0 0 8px; color: #aaa7c8; text-align: center; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.social-scoreboard p { display: flex; justify-content: space-between; gap: 10px; margin: 0; border-bottom: 1px solid #292b44; padding: 7px 5px; color: #d5d4e5; font-size: 12px; }
.social-scoreboard strong { color: var(--arcade-lime); }
.social-error { margin: 0; color: #ff8b9c; font-size: 12px; }
.social-message { color: var(--arcade-gold) !important; }
.social-game .social-role-traitor, .social-game .social-role-unknower { color: #ff7b88; }
.social-game .social-role-faithful { color: #64ed99; }
.social-game .social-important { color: #fff0c4; font-size: clamp(22px, 4vw, 30px); font-weight: 850; line-height: 1.4; overflow-wrap: anywhere; }
.social-game .social-player-name { display: block; margin-bottom: 12px; color: #fff0c4; font-size: clamp(28px, 6vw, 42px); line-height: 1.2; overflow-wrap: anywhere; }
.social-game .social-target-selected, .social-game .social-target-selected:hover { background: repeating-linear-gradient(135deg, #ffd2d6 0 8px, #b83e52 8px 11px); border: 2px solid #ff7b88; color: #24080d; text-shadow: 0 0 3px #fff; }
.social-options button:disabled { opacity: .45; cursor: not-allowed; }
.social-private .social-shield { display: grid; justify-items: center; color: #64ed99; font-size: 24px; }
.social-shield [role="img"] { font-size: 64px; }
.social-game .social-check { display: flex; align-items: center; gap: 8px; margin: 8px 0; min-height: 32px; }
.social-game input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 20px; accent-color: #aa96ff; }

@media (max-width: 480px) {
  .social-name-list, .social-reveal-roster { grid-template-columns: 1fr; }
  .social-meta { font-size: 10px; }
  .social-cover, .social-private { min-height: 230px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
