@charset "UTF-8";
:root {
  --mt-ink: #373f47;       /* charcoal-blue */
  --mt-bg: #F2F0E6;
  --mt-card: #FFFFFF;
  --mt-accent: #0891b2;    /* bondi-blue — primary CTA */
  --mt-accent2: #ec0b43;   /* lipstick-red — errors / losses */
  --mt-yellow: #f6f740;    /* canary-yellow */
  --mt-win: #8cd867;       /* willow-green — win fills (use with dark text) */
  /* Darkened from #7A857A so muted body copy clears WCAG AA (~5:1 on bg). */
  --mt-muted: #5A655A;
}
/* Visible focus ring for keyboard users on every interactive element. The
   form-input rule below still wins for inputs (green outline matches the
   field border); buttons / cells / nav tabs fall through to this. */
:focus-visible { outline: 2px solid var(--mt-yellow); outline-offset: 2px; }

/* sr-only — visually hidden but read by assistive tech. */
.mt-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
* { box-sizing: border-box; border-radius: 2px !important}
html, body { margin: 0; padding: 0; }
body {
  background: var(--mt-bg);
  color: var(--mt-ink);
  font-family: 'Rubik', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.mt-shell { padding: 54px 10px 110px; }
.mt-title {
  font-family: 'Archivo Black', sans-serif;
  font-size: 44px;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin: 0;
}
.mt-sub { color: var(--mt-muted); font-size: 14px; margin-top: 8px; }

/* --- Onboarding --- */
.mt-onb { padding: 54px 20px 80px; max-width: 460px; margin: 0 auto; }
.mt-tabs { display: flex; gap: 2px; margin: 20px 0 14px; }
.mt-tab {
  flex: 1; padding: 12px; cursor: pointer;
  border: 2px solid var(--mt-ink); background: var(--mt-card); color: var(--mt-ink);
  font-family: 'Archivo Black', sans-serif; font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.mt-tab.is-on { background: var(--mt-ink); color: var(--mt-yellow); }
.mt-form { display: flex; flex-direction: column; gap: 8px; }
.mt-form input {
  padding: 13px 12px; border: 2px solid var(--mt-ink);
  background: var(--mt-card); font-family: 'Rubik', sans-serif; font-size: 15px;
}
.mt-form input:focus { outline: 2px solid var(--mt-accent); outline-offset: -2px; }
/* Branded anchor — used in the onboarding "Forgot password?" / footer row.
   Without this the browser default blue+underline clashes with the palette. */
.mt-link-row { margin: 8px 0 0; font-size: 13px; }
.mt-link-row a { color: var(--mt-accent); text-decoration: underline;
  text-underline-offset: 2px; font-weight: 600; }
.mt-link-row a:hover { color: var(--mt-ink); }
/* Real button — works for both <button class="mt-btn-link"> and
   <a class="mt-btn-link">, so screens can use whichever element the action
   calls for. Matches .mt-btn (accent fill, uppercase Archivo Black) but stays
   inline-block so it can sit mid-sentence; align-self/margin handle stacked
   placements. */
.mt-btn-link {
  display: inline-block; padding: 10px 14px; border: 0; cursor: pointer;
  background: var(--mt-accent); color: #fff; text-decoration: none;
  font-family: 'Archivo Black', sans-serif; font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.mt-btn-link:visited { color: #fff; }
.mt-btn-link:hover { background: var(--mt-ink); color: #fff; }
.mt-btn-link[disabled],
.mt-btn-link[aria-disabled="true"] {
  background: var(--mt-muted); color: #fff; cursor: default; pointer-events: none;
}
/* Notice banner on auth screens (verified / reset_done / etc). */
.mt-notice {
  background: var(--mt-yellow); color: var(--mt-ink);
  padding: 10px 12px; margin: 8px 0 14px;
  font-size: 13px; font-weight: 600;
  border-left: 3px solid var(--mt-ink);
}
.mt-btn {
  padding: 14px; border: none; cursor: pointer; margin-top: 4px;
  background: var(--mt-accent); color: #fff;
  font-family: 'Archivo Black', sans-serif; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.mt-btn-2 { background: var(--mt-ink); }
.mt-or {
  text-align: center; color: var(--mt-muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.1em; margin: 16px 0;
}
.mt-err { color: var(--mt-accent2); font-size: 13px; font-weight: 600; min-height: 18px; }

/* Three-stage mail progress line: signup / verify_send / reset_request /
   change-email all paint into a .mt-mail-status element so the user can see
   that SMTP actually ran (and what went wrong if it did not). Empty in the
   idle state so it doesn't leave a gap. */
.mt-mail-status { font-size: 13px; font-weight: 600; margin: 4px 0 0; min-height: 0; }
.mt-mail-status:empty { display: none; }
.mt-mail-status--starting,
.mt-mail-status--sending { color: var(--mt-muted); }
.mt-mail-status--sending::before {
  content: ''; display: inline-block; width: 10px; height: 10px;
  margin-right: 6px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; vertical-align: -1px; animation: mt-mail-spin 0.8s linear infinite;
}
.mt-mail-status--sent   { color: var(--mt-win, #18a957); }
.mt-mail-status--failed { color: var(--mt-accent2); }
@keyframes mt-mail-spin { to { transform: rotate(360deg); } }
/* Page-wide freeze while a save (or other mutating request) is in flight.
   pointer-events:none here blocks every click — including the bottom nav —
   so a second submit can't race the first. The visible "I'm working" cue is
   the .mt-overlay below; setting `opacity` on body would cascade to that too
   and wash it out, so we keep the body itself at full opacity. */
body.is-busy { pointer-events: none; }

/* Centered status overlay. The dim backdrop is the freeze cue; the ink card
   carries the "Saving" / "Score was saved" line. Owns its own pointer-events
   so the overlay can sit above the frozen page without picking up clicks. */
.mt-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(28, 28, 30, 0.55);
  pointer-events: none;
}
.mt-overlay[hidden] { display: none; }
.mt-overlay-card {
  background: var(--mt-ink); color: #fff;
  padding: 18px 28px;
  font-family: 'Archivo Black', sans-serif; font-size: 18px;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* --- Match list / cards --- */
.mt-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.mt-logout { background: none; border: none; color: var(--mt-muted); cursor: pointer;
  font-family: var(--mt-alt, sans-serif); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 4px 0; }
.mt-logout:hover { color: var(--mt-ink); }
.mt-pts { font-family: 'Archivo Black', sans-serif; font-size: 16px; }
.mt-card { display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--mt-card); border: none; border-left: 4px solid var(--mt-ink);
  padding: 12px 14px; margin-bottom: 8px; font-family: inherit; }
.mt-card-top { display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mt-muted); }
/* F-era .mt-card-teams base — kept minimal because the H-era rule (further
   down) sets display/align/gap. The "span { color: muted }" leak that dimmed
   .nm on dark cards has been removed. */
.mt-card-teams { font-family: 'Archivo Black', sans-serif; }
.mt-card-foot { display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--mt-muted); }
.mt-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; letter-spacing: 0.06em; }
.mt-badge-open { background: var(--mt-accent); color: #fff; }
.mt-badge-lock { background: #e7e3d6; color: var(--mt-ink); }
.mt-badge-fin { background: var(--mt-ink); color: var(--mt-yellow); }
.mt-pick { font-weight: 600; }
.mt-pick.mt-cta { color: var(--mt-accent); }
.mt-muted { color: var(--mt-muted); font-weight: 400; }
.mt-win { color: var(--mt-accent); }
.mt-loss { color: var(--mt-accent2); }

/* --- Match detail / score picker --- */
.mt-back { background: none; border: none; color: var(--mt-accent); cursor: pointer;
  font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 10px; }
.mt-result { font-size: 15px; }
.mt-live {
  display: inline-block; background: var(--mt-accent2); color: #fff;
  font-family: var(--mt-alt); font-size: 9px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 2px; vertical-align: middle;
  animation: mt-live-pulse 1.6s ease-in-out infinite;
}
@keyframes mt-live-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.mt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 6px; margin: 12px 0; }
.mt-cell { display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; cursor: pointer; background: var(--mt-card); border: 2px solid var(--mt-ink); }
/* 1×2 group tints. Order matters: .is-sel must follow these so yellow wins
   the cascade for the currently-picked cell. Mirrored on the derived Tip
   row so its three cells inherit the same colour code. */
.mt-cell.cs-home { background: #E0EEE4; }
.mt-cell.cs-draw { background: #E7E3D6; }
.mt-cell.cs-away { background: #FBE0DC; }

/* Band heading above each colour cluster — names the 1×2 outcome so the
   green/beige/pink tints aren't unlabelled semantics. */
.mt-cs-band {
  font-family: var(--mt-alt); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--mt-ink2);
  margin: 14px 0 6px; padding: 2px 8px;
  border-left: 3px solid currentColor;
}
.mt-cs-band.cs-home-band { color: #2f7a4a; }
.mt-cs-band.cs-draw-band { color: #8a7b4a; }
.mt-cs-band.cs-away-band { color: #b22650; }
.mt-cell.is-sel  { background: var(--mt-yellow); }
/* Keep the cota readable when a cell is the selected (yellow) one — without
   this the cota stays muted-grey on yellow and barely reads. */
.mt-cell.is-sel .mt-cell-o { color: var(--mt-ink); font-weight: 700; }
.mt-cell-s { font-family: 'Archivo Black', sans-serif; font-size: 14px; }
.mt-cell-o { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--mt-muted); }
.mt-btn[disabled] { background: #bdbcb2; cursor: not-allowed; }

/* --- Bottom nav --- */
.mt-nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--mt-ink); }
.mt-nav-item { flex: 1; padding: 14px 0; background: none; cursor: pointer;
  border: none; border-top: 3px solid transparent; color: #9aa39a;
  font-family: 'Archivo Black', sans-serif; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em; }
.mt-nav-item.is-on { color: var(--mt-yellow); border-top-color: var(--mt-yellow); }

/* --- Group + competition switchers --- */
.mt-group-sel, .mt-comp-sel { font-family: 'Rubik', sans-serif; font-size: 13px;
  padding: 6px 8px; border: 2px solid var(--mt-ink); background: var(--mt-card);
  margin-bottom: 12px; }
.mt-comp-sel { margin-right: 6px; }
.mt-group-pick, .mt-comp-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mt-group-pick-btn, .mt-comp-pick-btn { font-family: 'Rubik', sans-serif; font-size: 13px;
  padding: 6px 10px; border: 2px solid var(--mt-ink); background: var(--mt-card);
  color: inherit; cursor: pointer; }
.mt-group-pick-btn--active, .mt-comp-pick-btn--active { background: var(--mt-yellow); }

/* --- Competitions screen --- */
.mt-comp-empty { color: var(--mt-muted); margin: 16px 0; }
.mt-comp-card { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: var(--mt-card); border: 2px solid var(--mt-ink);
  border-left-width: 4px; padding: 12px 14px; margin: 8px 0; width: 100%;
  text-align: left; cursor: pointer; font: inherit; color: inherit; }
.mt-comp-card.is-active { border-left-color: var(--mt-yellow); }
.mt-comp-scope { display: inline-block; padding: 2px 6px; font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  font-family: var(--mt-alt, sans-serif); border: 1px solid var(--mt-ink); }
.mt-comp-scope--global  { background: var(--mt-yellow); color: var(--mt-ink); }
.mt-comp-scope--private { background: transparent;       color: var(--mt-muted); }
.mt-comp-cta { font-family: var(--mt-alt, sans-serif); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mt-muted); }
.mt-comp-row { display: flex; align-items: center; gap: 8px; }
.mt-comp-row .mt-comp-card { flex: 1; margin: 8px 0; }
.mt-comp-del { color: var(--mt-muted); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; }
.mt-comp-del:hover { color: var(--mt-ink); }

/* --- Danger zone (leave / delete group) and member hint --- */
.mt-member-hint { margin: 18px 0 0; }
.mt-danger { margin: 22px 0 0; padding-top: 14px;
  border-top: 1px dashed var(--mt-muted); }
.mt-danger-btn { color: #ffffff; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; }
.mt-danger-btn:hover { color: #ffffff; }
.mt-danger-btn[disabled] { color: var(--mt-muted); }
.mt-danger-hint { font-size: 12px; margin: 4px 0 0; }

/* --- Leaderboard --- */
.mt-lb-row { display: flex; align-items: center; gap: 10px; background: var(--mt-card);
  border-left: 4px solid var(--mt-ink); padding: 10px 12px; margin-bottom: 6px; }
.mt-lb-row.is-me { border-left-color: var(--mt-yellow); }
.mt-rank { font-family: 'Archivo Black', sans-serif; font-size: 18px; width: 30px; }
.mt-av { width: 30px; height: 30px; flex: none; background: var(--mt-ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo Black', sans-serif; font-size: 13px; }
.mt-lb-name { flex: 1; font-weight: 600; display: flex; flex-direction: column; }
.mt-lb-sub { font-size: 11px; color: var(--mt-muted); font-weight: 400; }
.mt-lb-pts { font-family: 'Archivo Black', sans-serif; font-size: 18px; }

/* --- Leaderboard summary (global view, used for both real + guest viewers
       so thousands of test guests don't render as a wall of rows) --- */
.mt-sum-card { margin-top: 16px; padding: 18px; background: var(--mt-card);
  border-left: 4px solid var(--mt-yellow); }
.mt-sum-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mt-sum-name { font-weight: 700; }
.mt-sum-stat { display: flex; align-items: baseline; gap: 8px; }
.mt-sum-big { font-family: 'Archivo Black', sans-serif; font-size: 44px; line-height: 1; }
.mt-sum-of { color: var(--mt-muted); font-size: 13px; }
.mt-sum-pct { margin: 4px 0 0; font-size: 13px; color: var(--mt-muted);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.mt-sum-pts { margin-top: 10px; font-family: 'Archivo Black', sans-serif; font-size: 20px; }
.mt-sum-band { margin-top: 14px; padding: 12px 14px; background: var(--mt-card);
  border-left: 4px solid var(--mt-ink); }
.mt-sum-band-line { margin: 4px 0 0; font-size: 14px; }
.mt-sum-rate { display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin-top: 14px; }
.mt-sum-rate-cell { padding: 12px 14px; background: var(--mt-card);
  display: flex; flex-direction: column; gap: 2px; }
.mt-sum-lbl { font-size: 11px; color: var(--mt-muted);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.mt-sum-val { font-family: 'Archivo Black', sans-serif; font-size: 22px; }
.mt-sum-foot { font-size: 11px; color: var(--mt-muted); }
.mt-sum-h { margin: 18px 0 8px; font-family: 'Archivo Black', sans-serif;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.mt-sum-h-top { margin-top: 22px; }
.mt-sum-empty { margin-top: 18px; color: var(--mt-muted); font-size: 14px; }

/* --- Pager (private-group leaderboard) --- */
.mt-pager { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 14px; }
.mt-pager-btn { font-size: 13px; font-weight: 700; color: var(--mt-accent);
  text-decoration: none; padding: 6px 10px; }
.mt-pager-btn:hover { text-decoration: underline; }
.mt-pager-btn.is-off { color: var(--mt-muted); cursor: default; }
.mt-pager-cur { font-size: 12px; color: var(--mt-muted);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }

/* --- Match result breakdown --- */
.mt-brk { margin-top: 18px; }
.mt-brk h2 { font-family: 'Archivo Black', sans-serif; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.mt-brk-row { display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid rgba(55,63,71,0.10); font-size: 13px; }
.mt-brk-row b { font-family: 'Archivo Black', sans-serif; }

/* --- Foundation tokens (added 2026-05-23) --- */
:root {
  --mt-shadow-sm: 0 1px 2px rgba(55, 63, 71, 0.06);
  --mt-radius-sm: 2px;
}

/* Centered phone-style frame; on wide screens the SPA is capped at 1200px.
   flex-wrap: wrap lets the brand bar + lang switcher share a top row while
   #app (flex: 0 0 100%) drops to its own full-width row. */
.mt-frame {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--mt-bg);
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}
#app { flex: 0 0 100%; min-width: 0; }

/* Persistent logo above #app — every screen gets a tap-target back to home.
   Sits in the empty top padding the shell already reserves. */
.mt-brand-bar {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 0;
  line-height: 0;
  text-decoration: none;
}
.mt-brand-bar img { display: block; height: 32px; width: auto; }
.mt-brand-bar:hover img { opacity: 0.85; }
.mt-brand-slogan {
  font-family: 'Archivo Black', sans-serif;
  font-size: 13px;
  line-height: 1;
  color: var(--mt-ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
/* A form now sits between .mt-brand-bar and #app, so use general sibling. */
.mt-brand-bar ~ #app .mt-shell { padding-top: 8px; }

/* --- Language switcher --- */
/* Shared <select> now appears on the login screen, the account page, and the
   first-access modal (the frame-wide switcher was removed). */
.mt-lang-globe { font-size: 16px; line-height: 1; }

/* Custom dropdown with inline SVG flags (native <option> can't show flags). */
.mt-lang2 { position: relative; display: inline-block; font-family: 'Rubik', sans-serif; }
.mt-lang2-flag { display: inline-flex; width: 22px; height: 15px; flex: none; }
.mt-lang2-svg {
  width: 22px; height: 15px; display: block;
  border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 2px;
}
.mt-lang2-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--mt-ink); background: var(--mt-card);
  font-family: inherit; font-size: 13px; color: var(--mt-ink);
  cursor: pointer; padding: 4px 8px;
}
.mt-lang2-btn:focus-visible { outline: 2px solid var(--mt-yellow); outline-offset: 2px; }
.mt-lang2-cur { flex: 1 1 auto; text-align: left; }
.mt-lang2-caret { font-size: 10px; color: var(--mt-muted); }
.mt-lang2-menu {
  position: absolute; z-index: 1200; left: 0; right: 0; top: calc(100% + 2px);
  background: var(--mt-card); border: 1px solid var(--mt-ink);
  max-height: 260px; overflow: auto; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.mt-lang2-menu[hidden] { display: none; }
.mt-lang2-opt {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: var(--mt-card); border: 0; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--mt-ink);
  padding: 8px 10px; text-align: left;
}
.mt-lang2-opt:hover, .mt-lang2-opt:focus-visible { background: rgba(0, 0, 0, 0.06); outline: none; }
.mt-lang2-opt[aria-selected="true"] { font-weight: 600; }

/* Login screen: globe + select, centered under the tagline. */
.mt-lang-row {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0 0 18px;
}

/* Account page: label + select on one row. */
.mt-acct-lang-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; font-size: 13px; color: var(--mt-ink);
}

/* First-access language modal — own overlay (the status .mt-overlay disables
   pointer events, this one needs clicks). */
.mt-langmodal {
  position: fixed; inset: 0; z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(28, 28, 30, 0.55); padding: 20px;
}
.mt-langmodal-card {
  background: var(--mt-card); padding: 28px 26px; max-width: 320px; width: 100%;
  border-top: 6px solid var(--mt-ink); text-align: center;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.mt-langmodal-globe { font-size: 34px; line-height: 1; }
.mt-langmodal-title {
  margin: 0; font-family: 'Archivo Black', sans-serif; font-size: 18px;
  color: var(--mt-ink); letter-spacing: 0.02em;
}
.mt-langmodal-pick { width: 100%; }
.mt-langmodal-pick .mt-lang2 { width: 100%; }
.mt-langmodal-pick .mt-lang2-btn { width: 100%; border-width: 2px; font-size: 16px; padding: 10px; }
.mt-langmodal-pick .mt-lang2-flag, .mt-langmodal-pick .mt-lang2-svg { width: 26px; height: 18px; }
.mt-langmodal-go { width: 100%; }

@media (max-width: 767px) {
  .mt-brand-bar { display: none; }
  .mt-lang { margin-left: auto; }
}

/* LIVE-pulse animation (declared now, consumed by later phases). */
@keyframes mt-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.7); }
}
.mt-pulse { animation: mt-pulse 1.4s ease-in-out infinite; }

/* Inline team flag. Rendered as 24×18 webp, vertically aligned to baseline. */
.mt-flag {
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: var(--mt-radius-sm);
  vertical-align: -3px;
 }

/* Day group header (used on Home, Tips, Pool). */
.mt-day {
  font-family: 'Archivo Black', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mt-muted);
  margin: 18px 0 8px;
}
.mt-day:first-child { margin-top: 0; }

/* ====================================================================
   H — Direction-B "Stadium Pop" tokens + components
   F-era selectors are kept above for screens still using them.
   ==================================================================== */

:root {
  --mt-bg:      #F2F0E6;
  --mt-card:    #FFFFFF;
  --mt-ink:     #373f47;
  --mt-ink2:    #4a5560;
  --mt-muted:   #7A857A;
  --mt-rule:    rgba(55,63,71,0.10);
  --mt-accent:  #0891b2;
  --mt-accent2: #ec0b43;
  --mt-yellow:  #f6f740;
  --mt-win:     #8cd867;

  --mt-disp: 'Archivo Black','Anton',sans-serif;
  --mt-alt:  'Anton','Archivo Black',sans-serif;
  --mt-ui:   'Rubik','Inter','Segoe UI',sans-serif;
  --mt-mono: 'JetBrains Mono',monospace;
}

body { background: var(--mt-bg); font-family: var(--mt-ui); color: var(--mt-ink); }

/* --- Header band ---------------------------------------------------- */
.mt-h-band {
  display: grid; grid-template-columns: 1fr auto; align-items: end;
  gap: 16px; padding: 24px 4px 8px;
}
.mt-h-titles { min-width: 0; }
.mt-h-overline {
  font-family: var(--mt-alt); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mt-muted); margin: 0 0 4px;
}
.mt-h-title {
  font-family: var(--mt-disp); font-size: 44px; line-height: 0.9;
  letter-spacing: -0.03em; text-transform: uppercase; margin: 0;
}
@media (min-width: 768px) { .mt-h-title { font-size: 56px; } }
/* Small "Times in EEST" hint under the page title — sets viewer expectation
   without polluting every kickoff line with a TZ suffix. */
.mt-h-tz {
  margin: 6px 0 0;
  font-family: var(--mt-mono); font-size: 11px;
  color: var(--mt-muted); letter-spacing: 0;
}
.mt-h-tz strong { color: var(--mt-ink2); font-weight: 700; }
/* Right column of the header band stacks a "Sign out" link above the points
   chip. Keeps the chip's dimensions intact while giving us a single home
   for the logout affordance — the SPA has no other surface for it yet. */
.mt-h-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mt-h-points {
  background: var(--mt-ink); color: #fff; padding: 10px 14px; text-align: right;
}
.mt-h-points .lbl {
  font-family: var(--mt-alt); font-size: 10px; letter-spacing: 0.14em;
  color: var(--mt-yellow); text-transform: uppercase; opacity: 0.85;
}
.mt-h-points .val {
  font-family: var(--mt-disp); font-size: 22px; color: #fff; margin-top: 2px;
}

/* --- Stat strip ----------------------------------------------------- */
/* Dropped from 4 to 3 columns — the deliberate empty 4th cell read as a
   missing card on every viewport. Re-add when a 4th stat lands. */
.mt-h-stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin: 14px 0 18px;
}
.mt-h-stat {
  background: var(--mt-card); padding: 10px 8px;
}
.mt-h-stat .val {
  font-family: var(--mt-disp); font-size: 22px; line-height: 1;
}
.mt-h-stat .lbl {
  font-family: var(--mt-alt); font-size: 9px; letter-spacing: 0.12em;
  margin-top: 4px; color: var(--mt-muted); text-transform: uppercase;
}
.mt-h-stat--hl { background: var(--mt-yellow); }
.mt-h-stat-empty { background: var(--mt-card); opacity: 0.4; }

/* --- Day-headers (override F's small style) ------------------------ */
.mt-day {
  font-family: var(--mt-ui); font-weight: 500;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mt-muted); margin: 24px 0 8px; padding: 0 4px;
  background: transparent;
}

/* --- Match cards (override F's card styles) ------------------------ */
.mt-card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--mt-card); color: var(--mt-ink);
  padding: 16px; margin-bottom: 10px;
  border: 0; border-left: 4px solid var(--mt-ink);
}
/* Three-state card backgrounds. One subtle tint per match_status() value so
   open / in-progress / finished are visually distinct at a glance:
     open     → white (default, betting available)
     locked   → warm canary tint (live / in progress)
     finished → cool gray tint (settled, in the past) */
.mt-card--state-open     { background: var(--mt-card); }
.mt-card--state-live     { background: #FFFBE0; }
.mt-card--state-finished { background: #ECEEF1; }
.mt-card--dark {
  background: var(--mt-ink); color: #fff;
  /* Yellow stripe = "you have a pick on this match". Reserve accent2 (red)
     for genuine misses on finished cards (.mt-chip--miss / --loss). */
  border-left-color: var(--mt-yellow);
}
/* When the user already has a pick the card flips dark; keep the state legible
   by recoloring the left stripe instead of fighting the dark background. */
.mt-card--dark.mt-card--state-live     { border-left-color: var(--mt-yellow); }
.mt-card--dark.mt-card--state-finished { border-left-color: var(--mt-muted); }
.mt-card-top {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mt-alt); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--mt-muted); margin-bottom: 12px;
}
.mt-card--dark .mt-card-top { color: var(--mt-yellow); }
.mt-card-top .time { font-family: var(--mt-mono); font-size: 11px; letter-spacing: 0; text-transform: none; }
.mt-card-teams {
  display: flex; align-items: center; gap: 10px;
}
.mt-card-team {
  flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
}
/* On desktop the card stretches to 1200px. Pin the centre slot (pill / FT /
   vs) at the row's geometric centre rather than centring the "Home · pill ·
   Away" group as a unit — otherwise asymmetric name widths drift the pill
   off-axis. Grid 1fr auto 1fr gives equal flanks; each team packs toward
   the pill via justify-content: flex-end (the away team's row-reverse
   turns flex-end into its visual left edge, i.e. the side facing the pill). */
@media (min-width: 768px) {
  .mt-card-teams { display: grid; grid-template-columns: 1fr auto 1fr;
    column-gap: 24px; align-items: center; }
  .mt-card-team  { justify-content: flex-end; }
  /* Mirror the home team so the flag sits next to the name's right edge —
     symmetric with the away team's natural [flag][name] adjacent to the
     pill. `order: 1` flips just the flag without touching flex-direction
     (which would also flip justify-content's meaning). */
  .mt-card-team:not(.mt-card-team--away) .mt-flag { order: 1; }
}
.mt-card-team--away { flex-direction: row-reverse; text-align: right; }
.mt-card-team .nm {
  font-family: var(--mt-disp); font-size: 1rem; line-height: 1;
  letter-spacing: -0.01em; text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mt-card-vs { font-family: var(--mt-disp); font-size: 12px; color: var(--mt-muted); padding: 0 4px; }
.mt-card--dark .mt-card-vs { color: var(--mt-yellow); }
.mt-card-ft {
  font-family: var(--mt-disp); font-size: 24px; line-height: 1;
  letter-spacing: -0.02em; padding: 0 4px;
}
.mt-card-ft .dash { color: var(--mt-muted); padding: 0 4px; }
.mt-card-pill {
  font-family: var(--mt-disp); font-size: 20px; line-height: 1.2;
  letter-spacing: -0.02em; background: var(--mt-yellow); color: var(--mt-ink);
  padding: 2px 10px;
}

/* --- Chip line and breakdown -------------------------------------- */
.mt-chip {
  margin-top: 12px; padding: 10px 12px; gap: 10px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mt-alt); font-size: 11px;
  letter-spacing: 0.10em; text-transform: uppercase;
}
.mt-chip .r { font-family: var(--mt-mono); font-size: 11px; letter-spacing: 0; text-transform: none; }
.mt-chip-pick {
  background: var(--mt-yellow); color: var(--mt-ink); padding: 1px 8px;
  font-family: var(--mt-disp); font-size: 13px; margin-right: 8px;
}
.mt-chip--cta { background: rgba(246,247,64,0.22); color: var(--mt-ink); }
.mt-chip--cta .l strong { font-family: var(--mt-disp); font-size: 12px; color: var(--mt-accent2); }
.mt-chip--set { background: var(--mt-ink); color: #fff; }
.mt-chip--set .r { color: var(--mt-yellow); font-family: var(--mt-disp); font-size: 13px; }
.mt-chip--locked { background: rgba(55,63,71,0.06); color: var(--mt-ink2); }
.mt-chip--locked .mt-chip-pick { background: rgba(55,63,71,0.10); color: var(--mt-ink); }
/* Willow-green win fill needs dark text — white-on-willow fails AA (~2:1). */
.mt-chip--win { background: var(--mt-win); color: var(--mt-ink); }
.mt-chip--win .r { color: var(--mt-ink); font-family: var(--mt-disp); font-size: 14px; }
.mt-chip--partial { background: var(--mt-yellow); color: var(--mt-ink); }
.mt-chip--partial .mt-chip-pick { background: var(--mt-ink); color: var(--mt-yellow); }
.mt-chip--miss { background: rgba(236,11,67,0.12); color: var(--mt-ink2); }
.mt-chip--miss .mt-chip-pick { background: rgba(55,63,71,0.10); color: var(--mt-ink); }

.mt-card-breakdown {
  margin-top: 6px; padding: 6px 12px; background: rgba(55,63,71,0.04);
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--mt-mono); font-size: 11px; color: var(--mt-ink2);
}
.mt-card-breakdown b { font-family: var(--mt-disp); font-size: 12px; color: var(--mt-ink); font-weight: 400; }
.mt-card-breakdown .hit { color: var(--mt-accent); }
.mt-card-breakdown .ms  { color: var(--mt-accent2); }
/* On dark cards the rgba(55,63,71,0.04) tint vanishes against ink; flip the
   tones so the "If exact" annotation actually reads. */
.mt-card--dark .mt-card-breakdown { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.72); }
.mt-card--dark .mt-card-breakdown b { color: #fff; }
.mt-card--dark .mt-card-breakdown .hit { color: var(--mt-yellow); }

/* --- Bottom nav (override F's nav classes) ------------------------ */
.mt-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--mt-ink); display: flex;
  /* iOS safe-area inset for the home-indicator strip. Without this the
     bottom row of nav labels sits under the indicator on every notched
     iPhone. The viewport meta tag (viewport-fit=cover) is already set in
     index.php so env() is non-zero on those devices. */
  padding-bottom: env(safe-area-inset-bottom);
}
.mt-nav-tab {
  flex: 1; height: 56px; display: flex; align-items: center; justify-content: center;
  font-family: var(--mt-alt); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.6);
  border: 0; background: transparent; cursor: pointer;
  border-bottom: 3px solid transparent;
}
.mt-nav-tab--active { color: var(--mt-yellow); border-bottom-color: var(--mt-yellow); }

/* Reserve space under content for the fixed nav. env() adds the home-indicator
   strip on top of the 72px so the last card never sits flush against the bar. */
main.mt-shell { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

/* On desktop, float the primary nav inline at the top-right of the frame so
   it sits alongside the brand bar like a header menu. The nav is rendered
   inside #app on every screen; anchoring it to .mt-frame (made relative
   below) keeps a single absolute position regardless of which screen is up. */
@media (min-width: 768px) {
  .mt-frame { position: relative; }
  .mt-nav {
    position: absolute; top: 0; right: 0; left: auto; bottom: auto;
    background: transparent; padding: 10px 12px 0;
  }
  .mt-nav-tab {
    flex: 0 0 auto; height: 50px; padding: 0 14px;
    color: var(--mt-ink); border-bottom-color: transparent;
  }
  .mt-nav-tab--active { color: var(--mt-ink); border-bottom-color: var(--mt-yellow); }
  main.mt-shell { padding-bottom: 0; }
}

/* --- Match Detail derived highlights + potential strip ------------ */
/* Derived rows reuse .mt-grid + .mt-cell rectangles; trim the margin so
   each row sits snug under its "Tip / Goals" heading. The cota text is
   bumped up (14px / 700) so the odds read clearly in both states. */
.mt-derived-row { margin: 6px 0; }
.mt-derived-row .mt-cell-o { font-size: 14px; font-weight: 700; color: var(--mt-ink); }
/* `.mt-cell.mt-derived-on` (specificity 0,2,0) so it beats the cs-home /
   cs-draw / cs-away tint rules; otherwise the implied "1" cell renders
   white text on pale-green and is unreadable. */
.mt-cell.mt-derived-on { background: var(--mt-accent); color: #fff; }
.mt-cell.mt-derived-on .mt-cell-o { color: #fff; }
.mt-cell.mt-derived-off { opacity: 0.5; pointer-events: none; outline: 1px solid var(--mt-rule); }
.mt-potential-strip {
  margin: 16px 0; padding: 12px 14px; background: var(--mt-ink); color: var(--mt-yellow);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mt-alt); font-size: 12px; letter-spacing: 0.10em; text-transform: uppercase;
}
.mt-potential-strip .val { font-family: var(--mt-disp); font-size: 18px; color: #fff; }

/* Title row carries the team-names <h1> and the inline potential chip.
   flex-wrap lets the chip drop below long titles instead of squashing them. */
.mt-title-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.mt-title-pot {
  font-family: var(--mt-disp); font-size: 26px; line-height: 1;
  letter-spacing: -0.02em; color: var(--mt-ink);
  background: var(--mt-yellow); padding: 4px 10px; white-space: nowrap;
}
.mt-title-pot[hidden] { display: none; }

/* Match-detail title built from stacked team spans so wrapping breaks
   between teams instead of mid-word ("BOSNIA-" / "HERZEGOVINA"). On
   desktop the two teams + "v" sit on one line; on phones they stack. */
.mt-md-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.mt-md-team { display: inline-flex; align-items: center; gap: 6px; }
.mt-md-vs {
  font-family: var(--mt-alt); font-size: 18px; color: var(--mt-muted);
  text-transform: lowercase; padding: 0 4px;
}
@media (max-width: 600px) {
  /* Stack home/away on their own lines, drop the title font size so long
     team names ("BOSNIA-HERȚEGOVINA", "AFRICA DE SUD") stop wrapping
     mid-word at the default 44px. */
  .mt-md-title { flex-direction: column; align-items: flex-start; gap: 0;
    font-size: 30px; line-height: 1.05; }
  .mt-md-team .mt-flag { width: 20px; height: 14px; }
  .mt-md-vs { font-size: 14px; padding: 4px 0; }
  /* Hide the inline +11.78 chip on phones — the same value lives in the
     .mt-potential-strip pinned above the bottom nav, so the chip just
     orphans a duplicate beneath the title. */
  .mt-title-row .mt-title-pot { display: none; }
}

/* On phones, pin the potential strip just above the 56px bottom nav so it
   stays in view while scrolling the score grid. :has() keeps the rule scoped
   to screens that actually contain the strip — no leaked padding elsewhere. */
@media (max-width: 600px) {
  main.mt-shell .mt-potential-strip {
    position: fixed; left: 0; right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom));
    margin: 0; z-index: 9;
  }
  main.mt-shell:has(.mt-potential-strip) {
    padding-bottom: calc(130px + env(safe-area-inset-bottom));
  }

  /* Home cards: stack home/away on two lines, center pill/ft on the right.
     The plain "vs" label is dropped on mobile — vertical stacking is the
     "vs" by itself, and the floating label was orphaning a column. */
  .mt-card-teams:has(.mt-card-team) {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-auto-rows: auto;
    column-gap: 10px; row-gap: 4px;
    align-items: center;
  }
  .mt-card-teams:has(.mt-card-team) .mt-card-team {
    grid-column: 1; text-align: left;
    justify-content: flex-start;     /* home: row → left */
  }
  .mt-card-teams:has(.mt-card-team) .mt-card-team--away {
    justify-content: flex-end;       /* away: row-reverse → "end" is the left edge */
  }
  .mt-card-teams:has(.mt-card-team) .mt-card-ft,
  .mt-card-teams:has(.mt-card-team) .mt-card-pill {
    grid-column: 2; grid-row: 1 / span 2;
    align-self: center; justify-self: end;
  }
  /* Hide the floating "vs" on phones; the stacked names communicate it. When
     it's the only centre element the grid collapses team names to full width. */
  .mt-card-teams:has(.mt-card-team) .mt-card-vs { display: none; }
  .mt-card-teams:has(.mt-card-team):not(:has(.mt-card-ft)):not(:has(.mt-card-pill)) {
    grid-template-columns: 1fr;
  }

  /* Allow long team names to wrap onto a second line instead of ellipsising.
     The card already stacks vertically here, so growing the row is cheap. */
  .mt-card-team .nm {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.05;
  }

  /* Per-card comp tag duplicates the page-level "CM 2026" header. Hide it on
     mobile; desktop keeps it for multi-comp mixed lists. */
  .mt-card-top .mt-card-comp { display: none; }

  /* Stadium-Pop heading is 44px by default — wraps to two lines on iPhone SE
     and pushes the points panel into mid-air. Shrink + tighten the leading. */
  .mt-h-band { padding-top: 16px; gap: 8px; }
  .mt-h-title { font-size: 28px; }
}

/* Invite code reveal — shown at the top of the Group screen feed. Big mono
   code + copy button so an owner can share it without leaving the app. */
.mt-invite {
  background: var(--mt-card); border-left: 4px solid var(--mt-yellow);
  padding: 12px 14px; margin: 12px 0;
  display: flex; flex-direction: column; gap: 10px;
}
.mt-invite-info { min-width: 0; }
.mt-invite-lbl {
  font-family: var(--mt-alt, sans-serif); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mt-muted);
}
.mt-invite-code {
  font-family: var(--mt-mono, monospace); font-size: 14px; font-weight: 700;
  letter-spacing: 0.04em; color: var(--mt-ink);
  word-break: break-all; overflow-wrap: anywhere;
}
.mt-invite-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-invite-copy {
  background: var(--mt-ink); color: var(--mt-yellow); border: 0; cursor: pointer;
  padding: 8px 12px; font-family: var(--mt-alt, sans-serif); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; display: inline-block;
}
.mt-invite-copy:hover { background: var(--mt-accent); color: #fff; }
.mt-invite-copy.is-copied { background: var(--mt-accent); color: #fff; }

/* OAuth buttons on onboarding. */
.mt-oauth          { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.mt-oauth-btn      {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 12px 14px; border-radius: 8px;
  font: 700 14px/1 Rubik, system-ui, sans-serif;
  text-decoration: none; text-align: center;
  border: 1px solid transparent;
}
.mt-oauth-btn .mt-oauth-mark { flex: 0 0 auto; display: block; }
.mt-oauth-btn--google {
  background: #fff; color: #1f1f1f; border-color: #dadce0;
}
.mt-oauth-btn--google:hover   { background: #f8f9fa; }
.mt-oauth-btn--facebook {
  background: #1877f2; color: #fff;
}
.mt-oauth-btn--facebook:hover { background: #165fcb; }
.mt-oauth .mt-or {
  text-align: center; color: var(--mt-muted, #888);
  font: 500 12px/1 Rubik, system-ui, sans-serif;
  padding: 4px 0 0;
}

/* --- Account screen + header avatar chip --------------------------------- */

.mt-h-avatar {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border: none; border-radius: 999px;
  background: rgba(255,255,255,0.06); color: inherit; cursor: pointer;
  font: inherit;
}
.mt-h-avatar:hover { background: rgba(255,255,255,0.12); }
.mt-h-handle      { font-size: 12px; font-family: var(--mt-mono); }
.mt-h-admin {
  font-family: var(--mt-alt); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; text-decoration: none;
  color: var(--mt-ink); background: var(--mt-yellow);
  padding: 3px 8px; border-radius: 999px;
}
.mt-h-admin:hover { filter: brightness(0.95); }
.mt-h-admin--empty { display: inline-block; margin: 12px 0 0; }

/* Account screen — Stadium-Pop band layout: identity header at top, then
   labelled bands (IDENTITY / SECURITY / GROUPS / DANGER), each holding one
   or more sharp-bordered cards.

   Form + button overrides are SCOPED to `.mt-account` on purpose: the prior
   versions of these rules were unscoped and silently flattened bold styles
   on onboarding too. */

.mt-account { padding-bottom: 56px; margin: 1rem}

.mt-acct-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0 4px;
}
.mt-back {
  background: none; border: 0; color: inherit; cursor: pointer; font: inherit;
  padding: 6px 4px 6px 0;
  font-family: var(--mt-alt, sans-serif); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mt-muted);
}
.mt-back:hover { color: var(--mt-accent); }

/* Identity band: yellow avatar tile + name + uid + role pill. */
.mt-acct-id {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 0 20px;
}
.mt-acct-id-avatar {
  width: 60px; height: 60px; flex: 0 0 auto;
  border: 2px solid var(--mt-ink); background: var(--mt-yellow);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo Black', sans-serif; font-size: 28px;
  color: var(--mt-ink);
}
.mt-acct-id-meta {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0; flex: 1;
}
.mt-acct-id-name {
  font-family: 'Archivo Black', sans-serif; font-size: 24px; line-height: 1.05;
  letter-spacing: -0.01em; margin: 0; color: var(--mt-ink);
  word-break: break-word;
}
.mt-acct-id-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.mt-acct-id-uid {
  font-family: var(--mt-mono, monospace); font-size: 11px;
  letter-spacing: 0.04em; color: var(--mt-muted);
}
.mt-acct-id-pill {
  display: inline-block; padding: 2px 8px;
  font-family: var(--mt-alt, sans-serif); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--mt-ink); background: var(--mt-yellow);
  color: var(--mt-ink);
}
.mt-acct-id-pill--admin { background: var(--mt-ink); color: var(--mt-yellow); border-color: var(--mt-ink); }
.mt-acct-id-pill--guest { background: var(--mt-yellow); }

/* Section bands. Heading is uppercase mono + a hairline rule that fills
   the remaining row width. */
.mt-acct-band { margin: 20px 0 8px; }
.mt-acct-band-h {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mt-alt, sans-serif); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mt-muted); margin: 0 0 10px;
}
.mt-acct-band-h::after {
  content: ''; flex: 1; height: 1px;
  background: var(--mt-ink); opacity: 0.18;
}

/* Sharp-bordered cards (override the global soft card defaults). */
.mt-account .mt-card {
  display: block; width: auto; text-align: left; cursor: default;
  margin: 0 0 12px; padding: 14px 16px 16px;
  background: var(--mt-card); border: 2px solid var(--mt-ink);
  border-left: 2px solid var(--mt-ink); border-radius: 0;
}
.mt-acct-h {
  font-family: 'Archivo Black', sans-serif; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0 0 12px; color: var(--mt-ink);
}
.mt-acct-sub-text {
  margin: 0 0 12px; font-size: 13px; color: var(--mt-muted);
}

/* Account-scoped form/button: bold borders, sharp corners, ink labels. */
.mt-account .mt-form { gap: 12px; }
.mt-account .mt-form label {
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--mt-alt, sans-serif); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mt-muted);
}
.mt-account .mt-form input {
  padding: 12px; border: 2px solid var(--mt-ink); border-radius: 0;
  background: var(--mt-card); color: var(--mt-ink);
  font-family: 'Rubik', sans-serif; font-size: 15px;
}
.mt-account .mt-form input:focus {
  outline: 2px solid var(--mt-accent); outline-offset: -2px;
}
.mt-account .mt-btn {
  padding: 12px 18px; border: 0; border-radius: 0;
  background: var(--mt-accent); color: #fff;
  font-family: 'Archivo Black', sans-serif; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; align-self: flex-start; margin-top: 2px;
}
.mt-account .mt-btn:hover { filter: brightness(1.06); }
.mt-account .mt-btn--small {
  padding: 6px 10px; font-size: 10px; letter-spacing: 0.12em;
}
.mt-account .mt-btn--ghost {
  background: var(--mt-card); color: var(--mt-ink);
  border: 2px solid var(--mt-ink);
}
.mt-account .mt-btn--ghost:hover { background: var(--mt-ink); color: var(--mt-yellow); }

.mt-ok   { color: var(--mt-win, #18a957); font-size: 13px; font-weight: 600; margin: 4px 0 0; }

/* Email "current" line + status chip. */
.mt-acct-current {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 14px; font-size: 14px;
}
.mt-acct-current-addr {
  font-family: var(--mt-mono, monospace); font-weight: 600;
  word-break: break-all; overflow-wrap: anywhere; color: var(--mt-ink);
}
.mt-account .mt-chip--ok,
.mt-account .mt-chip--warn {
  display: inline-block; padding: 3px 8px; border: 1px solid var(--mt-ink);
  font-family: var(--mt-alt, sans-serif); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.mt-account .mt-chip--ok   { background: var(--mt-win); color: var(--mt-ink); }
.mt-account .mt-chip--warn { background: var(--mt-yellow); color: var(--mt-ink); }
.mt-account .mt-link {
  background: none; border: 0; padding: 0; color: var(--mt-accent);
  cursor: pointer; font: inherit; font-size: 13px;
  text-decoration: underline; text-underline-offset: 2px; font-weight: 600;
}
.mt-account .mt-link:hover { color: var(--mt-ink); }

/* Sign-in methods (OAuth) — sharp boxed rows with provider mark. */
.mt-oauth-row-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.mt-oauth-row {
  display: flex; align-items: center; gap: 12px;
  /*border: 2px solid var(--mt-ink); */
  background: var(--mt-card);
  padding: 10px 12px;
}
.mt-oauth-row-mark {
  width: 36px; height: 36px; flex: 0 0 auto;
  border: 2px solid var(--mt-ink);
  display: flex; align-items: center; justify-content: center;
}
.mt-oauth-row-mark--google   { background: #fff; }
.mt-oauth-row-mark--facebook { background: #1877f2; }
.mt-oauth-row-mark--generic  { background: var(--mt-yellow); font-family: 'Archivo Black', sans-serif; font-size: 14px; color: var(--mt-ink); }
.mt-oauth-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mt-oauth-row-prov {
  font-family: 'Archivo Black', sans-serif; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--mt-ink);
}
.mt-oauth-row-acct {
  font-family: var(--mt-mono, monospace); font-size: 11px;
  color: var(--mt-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mt-oauth-row-acct--unlinked { color: var(--mt-muted); font-style: italic; }
.mt-oauth-row .mt-btn { flex: 0 0 auto; align-self: center; margin-top: 0; }

/* Groups inside Account: each group is a sharp boxed row, invite URL on its
   own line, copy button stays on the name row. */
.mt-acct-grp-list {
  list-style: none; margin: 0 0 4px; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.mt-acct-grp-row {
  border: 2px solid var(--mt-ink); background: var(--mt-card);
  padding: 10px 12px;
  display: grid; grid-template-columns: 1fr auto; row-gap: 6px; column-gap: 10px;
  align-items: center;
}
.mt-acct-grp-name {
  font-family: 'Archivo Black', sans-serif; font-size: 13px;
  letter-spacing: 0.04em; color: var(--mt-ink);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mt-acct-grp-url {
  grid-column: 1 / span 2;
  font-family: var(--mt-mono, monospace); font-size: 11px;
  color: var(--mt-muted); word-break: break-all; overflow-wrap: anywhere;
}
.mt-acct-grp-copy {
  background: var(--mt-ink); color: var(--mt-yellow);
  border: 0; padding: 6px 10px; cursor: pointer;
  font-family: var(--mt-alt, sans-serif); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.mt-acct-grp-copy:hover { background: var(--mt-accent); color: #fff; }
.mt-acct-grp-copy.is-copied { background: var(--mt-accent); color: #fff; }
.mt-acct-sub {
  font-family: var(--mt-alt, sans-serif); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--mt-muted); margin: 16px 0 8px;
}
.mt-acct-grp-empty {
  border: 2px dashed var(--mt-ink); padding: 14px;
  text-align: center; color: var(--mt-muted); font-size: 13px;
  margin: 0 0 8px;
}

/* Danger band — accent-red left border + Sign-out as a ghost button. */
.mt-acct-band--danger .mt-acct-band-h { color: var(--mt-accent2); }
.mt-acct-band--danger .mt-acct-band-h::after { background: var(--mt-accent2); opacity: 0.35; }
.mt-acct-band--danger .mt-card {
  border-color: var(--mt-ink); border-left: 4px solid var(--mt-accent2);
}
.mt-acct-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin: 0;
}
.mt-acct-foot .mt-logout {
  display: inline-flex; align-items: center;
  padding: 10px 16px; border: 2px solid var(--mt-ink);
  border-radius: 0; background: transparent; color: var(--mt-ink);
  font-family: 'Archivo Black', sans-serif; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer;
}
.mt-acct-foot .mt-logout:hover { background: var(--mt-ink); color: var(--mt-yellow); }
.mt-acct-foot-hint { color: var(--mt-muted); font-size: 12px; }

/* Group screen: create-competition match-picker */
.mt-comp-picker { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.mt-comp-picker-list { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; border: 1px solid rgba(0,0,0,0.10); border-radius: 8px; padding: 8px; }
.mt-comp-picker-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 2px 6px; border-bottom: 1px solid rgba(0,0,0,0.06); margin-bottom: 4px; font-size: 13px; }
.mt-comp-picker-hint { margin-left: auto; font-size: 11px; }
.mt-comp-picker-day { padding: 4px 0; }
.mt-comp-picker-day summary { cursor: pointer; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--mt-ink2); padding: 4px 0; }
.mt-comp-picker-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 14px; cursor: pointer; }
.mt-comp-picker-row input[type=checkbox] { flex: 0 0 auto; }
.mt-comp-picker-meta { color: var(--mt-ink2); flex: 0 0 auto; }
.mt-comp-picker-teams { flex: 1 1 auto; }
.mt-comp-row-editing { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid rgba(0,0,0,0.10); border-radius: 10px; background: rgba(0,0,0,0.02); margin: 8px 0; }
.mt-comp-edit-head { font-size: 14px; color: var(--mt-ink); }
.mt-comp-edit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Anonymous play: guest badge, CTA banner, post-merge toast */
.mt-guest-badge { display: inline-block; margin-left: 4px; padding: 1px 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: #1b1b1b; background: #ffd84d; border-radius: 10px; vertical-align: middle; }

.mt-anon-cta {
  position: relative;
  background: #fff4cc;
  border: 2px solid var(--mt-ink);
  border-left: 4px solid var(--mt-ink);
  padding: 14px 16px 16px;
  margin: 12px 0;
}
.mt-anon-cta-x {
  position: absolute; top: 6px; right: 8px;
  appearance: none; background: transparent; border: 0;
  font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 8px;
  color: var(--mt-ink);
}
.mt-anon-cta-eyebrow {
  font-family: 'Archivo Black', sans-serif;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0 0 10px; padding-right: 28px;
}
.mt-anon-cta-list {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: grid; gap: 6px; font-size: 14px;
}
.mt-anon-cta-list li::before {
  content: "\2713"; display: inline-block; width: 1.25em;
  font-weight: 700; color: var(--mt-accent);
}
.mt-anon-cta-btn {
  display: inline-block; text-align: center;
  text-decoration: none; padding: 12px 22px;
}
.mt-anon-cta-lead {
  margin: 0 0 8px; font-size: 13px; color: var(--mt-ink2, var(--mt-ink));
}

.mt-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1b1b1b; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 9999; opacity: 1; transition: opacity 0.4s ease; }
.mt-toast-out { opacity: 0; }

/* ---- Per-match group bets page ---- */
.mt-bets-groups { display: flex; flex-direction: column; gap: 16px; padding: 8px 0; }
.mt-bets-group { background: var(--mt-card); border: 2px solid var(--mt-ink);
                 padding: 12px; }
.mt-bets-group-head { display: flex; justify-content: space-between; align-items: baseline;
                      font-family: 'Archivo Black', sans-serif; text-transform: uppercase;
                      letter-spacing: 0.04em; margin-bottom: 8px; }
.mt-bets-group-head .count { font-family: var(--mt-mono, 'JetBrains Mono', monospace);
                             font-size: 11px; color: var(--mt-muted);
                             text-transform: none; letter-spacing: 0; }
.mt-bets-rows { list-style: none; padding: 0; margin: 0; }
.mt-bets-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px;
               align-items: center; padding: 6px 0;
               border-bottom: 1px solid rgba(55,63,71,0.08); }
.mt-bets-row:last-child { border-bottom: none; }
.mt-bets-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-bets-pred { font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.mt-bets-pred.mt-win  { color: var(--mt-ink); background: var(--mt-win);
                        padding: 2px 8px; }
.mt-bets-pred.mt-loss { color: var(--mt-accent2); }
.mt-bets-pred.mt-muted { color: var(--mt-muted); }
.mt-bets-pager { display: flex; justify-content: space-between; align-items: center;
                 gap: 8px; padding-top: 8px; }
.mt-bets-pager button { background: var(--mt-card); border: 2px solid var(--mt-ink);
                        color: var(--mt-ink); padding: 4px 12px; cursor: pointer;
                        font: inherit; }
.mt-bets-pager button[disabled] { opacity: 0.3; cursor: default; }
.mt-bets-pager-info { font-family: var(--mt-mono, 'JetBrains Mono', monospace);
                      font-size: 11px; color: var(--mt-muted); }

/* Home row: locked/finished cards split into two tap targets. */
.mt-card-main { background: transparent; border: none; color: inherit;
                cursor: pointer; padding: 0; width: 100%; text-align: left;
                font: inherit; display: block; }
.mt-chip--bets { display: flex; justify-content: space-between; align-items: center;
                 background: transparent; border: none; color: inherit;
                 cursor: pointer; text-align: left; width: 100%;
                 padding: 8px 12px; font: inherit;
                 border-top: 1px solid rgba(55,63,71,0.10); }
.mt-chip--bets:hover { background: rgba(55,63,71,0.04); }
.mt-chip--bets .l { font-family: 'Archivo Black', sans-serif;
                    text-transform: uppercase; letter-spacing: 0.04em;
                    font-size: 12px; }
.mt-chip--bets .r { font-family: 'JetBrains Mono', monospace;
                    font-size: 13px; opacity: 0.7; }
.mt-card--dark .mt-chip--bets { border-top-color: rgba(255,255,255,0.12); }
.mt-card--dark .mt-chip--bets:hover { background: rgba(255,255,255,0.06); }

/* --- Groups screen (merged Group + Comp) --- */
.mt-groups-shell { padding-bottom: 80px; }
.mt-global-section { margin: 18px 0 28px; }
.mt-global-section h2 { font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mt-muted); margin: 0 0 8px; }
.mt-groups-list-h { font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mt-muted); margin: 22px 0 8px; }
.mt-group-card { border: 2px solid var(--mt-ink); background: var(--mt-card);
  padding: 0; margin: 10px 0; }
.mt-group-card-head { display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 14px; cursor: pointer; background: transparent;
  border: 0; font: inherit; color: inherit; text-align: left; }
.mt-group-card-head:hover { background: rgba(0,0,0,0.03); }
.mt-group-card-name { flex: 1; font-weight: 700; }
.mt-group-card-caret { font-family: var(--mt-alt, sans-serif); font-size: 12px;
  color: var(--mt-muted); }
.mt-group-card-body { padding: 0 14px 14px; border-top: 1px dashed var(--mt-muted); }
.mt-group-card[data-open="false"] .mt-group-card-body { display: none; }
.mt-group-role { display: inline-block; padding: 2px 6px; font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  font-family: var(--mt-alt, sans-serif); border: 1px solid var(--mt-ink);
  color: var(--mt-muted); }
.mt-group-role--owner { background: var(--mt-yellow); color: var(--mt-ink); }

/* mt-pwgen-row — sits below a password input; "Generate" link + Copy button
   + an explanatory hint. Hidden by default for copy + hint; the Generate
   click reveals them. */
.mt-pwgen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 10px 0 14px;
  font-size: 13px;
}
.mt-pwgen-link,
.mt-pwgen-copy {
  display: inline-block;
  background: var(--mt-yellow);
  border: 2px solid var(--mt-ink);
  padding: 6px 12px;
  cursor: pointer;
  color: var(--mt-ink);
  text-decoration: none;
  font: inherit;
  font-weight: 600;
}
.mt-pwgen-link:hover,
.mt-pwgen-copy:hover { background: var(--mt-ink); color: var(--mt-yellow); }
.mt-pwgen-hint { color: var(--mt-muted); }
