/* Shared collection language: blue felt, clear controls, and compact play surfaces. */
:root {--table-ice:#b8e4ff;--table-line:#709dc36b;--table-surface:#10385f;scrollbar-color:#598ab2 #071e37;}
* {box-sizing:border-box;}
body {overscroll-behavior-y:none;}
button,input,select {font:inherit;}button {touch-action:manipulation;}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {outline:3px solid #c4efff!important;outline-offset:4px;}
button:disabled {cursor:default;}
.topbar,.memory-header,.war-header {gap:12px;flex-wrap:wrap;}
.topbar .brand small {display:block;font-size:9px;letter-spacing:.14em;color:#8fb9da;margin-top:4px;}
.table-header-tools {display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.table-header-tools button,.top-actions button {min-height:40px;}
.table-dialog {width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;border:1px solid #709dc3;border-radius:20px;padding:26px;background:linear-gradient(140deg,#17436d,#092848);color:#e8f7ff;box-shadow:0 20px 70px #0008;}
.table-dialog::backdrop {background:#03162bcc;backdrop-filter:blur(5px);}
.table-dialog h2 {font:900 clamp(24px,4vw,32px) Outfit,sans-serif;letter-spacing:-.04em;margin:8px 0;}
#settingsDialog .setting-label {display:block;font-size:12px;margin:17px 0 6px;font-weight:800;color:#d5edff;}
#settingsDialog .setting-label small {display:block;font-size:10px;font-weight:500;color:#a7cbe5;margin-top:5px;}
#settingsDialog input:not([type=checkbox]):not([type=range]),#settingsDialog select {width:100%;min-height:44px;margin:0;border:1px solid #6c9fc5;border-radius:9px;padding:10px 12px;background:#0a2a49;color:#eff9ff;font-size:13px;}
.table-settings-grid {display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.table-settings-row {display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:18px;color:#d5edff;font-size:13px;min-height:36px;}
.table-settings-row input {width:22px;height:22px;accent-color:#96d5ff;}
.table-volume {display:flex;align-items:center;gap:16px;}.table-volume input {flex:1;accent-color:#a7dcff;min-width:0;}
.table-dialog .fine-print {color:#afd0e9;font-size:12px;line-height:1.6;}
.table-dialog-actions {display:flex;justify-content:flex-end;gap:10px;margin-top:20px;flex-wrap:wrap;}
.table-dialog-actions button {min-height:44px;}
.table-resume {display:flex;justify-content:space-between;gap:20px;align-items:center;margin:24px 0;padding:18px 22px;border:1px solid var(--table-line);border-radius:14px;background:#16457899;}
.table-resume strong {display:block;font:800 17px Outfit,sans-serif;margin-top:6px;}
.table-social {max-width:1130px;margin:8px auto 12px;padding:9px 14px;border:1px solid #639cc75c;border-radius:10px;background:#10375e;color:#c8e9ff;font-size:12px;font-weight:700;text-align:center;line-height:1.5;}
.table-social.rival-away {border-color:#deb86d;color:#ffe2ac;}
.table-connection {position:fixed;bottom:max(14px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:300;max-width:calc(100vw - 24px);width:max-content;border:1px solid #edc77c;background:#163754;color:#ffe6b6;border-radius:12px;padding:12px 18px;font-size:12px;box-shadow:0 8px 32px #0007;}
.table-recap {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;width:100%;max-width:500px;margin:14px auto;}
.table-recap-stat {padding:12px;border:1px solid #77b4df55;border-radius:11px;background:#0b2e50;color:#ecf9ff;min-width:0;}
.table-recap-stat span {display:block;font:800 9px Outfit,sans-serif;letter-spacing:.08em;color:#acd2ed;text-transform:uppercase;}
.table-recap-stat strong {display:block;font:900 22px Outfit,sans-serif;margin-top:7px;}
.table-memory-difficulty {display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 28px;padding:18px 22px;border:1px solid var(--table-line);border-radius:15px;background:#103459aa;}
.table-memory-difficulty strong {display:block;font:850 18px Outfit,sans-serif;margin-top:7px;}
.table-memory-difficulty p {font-size:12px;line-height:1.5;color:#accde5;margin:6px 0 0;}
.table-segmented {display:flex;gap:5px;padding:5px;background:#082641;border:1px solid var(--table-line);border-radius:12px;flex-shrink:0;}
.table-segmented button {border:0;border-radius:8px;background:transparent;color:#b7dbf4;padding:10px 15px;min-height:44px;font-size:12px;font-weight:800;cursor:pointer;}
.table-segmented button[aria-pressed=true] {background:#c5eaff;color:#123f65;box-shadow:0 3px 0 #4783b1;}
.memory-arena {padding-top:14px;}.memory-arena-heading {margin-bottom:12px;gap:8px;flex-wrap:wrap;}
.memory-header,.war-header {min-height:60px;padding-bottom:12px;}
.memory-screen,.war-screen {padding-top:max(10px,env(safe-area-inset-top));padding-bottom:max(20px,env(safe-area-inset-bottom));}
.memory-board-message {min-height:44px;line-height:1.5;}
.memory-score-cell {padding:10px 13px;}.memory-scoreboard {margin-bottom:12px;}
.memory-game-hint {font-size:11px;margin:9px 0;}
.memory-result {position:relative;}.memory-result-actions,.war-result-buttons {gap:8px;flex-wrap:wrap;}
.war-arena {padding-top:12px;}.war-arena-top {margin-bottom:8px;}.war-arena-heading {margin-bottom:12px;}
.war-arena-heading h2 {font-size:27px;margin:3px 0;}.war-arena-heading .war-eyebrow {font-size:9px;}
.war-felt {padding:16px 18px 12px;}.war-players {height:248px;min-height:248px;}
.war-playing-card {width:clamp(88px,11vw,112px);margin:4px auto;}.war-playing-card .war-rank {font-size:25px;}.war-playing-card .war-corner-suit {font-size:17px;}.war-playing-card .war-large-suit {font-size:48px;}.war-card-center {font-size:42px;}
.war-player-side {gap:4px;}.war-card-total b {font-size:23px;}.war-flip-outcome {min-height:18px;margin:3px 0;font-size:10px;}.war-ready-chip {font-size:9px;}
.war-tribute {height:180px;min-height:180px;max-height:180px;margin:8px 0;padding:8px 12px;}.war-tribute-heading>span {font-size:10px;}.war-tribute-heading p {height:28px;min-height:28px;max-height:28px;font-size:10px;margin:3px 0 4px;}
.war-tribute-piles small {font-size:8px;}.war-down-pile {height:48px;margin:4px auto;max-width:160px;}.war-down-card {top:2px;width:32px;height:44px;left:calc(50% - 32px + var(--pile-index) * 16px);font-size:18px;}
#warPlaceBtn {height:44px;min-height:44px;font-size:9px;padding:7px 12px;}
.war-stages {height:60px;min-height:60px;max-height:60px;margin:8px auto;}.war-stage {height:54px;}.war-stage strong {font-size:14px;}.war-stage small {font-size:8px;}
.war-battle-message,.war-battle-message.is-war {height:42px;min-height:42px;max-height:42px;margin:6px 0 0;font-size:12px;}
.war-action-area {padding:10px 0;}.war-action-area p {height:34px;min-height:34px;margin-bottom:8px;font-size:11px;}
.war-tribute.is-inactive {opacity:.45;}.war-action-buttons button {min-height:44px;}
html[data-game=speed] .heading {padding:10px 0;}.heading h1 {font-size:31px;margin:6px 0;}.heading p {margin:5px 0;font-size:12px;}
html[data-game=speed] .table-top {padding:15px 24px;}.play-field {padding:8px 4px;}.centerline {margin:12px 0;}
.centerline #gameMessage {min-height:42px;display:flex;align-items:center;justify-content:center;line-height:1.4;text-align:center;}
html[data-game=speed] .playing-card {min-height:90px;max-height:145px;}.game-toolbar {padding:10px 4px;}.toolbar-note {font-size:11px;}
.bottom-strip {font-size:9px;padding:6px;}.game-toolbar button {min-height:44px;}
.playing-card.selected {outline:3px solid #ccf0ff;outline-offset:3px;}
button.tap-pending {box-shadow:0 0 0 3px #a0ddff,0 0 20px #6dc4ff80;}
html[data-motion=reduced] *,html[data-motion=reduced] *::before,html[data-motion=reduced] *::after {animation-duration:.001ms!important;animation-delay:0ms!important;transition-duration:.001ms!important;scroll-behavior:auto!important;}
html[data-motion=reduced] .war-playing-card.is-turning .war-flip-inner {transform:rotateY(180deg);}
html[data-pace=fast] .memory-tile-inner {transition-duration:.18s;}
html[data-pace=fast] .war-playing-card.is-turning .war-flip-inner {animation-duration:.48s;}
html[data-pace=fast] .war-shuffle-card {animation-duration:2.8s;}
html[data-pace=fast] .war-collect-card {animation-duration:.5s;}
html[data-contrast=true] {--table-line:#acdafa;}
html[data-contrast=true] p,html[data-contrast=true] small,html[data-contrast=true] .memory-kicker,html[data-contrast=true] .war-eyebrow,html[data-contrast=true] .eyebrow {color:#d6eeff!important;}
html[data-contrast=true] button {border-color:#bde7ff!important;}
@media(max-width:760px) {.hub-library-count {display:none;}.table-memory-difficulty {flex-direction:column;align-items:stretch;gap:12px;}.table-segmented {justify-content:space-between;}.table-segmented button {flex:1;}.table-header-tools {gap:5px;}.table-header-tools button {font-size:10px;padding:8px;}.memory-brand,.war-brand {font-size:10px;}.memory-header,.war-header {justify-content:space-between;}.war-arena-heading h2 {font-size:24px;}.war-felt {padding:12px 10px;}.war-players {height:230px;min-height:230px;}.war-tribute {height:190px;min-height:190px;max-height:190px;}.war-tribute-heading p {font-size:9px;}.war-action-buttons {gap:8px;}.war-flip-btn {width:230px;}.table-resume {padding:14px;gap:12px;}.table-resume strong {font-size:14px;}}
@media(max-width:550px) {.topbar {height:auto;min-height:66px;padding:8px 0;}.top-actions {gap:4px;flex-wrap:wrap;}.top-actions button {font-size:10px;padding:7px;}.brand {font-size:11px;}.brand-icon {display:none;}.memory-screen,.war-screen {padding-left:10px;padding-right:10px;}.table-settings-grid {grid-template-columns:1fr;gap:0;}.table-dialog {padding:20px;}.table-header-tools button {min-height:40px;}.memory-header .memory-brand,.war-header .war-brand {order:-1;width:100%;text-align:center;padding:4px 0;}.memory-header,.war-header {gap:6px;}.table-recap-stat strong {font-size:19px;}html[data-game=speed] .heading .eyebrow,html[data-game=speed] .heading p {display:none;}html[data-game=speed] .heading h1 {font-size:24px;}html[data-game=speed] .playing-card {min-height:90px;max-height:115px;}.bottom-strip {gap:7px;}.table-top {padding:12px 8px!important;}.table-meta .small {font-size:10px;}.table-resume {flex-direction:column;align-items:stretch;}.table-social {font-size:10px;padding:8px;}}
@media(max-height:750px) and (min-width:761px) {.war-players {height:210px;min-height:210px;}.war-playing-card {width:90px;}.war-tribute {height:164px;min-height:164px;max-height:164px;}.war-tribute-heading p {height:20px;min-height:20px;max-height:20px;}.war-down-pile {height:42px;}.war-down-card {height:36px;width:26px;}html[data-game=speed] .playing-card {min-height:80px;max-height:115px;}html[data-game=speed] .heading {display:none;}}

html[data-contrast=true] .memory-featured p,html[data-contrast=true] .war-mode-primary p,html[data-contrast=true] .memory-result p {color:#103653!important;}
.memory-score-cell span {max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@media(max-width:550px) {.war-header-brand {order:-1;width:100%;justify-content:center;}}

/* Leave enough room for the full-size placement button at every breakpoint. */
.war-tribute {height:196px;min-height:196px;max-height:196px;}

.result-actions {flex-wrap:wrap;justify-content:center;}.result-actions button {min-height:44px;}

/* The site identity is also a keyboard-accessible home link. */
.brand-home-link {color:inherit;text-decoration:none;cursor:pointer;border-radius:8px;min-height:44px;}
.brand-home-link:hover {filter:brightness(1.15);}
a.memory-brand {display:inline-flex;align-items:center;gap:6px;}
