:root {
  --bg: #0b100e;
  --nav: rgba(8, 13, 11, 0.88);
  --card: #131a17;
  --card-2: #19221e;
  --border: #222e28;
  --text: #eaf2ed;
  --muted: #8da295;
  --accent: #36e07b;
  --accent-soft: rgba(54, 224, 123, 0.14);
  --accent-ink: #052b17;
  --red: #ff5d5d;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(1300px 500px at 50% -220px, rgba(54, 224, 123, 0.08), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 130px, rgba(255, 255, 255, 0.012) 130px 260px),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============ nav ============ */

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  background: var(--nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1.2rem;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s;
}
nav a:hover { color: var(--text); }
nav a.active { color: var(--text); border-bottom-color: var(--accent); }
nav .brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  border-bottom: 0;
}
nav .brand span { color: var(--accent); }
nav .spacer { flex: 1; }
nav .who {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}
nav .who-crest { width: 22px; height: 22px; object-fit: contain; }
nav .logout { font-size: 0.84rem; }

main { max-width: 800px; margin: 0 auto; padding: 1.2rem 1rem 3.5rem; }

/* ============ type ============ */

h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0.4rem 0 0.9rem;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 0.78rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.backlink { margin-top: 1.2rem; }
.backlink a { text-decoration: none; color: var(--muted); }
.backlink a:hover { color: var(--text); }

.day {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.7rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.day::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ============ toasts ============ */

.toasts {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(92vw, 440px);
  pointer-events: none;
}
.flash {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.25s ease, toast-out 0.6s ease 4.5s forwards;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); visibility: hidden; } }

/* ============ cards ============ */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.8rem;
}
.card.empty { text-align: center; padding: 2.4rem 1rem; }
.empty-art { font-size: 2.2rem; display: block; margin-bottom: 0.4rem; }
.card.peek { display: flex; align-items: center; gap: 0.8rem; }
.peek-art { font-size: 1.6rem; }
.card.peek p { margin: 0; }

.meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.meta.center { justify-content: center; }
.meta .when { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.meta .spacer { flex: 1; }
.detail {
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
}
.detail:hover { color: var(--accent); }

.live { color: var(--red); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em; }
.live::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.3rem;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }

/* ============ match cards (team-tinted) ============ */

.card.match {
  --hc: var(--accent);
  --ac: var(--accent);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--hc) 8%, transparent), transparent 32%),
    linear-gradient(260deg, color-mix(in srgb, var(--ac) 8%, transparent), transparent 32%),
    var(--card);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.card.match::before,
.card.match::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
}
.card.match::before { left: 0; background: linear-gradient(180deg, var(--hc), color-mix(in srgb, var(--hc) 20%, transparent)); }
.card.match::after { right: 0; background: linear-gradient(180deg, var(--ac), color-mix(in srgb, var(--ac) 20%, transparent)); }
.card.match:hover {
  transform: translateY(-2px);
  border-color: #2f3e36;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.card.is-live { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.card.is-live { animation: livecard 2.4s ease-in-out infinite; }
@keyframes livecard {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 93, 93, 0); }
  50% { box-shadow: 0 0 22px 0 rgba(255, 93, 93, 0.16); }
}

.card.match { animation: rise 0.3s ease backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } }

.card.match:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 24px var(--accent-soft);
}
.card.match { scroll-margin-top: 76px; }

/* Fixed-width center column so scores/inputs line up across every card;
   the save button gets its own grid row under the inputs. */
.scoreline {
  --centerw: 158px;
  display: grid;
  grid-template-columns: 1fr var(--centerw) 1fr;
  align-items: center;
  column-gap: 0.8rem;
  row-gap: 0.5rem;
}
.scoreline .savebtn {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
}
.team {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.04rem;
}
.team.home { justify-content: flex-end; text-align: right; }
.team.away { justify-content: flex-start; }
.team .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team:hover .name { color: var(--accent); }
.team img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.nums {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.nums i { font-style: normal; color: var(--muted); padding: 0 0.15rem; }
.nums.vs { color: var(--muted); font-size: 1.05rem; }
.center small { color: var(--muted); white-space: nowrap; font-size: 0.72rem; }

.subline {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
}
.subline strong { color: var(--text); font-variant-numeric: tabular-nums; }
.lockicon { font-size: 0.78rem; }

/* prediction form */

form.predict {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.predict-inputs { display: flex; align-items: center; gap: 0.4rem; }
.predict-inputs .colon { color: var(--muted); font-weight: 800; }

input {
  background: #0d1311;
  border: 1px solid #2a372f;
  border-radius: 10px;
  color: var(--text);
  font-size: 1.05rem;
  padding: 0.45rem 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type="number"] { width: 3.5rem; text-align: center; -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

button {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, white 12%), var(--accent));
  color: var(--accent-ink);
  border: 0;
  border-radius: 9px;
  padding: 0.45rem 1.05rem;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
}
button:hover { filter: brightness(1.1); box-shadow: 0 4px 16px var(--accent-soft); }
button:active { transform: scale(0.96); }
button:disabled { background: var(--card-2); color: var(--muted); cursor: not-allowed; box-shadow: none; }
button.small { padding: 0.28rem 0.7rem; font-size: 0.78rem; }
button.primary { padding: 0.55rem 1.5rem; font-size: 0.92rem; }
button.wide { width: 100%; }
button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
button.ghost:hover { color: var(--text); border-color: var(--muted); box-shadow: none; }
.savebtn { padding: 0.32rem 1.1rem; font-size: 0.8rem; }
.btnrow { display: flex; gap: 0.6rem; margin-top: 1rem; }

form.inline { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

/* ============ points badges ============ */

.pts {
  display: inline-block;
  min-width: 2rem;
  text-align: center;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.14rem 0.5rem;
  font-variant-numeric: tabular-nums;
}
.pts-5 {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 12px var(--accent-soft);
  position: relative;
  overflow: hidden;
}
.pts-5::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.55) 50%, transparent 68%);
  transform: translateX(-110%);
  animation: sheen 3s ease-in-out infinite;
}
@keyframes sheen { 40%, 100% { transform: translateX(110%); } }
.pts-3 { background: #1e7a4b; color: #e2ffee; }
.pts-2 { background: #1c4733; color: #93dcb2; }
.pts-0 { background: #242e29; color: var(--muted); }

/* ============ progress strip ============ */

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.progress-strip {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.progress-label { font-size: 0.8rem; color: var(--muted); }
.progress-label strong { color: var(--text); }
.progress-strip .bar {
  height: 6px;
  border-radius: 999px;
  background: var(--card-2);
  overflow: hidden;
}
.progress-strip .bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, transparent), var(--accent));
  transition: width 0.4s ease;
}

/* ============ kickoff banner ============ */

.kickoff-banner {
  --hc: var(--accent);
  --ac: var(--accent);
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  padding: 1.1rem 1.2rem 1rem;
  background:
    radial-gradient(440px 220px at 6% 40%, color-mix(in srgb, var(--hc) 22%, transparent), transparent 70%),
    radial-gradient(440px 220px at 94% 40%, color-mix(in srgb, var(--ac) 22%, transparent), transparent 70%),
    var(--card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kickoff-banner:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35); }
.kb-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 0.55rem;
}
.kb-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.8rem;
}
.kb-team {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
}
.kb-team.home { justify-content: flex-end; text-align: right; }
.kb-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-team img { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.55)); }
.kb-team.home img { order: 2; }
.kb-center { display: flex; flex-direction: column; align-items: center; min-width: 130px; }
.cd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.kb-cta { text-align: center; margin-top: 0.55rem; font-size: 0.86rem; color: var(--muted); }
.kb-cta strong { color: var(--text); }
.kb-go { color: var(--accent); font-weight: 600; }

/* giant faded crests as backdrop art */
.wm {
  position: absolute;
  width: 170px;
  height: 170px;
  object-fit: contain;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}
.wm-home { left: -34px; top: -28px; transform: rotate(-12deg); }
.wm-away { right: -34px; bottom: -38px; transform: rotate(12deg); }
.kickoff-banner > :not(.wm), .card.hero > :not(.wm) { position: relative; z-index: 1; }

/* ============ hero (match page) ============ */

.card.hero {
  --hc: var(--accent);
  --ac: var(--accent);
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.2rem 1.4rem;
  background:
    radial-gradient(420px 240px at 8% 30%, color-mix(in srgb, var(--hc) 20%, transparent), transparent 72%),
    radial-gradient(420px 240px at 92% 30%, color-mix(in srgb, var(--ac) 20%, transparent), transparent 72%),
    var(--card);
}
.card.hero::before,
.card.hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5px;
}
.card.hero::before { left: 0; background: linear-gradient(180deg, var(--hc), color-mix(in srgb, var(--hc) 15%, transparent)); }
.card.hero::after { right: 0; background: linear-gradient(180deg, var(--ac), color-mix(in srgb, var(--ac) 15%, transparent)); }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 0.9rem;
  margin-top: 0.5rem;
}
.hteam {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  min-width: 0;
}
.bigcrest {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}
.hname {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hcenter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.6rem;
  min-width: 150px;
}
.hcenter .nums { font-size: 2.3rem; }
.hcenter .nums.vs { font-size: 1.5rem; }
.heropred { font-size: 0.9rem; color: var(--muted); }
.heropred strong { color: var(--text); }
.hero-predict .savebtn { padding: 0.4rem 1.3rem; font-size: 0.84rem; }

/* ============ stats ============ */

.statgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  align-items: start;
  margin-bottom: 0; /* cards carry their own margin */
}
.statgrid .card { margin-bottom: 0.8rem; }

.form-grid { display: grid; gap: 0.9rem; }
.form-team { display: flex; flex-direction: column; gap: 0.45rem; }
.form-name { font-family: var(--font-display); font-weight: 600; font-size: 0.92rem; }
.chips { display: flex; gap: 0.3rem; }
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: default;
}
.chip-W { background: var(--accent); color: var(--accent-ink); }
.chip-D { background: #38453f; color: #cdd9d1; }
.chip-L { background: #a94343; color: #ffe1e1; }

.h2h-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  margin-bottom: 0.55rem;
}
.h2h-side { display: flex; align-items: center; gap: 0.4rem; }
.h2h-legend strong { font-family: var(--font-display); font-size: 1.05rem; }
.swatch { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.h2hbar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--card-2);
}
.h2hbar .seg { height: 100%; }
.h2hbar .seg-draw { background: #38453f; }

.meetings { margin-top: 0.7rem; border-top: 1px solid var(--border); }
.meeting {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.meeting:last-child { border-bottom: 0; }
.mwhen {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  min-width: 2.6rem;
}
.mline { flex: 1; }
.mline strong { font-variant-numeric: tabular-nums; }
.mcomp { font-size: 0.74rem; white-space: nowrap; }

/* ============ tables ============ */

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: center; padding: 0.48rem 0.4rem; border-bottom: 1px solid var(--border); }
th.left, td.left { text-align: left; }
th {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
tr:last-child td { border-bottom: 0; }
tr.me td, tr.subject td { background: var(--accent-soft); }
tr.me td:first-child, tr.subject td:first-child { border-radius: 8px 0 0 8px; }
tr.me td:last-child, tr.subject td:last-child { border-radius: 0 8px 8px 0; }

.teamcell { white-space: nowrap; }
.teamcell img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: -3px;
  margin-right: 0.45rem;
}
.playercell { display: flex; align-items: center; gap: 0.5rem; }
.mini-crest { width: 20px; height: 20px; object-fit: contain; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  flex-shrink: 0;
}
.avatar.big { width: 44px; height: 44px; font-size: 1.2rem; }

.leaderboard .total { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.leaderboard .rank { font-weight: 800; }
.rank-1 { color: #ffd95e; }
.rank-2 { color: #c7d3cc; }
.rank-3 { color: #d9a05b; }

.rules { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.85rem; }

.mecard { display: flex; align-items: center; gap: 0.9rem; }
.mecard-crest { width: 40px; height: 40px; object-fit: contain; }
.mecard-text { display: flex; flex-direction: column; }
.mecard-rank { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }

.formcol { white-space: nowrap; }
.dots { display: inline-flex; gap: 0.22rem; align-items: center; }
.fdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.fdot-5 { background: var(--accent); box-shadow: 0 0 6px var(--accent-soft); }
.fdot-3 { background: #2f9e63; }
.fdot-2 { background: #1c4733; }
.fdot-0 { background: #313d37; }

.livedot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  margin-left: 0.35rem;
  vertical-align: 2px;
  animation: pulse 1.4s ease-in-out infinite;
}

.distwrap { margin-bottom: 0.9rem; }

h2 .pts { vertical-align: 1px; margin-left: 0.3rem; }

.champlist { display: flex; flex-direction: column; }
.champpick {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.3rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.champpick:last-child { border-bottom: 0; }
.champ-who { font-weight: 600; }
.champ-team { font-weight: 700; font-family: var(--font-display); }
.champpick.won {
  background: var(--accent-soft);
  border-radius: 10px;
  padding-left: 0.6rem;
  padding-right: 0.6rem;
}

/* ============ dressing-room awards ============ */

.awards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 0.55rem;
}
.award {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
}
.award-emoji { font-size: 1.5rem; flex-shrink: 0; }
.award-text { display: flex; flex-direction: column; min-width: 0; }
.award-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
}
.award-who {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.award-blurb { font-size: 0.78rem; }

/* ============ podium ============ */

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.7rem;
  margin: 1.2rem 0 1rem;
}
.pod {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--tc) 12%, transparent), transparent 75%),
    var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 0.8rem 0.8rem;
  flex: 1;
  max-width: 170px;
}
.pod.p1 { order: 2; padding-top: 1.3rem; padding-bottom: 1.1rem; border-color: rgba(255, 217, 94, 0.35); }
.pod.p2 { order: 1; }
.pod.p3 { order: 3; }
.pod-rank { font-size: 1.3rem; }
.pod.p1 .pod-rank { font-size: 1.6rem; }
.pod-crest { width: 40px; height: 40px; object-fit: contain; }
.pod-name {
  font-family: var(--font-display);
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pod-points { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ============ team picker ============ */

.teamgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.5rem;
  margin-top: 0.6rem;
}
.teampick {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.teampick:hover { transform: translateY(-1px); border-color: var(--tc); }
.teampick input { position: absolute; opacity: 0; pointer-events: none; }
.teampick img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.teampick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teampick:has(input:checked) {
  border-color: var(--tc);
  background: color-mix(in srgb, var(--tc) 14%, var(--card-2));
  box-shadow: 0 0 0 1px var(--tc);
}

/* ============ tabs ============ */

.tabs {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem;
}
.tabs a {
  padding: 0.34rem 1.05rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.15s;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { background: var(--accent); color: var(--accent-ink); }

/* ============ auth ============ */

.card.auth { max-width: 360px; margin: 3.2rem auto; text-align: center; padding: 1.8rem 1.5rem; }
.card.auth h1 { margin: 0 0 0.2rem; }
.card.auth form { margin-top: 1.2rem; text-align: left; }
.card.auth label { display: block; margin-bottom: 0.85rem; font-size: 0.84rem; color: var(--muted); }
.card.auth input { display: block; width: 100%; margin-top: 0.3rem; font-family: var(--font-body); font-weight: 500; }
.card.auth button { margin-top: 0.4rem; }

/* ============ admin ============ */

.admin-matches td { white-space: nowrap; font-size: 0.84rem; }
.admin-matches td:nth-child(2) { white-space: normal; }

/* ============ responsive ============ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 620px) {
  main { padding: 0.8rem 0.7rem 3.2rem; }
  nav { gap: 0.8rem; padding: 0.6rem 0.8rem; }
  nav .who-name { display: none; }
  .statgrid { grid-template-columns: 1fr; }
  .team { font-size: 0.92rem; gap: 0.4rem; }
  .team img { width: 24px; height: 24px; }
  .nums { font-size: 1.3rem; }
  .scoreline { --centerw: 116px; column-gap: 0.5rem; }
  .scoreline input[type="number"] { width: 3rem; font-size: 0.95rem; }
  .kb-team { font-size: 0.92rem; }
  .kb-team img { width: 26px; height: 26px; }
  .cd { font-size: 1.15rem; }
  .kb-center { min-width: 104px; }
  .wm { width: 120px; height: 120px; }
  .formcol { display: none; }
  .bigcrest { width: 46px; height: 46px; }
  .hname { font-size: 0.86rem; }
  .hcenter .nums { font-size: 1.8rem; }
  .hcenter { min-width: 120px; }
  .podium { gap: 0.45rem; }
  .pod { padding: 0.7rem 0.5rem 0.6rem; }
  .teamgrid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .admin-matches { display: block; overflow-x: auto; }
  .meeting { flex-wrap: wrap; }
  .mcomp { width: 100%; padding-left: 3.3rem; }
}

@media (min-width: 900px) {
  .form-grid { grid-template-columns: 1fr; }
}
