/* Menus own their dimensions. Small choices never become full-screen dialogs. */
body dialog{height:fit-content;max-height:calc(100dvh - 32px);color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:16px;box-shadow:0 20px 80px #0005}
body dialog::backdrop{background:#05091480}
body dialog h2{margin:0;font-size:21px;line-height:1.25}
body dialog p{color:var(--muted);line-height:1.5}
body dialog button:focus:not(:focus-visible){outline:none}
#player-picker{position:fixed;inset:auto;margin:0;width:min(320px,calc(100vw - 16px));height:fit-content;max-height:calc(100dvh - 16px);overflow:auto;padding:12px;color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 32px #0005;font:14px/1.4 var(--font)}
#player-picker::backdrop{background:transparent}
.picker-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}.picker-heading strong{font-size:15px}.picker-heading button{width:36px;height:36px;padding:0;font-size:22px;color:var(--muted)}
.player-picker-options{display:grid;grid-template-columns:1fr 1fr;gap:6px}.player-picker-options button{position:relative;min-height:56px;padding:8px 10px;text-align:left;border:1px solid var(--line);background:transparent;border-radius:8px}.player-picker-options span,.player-picker-options small{display:block}.player-picker-options small{font-size:12px;color:var(--muted)}.player-picker-options button[aria-pressed=true]{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,var(--panel))}.player-picker-options button[aria-pressed=true]::after{content:'✓';position:absolute;right:9px;top:9px;color:var(--accent)}
/* A consistent frame, with scrolling confined to the active page. */
body #beta-hub,body[data-screen=mobile] #beta-hub{width:min(560px,calc(100vw - 24px));height:min(620px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:18px;overflow:hidden}
#beta-hub[open]{display:flex;flex-direction:column;gap:0}
#beta-hub .beta-heading{margin:0 0 10px;padding:0;min-height:40px;border:0;background:none}
#beta-hub .beta-heading h2{font-size:22px}
#beta-hub .beta-tabs{display:flex;gap:4px;margin:0 0 16px;padding:4px;border:0;border-radius:10px;background:var(--bg);overflow:visible}
#beta-hub .beta-tabs button,body[data-screen=mobile] #beta-hub .beta-tabs button{flex:1;min-width:0;min-height:40px;padding:7px;font-size:14px;border:0;border-radius:7px;background:none}
#beta-hub .beta-tabs button[aria-pressed=true]{background:var(--panel);color:var(--ink);box-shadow:0 1px 4px #0002}
#beta-hub>[data-beta-page]{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:auto;scrollbar-width:thin;padding:0 2px 2px}
#beta-hub #beta-status{min-height:0;max-height:70px;font-size:14px;margin:0 0 12px;padding:10px;border-radius:8px;background:color-mix(in srgb,var(--accent) 8%,var(--panel))}
#beta-hub #beta-status:empty,#beta-account-state:empty{display:none}
#beta-hub .beta-play,body[data-screen=mobile] #beta-hub .beta-play{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#beta-hub .beta-play>button,body[data-screen=mobile] #beta-hub .beta-play>button{display:flex;align-items:center;gap:12px;padding:14px;min-height:84px;margin:0;text-align:left;background:var(--panel);border:1px solid var(--line);border-radius:10px}
#beta-hub .beta-play>button:hover{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 7%,var(--panel))}
.beta-play>button>svg{width:26px;height:26px;flex:none;fill:none;stroke:var(--accent);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#beta-hub .beta-play strong{font-size:15px;font-weight:600}#beta-hub .beta-play span{font-size:13px;line-height:1.4;margin-top:3px}
#beta-hub .hub-footer{display:flex;justify-content:flex-end;gap:4px;flex:none;margin:16px 0 0;padding:8px 0 0;border-top:1px solid var(--line);background:transparent}
.hub-footer button{min-height:36px;padding:6px 10px;color:var(--muted);font-size:13px}.hub-footer button:hover,.hub-footer button[aria-pressed=true]{color:var(--accent)}
#beta-hub h3{font-size:15px;margin:16px 0 8px}#beta-hub #beta-setup h3{margin:0}.section-heading #beta-setup-close{width:40px;padding:0;font-size:20px}
.games-nav{display:flex;gap:14px;border-bottom:1px solid var(--line);margin:0 0 14px}.games-nav button{padding:7px 2px;min-height:38px;font-size:14px;color:var(--muted);border-radius:0;border-bottom:2px solid transparent}.games-nav button[aria-pressed=true]{border-bottom-color:var(--accent);color:var(--ink)}
.menu-section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}#beta-hub .menu-section-heading h3{margin:0}
#beta-hub .quiet-action{border:0;font-size:13px;color:var(--muted);padding:6px 10px}
#beta-hub .beta-actions{align-items:center;gap:8px;margin-bottom:6px}#beta-hub .beta-actions button{font-size:14px;padding:8px 12px}
.save-options{margin-left:auto;font-size:13px}.save-options>summary{cursor:pointer;min-height:40px;padding:10px 4px}.save-options>div{display:flex;gap:4px;flex-wrap:wrap;margin:6px 0}
#beta-hub .lobby-game-row{gap:6px;padding:7px 0;flex-wrap:nowrap;border-bottom:1px solid var(--line)}#beta-hub .lobby-game-row>.beta-game-row{flex:1;min-width:0;border:0;margin:0}.beta-game-row strong{font-size:14px;overflow-wrap:anywhere}#beta-hub .lobby-leave{font-size:12px;padding:6px 8px;border:0;color:var(--muted)}#beta-hub .lobby-leave:hover{color:var(--selected)}
#beta-hub .beta-note{font-size:13px;margin:10px 0}#beta-hub .beta-buy{display:block;width:100%;margin:14px 0 0;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--bg);text-decoration:none}#beta-hub .beta-buy strong,#beta-hub .beta-buy span{display:block}#beta-hub .beta-buy strong{font-size:15px}#beta-hub .beta-buy span{font-size:13px;color:var(--muted);margin-top:3px}
#beta-hub .beta-guide{margin:0;padding:0;border-bottom:1px solid var(--line);font-size:14px}#beta-hub .beta-guide summary{min-height:46px;padding:12px 0;cursor:pointer}#beta-hub .beta-guide p{font-size:14px;margin:6px 0 12px}#beta-hub .beta-guide form{padding:8px 0 16px}.help-links a{display:block;padding:12px 0;color:var(--accent);font-size:14px}
#beta-hub #community-search{display:flex;gap:6px}.text-action{font:inherit;padding:0;color:var(--accent);text-decoration:underline;min-height:32px}
#beta-hub .profile-card{margin-top:0;padding:12px}.menu-setting-group{border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.menu-setting-group .beta-check{justify-content:space-between;margin:0;padding:8px 0;min-height:44px}.menu-setting-group .beta-check+.beta-check{border-top:1px solid var(--line)}.signout-link{display:inline-flex;align-items:center;min-height:44px;margin-top:10px;color:var(--muted);font-size:13px}
/* Controls use quiet rows; previews and choices remain the focus. */
body #settings-dialog{width:min(560px,calc(100vw - 24px));height:min(620px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:18px;overflow:hidden}
#settings-dialog[open]{display:flex;flex-direction:column}
.settings-heading,.settings-tabs{flex:none}.settings-heading h2{font-size:21px}.settings-tabs{margin:8px 0 12px;gap:0}
#settings-dialog .settings-page{flex:0 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;gap:12px;padding:0 2px}
#settings-dialog .appearance-preview{height:130px;min-height:130px}.appearance-preview svg{height:120px;width:205px}
.theme-setting{display:flex;align-items:center;justify-content:space-between;min-height:44px;font-size:14px}.theme-setting .theme-switch>span:not(.switch-track){display:none}
.setting-chip{gap:9px;min-height:54px;padding:8px 10px}.setting-chip>span:last-child{font-size:14px}.tile-swatch{width:64px;height:42px}.material-swatch{width:42px;height:32px}
#settings-dialog .setting-toggle{padding:8px 2px!important;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none!important;min-height:46px!important}
#settings-dialog .setting-toggle-mark{width:34px;height:20px;border-radius:12px;font-size:0;background:var(--line);position:relative;border:0}
#settings-dialog .setting-toggle-mark::after{content:'';position:absolute;left:3px;top:3px;width:14px;height:14px;background:var(--panel);border-radius:50%;transition:transform .15s}
#settings-dialog .setting-toggle:has(input:checked) .setting-toggle-mark{background:var(--accent)}#settings-dialog .setting-toggle:has(input:checked) .setting-toggle-mark::after{transform:translateX(14px)}
#settings-dialog #reset-panel-layout.settings-reset{width:100%;min-width:0;min-height:44px;height:auto;font-size:14px;color:var(--muted);padding:8px;border:1px solid var(--line)}
.about-game{padding:8px 0}.about-game strong{font-size:18px}.about-game p{font-size:14px;margin:4px 0}.settings-page details{border-bottom:1px solid var(--line)}.settings-page details p{font-size:14px;margin:8px 0 14px}.advanced-actions{display:grid;gap:6px;padding-bottom:12px}.advanced-actions button{min-height:44px;border:1px solid var(--line);font-size:14px}
.game-menu-group{display:grid;padding:4px 0}.game-menu-group+.game-menu-group{border-top:1px solid var(--line);margin-top:3px;padding-top:8px}.game-menu-label{font-size:12px;padding:4px 12px;color:var(--muted)}
body #online-dialog{width:min(460px,calc(100vw - 24px));height:fit-content;max-height:calc(100dvh - 24px);padding:18px}#online-dialog h2{font-size:21px}#online-dialog .lobby-tabs{margin-top:10px;margin-bottom:12px;padding-bottom:6px}#online-dialog .setting{grid-template-columns:100px 1fr;margin-bottom:12px;font-size:14px}#online-dialog .beta-check{min-height:44px}#online-dialog input[type=checkbox]{width:20px;min-height:20px;height:20px;flex:none}
body .action-dialog{height:fit-content;width:min(360px,calc(100vw - 24px));max-width:360px;max-height:calc(100dvh - 24px)}
@media(max-width:460px){#beta-hub .beta-play,body[data-screen=mobile] #beta-hub .beta-play{grid-template-columns:1fr}#beta-hub .beta-play>button,body[data-screen=mobile] #beta-hub .beta-play>button{min-height:66px;padding:11px 13px}.setting-chip{gap:6px;padding:8px}.tile-swatch{width:52px}.setting-chips{gap:6px}#beta-hub .beta-tabs button{font-size:14px}body #settings-dialog,body #beta-hub{padding:14px}}
@media(prefers-reduced-motion:reduce){.setting-toggle-mark::after{transition:none}}

/* Primary navigation is icon-led; game names remain readable. */
body .header-tools #beta-sync,body[data-screen=mobile] .header-tools #beta-sync{position:relative;display:grid;place-items:center;width:42px;min-width:42px;height:42px;min-height:42px;flex:none;padding:9px;margin:0;color:var(--ink);border:1px solid transparent;border-radius:9px}
.header-tools #beta-sync svg,#play-menu svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
#beta-sync[data-state=busy]::after,#beta-sync[data-state=error]::after{position:absolute;right:2px;top:0;width:14px;height:14px;border-radius:50%;background:var(--accent);color:var(--panel);font:700 11px/14px var(--font);content:'•';text-align:center}#beta-sync[data-state=error]::after{content:'!';background:var(--selected)}
body #play-menu,body[data-screen=mobile] #play-menu{display:grid;place-items:center;width:44px;min-width:44px;height:42px;padding:9px}
.workspace-menu{margin-left:auto}.workspace-menu>summary{width:42px;min-width:42px;height:42px;padding:9px}.workspace-menu>summary svg{width:24px;height:24px;fill:currentColor;stroke:none}
.opening-hex{fill:color-mix(in srgb,var(--selected) 9%,transparent);stroke:var(--selected);stroke-width:2;stroke-dasharray:4 4;vector-effect:non-scaling-stroke}.opening-center{fill:var(--selected)}
@media(max-width:460px){body[data-screen=mobile] .header-tools #beta-sync{width:36px;min-width:36px;padding:7px}body[data-screen=mobile] #play-menu{width:40px;min-width:40px}}

/* Device layout is a direct setting; color selection is a row of swatches. */
.layout-choice .setting-chips{display:flex;gap:6px}.layout-choice .setting-chip{flex:1;justify-content:center;min-height:44px;padding:8px}.layout-choice svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.palette-choice .setting-chips{display:flex;flex-wrap:wrap;gap:10px;padding:4px}
.palette-choice .setting-chip{position:relative;display:grid;place-items:center;flex:none;width:40px;min-width:40px;height:40px;min-height:40px;padding:3px;border-radius:50%;border:2px solid transparent;background:none}
.palette-choice .setting-chip .palette-swatch{width:28px;height:28px;border-radius:50%;margin:0}.palette-choice .setting-chip>span:last-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.palette-choice .setting-chip[aria-pressed=true]{border-color:var(--ink);background:none}.palette-choice .setting-chip:hover{border-color:var(--accent)}

/* Panels can be dismissed or returned to the dock without resetting the workspace. */
.panel-close{display:inline-grid;place-items:center;flex:none;width:32px;min-width:32px;height:36px;min-height:36px;margin-left:4px;padding:0;border:0;background:transparent;border-radius:7px;color:var(--muted);font-size:23px;line-height:1}.panel-close:hover{color:var(--ink);background:var(--bg)}
.game-widget :is(.section-heading,.position-heading,.stat-heading){flex-wrap:nowrap}.game-widget :is(.section-heading,.position-heading,.stat-heading)>h2{min-width:0;flex:1}.game-widget .info-button{flex:none}
.panel-dock-hint{position:fixed;pointer-events:none;z-index:460;border:2px solid var(--accent);border-radius:12px;background:color-mix(in srgb,var(--accent) 9%,transparent)}
body .panel-rail,body .panel-rail .drawer-content{scrollbar-width:none}body .panel-rail::-webkit-scrollbar,body .panel-rail .drawer-content::-webkit-scrollbar{display:none}

/* Reserves own a full-width row, independent of open information rails. */
body[data-screen=desktop][data-reserves=bottom] .playground{grid-template-rows:auto minmax(0,1fr) auto auto}
body[data-screen=desktop][data-reserves=bottom] .playground>#banks{grid-column:1/-1;grid-row:3;justify-self:center;width:min(100%,1000px)}
body[data-screen=desktop][data-reserves=bottom] .playground>.board-footer{grid-row:4}
body #history-popover,body .drawer-content>#history-popover{max-height:min(340px,40dvh);overflow:hidden;display:flex;flex-direction:column}
body #history-popover .history-panel{min-height:0;display:flex;flex-direction:column;overflow:hidden}
body #history-popover #history-list{max-height:260px;overflow:auto;scrollbar-width:none}
body #history-popover #history-list::-webkit-scrollbar{display:none}
body #history-popover .history-move{min-height:36px;padding:6px 8px}
.board-footer,.board-footer button,.board-footer summary{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation}
.account-avatar,#profile-avatar{overflow:hidden}.account-avatar img,#profile-avatar img{width:100%;height:100%;object-fit:cover}
.profile-photo-actions{display:flex;align-items:center;gap:8px;margin:10px 0}.profile-photo-actions button{font-size:14px}
html[data-palette=steel]{--bg:#141b23;--panel:#1d2732;--line:#3e4d5e;--accent:#a6bfd6;--ink:#edf2f7;--muted:#afbdcb;--selected:#d9e8f4}
html[data-palette=olive]{--bg:#191e18;--panel:#242c22;--line:#485443;--accent:#b4c28a;--ink:#f0f2e9;--muted:#b7bfae;--selected:#d9ce94}
html[data-palette=copper]{--bg:#211a17;--panel:#2d2420;--line:#614c40;--accent:#d5a076;--ink:#f6eee7;--muted:#c5b3a5;--selected:#eac7a4}
html[data-theme=light][data-palette=steel]{--bg:#dce3e9;--panel:#f4f7fa;--line:#9cabb8;--accent:#365e7e;--ink:#192b3a;--muted:#526574;--selected:#244b6b}
html[data-theme=light][data-palette=olive]{--bg:#e1e5d8;--panel:#f5f6ef;--line:#a4af92;--accent:#526338;--ink:#253020;--muted:#5e6a51;--selected:#655325}
html[data-theme=light][data-palette=copper]{--bg:#e8ddd4;--panel:#faf5f0;--line:#baa18d;--accent:#895430;--ink:#38271c;--muted:#786150;--selected:#814521}

/* Equal analysis actions keep the choices, rather than instructions, in focus. */
body .explore-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;width:100%}
body .explore-actions button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;width:100%;min-height:66px;padding:8px 4px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--accent);font-size:14px;line-height:1.25;text-align:center}
body .explore-actions button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body .explore-actions button:hover,body .explore-actions button[aria-pressed=true]{background:color-mix(in srgb,var(--accent) 12%,var(--panel));border-color:var(--accent)}
body #explore-hint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

body .history-buttons button{display:inline-grid;place-items:center;width:40px;height:40px;padding:7px}
.history-buttons svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body .history-buttons #pause:before{content:'';display:block;width:20px;height:20px;background:currentColor;clip-path:polygon(20% 10%,40% 10%,40% 90%,20% 90%,20% 10%,60% 10%,80% 10%,80% 90%,60% 90%,60% 10%)}
body .history-buttons #pause[data-symbol="▶"]:before{clip-path:polygon(20% 5%,90% 50%,20% 95%)}
body .board-footer #change-panel:not([hidden]){display:block;flex:none}
body .board-footer .move-context{min-width:84px;flex:1}
body .board-footer #change-panel>summary{width:40px;min-width:40px;height:40px}
body .board-footer #last-move{flex:0 1 auto;min-width:32px;max-width:180px}
.history-replay-actions{display:flex;gap:6px;margin:6px 0}.history-replay-actions button{flex:1;border:1px solid var(--line);min-height:36px}
@media(max-width:600px){body .board-footer{flex-wrap:wrap!important}body .board-footer .history-buttons{flex:0 0 auto}body .board-footer .move-context{min-width:80px}body .board-footer #last-move{max-width:100px}body .history-buttons button{width:32px}}

@media (hover:none){body .explore-actions button:hover:not([aria-pressed=true]){background:var(--panel);border-color:var(--line)}}
body .explore-actions button[aria-pressed=true]{background:color-mix(in srgb,var(--accent) 24%,var(--panel));border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
/* Appearance uses material and tile samples instead of repeated names. */
#settings-look .appearance-preview>span{display:none}
#settings-look .theme-setting{justify-content:center;gap:16px;padding:12px 0;min-height:60px}
#settings-look .theme-symbol{display:grid;place-items:center;color:var(--muted)}
#settings-look .theme-symbol svg,#settings-look legend svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#settings-look .theme-switch{min-width:52px;min-height:44px;justify-content:center;position:relative}
#settings-look .theme-switch:focus-within{outline:none}
#settings-look .switch-track{box-sizing:border-box;width:52px;height:28px;padding:4px;border-radius:20px}
#settings-look .switch-track:after{width:20px;height:20px}
#settings-look .theme-switch input:checked+.switch-track:after{transform:translateX(24px)}
#settings-look .theme-switch:has(input:focus-visible) .switch-track{outline:2px solid var(--accent);outline-offset:4px}
#settings-look .setting-choice{margin:12px 0 18px}
#settings-look .setting-choice legend{padding:0 0 8px;color:var(--muted)}
#settings-look [data-choice=table-surface] .setting-chips,#settings-look [data-choice=tile-style] .setting-chips{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
#settings-look [data-choice=table-surface] .setting-chip,#settings-look [data-choice=tile-style] .setting-chip{justify-content:center;min-height:76px;padding:8px}
#settings-look [data-choice=table-surface] .setting-chip>span:last-child,#settings-look [data-choice=tile-style] .setting-chip>span:last-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#settings-look .material-swatch{width:100%;height:54px;background-size:cover;border-radius:6px}
#settings-look .tile-swatch{width:100%;max-width:112px;height:58px}
#settings-look .palette-choice .setting-chips{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:4px;padding:0}
#settings-look .palette-choice .setting-chip{width:100%;min-width:0;height:44px;min-height:44px;border-radius:12px}
#settings-look .palette-choice .palette-swatch{width:28px;height:28px;box-shadow:inset 0 0 0 1px #ffffff40}
html[data-palette=blackout]{--bg:#000;--panel:#080808;--line:#353535;--accent:#d7d7d7;--ink:#f4f4f4;--muted:#aaa;--selected:#fff}
html[data-theme=light][data-palette=blackout]{--bg:#e9e9e9;--panel:#fff;--line:#aaa;--accent:#333;--ink:#111;--muted:#555;--selected:#111}
@media(max-width:540px){#settings-look .palette-choice .setting-chips{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}#settings-look [data-choice=tile-style] .setting-chips,#settings-look [data-choice=table-surface] .setting-chips{gap:6px}#settings-look .tile-swatch{height:46px}#settings-look .material-swatch{height:46px}}

.rules-slider{display:flex;align-items:center;justify-content:center;gap:14px;margin:18px 0;font-size:14px}
.rules-slider input{appearance:none;width:64px;height:32px;border-radius:20px;border:1px solid var(--line);background:var(--bg);position:relative;cursor:pointer;margin:0;flex:none}
.rules-slider input:before{content:'';position:absolute;width:24px;height:24px;left:3px;top:3px;border-radius:50%;background:var(--muted);transition:transform .18s,background .18s}
.rules-slider input:checked{background:color-mix(in srgb,var(--accent) 24%,var(--panel))}.rules-slider input:checked:before{transform:translateX(32px);background:var(--accent)}
.color-choices{display:flex;justify-content:center;gap:10px;margin:12px 0}.color-choices button{width:76px;min-height:54px;display:grid;place-items:center;border:1px solid var(--line);border-radius:10px;background:var(--bg)}.color-choices button[aria-pressed=true]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--panel))}.color-disc{width:28px;height:28px;border-radius:50%;border:1px solid #88918d}.color-disc.w{background:#f6f2df}.color-disc.b{background:#101415}
#beta-hub #beta-setup{border:0;padding:0;margin:0;box-shadow:none}#beta-hub #beta-setup>.primary{width:100%;min-height:44px;margin-top:12px}
/* Direct game setup and shared symbolic actions. */
body #beta-hub #beta-setup{display:flex;flex-direction:column;justify-content:flex-start;gap:16px;height:auto;min-height:0;padding:0 4px 12px}
#beta-hub #beta-setup>.section-heading{position:static;flex:none;margin:0;padding:0;min-height:40px}
#beta-hub #bot-options{display:grid;gap:18px;padding:8px 0}
#beta-hub .color-choices{margin:0;gap:12px}
#beta-hub .color-choices button{width:78px;min-height:62px}
.color-choices svg{width:29px;height:29px;color:var(--ink)}
.difficulty-choices{display:flex;justify-content:center;gap:10px}
.difficulty-choices button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:76px;min-height:62px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}
.difficulty-choices button>span{height:22px;font-size:20px;line-height:22px;letter-spacing:2px}.difficulty-choices small{font-size:12px;color:var(--muted)}
.difficulty-choices button[aria-pressed=true]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--panel))}
#local-players{display:flex;justify-content:center;align-items:center;gap:30px;padding:20px 0;font-size:26px;color:var(--muted)}
#beta-hub #beta-setup .rules-slider{margin:0;padding:12px 0;border-top:1px solid var(--line)}
#beta-hub #beta-setup>.start-game-icon{display:grid;place-items:center;min-height:48px;margin:0;flex:none}
.start-game-icon svg{width:25px;height:25px;fill:currentColor;stroke:none}
body #beta-hub .icon-action{display:inline-flex;align-items:center;justify-content:center;flex:none;width:42px;min-width:42px;min-height:42px;padding:8px;font-size:24px;line-height:1;border-radius:9px}
.icon-action svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body #beta-hub .lobby-leave.cancel-invite{color:#e45c68;background:color-mix(in srgb,#e45c68 8%,var(--panel));font-size:26px}body #beta-hub .lobby-leave.cancel-invite:hover{background:color-mix(in srgb,#e45c68 20%,var(--panel))}
#beta-hub .community-overview{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;margin-bottom:16px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--accent) 7%,var(--panel))}.community-overview strong{font-size:16px}.community-overview #community-count{display:block;font-size:12px;color:var(--muted);margin-top:5px}.community-overview .community-actions{display:flex;gap:6px;margin:0}
#beta-hub .community-section{margin-bottom:16px}#beta-hub .community-section h3{margin:0 0 10px}.community-player-heading{display:flex;align-items:center;justify-content:space-between}.community-player-heading button{color:var(--muted)}
.community-empty{display:flex;align-items:center;justify-content:center;gap:12px;min-height:88px;padding:14px;border:1px dashed var(--line);border-radius:12px;color:var(--muted)}.community-empty>span{font-size:30px}.community-empty strong{font-size:14px;font-weight:400}
#beta-hub #community-search{margin:4px 0 12px;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}#community-search input{border:0;background:transparent;min-width:0;flex:1}
#community-players{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}#beta-hub .community-row{display:flex;align-items:center;gap:12px;margin:0 0 8px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}#beta-hub .community-row>div{flex:1;min-width:0}.community-row strong{display:block;font-size:14px}.community-row span:not(.account-avatar){font-size:12px;color:var(--muted)}.community-row p{font-size:13px;line-height:1.4;margin:6px 0 0}.community-row .account-avatar{width:38px;height:38px;flex:none}
/* The friend flow shares a stable frame across all tabs. */
body #online-dialog{width:min(560px,calc(100vw - 24px));height:min(700px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);overflow:hidden;padding:18px}
body #online-dialog[open]{display:flex;flex-direction:column;gap:10px}#online-dialog>.section-heading,#online-dialog>.lobby-tabs{flex:none;margin:0}#online-dialog>[data-lobby-page]{flex:1;min-height:0;overflow:auto;scrollbar-gutter:stable;padding:0 3px}
#online-dialog #create-room{display:flex;flex-direction:column;gap:12px;margin:0;padding:0}#online-dialog .color-choices{margin:2px 0 4px}.color-disc.random{background:linear-gradient(90deg,#f6f2df 50%,#101415 50%)}
#online-dialog .rules-slider input{appearance:none;width:64px;min-width:64px;height:32px;min-height:32px;max-height:32px;padding:0;box-sizing:border-box;border-radius:20px}
#online-dialog .rules-slider{margin:0;padding:8px 0}.friend-options{display:grid;gap:8px;padding:8px 0;border-top:1px solid var(--line)}.friend-option{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px}
.option-buttons{display:flex;gap:4px}.option-buttons button{min-height:38px;padding:7px 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);font-size:13px}.option-buttons button[aria-pressed=true]{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 18%,var(--panel));box-shadow:inset 0 0 0 1px var(--accent)}.clock-modes button{flex:1;min-width:0;padding:8px 6px}.friend-clock{display:grid;gap:12px}.friend-clock label{display:grid;grid-template-columns:1fr auto;font-size:13px;gap:6px;margin-top:10px}.friend-clock input[type=range]{grid-column:1/-1;width:100%;margin:0;height:22px;accent-color:var(--accent)}.friend-clock output{font-variant-numeric:tabular-nums;color:var(--accent)}
#online-dialog .lobby-footnote{font-size:12px;margin:0;color:var(--muted)}#online-dialog #lobby-status:empty{display:none}#online-dialog #lobby-status{flex:none;font-size:13px;margin:0;max-height:50px;overflow:auto}
.match-clocks{display:flex;align-items:center;gap:6px;font-variant-numeric:tabular-nums;font-size:13px;flex:none}.clock-side{padding:5px 7px;border:1px solid var(--line);border-radius:6px;color:var(--muted)}.clock-side.ticking{color:var(--ink);border-color:var(--accent)}
body.has-match-clock .board-toolbar>.turn{display:none}body .board-toolbar>.match-clocks{margin-right:auto;flex:0 0 auto;gap:6px;white-space:nowrap}body .board-toolbar .clock-side{display:block;width:10ch;text-align:center;font-size:13px;font-weight:500;line-height:1.5;background:color-mix(in srgb,var(--panel) 85%,transparent);font-variant-numeric:tabular-nums}.clock-side.ticking{box-shadow:inset 0 -2px var(--accent)}body[data-screen=mobile] .board-toolbar .clock-side{font-size:12px;padding:4px}.match-clocks[hidden]{display:none!important}

/* Tool states follow the control value, never a touch-generated hover. */
html body .board-tools :is(button,summary){-webkit-tap-highlight-color:transparent}
html body .board-tools>button:not([aria-pressed=true]):not([aria-expanded=true]),
html body .board-tools>.panel-controls>button:not([aria-pressed=true]),
html body .board-tools .control-picker:not([open])>summary{
 background:var(--panel);border-color:var(--line);color:var(--muted);box-shadow:none;
}
html body .board-tools>button[aria-pressed=true],
html body .board-tools>.panel-controls>button[aria-pressed=true],
html body .board-tools .control-picker[open]>summary,
html body .board-tools #room-toggle[aria-expanded=true]{
 background:color-mix(in srgb,var(--accent) 16%,var(--panel));border-color:var(--accent);color:var(--ink);box-shadow:inset 0 0 0 1px var(--accent);
}
/* Identical 44px columns and 4px gaps; the drawer surface extends beyond them. */
html body .board-tools{position:relative;--tool-size:44px;--tool-gap:4px}
html body .board-tools>.overlay-anchor{position:static}
html body .board-tools .overlay-anchor>.overlay-strip{
 position:absolute;left:auto;right:-7px;top:calc(100% + 6px);transform:none;
 width:max-content;max-width:calc(100vw - 12px);padding:6px;margin:0;
}
html body .board-tools .overlay-strip .overlay-options{
 display:grid;grid-template-columns:repeat(6,var(--tool-size));gap:var(--tool-gap);min-width:0;overflow:visible;
}
html body .board-tools .overlay-strip .overlay-chip{
 width:var(--tool-size);height:var(--tool-size);min-height:var(--tool-size)!important;
 background:var(--panel);border-color:var(--line);color:var(--muted);box-shadow:none;
}
html body .board-tools .overlay-chip .overlay-symbol{color:var(--muted);opacity:.85}
html body .board-tools .overlay-chip:has(input:checked){
 background:color-mix(in srgb,var(--overlay-ink) 24%,var(--panel));border-color:var(--overlay-ink);box-shadow:inset 0 0 0 1px var(--overlay-ink),0 0 6px color-mix(in srgb,var(--overlay-ink) 18%,transparent);
}
html body .board-tools .overlay-chip:has(input:checked) .overlay-symbol{color:var(--overlay-ink);opacity:1}
html body .board-tools .overlay-chip input{z-index:1}
.workspace-menu-items #export-game{border-bottom:0;margin-bottom:0}
@media(max-width:310px){html body .board-tools .overlay-strip .overlay-options{grid-template-columns:repeat(3,var(--tool-size))}}

.workspace-menu-items #reset-panel-layout{width:100%;min-width:0;height:auto;min-height:44px;padding:10px 12px;font-size:14px;text-align:left;border:0;background:transparent;color:var(--ink)}
.workspace-menu-items #reset-panel-layout:focus-visible{background:var(--bg)}
html body .board-tools .overlay-chip:has(#spawn-dots:checked) .overlay-symbol{color:var(--ink)}

.workspace-menu-items #import-game{border-top:0;border-radius:7px;margin-top:0;padding-top:10px}
/* The invitation form fits by removing excess spacing, not by hiding overflow. */
#online-dialog #create-room{gap:8px}
#online-dialog>[data-lobby-page]{overflow-x:hidden;scrollbar-gutter:auto;padding:0 2px 2px;box-sizing:border-box}
#online-dialog .friend-clock{gap:8px}
#online-dialog .friend-clock label{margin-top:6px}
#online-dialog .friend-clock input[type=range]{appearance:none;box-sizing:border-box;padding:0;border:0;min-height:26px;height:26px;background:transparent}
#online-dialog .friend-clock input[type=range]::-webkit-slider-runnable-track{height:5px;background:var(--line);border-radius:8px}
#online-dialog .friend-clock input[type=range]::-webkit-slider-thumb{appearance:none;width:17px;height:17px;border:0;border-radius:50%;background:var(--accent);margin-top:-6px}
#online-dialog .friend-clock input[type=range]::-moz-range-track{height:5px;background:var(--line);border-radius:8px}
#online-dialog .friend-clock input[type=range]::-moz-range-thumb{width:17px;height:17px;border:0;border-radius:50%;background:var(--accent)}
#online-dialog .friend-options{gap:6px;padding:6px 0}
#online-dialog .rules-slider{padding:4px 0}
#online-dialog .color-choices{margin:0}
#online-dialog .beta-check{margin:0;min-height:40px}
#online-dialog .lobby-footnote{line-height:1.35}
.invite-share-actions,.waiting-invite-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.invite-share-actions[hidden],.waiting-invite-actions[hidden]{display:none!important}
#room-dialog .invite-share-actions>button{flex:1;width:auto;margin:8px 0;min-height:44px}
#room-qr,.waiting-invite-actions button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--ink);font-size:14px}
#room-qr svg,.waiting-invite-actions svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#empty-board .waiting-invite-actions{pointer-events:auto;margin-top:18px}
#empty-board .waiting-invite-actions span{margin:0;font-size:14px}
#invite-qr-dialog{width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 24px);box-sizing:border-box;overflow:auto;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--ink);text-align:center}
#invite-qr-dialog::backdrop{background:#0009}
.invite-qr-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.invite-qr-heading h2{font-size:21px;margin:0}.invite-qr-heading button{min-width:44px;min-height:44px;font-size:24px}
#invite-qr-dialog>p{font-size:14px;line-height:1.45;margin:12px 0}
.invite-qr-code{width:100%;max-width:304px;margin:auto;line-height:0}.invite-qr-code svg{display:block;width:100%;height:auto;background:white;border-radius:4px}
#invite-qr-dialog .invite-qr-copy{min-height:44px;width:100%;border:1px solid var(--line);border-radius:8px;font-size:14px}
#invite-qr-dialog .invite-qr-note,.join-qr-hint{font-size:13px;color:var(--muted);line-height:1.45}
@media(max-height:550px) and (min-width:600px){#invite-qr-dialog{width:520px;display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}#invite-qr-dialog:not([open]){display:none}.invite-qr-heading{grid-column:1/-1}.invite-qr-code{grid-column:1;grid-row:2/6;width:min(240px,48dvh)}#invite-qr-dialog>p{margin:4px 0}}
body #online-dialog{height:min(740px,calc(100dvh - 24px))}
.invite-qr-fallback{box-sizing:border-box;width:100%;min-width:0;min-height:42px;margin-top:8px;border:1px solid var(--line);border-radius:7px;background:var(--bg);color:var(--ink);padding:8px;font-size:13px}

/* A compact install action below the game choices, within their scroll area. */
#beta-hub .install-card{grid-column:1/-1;margin-top:8px}
#beta-hub .install-card[hidden]{display:none}
#beta-hub #install-game{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:46px;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--accent) 10%,var(--panel));color:var(--ink);font-size:15px;font-weight:600}
#beta-hub #install-game:hover{border-color:var(--accent)}
#beta-hub #install-game svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#beta-hub #install-game span{font-size:15px;margin:0}
#beta-hub #install-help{margin:10px 2px 0;font-size:14px;line-height:1.5;color:var(--muted)}

#board-chat-toggle{position:relative}
#board-chat-toggle svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#board-chat-toggle.has-unread{border-color:var(--accent);box-shadow:0 0 10px color-mix(in srgb,var(--accent) 35%,transparent)}
#board-chat-toggle.has-unread:after{content:'';position:absolute;right:5px;top:5px;width:7px;height:7px;border-radius:50%;background:var(--ink);border:2px solid var(--panel)}
#board-chat-dialog{width:min(420px,calc(100vw - 24px));max-height:65dvh;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--ink)}
#board-chat-dialog>header{display:flex;justify-content:space-between;align-items:center;padding:0;margin-bottom:12px;background:none;border:0}
#board-chat-dialog h2{margin:0;font-size:20px}
#board-chat-dialog>header button{width:36px;height:36px;font-size:24px}
#board-chat-dialog .room-chat{display:block;border:0;margin:0;padding:0}
#board-chat-dialog #chat-messages{max-height:35dvh;overflow:auto;overflow-wrap:anywhere}
#board-chat-toast{position:fixed;z-index:100;left:12px;max-width:min(340px,calc(100vw - 24px));padding:12px 16px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink);box-shadow:0 4px 18px #0005;text-align:left;overflow-wrap:anywhere}
#board-chat-toast strong{display:block;font-size:13px;color:var(--muted);margin-bottom:4px}
#board-chat-toast span{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:15px}
#turn-bell[data-count]:not([data-count=""]):after{content:'';width:7px;height:7px;min-width:0;padding:0;right:3px;top:3px;background:var(--ink);border:2px solid var(--panel);border-radius:50%}
#turn-notifications{padding:12px;max-height:min(420px,65dvh)}
.notifications-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.notifications-heading>button{width:32px;height:32px;font-size:22px;padding:0}
#turn-notifications .turn-list{display:grid;gap:6px;font-size:14px}
#turn-notifications .beta-game-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;padding:12px;margin:0;border:1px solid var(--line);border-radius:9px;text-align:left;overflow-wrap:anywhere}
#turn-notifications .beta-game-row strong{font-size:15px;font-weight:600}
#turn-notifications .beta-game-row span{font-size:13px;color:var(--muted)}

body .board-tools #board-chat-toggle{width:44px;min-width:44px;flex:0 0 44px;padding:9px;border:1px solid var(--line);border-radius:8px;background:var(--panel)}
body .board-tools #board-chat-toggle.has-unread{color:var(--ink);border-color:var(--accent);box-shadow:0 0 10px color-mix(in srgb,var(--accent) 35%,transparent)}
body .board-tools #board-chat-toggle[aria-expanded=true]{background:color-mix(in srgb,var(--accent) 14%,var(--panel))}
#board-chat-dialog #chat-messages:empty:before{content:'…';color:var(--muted)}

.push-settings{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.push-settings>strong{font-size:14px}.push-settings p{font-size:13px;color:var(--muted);line-height:1.5;margin:8px 0}
.push-settings>div{display:flex;flex-wrap:wrap;gap:6px}.push-settings button{min-height:40px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;font-size:14px}

#board-chat-dialog{padding:0;width:min(440px,calc(100vw - 24px));overflow:hidden;border-radius:16px}
#board-chat-dialog>header{display:flex;align-items:center;gap:8px;margin:0;padding:14px 16px;border-bottom:1px solid var(--line)}
#board-chat-dialog>header h2{flex:1;margin:0;font-size:18px}
#board-chat-dialog>header button{position:static;flex:none;width:36px;min-height:36px;height:36px;padding:7px}
#board-chat-dialog #chat-messages{display:flex;flex-direction:column;gap:10px;height:clamp(160px,32dvh,320px);max-height:40dvh;padding:16px;overflow:auto;overscroll-behavior:contain}
#board-chat-dialog #chat-messages:empty:before{content:'Say hello to your opponent.';margin:auto;text-align:center;font-size:14px;color:var(--muted)}
#board-chat-dialog .chat-message{position:relative;align-self:flex-start;max-width:88%;padding:10px 30px 10px 12px;margin:0;border-radius:12px 12px 12px 3px;background:var(--bg);font-size:14px;line-height:1.45;white-space:pre-wrap}
#board-chat-dialog .chat-message.own{align-self:flex-end;padding-right:12px;border-radius:12px 12px 3px 12px;background:color-mix(in srgb,var(--accent) 18%,var(--panel))}
#board-chat-dialog .chat-message strong{display:block;font-size:11px;color:var(--muted);margin-bottom:3px}
#board-chat-dialog .chat-message>button{position:absolute;right:2px;top:4px;min-height:28px;width:26px;padding:0;opacity:.6}
#board-chat-dialog .chat-controls{padding:12px;border-top:1px solid var(--line);margin:0}
#board-chat-dialog #chat-form{display:flex;gap:8px;width:100%;min-width:0}
#board-chat-dialog #chat-text{flex:1;min-width:0;border-radius:10px;font-size:16px;min-height:44px}
#board-chat-dialog #chat-send{flex:0 0 44px;border-radius:10px}
#beta-hub .work-in-progress{grid-column:1/-1;text-align:center;color:var(--muted);font-size:12px;line-height:1.5;margin:0 0 4px}

.challenge-card{padding:12px;border:1px solid var(--line);border-radius:10px;margin-bottom:8px}
.challenge-card>strong,.challenge-card>span{display:block;overflow-wrap:anywhere}
.challenge-card>span{font-size:13px;color:var(--muted);margin:6px 0 10px}
.challenge-card>div{display:flex;gap:8px}.challenge-card button{min-height:40px;padding:8px 12px}

.scan-invitation{display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;margin:12px 0;border:1px solid var(--line);border-radius:10px}
#qr-scanner,#player-account-dialog{width:min(440px,calc(100vw - 24px));max-height:85dvh;padding:18px;border-radius:16px;overflow:auto}
#qr-scanner>header,#player-account-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
#qr-scanner h2,#player-account-dialog h2{font-size:20px;margin:0}
#qr-scanner header button,#player-account-dialog header button{width:36px;min-height:36px;padding:0;font-size:24px}
#qr-scanner video{display:block;width:100%;aspect-ratio:1;object-fit:cover;background:#111;border-radius:12px}
#qr-scanner p,#player-account-dialog p,.player-account p{font-size:13px;color:var(--muted);line-height:1.5}
.player-account{padding:14px 0;margin:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.player-account h3{margin:0;font-size:16px}
.account-actions{display:flex;gap:8px;flex-wrap:wrap}.account-actions button{padding:8px 12px;border:1px solid var(--line);min-height:42px;border-radius:9px;font-size:14px}
#player-account-dialog form{display:grid;gap:14px}#player-account-dialog label{display:grid;gap:6px;font-size:14px}
#player-account-dialog input,#player-account-dialog textarea{width:100%;min-width:0;font-size:16px;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--bg);color:var(--ink)}
#player-account-dialog .recovery-output textarea{font-family:monospace;line-height:1.7;resize:none}#player-account-dialog .recovery-output button{min-height:44px;width:100%;margin-top:8px}

.join-identity{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;color:var(--muted);margin:12px 0}.join-identity button{flex:none;min-height:38px;padding:6px 10px;border:1px solid var(--line);border-radius:8px}

#board-chat-dialog[open]{display:flex;flex-direction:column;max-height:calc(100dvh - 24px)}
#board-chat-dialog>header{flex:none}
#board-chat-dialog .room-chat{display:flex;flex-direction:column;min-height:0;overflow:hidden}
#board-chat-dialog #chat-messages{flex:1 1 auto;min-height:80px;height:clamp(100px,32dvh,320px)}
#board-chat-dialog .chat-controls{display:flex;flex:0 0 auto;background:var(--panel)}
.account-avatar>svg,#profile-avatar>svg{display:block;width:100%;height:100%;border-radius:50%}
.community-row>.challenge-icon{display:flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;padding:9px;border-radius:10px}
.challenge-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#room-seat{display:block;font-size:13px;font-weight:600;margin:6px 0;color:var(--ink)}

/* Keep the history header and replay controls outside the scrolling move list. */
body #history-popover .history-panel>summary{flex:none;min-height:40px}
body #history-popover .history-replay-actions{flex:none;margin:4px 0 8px}
body #history-popover .history-replay-actions button{min-height:44px;font-size:14px;border-radius:9px}
body #history-popover #history-list{min-height:0;flex:1;overscroll-behavior:contain;scrollbar-width:thin}
body[data-screen=mobile] #history-popover{width:min(360px,calc(100vw - 24px));max-height:min(280px,36dvh);padding:8px;border-radius:14px}
body[data-screen=mobile] #history-popover .history-move{min-height:40px;font-size:14px}
body[data-screen=mobile] #history-popover #history-list{max-height:calc(min(280px,36dvh) - 110px)}

.chat-delivery-status{flex:none;margin:0;padding:0 14px;color:var(--muted);font-size:12px;min-height:0}
.chat-delivery-status:empty{display:none}

/* Profile: a quiet identity header and one aligned account action list. */
#beta-hub [data-beta-page="profile"] .profile-card{border:0;background:transparent;padding:8px 0 20px;gap:14px;align-items:center}
#beta-hub .profile-card>div:not(.profile-photo-actions){min-width:0;flex:1}
#beta-hub #profile-name{overflow-wrap:anywhere;font-size:20px}
#beta-hub .profile-photo-actions{display:flex;flex:none;gap:4px;margin:0}
#beta-hub .profile-photo-actions button{display:grid;place-items:center;min-height:44px;width:44px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.profile-photo-actions svg,.account-actions svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
#beta-hub #beta-profile-form{gap:16px}
#beta-hub #beta-profile-form>button{justify-self:end;min-height:44px;padding:10px 20px;border-radius:12px}
#beta-hub .player-account{padding:24px 0 0;margin:24px 0 0;border-bottom:0}
#beta-hub .account-description{margin:6px 0 16px;font-size:14px;overflow-wrap:anywhere}
#beta-hub .account-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:0;border:1px solid var(--line);border-radius:14px;overflow:hidden}
#beta-hub .account-actions button{display:flex;align-items:center;gap:14px;min-height:52px;padding:12px 16px;margin:0;border:0;border-radius:0;background:var(--panel);color:var(--ink);text-align:left;font-size:14px}
#beta-hub .account-actions button+button{border-top:1px solid var(--line)}
#beta-hub .account-actions button:hover,#beta-hub .profile-photo-actions button:hover{background:var(--bg)}
#beta-hub .account-actions button:focus-visible,#beta-hub .profile-photo-actions button:focus-visible{outline:2px solid var(--ink);outline-offset:-4px}
#beta-hub .account-status:empty{display:none}
@media(max-width:360px){#beta-hub .profile-photo-actions{flex-direction:column}#beta-hub #profile-name{font-size:18px}}

body[data-screen=mobile] .explore-actions .explore-more,body[data-screen=mobile] .explore-actions .explore-deep{width:100%;min-width:0;min-height:54px;flex-direction:row;font-size:14px;text-align:center;padding:10px;gap:8px;border-radius:12px}
body[data-screen=mobile] .explore-footer{display:block}
body[data-screen=mobile] .idea-choice{border-radius:12px;padding:12px;gap:8px;background:var(--panel)}
body[data-screen=mobile] .idea-label,body[data-screen=mobile] .idea-reply{font-size:12px}
.community-tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:16px}
.community-tabs button{flex:1;min-height:44px;font-size:14px;border-radius:8px 8px 0 0;padding:8px}
.community-tabs button[aria-pressed=true]{background:var(--bg);box-shadow:inset 0 -2px var(--accent)}
.community-overview strong:empty{display:none}
.invitation-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.invitation-actions button{min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:10px}

.pending-qr{max-width:220px;margin:12px auto}.pending-qr svg{display:block;width:100%;height:auto}
#open-tables-button{flex:none;width:40px;min-height:44px;padding:8px;border:1px solid var(--line);border-radius:10px}#open-tables-button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}

#table-search{box-sizing:border-box;width:100%;min-height:44px;font-size:16px;margin-bottom:12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink)}
