/* Matte salon controls: one calm material family across menus and tables. */
:root{--surface:#263e30;--surface-raised:#304b38;--ink:#efe5cf;--ink-muted:#c4c7b7;--line:#aa987363;--line-active:#c5b080;--action-top:#895044;--action-bottom:#895044}
body :is(.game .control-stack button,.game .game-menu,.home-nav button,.home-menu .home-primary,#modal button:where(:not(.card):not([data-avatar]):not(.avatar-option)),.result button){background:#304b38!important;background-image:none!important;border-color:#ac99756e!important;box-shadow:0 2px 4px #101a1526!important;text-shadow:none!important;color:#efe5cf;filter:none!important;transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease}
body :is(.game .actions button,.home-menu .home-primary,#modal .primary,#modal .menu-resume,#modal .menu-surrender,.result .primary){background:#895044!important;border-color:#b69c7b99!important}
body :is(.game .actions button,.game .hand-tools button,.menu-resume)::before{display:none!important}
@media(hover:hover){
 body :is(.game .control-stack button,.game .game-menu,.home-nav button,#modal button:where(:not(.card):not([data-avatar]):not(.avatar-option)),.result button):hover:not(:disabled){background:#3d6045!important;border-color:#c5b080!important;filter:none!important;box-shadow:0 2px 5px #101a1530!important}
 body :is(.game .actions button,.home-menu .home-primary,#modal .primary,#modal .menu-resume,#modal .menu-surrender,.result .primary):hover:not(:disabled){background:#9a6050!important}
}
body :is(.game .control-stack button,.home-nav button,#modal button,.result button):focus-visible{outline:2px solid #d6c194;outline-offset:3px}
body :is(.game .control-stack button,.home-nav button,#modal button,.result button):disabled{opacity:.45}
body #modal,body #modal:has(.game-menu-panel),body .result .panel,body .game .sort-popover{background:linear-gradient(#263e30f5,#263e30f5),url('/assets/parchment-v32.jpg') center/480px!important;border-color:#aa987380!important;box-shadow:0 12px 36px #0b140f55!important;color:var(--ink)}
body #modal::backdrop{background:#111c16a6;backdrop-filter:blur(3px)}
body #modal .menu-tile{background:transparent!important;box-shadow:none!important}
body .home-nav button:not(.home-primary){border:1px solid #aa987340;border-radius:5px}
body .ui-choice-surface{background:#2d4935;border-color:#aa987363;box-shadow:none}
body .ui-choice input:checked+.ui-choice-surface{background:#49663e;border-color:#c5b080;box-shadow:none}
body .ui-choice-item:hover .ui-choice-surface{background:#38583f}
body .game .control-stack button[aria-pressed=true]{background:#4d6a40!important;border-color:#cfb985!important}
html.flat-table body.in-game .game.is-your-turn .control-stack::before{display:none!important}
@media(prefers-reduced-motion:reduce){body button{transition:none!important}}

/* A restrained raised edge recalls the original carved controls. */
body :is(.game .control-stack button,.game .game-menu,.home-nav button,.home-menu .home-primary,#modal button:where(:not(.card):not([data-avatar]):not(.avatar-option)),.result button){background-image:linear-gradient(180deg,#f1e2b80c,transparent 40%,#0b160f24)!important;border-top-color:#c3ac7ca6!important;border-bottom-color:#776344!important;box-shadow:inset 0 1px 0 #ead8ad26,inset 0 -1px 0 #10201740,0 3px 6px #08120d40!important}
body #modal .menu-tile{background-image:none!important;box-shadow:none!important}
body #modal,body #modal:has(.game-menu-panel),body .result .panel,body .game .sort-popover{box-shadow:inset 0 1px 0 #e7d3a52b,inset 0 -1px 0 #0e1b1255,0 15px 40px #07100c80!important;border-color:#b8a071a6!important}
@media(hover:hover){body :is(.game .control-stack button,.game .game-menu,.home-nav button,#modal button,.result button):hover:not(:disabled){box-shadow:inset 0 1px 0 #f1dfb43b,inset 0 -1px 0 #10201740,0 4px 8px #08120d4d!important}}
body :is(.game .control-stack button,.game .game-menu,.home-nav button,#modal button,.result button):active:not(:disabled){box-shadow:inset 0 2px 4px #09150f55,0 1px 2px #08120d30!important}
/* Compact, consistently aligned live-table controls. */
@media(min-width:901px){
 body.in-game .game .turn-text{--self-avatar-size:clamp(80px,6.2cqw,112px)}
 html.flat-table body.in-game .game:not(.club-table) .player-dock{bottom:2.5cqw}
 html.flat-table .game .game-top{right:1.8%!important;top:3.2%!important}
}
body.in-game .game .multi-toggle svg,body.in-game .game .multi-toggle svg *{fill:none!important;stroke:currentColor;stroke-linejoin:round}
body.in-game .game .opponent .portrait{transition:scale .2s ease;transform-origin:center}
body.in-game .game .opponent.active .portrait{scale:1.15}
body #modal.is-game-menu{position:fixed;padding:30px 24px 22px}
body #modal.is-game-menu>.close{position:absolute;float:none;right:10px;top:10px;margin:0;width:36px;height:36px;min-height:36px;padding:8px;display:grid;place-items:center}
body #modal.is-game-menu .menu-heading{padding:4px 36px 18px 0;text-align:left}
body #modal.is-game-menu .menu-heading h2{font-size:26px;margin:0 0 8px}
body #modal.is-game-menu .menu-resume{margin:18px 0 16px;min-height:46px;font-size:18px}
body #modal.is-game-menu .menu-grid{display:grid;grid-template-columns:1fr;gap:0;border-top:1px solid var(--line)}
body #modal.is-game-menu .menu-tile{display:flex;flex-direction:row;justify-content:flex-start;gap:14px;min-height:52px;padding:12px 8px;text-align:left;border:0;border-bottom:1px solid var(--line);box-shadow:none!important}
body #modal.is-game-menu .menu-tile>.ui-icon{width:22px;height:22px;flex:none}
body #modal.is-game-menu .menu-footer{margin-top:18px}
body #modal.is-game-menu .menu-footer .menu-surrender{background:transparent!important;box-shadow:none!important;color:#deb1a2;border-color:#bd8d7866!important}
body #toast{width:max-content;max-width:min(460px,calc(100vw - 32px));padding:9px 14px;border:1px solid #b9a47788;border-radius:8px;background:#263e30f5;color:#f0e4c9;font:13px/1.4 'Golos Text',sans-serif;box-shadow:0 4px 12px #07120d55}
body.in-game #toast{bottom:var(--toast-hand-bottom,180px)}
html[data-deck='karazin-1897'] .game .mini-back{background-image:url('/assets/backs-v169/karazin-1897.webp')!important}
html[data-deck='dondorf-java-1879'] .game .mini-back{background-image:url('/assets/backs-v169/dondorf-java-1879.webp')!important}
html[data-deck='russian-standard-1820'] .game .mini-back{background-image:url('/assets/backs-v169/russian-standard-1820.webp')!important}
@media(prefers-reduced-motion:reduce){body.in-game .game .opponent .portrait{transition:none}}
/* Navigation stays quiet; color marks continuation versus leaving a game. */
body #app .home-menu .home-nav{gap:8px}
body #app .home-menu .home-nav button,body #app .home-menu .home-primary{min-height:44px;padding:10px 14px;font-size:19px;line-height:1.3;background:transparent!important;border:1px solid #b5a17a70!important;border-radius:5px;box-shadow:none!important;text-shadow:none!important;margin-bottom:0}
body #app .home-menu .home-subhead h2{font-size:24px}
body #app .home-menu .ui-choice-surface{background:#18302533;border-color:#b5a17a70}
body #app .home-menu .ui-choice input:checked+.ui-choice-surface{background:#52694366;border-color:#c5b080}
body #modal #menu-resume,body #modal #club-resume,body .result #again{background-color:#304b38!important;border-color:#ac997580!important;color:#efe5cf!important}
body #modal #menu-leave.menu-surrender,body #modal #club-leave-menu,body .result #back-home{background:#895044!important;border-color:#b69c7b99!important;color:#efe5cf!important;box-shadow:inset 0 1px 0 #ead8ad26,0 3px 6px #08120d40!important}
@media(hover:hover){
 body #app .home-menu .home-nav button:hover:not(:disabled),body #app .home-menu .home-primary:hover:not(:disabled){background:#31493644!important;border-color:#cfb985!important;box-shadow:none!important}
 body #modal #menu-resume:hover,body #modal #club-resume:hover,body .result #again:hover{background-color:#3d6045!important}
 body #modal #menu-leave.menu-surrender:hover,body #modal #club-leave-menu:hover,body .result #back-home:hover{background:#9a6050!important}
}

/* All shared dialogs use the same close-button anchor. */
body #modal>.close,body #modal.is-game-menu>.close{position:absolute!important;float:none!important;top:10px!important;right:10px!important;margin:0!important;width:40px;height:40px;min-height:40px;padding:8px;display:grid;place-items:center;z-index:5}
body #modal>.close .ui-icon{margin:0;display:block}
body #modal h2{padding-right:38px}

/* Muted brass accent for the main ranked entry. */
body #app .home-menu .home-nav button[data-home-page="ranked"]{background:#71603a!important;border-color:#bfa36a!important;color:#fff0ce;box-shadow:inset 0 1px 0 #ead5a326,0 2px 4px #08120d30!important}
@media(hover:hover){body #app .home-menu .home-nav button[data-home-page="ranked"]:hover:not(:disabled){background:#857145!important;border-color:#dbc18b!important}}
body #app .home-menu .home-nav button[data-home-page="ranked"]:active:not(:disabled){background:#625332!important}

/* Keep rule selection and quick search visually connected. */
body #app .home-content:is([data-page="ranked"],[data-page="quick"])>.ui-choice{margin-bottom:14px}
body #app .home-content>button:is(#fast-ranked,#fast-casual){margin-top:0}
