/* Curling Stars Online — shared styles for /, /login and /account (and the hub's profile card).
   Dark ice-rink UI: near-black navy ground, ice-blue accents, brand crimson for the
   wordmark and the primary action. Phone-first: everything lays out at 360 px.
   Brand: crimson #e6263a, deep crimson #9c0f20, white (brand/README.md). */

:root {
  color-scheme: dark;
  --bg: #0a0e14;
  --bg-2: #0f151d;
  --surface: #131b25;
  --surface-2: #192330;
  --line: rgba(159, 216, 255, 0.14);
  --line-strong: rgba(159, 216, 255, 0.32);
  --text: #eef4f9;
  --muted: #9db0c2;
  --ice: #9fd8ff;
  --ice-strong: #5cc3ff;
  --ice-dim: rgba(159, 216, 255, 0.10);
  --crimson: #e6263a;
  --crimson-deep: #9c0f20;
  --white: #ffffff;
  --online: #46e08a;
  --amber: #ffc94a;
  --offline: #55657a;
  --danger: #ff6b7a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Bungee", "Impact", "Arial Black", system-ui, sans-serif;
  /* the wide-screen shell: page width and the two side columns (news left, your curler right) */
  --shell-w: 1760px;
  --side-l: 280px;
  --side-r: 320px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 16px/1.5 var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 50% -120px, rgba(92, 195, 255, 0.16), transparent 70%),
    radial-gradient(600px 300px at 100% 100%, rgba(230, 38, 58, 0.08), transparent 70%);
  background-attachment: fixed;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: var(--ice); }
a:hover { color: var(--ice-strong); }
:focus-visible { outline: 3px solid var(--ice-strong); outline-offset: 2px; }
button, input { font: inherit; }

/* ---- header ---- */
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 12px; border-radius: 8px;
  background: var(--surface-2); color: var(--white); border: 1px solid var(--line-strong); text-decoration: none;
}
.skip:focus { top: 8px; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: var(--shell-w); margin: 0 auto; padding: 14px 16px 6px;
}
.brand { display: block; flex: 1 1 200px; max-width: 340px; text-decoration: none; }
.brand svg { display: block; width: 100%; height: auto; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* ---- the big red PLAY button ----
   Crimson is the wordmark's own red (--crimson / --crimson-deep), so the button reads as part of
   the brand rather than as a warning. The wordmark inside it is the shipped SVG driven to pure
   white with a filter: the file's fills are hard-coded brand reds, and red-on-red is invisible —
   brightness(0) flattens it to black and invert(1) lifts it to white, which works whatever the
   file's internal colours are and needs no second asset to keep in sync.
   Sized off a 48px minimum tap target: most of this traffic arrives on a phone from a social
   feed, and a thumb gets one attempt. */
.playnow {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  flex: 0 0 auto; padding: 10px 18px 11px; border-radius: 12px; text-decoration: none;
  background: linear-gradient(180deg, var(--crimson), var(--crimson-deep));
  border: 2px solid #ffd9de; color: #fff;
  box-shadow: 0 6px 18px rgba(230, 38, 58, 0.42);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.playnow:hover { filter: brightness(1.07); box-shadow: 0 8px 24px rgba(230, 38, 58, 0.55); }
.playnow:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(230, 38, 58, 0.45); }
.playnow:focus-visible { outline: 3px solid var(--ice-strong); outline-offset: 3px; }
.playnow-word { display: block; width: 168px; height: auto; filter: brightness(0) invert(1); }
.playnow-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-size: 1.02rem; letter-spacing: 1px; text-transform: uppercase;
  line-height: 1;
}
.playnow-tri {
  width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent #fff;
}
/* A phone shows ONE wordmark, and it is the one you can press. */
@media (max-width: 999px) {
  .top { padding-bottom: 10px; }
  .brand { display: none; }
  .playnow { flex: 1 1 auto; order: 1; padding: 12px 16px 13px; }
  .playnow-word { width: min(210px, 52vw); }
  .playnow-cta { font-size: 1.06rem; }
}
@media (prefers-reduced-motion: reduce) {
  .playnow { transition: none; }
  .playnow:active { transform: none; }
}

.who .wname { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.who .wname b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.who .wname span { color: var(--muted); font-size: 0.85rem; }
.who .link { font-size: 0.9rem; margin-left: 6px; }
.who button.link { border: 0; background: none; padding: 0; color: var(--ice); font: inherit; font-size: 0.9rem; cursor: pointer; }
.who button.link:hover { color: var(--ice-strong); }
/* ---- top menu bar ----
   brand, then the nav, then the account chip. The nav collapses behind #navToggle under 1000px.
   A panel opens on click (cs.js wireNav), never on hover alone — hover menus are unusable on touch
   and a keyboard cannot reach them. Links marked .nav-lp point into the signed-out landing, so they
   are dropped once the hub replaces it. */
.nav { flex: 1 1 auto; min-width: 0; }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
  padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none;
  font: inherit; font-size: 0.94rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--white); background: rgba(159, 216, 255, 0.09); }
.nav-link[aria-expanded="true"] { color: var(--white); background: rgba(159, 216, 255, 0.12); }
.nav-caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: 0.7; }
.nav-link[aria-expanded="true"] .nav-caret { transform: translateY(1px) rotate(-135deg); opacity: 1; }
.nav-panel {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 310px; max-width: calc(100vw - 32px);
  padding: 16px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow);
}
.nav-blurb { margin: 0 0 12px; font-size: 0.84rem; line-height: 1.45; color: var(--muted); }
.nav-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-links a { display: block; padding: 7px 8px; margin: 0 -8px; border-radius: 7px; font-size: 0.9rem; text-decoration: none; color: var(--ice); }
.nav-links a:hover, .nav-links a:focus-visible { background: rgba(159, 216, 255, 0.10); color: var(--ice-strong); }
body.signed-in .nav-lp { display: none; }
.nav-toggle { display: none; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 9px; padding: 9px 11px; cursor: pointer; }
.nav-bars, .nav-bars::before, .nav-bars::after { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }
.nav-bars { position: relative; }
.nav-bars::before, .nav-bars::after { content: ''; position: absolute; left: 0; }
.nav-bars::before { top: -6px; }
.nav-bars::after { top: 6px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 999px) {
  .nav-toggle { display: block; order: 3; }
  .nav { order: 4; flex-basis: 100%; display: none; }
  .nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; }
  .nav-link { width: 100%; justify-content: space-between; }
  .nav-panel { position: static; width: auto; max-width: none; box-shadow: none; background: var(--bg-2); margin: 2px 0 8px; }
}

.free-badge { display: inline-block; margin: 0 0 12px; padding: 6px 12px; border-radius: 999px; background: rgba(159, 216, 255, 0.14); color: var(--ice-strong); font-weight: 600; font-size: 0.95rem; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none;
  background: var(--surface-2); border: 1px solid var(--line-strong);
}
.avatar-fallback {
  display: inline-grid; place-items: center; color: var(--ice); font-weight: 700; font-size: 1rem;
}
.avatar.lg, .avatar-fallback.lg { width: 64px; height: 64px; font-size: 1.6rem; }

/* ---- layout ---- */
.wrap { max-width: var(--shell-w); margin: 0 auto; padding: 8px 16px 48px; }
/* ---- the shell: one column on a phone, centre + your curler from 900px, news | centre | curler from 1360px ----
   The page used to stop at 980px whatever the screen; on a 2560px monitor two thirds of it was empty. */
.shell { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.centre, .side { min-width: 0; }
.side-card { margin: 0 0 12px; }
.side-card h2 { font-size: 1rem; }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.news-item { display: grid; gap: 2px; }
.news-when { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.news-title { color: var(--white); font-weight: 600; line-height: 1.25; }
.news-body { font-size: 0.86rem; color: var(--muted); line-height: 1.4; }
/* the static sidebar cards (rosters, where to play) — same rhythm as the news list */
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.side-list li { font-size: 0.86rem; color: var(--muted); line-height: 1.4; padding-left: 11px; position: relative; }
.side-list li::before { content: ''; position: absolute; left: 0; top: 0.52em; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: 0.6; }
.side-list b { color: var(--white); font-weight: 600; }
/* A second heading inside a card — the destructive half of the Session card sits under one. */
.sub-h { margin: 22px 0 4px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.95rem; }
.side-note { font-size: 0.8rem; color: var(--muted); line-height: 1.4; margin: 10px 0 0; opacity: 0.85; }
.side-note-lead { margin: 0 0 12px; }
/* Your stats, top of the left column. Label left, figure right, and tabular numerals so the
   column of numbers lines up instead of jittering as the digits change. */
.stat-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.stat-rows li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-top: 1px solid var(--line);
}
.stat-rows li:first-child { border-top: 0; padding-top: 0; }
.sr-k { font-size: 0.82rem; color: var(--muted); }
.sr-v { font-size: 0.98rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.side-h3 { margin: 14px 0 7px; font-size: 0.72rem; letter-spacing: 0.11em; text-transform: uppercase; color: var(--ice); font-weight: 700; }
.side-h3:first-of-type { margin-top: 4px; }
.side-spec li { padding-left: 0; }
.side-spec li::before { content: none; }
.side-spec b { display: block; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.side-spec li { color: var(--text); }
.news-link { font-size: 0.84rem; }
.avatar-hint { margin: 8px 0 0; font-size: 0.78rem; line-height: 1.3; }
.pcard .btn.small { margin-top: 8px; }
@media (max-width: 899px) {
  .side-r { order: 2; }                       /* signed out: the landing leads, the curler follows, news last */
  .side-l { order: 3; }
  body.signed-in .side-r { order: -1; }       /* signed in: your curler at the top, as the hub always had it */
  .pcard { height: auto; min-height: 240px; } /* the hint + Edit button under the model: the card grows, the model keeps its room */
  .pcard .hero-stage { min-height: 190px; }   /* outranks the base rule's min-height: 0 (which lets the stage shrink inside a fixed-height card) */
}
/* align-items: start — side-by-side cards keep their OWN height. Without it the grid stretches the
   short one (My stats) to the tall one (Friends) and leaves a few hundred px of empty panel. */
.grid { display: grid; gap: 16px; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); margin: 0 0 16px;
}
.grid .card { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: 0.02em; margin: 0 0 10px; color: var(--white); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 14px 0 6px; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.hint { font-size: 0.85rem; color: var(--muted); }
.lead { font-size: 1.05rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; text-align: center; }
.foot { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 24px 0 0; }

/* ---- buttons & inputs ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  font-weight: 600; text-decoration: none; cursor: pointer; text-align: center;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}
.btn:hover { border-color: var(--ice); background: #1e2a38; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.primary {
  background: linear-gradient(180deg, #ff4a5c 0%, var(--crimson) 55%, var(--crimson-deep) 100%);
  border-color: var(--crimson-deep); color: var(--white);
}
.btn.primary:hover { background: linear-gradient(180deg, #ff6070 0%, var(--crimson) 55%, var(--crimson-deep) 100%); border-color: var(--crimson); color: var(--white); }
.btn.ice { background: linear-gradient(180deg, #b9e4ff, var(--ice-strong)); border-color: var(--ice-strong); color: #06202f; }
.btn.ice:hover { background: linear-gradient(180deg, #cdeeff, #78cdff); color: #06202f; }
.btn.big { font-family: var(--display); font-weight: 400; font-size: 1.25rem; letter-spacing: 0.04em; padding: 16px 28px; width: 100%; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 0.9rem; font-weight: 500; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(255, 107, 122, 0.5); color: var(--danger); }

.field { display: flex; gap: 8px; flex-wrap: wrap; }
label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 6px; }
input[type="text"] {
  flex: 1 1 160px; min-width: 0; min-height: 44px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text);
}
input[type="text"]:focus { border-color: var(--ice); outline: none; box-shadow: 0 0 0 3px var(--ice-dim); }
input::placeholder { color: #6d8093; }

.msg { min-height: 1.4em; font-size: 0.9rem; margin: 8px 0 0; }
.msg.err, .error-text { color: var(--danger); }
.msg.ok { color: var(--online); }
.card.error { border-color: rgba(255, 107, 122, 0.5); }

/* ---- cards with a mood ---- */
.hero { text-align: center; padding: 28px 18px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.hero .btn { margin-top: 8px; }
.play { border-color: rgba(230, 38, 58, 0.45); background: linear-gradient(135deg, #1c1520 0%, var(--surface) 60%); }
.upgrade { border-color: var(--line-strong); background: linear-gradient(135deg, #10202c 0%, var(--surface) 65%); }
.price { font-family: var(--display); color: var(--ice); font-size: 1.3rem; letter-spacing: 0.02em; }
.buy { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 6px; }
.buy .btn { flex: 1 1 auto; }
.manage { margin-top: 10px; }
.banner { border-color: rgba(70, 224, 138, 0.5); background: linear-gradient(135deg, #0f2a1f, var(--surface) 70%); }
.danger-card { border-color: rgba(255, 107, 122, 0.35); }
.accent { border-color: var(--ice-strong); }

.highlight { border-color: var(--ice-strong); box-shadow: 0 0 0 4px var(--ice-dim), var(--shadow); animation: pulse 1.6s ease-in-out 2; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--ice-dim), var(--shadow); }
  50% { box-shadow: 0 0 0 12px rgba(159, 216, 255, 0.22), var(--shadow); }
}

/* ---- stats ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 10px; }
.tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.tile .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.tile .v { font-family: var(--display); font-size: 1.3rem; color: var(--ice); margin-top: 2px; overflow-wrap: anywhere; }
.tile .s { font-size: 0.8rem; color: var(--muted); }
.h2h { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.h2h li { font-size: 0.9rem; }
.h2h b { color: var(--ice); font-weight: 600; }

/* ---- rinks played (the account's own list, and the shared "where everyone is playing") ----
   Built out of the same tokens as every other panel here: the --surface card, --line rules,
   --display for the number and --ice for the accent. The ranked variant numbers the rows with a
   counter rather than a list marker so the digits line up with the tabular figures on the right. */
.rink-rows { list-style: none; margin: 0; padding: 0; counter-reset: rr; }
.rink-rows li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.rink-rows li:first-child { border-top: 0; }
.rr-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-v { flex: none; font-family: var(--display); font-size: 0.95rem; font-weight: 400; letter-spacing: 0.02em; color: var(--ice); font-variant-numeric: tabular-nums; }
.ranked li { counter-increment: rr; }
.ranked .rr-n::before {
  content: counter(rr); display: inline-block; min-width: 1.6em; margin-right: 8px;
  font-family: var(--display); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em;
}
.ranked li:first-child .rr-n::before, .ranked li:nth-child(2) .rr-n::before, .ranked li:nth-child(3) .rr-n::before { color: var(--ice-strong); }
.pop-rinks .rink-rows { margin-top: 4px; }
.pop-rinks .hint { margin-bottom: 0; }

/* ---- friends ----
   Presence lights (cs.js presenceStatus): green = in game / in lobby, amber = on the dashboard,
   online elsewhere, or idle (seen 2–15 min ago), grey = offline. The same tone classes colour
   the .dot, the .pstatus label and the legend under the list. */
.people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.person:first-child { border-top: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--offline); flex: none; box-shadow: 0 0 0 2px var(--surface); }
.dot.tone-green { background: var(--online); box-shadow: 0 0 0 2px var(--surface), 0 0 10px var(--online); }
.dot.tone-amber { background: var(--amber); box-shadow: 0 0 0 2px var(--surface), 0 0 8px rgba(255, 201, 74, 0.55); }
.dot.tone-grey { background: var(--offline); }
/* in a row the light is a badge on the avatar's corner (spends no row width; reads like chat apps) */
.pav { position: relative; flex: none; display: inline-block; width: 36px; height: 36px; }
.pav .avatar { display: block; }
.pav .avatar-fallback { display: grid; }
.pav .dot { position: absolute; right: -2px; bottom: -1px; width: 12px; height: 12px; border: 2px solid var(--surface); box-shadow: none; }
.pav .dot.tone-green { box-shadow: 0 0 8px var(--online); }
.pav .dot.tone-amber { box-shadow: 0 0 7px rgba(255, 201, 74, 0.55); }
.person.tone-grey .avatar, .person.tone-grey .avatar-fallback { opacity: 0.7; }
.person .pactions .btn.small { padding: 6px 10px; }
.pname { flex: 1 1 96px; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pname b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phandle { color: var(--muted); font-size: 0.85rem; }
.pstatus { font-size: 0.78rem; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pstatus.tone-green .plabel { color: var(--online); font-weight: 600; }
.pstatus.tone-amber .plabel { color: var(--amber); font-weight: 600; }
.pstatus .pwhen { color: var(--muted); }
.pactions { display: flex; gap: 6px; margin-left: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.76rem; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend .dot { width: 8px; height: 8px; box-shadow: none; }
.empty { color: var(--muted); padding: 8px 0; }
.chip { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; color: var(--ice); }

/* ---- login ---- */
.gsi-wrap { display: flex; justify-content: center; min-height: 44px; margin: 18px 0 10px; }
.loading { color: var(--muted); }
.loading::after { content: "…"; }

/* ---- account ---- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 0.9rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---- hub layout + the profile card (index.html #profileCard, model by hero.js) ----
   Phone: the card sits above the hub content, ~240 px tall, centred. From 900 px the hub is
   two columns and the card is a sticky 300 px column on the right, ~480 px tall (about five
   inches at 96 dpi), never more than 60 % of the viewport. */
.hub { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.hub-main { min-width: 0; }
.pcard {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  height: 240px; padding: 10px 14px 14px; margin: 0;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.hero-stage { position: relative; flex: 1 1 auto; width: 100%; min-height: 0; }
.hero-canvas {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block;
  touch-action: pan-y; cursor: grab; opacity: 0; transition: opacity 0.5s ease;
}
.hero-canvas:active { cursor: grabbing; }
.hero-ready .hero-canvas { opacity: 1; }
.hero-ready .stone { display: none; }
/* the fallback / loading glyph: a granite stone with a crimson handle, pure CSS */
.stone {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 3px solid #b9c4d1;
  background: radial-gradient(circle at 36% 30%, #7c8694, #2a313c 72%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}
.stone::before {
  content: ""; position: absolute; left: 50%; top: -16px; width: 36px; height: 13px; transform: translateX(-50%);
  border-radius: 7px; background: linear-gradient(180deg, #ff4a5c, var(--crimson-deep)); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.stone::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.16); }
.hero-fallback .stone { opacity: 0.9; }
.hero-name { font-family: var(--display); font-size: 1.1rem; letter-spacing: 0.02em; color: var(--white); margin: 8px 0 0; max-width: 100%; overflow-wrap: anywhere; line-height: 1.2; }
.hero-email { font-size: 0.78rem; color: var(--muted); margin: 2px 0 0; max-width: 100%; overflow-wrap: anywhere; line-height: 1.3; }
.hero-star { font-family: var(--display); font-size: 1rem; letter-spacing: 0.05em; color: var(--ice); margin: 4px 0 0; }
.hero-club { font-size: 0.82rem; color: var(--ice); margin: 4px 0 0; max-width: 100%; overflow-wrap: anywhere; line-height: 1.3; }
.who .link.admin { color: var(--crimson); font-weight: 600; }

/* ---- club picker (/account) ---- */
.club-current-line { margin: 0 0 8px; font-size: 1.02rem; }
.club-current-line b { color: var(--white); }
.club-current-line .muted { font-weight: 400; }
.club-picker .club-search { flex: 1 1 100%; }
.club-results { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.club-results li { border-top: 1px solid var(--line); }
.club-results li:first-child { border-top: 0; }
.club-opt { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; background: transparent; border: 0; color: var(--text); padding: 10px 12px; cursor: pointer; font: inherit; }
.club-opt:hover, .club-opt:focus-visible { background: var(--surface-2); color: var(--white); outline: none; }
.club-opt b { font-weight: 600; }
.club-opt-loc { color: var(--muted); font-size: 0.85rem; }
.club-opt-tag { margin-left: auto; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ice); border: 1px solid var(--line-strong); border-radius: 20px; padding: 1px 8px; }
.club-opt-add b { color: var(--ice); font-weight: 600; }
.club-add { margin-top: 10px; }
.club-add .club-add-name { flex: 1 1 100%; }
.club-add select {
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
.club-add select:focus { border-color: var(--ice); outline: none; box-shadow: 0 0 0 3px var(--ice-dim); }

/* ---- RINK SHOWCASE (#showcase) — the first card in the hub: one venue at a time, its isometric
   view and an in-game photo side by side, the game's own description under them, and a thumbnail
   rail to pick another. Images sit in fixed 16:9 boxes so switching never reflows the page. ---- */
.showcase { padding: 16px 18px 14px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.sc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.sc-title { min-width: 0; }
.sc-title h2 { margin-bottom: 2px; }
.sc-nav { display: flex; gap: 6px; flex: none; }
.sc-arrow { min-width: 40px; padding: 6px 10px; font-size: 1.25rem; line-height: 1; }
.sc-stage { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.sc-fig { margin: 0; min-width: 0; }
.sc-fig .sc-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); }
.sc-fig figcaption { margin-top: 6px; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sc-fig.is-missing { display: none; }
.sc-info { min-width: 0; }
.sc-kicker { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ice); margin: 0 0 4px; font-weight: 700; }
.sc-name { font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: 0.02em; color: var(--white); margin: 0 0 2px; line-height: 1.15; text-transform: none; }
.sc-loc { color: var(--ice); font-size: 0.9rem; margin: 0 0 8px; }
.sc-blurb { color: var(--text); font-size: 1rem; line-height: 1.5; margin: 0 0 8px; max-width: 62ch; }
.sc-meta { margin: 0; }
.sc-thumbs { list-style: none; margin: 14px 0 0; padding: 4px 0 2px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.sc-thumbs li { flex: 1 1 0; min-width: 72px; max-width: 124px; }   /* all eight fit when the card has room; scroll otherwise */
.sc-thumb {
  display: block; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--bg-2);
  width: 100%; cursor: pointer; opacity: 0.72; transition: opacity 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}
.sc-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.sc-thumb:hover { opacity: 1; transform: translateY(-1px); }
.sc-thumb[aria-pressed="true"] { opacity: 1; border-color: var(--ice-strong); }
.sc-thumb:focus-visible { opacity: 1; outline-offset: 1px; }
@media (min-width: 640px) {
  .sc-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-info { grid-column: 1 / -1; }
}
/* The description moves beside the two pictures only when the CARD is wide enough for three
   columns — a container query, because at 1440px the centre column is 768px and a viewport
   rule put the blurb in a 220px strip with two postage-stamp pictures. Browsers without
   container queries keep the two-up + description-below layout, which is always right. */
.hub-main { container-type: inline-size; }
@container (min-width: 1040px) {
  .sc-stage { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(260px, 0.9fr); gap: 14px; }
  .sc-info { grid-column: 3; }
}

/* ---- rinks grid (hub #rinks: every venue in the full game, from /assets/rinks.json) ----
   Cards 2-up on a phone, 3-up once the hub has its wide column; each iso shot sits in a 16:9 box
   so the grid never reflows as lazy images land. */
/* ---- Upcoming curling events (#events) — a dated list, not a card grid: the date is the thing
   you scan for, so it leads each row in tabular figures and the name sits beside it. ---- */
.events-head { margin-bottom: 12px; }
.events-head h2 { margin-bottom: 2px; }
.event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.event-list[aria-busy="true"] { min-height: 60px; }
.event {
  display: grid; grid-template-columns: minmax(9.5rem, auto) minmax(0, 1fr); gap: 4px 16px;
  padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline;
}
.event:first-child { border-top: 0; padding-top: 2px; }
.event-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.event-dates { color: var(--ice); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.event-badge {
  font-family: var(--display); font-size: 0.54rem; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1;
  color: var(--white); background: rgba(92, 195, 255, 0.18); border: 1px solid rgba(92, 195, 255, 0.45);
  border-radius: 999px; padding: 4px 8px 3px;
}
.event-badge.live { background: linear-gradient(180deg, #ff4a5c, var(--crimson-deep)); border-color: transparent; }
.event-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.event-name { font-family: var(--display); font-weight: 400; color: var(--white); font-size: 0.86rem; letter-spacing: 0.01em; line-height: 1.3; overflow-wrap: anywhere; }
.event-series { color: var(--ice); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
.event-where { color: var(--muted); font-size: 0.8rem; line-height: 1.35; overflow-wrap: anywhere; }
.event.is-live .event-name { color: #ff6b7a; }
.events-more { text-align: center; margin: 12px 0 0; }
@media (max-width: 520px) {
  .event { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

.rinks-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.rinks-title { min-width: 0; flex: 1 1 220px; }
.rinks-title h2 { margin-bottom: 2px; }
.rinks-head .btn { flex: none; }
.rink-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rink-grid[aria-busy="true"] { min-height: 120px; }
.rink {
  display: flex; flex-direction: column; overflow: hidden; min-width: 0;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.rink:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.rink-media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.rink-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rink-badge {
  position: absolute; top: 8px; left: 8px; margin: 0;
  font-family: var(--display); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1;
  color: var(--white); background: linear-gradient(180deg, #ff4a5c, var(--crimson-deep));
  border-radius: 999px; padding: 5px 9px 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.rink-meta { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px 11px; min-width: 0; }
.rink-name { font-family: var(--display); font-weight: 400; color: var(--white); font-size: 0.8rem; letter-spacing: 0.01em; line-height: 1.3; overflow-wrap: anywhere; }
.rink-loc { color: var(--muted); font-size: 0.78rem; line-height: 1.35; overflow-wrap: anywhere; }
.rink-added { color: var(--ice); font-size: 0.72rem; letter-spacing: 0.02em; margin-top: 2px; }
.rinks-more { text-align: center; margin: 14px 0 0; }

/* the compact "Submit your rink" form the showcase button reveals (#rinkReq) */
.rinkreq {
  margin-top: 16px; padding: 18px 16px; border: 1px solid var(--line-strong); border-radius: 12px;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(92, 195, 255, 0.10), transparent 55%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.rinkreq h3 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; text-transform: none; letter-spacing: 0.02em; font-size: 1.02rem; color: var(--white); }
.rinkreq-lead { color: var(--muted); font-size: 0.92rem; margin: 0 0 14px; }
.rinkreq-thanks {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; font-size: 0.92rem;
  color: var(--online); border: 1px solid rgba(70, 224, 138, 0.5);
  background: linear-gradient(135deg, #0f2a1f, var(--surface) 70%);
}
.rinkreq-grid { display: grid; gap: 10px 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); margin-bottom: 10px; }
.rinkreq-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; }
.rinkreq-grid .rinkreq-field { margin: 0; }
.rinkreq-field label { margin: 0; font-size: 0.85rem; }
.rinkreq input, .rinkreq textarea {
  flex: none; width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text); font: inherit; resize: vertical;
}
.rinkreq textarea { min-height: 96px; line-height: 1.5; }
.rinkreq input:focus, .rinkreq textarea:focus { border-color: var(--ice); outline: none; box-shadow: 0 0 0 3px var(--ice-dim); }
.rinkreq input::placeholder, .rinkreq textarea::placeholder { color: #6d8093; }
.rinkreq-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 2px; }
/* Narrow: the two buttons SHARE the first row — a wrapping flex row pushed "Cancel" onto a line of
   its own — and the "or email…" hint drops to a line underneath them. */
@media (max-width: 560px) {
  .rinkreq-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .rinkreq-foot .btn { width: 100%; min-width: 0; padding-left: 12px; padding-right: 12px; }
  .rinkreq-foot .hint { grid-column: 1 / -1; }
}
/* Phone: "Send my rink request" no longer fits on one line beside Cancel, so both go FULL WIDTH,
   one under the other — the same shape the landing page's rink form takes at this size. */
@media (max-width: 430px) {
  .rinkreq-foot { grid-template-columns: minmax(0, 1fr); }
}

/* Tablet+ (iPad portrait at 768 included): the profile card becomes a side column beside the
   hub content instead of stacking above it. */
/* ---- video gallery (cs.js loadVideos) ----
   One big stage plus a rail of thumbnails. The stage is a facade until you click it: a poster and a
   play button, no YouTube iframe and no third-party request, which keeps the page fast and keeps
   YouTube out of the picture for anyone who only ever scrolls past. */
.videos { margin: 28px 0; }
.vid-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.vid-head h2 { margin: 0; font-size: 1.35rem; }
.vid-stage { display: grid; gap: 16px; align-items: start; }
.vid-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.vid-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.vid-play { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.vid-poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.vid-play-ic { position: absolute; left: 50%; top: 50%; width: 76px; transform: translate(-50%, -50%); filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55)); transition: transform 0.12s ease; }
.vid-play-ic svg { display: block; width: 100%; height: auto; }
.vid-play:hover .vid-play-ic, .vid-play:focus-visible .vid-play-ic { transform: translate(-50%, -50%) scale(1.08); }
.vid-play-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.vid-title { margin: 0; font-size: 1.05rem; }
.vid-when { margin: 4px 0 0; font-size: 0.8rem; color: var(--muted); }
.vid-desc { margin: 8px 0 0; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.vid-open { display: inline-block; margin-top: 10px; font-size: 0.86rem; }
.vid-rail { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 0; padding: 0; }
.vid-pick { display: block; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--bg-2); cursor: pointer; text-align: left; }
.vid-pick:hover { border-color: var(--line-strong); }
.vid-pick[aria-current="true"] { border-color: var(--crimson); }
/* height:auto so the width/height attributes (which stop the rail reflowing as thumbs arrive) do not
   pin the box to 270px and beat the aspect-ratio. */
.vid-pick img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.vid-pick span { display: block; padding: 7px 9px 9px; font-size: 0.78rem; line-height: 1.35; color: var(--text); }
@media (min-width: 760px) {
  .vid-stage { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 20px; }
}

/* ---- Curling Stars Radio Network (site/radio.js) ----
   Sits under the curler in the right column, on the landing and in the hub alike. Silent until the
   visitor presses Tune in: that click is both the consent and the user gesture browsers demand
   before audio or speech may start, so nothing above is loaded before it. */
.radio { margin-top: 12px; }
/* Turkey the dog (site/dog.js), the station's host, above the lockup. The stage has NO height
   until dog.js adds .dog-ready: a browser without WebGL or without importmaps — or a module that
   404s — leaves the card exactly as it was, with no reserved hole where a dog should be. The
   canvas is decoration end to end: aria-hidden, pointer-events none (so it can never swallow a
   click meant for the card, and is never a tab stop) and it fades in rather than popping. */
.dog-stage { position: relative; width: 100%; height: 0; margin: 0; overflow: hidden; }
.dog-stage.dog-ready { height: 132px; margin: -2px 0 8px; }
.dog-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  pointer-events: none; opacity: 0; transition: opacity 0.6s ease;
}
.dog-ready .dog-canvas { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .dog-canvas { transition: none; } }
/* The station's lockup. One idea: a curling house and the broadcast symbol are the same shape, so
   the rings radiating off the stone do both jobs. The wordmark is the real brand asset rather than
   a re-drawing, and RADIO NETWORK is set in the display face under it, tracked out to the wordmark's
   width so the two read as one mark. The whole heading carries an aria-label; every piece inside it
   is decoration. */
.radio-lockup { display: flex; align-items: center; gap: 11px; margin: 0 0 10px; }
.rl-badge { flex: none; width: 40px; height: 40px; }
.rl-badge svg { display: block; width: 100%; height: 100%; }
.rl-marks { display: block; min-width: 0; flex: 1 1 auto; }
.rl-word { display: block; width: 100%; max-width: 168px; height: auto; }
.rl-sub {
  display: block; max-width: 168px; margin-top: 3px;
  font-family: var(--display); font-size: 0.56rem; line-height: 1;
  color: var(--ice); text-transform: uppercase;
  /* tracked out so the sub-line ends flush with the wordmark above it */
  letter-spacing: 0.235em; text-indent: 0.235em; text-align: center;
}
.radio-blurb { margin: 0 0 12px; font-size: 0.8rem; line-height: 1.45; color: var(--muted); }
.radio-bars {
  display: block; width: 100%; height: 56px; border-radius: 10px;
  background: linear-gradient(180deg, var(--bg-2), #0b1219);
  border: 1px solid var(--line);
}
.radio-now { margin: 10px 0 0; font-size: 0.86rem; font-weight: 600; line-height: 1.3; min-height: 1.1em; }
.radio-sub { margin: 2px 0 0; font-size: 0.78rem; color: var(--muted); line-height: 1.35; min-height: 1em; }
.radio-ctl { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.radio-ctl .btn { flex: none; }
.radio-vol { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.radio-vol input[type="range"] {
  width: 100%; min-width: 0; height: 22px; -webkit-appearance: none; appearance: none;
  background: none; cursor: pointer;
}
.radio-vol input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--line-strong); }
.radio-vol input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-strong); }
.radio-vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -5px;
  border-radius: 50%; background: var(--ice); border: 0;
}
.radio-vol input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ice); border: 0; }
.radio-status { margin: 8px 0 0; font-size: 0.76rem; color: var(--muted); min-height: 0; }
.radio-status:empty { margin: 0; }
/* On air: the button carries the state as colour as well as its label and aria-pressed. */
#radioToggle[aria-pressed="true"] { background: var(--crimson); border-color: var(--crimson); color: var(--white); }

/* ---- social row at the foot of the landing ----
   Icons are simple geometry of our own, not traced brand marks, and every one is paired with the
   platform's name in text — so recognition never depends on the glyph, and a blocked image or a
   screen reader loses nothing. */
.lp-social { margin: 44px 0 8px; text-align: center; }
.lp-social-lead { margin: 0 auto 20px; max-width: 52ch; color: var(--muted); }
.lp-social-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; }
.soc {
  display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text);
  padding: 11px 16px 11px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); min-width: 210px; transition: transform 0.12s ease, border-color 0.12s ease;
}
.soc:hover, .soc:focus-visible { transform: translateY(-2px); border-color: var(--line-strong); color: var(--text); }
.soc-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--bg-2); }
.soc-ic svg { width: 24px; height: 24px; display: block; }
.soc-yt svg { fill: var(--crimson); }
.soc-ig { color: #d96aa6; }
.soc-fb { color: #5aa0ff; }
.soc-dc svg { fill: #8b93f2; }
.soc-txt { display: flex; flex-direction: column; line-height: 1.25; text-align: left; min-width: 0; }
.soc-txt b { font-size: 0.95rem; }
.soc-txt span { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 520px) { .soc { min-width: 0; width: 100%; } }

@media (min-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr) var(--side-r); }
  .centre { grid-column: 1; grid-row: 1; }
  .side-r { grid-column: 2; grid-row: 1; position: sticky; top: 12px; }
  .side-l { grid-column: 1 / -1; grid-row: 2; display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .side-l .side-card { margin: 0; }
  .pcard { position: sticky; top: 12px; height: 480px; max-height: 60vh; padding: 12px 16px 18px; }
  .hero-name { font-size: 1.25rem; margin-top: 10px; }
  .hero-email { font-size: 0.82rem; }
  .hero-star { font-size: 1.1rem; margin-top: 6px; }
  .dog-stage.dog-ready { height: 150px; }
  .rink-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .rink-name { font-size: 0.84rem; }
}

@media (min-width: 1360px) {
  .shell { grid-template-columns: var(--side-l) minmax(0, 1fr) var(--side-r); gap: 20px; }
  .side-l { grid-column: 1; grid-row: 1; display: block; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
  .side-l .side-card { margin: 0 0 14px; }
  .centre { grid-column: 2; }
  .side-r { grid-column: 3; }
}
@media (min-width: 1900px) {
  :root { --shell-w: 2100px; --side-l: 320px; --side-r: 360px; }   /* a 2560 monitor keeps ~230px margins, not 400 */
  .top { padding: 16px 28px 8px; }
  .wrap { padding: 12px 28px 56px; }
  .shell { gap: 24px; }
  .pcard { height: 560px; max-height: 64vh; }
}

/* ---- small phones ---- */
@media (max-width: 420px) {
  .top { padding: 12px 12px 4px; }
  .wrap { padding: 6px 12px 40px; }
  .card { padding: 14px; }
  .btn.big { font-size: 1.1rem; padding: 14px 20px; }
  .who .wname b { max-width: 120px; }
  .pcard { height: auto; min-height: 240px; padding: 8px 10px 12px; }   /* grows for the hint + Edit button; the base rule keeps the 240px floor */
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}

/* ---- phone landing refinements (iPhone 390 etc.) ---- */
@media (max-width: 560px) {
  .landing > * + * { margin-top: 32px; }
  .landing .lp-hero { padding: 18px 16px 22px; border-radius: 16px; }
  .landing .lp-actions { gap: 10px; }
  .landing .lp-actions .btn { flex: 1 1 100%; }              /* full-width CTAs, easy to tap */
  .landing .lp-rinkreq { padding: 20px 15px; }
  .landing .lp-store { padding: 20px 16px; }
  .landing .lp-form-foot { gap: 10px; }
  .landing .lp-form-foot .btn { flex: 1 1 100%; }
  .landing .lp-plan-cta, .landing .lp-store-cta { min-height: 46px; }
  .landing .lp-links { gap: 10px 16px; }
  .landing .lp-links a { padding: 4px 2px; }                 /* larger tap area in the footer */
}

/* ---- tablets: a touch more breathing room, still comfortable in portrait & landscape ---- */
@media (min-width: 560px) and (max-width: 1024px) {
  .landing .lp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .highlight { box-shadow: 0 0 0 4px var(--ice-dim), var(--shadow); }
}

/* ==========================================================================
   LANDING PAGE — the logged-OUT view of / (index.html #signin.landing).
   Everything here is scoped under .landing so it never touches the hub
   (#hub), the account page or the /login card. Dark theme only, phone-first.
   ========================================================================== */
.landing { display: block; margin: 0; }
.landing > * + * { margin-top: 40px; }
.landing .lp-h1 { font-family: var(--display); font-weight: 400; color: var(--white); letter-spacing: 0.01em; line-height: 1.06; margin: 0 0 14px; font-size: clamp(1.9rem, 6vw, 3rem); }
.landing .lp-h2 { font-family: var(--display); font-weight: 400; color: var(--white); letter-spacing: 0.02em; line-height: 1.12; margin: 0 0 8px; font-size: clamp(1.3rem, 4vw, 1.9rem); }
.landing h3 { font-family: var(--display); font-weight: 400; color: var(--white); text-transform: none; letter-spacing: 0.01em; font-size: 1.02rem; margin: 12px 0 6px; }
.landing p { margin: 0 0 12px; }
.landing p:last-child { margin-bottom: 0; }

/* ---- hero ---- */
.landing .lp-hero {
  display: grid; gap: 26px; align-items: center; grid-template-columns: minmax(0, 1fr);
  padding: 20px 20px 26px;
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(92, 195, 255, 0.14), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(230, 38, 58, 0.12), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.landing .lp-kicker {
  display: inline-block; font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ice-strong); margin: 0 0 12px;
}
.landing .lp-lead { font-size: 1.08rem; color: var(--muted); max-width: 42ch; }
.landing .lp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 12px; }
.landing .lp-note { font-size: 0.85rem; color: var(--muted); }
.landing .btn.lp-ghost { background: transparent; border-color: var(--line-strong); }
.landing .btn.lp-ghost:hover { border-color: var(--ice); background: rgba(159, 216, 255, 0.08); }
.landing .lp-hero-media { margin: 0; }
.landing .lp-shot {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--line-strong);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5);
  background: var(--bg-2);
}
.landing .lp-hero-media .lp-shot { box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(159, 216, 255, 0.08); }

/* ---- what it is ---- */
.landing .lp-band { text-align: center; padding: 8px 6px; }
.landing .lp-band-lead { font-size: 1.05rem; color: var(--muted); max-width: 62ch; margin-left: auto; margin-right: auto; }

/* ---- features ---- */
.landing .lp-features {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.landing .lp-feat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.landing .lp-feat p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.landing .lp-ic {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 11px;
  color: var(--ice-strong); background: var(--ice-dim); border: 1px solid var(--line-strong);
}
.landing .lp-ic svg { width: 24px; height: 24px; }
.landing .lp-soon { color: var(--ice); }

/* ---- screenshots ---- */
.landing .lp-shots { text-align: center; }
.landing .lp-shots > .lp-h2 { margin-bottom: 18px; }
.landing .lp-gallery {
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  text-align: left;
}
.landing .lp-card { margin: 0; }
.landing .lp-card figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }

/* ---- pricing ---- */
.landing .lp-pricing { text-align: center; }
.landing .lp-pricing > .lp-h2 { margin-bottom: 18px; }
.landing .lp-plans {
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  align-items: stretch; text-align: left; max-width: 720px; margin: 0 auto;
}
.landing .lp-plan {
  display: flex; flex-direction: column; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px;
}
.landing .lp-plan-featured {
  border-color: var(--crimson); box-shadow: 0 0 0 1px var(--crimson-deep), 0 16px 40px rgba(230, 38, 58, 0.14);
  background: linear-gradient(180deg, #1c1520 0%, var(--surface) 60%);
}
.landing .lp-badge {
  position: absolute; top: -12px; right: 18px; margin: 0;
  font-family: var(--display); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--white); background: linear-gradient(180deg, #ff4a5c, var(--crimson-deep));
  border-radius: 999px; padding: 5px 12px; box-shadow: var(--shadow);
}
.landing .lp-plan-name { font-family: var(--display); color: var(--white); font-size: 1.05rem; letter-spacing: 0.02em; margin: 0 0 8px; }
.landing .lp-price { margin: 0 0 2px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.landing .lp-amt { font-family: var(--display); color: var(--ice); font-size: 2rem; line-height: 1; }
.landing .lp-per { color: var(--muted); font-size: 0.9rem; }
.landing .lp-plan-sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 14px; }
.landing .lp-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 9px; }
.landing .lp-list li { position: relative; padding-left: 26px; color: var(--text); font-size: 0.95rem; }
.landing .lp-list li::before {
  content: ""; position: absolute; left: 3px; top: 0.34em; width: 11px; height: 6px;
  border-left: 2px solid var(--ice-strong); border-bottom: 2px solid var(--ice-strong);
  transform: rotate(-45deg);
}
.landing .lp-plan-cta { margin-top: auto; width: 100%; }
.landing .lp-center { text-align: center; max-width: 52ch; margin-left: auto; margin-right: auto; margin-top: 16px; }

/* ---- footer ---- */
.landing .lp-footer { text-align: center; border-top: 1px solid var(--line); padding-top: 26px; }
.landing .lp-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 14px; }
.landing .lp-links a { color: var(--ice); text-decoration: none; font-size: 0.92rem; }
.landing .lp-links a:hover { color: var(--ice-strong); text-decoration: underline; }
.landing .lp-foot-line { color: var(--text); font-size: 0.92rem; margin: 0 0 6px; }
.landing .lp-foot-copy { color: var(--muted); font-size: 0.82rem; margin: 0; }

/* ---- rink browser ---- */
.landing .lp-rinks { text-align: center; }
.landing .lp-rinks > .lp-h2 { margin-bottom: 8px; }
.landing .lp-rinks-lead { font-size: 1.05rem; color: var(--muted); max-width: 62ch; margin: 0 auto 20px; }
.landing .lp-rink-gallery {
  display: grid; gap: 16px; text-align: left;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.landing .lp-rink {
  margin: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform 0.14s ease, border-color 0.14s ease;
}
.landing .lp-rink:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.landing .lp-rink-media { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); }
.landing .lp-rink-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.landing .lp-rink figcaption { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.landing .lp-rink-name { font-family: var(--display); font-weight: 400; color: var(--white); font-size: 1rem; letter-spacing: 0.01em; }
.landing .lp-rink-loc { color: var(--muted); font-size: 0.85rem; }

/* ---- custom rink request ---- */
.landing .lp-rinkreq {
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 26px 22px; text-align: center;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(92, 195, 255, 0.10), transparent 55%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.landing .lp-rinkreq > .lp-h2 { margin-bottom: 8px; }
.landing .lp-rinkreq-lead { font-size: 1.05rem; color: var(--muted); max-width: 54ch; margin: 0 auto 20px; }
.landing .lp-rinkreq-thanks {
  max-width: 54ch; margin: 0 auto 18px; padding: 12px 16px; border-radius: 12px;
  color: var(--online); border: 1px solid rgba(70, 224, 138, 0.5);
  background: linear-gradient(135deg, #0f2a1f, var(--surface) 70%); font-size: 0.95rem;
}
.landing .lp-form { max-width: 640px; margin: 0 auto; text-align: left; }
.landing .lp-form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.landing .lp-field { margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.landing .lp-form-grid .lp-field { margin: 0; }
.landing .lp-field label { margin: 0; }
.landing .lp-form input,
.landing .lp-form textarea {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--text);
  font: inherit; resize: vertical;
}
.landing .lp-form textarea { min-height: 108px; line-height: 1.5; }
.landing .lp-form input:focus,
.landing .lp-form textarea:focus { border-color: var(--ice); outline: none; box-shadow: 0 0 0 3px var(--ice-dim); }
.landing .lp-form input::placeholder,
.landing .lp-form textarea::placeholder { color: #6d8093; }
.landing .lp-form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 6px; }
.landing .lp-form-alt { color: var(--muted); font-size: 0.9rem; }

/* ---- app store callouts (Steam + Google Play) ---- */
.landing .lp-stores {
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  align-items: stretch;
}
.landing .lp-store {
  display: flex; flex-direction: column; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px; box-shadow: var(--shadow);
}
.landing .lp-store-steam { background: linear-gradient(150deg, #10151e 0%, var(--surface) 70%); border-color: var(--line-strong); }
.landing .lp-store-play { background: linear-gradient(150deg, #131a24 0%, var(--surface) 70%); }
.landing .lp-store-badge {
  display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px;
  border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.landing .lp-store-badge svg { width: 100%; height: 100%; display: block; border-radius: 14px; }
.landing .lp-store-badge img { width: 100%; height: 100%; display: block; border-radius: 14px; object-fit: contain; }
.landing .lp-store-badge-steam { background: #0b1424; }
.landing .lp-store-kicker {
  font-family: var(--display); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ice-strong); margin: 0 0 6px;
}
.landing .lp-store-play .lp-store-kicker { color: var(--muted); }
.landing .lp-store-title { font-size: 1.2rem; margin: 0 0 8px; }
.landing .lp-store-copy { color: var(--muted); font-size: 0.95rem; margin: 0 0 18px; }
.landing .lp-store-cta { margin-top: auto; }
.landing .lp-store-soon { opacity: 0.6; cursor: default; }
.landing .lp-store-soon:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }

/* ---- wide hero from 760px ---- */
@media (min-width: 760px) {
  .landing > * + * { margin-top: 56px; }
  .landing .lp-hero { grid-template-columns: 1.05fr 1fr; gap: 34px; padding: 34px 34px 38px; }
  .landing .lp-hero-text { order: 1; }
  .landing .lp-hero-media { order: 2; }
}
