:root {
  --pink: #d72a70;
  --pink-deep: #a91751;
  --pink-dark: #a81751;
  --pink-soft: #fff0f6;
  --pink-wash: #fff7fb;
  --purple: #564486;
  --purple-dark: #403167;
  --purple-soft: #f3f0fa;
  --ink: #262335;
  --muted: #6f6978;
  --line: #e9e2ed;
  --white: #fff;
  --shadow: 0 12px 34px rgba(64,49,103,.10);
  --pink-shadow: 0 16px 38px rgba(215,42,112,.20);
}

* { box-sizing: border-box; }
html { width:100%; overflow-x:hidden; background:#fff; }
body {
  margin:0;
  width:100%;
  min-width:0;
  overflow-x:hidden;
  color:var(--ink);
  background:
    radial-gradient(circle at 100% 0%, rgba(215,42,112,.09), transparent 31%),
    linear-gradient(180deg, #fff8fc 0, #fff 410px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust:100%;
}
button, input, select { font:inherit; }
button, a { -webkit-tap-highlight-color:transparent; }
button { touch-action:manipulation; }
img { max-width:100%; display:block; }
[hidden] { display:none !important; }

.app {
  width:100%;
  max-width:540px;
  margin:0 auto;
  padding:0 14px calc(36px + env(safe-area-inset-bottom));
}

.brand-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 2px 8px;
}
.brand-mark {
  display:block;
  width:min(60vw, 245px);
  min-width:0;
  text-decoration:none;
}
.brand-mark img {
  width:100%;
  height:auto;
}
.judge-link {
  flex:0 0 auto;
  text-decoration:none;
  color:var(--purple-dark);
  background:rgba(86,68,134,.09);
  border:1px solid rgba(86,68,134,.10);
  border-radius:999px;
  padding:9px 12px;
  font-size:12px;
  font-weight:850;
}

.show-hero {
  position:relative;
  overflow:hidden;
  margin-top:4px;
  border-radius:28px;
  padding:23px 20px 18px;
  color:#fff;
  background:
    radial-gradient(circle at 90% 8%, rgba(255,255,255,.18) 0 10%, transparent 11%),
    radial-gradient(circle at 78% 23%, rgba(255,255,255,.10) 0 7%, transparent 8%),
    linear-gradient(145deg, #c71d62 0%, var(--pink) 58%, #e64d8e 100%);
  box-shadow:var(--pink-shadow);
}
.show-hero::after {
  content:"";
  position:absolute;
  width:190px;
  height:190px;
  right:-80px;
  bottom:-115px;
  border-radius:50%;
  border:30px solid rgba(255,255,255,.07);
  pointer-events:none;
}
.hero-eyebrow {
  position:relative;
  z-index:1;
  font-size:10px;
  line-height:1.2;
  letter-spacing:.17em;
  font-weight:900;
  opacity:.92;
}
h1 {
  position:relative;
  z-index:1;
  margin:8px 0 9px;
  max-width:430px;
  font-size:clamp(32px, 9.5vw, 44px);
  line-height:.98;
  letter-spacing:-.035em;
}
.show-title span { display:block; }
.show-title .brand-line {
  margin-bottom:5px;
  font-size:.70em;
  line-height:1.02;
  letter-spacing:-.02em;
}
.show-title .club-line {
  font-size:1em;
  line-height:.96;
}
.hero-intro {
  position:relative;
  z-index:1;
  margin:0;
  max-width:420px;
  font-size:14px;
  line-height:1.5;
  color:rgba(255,255,255,.94);
}
.thanks-card {
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  align-items:start;
  margin-top:18px;
  padding:13px 14px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:18px;
  background:rgba(255,255,255,.12);
  backdrop-filter:blur(8px);
}
.thanks-heart {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:rgba(255,255,255,.16);
  font-size:18px;
}
.thanks-card > div:last-child { min-width:0; }
.thanks-card strong { display:block; font-size:13px; line-height:1.25; }
.thanks-card p { margin:4px 0 0; font-size:11px; line-height:1.45; color:rgba(255,255,255,.88); }
.live-status {
  position:relative;
  z-index:1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px 9px;
  margin-top:14px;
  font-size:10px;
  line-height:1.3;
  color:rgba(255,255,255,.86);
}
.live-pill {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 8px;
  border-radius:999px;
  background:rgba(255,255,255,.15);
  color:#fff;
  font-weight:900;
  letter-spacing:.06em;
}
.live-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 0 0 4px rgba(255,255,255,.12);
  animation:pulse 1.9s infinite;
}
.refresh-copy { opacity:.82; }
@keyframes pulse { 0%,100%{ transform:scale(1); opacity:1 } 50%{ transform:scale(.78); opacity:.65 } }

.view-tabs {
  position:sticky;
  top:0;
  z-index:12;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin-top:15px;
  padding:5px;
  border:1px solid var(--line);
  border-radius:17px;
  background:rgba(255,255,255,.94);
  box-shadow:0 7px 20px rgba(64,49,103,.08);
  backdrop-filter:blur(12px);
}
.view-tab {
  min-width:0;
  border:0;
  border-radius:13px;
  padding:12px 8px;
  background:transparent;
  color:var(--muted);
  font-size:12px;
  line-height:1.15;
  font-weight:900;
  cursor:pointer;
  overflow-wrap:anywhere;
}
.view-tab.active {
  color:#fff;
  background:linear-gradient(135deg, var(--purple), #68559c);
  box-shadow:0 5px 14px rgba(86,68,134,.20);
}

.section { margin-top:22px; }
.section-heading {
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:11px;
}
.compact-heading { margin-bottom:9px; }
.section-kicker {
  display:block;
  margin-bottom:3px;
  color:var(--pink-dark);
  font-size:9px;
  line-height:1.2;
  letter-spacing:.15em;
  font-weight:900;
}
.section-heading h2,
.awards-intro h2 {
  margin:0;
  font-size:21px;
  line-height:1.12;
  letter-spacing:-.02em;
}

.class-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  width:100%;
}
.class-button {
  min-width:0;
  border:1px solid #eee7f1;
  border-radius:18px;
  padding:15px 12px 14px;
  background:#fff;
  color:var(--ink);
  text-align:left;
  box-shadow:0 7px 20px rgba(64,49,103,.065);
  cursor:pointer;
  transition:transform .12s ease, border-color .12s ease, background .12s ease;
}
.class-button:active { transform:scale(.985); }
.class-button strong { display:block; font-size:14px; line-height:1.25; overflow-wrap:anywhere; }
.class-button span { display:block; margin-top:6px; color:var(--muted); font-size:10px; font-weight:700; }
.class-button.active {
  border-color:rgba(215,42,112,.55);
  background:linear-gradient(180deg,#fff8fb,#fff1f7);
  box-shadow:0 8px 22px rgba(215,42,112,.10);
}
.class-button.active strong { color:var(--pink-dark); }

.height-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.height-button {
  min-width:0;
  border:1px solid #e1dae7;
  border-radius:14px;
  padding:12px 8px;
  background:#fff;
  color:var(--purple-dark);
  font-weight:900;
  cursor:pointer;
}
.height-button.active {
  color:#fff;
  border-color:var(--purple);
  background:linear-gradient(135deg,var(--purple),#68559c);
  box-shadow:0 6px 16px rgba(86,68,134,.18);
}
.small-only {
  padding:13px 14px;
  border:1px solid rgba(86,68,134,.10);
  border-radius:14px;
  background:var(--purple-soft);
  color:var(--purple-dark);
  font-size:12px;
  font-weight:900;
}

.results-card {
  overflow:hidden;
  border:1px solid #eee8f1;
  border-radius:23px;
  background:#fff;
  box-shadow:var(--shadow);
}
.results-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding:18px 16px 15px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,#fff,#fffbfd);
}
.results-head > div:first-child { min-width:0; }
.kicker {
  color:var(--pink-dark);
  font-size:9px;
  line-height:1.2;
  text-transform:uppercase;
  letter-spacing:.14em;
  font-weight:900;
}
.results-head h2 {
  margin:4px 0 0;
  font-size:21px;
  line-height:1.14;
  letter-spacing:-.02em;
  overflow-wrap:anywhere;
}
.count {
  flex:0 0 auto;
  padding:7px 9px;
  border-radius:999px;
  background:var(--purple-soft);
  color:var(--purple-dark);
  font-size:10px;
  font-weight:850;
}
.results-list { display:flex; flex-direction:column; width:100%; }
.result-row {
  display:grid;
  grid-template-columns:40px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  min-width:0;
  padding:14px;
  border-bottom:1px solid #f1ecf3;
}
.result-row:last-child { border-bottom:0; }
.place {
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--purple-soft);
  color:var(--purple-dark);
  font-size:13px;
  font-weight:950;
}
.result-row:nth-child(1) .place { background:#fff2c7; color:#886300; }
.result-row:nth-child(2) .place { background:#efeff3; color:#5b5761; }
.result-row:nth-child(3) .place { background:#f6e0d0; color:#8a542f; }
.identity { min-width:0; }
.identity strong { display:block; font-size:15px; line-height:1.2; overflow-wrap:anywhere; }
.identity span { display:block; margin-top:4px; color:var(--muted); font-size:11px; line-height:1.2; overflow-wrap:anywhere; }
.score { min-width:64px; text-align:right; }
.score strong { display:block; color:var(--pink-dark); font-size:14px; white-space:nowrap; }
.score span { display:block; margin-top:3px; color:var(--muted); font-size:10px; white-space:nowrap; }
.status-tag { font-size:17px !important; }

.empty {
  padding:36px 20px;
  text-align:center;
  color:var(--muted);
}
.empty-mark {
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  margin:0 auto;
  border-radius:16px;
  background:var(--pink-soft);
  color:var(--pink-dark);
  font-size:24px;
}
.empty strong { display:block; margin-top:10px; color:var(--ink); font-size:15px; }
.empty p { max-width:280px; margin:5px auto 0; font-size:11px; line-height:1.45; }

.awards-intro {
  display:grid;
  grid-template-columns:50px minmax(0,1fr);
  gap:12px;
  align-items:center;
  padding:16px;
  border:1px solid #eadff0;
  border-radius:20px;
  background:linear-gradient(135deg,var(--purple-soft),#fff8fb);
}
.award-cup {
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:linear-gradient(145deg,#fff0b8,#ffe38b);
  color:#8d6500;
  font-size:23px;
  box-shadow:inset 0 0 0 1px rgba(141,101,0,.08);
}
.awards-intro > div:last-child { min-width:0; }
.awards-intro p { margin:5px 0 0; color:var(--muted); font-size:11px; line-height:1.45; }
.awards-list { display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.award-card {
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:11px;
  align-items:start;
  min-width:0;
  padding:14px;
  border:1px solid #eee7f1;
  border-radius:18px;
  background:#fff;
  box-shadow:0 6px 18px rgba(64,49,103,.055);
}
.award-number {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--pink-soft);
  color:var(--pink-dark);
  font-size:11px;
  font-weight:950;
}
.award-content { min-width:0; }
.award-content h3 { margin:1px 0 9px; font-size:15px; line-height:1.25; overflow-wrap:anywhere; }
.award-winners { display:flex; flex-direction:column; gap:7px; }
.award-winner {
  min-width:0;
  padding:10px 11px;
  border-radius:13px;
  background:#fff7fb;
}
.award-winner span {
  display:block;
  color:var(--pink-dark);
  font-size:8px;
  line-height:1.2;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-weight:950;
}
.award-winner strong { display:block; margin-top:3px; font-size:14px; line-height:1.25; overflow-wrap:anywhere; }
.award-winner small { display:block; margin-top:2px; color:var(--muted); font-size:10px; line-height:1.25; overflow-wrap:anywhere; }
.empty-winner { background:#f8f6fa; }
.empty-winner span { color:var(--muted); }
.empty-winner strong { color:var(--muted); font-size:12px; }

footer {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  padding:34px 10px 6px;
  text-align:center;
  color:var(--muted);
}
footer img { width:135px; opacity:.92; margin-bottom:3px; }
footer strong { color:var(--purple-dark); font-size:11px; }
footer span { font-size:10px; }

@media (max-width:360px) {
  .app { padding-left:10px; padding-right:10px; }
  .brand-mark { width:190px; }
  .judge-link { padding:8px 10px; font-size:11px; }
  .show-hero { padding-left:16px; padding-right:16px; border-radius:24px; }
  .class-grid { grid-template-columns:1fr; }
  .result-row { grid-template-columns:38px minmax(0,1fr); }
  .score {
    grid-column:2;
    min-width:0;
    display:flex;
    align-items:center;
    gap:8px;
    text-align:left;
  }
  .score strong, .score span { display:inline; margin:0; }
}

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