@font-face { font-family: Poppins; font-weight: 600; font-style: normal; font-display: swap; src: url("../assets/fonts/Poppins-SemiBold.woff2") format("woff2"); }
@font-face { font-family: Poppins; font-weight: 700; font-style: normal; font-display: swap; src: url("../assets/fonts/Poppins-Bold.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../assets/fonts/NotoSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Noto Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../assets/fonts/NotoSans-SemiBold.woff2") format("woff2"); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--brand);
  color: var(--text);
  font-family: var(--font-body);
}
body {
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overscroll-behavior: none;
}

#stage {
  position: relative;
  width: min(100vw, calc(100dvh * 0.5625));
  height: min(100dvh, calc(100vw * 1.7778));
  background: var(--brand);
  overflow: hidden;
}
#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#pauseBtn { position: absolute; top: 8px; right: 8px; z-index: 2; }

.overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4);
}
.logo { height: 40px; width: auto; max-width: 100%; display: block; }

.card {
  width: 100%;
  max-width: 340px;
  max-height: 100%;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: center;
}
.card-scroll { overflow-y: auto; overflow-x: hidden; }
.card p, .card h1, .card h2, .card h3 { margin: 0; }
.card-title { font-family: var(--font-heading); font-size: 32px; line-height: 40px; font-weight: 700; color: var(--brand); }
.kicker { font-family: var(--font-heading); font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text-muted); }
.label { font-family: var(--font-body); font-size: 14px; line-height: 20px; font-weight: 600; }
.body-sm { font-size: 14px; line-height: 22px; color: var(--text); }
.caption { font-size: 12px; line-height: 18px; color: var(--text-muted); }

.big-score { font-family: var(--font-heading); font-size: 48px; line-height: 56px; font-weight: 700; color: var(--brand); letter-spacing: -0.01em; }
.tier { font-family: var(--font-heading); font-size: 20px; line-height: 28px; font-weight: 600; color: var(--ink); }
.badge-new { font-weight: 600; font-size: 14px; color: var(--success); }
.status { min-height: 22px; color: var(--text-muted); }

.banner {
  background: var(--surface-sunken);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  color: var(--text);
}
.banner-link { display: block; color: var(--text); text-decoration: none; }
.underline { text-decoration: underline; color: var(--info); }

.program-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); text-align: left; }
.program-list li { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); font-size: 13px; line-height: 20px; }
.program-list strong { display: block; font-family: var(--font-heading); font-size: 14px; color: var(--brand); }

.toggles { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2) var(--space-3); }
.lang { display: flex; align-items: center; gap: var(--space-2); }
.links { display: flex; flex-direction: column; gap: var(--space-2); }

.link { color: var(--info); font-size: 14px; line-height: 22px; font-weight: 600; text-decoration: underline; }

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  min-height: 48px;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill);
  border: 2px solid var(--action);
  cursor: pointer;
  width: 100%;
}
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { background: var(--action-strong); border-color: var(--action-strong); }
.btn-outline { background: transparent; color: var(--action-strong); border-color: var(--action); }
.btn-outline:hover { background: var(--surface-sunken); }
.btn-small { width: auto; min-height: 40px; padding: var(--space-1) var(--space-4); font-size: 14px; }
.btn-outline-dark, #pauseBtn { background: transparent; color: var(--on-brand); border-color: var(--on-brand); }

:focus-visible { outline: 2px solid var(--action-strong); outline-offset: 2px; }
#pauseBtn:focus-visible { outline-color: var(--on-brand); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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