/* RostiQ palette (brand package): deep indigo #1E1B4B, electric cyan #22D3EE, soft violet #A78BFA,
   near black #0F172A, off white #F8FAFC. Indigo stays the text/button accent in light mode (cyan text on
   white fails WCAG AA); cyan is the highlight, and the accent in dark mode.
   Teams override the colour variables with their own (Admin → Branding). */
:root {
  --bg: #f6f7fa;
  --surface: #ffffff;
  --text: #0b0d14;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #1e1b4b;
  --on-accent: #ffffff;
  --brand: #1e1b4b;
  --brand-text: #f6f7fa;
  --pampas: #00d4ff;
  --yes: #2f7a4a;
  --yes-bg: #e1ecdc;
  --maybe: #9c7424;
  --maybe-bg: #f5e8cb;
  --no: #ad4a31;
  --no-bg: #f5ddd4;
  --final: #7c5cf0;
  /* Fonts: RostiQ's geometric sans; teams can pick the classic serif headings ("font-serif"). */
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head-weight: 700;
  --head-spacing: -.01em;
  /* Shape & depth */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgb(11 13 20 / .04), 0 2px 8px -2px rgb(11 13 20 / .07);
  --shadow: 0 1px 2px rgb(11 13 20 / .05), 0 14px 32px -14px rgb(30 27 75 / .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d14;
    --surface: #172036;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --border: #283449;
    --accent: #00d4ff;
    --on-accent: #0b0d14;
    --brand: #1e1b4b;
    --brand-text: #f6f7fa;
    --pampas: #00d4ff;
    --yes: #83c99c;
    --yes-bg: #20402f;
    --maybe: #e0b766;
    --maybe-bg: #3e3421;
    --no: #e58b72;
    --no-bg: #452821;
    --final: #8b7cff;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .3), 0 2px 8px -2px rgb(0 0 0 / .35);
    --shadow: 0 1px 2px rgb(0 0 0 / .35), 0 16px 36px -14px rgb(0 0 0 / .6);
  }
}
html.font-serif {
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Cormorant Garamond", Georgia, serif;
  --head-weight: 600;
  --head-spacing: .01em;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Safety net: nothing may widen the page (the table scrolls inside its own box). */
html, body { overflow-x: clip; }
/* iOS Safari zooms in on fields with text under 16px and stays zoomed. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
main { max-width: 1200px; margin: 0 auto; padding: 32px 16px 56px; }
h1, h2 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-spacing); }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); line-height: 1.08; margin: 0 0 6px; }
h2 { font-size: 1.35rem; margin: 44px 0 14px; }
html.font-serif h2 { font-size: 1.6rem; }
.sub { color: var(--muted); margin: 0; }

/* Buttons: secondary (default), .primary (brand colour), .action (highlight colour) */
button {
  font: inherit; font-size: .85rem; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 14px;
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease);
}
button:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: default; opacity: .5; }
button.primary, .btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; box-shadow: var(--shadow-sm); }
button.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, #fff); border-color: transparent; }
button.action, .btn.action { background: var(--pampas); color: var(--brand); border-color: var(--pampas); font-weight: 600; box-shadow: var(--shadow-sm); }
button.action:hover:not(:disabled) { background: color-mix(in srgb, var(--pampas) 85%, #fff); }
:focus-visible { outline: 2px solid var(--pampas); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
input, select, textarea { transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }

/* Icons (icons.js) */
svg.i { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.2em; }
button svg.i, .tabs svg.i { vertical-align: 0; }

/* Pill badges: tinted from the team's highlight / brand colours */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.pill.cyan { background: color-mix(in srgb, var(--pampas) 18%, var(--surface)); color: color-mix(in srgb, var(--pampas) 45%, var(--text)); }
.pill.violet { background: color-mix(in srgb, var(--final) 14%, var(--surface)); color: var(--final); }
.pill.gray { background: color-mix(in srgb, var(--muted) 12%, var(--surface)); color: var(--muted); }
.pill.dark { background: var(--brand); color: var(--brand-text); }
.pill.yes { background: var(--yes-bg); color: var(--yes); }
.pill.maybe { background: var(--maybe-bg); color: var(--maybe); }
.pill.no { background: var(--no-bg); color: var(--no); }

/* Surfaces */
.panel, .surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.status { font-size: .75rem; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 10%, var(--surface)); vertical-align: 1px; }
.status.live { background: color-mix(in srgb, var(--yes) 12%, var(--surface)); color: var(--yes); }
.status.live::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--yes) 25%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px transparent; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.live::before { background: var(--yes); }
.status.err::before { background: var(--no); }
.banner { background: var(--maybe-bg); color: var(--text); border: 1px solid var(--maybe); border-radius: var(--radius-sm); padding: 10px 14px; margin: 16px 0 0; font-size: .9rem; }

[hidden] { display: none !important; }

/* Brand header: the team's logo or name (or RostiQ) on the brand colour, page tabs underneath */
.brand { background: var(--brand); color: var(--brand-text); border-bottom: 3px solid var(--pampas); padding-top: env(safe-area-inset-top); }
/* Keep content clear of the notch in landscape. */
.brand-inner, main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.brand-inner { max-width: 1200px; margin: 0 auto; padding: 18px 16px 0; }
.brand .logo { display: block; height: 58px; width: auto; }
.tabs { display: flex; gap: 4px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  white-space: nowrap; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px; color: var(--brand-text); opacity: .72; text-decoration: none; font-weight: 600; font-size: .92rem;
  border-bottom: 3px solid transparent; margin-bottom: -3px; transition: opacity .15s var(--ease), border-color .15s var(--ease);
}
.tabs a:hover { opacity: 1; }
.tabs a[aria-current="page"] { opacity: 1; border-bottom-color: var(--pampas); }
.brand-inner > a { text-decoration: none; }
.brand .logo-text { display: block; font-family: var(--font-head); font-weight: var(--head-weight); font-size: 2.2rem; line-height: 1.25; color: var(--brand-text); letter-spacing: var(--head-spacing); }
html.font-serif .brand .logo-text { font-size: 2.4rem; line-height: 1.2; letter-spacing: .04em; }
.brand .logo.rostiq-logo { height: 44px; }
@media (max-width: 480px) { .brand .logo.rostiq-logo { height: 34px; } }
@media (max-width: 480px) {
  .brand .logo { height: 42px; }
  .brand .logo-text { font-size: 1.8rem; }
}

/* Account bar in the header */
.brand-inner { position: relative; }
.corner { position: absolute; top: 18px; right: max(16px, env(safe-area-inset-right)); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.account { display: flex; gap: 10px; align-items: center; font-size: .85rem; color: var(--brand-text); }
.lang { display: inline-flex; border: 1px solid color-mix(in srgb, var(--brand-text) 40%, transparent); border-radius: 999px; overflow: hidden; }
.lang button { background: none; border: none; border-radius: 0; color: var(--brand-text); opacity: .7; font-size: .75rem; font-weight: 700; padding: 3px 9px; }
.lang button[aria-pressed="true"] { background: var(--pampas); color: var(--brand); opacity: 1; }
/* Dialogs (share window, match details) */
dialog { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); width: min(480px, calc(100vw - 32px)); padding: 20px; box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(11 13 20 / .45); backdrop-filter: blur(3px); }
dialog h3 { margin: 0 0 12px; font-size: 1.1rem; }
dialog textarea { width: 100%; font: inherit; font-size: .9rem; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); resize: vertical; }
dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
dialog a.btn { font-size: .85rem; text-decoration: none; background: #25d366; color: #fff; border-radius: 8px; padding: 6px 12px; }
.share-dlg { width: min(560px, calc(100vw - 32px)); }
.share-dlg .hint { color: var(--muted); font-size: .8rem; margin: 6px 0 0; }
.share-dlg .primary-wa { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Countdown chip above the page title */
.countdown { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: color-mix(in srgb, var(--pampas) 16%, var(--surface)); color: color-mix(in srgb, var(--pampas) 40%, var(--text)); }
.countdown span { font-weight: 400; color: var(--muted); }
.countdown.soon { background: var(--pampas); color: var(--brand); }

/* Phone number prompt under the subtitle */
.phone-prompt { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 10px 14px; margin-top: 12px; font-size: .85rem; max-width: 640px; }
.phone-prompt p { margin: 0 0 8px; color: var(--muted); }
.phone-prompt .phone-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.phone-prompt input { flex: 1 1 180px; min-width: 0; font: inherit; padding: 7px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.phone-prompt .err, .err { color: var(--no); }
/* Direct WhatsApp chat buttons */
.share-dlg .people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.share-dlg .people .hint { width: 100%; }
a.dm, .dm { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; padding: 4px 10px; border-radius: 999px; background: #e7f8ee; color: #1a7f45; text-decoration: none; border: 1px solid #b9e9cc; }
.dm.off { background: var(--bg); color: var(--muted); border-color: var(--border); }
a.dm-icon { text-decoration: none; font-size: .75rem; line-height: 1; padding: 2px 6px; margin-left: 4px; border-radius: 999px; background: #25d366; vertical-align: 1px; }

/* WhatsApp group button under the page subtitle */
.wa-group { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow-sm);
  background: #25d366; color: #fff; font-weight: 600; font-size: .9rem; text-decoration: none; }
.wa-group:hover { filter: brightness(.95); }
/* Match details line (time, venue, meeting point) */
.details { color: var(--muted); font-size: .8rem; line-height: 1.4; margin-top: 2px; }
.details a { color: var(--accent); white-space: nowrap; }
button.link { background: none; border: none; padding: 0; text-decoration: underline; color: inherit; font-size: inherit; }


/* Footer (both pages) */
.site-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 8px 16px calc(28px + env(safe-area-inset-bottom)); }
.site-footer a { color: var(--accent); font-weight: 600; }
.site-footer .product { color: var(--text); letter-spacing: .03em; }

/* Sign-in, waiting for approval, team picker */
body.gated .brand .tabs, body.gated .bottom-nav { display: none !important; }
body.gated { padding-bottom: 0 !important; }
.gate { max-width: 460px; margin: 36px auto 24px; padding: 0 16px; }
.gate-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.gate-brand { position: relative; overflow: hidden; padding: 28px 24px 24px; text-align: center; color: var(--brand-text);
  background: radial-gradient(130% 160% at 100% 0%, color-mix(in srgb, var(--pampas) 30%, var(--brand)) 0%, var(--brand) 60%); }
.gate-brand::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%;
  border: 24px solid color-mix(in srgb, var(--pampas) 18%, transparent); }
.gate-brand img { position: relative; display: block; height: 52px; width: auto; max-width: 100%; margin: 0 auto; }
.gate-brand .gate-team { position: relative; font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.9rem; }
.gate-brand p { position: relative; margin: 10px 0 0; font-size: .85rem; opacity: .85; }
.gate-body { padding: 24px; }
.gate-body h1 { font-size: 1.6rem; margin: 0 0 6px; }
.gate-body .sub { margin-bottom: 18px; }
.gate-card button.google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; font-size: 1rem; font-weight: 600;
  border-radius: 12px; box-shadow: var(--shadow-sm); }
.gate-card .or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; margin: 18px 0 12px; }
.gate-card .or::before, .gate-card .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.email-form { display: flex; gap: 8px; }
.email-form input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); }
.email-form.stacked { flex-direction: column; }
.email-form.stacked button { padding: 11px; border-radius: 12px; font-size: .95rem; }
.gate-msg { display: flex; align-items: flex-start; gap: 8px; font-size: .85rem; color: var(--yes); margin: 12px 0 0; }
.gate-msg.err { color: var(--no); }
.gate-callout { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; font-size: .88rem;
  background: color-mix(in srgb, var(--pampas) 14%, var(--surface)); color: var(--text); }
.gate-callout svg.i { color: color-mix(in srgb, var(--pampas) 55%, var(--text)); margin-top: 2px; }
.gate-callout.live svg.i { animation: pulse-op 2s infinite; }
@keyframes pulse-op { 50% { opacity: .35; } }
.gate-features { list-style: none; margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: .88rem; color: var(--muted); }
.gate-features li { display: flex; align-items: center; gap: 10px; }
.gate-features svg.i { color: var(--accent); }
.gate .hint { color: var(--muted); font-size: .78rem; margin: 14px 0 0; }
.gate-foot { margin: 18px 0 0; font-size: .85rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gate-foot a { color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.stepper { list-style: none; margin: 14px 0 16px; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.stepper li { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--muted); }
.stepper li span { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; border: 2px solid var(--border); }
.stepper li.done { color: var(--text); }
.stepper li.done span { background: var(--yes); border-color: var(--yes); color: #fff; }
.stepper li.now { color: var(--text); font-weight: 600; }
.stepper li.now span { border-color: var(--pampas); color: var(--text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pampas) 22%, transparent); }

/* Team picker and team chip (Rostiq) */
.team-list { display: grid; gap: 10px; margin-top: 12px; }
.team-list button { justify-content: flex-start; gap: 12px; padding: 12px 14px; text-align: left; font-size: 1rem; border-radius: 14px; }
.team-list button:hover:not(:disabled) { box-shadow: var(--shadow-sm); }
.team-list .team-swatch { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: .8rem; font-weight: 700; }
.team-list .team-name { flex: 1; display: grid; }
.team-list .team-name small { color: var(--muted); font-size: .82rem; }
.team-list button > svg.i { color: var(--muted); }

/* Bottom navigation on phones (a copy of the header tabs, made by common.js) */
.bottom-nav { display: none; }
@media (max-width: 700px) {
  .brand .tabs { display: none; }
  .brand-inner { padding-bottom: 14px; }
  body.has-bottom-nav { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .bottom-nav:not([hidden]) {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -16px rgb(11 13 20 / .25);
  }
  .bottom-nav a[hidden] { display: none; }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 4px; border-radius: 12px;
    color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    -webkit-tap-highlight-color: transparent; transition: color .15s var(--ease), background .15s var(--ease);
  }
  .bottom-nav a svg.i { width: 22px; height: 22px; vertical-align: 0; }
  .bottom-nav a[aria-current="page"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
}

/* Toast: short confirmation at the bottom of the screen */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 30;
  display: inline-flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 999px; background: var(--brand); color: var(--brand-text);
  font-size: .88rem; font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity .2s var(--ease), transform .25s var(--ease);
}
.toast svg.i { color: var(--pampas); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--no); color: #fff; }
.toast.err svg.i { color: #fff; }
@media (max-width: 700px) { body.has-bottom-nav .toast { bottom: calc(80px + env(safe-area-inset-bottom)); } }

/* Account menu (header) */
.account { position: relative; }
.acct-btn { gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; font-weight: 600; color: var(--brand-text);
  background: color-mix(in srgb, var(--brand-text) 12%, transparent); border: 1px solid color-mix(in srgb, var(--brand-text) 22%, transparent); }
.acct-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--brand-text) 20%, transparent); border-color: color-mix(in srgb, var(--brand-text) 35%, transparent); }
.acct-btn .nm { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-btn > svg.i { width: 1em; height: 1em; opacity: .8; transition: transform .2s var(--ease); }
.acct-btn[aria-expanded="true"] > svg.i { transform: rotate(180deg); }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: #fff; font-size: .7rem; font-weight: 700; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 260px; max-width: calc(100vw - 24px);
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 6px;
  animation: menu-in .16s var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu-head { display: grid; gap: 2px; justify-items: start; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.menu-head b { font-size: .95rem; overflow-wrap: anywhere; }
.menu-head span:not(.pill) { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.menu-head .pill { margin-top: 6px; }
.menu-item { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; padding: 9px 10px; border: none; border-radius: 10px;
  background: none; color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 500; }
.menu-item:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: none; }
.menu-item svg.i { color: var(--muted); }
.menu-item.danger, .menu-item.danger svg.i { color: var(--no); }
.menu-lang { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; font-size: .9rem; }
.menu-lang .lang { border-color: var(--border); }
.menu-lang .lang button { color: var(--text); }
.menu-lang .lang button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
@media (max-width: 480px) {
  .corner { position: absolute; top: max(14px, env(safe-area-inset-top)); margin: 0; }
  .acct-btn { padding: 3px; } .acct-btn .nm, .acct-btn > svg.i { display: none; }
  .brand-inner > a { padding-right: 56px; }
}

/* Skeleton placeholders while the data loads */
.skel { height: 12px; border-radius: 6px; margin-bottom: 8px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--muted) 12%, var(--surface)) 0%, color-mix(in srgb, var(--muted) 22%, var(--surface)) 50%, color-mix(in srgb, var(--muted) 12%, var(--surface)) 100%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skel-card { display: flex; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.skel-block { width: 58px; height: 64px; border-radius: 12px; flex-shrink: 0; margin: 0; }
.skel-lines { flex: 1; }

/* Shared: avatars, three-way choice, foldable panels */
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: .68rem; font-weight: 700; color: #fff; border: 2px solid var(--surface); }
.av.pop { animation: pop .35s var(--ease); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); } }
.segmented { display: flex; gap: 3px; padding: 3px; border-radius: 12px; background: color-mix(in srgb, var(--muted) 11%, var(--surface)); }
.segmented button { flex: 1 1 0; min-width: 0; border: none; background: transparent; border-radius: 9px; padding: 8px 8px; font-weight: 600; color: var(--muted); }
.segmented button:hover:not(:disabled) { background: var(--surface); border: none; }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.just { animation: press .3s var(--ease); }
@keyframes press { 40% { transform: scale(.94); } }
details.panel > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 600; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg); transition: transform .2s var(--ease); }
details.panel[open] > summary::after { transform: translateY(2px) rotate(-135deg); }

/* Shared card base: match cards (availability, carpool) */
.match { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 16px; min-width: 0; overflow-wrap: anywhere; transition: box-shadow .2s var(--ease); }
.match:hover { box-shadow: var(--shadow); }
.match.final { border-color: color-mix(in srgb, var(--final) 45%, var(--border)); }
.match.past { opacity: .55; }
.m-date { height: 68px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.m-date b { margin: 3px 0 2px; font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.55rem; color: var(--accent); font-variant-numeric: lining-nums; }
.m-date span { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); white-space: nowrap; }
.m-title { font-weight: 700; font-size: 1.08rem; line-height: 1.3; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.avatars { display: flex; }
.avatars .av { margin-left: -8px; }
.avatars .av:first-child { margin-left: 0; }
.av.more { background: color-mix(in srgb, var(--muted) 18%, var(--surface)); color: var(--muted); }

/* Offline bar */
.offline-bar { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); z-index: 35; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 24px);
  padding: 8px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; box-shadow: var(--shadow);
  background: var(--text); color: var(--bg); }
.offline-bar.sending { background: var(--pampas); color: var(--brand); }
.offline-bar svg.i { flex-shrink: 0; }
/* Install help (iPhone) */
.install-dlg ol { margin: 0 0 6px; padding-left: 20px; display: grid; gap: 8px; font-size: .92rem; }

/* "Start your own team" link on the team picker */
.start-own { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 14px;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 35%, var(--border)); color: var(--accent); font-weight: 600; text-decoration: none; }
.start-own:hover { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }

/* Feedback dialog */
.fb-dlg { width: min(520px, calc(100vw - 32px)); }
.fb-dlg .hint { color: var(--muted); font-size: .82rem; margin: 0 0 12px; }
.fb-types { margin-bottom: 12px; }
.fb-dlg textarea { min-height: 120px; }
.fb-contact { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; font-size: .88rem; }
.fb-dlg .err { color: var(--no); font-size: .85rem; margin: 6px 0 0; }

/* ---- Empty states: what's missing, and what to do about it ---- */
.empty-state { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 28px 18px; border: 1.5px dashed var(--border);
  border-radius: var(--radius); color: var(--muted); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.empty-state .empty-ic { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 4px;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--accent); }
.empty-state .empty-ic svg.i { width: 24px; height: 24px; }
.empty-state b { color: var(--text); font-size: 1rem; }
.empty-state p { margin: 0; max-width: 46ch; font-size: .88rem; line-height: 1.5; }
.empty-state .empty-act { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.empty-state.small { padding: 16px; gap: 4px; }
.empty-state.small .empty-ic { width: 36px; height: 36px; border-radius: 10px; }
.empty-state.small .empty-ic svg.i { width: 18px; height: 18px; }
.empty-state.small b { font-size: .9rem; }
a.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; font-size: .9rem; }

/* ---- Forms: label above, help below, one clear save button ---- */
.form-card { display: grid; gap: 14px; padding: 16px; margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.form-card > h3 { margin: 0; font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.form-card > h3 svg.i { color: var(--accent); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); align-items: start; }
.ff { display: grid; gap: 6px; min-width: 0; align-content: start; }
.ff > .ff-label { font-size: .88rem; font-weight: 600; color: var(--text); }
.ff > .ff-label em { font-style: normal; font-weight: 400; color: var(--muted); }
.ff input:not([type=checkbox]):not([type=color]):not([type=radio]), .ff select { width: 100%; min-width: 0; }
.ff-help { margin: 0; font-size: .8rem; line-height: 1.45; color: var(--muted); }
.ff-err { margin: 0; font-size: .82rem; font-weight: 600; color: var(--no); }
.ff input.bad, .ff select.bad { border-color: var(--no) !important; }
.ff.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--text); padding-top: 26px; }
.ff-inline { display: flex; gap: 8px; align-items: center; }
.ff-inline input { flex: 1; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-actions .msg { font-size: .85rem; }
.form-actions .msg.ok { color: var(--yes); }
.form-actions .msg.dirty { color: var(--maybe); }

/* ---- Demo strip (app.rostiq.be/?demo=…) ---- */
.demo-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 9px 16px; font-size: .85rem;
  background: linear-gradient(90deg, #1e1b4b, #3b2a8a); color: #fff; }
.demo-bar .demo-tag { background: #b8f36b; color: #1e1b4b; font-weight: 800; font-size: .7rem; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; }
.demo-bar .demo-txt { opacity: .85; }
.demo-bar .demo-switch { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgb(255 255 255 / .1); }
.demo-bar .demo-switch a { color: rgb(255 255 255 / .8); text-decoration: none; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.demo-bar .demo-switch a[aria-current] { background: #00d4ff; color: #1e1b4b; }
.demo-bar .demo-cta { margin-left: auto; color: #fff; font-weight: 700; text-decoration-color: #00d4ff; text-underline-offset: 3px; }
@media (max-width: 640px) { .demo-bar .demo-txt { flex-basis: 100%; order: 3; font-size: .8rem; } .demo-bar .demo-cta { margin-left: 0; } }
