:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #231920; color: #f4edf0; }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; -webkit-text-size-adjust: 100%; }
#viewport { position: absolute; top: env(safe-area-inset-top, 0px); right: env(safe-area-inset-right, 0px); bottom: env(safe-area-inset-bottom, 0px); left: env(safe-area-inset-left, 0px); }
#game { display: block; width: 100%; height: 100%; border: 0; background: #231920; touch-action: none; }
button, summary { min-height: 44px; min-width: 44px; font: inherit; cursor: pointer; touch-action: manipulation; }
button { border: 1px solid #62545c; border-radius: 10px; background: #342730; color: inherit; padding: 10px 14px; }
button:focus-visible, summary:focus-visible { outline: 2px solid #c8d479; outline-offset: 2px; }
button:disabled { opacity: .5; cursor: wait; }
[hidden] { display: none !important; }
#app-menu { position: absolute; top: 0; left: 0; z-index: 10; }
.game-loaded #app-menu:not([open]) { display: none; }
#app-menu summary { list-style: none; display: grid; place-items: center; background: #231920e8; border-radius: 0 0 0 12px; }
#app-menu summary::-webkit-details-marker { display: none; }
#app-menu section { padding: 20px; width: min(360px, calc(100vw - 28px)); max-height: calc(100dvh - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; background: #231920; border: 1px solid #62545c; border-radius: 12px; }
h1 { font-size: 20px; margin: 0 0 16px; }
p { font-size: 14px; line-height: 1.5; margin: 12px 0; }
section button { width: 100%; margin-top: 8px; }
progress { accent-color: #c8d479; width: 100%; margin-top: 16px; }
#portrait-hint { position: absolute; bottom: 18px; left: 12px; right: 12px; padding: 10px 8px 10px 16px; display: flex; align-items: center; gap: 8px; border-radius: 12px; background: #342730; font-size: 14px; }
#portrait-hint button { margin-left: auto; border: 0; }
#boot { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; background: #231920; }
#boot img { width: 84px; height: 84px; border-radius: 18px; }
#install-guide { position: absolute; z-index: 15; bottom: 12px; left: 12px; width: min(400px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 16px; background: #231920; border: 1px solid #62545c; border-radius: 16px; box-shadow: 0 8px 32px #17111866; }
.install-heading { display: flex; align-items: center; gap: 12px; }
.install-heading img { border-radius: 8px; }
.install-heading h2 { margin: 0; font-size: 18px; }
#dismiss-install { margin-left: auto; padding: 0; border: 0; background: transparent; font-size: 24px; }
.install-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#install-action, #copy-install-link { background: #c8d479; color: #231920; border-color: #c8d479; }
#install-steps { margin: 12px 0 16px; padding-left: 24px; font-size: 15px; line-height: 1.5; }
#install-steps li + li { margin-top: 8px; }
#install-note { color: #c5b9c1; }
