/* Hub pages: door, join, shelf, Grown-ups. Night-game navy with a floodlight yellow. */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap');

:root { --bg: #101a3a; --panel: #1b2857; --line: #33427d; --ink: #f6f7fb; --soft: #b9c3e6; --gold: #ffc233; --gold-ink: #23180a; --bad: #ff8a7a; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 18px/1.45 Fredoka, system-ui, sans-serif; -webkit-tap-highlight-color: transparent;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
h1 { font-size: 34px; line-height: 1.1; margin: 0 0 10px; font-weight: 700; }
h2 { font-size: 22px; margin: 0 0 10px; font-weight: 600; }
p { margin: 0 0 12px; color: var(--soft); }
a { color: var(--gold); }
button, input { font: inherit; }
button { min-height: 52px; padding: 0 22px; border: 0; border-radius: 16px; background: var(--gold); color: var(--gold-ink); font-weight: 600; font-size: 19px; cursor: pointer; }
button:disabled { opacity: .5; }
button.quiet { background: transparent; color: var(--ink); border: 2px solid var(--line); }
button.danger { background: #c23b2a; color: #fff; }
input[type=text], input[type=number] { min-height: 52px; width: 100%; padding: 0 16px; border-radius: 14px; border: 2px solid var(--line); background: #0c1430; color: var(--ink); font-size: 20px; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hidden { display: none !important; }
.msg { color: var(--bad); min-height: 1.4em; }

body.door { display: grid; place-items: center; min-height: 100vh; }
.card { width: min(100%, 460px); background: var(--panel); border: 2px solid var(--line); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.card form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.card label { font-weight: 600; }
#code { text-transform: uppercase; letter-spacing: .08em; text-align: center; }

.shelf { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.top a { font-size: 15px; color: var(--soft); min-height: 44px; display: inline-flex; align-items: center; }
.who { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { min-height: 60px; padding: 0 22px 0 14px; border-radius: 999px; background: var(--panel); color: var(--ink); border: 3px solid var(--line); display: inline-flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 600; }
.chip i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.75); flex: none; }
.chip[aria-pressed=true] { border-color: var(--gold); background: #263874; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.tile { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--panel); border: 3px solid var(--line); border-radius: 26px; overflow: hidden; transition: transform .12s; }
.tile:active { transform: scale(.97); }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #0c1430; }
.tile span { padding: 14px 18px 4px; font-size: 24px; font-weight: 700; line-height: 1.15; }
.tile small { padding: 0 18px 16px; color: var(--soft); font-size: 16px; }
.tiles.wait .tile { opacity: .45; pointer-events: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { width: 48px; min-height: 48px; padding: 0; border-radius: 50%; border: 3px solid transparent; }
.swatches button[aria-pressed=true] { border-color: #fff; }
.add { display: flex; flex-direction: column; gap: 12px; background: var(--panel); border: 2px solid var(--line); border-radius: 20px; padding: 20px; max-width: 460px; }
.note { font-size: 15px; color: var(--soft); }

.gu { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.box { background: var(--panel); border: 2px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.code { font-size: 30px; font-weight: 700; letter-spacing: .08em; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row input[type=text] { flex: 1 1 160px; width: auto; }
.row button { min-height: 48px; padding: 0 16px; font-size: 16px; }
.dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.75); flex: none; }
