:root { font-family: Arial, sans-serif; background: var(--night); color: var(--paper); }
* { box-sizing: border-box; }
body { margin: 0; }
body, html { width: 100%; height: 100%; overflow: hidden; }
button, input { font: inherit; }
button { min-height: 44px; padding: 10px 18px; cursor: pointer; border: 1px solid var(--gold); border-radius: 8px; background: var(--gold); color: var(--ink); font-weight: 700; }
button:hover { background: var(--gold-hover); }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.secondary { background: var(--panel); border-color: var(--line); color: var(--paper); }
.secondary:hover { background: var(--raised); border-color: var(--gold); }
a { color: var(--gold); }
#canvas { position: fixed; inset: 0; display: block; width: 100% !important; height: 100% !important; max-width: 100%; max-height: 100%; outline: none; touch-action: none; }
#entry { position: fixed; inset: 0; display: grid; place-items: center; padding: 18px; overflow: auto; background: radial-gradient(ellipse at 50% 15%, var(--raised), var(--night) 75%); z-index: 5; }
#entry[hidden] { display: none; }
.card { width: min(100%, 560px); min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 24px 80px #0006; }
.eyebrow { color: var(--gold); letter-spacing: .2em; font-size: 12px; font-weight: 700; }
h1, h2 { color: var(--paper); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(26px, 5vw, 40px); margin: 12px 0; }
p { line-height: 1.5; }
.small { font-size: 13px; color: var(--muted); }
label { display: block; margin: 12px 0 6px; }
input:not([type=checkbox]) { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 11px; background: var(--night); color: var(--paper); }
input[type=checkbox] { accent-color: var(--gold); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }
form button, #switch-login { margin-top: 14px; width: 100%; }
progress { width: 100%; height: 16px; margin-top: 20px; accent-color: var(--gold); }
#status { font-size: 14px; overflow-wrap: anywhere; }
/* The account entry is in the lobby and game Escape menus. Keep the hidden
   bridge trigger available without placing an HTML control over the canvas. */
#account-button { display: none; }
dialog { max-width: 500px; max-height: 90dvh; overflow: auto; width: calc(100% - 28px); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--paper); padding: 22px; }
dialog::backdrop { background: #000a; }
dialog > button { width: 100%; margin-top: 12px; }
[hidden] { display: none !important; }
@media (max-height: 550px) { #entry { place-items: start center; } .card { padding: 16px; } h1 { font-size: 26px; } }
