/* Shared redesign: preserve the existing artwork and game assets. */
body #app .search-setup>.ui-choice{margin-bottom:14px}
body #app .search-setup .search-primary{margin:0;background:#71603a!important;border-color:#bfa36a!important;color:#fff0ce}
body #app .search-caption{font-size:13px;text-align:center;margin:9px 0 18px;color:#c7c6b5}
.search-options,.search-terms{border-block:1px solid #b5a17a35;padding:0!important;margin:0 0 12px!important}
.search-options h3,.search-terms summary{padding:14px 0!important;font-size:16px!important;min-height:48px}
.search-options h3{margin:0 0 8px;line-height:20px}.search-options .ui-choice{margin-bottom:12px}.search-options button{width:100%;margin-bottom:14px}
.search-facts{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#d7c59d;margin:16px 0}
.search-terms p{font-size:14px!important;line-height:1.6!important}.search-setup .form-error:empty{display:none}
.queue-state{padding:24px 0;text-align:center}.queue-state h3{font-size:25px;margin:0 0 22px}.queue-count{display:block;font:26px/1.4 'Literata',Georgia;color:#f1ddb1;margin-bottom:20px}
.queue-seats{display:flex;justify-content:center;flex-wrap:wrap;gap:16px;margin:20px 0 26px}.queue-seat{display:grid;justify-items:center;gap:7px;width:66px}.queue-seat svg{width:54px;height:54px;padding:12px;border:1px dashed #9a96706b;border-radius:50%;fill:#9da59155}.queue-seat.filled svg{border-style:solid;border-color:#cbb579;background:#314637;fill:#dacba6}.queue-seat small{font:11px/1.4 'Golos Text',sans-serif;color:#c3c1af}
#queue-time{display:block;font-size:14px;color:#cfb98c;font-variant-numeric:tabular-nums}.queue-cancel{width:100%}
body #app .home-nav button[data-home-page=club],body #app .home-nav button[data-home-page=checkers]{font-size:18px}
.profile-editor{display:grid;grid-template-columns:180px minmax(0,1fr);gap:28px}.profile-overview{text-align:center;padding-top:14px}.profile-overview>.avatar-art{display:block;width:120px;height:120px;border:1px solid #c5aa74;border-radius:50%;margin:0 auto 16px}.profile-overview h3{font:23px 'Literata',Georgia;margin:0 0 8px;overflow-wrap:anywhere}.profile-overview strong{font-size:22px;color:#d2b87e}.profile-overview small{display:block;font-size:11px;margin-top:4px}
.profile-tabs{display:flex;gap:8px;border-bottom:1px solid #b6a17155;padding-bottom:12px;margin-bottom:18px}.profile-tabs button{flex:1;font-size:16px!important;padding:10px!important;min-height:44px}.profile-tabs [aria-selected=true]{border-color:#c3aa74!important;background:#31493666!important}.profile-edit-fields{min-width:0}.profile-editor .home-avatar-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}.profile-editor .profile-email{margin-top:0}.profile-editor #save-profile{width:100%}
body #modal{padding:24px;border-radius:12px;background:#20382a;border-color:#a992675e}
body #modal h2{padding-right:36px;font-size:25px;line-height:1.35;margin:0 0 20px}
body #modal .close{position:absolute;right:10px;top:10px;width:40px;height:40px;min-height:40px;display:grid;place-items:center;border:0;margin:0;font-size:26px;background:transparent!important;box-shadow:none!important}
body #modal .audio-settings label{font:16px/1.4 'Golos Text',sans-serif;display:block;margin:22px 0 10px}.audio-settings output{font-size:14px;font-variant-numeric:tabular-nums}.audio-settings input[type=range]{width:100%;height:26px;margin:0}
body #modal #audio-toggle{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;font-size:15px;min-height:46px;background:transparent!important;box-shadow:none!important}
#audio-toggle:after{content:'';width:32px;height:20px;border:1px solid #c7b17a;border-radius:20px;background:radial-gradient(circle at 9px 50%,#e7d6ad 0 6px,transparent 7px),#14271d}
#audio-toggle[aria-pressed=true]:after{background:radial-gradient(circle at 23px 50%,#e7d6ad 0 6px,transparent 7px),#527049}
body #modal #audio-done{width:100%;background:#304b38!important;border-color:#ac99756e!important;color:#efe5cf}.audio-settings .form-note{font-size:12px!important;margin:16px 0}
body #modal .menu-heading{margin-bottom:18px}.menu-grid .menu-tile{min-height:48px!important}.menu-grid .menu-tile span{font-size:16px}.menu-grid .menu-tile small{display:none}
@media(max-width:650px){body #app .home-menu:not(:has(.home-content[data-page=main])) h1{max-width:190px;margin-bottom:22px}body #app .home-menu-setup{padding-bottom:64px}.profile-editor{grid-template-columns:1fr;gap:18px}.profile-overview{display:grid;grid-template-columns:76px 1fr;text-align:left;align-items:center;column-gap:16px;padding:0}.profile-overview>.avatar-art{width:76px;height:76px;margin:0;grid-row:1/3}.profile-overview h3{margin:0;font-size:21px}.profile-overview strong{font-size:17px}.profile-overview small{display:inline;font-size:10px}.profile-tabs{margin-bottom:12px}.profile-editor .home-avatar-options{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.profile-tabs button{font-size:15px!important}body #modal{width:calc(100vw - 24px);padding:22px;max-height:calc(100dvh - 24px)}body #modal .rules-sections summary{padding-block:16px;font-size:17px}.rules-sections p{font-size:14px!important}}
/* A readable mobile action area directly above the hand. */
@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .player-dock{gap:8px!important;padding:10px 10px 8px!important;border:1px solid #ac95675e;border-radius:10px;background:#183023d9;box-shadow:0 2px 8px #0b190e33}
 html.flat-table body #app .game:not(.club-table) .turn-text{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;grid-template-rows:auto auto!important;gap:2px 10px!important;padding:0!important;width:100%!important;min-height:48px;font-size:19px!important}
 html.flat-table body #app .game:not(.club-table) .self-avatar{position:relative!important;inset:auto!important;width:46px!important;height:46px!important;grid-column:1;grid-row:1/3;align-self:center;transform:none!important}
 html.flat-table body #app .game:not(.club-table) .turn-title{grid-column:2!important;grid-row:1!important;align-self:center;font-size:18px!important;line-height:1.25!important;white-space:normal}
 html.flat-table body #app .game:not(.club-table) .turn-text>small{grid-column:2!important;grid-row:2!important;font-size:12px!important;line-height:1.35!important;margin:0!important}
 html.flat-table body #app .game:not(.club-table) .hand-count-text{display:none!important}
 html.flat-table body #app .game:not(.club-table) .self-clock{font-size:11px!important;line-height:16px!important;bottom:-5px!important;right:-4px!important}
 html.flat-table body #app .game:not(.club-table) .control-stack{width:100%!important;gap:8px!important}
 html.flat-table body #app .game:not(.club-table) .control-stack button{min-height:44px!important;font-size:14px!important;line-height:1.3!important}
 html.flat-table body #app .game:not(.club-table) .mobile-sort-group button{font-size:13px!important}
 html.flat-table body #app .game:not(.club-table) .opponent .name{font-size:13px!important;line-height:17px!important}
 html.flat-table body #app .game:not(.club-table) .opponent .status{font-size:11px!important;line-height:15px!important}
}
@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .turn-text .hand-count-text{display:block!important;grid-column:2!important;grid-row:3!important;padding:0!important;margin:1px 0 0!important;min-height:0!important;font-size:11px!important}
 html.flat-table body #app .game:not(.club-table) .turn-text .count-meta{display:flex!important;align-items:center;gap:8px;line-height:1.3!important;min-width:0}
 html.flat-table body #app .game:not(.club-table) .self-player-name{font-size:11px!important;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 html.flat-table body #app .game:not(.club-table) .self-renown,html.flat-table body #app .game:not(.club-table) .self-card-count{font-size:11px!important;line-height:1.3!important}
 html.flat-table body #app .game:not(.club-table) .self-avatar{grid-row:1/4!important}
}
body #app .home-utilities button{position:relative}
body #app .home-utilities button:after{position:absolute;top:calc(100% + 3px);left:50%;transform:translateX(-50%);font:11px/1.2 'Golos Text',sans-serif;color:#c8c4ae;white-space:nowrap}
.home-utilities #home-mute:after{content:'Звук'}.home-utilities #home-friends:after{content:'Друзья'}.home-utilities [data-home-page=settings]:after{content:'Настройки'}
body #app .home-utilities{bottom:30px}
@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .turn-text .count-meta{flex-direction:row!important;justify-content:flex-start!important;text-align:left!important;gap:8px!important}
 html.flat-table body #app .game:not(.club-table) .hand-count-text{width:auto!important;justify-self:start!important;align-self:start!important;text-align:left!important}
 html.flat-table body #app .game:not(.club-table) .self-player-name,html.flat-table body #app .game:not(.club-table) .self-card-count{margin:0!important;white-space:nowrap!important}
}
.profile-editor .profile-identity-row{grid-template-columns:1fr}.profile-editor #account-panel>div{margin:0 0 20px}.profile-editor .home-avatar-options{padding-top:0}
body #modal .audio-settings label{display:flex!important;justify-content:space-between;align-items:baseline;gap:12px}.audio-settings output{float:none!important;flex:none}
@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .opponent .name{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
 html.flat-table body #app .game:not(.club-table) .play-area{mask-image:linear-gradient(to bottom,transparent calc(var(--battle-inset,160px) - 8px),#000 var(--battle-inset,160px));-webkit-mask-image:linear-gradient(to bottom,transparent calc(var(--battle-inset,160px) - 8px),#000 var(--battle-inset,160px))}
}
/* Closer to the approved sketches: warm brass accents and quiet framed panels. */
body #app .home-menu .home-nav button[data-home-page=ranked],body #app .search-setup .search-primary,body #app .profile-editor #save-profile{background:#b79b60!important;background-image:linear-gradient(180deg,#f0dfad55,transparent 75%)!important;border-color:#dbc28b!important;color:#20291c!important;box-shadow:inset 0 1px 0 #fff0c344,0 2px 5px #07130c38!important;text-shadow:none!important}
@media(hover:hover){body #app .home-menu .home-nav button[data-home-page=ranked]:hover,body #app .search-setup .search-primary:hover,body #app .profile-editor #save-profile:hover{background-color:#c7ad72!important}}
body #app .home-menu .home-nav button{border-radius:7px;min-height:46px}
body #app .home-menu .home-nav{gap:9px}
body #app .home-menu .home-nav button:not([data-home-page=ranked]){background:#11251b22!important;border-color:#b5a17a80!important}
body #app .home-menu .home-nav button:not([data-home-page=ranked]):hover{background:#31493666!important}
body #modal{background:linear-gradient(#10261cee,#173423f5),url('/assets/table-v180/baize.webp') center/640px!important;border:1px solid #c3ac777a;box-shadow:0 16px 48px #030b0755,inset 0 1px 0 #f0ddb714}
body #modal h2{font-weight:500;letter-spacing:-.02em}
body #modal.is-game-menu .menu-heading{padding-bottom:14px;margin-bottom:8px;border-bottom:1px solid #b5a17a40}
body #modal.is-game-menu .menu-heading h2{margin-bottom:8px;font-size:25px}
body #modal.is-game-menu .menu-resume{margin:10px 0 18px;border-radius:7px;min-height:48px}
body #modal.is-game-menu .menu-grid{border:1px solid #b5a17a55;border-radius:8px;overflow:hidden}
body #modal.is-game-menu .menu-tile{min-height:52px!important;padding:13px 12px;background:transparent!important}
body #modal.is-game-menu .menu-tile:last-child{border-bottom:0}
body #modal.is-game-menu .menu-tile:after{content:'›';margin-left:auto;color:#cabb98;font:22px/1 Georgia}
body #modal.is-game-menu .menu-footer{padding-top:16px;border-top:1px solid #b5a17a40}
body #modal.is-game-menu .menu-footer button{border-radius:7px}
body #modal #audio-toggle{border-radius:7px;border-color:#b5a17a55!important;padding-inline:12px}
body #modal .audio-settings label{font-weight:400;font-size:15px;margin-top:24px}
body #modal #audio-done{border-radius:7px}
.profile-edit-fields{background:#11271db8;border:1px solid #b5a17a66;border-radius:10px;padding:20px;box-shadow:inset 0 1px 0 #e8d6ad12}
.profile-editor .profile-tabs{gap:0;padding-bottom:0;border:1px solid #b5a17a55;border-radius:7px;overflow:hidden}
.profile-editor .profile-tabs button{border-radius:0;border:0!important;text-align:center;box-shadow:none!important;font-weight:400}
.profile-editor .profile-tabs [aria-selected=true]{background:#355139b3!important;color:#fff0ce}
.profile-editor .home-avatar-options button{position:relative}
.profile-editor .home-avatar-options button[aria-pressed=true]:after{content:'✓';position:absolute;right:0;bottom:0;width:22px;height:22px;border-radius:50%;background:#d2b87e;color:#1b2b1e;display:grid;place-items:center;font:15px/1 sans-serif;box-shadow:0 0 0 2px #183122}
.profile-overview>.avatar-art{box-shadow:0 0 0 4px #bca46b14,0 5px 14px #08120d55}
.queue-count{font-size:30px;color:#f2dfb5}.queue-seat svg{width:62px;height:62px}.queue-seat{width:76px}.queue-seat.filled svg{background:#344e38;border-color:#d1b981;box-shadow:0 0 0 3px #b5a17a10}.queue-state{border-block:1px solid #b5a17a30;margin-block:8px 22px}
@media(min-width:901px){.profile-editor{grid-template-columns:200px minmax(0,1fr);gap:30px}.profile-overview{padding-top:30px}.profile-overview>.avatar-art{width:164px;height:164px}.profile-overview h3{font-size:26px;margin-top:22px}.profile-overview strong{display:block;margin-top:14px;font:30px 'Literata',Georgia}.profile-overview small{margin-top:6px}}
@media(max-width:650px){.profile-edit-fields{padding:14px}.profile-editor .home-avatar-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.queue-count{font-size:25px}.queue-seats{gap:12px}.queue-seat{width:66px}}
@media(min-width:901px){
 #checkers .game-panel{background:linear-gradient(#12271ddd,#193325e8);border-color:#b5a17a66;padding:18px;gap:18px}
 #checkers .turn-panel{border:1px solid #b5a17a44;border-radius:8px;padding:14px;background:#243b2b77}
 #checkers .turn-panel.your-turn{border-color:#c4ab73a6;background:#30452b77}
 #checkers .turn-panel h1{font-size:24px;margin:0}#checkers .turn-panel p{font-size:13px}
 #checkers .history summary{font-family:'Literata',Georgia;font-size:17px;border-top:0}
 #checkers .history .history-popover li:nth-child(even){background:#e7d6ad06}
 #checkers .history .history-popover li[aria-pressed=true]{background:#e7d6ad1f}
}

/* Beta: composition and detailing from the approved menu/profile sketches. */
body #app .home-content[data-page=main] .home-nav button{display:flex;align-items:center;gap:14px;padding-inline:16px;text-align:left}
.home-nav .nav-icon{width:23px;height:23px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;color:#d5bd85}
.home-nav [data-home-page=ranked] .nav-icon{color:#1a3021}
body #app .home-content[data-page=main] .home-nav button:after{position:static;margin-left:auto;float:none}
.profile-statistics{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #b5a17a66;margin:24px 0 0;padding-top:18px}
.profile-statistics div{display:flex;flex-direction:column-reverse;gap:6px;border-right:1px solid #b5a17a33}.profile-statistics div:last-child{border:0}
.profile-statistics dt{font:12px/1.4 'Golos Text',sans-serif;color:#c3c1af}.profile-statistics dd{margin:0;font:22px/1.3 'Literata',Georgia;color:#f0dfb6}
body #modal .audio-settings input[type=range]{appearance:none;background:transparent;cursor:pointer}
body #modal .audio-settings input[type=range]::-webkit-slider-runnable-track{height:6px;border:1px solid #b5a17a55;border-radius:8px;background:#48583c}
body #modal .audio-settings input[type=range]::-webkit-slider-thumb{appearance:none;width:21px;height:21px;margin-top:-8px;border:1px solid #eddbaf;border-radius:50%;background:#c7ad72;box-shadow:0 2px 4px #08140d66}
body #modal .audio-settings input[type=range]::-moz-range-track{height:5px;border:1px solid #b5a17a55;border-radius:8px;background:#48583c}
body #modal .audio-settings input[type=range]::-moz-range-thumb{width:20px;height:20px;border:1px solid #eddbaf;border-radius:50%;background:#c7ad72}
body #modal .audio-settings input[type=range]:focus-visible{outline:2px solid #e5ce95;outline-offset:4px;border-radius:5px}
@media(max-width:650px){.profile-statistics{grid-column:1/-1;text-align:center;margin-top:8px;padding-top:14px}.profile-statistics dd{font-size:20px}}

body #app .home-content[data-page=main] .home-nav button:after{transform:none}
body #app .home-menu:has(.profile-editor){width:min(760px,100%)!important;max-width:100%!important}
.profile-editor .home-avatar-options button{width:100%;max-width:96px;height:auto;aspect-ratio:1;min-height:0;justify-self:center}
.profile-editor .profile-tabs button{min-width:0;white-space:normal}
@media(min-width:651px) and (max-width:900px){.profile-editor{grid-template-columns:160px minmax(0,1fr);gap:20px}}

/* Beta mobile: cards have their own unobscured scroll region; HUD rows stay stable. */
@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .play-area{grid-row:3!important;mask-image:none!important;-webkit-mask-image:none!important;overflow-y:auto!important;scroll-padding-block:12px}
 html.flat-table body #app .game:not(.club-table) .battles{padding:12px 8px 22px!important;min-height:100%;align-content:start}
 html.flat-table body #app .game:not(.club-table) .battle-small .battles{align-content:center}
 html.flat-table body #app .game:not(.club-table) .turn-text{grid-template-rows:24px 34px 16px!important;height:78px!important;min-height:78px!important;max-height:78px}
 html.flat-table body #app .game:not(.club-table) .turn-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html.flat-table body #app .game:not(.club-table) .turn-text>small{align-self:start;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 html.flat-table body #app .game:not(.club-table) .control-stack{height:44px!important;min-height:44px!important;max-height:44px!important;grid-template-rows:44px!important}
 html.flat-table body #app .game:not(.club-table) .mobile-sort-group{height:44px!important;min-height:44px!important}
}

/* Beta mobile experiment: hand above the bottom controls, with short edge fades. */
@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table){grid-template-rows:auto 28px minmax(0,1fr) var(--mobile-hand-height) auto!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
 html.flat-table body #app .game:not(.club-table) .hand-area{grid-row:4!important;z-index:15}
 html.flat-table body #app .game:not(.club-table) .player-dock{grid-row:5!important;z-index:20;background:#183023fa;border-radius:12px;box-shadow:0 -6px 18px #10221844}
 html.flat-table body #app .game:not(.club-table) .play-area{mask-image:linear-gradient(to bottom,transparent,#000 16px,#000 calc(100% - 18px),transparent)!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 16px,#000 calc(100% - 18px),transparent)!important}
 html.flat-table body #app .game:not(.club-table) .battles{padding-top:20px!important;padding-bottom:24px!important}
}

.self-card-badge{display:none}
@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table){padding-bottom:0!important}
 html.flat-table body #app .game:not(.club-table) .hand-area{transform:translateY(20%)}
 html.flat-table body #app .game:not(.club-table) .player-dock{width:calc(100% + 32px)!important;margin-left:-16px!important;padding:8px 12px calc(8px + env(safe-area-inset-bottom))!important;border-radius:10px 10px 0 0;border-left:0;border-right:0;border-bottom:0;gap:6px!important}
 html.flat-table body #app .game:not(.club-table) .turn-text{grid-template-rows:20px 28px 14px!important;height:66px!important;min-height:66px!important;max-height:66px}
 html.flat-table body #app .game:not(.club-table) .turn-title{font-size:17px!important}
 html.flat-table body #app .game:not(.club-table) .turn-text>small{font-size:11px!important;line-height:14px!important}
 html.flat-table body #app .game:not(.club-table) .self-card-count{display:none!important}
 html.flat-table body #app .game:not(.club-table) .self-card-badge{display:grid;place-items:center;position:absolute;right:-5px;bottom:-3px;width:21px;height:21px;border:1px solid #c7ab6a;border-radius:50%;background:#10271e;color:#f0dfb6;font:14px/1 Georgia;z-index:3}
 html.flat-table body #app .game:not(.club-table) .self-clock{right:auto!important;left:-7px;bottom:-4px!important;transform:translateY(100%);font-size:10px!important}
 html.flat-table body #app .game:not(.club-table) .control-stack,html.flat-table body #app .game:not(.club-table) .mobile-sort-group{height:36px!important;min-height:36px!important;max-height:36px!important;grid-template-rows:36px!important}
 html.flat-table body #app .game:not(.club-table) .control-stack button{height:36px!important;min-height:36px!important;max-height:36px!important;font-size:12px!important;padding-block:3px!important}
 html.flat-table body #app .game:not(.club-table) .battles[data-pairs="1"]{grid-template-columns:calc(var(--battle-card-width) + 18px)!important}
}

/* Place the scroll edges at the opponent captions and just above the visible hand. */
@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .play-area:has(.battle){position:absolute!important;grid-area:auto!important;inset:auto 16px auto!important;top:var(--mobile-battle-top,120px)!important;height:var(--mobile-battle-height,300px)!important;width:auto!important}
 html.flat-table body #app .game:not(.club-table) .turn-text{z-index:1;isolation:isolate}
 html.flat-table body #app .game:not(.club-table) .control-stack{position:relative;z-index:4;isolation:isolate}
}

/* Mobile trump corner: compact labels and a softly revealed, tilted card. */
@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .supply{gap:0!important}
 html.flat-table body #app .game:not(.club-table) .supply>.mobile-stock-count,html.flat-table body #app .game:not(.club-table) .supply>.trump-badge{margin:0!important;line-height:16px!important}
 html.flat-table body #app .game:not(.club-table) .trump-badge b{line-height:16px!important}
 html.flat-table body #app .game:not(.club-table) .mobile-trump-preview{width:48px;height:72px;margin:0 auto!important;transform:rotate(-10deg);transform-origin:50% 35%;mask-image:linear-gradient(to bottom,transparent 8%,#000 38%);-webkit-mask-image:linear-gradient(to bottom,transparent 8%,#000 38%);border-radius:3px;box-shadow:0 3px 6px #071b1433}
}

@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .play-area{mask-image:linear-gradient(to bottom,transparent,#000 34px,#000 calc(100% - 18px),transparent)!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 34px,#000 calc(100% - 18px),transparent)!important}
 html.flat-table body #app .game:not(.club-table) .battles{padding-top:38px!important}
 html.flat-table body #app .game:not(.club-table) .mobile-trump-preview{width:48px;height:36px;object-fit:cover;object-position:bottom;mask-image:linear-gradient(to bottom,transparent,#000 5px);-webkit-mask-image:linear-gradient(to bottom,transparent,#000 5px);box-shadow:0 5px 7px #06130bc9;filter:drop-shadow(2px 4px 3px #06130b99)}
 html.flat-table body #app .game:not(.club-table) .turn-text .hand-count-text{position:absolute!important;grid-area:auto!important;right:0;top:0;width:38%!important;text-align:right!important}
 html.flat-table body #app .game:not(.club-table) .turn-text .count-meta{justify-content:flex-end!important;flex-wrap:wrap;gap:2px 6px!important;text-align:right!important}
 html.flat-table body #app .game:not(.club-table) .self-player-name{max-width:100%;text-align:right}
 html.flat-table body #app .game:not(.club-table) .turn-title{padding-right:42%}
}

@media(max-width:900px) and (orientation:portrait){html.flat-table body #app .game:not(.club-table) .battles{row-gap:10px!important}}

.mobile-trump-rank{display:none}
@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .mobile-trump-preview{display:none!important}
 html.flat-table body #app .game:not(.club-table) .mobile-trump-rank{display:inline;color:#e7dbb6}
 html.flat-table body #app .game:not(.club-table) .play-area,html.flat-table body #app .game:not(.club-table) .play-area *{touch-action:pan-y!important}
}

@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .play-area{pointer-events:auto!important;scrollbar-width:thin;scrollbar-color:#bca87966 transparent}
 html.flat-table body #app .game:not(.club-table) .play-area::-webkit-scrollbar{width:3px}
 html.flat-table body #app .game:not(.club-table) .play-area::-webkit-scrollbar-track{background:transparent}
 html.flat-table body #app .game:not(.club-table) .play-area::-webkit-scrollbar-thumb{background:#bca87966;border-radius:8px}
 html.flat-table body #app .game:not(.club-table) .turn-text>small{font-size:13px!important;line-height:16px!important}
 html.flat-table body #app .game:not(.club-table) .turn-text{grid-template-rows:20px 32px 10px!important}
 html.flat-table body #app .game:not(.club-table) .control-stack button{font-size:clamp(12px,3.3vw,14px)!important;white-space:nowrap!important}
 html.flat-table body #app .game:not(.club-table) .control-stack:has(>.multi-toggle){grid-template-columns:minmax(0,1fr) 36px minmax(0,1.2fr)!important}
 html.flat-table body #app .game:not(.club-table) .control-stack>.multi-toggle{width:36px!important;min-width:36px!important}
}

/* Beta: compact deck plaque matching the selected reference. */
@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .table-stats{top:10px!important;right:8px!important;width:88px!important;box-sizing:border-box;padding:56px 7px 8px!important;background:#173024ed;border:1px solid #b6a17199;border-radius:12px;box-shadow:0 3px 8px #09191066}
 html.flat-table body #app .game:not(.club-table) .game-top{top:16px!important;right:30px!important;width:44px!important;height:44px!important}
 html.flat-table body #app .game:not(.club-table) .game-menu{width:44px!important;height:44px!important;min-height:44px!important}
 html.flat-table body #app .game:not(.club-table) .mobile-stock-count{width:100%}
 html.flat-table body #app .game:not(.club-table) .stock-line{display:flex;justify-content:space-between;align-items:center;line-height:19px;gap:5px;color:#e1d3ae}
 html.flat-table body #app .game:not(.club-table) .stock-line strong{font:14px/19px 'Literata',Georgia;color:#f3e4bd}
 html.flat-table body #app .game:not(.club-table) .supply>.trump-badge{width:100%;border-top:1px solid #b6a17177;padding-top:6px;margin-top:5px!important;white-space:nowrap}
 html.flat-table body #app .game:not(.club-table) .opponents{padding-right:92px!important}
}

@media(max-width:900px) and (orientation:portrait){
 html.flat-table body #app .game:not(.club-table) .table-stats{width:78px!important;padding-inline:5px!important}
 html.flat-table body #app .game:not(.club-table) .game-top{right:25px!important}
 html.flat-table body #app .game:not(.club-table) .stock-line{gap:3px}
 html.flat-table body #app .game:not(.club-table) .stock-line strong{font-size:12px}
 html.flat-table body #app .game:not(.club-table) .supply>.trump-badge{text-align:center!important}
 html.flat-table body #app .game:not(.club-table) .opponents{padding-right:82px!important}
}

/* Mobile checkers history is an in-flow horizontal strip above the board. */
@media(max-width:900px){
 #checkers .board-column>.rail-secondary{display:flex;align-items:start;width:100%;gap:8px}
 #checkers .board-column>.rail-secondary .history{min-width:0;flex:1}
 #checkers .history summary{min-height:36px;font-size:13px;padding:4px 0}
 #checkers .history .history-popover{position:static!important;inset:auto!important;width:100%!important;max-width:none;max-height:88px!important;padding:4px 0;border:0;background:transparent;box-shadow:none}
 #checkers .history .history-panel-heading{display:none}
 #checkers .history .history-popover ol{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;max-height:80px;padding:0;margin:0;scrollbar-width:thin}
 #checkers .history .history-popover li{flex:0 0 auto;display:flex;flex-direction:column;align-items:start;gap:2px;min-height:48px;border:1px solid #b5a17a55;border-radius:6px;padding:6px 9px;background:#183023}
 #checkers .history .history-popover li[aria-pressed=true]{border-color:#e0c38b;background:#344c35}
 #checkers .play-layout{--board-size:min(calc(100vw - 24px),calc(100dvh - 270px))}
 #checkers .board-column{width:var(--board-size);max-width:100%}
 #checkers .play-layout:has(.history[open]){--board-size:min(calc(100vw - 24px),calc(100dvh - 330px))}
 #checkers .game-panel{padding:10px 12px;gap:6px}
 #checkers .turn-panel h1{font-size:20px}
}

body #app .home-content[data-page=main]>.guest-summary{margin:18px 0 0;padding:14px 0 0;border-bottom:0;border-top:1px solid #b5a17a55}

@media(max-width:900px){
 #checkers .play-layout{grid-template-columns:minmax(0,1fr);min-width:0}
 #checkers .board-column{grid-template-columns:minmax(0,1fr);min-width:0}
 #checkers .board-column>.rail-secondary{min-width:0;max-width:100%;box-sizing:border-box}
 #checkers .board-column>.rail-secondary .history{flex:1 1 0;min-width:0;max-width:100%}
 #checkers .board-column>.rail-secondary>.icon-button{flex:0 0 36px}
 #checkers .history .history-popover,#checkers .history .history-popover ol{min-width:0;width:100%;max-width:100%;box-sizing:border-box}
 #checkers .history .history-popover ol{overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-color:#b5a17a77 transparent}
}

@media(max-width:900px){#checkers .play-layout,#checkers .play-layout:has(.history[open]){--board-size:calc(100vw - 24px)}}

/* Compact mobile move notation; history never changes the board width. */
.history-move-number,.history-navigation{display:none}
@media(max-width:900px){
 #checkers .board-column>.rail-secondary{position:relative;display:block;padding-top:5px;border-top:1px solid #b5a17a55}
 #checkers .board-column>.rail-secondary>.icon-button{position:absolute;right:0;top:5px;width:32px;height:36px;min-height:36px}
 #checkers .history{position:relative;width:100%}
 #checkers .history summary{display:flex;justify-content:space-between;gap:8px;padding:0 40px 0 0;height:36px;min-height:36px;font-size:13px;box-sizing:border-box}
 #checkers .history summary .history-title{display:flex;align-items:center;gap:7px}
 #checkers .history summary i{font-style:normal}
 #checkers .history.is-previewing summary{padding-right:178px}
 #checkers .history.is-previewing summary>span:last-child{display:none}
 #checkers .history-navigation:not([hidden]){position:absolute;right:38px;top:0;height:36px;display:flex;gap:3px;align-items:center}
 #checkers .history-navigation button{display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;border:1px solid #b5a17a77;border-radius:50%;background:transparent;color:#e7d9b3;font-size:23px;line-height:1}
 #checkers .history-navigation [data-history-now]{width:58px;border:0;border-radius:0;font-family:inherit;font-size:12px;line-height:1.2}
 #checkers .history-navigation button:disabled{opacity:.3}
 #checkers .history .history-popover{padding:0;max-height:40px!important;overflow:hidden}
 #checkers .history .history-popover ol{position:relative;gap:8px;height:38px;max-height:38px;scrollbar-width:none;align-items:center;padding:0 2px}
 #checkers .history .history-popover ol::-webkit-scrollbar{display:none}
 #checkers .history .history-popover li{flex-direction:row;align-items:center;justify-content:center;gap:5px;min-height:34px;height:34px;box-sizing:border-box;padding:0 3px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;white-space:nowrap;cursor:pointer}
 #checkers .history .history-popover li strong{font:15px/1.4 'Literata',Georgia,serif;color:#e7d9b3}
 #checkers .history .history-popover li .history-move-number{display:inline;color:#bdba9e;font-size:12px}
 #checkers .history .history-popover li .history-move-side,#checkers .history .history-popover li small,#checkers .history .history-popover li .history-crown{display:none}
 #checkers .history .history-popover li[aria-pressed=true]{background:transparent;border-bottom-color:#e5c375}
 #checkers .history .history-popover li[aria-pressed=true] strong{color:#e5c375}
 #checkers .history .history-popover li:focus-visible{outline:1px solid #e5c375;outline-offset:-1px}
 #checkers .history .history-popover li.history-empty{color:#b8bba6;font-size:12px}
}

#checkers .history summary .history-icon{display:block;width:21px;height:21px;flex:0 0 21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#checkers .history summary .history-chevron{display:grid;place-items:center;width:24px;height:24px;flex:0 0 24px;line-height:0;transform-origin:50% 50%}
#checkers .history-chevron svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#checkers .history summary{align-items:center}
#checkers .history summary>span{align-items:center}

