/* Based on TNT Sapper v1.0.7. Shared across Analog Reboot games. */
.analog-game{--accent-strong:#8e293e;--accent-bright:#d75670;--accent-border:#d5758e;--accent-soft:#ffc1d0;--accent-deep:#542335;--accent-wash:#37151e;--secondary:#f8e2a2}
button{color:inherit;background:#251e25;border:1px solid #58414b;border-radius:10px;font:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button:focus-visible{outline:3px solid var(--secondary);outline-offset:2px}
/* Options stays out of the play surface until requested. */
#options-dialog,#leaderboard-dialog{position:fixed;inset:0;width:100%;max-width:456px;height:100%;max-height:100%;margin:0 auto;padding:20px;border:0;background:transparent;color:#f3eeee;overflow:hidden;box-sizing:border-box}
#options-dialog[open],#leaderboard-dialog[open]{display:flex;align-items:center;justify-content:center}
#options-dialog::backdrop,#leaderboard-dialog::backdrop{background:rgba(9,11,14,.73)}
.options-card{position:relative;z-index:1;width:100%;max-width:370px;max-height:100%;overflow:auto;padding:22px 20px;border:1px solid #785462;border-radius:16px;background:#201a21;box-shadow:0 12px 36px #0005;overflow-wrap:anywhere}
.options-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.options-heading h2{margin:0;font-size:21px}
.options-heading #options-close,.options-heading .panel-close{width:44px;height:44px;border:1px solid #58414b;border-radius:10px;background:#2b222c;font-size:23px;line-height:1}
.options-link{width:100%;min-height:44px;margin-top:16px;border:0;border-top:1px solid #49313a;border-radius:0;background:transparent;padding:10px 0 0;display:flex;align-items:center;justify-content:space-between;font-size:12px;font-weight:500;text-align:left;color:#d6c9d0}
.options-link .chevron{font-size:18px;transition:transform .15s}
.options-link[aria-expanded=true] .chevron{transform:rotate(90deg)}
.how-to-play{padding:10px 3px 2px;color:#d6c9d0;font-size:12px;line-height:1.55}
.how-to-play p{margin:0 0 9px}
.option-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #49313a}
.option-row>div{display:flex;flex-direction:column;gap:3px}
.option-row strong{font-size:14px}
.option-row span{font-size:11px;color:#bbaab0}
.option-switch{border:1px solid #58414b;border-radius:999px;background:#251e25;padding:7px 12px;min-width:62px;min-height:44px;color:#eee4e9;font-size:12px;font-weight:700}
.option-switch[aria-checked=true]{background:var(--accent-strong);border-color:var(--accent-border);color:var(--accent-ink,#fff)}
.theme-field{border:0;padding:8px 0 0;margin:0}
.theme-field legend{padding:0;margin:0 0 6px;font-size:14px;font-weight:700}
.theme-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(64px,1fr));gap:6px}
.theme-choice{min-width:0;min-height:44px;border:1px solid #58414b;border-radius:9px;background:#251e25;padding:7px;display:flex;align-items:center;justify-content:center;gap:5px;text-align:center;font-size:11px}
.theme-choice[aria-pressed=true]{border-color:var(--accent-border);box-shadow:inset 0 0 0 1px var(--accent-border)}
.theme-swatch{width:10px;height:10px;border-radius:50%;flex:0 0 auto;border:1px solid #fff5}


.theme-choice[data-theme-choice=match]{grid-column:1/-1}
.theme-choice>span:last-child{min-width:0;overflow-wrap:anywhere}
.theme-note{margin:0 0 10px;color:#c7b8c2;font-size:11px;line-height:1.5}
.theme-note-compact{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.option-row #sound-label{color:inherit}

#options-dialog::backdrop,#leaderboard-dialog::backdrop{backdrop-filter:blur(5px)}

@media(max-width:360px){#options-dialog,#leaderboard-dialog{padding:12px}
.options-card{padding:18px 15px}
}

@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}
}

@media(forced-colors:active){.options-card,.option-switch,.theme-choice,.options-link,#options-close{border:2px solid ButtonText}
}

