/* Scream Score — shared styles */

:root {
  color-scheme: dark;
  --ink: #0f0b14;
  --ink-2: #140f1a;
  --surface: #1a1421;
  --surface-2: #241b2d;
  --line: #3b2f47;
  --line-strong: #4a3c57;
  --bone: #f1eadb;
  --muted: #bbafc4;
  --faint: #9c8fa6;
  --off: #8a7a96;
  --accent: #ff7a1a;
  --accent-hover: #ff9442;
  --on-accent: #0f0b14;
  --violet: #b48cff;
  --moon: #ede2c6;
  --danger: #ff8a8a;
  --ok: #c4f135;
  --display: 'Rubik Wet Paint', Impact, 'Arial Black', sans-serif;
  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --pad: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: var(--ink);
  background-image: repeating-linear-gradient(0deg, rgba(241, 234, 219, 0.035) 0, rgba(241, 234, 219, 0.035) 1px, transparent 1px, transparent 4px);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-hover); }
a:hover { color: #ffc08a; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }

[hidden] { display: none !important; }

/* i18n.js hides the page for a moment while it swaps in Hungarian, so English never flashes. */
html.i18n-wait body { visibility: hidden; }

.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 999px; flex-shrink: 0; }
.lang-btn { min-width: 44px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; cursor: pointer; }
.lang-btn:hover { color: var(--bone); }
.lang-btn.is-active { background: var(--bone); color: var(--ink); }
.app-foot { display: flex; justify-content: center; padding-top: 8px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--pad); }

.display { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; line-height: 0.95; margin: 0; }

.eyebrow { margin: 0; font-family: var(--mono); font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--violet); }

.mono-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.muted { color: var(--muted); }

.logo {
  font-family: var(--display);
  font-size: 30px;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.logo:hover { color: var(--accent-hover); }
.logo-sm { font-size: 22px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; transform: none; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 16px; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 18px; }
.btn-block { width: 100%; }

.btn-ghost { background: transparent; color: var(--bone); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--surface); color: var(--bone); }

.btn-violet { background: var(--violet); }
.btn-violet:hover { background: #c6a8ff; }

.btn-danger { background: transparent; color: var(--danger); border: 1px solid #6b3a4a; }
.btn-danger:hover { background: #2a1520; color: var(--danger); }

.text-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--bone);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  cursor: pointer;
}
.text-btn:hover { color: #fff; text-decoration-color: var(--accent); }

.icon-btn {
  width: 44px; height: 44px;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface); color: var(--bone); }

.link { color: var(--bone); font-weight: 500; padding: 12px 0; }

/* striped photo placeholder */
.ph { background-color: #241b2d; background-image: repeating-linear-gradient(135deg, #241b2d 0, #241b2d 10px, #2c2236 10px, #2c2236 20px); }

/* ---------- pumpkins ---------- */

.pumpkin { color: var(--off); flex-shrink: 0; }
.pumpkin.is-on { color: var(--accent); }
.pumpkin.is-on .rib { stroke: var(--surface); }

/* ---------- home page ---------- */

.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding-block: 24px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; margin-left: auto; }
.site-nav a:not(.btn) { color: var(--bone); text-decoration: none; font-weight: 500; padding: 12px 0; }
.site-nav a:not(.btn):hover { color: var(--accent-hover); }

.status-banner { background: var(--violet); color: var(--ink); text-align: center; padding: 14px var(--pad); font-weight: 700; }
.status-banner a { color: var(--ink); }

.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: clamp(24px, 5vw, 72px); padding-bottom: clamp(64px, 8vw, 112px); }
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-title { font-size: clamp(60px, 8.5vw, 120px); text-wrap: balance; }
.hero-sub { margin: 0; font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; line-height: 1.2; }
.lede { margin: 0; max-width: 34em; font-size: 18px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 8px; }

.facts { margin: 16px 0 0; padding-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 20px; }
.facts > div { display: flex; flex-direction: column; gap: 6px; }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-size: 17px; font-weight: 500; }

.hero-art { flex: 1 1 380px; min-width: 0; position: relative; height: 540px; display: flex; align-items: center; justify-content: center; }
.moon { position: absolute; top: 0; right: 4%; width: 380px; max-width: 86%; aspect-ratio: 1; border-radius: 50%; background: var(--moon); }
.card-back { position: absolute; top: 70px; left: 50%; margin-left: -110px; width: 280px; height: 380px; border-radius: 20px; border: 1px solid var(--line); transform: rotate(8deg); box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5); }
.card-front { position: relative; width: 300px; transform: rotate(-4deg); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6); }
.card-photo { height: 200px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.card-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.card-title-row strong { display: block; font-size: 20px; }
.card-title-row span:not(.card-score) { display: block; font-size: 14px; color: var(--muted); }
.card-score { font-family: var(--mono); font-size: 30px; font-weight: 700; line-height: 1; color: var(--accent); }
.card-rows { display: flex; flex-direction: column; gap: 8px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.pumpkins-sm { display: flex; gap: 2px; }

.band { border-top: 1px solid var(--line); }
.band-alt { background-color: var(--ink-2); }
.band-inner { padding-block: clamp(64px, 8vw, 104px); display: flex; flex-direction: column; gap: 48px; }
.section-head { display: flex; flex-direction: column; gap: 12px; }
.section-title-lg { font-size: clamp(40px, 5vw, 68px); line-height: 1; }
.split-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.split-head > :first-child { flex: 1 1 420px; min-width: 0; }
.split-head > p { flex: 1 1 380px; min-width: 0; margin: 0; font-size: 17px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.panel h3 { margin: 0; font-size: 26px; font-weight: 700; }
.panel p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--muted); }
.step-no { font-family: var(--mono); font-size: 56px; font-weight: 700; line-height: 1; color: var(--accent); }

.criteria-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 20px; }
.criteria-grid .panel { padding: 28px; gap: 12px; }
.criteria-grid h3 { font-size: 24px; }
.criteria-grid p { font-size: 16px; }
.award-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.award-name { font-size: 20px; font-weight: 700; color: var(--accent); }

.crown-band { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 32px; padding: 32px clamp(24px, 4vw, 40px); border-radius: 24px; border: 2px solid var(--accent); }
.crown-band > div { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.crown-band h3 { font-size: clamp(32px, 3.6vw, 44px); line-height: 1; }
.crown-band p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--muted); }

.rules-layout { display: flex; flex-wrap: wrap; gap: 48px; padding-block: clamp(64px, 8vw, 104px); }
.rules-layout > .section-head { flex: 1 1 300px; min-width: 0; }
.rules { flex: 2 1 520px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rules li { display: flex; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 19px; line-height: 1.5; }
.rules li:last-child { border-bottom: 0; }
.rules .no { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--accent); padding-top: 3px; }

.cta { max-width: 900px; margin: 0 auto; padding: clamp(80px, 10vw, 128px) var(--pad); display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.cta h2 { font-size: clamp(44px, 6vw, 84px); line-height: 1; text-wrap: balance; }
.cta p { margin: 0; font-size: 19px; color: var(--muted); }

.site-footer .wrap { padding-block: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--muted); }
.site-footer a { color: var(--muted); }

/* ---------- phone app pages ---------- */

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 12px 20px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.app-title { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.1; text-wrap: balance; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.center { align-items: center; text-align: center; }
.section-title { margin: 8px 0 0; font-size: 20px; font-weight: 700; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.field-hint { font-size: 13px; color: var(--muted); }
.input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--bone);
  font: inherit;
  font-size: 16px;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--violet); }
textarea.input { padding: 12px 16px; min-height: 96px; resize: vertical; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.toggle-title { display: block; font-weight: 500; }
.toggle-sub { display: block; font-size: 13px; color: var(--muted); }
.toggle input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }

.dropzone { height: 240px; border-radius: 20px; border: 2px dashed #5e4e6c; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-align: center; padding: 16px; }
.dropzone:hover { border-color: var(--accent); }
#photo-input:focus-visible + .dropzone { outline: 3px solid var(--violet); outline-offset: 3px; }
.dz-title { font-size: 18px; font-weight: 700; }
.dz-sub { font-size: 14px; color: var(--muted); }
.preview-wrap { position: relative; }
.preview { width: 100%; max-height: 420px; object-fit: cover; border-radius: 20px; border: 1px solid var(--line); }

.form-error { margin: 0; padding: 12px 16px; border-radius: 12px; background: #2a1520; border: 1px solid #6b3a4a; color: var(--danger); font-size: 15px; }
.fine { margin: 0; font-size: 13px; line-height: 1.5; text-align: center; color: var(--muted); }

.notice { padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.notice h2 { margin: 0; font-size: 20px; }
.notice p { margin: 0; color: var(--muted); }

.mine-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mine-item { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.mine-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.mine-item .grow { flex: 1; min-width: 0; }
.mine-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.success-photo { width: 100%; max-height: 360px; object-fit: cover; border-radius: 20px; border: 2px solid var(--accent); }

/* rating */
.photo-frame { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 5; max-height: 52vh; width: 100%; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.entry-chip { position: absolute; left: 12px; top: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(15, 11, 20, 0.85); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--bone); }
.group-chip { position: absolute; right: 12px; top: 12px; padding: 6px 10px; border-radius: 999px; background: var(--violet); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--ink); }

.criteria { display: flex; flex-direction: column; gap: 14px; }
.criterion { border: 0; margin: 0; padding: 0; min-width: 0; }
.criterion legend { padding: 0; margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.criterion legend span { font-size: 14px; font-weight: 400; color: var(--muted); }
.criterion-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pumpkin-scale { display: flex; gap: 4px; }
.pumpkin-scale label { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--surface); cursor: pointer; transition: transform 0.1s ease; }
.pumpkin-scale label:hover { background: var(--surface-2); }
.pumpkin-scale label:active { transform: scale(0.92); }
.pumpkin-scale input:focus-visible + label { outline: 3px solid var(--violet); outline-offset: 2px; }
.criterion-value { font-family: var(--mono); font-size: 16px; font-weight: 700; min-width: 40px; text-align: right; }
.criterion-value.is-empty { color: var(--faint); }

.rate-footer { display: flex; align-items: center; gap: 16px; position: sticky; bottom: 0; padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--ink) 75%, rgba(15, 11, 20, 0)); }
.score-box { display: flex; flex-direction: column; gap: 2px; min-width: 82px; }
.score { font-family: var(--mono); font-size: 30px; font-weight: 700; line-height: 1; color: var(--accent); }
.rate-footer .btn { flex: 1; }

.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gallery-btn { width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--bone); font: inherit; text-align: left; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; }
.gallery-btn:disabled { cursor: default; }
.gallery-btn.is-current { border-color: var(--accent); }
.gallery-btn img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery-meta { padding: 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gallery-meta strong { font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-status { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.gallery-status.is-done { color: var(--accent); }
.gallery-status.is-mine { color: var(--violet); }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; background: var(--bone); color: var(--ink); font-weight: 700; font-size: 15px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); z-index: 20; max-width: calc(100vw - 40px); text-align: center; }

.big-icon { color: var(--accent); }

/* ---------- admin ---------- */

.admin { max-width: 1100px; margin: 0 auto; padding: 24px var(--pad) 80px; display: flex; flex-direction: column; gap: 28px; }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 18px; }
.admin-card h2 { margin: 0; font-size: 22px; }
.admin-card > p { margin: 0; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.pill-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.pill.is-open .pill-dot { background: var(--ok); }
.pill.is-closed .pill-dot { background: var(--accent); }
.pill.is-revealed .pill-dot { background: var(--violet); }
.stats { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-family: var(--mono); font-size: 28px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 400; background: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); }
.thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.qr-box { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.qr-box canvas { background: #fff; border-radius: 12px; padding: 12px; width: 180px; height: 180px; image-rendering: pixelated; }
.saved-msg { color: var(--ok); font-weight: 500; }
.bi-fields { display: flex; flex-direction: column; gap: 16px; }
.bi-field { display: grid; grid-template-columns: minmax(150px, 200px) minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; align-items: end; }
.bi-name { font-weight: 700; padding-bottom: 14px; }
.bi-input { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
@media (max-width: 720px) {
  .bi-field { grid-template-columns: minmax(0, 1fr); }
  .bi-name { padding-bottom: 0; }
}

/* ---------- TV ---------- */

.tv-body { overflow: hidden; }
.tv {
  --u: min(1vw, 1.7778vh);
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: calc(var(--u) * 3) calc(var(--u) * 4.2);
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 2);
  overflow: hidden;
  position: relative;
}
.tv-header { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--u) * 2); }
.tv-brand { display: flex; align-items: center; gap: calc(var(--u) * 1.6); }
.tv-logo { font-family: var(--display); font-size: calc(var(--u) * 3.2); color: var(--accent); line-height: 1; }
.tv-chip { display: flex; align-items: center; gap: calc(var(--u) * 0.7); padding: calc(var(--u) * 0.6) calc(var(--u) * 1.1); border: 1px solid var(--violet); border-radius: 999px; font-family: var(--mono); font-size: calc(var(--u) * 1.1); letter-spacing: 0.12em; color: var(--violet); }
.tv-chip-dot { width: calc(var(--u) * 0.7); height: calc(var(--u) * 0.7); border-radius: 50%; background: var(--violet); animation: pulse 1.6s ease-in-out infinite; }
.tv-clock { display: flex; flex-direction: column; align-items: flex-end; gap: calc(var(--u) * 0.3); }
.tv-clock-label { font-family: var(--mono); font-size: calc(var(--u) * 1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tv-clock-time { font-family: var(--mono); font-size: calc(var(--u) * 3.1); font-weight: 700; line-height: 1; }
.tv-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tv-screen { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: calc(var(--u) * 2); }

.tv-standings { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: calc(var(--u) * 3); }
.podium { display: flex; align-items: flex-end; gap: calc(var(--u) * 1.3); min-height: 0; }
.podium-card { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--u) * 1.6); padding: calc(var(--u) * 1.1); display: flex; flex-direction: column; gap: calc(var(--u) * 0.9); }
.podium-card.place-1 { flex: 1.15; height: 100%; border: 2px solid var(--accent); }
.podium-card.place-2 { height: 88%; }
.podium-card.place-3 { height: 80%; }
.podium-photo { flex: 1; min-height: 0; border-radius: calc(var(--u) * 1); overflow: hidden; position: relative; }
.podium-photo img { width: 100%; height: 100%; object-fit: cover; }
.podium-meta { display: flex; align-items: flex-end; justify-content: space-between; gap: calc(var(--u) * 0.6); }
.podium-meta > div { min-width: 0; display: flex; flex-direction: column; gap: calc(var(--u) * 0.15); }
.podium-rank { font-family: var(--mono); font-size: calc(var(--u) * 1.05); letter-spacing: 0.1em; color: var(--muted); }
.place-1 .podium-rank { color: var(--accent); }
.podium-name { font-size: calc(var(--u) * 1.5); font-weight: 700; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.podium-by { font-size: calc(var(--u) * 1.15); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-score { font-family: var(--mono); font-size: calc(var(--u) * 2.1); font-weight: 700; line-height: 1; }
.place-1 .podium-score { color: var(--accent); font-size: calc(var(--u) * 2.6); }
.podium-empty { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: calc(var(--u) * 1.2); padding: calc(var(--u) * 1); }
.crown-badge { position: absolute; top: calc(var(--u) * 0.9); left: 50%; transform: translateX(-50%); color: var(--accent); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)); }

.tv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; overflow: hidden; }
.tv-list li { display: flex; align-items: center; gap: calc(var(--u) * 1.4); padding: calc(var(--u) * 0.85) calc(var(--u) * 0.3); border-bottom: 1px solid var(--line); }
.tv-list-rank { width: calc(var(--u) * 2.4); font-family: var(--mono); font-size: calc(var(--u) * 1.4); font-weight: 700; color: var(--muted); }
.tv-list img { width: calc(var(--u) * 3.6); height: calc(var(--u) * 3.6); border-radius: calc(var(--u) * 0.6); object-fit: cover; }
.tv-list-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tv-list-name strong { font-size: calc(var(--u) * 1.45); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-list-name span { font-size: calc(var(--u) * 1.1); color: var(--muted); }
.tv-list-score { font-family: var(--mono); font-size: calc(var(--u) * 1.8); font-weight: 700; }
.tv-list-more { justify-content: center; color: var(--muted); font-size: calc(var(--u) * 1.15); border-bottom: 0 !important; }

.tv-footer { display: flex; align-items: center; gap: calc(var(--u) * 2.4); padding-top: calc(var(--u) * 1.4); border-top: 1px solid var(--line); }
.tv-awards { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(var(--u) * 1.8); }
.tv-award { display: flex; flex-direction: column; gap: calc(var(--u) * 0.3); min-width: 0; }
.tv-award-label { font-family: var(--mono); font-size: calc(var(--u) * 0.95); letter-spacing: 0.12em; text-transform: uppercase; color: var(--violet); }
.tv-award-name { font-size: calc(var(--u) * 1.3); font-weight: 700; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tv-join { display: flex; align-items: center; gap: calc(var(--u) * 1.2); flex-shrink: 0; }
.tv-join canvas { width: calc(var(--u) * 7); height: calc(var(--u) * 7); background: #fff; border-radius: calc(var(--u) * 0.6); padding: calc(var(--u) * 0.45); image-rendering: pixelated; }
.tv-join-text { display: flex; flex-direction: column; gap: calc(var(--u) * 0.2); }
.tv-join-text span { font-family: var(--mono); font-size: calc(var(--u) * 0.95); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tv-join-text strong { font-size: calc(var(--u) * 1.5); }

.tv-hero { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--u) * 1.8); text-align: center; }
.tv-hero h1 { font-size: calc(var(--u) * 8); text-wrap: balance; }
.tv-hero p { margin: 0; font-size: calc(var(--u) * 2); color: var(--muted); max-width: 40em; text-wrap: balance; }
.tv-hero .tv-big-time { font-family: var(--mono); font-size: calc(var(--u) * 7); font-weight: 700; line-height: 1; color: var(--bone); }
.tv-totals { display: flex; gap: calc(var(--u) * 4); justify-content: center; }
.tv-total { display: flex; flex-direction: column; align-items: center; }
.tv-total strong { font-family: var(--mono); font-size: calc(var(--u) * 4.4); line-height: 1; color: var(--accent); }
.tv-total span { font-family: var(--mono); font-size: calc(var(--u) * 1.1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tv-hero.is-secret { gap: calc(var(--u) * 1.4); }
.tv-hero.is-secret h1 { font-size: calc(var(--u) * 5.4); }
.tv-wall { display: flex; justify-content: center; gap: calc(var(--u) * 1.2); width: 100%; margin-top: calc(var(--u) * 1); }
.tv-wall figure { margin: 0; display: flex; flex-direction: column; gap: calc(var(--u) * 0.5); min-width: 0; width: calc((100% - var(--u) * 8.4) / 8); }
.tv-wall img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--u) * 1); border: 1px solid var(--line); }
.tv-wall figcaption { font-size: calc(var(--u) * 1.15); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }

/* reveal */
.reveal { position: absolute; inset: 0; background-color: var(--ink); background-image: repeating-linear-gradient(0deg, rgba(241, 234, 219, 0.035) 0, rgba(241, 234, 219, 0.035) 1px, transparent 1px, transparent 4px); z-index: 5; display: flex; align-items: center; justify-content: center; padding: calc(var(--u) * 4); cursor: pointer; }
.reveal-step { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.reveal-center { flex-direction: column; gap: calc(var(--u) * 2); text-align: center; }
.reveal-center h1 { font-size: calc(var(--u) * 9); text-wrap: balance; }
.reveal-center p { margin: 0; font-size: calc(var(--u) * 2.2); color: var(--muted); }
.reveal-award { gap: calc(var(--u) * 5); }
.reveal-photos { display: flex; gap: calc(var(--u) * 2); flex-shrink: 0; }
.reveal-photo { width: calc(var(--u) * 30); height: calc(var(--u) * 40); border-radius: calc(var(--u) * 2); border: 4px solid var(--accent); overflow: hidden; transform: rotate(-2deg); box-shadow: 0 calc(var(--u) * 3) calc(var(--u) * 6) rgba(0, 0, 0, 0.65); position: relative; z-index: 1; }
.reveal-photos.is-multi .reveal-photo { width: calc(var(--u) * 22); height: calc(var(--u) * 30); }
.reveal-photo img { width: 100%; height: 100%; object-fit: cover; }
.reveal-text { display: flex; flex-direction: column; gap: calc(var(--u) * 1.2); min-width: 0; max-width: calc(var(--u) * 52); }
.reveal-text .eyebrow { font-size: calc(var(--u) * 1.3); }
.reveal-award-name { font-size: calc(var(--u) * 6.5); color: var(--accent); }
.reveal-winner { font-size: calc(var(--u) * 3.4); font-weight: 700; line-height: 1.1; margin: 0; }
.reveal-by { font-size: calc(var(--u) * 2); color: var(--muted); margin: 0; }
.reveal-score { font-family: var(--mono); font-size: calc(var(--u) * 4.4); font-weight: 700; line-height: 1; color: var(--accent); }
.reveal-tie { display: inline-flex; align-self: flex-start; padding: calc(var(--u) * 0.5) calc(var(--u) * 1.2); border-radius: 999px; background: var(--violet); color: var(--ink); font-family: var(--mono); font-weight: 700; font-size: calc(var(--u) * 1.3); letter-spacing: 0.08em; text-transform: uppercase; }

.final { gap: calc(var(--u) * 5); }
.final-art { position: relative; flex-shrink: 0; }
.final-moon { position: absolute; left: calc(var(--u) * -7); top: calc(var(--u) * -5); width: calc(var(--u) * 37); height: calc(var(--u) * 37); border-radius: 50%; background: var(--moon); }
.final-title { font-size: calc(var(--u) * 8); line-height: 0.95; text-wrap: balance; }
.final-awards { margin-top: calc(var(--u) * 0.8); padding-top: calc(var(--u) * 1.6); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--u) * 1.2) calc(var(--u) * 2.4); }
.final-awards .tv-award-name { font-size: calc(var(--u) * 1.45); white-space: normal; }

.tv-tools { position: fixed; left: 16px; bottom: 16px; display: flex; gap: 8px; opacity: 0; transition: opacity 0.3s; z-index: 10; }
.tv-body:hover .tv-tools, .tv-tools:focus-within { opacity: 1; }
.tv-tools .btn { min-height: 40px; font-size: 14px; padding: 0 16px; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes rise { from { opacity: 0; transform: translateY(calc(var(--u) * 3)) scale(0.98); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .site-nav .nav-anchor { display: none; }
  .site-header .lang-switch { order: 1; margin-left: auto; }
  .site-header .site-nav { order: 2; width: 100%; margin-left: 0; }
  .site-header .logo { font-size: 26px; }
  .hero-art { height: 460px; }
  .moon { width: 300px; }
  .card-front { width: 270px; }
  .card-back { width: 240px; height: 330px; margin-left: -100px; }
  .rules li { font-size: 17px; gap: 16px; }
}

@media (max-width: 360px) {
  .pumpkin-scale label { width: 42px; height: 42px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
