@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url('/fonts/nunito-latin-v32.woff2') format('woff2'); }
@font-face { font-family: 'Lilita One'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/lilita-one-latin-v17.woff2') format('woff2'); }
/* Scoped to local mode selection and the nearby page. */
[hidden] { display: none !important; }
.local-mode-picker, .nearby-page { max-width: 580px; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 20px max(32px, env(safe-area-inset-bottom)); }
.local-mode-picker h1, .nearby-page h1 { font-family: 'Lilita One', sans-serif; font-weight: 400; font-size: 2rem; margin: 24px 0 12px; }
.local-mode-picker p, .nearby-page p { line-height: 1.55; margin: 12px 0; }
.local-mode-options { display: grid; gap: 16px; margin-top: 24px; }
.local-mode-choice { display: grid; grid-template-columns: 40px 1fr 20px; gap: 12px; align-items: center; padding: 20px 16px; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-decoration: none; font: inherit; width: 100%; }
.local-mode-choice:hover { border-color: var(--accent-strong); }
.local-mode-choice strong { display: block; font-size: 1.2rem; margin-bottom: 8px; }
.local-mode-choice span span { display: block; line-height: 1.45; }
.local-mode-choice svg { width: 36px; height: 36px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.local-mode-detail { font-size: .85rem; margin-top: 10px; opacity: .8; }
.local-mode-return { display: block; max-width: 580px; margin: 16px auto 0; padding: 0 20px; color: var(--text); }
.nearby-page { color: var(--text); }
.nearby-page nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.nearby-page button, .nearby-page input, .nearby-page select { font: inherit; }
.nearby-page button, .nearby-page .nearby-button { min-height: 48px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; text-align: center; }
.nearby-page button:disabled { opacity: .55; cursor: default; }
.nearby-page button:focus-visible, .local-mode-choice:focus-visible, .nearby-page a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.nearby-page .nearby-primary { background: var(--accent-strong); border-color: var(--accent-strong); color: white; font-weight: 800; }
.nearby-actions { display: grid; gap: 12px; margin: 24px 0; }
.nearby-page label { display: block; font-weight: 800; margin: 20px 0 8px; }
.nearby-page input, .nearby-page select { display: block; width: 100%; padding: 12px; min-height: 48px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-sizing: border-box; }
.nearby-page ul, .nearby-page ol { padding-left: 24px; line-height: 1.6; }
.nearby-roster { list-style: none; padding: 0 !important; margin: 24px 0; }
.nearby-roster li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.nearby-roster span { min-width: 0; }
.nearby-note { padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--surface); margin: 16px 0; line-height: 1.5; }
.nearby-error { border-color: var(--danger); }
.nearby-secret { border: 1px solid var(--line); background: var(--surface); padding: 24px 16px; margin: 24px 0; text-align: center; border-radius: 10px; }
.nearby-secret strong { display: block; font-size: 1.8rem; margin: 12px 0; overflow-wrap: anywhere; }
.nearby-code { font-size: 2rem; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.nearby-confirm { border: 2px solid var(--accent); padding: 16px; margin: 20px 0; border-radius: 10px; }
.nearby-page .nearby-link { border: none; background: none; padding: 8px 0; text-decoration: underline; }
.nearby-votes { display: grid; gap: 12px; margin: 20px 0; }
.nearby-votes button[aria-pressed="true"] { border: 2px solid var(--accent-strong); background: var(--accent-soft); }
@media (max-width: 360px) { .local-mode-picker, .nearby-page { padding-left: 16px; padding-right: 16px; } .local-mode-choice { grid-template-columns: 28px 1fr 12px; gap: 8px; } .local-mode-choice svg { width: 26px; } }
.nearby-playing > .nearby-page { max-width: none; padding: max(8px, env(safe-area-inset-top)) 16px 0; }
.nearby-playing > .nearby-page nav { margin-bottom: 0; }
#nearby-edition { display: block; width: 100%; height: calc(100dvh - 70px - env(safe-area-inset-top)); border: 0; }
#nearby-recovery:not([hidden]) { position: fixed; inset: 70px 0 0; z-index: 20; max-width: none; background: var(--bg, #171725); display: grid; align-content: center; justify-items: center; text-align: center; }

/* Setup: join an existing room, or choose a game before hosting. */
.nearby-join-actions { display: grid; gap: 12px; margin: 16px 0 28px; }
.nearby-game-picker { min-width: 0; padding: 0; margin: 0; border: 0; }
.nearby-game-picker legend { padding: 0; font-size: 1.35rem; font-weight: 900; }
.nearby-game-picker p { margin: 8px 0 16px; }
.nearby-game-options { display: grid; gap: 10px; }
.nearby-page .nearby-game-option { display: grid; grid-template-columns: 28px minmax(0, 1fr) 20px; align-items: start; gap: 12px; padding: 16px; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 600; cursor: pointer; }
.nearby-game-option:has(input:checked) { border-color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent-strong); background: var(--accent-soft, var(--surface)); }
.nearby-game-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.nearby-game-icon { font-size: 1.4rem; line-height: 1.4; }
.nearby-game-copy { display: grid; gap: 4px; font-size: .9rem; line-height: 1.45; }
.nearby-game-copy strong { font-size: 1rem; font-weight: 900; }
.nearby-game-count { font-size: .8rem; font-weight: 800; }
.nearby-page .nearby-game-option input { width: 20px; height: 20px; min-height: 20px; margin: 3px 0 0; padding: 0; accent-color: var(--accent-strong); cursor: pointer; }
.nearby-game-picker:disabled { opacity: .6; }
.nearby-game-picker:disabled .nearby-game-option { cursor: wait; }
.nearby-host-actions { margin: 20px 0 24px; }
.nearby-host-actions button { width: 100%; }
.nearby-host-actions p { text-align: center; font-size: .85rem; margin: 8px 0; }
.nearby-setup-help { border-top: 1px solid var(--line); padding-top: 12px; }
.nearby-setup-help summary { padding: 12px 0; min-height: 44px; box-sizing: border-box; font-weight: 800; cursor: pointer; }
.nearby-setup-help summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (min-width: 520px) { .nearby-game-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
