/* Public card page — mobile-first, dark theme (white Toost mark) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

.public-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.public-topbar {
  max-width: 32rem;
  margin: 0 auto;
  width: 100%;
  padding: env(safe-area-inset-top) 1.25rem 0.25rem;
  display: flex;
  justify-content: flex-end;
  box-sizing: border-box;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
}

.lang-link {
  color: #8b919a;
  text-decoration: none;
  font-weight: 500;
  padding: 0.2rem 0.15rem;
  border-radius: 0.25rem;
}

.lang-link:hover,
.lang-link:focus-visible {
  color: #e8eaed;
  outline: none;
}

.lang-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(167, 196, 255, 0.45);
}

.lang-link.is-active {
  color: #e8eaed;
  font-weight: 700;
}

.lang-sep {
  color: #4a4f58;
  user-select: none;
  font-weight: 300;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: system-ui, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #e8eaed;
  background: #0a0a0b;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, #1a1a24 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, #12121a 0%, #0a0a0b 60%);
}

.public-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 32rem;
  margin: 0 auto;
  width: 100%;
  padding: 0 1.25rem env(safe-area-inset-bottom);
  box-sizing: border-box;
}

.public-header {
  padding: 1.5rem 0 1rem;
  text-align: center;
}

.public-logo {
  max-width: min(12rem, 70vw);
  height: auto;
  display: block;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
}

.prize-won-stack {
  margin: 0.85rem 0 0;
  padding: 0 0.5rem;
  text-align: center;
}

.prize-won-banner {
  margin: 0;
  padding: 0;
  font-size: clamp(1.35rem, 6vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #ff6b6b;
}

.prize-won-note {
  margin: 0.45rem 0 0;
  padding: 0;
  font-size: clamp(0.95rem, 3.5vw, 1.1rem);
  font-weight: 500;
  line-height: 1.35;
  color: #ffffff;
}

.public-main {
  flex: 1;
  padding-bottom: 2rem;
}

.player-hero {
  text-align: center;
  margin-bottom: 1.75rem;
}

.public-hero {
  margin-bottom: 1.1rem;
}

.player-name {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.player-id {
  margin: 0;
  font-size: 0.8rem;
  color: #8b919a;
  word-break: break-all;
}

.mono {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}

.empty-hint {
  text-align: center;
  color: #8b919a;
  margin: 2rem 0;
}

.game-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.game-card {
  background: linear-gradient(145deg, #141418 0%, #0e0e12 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: 1.1rem 1.15rem 1.2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.game-card-head {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.game-title {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
}

.stat {
  min-width: 0;
}

.stat-wide {
  grid-column: 1 / -1;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: 0.15rem;
}

.stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 0.2rem;
}

.stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-value.accent {
  color: #a7c4ff;
}

.stat-value.stat-value-prize {
  color: #ff6b6b;
}

.stat-value.stat-value-time {
  font-size: 1rem;
  font-weight: 600;
  color: #d1d5db;
}

.stat-hint {
  display: block;
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.2rem;
  line-height: 1.35;
}

.not-found {
  text-align: center;
  padding: 0.5rem 0 2rem;
}

.not-found p {
  color: #9aa0a6;
  max-width: 28ch;
  margin: 0.75rem auto 1.5rem;
  line-height: 1.55;
}

.back-link {
  color: #a7c4ff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
}

@media (min-width: 400px) {
  .public-shell,
  .public-topbar {
    max-width: 36rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }
}
