.web-app-install { margin-top: 1.1rem; }
.web-app-button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; border: 1px solid #647b9b; border-radius: .65rem; padding: .6rem .9rem; color: #17233c; background: #fff; font: 650 .95rem/1.4 system-ui, sans-serif; cursor: pointer; text-decoration: none; }
.web-app-button:hover { background: #edf3fc; }
.web-app-button:focus-visible { outline: 3px solid #be6f00; outline-offset: 3px; }
.web-app-button:disabled { opacity: .65; cursor: wait; }
.web-app-primary { background: #1f55bd; border-color: #1f55bd; color: #fff; }
.web-app-primary:hover { background: #153e90; }
.web-app-install [hidden], .web-app-dialog [hidden] { display: none !important; }
.web-app-dialog { box-sizing: border-box; width: min(42rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 0; border: 1px solid #bac8db; border-radius: 1rem; color: #17233c; background: #fff; box-shadow: 0 1.5rem 5rem #17233c44; font: 1rem/1.6 system-ui, sans-serif; }
.web-app-dialog::backdrop { background: #0b182bb3; }
.web-app-dialog:not([open]) { display: none; }
.web-app-dialog-header { position: sticky; top: 0; display: flex; gap: 1rem; align-items: start; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid #dde4ed; background: #fff; }
.web-app-dialog-header h2 { margin: .2rem 0 0; font: 750 1.25rem/1.4 system-ui, sans-serif; }
.web-app-dialog-body { padding: 1.25rem; }
.web-app-dialog-body > p:first-child { margin-top: 0; }
.web-app-dialog h3 { margin: 1.4rem 0 .5rem; font: 700 1.05rem/1.4 system-ui, sans-serif; }
.web-app-dialog ol { padding-left: 1.4rem; margin: .5rem 0 1rem; }
.web-app-dialog li + li { margin-top: .45rem; }
.web-app-note { font-size: .9rem; line-height: 1.6; }
.web-app-dialog .web-app-note { padding: .8rem; border-radius: .65rem; background: #f1f5fb; margin: 1rem 0 0; }
.web-app-game-footer { max-width: 1100px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2.5rem) 2rem; }
@media (display-mode: standalone) {
    .web-app-install { display: none; }
    .game-shell-header { padding-top: calc(.65rem + env(safe-area-inset-top)); padding-left: calc(.85rem + env(safe-area-inset-left)); padding-right: calc(.85rem + env(safe-area-inset-right)); }
    .web-app-game-footer { padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
}
@media print { .web-app-install, .web-app-dialog, .web-app-game-footer { display: none !important; } }
