/* Shared game controls. Native values remain the form authority. */
:root {
 --gr-control-accent:#e2bd7c;
 --gr-control-border:#9bb79d;
 --gr-control-track:#092731;
 --gr-control-ink:#153e3d;
 --gr-control-text:#f2eedb;
 --gr-control-muted:#bdcec1;
 --gr-control-focus:#f6cf83;
}
.arcade-app { --gr-control-accent:var(--arc-accent,#e2bd7c); }
.gr-toggle { position:relative; display:inline-flex; align-items:center; justify-content:center; flex:0 0 68px; width:68px; min-width:68px; height:56px; min-height:56px; vertical-align:middle; }
.gr-toggle>input.gr-checkbox { position:absolute; z-index:1; inset:0; display:block; width:100%; height:100%; margin:0; padding:0; opacity:0; cursor:pointer; }
.gr-switch,:where(.pq-switch) { position:relative; display:block; width:66px; height:38px; flex:0 0 66px; border:2px solid var(--gr-control-border,#9bb79d); border-radius:40px; background:var(--gr-control-track,#06232f); pointer-events:none; box-sizing:border-box; }
.gr-switch::after,:where(.pq-switch)::after { content:""; position:absolute; width:26px; height:26px; left:4px; top:4px; border-radius:50%; background:#aac1a6; transition:transform .15s; }
.gr-checkbox:checked+.gr-switch,:where(.pq-setting input:checked+.pq-switch) { background:var(--gr-control-accent,#d2b575); border-color:var(--gr-control-accent,#f3d496); }
.gr-checkbox:checked+.gr-switch::after,:where(.pq-setting input:checked+.pq-switch)::after { transform:translateX(28px); background:var(--gr-control-ink,#153e3d); }
.gr-checkbox:focus-visible+.gr-switch,:where(.pq-setting input:focus-visible+.pq-switch) { outline:4px solid var(--gr-control-focus,#f6cf83); outline-offset:4px; }
.gr-toggle>input.gr-checkbox:disabled { cursor:default; }
.gr-checkbox:disabled+.gr-switch { opacity:.45; }
input.gr-slider { appearance:none; -webkit-appearance:none; display:block; min-width:0; width:100%; min-height:44px; height:44px; padding:0; margin:0; border:0; border-radius:0; background:transparent; cursor:pointer; touch-action:pan-y; accent-color:var(--gr-control-accent,#e9c580); }
input.gr-slider::-webkit-slider-runnable-track { height:8px; border:1px solid var(--gr-control-border,#96b5a0); border-radius:8px; background:var(--gr-control-track,#09212b); }
input.gr-slider::-webkit-slider-thumb { -webkit-appearance:none; width:26px; height:26px; margin-top:-10px; border:2px solid #f8dfaa; border-radius:50%; background:var(--gr-control-accent,#d8b46f); box-shadow:0 1px 5px #0009; }
input.gr-slider::-moz-range-track { height:8px; border:1px solid var(--gr-control-border,#96b5a0); border-radius:8px; background:var(--gr-control-track,#09212b); }
input.gr-slider::-moz-range-thumb { width:24px; height:24px; border:2px solid #f8dfaa; border-radius:50%; background:var(--gr-control-accent,#d8b46f); }
input.gr-slider:focus-visible { outline:2px solid var(--gr-control-focus,#f3d69b); outline-offset:2px; border-radius:8px; }
input.gr-slider:disabled { opacity:.45; cursor:default; }
select.gr-select { min-width:0; min-height:48px; max-width:100%; padding:8px 10px; border:1px solid var(--gr-control-border,#9ab5a0); border-radius:8px; color:var(--gr-control-text,#efe5c7); background:var(--gr-control-track,#09232d); font:inherit; font-size:max(16pt,1em); line-height:1.25; }
.gr-select-wrap { position:relative; display:block; width:100%; min-width:0; max-width:100%; }
.gr-select-wrap[hidden] { display:none!important; }
select.gr-select-source { position:absolute!important; left:0!important; top:0!important; width:1px!important; min-width:1px!important; max-width:1px!important; height:1px!important; min-height:1px!important; max-height:1px!important; margin:0!important; padding:0!important; border:0!important; opacity:0!important; clip-path:inset(50%)!important; overflow:hidden!important; pointer-events:none!important; }
button.gr-select-trigger { appearance:none; display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; max-width:100%; min-width:0; min-height:48px; padding:10px 12px; border:1px solid var(--gr-control-border,#9ab5a0); border-radius:10px; background:var(--gr-control-track,#09232d); color:var(--gr-control-text,#f2eedb); font:inherit; font-size:max(14px,1em); font-weight:500; line-height:1.3; text-align:start; cursor:pointer; box-sizing:border-box; }
.gr-select-value { display:block; flex:1; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.gr-select-arrow { width:22px!important; height:22px!important; min-width:22px; flex:none; color:var(--gr-control-accent,#e2bd7c); transition:transform .15s; }
.gr-select-trigger[aria-expanded=true] { border-color:var(--gr-control-accent,#e2bd7c); box-shadow:0 0 0 2px #e2bd7c25; }
.gr-select-trigger[aria-expanded=true]>.gr-select-arrow { transform:rotate(180deg); }
.gr-select-trigger:hover { filter:brightness(1.12); }
.gr-select-trigger:focus-visible { outline:3px solid var(--gr-control-focus,#f6cf83); outline-offset:3px; }
.gr-select-trigger:disabled { opacity:.45; cursor:default; }
.gr-select-trigger[aria-invalid=true] { border-color:#ff939f; }
.gr-select-error { display:block; margin-top:8px; color:#ffc1ca; font-size:max(14px,.875em); line-height:1.35; }
.gr-select-error[hidden] { display:none!important; }
.gr-select-popup { position:fixed; inset:auto; margin:0; padding:0; display:none; flex-direction:column; min-width:0; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border:1px solid var(--gr-control-border,#9ab5a0); border-radius:15px; box-sizing:border-box; background:linear-gradient(145deg,#143543,#09232f); color:var(--gr-control-text,#f2eedb); box-shadow:0 20px 65px #00111dcc,0 0 0 1px #ffffff0a; z-index:2147483646; overflow:hidden; font:inherit; font-size:max(14px,1em); text-align:start; }
.gr-select-popup[data-open=true] { display:flex; }
.gr-select-popup:popover-open { display:flex; }
.gr-select-popup::backdrop { background:transparent; }
.gr-select-head { display:flex; align-items:center; gap:12px; justify-content:space-between; flex:none; min-height:52px; padding:6px 8px 6px 14px; border-bottom:1px solid #9ab5a03a; }
.gr-select-head>strong { min-width:0; font-size:max(14px,1em); font-weight:650; line-height:1.25; overflow-wrap:anywhere; }
button.gr-select-close { appearance:none; flex:none; display:flex; align-items:center; justify-content:center; width:44px; height:44px; min-width:44px; min-height:44px; margin:0 0 0 auto; padding:10px; border:1px solid #ef8390; border-radius:50%; background:#b32632; color:#fff; cursor:pointer; box-sizing:border-box; }
.gr-select-close:hover { background:#ca3441; }
.gr-select-close:focus-visible { outline:3px solid #ffe3a3; outline-offset:2px; }
.gr-select-close>svg { width:22px; height:22px; flex:none; }
.gr-select-options { position:relative; flex:1 1 auto; min-height:0; padding:7px; margin:0; overflow:auto; overscroll-behavior:contain; touch-action:pan-y; box-sizing:border-box; scrollbar-width:none; }
.gr-select-options::-webkit-scrollbar { display:none; }
.gr-select-options.gr-scroll-needed { padding-right:34px; }
button.gr-select-option { appearance:none; display:flex; align-items:center; justify-content:space-between; gap:14px; width:100%; min-width:0; min-height:44px; margin:3px 0; padding:10px 12px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--gr-control-text,#f2eedb); font:inherit; font-size:max(14px,1em); font-weight:500; line-height:1.3; text-align:start; cursor:pointer; box-sizing:border-box; }
.gr-select-option>span:first-child { min-width:0; overflow-wrap:anywhere; }
.gr-select-option[aria-selected=true] { background:var(--gr-control-accent,#e2bd7c); color:var(--gr-control-ink,#153e3d); font-weight:700; }
.gr-select-option:is(:hover,.is-active) { border-color:var(--gr-control-accent,#e2bd7c); box-shadow:inset 0 0 0 1px var(--gr-control-accent,#e2bd7c); }
.gr-select-option:not([aria-selected=true]):is(:hover,.is-active) { background:#c8e3e415; }
.gr-select-option:disabled { opacity:.42; cursor:default; }
.gr-select-check { flex:none; min-width:19px; font-size:max(16px,1em); font-weight:750; }
.gr-select-group-label { padding:11px 12px 6px; color:var(--gr-control-muted,#bdcec1); font-size:max(14px,.875em); font-weight:650; }
.gr-select-empty { margin:0; padding:16px 12px; color:var(--gr-control-muted,#bdcec1); font-size:max(14px,1em); }
.gr-select-popup>.gr-scrollbar { z-index:2; }
@media(prefers-reduced-motion:reduce) { .gr-select-arrow { transition:none; } }
.gr-tabs,:where(.pq-items-tabs,.pq-ledger-tabs,.pq-adventure-tabs) { display:flex; gap:8px; min-width:0; }
.gr-tabs>.gr-tab,:where(.pq-app) :is(.pq-items-tab,.pq-ledger-tabs>button) { display:inline-flex; flex:1 1 auto; align-items:center; justify-content:center; gap:10px; min-height:52px; min-width:44px; padding:10px 16px; border:1px solid #799e92; border-radius:10px; background:var(--gr-control-track,#082934); color:var(--gr-control-muted,#bdcec1) !important; font:inherit; line-height:1.2; cursor:pointer; }
.gr-tab>svg,:where(.pq-items-tab)>svg { flex:none; }
.gr-tab>b,:where(.pq-items-tab)>b { padding:3px 8px; border-radius:6px; background:#c4c39a12; color:#f1d99f; font-weight:500; font-variant-numeric:tabular-nums; white-space:nowrap; }
.gr-tabs>.gr-tab[aria-selected=true],:where(.pq-app) :is(.pq-items-tab,.pq-ledger-tabs>button)[aria-selected=true],:where(.pq-ledger-tabs)>button[aria-pressed=true] { border-color:var(--gr-control-accent,#ecd096); background:var(--gr-control-accent,#e4c68d); color:var(--gr-control-ink,#132f34) !important; font-weight:600; box-shadow:inset 0 1px #fff0bc; }
.gr-tab[aria-selected=true]>b,:where(.pq-items-tab)[aria-selected=true]>b { background:#082b3620; color:#15353b; }
.gr-tab:disabled,:where(.pq-items-tab):disabled { opacity:.45; cursor:default; }
.gr-tab:focus-visible { outline:4px solid var(--gr-control-focus,#f6cf83); outline-offset:3px; }
.gr-tab-panel[hidden] { display:none !important; }
summary.gr-disclosure { cursor:pointer; list-style:none; }
summary.gr-disclosure::-webkit-details-marker { display:none; }
summary.gr-disclosure::marker { content:""; }
summary.gr-disclosure:not([data-gr-custom-disclosure])::before { content:"▸"; display:inline-block; margin-right:.5em; transform-origin:center; color:var(--gr-control-accent,#e2bd7c); }
details[open]>summary.gr-disclosure:not([data-gr-custom-disclosure])::before { transform:rotate(90deg); }
:where(.pq-help-disclosure,.arc-help-disclosure) { display:inline-block; flex-shrink:0; transform-origin:center; transition:transform .15s; }
details[open]>summary :where(.pq-help-disclosure,.arc-help-disclosure) { transform:rotate(90deg); }
@media(max-width:420px) { .gr-tabs>.gr-tab { gap:6px; padding:9px 8px; min-height:48px; } }
@media(prefers-reduced-motion:reduce) { .gr-switch::after,:where(.pq-help-disclosure,.arc-help-disclosure) { transition:none; } }

/* The session control is always the final top-bar action, across every game. */
:is(.arc-header,.pq-header,.cl-header) .gr-session-tool,.gr-dialog__head>[data-dialog-close] { background:#b32632; border-color:#ed7079; color:#fff; margin-inline-start:auto; box-shadow:inset 0 1px #ffffff20,0 3px 9px #50071630; }
:is(.arc-header,.pq-header,.cl-header) .gr-session-tool:hover,.gr-dialog__head>[data-dialog-close]:hover { background:#ca3441; border-color:#ff9aa2; color:#fff; }
:is(.arc-header,.pq-header,.cl-header) .gr-session-tool:active,.gr-dialog__head>[data-dialog-close]:active { background:#971d28; border-color:#ed7079; color:#fff; }
:is(.arc-header,.pq-header,.cl-header) .gr-session-tool:focus-visible,.gr-dialog__head>[data-dialog-close]:focus-visible { outline:3px solid #ffe3a3; outline-offset:3px; }

.gr-dialog__head>[data-dialog-close] { min-width:44px; min-height:44px; flex-shrink:0; }
/* Hidden native-fullscreen support must not leave the final mobile slot empty. */
.pq-header>.pq-header__tools { margin-inline-start:auto; }
.pq-header__tools>.pq-session-tool { grid-column:-2 / -1; justify-self:end; }

/* Illustrated physical keys, shared by every game's Help and handbook. */
kbd.gr-keycap { display:inline-flex; position:relative; align-items:center; justify-content:center; min-width:1.9em; min-height:1.8em; padding:.12em .38em .18em; margin:.08em .08em .2em; box-sizing:border-box; vertical-align:baseline; border:1px solid #a6c5dc; border-bottom:3px solid #47627c; border-radius:.38em; background:linear-gradient(180deg,#fbfeff 0%,#d5e7f5 43%,#a9c6df 100%); color:#173147; box-shadow:inset 0 1px 0 #fff,inset 1px 0 0 #ffffffc9,inset -1px 0 0 #607f9e33,0 2px 0 #18334b,0 3px 5px #00132745; font:750 max(13px,.86em)/1.2 ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; text-align:center; text-shadow:0 1px 0 #ffffffc9; white-space:nowrap; letter-spacing:.015em; }
kbd.gr-keycap--wide { min-width:3.1em; padding-inline:.6em; }
.gr-keyset { display:inline-flex; align-items:baseline; gap:.08em; max-width:100%; flex-wrap:wrap; vertical-align:baseline; }
.gr-keyset>kbd.gr-keycap { margin-inline:0; }
@media(forced-colors:active) { kbd.gr-keycap { border:1px solid ButtonText; border-bottom-width:3px; background:ButtonFace; color:ButtonText; box-shadow:none; text-shadow:none; } }
