/* Chirp Champs — "Zamboni" brand.
   Deep blue #12324F · Ice #E3F0F8 · Penalty orange #FF7A1A · Blue line #3AA0D8
   Anton for display, Inter for body. Orange buttons always use deep-blue text. */

@font-face { font-family: 'Anton'; src: url('/fonts/anton-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --deep: #12324F;
  --ice: #E3F0F8;
  --orange: #FF7A1A;
  --blueline: #3AA0D8;
  --card: #FFFFFF;
  --line: #C9DBE8;
  --muted: #4B647C;      /* 5.3:1 on ice */
  --muted-dark: #A9C3D6; /* 7.2:1 on deep blue */
  --danger: #B3261E;
  --night: #06131F;
  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: var(--ice);
  color: var(--deep);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100%; }

/* ── Loading screen (the can) ─────────────────────────── */
.splash {
  position: fixed; inset: 0; z-index: 50;
  background: var(--night);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem;
  padding: env(safe-area-inset-top) 1rem env(safe-area-inset-bottom);
  transition: opacity 0.35s ease;
}
.splash.hide { opacity: 0; pointer-events: none; }
.splash .can { height: min(66vh, 150vw); width: auto; max-width: 92vw; animation: can-in 0.6s ease-out both; }
.splash-bar { width: 160px; height: 6px; border-radius: 3px; background: rgba(227, 240, 248, 0.25); overflow: hidden; }
.splash-bar div { height: 100%; width: 35%; background: var(--orange); border-radius: 3px; animation: bar 1.1s ease-in-out infinite; }
.splash-text { color: var(--ice); font-weight: 600; font-size: 0.95rem; text-align: center; }
@keyframes can-in { from { transform: translateY(24px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bar { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .splash .can, .splash-bar div { animation: none; } }

/* ── Sign-in (deep blue) ──────────────────────────────── */
.center {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.5rem; text-align: center;
  padding: calc(env(safe-area-inset-top) + 1.5rem) 1.25rem calc(env(safe-area-inset-bottom) + 1.5rem);
}
.center .card { width: 100%; max-width: 360px; margin-top: 1.5rem; text-align: left; }
.center.dark { background: var(--deep); color: var(--ice); }
.center.dark .muted, .center.dark .fine, .center.dark .fine a { color: var(--muted-dark); }
.center.dark .link { color: var(--muted-dark); }
.wordmark { font-family: var(--display); font-weight: 400; font-size: 2.9rem; line-height: 1; letter-spacing: 0.02em; margin-top: 0.75rem; }
.tagline { color: var(--orange); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.22em; }
.center.dark .card { color: var(--deep); }

/* ── Pages ────────────────────────────────────────────── */
.page {
  max-width: 560px; margin: 0 auto;
  padding: 1rem 1.25rem calc(env(safe-area-inset-bottom) + 2rem);
  display: flex; flex-direction: column; gap: 1rem;
}

.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  padding: calc(env(safe-area-inset-top) + 0.7rem) 1.1rem 0.7rem;
  background: var(--deep); color: var(--ice);
  border-bottom: 3px solid var(--blueline);
  box-shadow: inset 0 -6px 0 -3px var(--orange);
}
.bar .brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.04em; color: var(--ice); text-decoration: none; }
.bar .back { color: var(--orange); text-decoration: none; font-weight: 700; }
.bar .link { color: var(--muted-dark); }

h1, .h2 { font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1.05; letter-spacing: 0.01em; text-transform: uppercase; }
.section { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.note { color: var(--orange); margin-top: 0.75rem; font-weight: 600; }
.fine { color: var(--muted); font-size: 0.75rem; margin-top: 1rem; }
.fine a { color: inherit; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; }
.card.empty { text-align: center; }
.card p + p { margin-top: 0.35rem; }
.card.tip { border: 2px solid var(--orange); }
.card.tip .row-btns { margin-top: 0.5rem; }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }

label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
input {
  width: 100%; font: inherit; font-size: 16px; color: var(--deep);
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 0.8rem 0.9rem;
}
input::placeholder, textarea::placeholder { color: #7D93A8; }
input:focus, textarea:focus { outline: 3px solid var(--blueline); outline-offset: 1px; border-color: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  font: inherit; font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer;
  color: var(--deep); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 0.85rem 1.1rem;
}
.btn.primary { background: var(--orange); color: var(--deep); border-color: var(--orange); }
.btn.google { background: #fff; color: #1f1f1f; border-color: var(--line); font-weight: 700; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.small-btn { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.link { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; padding: 0.25rem; text-decoration: underline; }
.link.danger { color: var(--danger); align-self: center; margin-top: 1rem; }
.row-btns { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.row-btns .btn { flex: 1; }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }

.or { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.8rem; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
a.row {
  color: inherit; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1rem;
}
a.row strong { font-weight: 800; }
a.row small { display: block; color: var(--muted); margin-top: 0.15rem; }
.members { margin-top: 0.75rem; gap: 0; }
.members li { padding: 0.65rem 0; border-top: 1px solid var(--line); }
.members li:first-child { border-top: 0; }
.members small { color: var(--muted); }
.actions { display: flex; align-items: center; gap: 0.5rem; }

.badge {
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--deep); background: var(--ice); border: 1.5px solid var(--deep); border-radius: 999px; padding: 0.15rem 0.55rem;
}

.invite { background: var(--ice); border: 1.5px dashed var(--blueline); border-radius: 12px; padding: 0.75rem; overflow-x: auto; }
.invite code { font-size: 0.85rem; color: var(--deep); font-weight: 600; white-space: nowrap; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 5rem);
  background: var(--deep); color: var(--ice); font-weight: 700;
  padding: 0.7rem 1.1rem; border-radius: 999px; box-shadow: 0 6px 24px rgba(18, 50, 79, 0.35); z-index: 60;
  max-width: calc(100% - 2rem); text-align: center;
}

/* ── The Room (chat) ──────────────────────────────────── */
.chat-screen { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.chat-screen .bar { position: static; display: grid; grid-template-columns: 2rem 1fr 2rem; gap: 0.5rem; }
.chat-screen .back { font-size: 1.9rem; line-height: 1; }
.chat-title { color: inherit; text-decoration: none; text-align: center; min-width: 0; }
.chat-title strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.2rem; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title small { color: var(--muted-dark); font-size: 0.72rem; }

.chat-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0.75rem 0.9rem; }
.chat-tip:empty { display: none; }
.chat-tip { margin-bottom: 0.75rem; }
#chat-older { text-align: center; }
.chat-list { display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; }
.chat-empty { color: var(--muted); text-align: center; margin-top: 30vh; }
.chat-day { align-self: center; color: var(--muted); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; margin: 1rem 0 0.5rem; }
.chat-system { align-self: center; color: var(--muted); font-size: 0.8rem; font-weight: 600; margin: 0.4rem 0; text-align: center; }

.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; margin-top: 0.6rem; }
.msg.grouped { margin-top: 0.15rem; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-name { font-size: 0.75rem; color: var(--deep); font-weight: 800; margin: 0 0 0.2rem 0.6rem; }
.bubble {
  background: var(--card); border: 1px solid var(--line); color: var(--deep);
  padding: 0.55rem 0.8rem; border-radius: 18px; border-top-left-radius: 6px;
  line-height: 1.35; word-wrap: break-word; overflow-wrap: anywhere;
}
.msg.mine .bubble { background: var(--orange); color: var(--deep); border-color: transparent; border-radius: 18px; border-top-right-radius: 6px; font-weight: 600; }
.msg.grouped .bubble { border-radius: 18px; }
.bubble[data-del] { cursor: pointer; }
.msg-time { font-size: 0.65rem; color: var(--muted); margin: 0.15rem 0.6rem 0; }

.composer { position: relative; border-top: 1px solid var(--line); background: #fff; }
.chat-input {
  display: flex; gap: 0.5rem; align-items: flex-end;
  padding: 0.6rem 0.75rem calc(env(safe-area-inset-bottom) + 0.6rem);
}
.chat-input textarea {
  flex: 1; resize: none; font: inherit; font-size: 16px; color: var(--deep);
  background: var(--ice); border: 1.5px solid var(--line); border-radius: 20px;
  padding: 0.6rem 0.9rem; max-height: 140px; line-height: 1.3;
}
.btn.send { border-radius: 50%; width: 2.6rem; height: 2.6rem; padding: 0; flex: none; }

/* ── Simple text pages (privacy, terms) ───────────────── */
.doc { max-width: 680px; margin: 0 auto; padding: 2rem 1.25rem 4rem; line-height: 1.6; }
.doc h1 { font-size: 2.2rem; margin: 1rem 0 0.25rem; }
.doc h2 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; color: var(--deep); font-weight: 800; }
.doc p, .doc li { margin-bottom: 0.5rem; }
.doc ul { padding-left: 1.25rem; }
.doc a { color: var(--deep); font-weight: 600; }
.doc .muted { font-size: 0.9rem; }

/* ── Rink picker ──────────────────────────────────────── */
.inline-field { display: flex; gap: 0.5rem; }
.inline-field input { flex: 1; }
.rink-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; margin-top: -0.25rem; }
.rink-option {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; text-align: left;
  font: inherit; color: var(--deep); background: var(--ice); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 0.65rem 0.8rem; cursor: pointer;
}
.rink-option small, .rink-picked small { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 0.1rem; }
.rink-option > small { flex: none; font-weight: 700; }
.rink-option.add { background: #fff; border-style: dashed; border-color: var(--orange); }
.rink-picked {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  background: var(--ice); border: 2px solid var(--deep); border-radius: 12px; padding: 0.7rem 0.85rem;
}
.field-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 0.35rem; }

/* ── The Room, round 2: emoji, reactions, replies, mentions ── */
.emo { width: 1.45em; height: 1.45em; vertical-align: -0.38em; margin: 0 0.05em; }
.bubble.big { background: transparent !important; border-color: transparent !important; padding: 0.1rem 0; }
.bubble.big .emo { width: 3.4rem; height: 3.4rem; vertical-align: middle; }
.mention { font-weight: 800; color: var(--deep); background: rgba(58, 160, 216, 0.18); border-radius: 6px; padding: 0 0.2em; }
.mention.me { background: var(--deep); color: var(--ice); }
.msg.mine .mention { background: rgba(18, 50, 79, 0.16); }

.reactions { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.25rem; }
.chip-r {
  display: inline-flex; align-items: center; gap: 0.25rem; font: inherit; font-size: 0.8rem; font-weight: 800; color: var(--deep);
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 0.1rem 0.5rem 0.1rem 0.3rem; cursor: pointer;
}
.chip-r.mine { border-color: var(--deep); background: var(--ice); }
.emo-r { width: 1.35rem; height: 1.35rem; }
.emo-u { font-size: 1.05rem; line-height: 1; }

.quote {
  display: block; text-align: left; font: inherit; cursor: pointer; max-width: 100%;
  background: rgba(18, 50, 79, 0.06); border: 0; border-left: 3px solid var(--blueline); border-radius: 8px;
  padding: 0.3rem 0.55rem; margin-bottom: 0.2rem; color: var(--deep);
}
.quote strong { display: block; font-size: 0.72rem; font-weight: 800; }
.quote span { display: block; font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16rem; }
.msg.flash .bubble { outline: 3px solid var(--blueline); outline-offset: 2px; }

.icon-btn { flex: none; width: 2.6rem; height: 2.6rem; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.emo-btn { width: 2.1rem; height: 2.1rem; }

.suggest, .reply-bar { display: flex; gap: 0.4rem; padding: 0.5rem 0.75rem 0; overflow-x: auto; }
.suggest button {
  flex: none; display: inline-flex; align-items: center; gap: 0.35rem; font: inherit; font-size: 0.85rem; font-weight: 700; color: var(--deep);
  background: var(--ice); border: 1.5px solid var(--line); border-radius: 999px; padding: 0.25rem 0.65rem 0.25rem 0.35rem; cursor: pointer;
}
.reply-bar { justify-content: space-between; align-items: center; border-left: 3px solid var(--orange); margin: 0.5rem 0.75rem 0; padding: 0.2rem 0.6rem; background: var(--ice); border-radius: 8px; }
.reply-bar strong { display: block; font-size: 0.78rem; font-weight: 800; }
.reply-bar small { display: block; color: var(--muted); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }

.picker { border-bottom: 1px solid var(--line); }
.picker-head { display: flex; justify-content: space-between; align-items: center; padding: 0.55rem 0.9rem 0; }
.picker-head strong { font-family: var(--display); font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; }
.picker-body { max-height: 40vh; overflow-y: auto; padding: 0.25rem 0.6rem 0.6rem; }
.picker-group > span { display: block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0.6rem 0.3rem 0.3rem; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr)); gap: 0.2rem; }
.picker-grid button { border: 0; background: none; border-radius: 10px; padding: 0.25rem; cursor: pointer; aspect-ratio: 1; display: grid; place-items: center; }
.picker-grid button:hover, .picker-grid button:focus-visible { background: var(--ice); }
.emo-pick { width: 2.4rem; height: 2.4rem; }

.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(6, 19, 31, 0.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card {
  width: 100%; max-width: 480px; background: #fff; border-radius: 20px 20px 0 0;
  padding: 0.9rem 0.9rem calc(env(safe-area-inset-bottom) + 0.9rem); display: flex; flex-direction: column; gap: 0.4rem;
}
.sheet-quick { display: flex; justify-content: space-between; gap: 0.25rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); margin-bottom: 0.2rem; }
.sheet-quick button { border: 0; background: var(--ice); border-radius: 50%; width: 3rem; height: 3rem; display: grid; place-items: center; cursor: pointer; }
.sheet-quick .more { font-size: 1.4rem; font-weight: 800; color: var(--deep); }
.sheet-row { font: inherit; font-weight: 700; font-size: 1rem; text-align: left; color: var(--deep); background: none; border: 0; border-radius: 12px; padding: 0.8rem 0.6rem; cursor: pointer; }
.sheet-row:hover { background: var(--ice); }
.sheet-row.danger { color: var(--danger); }
.emo-s { width: 1.1em; height: 1.1em; vertical-align: -0.22em; }

/* ── Photos & videos in the Room ──────────────────────── */
.media-grid { display: grid; gap: 3px; border-radius: 16px; overflow: hidden; width: min(72vw, 300px); margin-bottom: 0.2rem; background: var(--line); }
.media-grid.n2, .media-grid.n3, .media-grid.n4 { grid-template-columns: 1fr 1fr; }
.media-grid.n3 .media-item:first-child { grid-column: span 2; }
.media-item { display: block; width: 100%; max-height: 360px; object-fit: cover; background: #C9DBE8; border: 0; padding: 0; }
.media-grid:not(.n1) .media-item { aspect-ratio: 1; }
.media-item.photo { cursor: zoom-in; overflow: hidden; }
.media-item.photo img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 120px; }
video.media-item { background: #06131F; }
.msg-more { border: 0; background: none; font: inherit; color: var(--muted); cursor: pointer; padding: 0 0.2rem; letter-spacing: 0.1em; }

.icon-btn.plus {
  font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--deep);
  background: var(--ice); border: 1.5px solid var(--line); border-radius: 50%; width: 2.4rem; height: 2.4rem;
}
.attach { display: flex; gap: 0.5rem; padding: 0.6rem 0.75rem 0; overflow-x: auto; align-items: center; }
.thumb { position: relative; flex: none; width: 4.2rem; height: 4.2rem; border-radius: 12px; overflow: hidden; background: var(--line); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 3px; right: 3px; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 0; background: rgba(6, 19, 31, 0.75); color: #fff; font-size: 0.7rem; cursor: pointer; }
.thumb .tag { position: absolute; left: 4px; bottom: 3px; font-size: 0.8rem; }
.attach-status { color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.sheet-note { padding: 0 0.6rem 0.3rem; }

.viewer { position: fixed; inset: 0; z-index: 45; background: rgba(6, 19, 31, 0.95); display: grid; place-items: center; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.viewer img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.viewer-close { position: absolute; top: calc(env(safe-area-inset-top) + 0.75rem); right: 0.75rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: rgba(227, 240, 248, 0.2); color: #fff; font-size: 1.1rem; cursor: pointer; }

/* ── Polls ────────────────────────────────────────────── */
.poll-card {
  width: min(78vw, 320px); background: #fff; border: 2px solid var(--deep); border-radius: 18px;
  padding: 0.85rem; display: flex; flex-direction: column; gap: 0.55rem; color: var(--deep);
}
.poll-card.closed { border-color: var(--line); }
.poll-tag { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.poll-q { font-size: 1.05rem; font-weight: 800; line-height: 1.3; }
.poll-options { display: flex; flex-direction: column; gap: 0.4rem; }
.poll-opt {
  position: relative; overflow: hidden; text-align: left; font: inherit; color: var(--deep); cursor: pointer;
  background: var(--ice); border: 1.5px solid var(--line); border-radius: 12px; padding: 0.55rem 0.7rem;
}
.poll-opt.mine { border-color: var(--deep); }
.poll-opt:disabled { cursor: default; }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: rgba(255, 122, 26, 0.35); transition: width 0.3s ease; }
.poll-opt.mine .poll-bar { background: rgba(255, 122, 26, 0.6); }
.poll-row { position: relative; display: flex; justify-content: space-between; gap: 0.5rem; font-weight: 700; }
.poll-count { font-weight: 800; }
.poll-who { position: relative; display: block; font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; }
.poll-foot { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.msg.mine .poll-card { align-self: flex-end; }
.sheet-title { font-family: var(--display); font-weight: 400; font-size: 1.3rem; letter-spacing: 0.03em; text-transform: uppercase; }
.poll-maker { gap: 0.7rem; }
.poll-inputs { display: flex; flex-direction: column; gap: 0.45rem; }
.check { flex-direction: row; align-items: center; gap: 0.5rem; color: var(--deep); font-weight: 600; }
.check input { width: 1.2rem; height: 1.2rem; }

/* ── Skates: banner, cards, check-in, teams, chip draw ── */
.skate-banner-wrap:empty { display: none; }
.skate-banner {
  display: flex; align-items: center; gap: 0.7rem; cursor: pointer;
  background: var(--deep); color: #fff; padding: 0.6rem 0.9rem; border-bottom: 4px solid var(--orange);
}
.banner-puck { font-size: 1.4rem; }
.banner-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.banner-text strong { font-family: var(--display); font-weight: 400; letter-spacing: 0.06em; font-size: 1.05rem; color: var(--orange); }
.banner-text span { font-size: 0.8rem; color: var(--muted-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-you, .banner-go { font-weight: 800; font-size: 0.85rem; display: flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.skate-banner .btn { flex: none; }

.team-chip { display: inline-block; width: 1.1em; height: 1.1em; border-radius: 50%; vertical-align: -0.15em; border: 2px solid #000; }
.team-chip.black { background: #000; }
.team-chip.white { background: #fff; }

.skate-card {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--orange);
  border-radius: 16px; padding: 0.8rem 0.9rem; display: flex; flex-direction: column; gap: 0.45rem; max-width: 85%;
}
.skate-card .btn { align-self: flex-start; }
.msg.mine .skate-card { align-self: flex-end; }

.skate-head { border-top: 5px solid var(--orange); }
.skate-when { font-family: var(--display); font-weight: 400; font-size: 2rem; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.1; margin-top: 0.2rem; }
.skate-time { font-weight: 800; font-size: 1.1rem; }
.goalie-banner { text-align: center; font-weight: 800; padding: 0.7rem; border-radius: 12px; background: #fff; border: 1.5px dashed var(--line); color: var(--muted); }
.goalie-banner.yes { background: var(--orange); color: var(--deep); border: 0; font-size: 1.1rem; animation: pop 0.5s ease; }
@keyframes pop { 0% { transform: scale(0.85); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
.players { gap: 0; margin-top: 0.3rem; }
.player-row { display: flex; justify-content: space-between; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--ice); }
.player-row.you { font-weight: 800; }
.player-row span { flex: 1; }

.teams-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.team-col { border-radius: 16px; padding: 0.8rem; border: 2px solid #000; }
.team-col.black { background: #000; color: #fff; }
.team-col.white { background: #fff; color: #000; }
.team-col h2 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; letter-spacing: 0.05em; display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.team-col h2 small { font-family: Inter, sans-serif; font-size: 0.8rem; opacity: 0.7; margin-left: auto; }
.team-col.black .team-chip { border-color: #fff; }
.team-col .list { gap: 0.25rem; font-size: 0.95rem; }
.team-col li.you { font-weight: 800; text-decoration: underline; }
.your-team { display: flex; align-items: center; gap: 0.9rem; border: 2px solid #000; }
.your-team .team-chip { width: 3rem; height: 3rem; }
.your-team.black { background: #000; color: #fff; }
.your-team.black .team-chip { border-color: #fff; }
.your-team.black .poll-tag { color: #ccc; }
.your-team strong { font-family: var(--display); font-weight: 400; font-size: 1.8rem; letter-spacing: 0.05em; display: block; }

.roster-picks, .draw-names { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.draw-name {
  font: inherit; font-weight: 800; font-size: 1.05rem; color: var(--deep); background: #fff;
  border: 2px solid var(--line); border-radius: 999px; padding: 0.7rem 1rem; cursor: pointer;
}
.draw-name.small { font-size: 0.9rem; padding: 0.45rem 0.8rem; }
.draw-name:disabled { opacity: 0.4; }

.draw { position: fixed; inset: 0; z-index: 50; background: var(--deep); color: #fff; overflow-y: auto; }
.draw-inner { max-width: 32rem; margin: 0 auto; padding: 2rem 1.2rem; display: flex; flex-direction: column; gap: 1rem; min-height: 100%; }
.draw-title { font-family: var(--display); font-weight: 400; font-size: 2.2rem; letter-spacing: 0.04em; color: var(--orange); text-align: center; }
.draw-inner > p { text-align: center; color: var(--muted-dark); }
.draw-count { font-weight: 700; }
.draw .link { color: var(--muted-dark); }
.draw .draw-names { justify-content: center; }
.draw-inner.reveal { justify-content: center; align-items: center; text-align: center; }
.draw-who { font-family: var(--display); font-size: 2rem; letter-spacing: 0.03em; color: #fff !important; }
.draw-result { font-size: 1.2rem; color: #fff !important; }
.draw-result strong { font-family: var(--display); font-weight: 400; letter-spacing: 0.05em; color: var(--orange); }
.flip { perspective: 800px; width: 12rem; height: 12rem; }
.flip-card { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(.3,1.4,.5,1); }
.flip-card.flipped { transform: rotateY(540deg); }
.face {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; backface-visibility: hidden;
  font-family: var(--display); font-size: 2.2rem; letter-spacing: 0.06em;
}
.face.front { background: var(--orange); color: var(--deep); font-size: 5rem; border: 6px dashed var(--deep); }
.face.back { transform: rotateY(180deg); }
.face.back.black { background: #000; color: #fff; border: 6px solid #fff; }
.face.back.white { background: #fff; color: #000; border: 6px solid #000; }
.draw .teams-grid { color: inherit; }
.draw .team-col.black { border-color: #fff; }

/* ── Grades & rating form ── */
.page-title { font-family: var(--display); font-weight: 400; font-size: 1.9rem; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.1; }
.grade-list { gap: 0; }
.grade-list.card { padding: 0.3rem 0.9rem; }
.grade-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.6rem; padding: 0.6rem 0; border-bottom: 1px solid var(--ice); }
.grade-row:last-child, .grade-list .row:last-child { border-bottom: 0; }
.grade-list .row { padding: 0.45rem 0; border-bottom: 1px solid var(--ice); }
.g-name { font-weight: 700; flex: 1 1 8rem; }
.g-pick { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.grade-btns { display: flex; gap: 0.25rem; }
.grade-btn {
  font: inherit; font-family: var(--display); font-size: 1.1rem; width: 2.3rem; height: 2.3rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; color: var(--deep); cursor: pointer;
}
.grade-btn.on { background: var(--deep); color: #fff; border-color: var(--deep); }
.adv { flex-direction: row; align-items: center; gap: 0.35rem; font-size: 0.78rem; }
.adv select { font: inherit; font-size: 16px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0.3rem 0.4rem; background: #fff; color: var(--deep); }
.grade-key { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.85rem; }
.grade-key b { font-family: var(--display); font-weight: 400; font-size: 1rem; margin-right: 0.2rem; }
.rate-page { padding-bottom: 6rem; }
.rate-send { position: fixed; left: 0; right: 0; bottom: 0; padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom)); background: var(--ice); border-top: 1px solid var(--line); z-index: 20; }
.rate-send .btn { max-width: 32rem; margin: 0 auto; display: flex; }
.big-emoji { font-size: 3rem; }
.pin-note { color: var(--danger); font-weight: 700; }
.pin-sheet input[name^="pin"] { font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; }
.avg { text-align: right; }

/* ── Home crest, roster, raters ── */
.home-crest { display: flex; align-items: center; line-height: 0; text-decoration: none; }
.chat-screen .home-crest { justify-self: end; }
.rate-todo { border: 2px solid var(--orange) !important; margin-bottom: 0.9rem; }
.rate-todo small { display: block; color: var(--muted); }
.draw-name.on { background: var(--deep); color: #fff; border-color: var(--deep); }
.roster-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0; border-bottom: 1px solid var(--ice); }
.roster-row:last-child { border-bottom: 0; }
.roster-row.old { opacity: 0.6; }
.pos-btn { font: inherit; font-size: 0.8rem; font-weight: 700; border: 1.5px solid var(--line); background: #fff; color: var(--deep); border-radius: 999px; padding: 0.3rem 0.65rem; cursor: pointer; }
.pos-btn.on { background: var(--ice); border-color: var(--deep); }
.new-tag { background: var(--orange); color: var(--deep); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.08em; border-radius: 6px; padding: 0.1rem 0.35rem; vertical-align: 0.1em; }
.rate-when { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.rate-when select { font: inherit; font-size: 16px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0.35rem 0.5rem; background: #fff; color: var(--deep); }

/* ── Club Nights ── */
textarea { width: 100%; font: inherit; font-size: 16px; color: var(--deep); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 0.8rem 0.9rem; resize: vertical; }
.night-form .row-btns > label { flex: 1; }
.check input[type="radio"] { width: 1.2rem; height: 1.2rem; }
.item-row { display: flex; gap: 0.4rem; align-items: center; }
.item-row input[name="qty"] { width: 4.2rem; flex: none; text-align: center; }
.night-card {
  background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--orange);
  border-radius: 16px; padding: 0.8rem 0.9rem; display: flex; flex-direction: column; gap: 0.3rem; max-width: 85%;
}
.night-card .btn { align-self: flex-start; margin-top: 0.3rem; }
.night-card.cancelled { opacity: 0.6; }
.night-card.cancelled .night-name { text-decoration: line-through; }
.night-name { font-family: var(--display); font-weight: 400; font-size: 1.45rem; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.1; }
.night-when { font-weight: 700; }
.night-bits { font-size: 0.85rem; color: var(--muted); }
.night-open { color: var(--danger); font-weight: 800; font-size: 0.85rem; }
.night-flag { font-weight: 800; color: var(--danger); }
.night-flag.done { color: var(--deep); }
.night-head { border-top: 5px solid var(--orange); }
.night-head.cancelled { opacity: 0.75; }
.night-head .btn { align-self: flex-start; }
.night-notes { white-space: pre-wrap; background: var(--ice); border-radius: 10px; padding: 0.6rem 0.7rem; }
.claim-list { gap: 0; }
.claim-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0; border-bottom: 1px solid var(--ice); }
.claim-row:last-child { border-bottom: 0; }
.claim-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.claim-who { color: var(--muted); font-size: 0.8rem; }
.claim-row.open .claim-text strong { color: var(--danger); }
.claim-done { font-weight: 800; color: var(--deep); padding: 0 0.6rem; }
.add-item input { flex: 1; }
.add-item input { flex: 2 1 auto; }
.add-item .btn { flex: 0 0 auto; }
.add-item { flex-wrap: nowrap; }

/* ── Club Night themes ── */
.night-form select { width: 100%; font: inherit; font-size: 16px; color: var(--deep); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 0.75rem 0.8rem; }
.theme-list { display: flex; flex-direction: column; gap: 0.6rem; }
.theme-card {
  display: flex; align-items: center; gap: 0.8rem; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--orange);
  border-radius: 16px; padding: 0.85rem 0.9rem; text-decoration: none; color: var(--deep);
}
.theme-emoji { font-size: 1.9rem; flex: none; }
.theme-text { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.theme-text strong { font-family: var(--display); font-weight: 400; font-size: 1.25rem; letter-spacing: 0.03em; text-transform: uppercase; }
.theme-text small { color: var(--muted); font-size: 0.82rem; }
.theme-go { font-size: 1.5rem; color: var(--muted); }
.detail-list { gap: 0; }
.detail-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--ice); font-size: 0.92rem; }
.detail-list li:last-child { border-bottom: 0; }
.detail-list li span { color: var(--muted); }
.detail-list li strong { text-align: right; }
.food-math { background: var(--ice); border-radius: 12px; padding: 0.7rem 0.8rem; }
.rules summary { font-weight: 800; cursor: pointer; }
.rules ol { margin: 0.5rem 0 0 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; }
.pick-order { margin: 0.3rem 0 0 1.4rem; font-weight: 700; }
.pick-order li.you { color: var(--orange); }
.auto-qty { flex: none; width: 4.2rem; text-align: center; font-size: 0.75rem; font-weight: 800; color: var(--muted); }
.open-car .claim-text strong { color: var(--deep); }
