@font-face {
  font-family: Ubuntu;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/brand/ubuntu-700.woff2") format("woff2");
}

:root {
  --bg: #f2efe6;
  --card: #ffffff;
  --ink: #1c1c1e;
  --sub: rgba(60, 60, 67, 0.62);
  --sep: rgba(60, 60, 67, 0.18);
  --fill: rgba(118, 118, 128, 0.12);
  --press: rgba(0, 0, 0, 0.06);
  --yellow: #ffe154;
  --pink: #ffd0eb;
  --aqua: #b8f4ff;
  --green: #8dffa4;
  --purple: #ddd0ff;
  --red: #ffb4b6;
  --silver: #e5e5ea;
  --bronze: #f3d2b5;
  --nav: color-mix(in srgb, var(--bg) 78%, transparent);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  --nav-h: calc(52px + env(safe-area-inset-top, 0px));
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #000000;
  --card: #1c1c1e;
  --ink: #ffffff;
  --sub: rgba(235, 235, 245, 0.6);
  --sep: rgba(84, 84, 88, 0.65);
  --fill: rgba(118, 118, 128, 0.24);
  --press: rgba(255, 255, 255, 0.08);
  --nav: rgba(0, 0, 0, 0.72);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  height: 100dvh;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.stage {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
}
.app {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  background: var(--bg);
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}


.nav-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: end;
  height: var(--nav-h);
  padding: env(safe-area-inset-top, 0px) 8px 0;
  background: var(--bg);
}
.nav-bar.show-title { box-shadow: inset 0 -0.5px 0 var(--sep); }
.nav-mark {
  width: 28px;
  height: 28px;
  margin: 0 0 8px 6px;
  image-rendering: pixelated;
}
.nav-title {
  margin: 0 0 12px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(4px);
}
.nav-bar.show-title .nav-title { opacity: 1; transform: none; }
.icon-btn {
  width: 44px;
  height: 44px;
  margin-bottom: 2px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--ink);
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .icon-moon { fill: currentColor; stroke: none; }
[data-theme="dark"] .icon-moon { display: none; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
.icon-btn:active { background: var(--press); }

.large, .finder, main { padding-inline: 16px; }
.large { padding-top: 8px; padding-bottom: 4px; }
.event-logo {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 0 auto 14px;
  background: #000;
  border-radius: 18px;
}
.kicker {
  margin: 0;
  color: var(--sub);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
h1 {
  margin: 2px 0 0;
  font-family: Ubuntu, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.summary {
  margin: 6px 0 0;
  color: var(--sub);
  font-size: 15px;
}
.when {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.timer {
  margin-top: 12px;
  padding: 16px 8px 14px;
  border-radius: 18px;
  background: #1c1c1e;
  border: 1px solid rgba(255, 225, 84, 0.45);
  color: #fff;
}
.timer-label {
  margin: 0 0 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.timer-digits {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.timer-digits > div {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
.timer-digits span {
  display: block;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: #ffe154;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}
.timer-digits small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
  text-decoration: none;
}
a.btn.primary {
  background: #ffe154;
  color: #1c1c1e;
}
a.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--sep);
}
a.btn:active { opacity: 0.82; }

.finder {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  padding-top: 8px;
  padding-bottom: 10px;
  background: var(--bg);
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--fill);
}
.search svg {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: var(--sub);
  fill: none;
  stroke-width: 2;
}
.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 10px 0;
  font-size: 17px;
}
.search input::-webkit-search-cancel-button { display: none; }
.clear {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 11px;
  background: var(--sub);
  color: var(--bg);
  font-size: 16px;
  line-height: 1;
  flex: none;
}

.podium {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 6px 0 18px;
}
.pod {
  border: 0;
  border-radius: 16px;
  background: var(--card);
  color: inherit;
  text-align: center;
  padding: 12px 10px 14px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.pod:active { transform: scale(0.98); }
.pod.lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 14px;
  background: var(--yellow);
  color: #1c1c1e;
}
.pod .avatar, .sheet-dog, .avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  object-fit: cover;
  image-rendering: pixelated;
}
.pod.lead .avatar { width: 72px; height: 72px; border-radius: 18px; }

.place {
  display: block;
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.pod.lead .place { color: rgba(28, 28, 30, 0.55); }
.pod-name, .lead-copy .pod-name {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.lead-copy .pod-name { font-size: 22px; }
.pod-count {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.pod.lead .pod-count { font-size: 34px; }
.lead-copy .detail { color: rgba(28, 28, 30, 0.62); }

.section {
  margin: 0 4px 8px;
  color: var(--sub);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
}
.row {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 28px 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 14px 8px 10px;
  border: 0;
  border-bottom: 0.5px solid var(--sep);
  background: transparent;
  text-align: left;
}
.list li:last-child .row { border-bottom: 0; }
.row:active { background: var(--press); }
.rank {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--sub);
}
.rank-1, .rank-2, .rank-3 {
  width: 24px;
  height: 24px;
  margin-inline: auto;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #1c1c1e;
  font-size: 13px;
}
.rank-1 { background: var(--yellow); }
.rank-2 { background: var(--silver); }
.rank-3 { background: var(--bronze); }
.row .avatar { width: 44px; height: 44px; border-radius: 12px; }
.who { min-width: 0; display: grid; gap: 2px; }
.name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail {
  color: var(--sub);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.total {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.empty {
  margin: 28px 8px;
  text-align: center;
  color: var(--sub);
  font-size: 17px;
}
.scrim {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
}
.scrim.on { opacity: 1; }
.sheet {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88%;
  overflow: auto;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0;
  background: var(--card);
  box-shadow: var(--shadow);
  transform: translateY(110%);
}
.sheet.on { transform: translateY(0); }
.scrim, .sheet { transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.34s ease; }
.grabber {
  width: 36px;
  height: 5px;
  margin: 4px auto 8px;
  border-radius: 3px;
  background: var(--sep);
}
.sheet-close {
  position: absolute;
  top: 8px;
  right: 8px;
}
.sheet-dog {
  width: 96px;
  height: 96px;
  margin: 12px auto 8px;
  border-radius: 24px;
}
.sheet .place, .sheet-handle, .sheet-unit { text-align: center; }
.sheet h2 {
  margin: 2px 0 0;
  text-align: center;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.sheet-handle { margin: 4px 0 0; color: var(--sub); font-size: 15px; }
.sheet-count {
  margin: 14px 0 0;
  text-align: center;
  font-size: 56px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.sheet-unit {
  margin: 2px 0 0;
  color: var(--sub);
  font-size: 15px;
  font-weight: 600;
}
.sheet-pass {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0 6px;
  min-height: 48px;
  border-radius: 14px;
  background: #ffe154;
  color: #1c1c1e;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
body.sheet-open .app { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .scrim, .sheet, .nav-title, .pod { transition: none; }
}
@media (max-width: 380px) {
  h1 { font-size: 30px; }
  .pod.lead .pod-count { font-size: 28px; }
}

@media (min-width: 1024px) {
  body {
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }
  .stage {
    max-width: 1120px;
    width: min(1120px, calc(100% - 80px));
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .app {
    height: auto;
    overflow: visible;
    padding-bottom: 72px;
  }
  .large {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 28px 40px;
    align-items: center;
    padding-top: 18px;
    padding-bottom: 8px;
  }
  .hero-copy, .hero-side { min-width: 0; }
  .event-logo {
    width: min(100%, 520px);
    margin: 0 0 18px;
  }
  h1 { font-size: 52px; }
  .summary { font-size: 18px; }
  .when { margin-top: 16px; }
  .hero-side .timer { margin-top: 0; }
  .timer { padding: 20px 12px 16px; }
  .timer-digits span { font-size: 40px; }
  .large, .finder, main { padding-inline: 4px; }
  .finder { padding-top: 14px; }
  .podium {
    grid-template-columns: 1fr 1.12fr 1fr;
    gap: 16px;
    align-items: end;
    margin-top: 10px;
  }
  .pod {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 22px 14px 18px;
  }
  .pod:nth-child(2) { order: -1; }
  .pod:nth-child(3) { order: 1; }
  .pod .avatar { width: 76px; height: 76px; }
  .pod-name { font-size: 18px; }
  .pod-count { font-size: 28px; }
  .pod.lead {
    grid-column: auto;
    order: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 300px;
    padding: 28px 16px 22px;
  }
  .lead-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .pod.lead .avatar { width: 104px; height: 104px; margin-bottom: 6px; }
  .lead-copy .pod-name { font-size: 28px; }
  .pod.lead .pod-count { font-size: 48px; margin-top: 6px; }
  .row { min-height: 72px; padding-inline: 16px; }
  .row .avatar { width: 48px; height: 48px; }
  .scrim { position: fixed; }
  .sheet {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: min(440px, calc(100vw - 48px));
    max-height: min(640px, calc(100dvh - 64px));
    border-radius: 22px;
    opacity: 0;
    transform: translate(-50%, -46%);
  }
  .sheet.on { opacity: 1; transform: translate(-50%, -50%); }
  .grabber { display: none; }
  body.sheet-open { overflow: hidden; }
}
@media (min-width: 1024px) and (hover: hover) {
  .row:hover, .pod:hover { background: var(--press); }
  .pod.lead:hover { background: #ffe154; filter: brightness(0.97); }
  a.btn:hover { filter: brightness(0.97); }
}
