:root {
  --yellow: #ffc92e;
  --ink: #1a1c1e;
  --dark: #0f1012;
  --dark-2: #242628;
  --muted: rgba(0, 0, 0, .48);
  --line: rgba(0, 0, 0, .08);
  --bg: #f5f5f5;
  --card: #ffffff;
  --accent-red: #ff6b6b;
  --accent-blue: #60a5fa;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Poppins, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(15, 16, 18, .96);
  color: #fff;
  border-bottom: 4px solid var(--yellow);
  box-shadow: 0 4px 30px rgba(0,0,0,.22);
}
.brand { display: flex; align-items: baseline; gap: 8px; font-weight: 900; }
.brand span { color: var(--yellow); }
.brand strong { font-size: 18px; }
.topbar nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a { padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; background: rgba(255,255,255,.08); }
.topbar nav a:hover { color: var(--yellow); background: rgba(255,201,46,.10); }
main { width: min(1120px, calc(100% - 28px)); margin: 22px auto 60px; }
.entry-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(26,28,30,.92), rgba(26,28,30,.66)),
    radial-gradient(circle at 18% 16%, rgba(255,201,46,.32), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(255,107,107,.20), transparent 24%),
    #1a1c1e;
}
.entry-page main {
  width: min(900px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: start;
  padding: clamp(16px, 3vh, 34px) 0 28px;
}
.entry-shell { display: grid; gap: 16px; }
.entry-title {
  justify-self: center;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  text-align: center;
  font-size: clamp(30px, 5.2vw, 58px);
  line-height: .95;
  text-shadow: 0 8px 26px rgba(0,0,0,.32);
}
.entry-title span { color: var(--yellow); }
.entry-card {
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 34px);
  box-shadow: 0 28px 80px rgba(0,0,0,.28);
}
.entry-card.compact { max-width: 520px; width: 100%; justify-self: center; }
.entry-card h1 {
  margin: 0 0 22px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}
.btn.wide {
  width: 100%;
  min-height: 52px;
  margin-top: 4px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .8px;
  border-radius: 999px;
}
.entry-switch {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  padding: 14px;
  border-radius: 999px;
  background: #f1f1f1;
  color: var(--ink);
  font-weight: 850;
  text-align: center;
}
.entry-switch:hover { background: var(--yellow); }
.hero {
  min-height: 420px;
  display: flex;
  align-items: end;
  padding: clamp(28px, 6vw, 56px);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(110deg, rgba(15,16,18,.96), rgba(26,28,30,.74)),
    radial-gradient(circle at 82% 18%, rgba(255,201,46,.38), transparent 30%),
    linear-gradient(135deg, #1a1c1e, #342400 52%, #242628);
}
.hero.compact { min-height: 260px; }
.hero h1 { max-width: 820px; font-size: clamp(32px, 6vw, 68px); line-height: .96; margin: 6px 0 14px; }
.hero p { max-width: 720px; color: rgba(255,255,255,.88); font-size: 18px; }
.eyebrow { color: var(--yellow) !important; text-transform: uppercase; font-weight: 900; letter-spacing: 0; font-size: 13px !important; }
.btn {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  background: #ededed;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.btn.primary { background: var(--yellow); color: #111; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
  margin: 18px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.05);
}
.panel.narrow { max-width: 720px; margin-inline: auto; }
.stack { display: grid; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: grid; gap: 6px; font-weight: 760; color: var(--ink); }
label small, .field-help { color: var(--muted); font-weight: 500; }
.field-help { display: block; margin-top: -8px; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 70px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
.avatar-picker legend { font-weight: 850; margin-bottom: 10px; }
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.avatar-choice {
  position: relative;
  display: block;
  cursor: pointer;
}
.avatar-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.avatar-choice input[type="file"] {
  width: 1px;
  height: 1px;
}
.avatar-choice span {
  display: block;
  aspect-ratio: 1;
  padding: 5px;
  border: 3px solid transparent;
  border-radius: 8px;
  background: #fff;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.avatar-choice img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 5px;
}
.avatar-choice input:checked + span {
  border-color: #000;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
}
.avatar-choice:hover span { transform: translateY(-2px); }
.upload-choice span {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  text-align: center;
}
.upload-choice strong {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--yellow);
  color: #111;
  font-size: 30px;
  line-height: 1;
  padding-bottom: 4px;
}
.upload-choice em {
  font-style: normal;
  font-weight: 900;
  font-size: 13px;
}
.check { display: flex; grid-template-columns: none; align-items: flex-start; gap: 10px; font-weight: 650; color: var(--ink); }
.check input { width: 18px; min-height: 18px; margin-top: 2px; }
.check a { color: var(--ink); font-weight: 900; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.flash { width: min(1120px, calc(100% - 28px)); margin: 14px auto; padding: 12px 14px; border-radius: 8px; background: #fff7d6; border: 1px solid #f4d76e; font-weight: 750; }
.login-mini { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: end; }
.legal-page p { color: rgba(0,0,0,.68); line-height: 1.7; font-weight: 500; }
.legal-page h1 { margin-top: 0; }
.match-list { display: grid; gap: 12px; }
.match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.match-card.locked { opacity: .72; }
.match-card strong { display: block; font-size: 20px; margin: 3px 0; }
.match-card strong span { color: var(--accent-red); font-size: 14px; }
.match-card small { color: var(--muted); }
.score-form { display: flex; align-items: center; gap: 8px; }
.score-form input { width: 64px; text-align: center; font-weight: 900; }
.pill { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: rgba(255,201,46,.16); color: var(--ink); font-weight: 850; font-size: 13px; }
.profile { display: flex; align-items: center; gap: 16px; }
.profile img { width: 82px; height: 82px; border-radius: 999px; object-fit: cover; border: 3px solid var(--yellow); }
.inline { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 10px 0; }
.table { display: grid; gap: 8px; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto minmax(0, .8fr);
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin: 18px 0 22px;
}
.podium-card {
  min-height: 160px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 16px;
}
.podium-card.rank1 { min-height: 205px; background: #fff6c9; border-color: #f0c94a; }
.podium-card img { width: 72px; height: 72px; border-radius: 999px; object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--dark); }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.reward { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 8px; }
.reward img { width: 160px; height: 160px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs a { padding: 8px 10px; border-radius: 8px; background: #ededed; font-weight: 800; }
.admin-row, .admin-grid, .photo-review { display: grid; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin-row { grid-template-columns: minmax(0, 1fr) 70px 70px auto; }
.admin-grid { grid-template-columns: 150px minmax(160px, 1fr) 90px minmax(180px, 1.5fr) auto auto; }
.photo-review { grid-template-columns: 100px minmax(0, 1fr) auto auto; }
.photo-review img { width: 88px; height: 88px; border-radius: 8px; object-fit: cover; }
@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .grid2, .match-card, .row, .podium, .admin-row, .admin-grid, .photo-review { grid-template-columns: 1fr; }
  .score-form { justify-content: stretch; }
  .score-form .btn { flex: 1; }
  .hero { min-height: 340px; }
  .avatar-grid { grid-template-columns: repeat(4, 1fr); }
}
