/* Panettasting — stylesheet */

:root {
  --bg: #FBF5EA;
  --bg-2: #F4E9D6;
  --card: #FFFDF8;
  --ink: #2B1B12;
  --ink-2: #5C4636;
  --muted: #8A7563;
  --line: #E8D9C2;
  --line-2: #D9C4A4;
  --gold: #C98A2B;
  --gold-2: #E9B95A;
  --gold-soft: #F6E3BC;
  --red: #A3192F;
  --red-2: #C8323F;
  --red-soft: #F8DEE0;
  --green: #2E6B4E;
  --green-soft: #DCEEE3;
  --amber: #B7791F;
  --amber-soft: #FCEFD6;
  --box: #A3192F;
  --look: #C98A2B;
  --taste: #2E6B4E;
  --video: #3F5A8C;
  --shadow-sm: 0 1px 2px rgba(60, 35, 10, .06);
  --shadow: 0 1px 2px rgba(60, 35, 10, .05), 0 6px 20px rgba(60, 35, 10, .07);
  --shadow-lg: 0 12px 40px rgba(60, 35, 10, .16);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --container: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110C;
    --bg-2: #1F1710;
    --card: #241B13;
    --ink: #F5EBDD;
    --ink-2: #DCCAB4;
    --muted: #A8927D;
    --line: #3A2D21;
    --line-2: #4D3C2C;
    --gold: #E0A445;
    --gold-2: #E9B95A;
    --gold-soft: #3B2C17;
    --red: #E25A6E;
    --red-2: #EE7586;
    --red-soft: #3D1A20;
    --green: #6CC296;
    --green-soft: #1C3328;
    --amber: #E8B04F;
    --amber-soft: #3A2C14;
    --box: #E25A6E;
    --look: #E0A445;
    --taste: #6CC296;
    --video: #8BA6DA;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
img, svg, video { max-width: 100%; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red-2); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .9rem; }
.hide-sm { }
.ok-text { color: var(--green); font-weight: 600; }
.warn-text { color: var(--amber); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.bad-text { color: var(--red); font-weight: 600; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 560px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }

.shell { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding-bottom: 64px; }

.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { max-width: var(--container); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
@media (min-width: 720px) { .header-inner { padding: 12px 24px; } }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.main-nav { display: flex; gap: 4px; margin-left: 12px; }
.main-nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem; display: inline-flex; gap: 6px; align-items: center; }
.main-nav a:hover { background: var(--bg-2); color: var(--ink); }
.main-nav a.active { background: var(--ink); color: var(--bg); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; }
.lang-switch button { border: 0; background: none; padding: 4px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; cursor: pointer; color: var(--muted); }
.lang-switch button.on { background: var(--gold-soft); color: var(--ink); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; padding: 3px 12px 3px 3px; border-radius: 999px; border: 1px solid var(--line-2); }
.user-chip:hover { color: var(--ink); background: var(--bg-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.avatar.lg { width: 44px; height: 44px; font-size: 1.1rem; }
.header-tools .menu-btn { display: none; }
@media (max-width: 860px) {
  .header-tools .menu-btn { display: inline-grid; }
  .user-name { display: none; }
  .user-chip { padding: 3px; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 2px;
    background: var(--card); border-bottom: 1px solid var(--line); padding: 8px 12px 14px; margin: 0; box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; border-radius: 12px; font-size: 1rem; }
}

/* ---------------------------------------------------------------- buttons & inputs */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card);
  color: var(--ink); font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { background: var(--bg-2); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--red) 30%, transparent); }
.btn-primary:hover { background: var(--red-2); border-color: var(--red-2); color: #fff; }
.btn-danger { background: var(--card); border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red-soft); color: var(--red); }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: var(--green); color: #fff; filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-2); }
.btn-ghost.danger { color: var(--red); }
.btn-sm { padding: 7px 13px; font-size: .85rem; }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; flex: none; }
.icon-btn:hover { background: var(--bg-2); color: var(--ink); border-color: var(--line); }
.icon-btn.danger:hover { color: var(--red); background: var(--red-soft); }
.icon-btn.wa:hover { color: #1f9e55; }
.link-btn { background: none; border: 0; padding: 0; color: var(--red); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.file-btn { position: relative; }

.input {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--card); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-2) 35%, transparent); }
.input:disabled { opacity: .65; }
textarea.input { resize: vertical; min-height: 64px; }
.input-sm { padding: 7px 11px; font-size: .9rem; width: auto; }
.w-xs { width: 64px !important; flex: none; }
.w-sm { width: 96px !important; flex: none; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.field-hint { color: var(--muted); font-size: .8rem; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); flex: none; }
.check span { display: flex; flex-direction: column; }
.form-error { color: var(--red); font-weight: 600; font-size: .9rem; }

.toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { width: 46px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .2s; margin-top: 1px; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.toggle input:checked + .toggle-track { background: var(--green); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid var(--gold-2); outline-offset: 2px; }
.toggle-text { display: flex; flex-direction: column; font-weight: 600; }
.toggle-text small { font-weight: 400; }
.toggle.disabled { opacity: .5; cursor: not-allowed; }

.segmented { display: inline-flex; background: var(--bg-2); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem; cursor: pointer; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.segmented button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------- generic blocks */

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card h3 { display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card.flush > .card-head { padding: 16px 20px 0; }
.card-head h2, .card-head h3 { margin: 0; display: flex; gap: 8px; align-items: center; }
.center-card { text-align: center; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 32px; }
.big-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--red); margin-bottom: 12px; }
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); opacity: .8; } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .85rem; }
.chip-gold { background: var(--gold-soft); color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .01em; vertical-align: middle; }
.pill .dot, .countdown .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill-open { background: var(--green-soft); color: var(--green); }
.pill-open .dot { animation: pulse 1.4s infinite; }
.pill-closed { background: var(--red-soft); color: var(--red); }
.pill-pending { background: var(--bg-2); color: var(--muted); }
.badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--bg-2); color: var(--ink-2); }
.badge-committee { background: var(--ink); color: var(--bg); }
.badge-competitor { background: var(--red-soft); color: var(--red); }
.badge-participant { background: var(--gold-soft); color: var(--ink); }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg-2); color: var(--ink-2); font-size: .93rem; border: 1px solid var(--line); }
.notice > .icon { flex: none; margin-top: 1px; color: var(--gold); }
.notice > div { flex: 1; }
.notice-warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.notice-warn > .icon { color: var(--amber); }
.notice-error { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); color: var(--ink); }
.notice-error > .icon { color: var(--red); }

.spinner-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 0; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--red); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 48px 16px; }
.empty-icon { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--muted); }

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2.tight { gap: 10px; grid-template-columns: 1fr 1fr; }
.align-start { align-items: start; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { border: 1px solid var(--line-2); background: var(--card); padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .85rem; cursor: pointer; color: var(--ink-2); }
.chip-btn span { color: var(--muted); font-weight: 500; margin-left: 2px; }
.chip-btn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-btn.on span { color: inherit; opacity: .7; }

.page-head { padding: 36px 0 22px; }
.page-head h1 { margin-bottom: 8px; }
.page-head-sub { color: var(--ink-2); max-width: 720px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--red); margin-bottom: 10px; }
.kicker.center { display: flex; justify-content: center; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 20px; text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--ink-2); }

.section { padding: 56px 0; }
.section-sm { margin-top: 32px; }
.section-tint { background: var(--bg-2); }
.section-title { text-align: center; margin-bottom: 28px; }
.section-title.left { text-align: left; margin-bottom: 16px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head .section-title { margin-bottom: 0; }

.prose { color: var(--ink-2); }
.prose h2 { font-size: 1.45rem; margin-top: 1.6em; color: var(--ink); }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; color: var(--ink); }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--gold); }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 1em 0; padding: 8px 16px; border-left: 3px solid var(--gold); background: var(--bg-2); border-radius: 0 8px 8px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: .93rem; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--ink); background: var(--bg-2); }
.lead-prose { font-size: 1.08rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------------------------------------------------------------- hero / home */

.hero { padding: 40px 0 24px; background: radial-gradient(1200px 500px at 85% -10%, var(--gold-soft), transparent 60%); }
.hero-inner { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .hero { padding: 64px 0 40px; } .hero-inner { grid-template-columns: 1.15fr .85fr; } }
.display { font-size: clamp(3rem, 10vw, 5.6rem); font-weight: 800; letter-spacing: -.035em; margin: 14px 0 10px; line-height: .95; }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink-2); max-width: 34ch; }
.event-meta { display: flex; flex-direction: column; gap: 8px; margin: 18px 0; font-weight: 600; }
.event-meta > div { display: flex; gap: 10px; align-items: center; }
.event-meta .icon { color: var(--red); }
.event-meta a { color: var(--ink); }
.countdown { display: inline-flex; gap: 10px; margin: 6px 0 22px; align-items: center; font-weight: 600; color: var(--ink-2); flex-wrap: wrap; }
.countdown > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; min-width: 76px; text-align: center; box-shadow: var(--shadow-sm); }
.countdown strong { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--ink); }
.countdown span { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.countdown.live { color: var(--green); background: var(--green-soft); padding: 10px 16px; border-radius: 999px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-art { display: grid; place-items: center; }
.pan-art { width: min(100%, 420px); height: auto; filter: drop-shadow(0 20px 30px rgba(90, 40, 10, .18)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-1deg); } }
@media (max-width: 859px) { .hero-art { order: -1; } .pan-art { width: 200px; } }
@media (prefers-reduced-motion: reduce) { .pan-art, .pulse, .pill-open .dot { animation: none; } }

.banner { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: var(--radius); background: var(--ink); color: var(--bg); text-decoration: none; margin: 8px 0 0; box-shadow: var(--shadow); }
.banner:hover { color: var(--bg); filter: brightness(1.1); }
.banner span { flex: 1; }
.banner .icon:first-child { color: var(--gold-2); }

.two-col { display: grid; gap: 28px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.stat-card h3 { margin-top: 18px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stat { background: var(--bg-2); border-radius: 12px; padding: 12px 6px; }
.stat strong { display: block; font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; }
.stat span { font-size: .78rem; color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; position: relative; box-shadow: var(--shadow-sm); }
.steps li > .icon { color: var(--red); margin-bottom: 10px; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.step-n { position: absolute; top: 14px; right: 16px; font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--gold-soft); }

.weights { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.weights-bar { display: flex; height: 38px; border-radius: 12px; overflow: hidden; gap: 3px; }
.w-seg { display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .9rem; min-width: 0; }
.w-seg span { white-space: nowrap; overflow: hidden; }
.w-box { background: var(--box); }
.w-look { background: var(--look); }
.w-taste { background: var(--taste); }
.weights-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .9rem; }
.w-leg { display: inline-flex; align-items: center; gap: 6px; }
.w-dot { width: 10px; height: 10px; border-radius: 3px; }

/* ---------------------------------------------------------------- rules */

.rules-top { display: grid; gap: 16px; margin-bottom: 32px; }
@media (min-width: 820px) { .rules-top { grid-template-columns: 1.2fr 1fr; } }
.plain-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.plain-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.plain-list li span { color: var(--ink-2); }
.code-cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 14px; }
@media (min-width: 680px) { .code-cards { grid-template-columns: repeat(3, 1fr); } }
.code-card { position: relative; overflow: hidden; }
.code-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c, var(--gold)); }
.code-box { --c: var(--box); }
.code-look { --c: var(--look); }
.code-taste { --c: var(--taste); }
.code-video { --c: var(--video); }
.code-card-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); margin-bottom: 10px; }
.code-sample { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--c); }
.code-card .row-actions { margin-top: 10px; }
.rules-text { margin-top: 24px; padding: 28px clamp(18px, 4vw, 40px); }

/* ---------------------------------------------------------------- archive */

.edition-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.edition-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.edition-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.edition-cover { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--gold-soft), var(--bg-2)); position: relative; overflow: hidden; }
.edition-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; opacity: .9; }
.edition-num { position: absolute; left: 12px; bottom: 10px; background: var(--ink); color: var(--bg); font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; padding: 4px 12px; border-radius: 999px; }
.edition-num.static { position: static; flex: none; }
.edition-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.edition-body h3 { margin: 0 0 4px; }
.edition-winner { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--red); }
.edition-counts { display: flex; gap: 12px; margin-top: 4px; }
.edition-counts span { display: inline-flex; gap: 4px; align-items: center; }
.winner-hero { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--radius); background: linear-gradient(135deg, var(--ink), #4a2d1c); color: #fff; margin-top: 8px; box-shadow: var(--shadow); }
.winner-hero .kicker { color: var(--gold-2); margin: 0; }
.winner-medal { width: 64px; height: 64px; border-radius: 50%; background: var(--gold-2); color: var(--ink); display: grid; place-items: center; flex: none; }
.winner-name { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
.gallery { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery-item { padding: 0; border: 0; background: var(--bg-2); border-radius: 12px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.04); }
.video-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 420px) { .video-grid { grid-template-columns: 1fr; } }
.video-card { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.video-card.chosen { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft), var(--shadow); }
.video-card figcaption { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.video-card figcaption > div, .video-card figcaption { line-height: 1.3; }
.video-card figcaption strong { display: block; }
.video-card figcaption .muted { font-size: .85rem; display: block; }
.video-frame { aspect-ratio: 16 / 9; background: #000; }
.video-frame video, .video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-link { display: flex; align-items: center; gap: 14px; padding: 24px; background: var(--bg-2); text-decoration: none; color: var(--ink); font-weight: 600; aspect-ratio: 16 / 9; justify-content: center; }
.video-link small { display: block; color: var(--muted); font-weight: 400; }
.video-link .icon { color: var(--red); }

.lightbox { position: fixed; inset: 0; background: rgba(15, 8, 3, .92); z-index: 80; display: grid; place-items: center; padding: 24px; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 8px; }
.lightbox figcaption { color: #eee; text-align: center; }
.lb-btn { position: absolute; border: 0; background: rgba(255, 255, 255, .1); color: #fff; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------------------------------------------------------------- tables */

.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .center { text-align: center; }
.table.compact td, .table.compact th { padding: 8px 12px; }
.rank { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-2); font-weight: 700; font-size: .88rem; flex: none; }
tr.top-1 .rank { background: #E9B95A; color: #2B1B12; }
tr.top-2 .rank { background: #C9CDD3; color: #2B1B12; }
tr.top-3 .rank { background: #D49A6A; color: #2B1B12; }
.total-cell { min-width: 110px; }
.total-cell .bar { margin-top: 6px; }
.codes-line { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.code-chip { display: inline-block; padding: 2px 9px; border-radius: 6px; font-weight: 700; font-size: .85rem; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.code-chip.sm { font-size: .72rem; padding: 1px 6px; }

.bar { display: block; height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; width: 100%; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--red)); transition: width .5s ease; }
.bar-alt .bar-fill { background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.bar-green .bar-fill { background: var(--green); }
.bar-box .bar-fill { background: var(--box); }
.bar-look .bar-fill { background: var(--look); }
.bar-taste .bar-fill { background: var(--taste); }
.bar-video .bar-fill { background: var(--video); }

/* ---------------------------------------------------------------- auth & area */

.login-card { margin-top: 40px; text-align: center; padding: 36px clamp(18px, 5vw, 40px); display: flex; flex-direction: column; align-items: center; }
.login-form { width: 100%; display: flex; flex-direction: column; gap: 12px; margin: 10px 0 18px; }
.code-input { text-align: center; font-size: 1.6rem; letter-spacing: .18em; font-weight: 700; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; padding: 14px; text-transform: uppercase; }
.area-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.area-card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; transition: transform .15s, box-shadow .15s; }
.area-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.area-card h3 { margin: 6px 0 0; }
.area-card p { margin: 0 0 6px; font-size: .94rem; }
.area-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.area-vote { background: var(--gold); }
.area-comp { background: var(--red); }
.area-adm { background: var(--ink); color: var(--bg); }
.area-screen { background: var(--video); }
.area-foot { display: flex; align-items: center; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

.checklist { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.check-item { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; color: var(--muted); }
.check-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; }
.check-item.done { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.check-item.done .check-dot { background: var(--green); border-color: var(--green); color: #fff; }
.form-grid { display: grid; gap: 18px; margin-top: 18px; }
@media (min-width: 980px) { .form-grid { grid-template-columns: 1.4fr 1fr; } .form-grid > fieldset:first-child { grid-row: span 2; } }
fieldset { margin: 0; min-width: 0; }
.form-card { border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.form-card h2 { font-size: 1.3rem; margin: 0; display: flex; gap: 8px; align-items: center; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.photo-preview { width: 100%; max-height: 260px; object-fit: contain; border-radius: 12px; background: var(--bg-2); }
.photo-preview.sm { max-height: 140px; }
.progress { position: relative; height: 34px; border-radius: 999px; background: var(--bg-2); overflow: hidden; width: 100%; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--red)); transition: width .2s; }
.progress-label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

/* ---------------------------------------------------------------- voting */

.round-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px; position: sticky; top: 62px; z-index: 5; background: var(--bg); padding: 8px 0; }
.round-tab { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; color: var(--ink-2); font-weight: 600; position: relative; }
.round-tab .rt-name { font-size: .9rem; }
.round-tab .rt-status { font-size: .72rem; color: var(--muted); font-weight: 600; }
.round-tab.st-open { border-color: var(--green); }
.round-tab.st-open .rt-status { color: var(--green); }
.round-tab.st-open::after { content: ''; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.4s infinite; }
.round-tab.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.round-tab.on .rt-status { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.vote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.vote-head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.vote-progress { text-align: right; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; white-space: nowrap; }
.vote-progress span { display: block; font-family: var(--font-body); }
.vote-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 14px; }
@media (max-width: 400px) { .vote-grid { grid-template-columns: 1fr; } }
.vote-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; transition: border-color .2s; }
.vote-card.voted { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.vote-card-head { display: flex; justify-content: space-between; align-items: center; }
.code-badge { display: inline-flex; flex-direction: column; padding: 6px 16px 8px; border-radius: 12px; background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--c); line-height: 1.1; }
.code-kind { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; opacity: .85; }
.code-value { font-family: var(--font-display); font-size: 2rem; font-weight: 800; }
.voted-tick { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.score { display: flex; gap: 10px; align-items: stretch; }
.score-grid { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 6px; flex: 1; align-content: start; }
.score-btn { border: 1px solid var(--line-2); background: var(--card); border-radius: 10px; padding: 11px 0; font-weight: 700; font-size: 1.05rem; cursor: pointer; color: var(--ink); min-height: 46px; transition: background .1s, transform .05s; touch-action: manipulation; }
.score-btn:hover:not(:disabled) { background: var(--bg-2); }
.score-btn:active:not(:disabled) { transform: scale(.95); }
.score-btn.on { background: var(--red); border-color: var(--red); color: #fff; }
.score-btn:disabled { opacity: .55; cursor: default; }
.score-side { display: flex; flex-direction: column; gap: 6px; width: 70px; flex: none; }
.score-display { flex: 1; display: grid; place-items: center; border-radius: 12px; background: var(--gold-soft); font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; color: var(--ink); min-height: 46px; }
.score-display.empty { color: var(--muted); background: var(--bg-2); }
.score-half { border: 1px solid var(--line-2); background: var(--card); border-radius: 10px; padding: 8px 0; font-weight: 700; cursor: pointer; min-height: 40px; touch-action: manipulation; }
.score-half.on { background: var(--gold); border-color: var(--gold); color: #fff; }
.score-half:disabled { opacity: .45; cursor: default; }
.vote-note summary { cursor: pointer; font-size: .85rem; color: var(--muted); font-weight: 600; }
.vote-note textarea { margin-top: 8px; font-size: .9rem; }
.waiting { margin-top: 12px; }

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

.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 22px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 12px 12px 0 0; text-decoration: none; color: var(--ink-2); font-weight: 600; white-space: nowrap; font-size: .93rem; border-bottom: 3px solid transparent; }
.admin-tabs a:hover { background: var(--bg-2); color: var(--ink); }
.admin-tabs a.on { color: var(--red); border-bottom-color: var(--red); }
.admin-screen-link { margin-left: auto; }
.round-controls { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.round-ctl { display: flex; flex-direction: column; gap: 12px; }
.round-ctl.st-open { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft), var(--shadow); }
.round-ctl-head { display: flex; align-items: center; gap: 8px; }
.round-ctl-head h3 { margin: 0; flex: 1; }
.round-ctl-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.round-ctl-stats div { font-family: var(--font-display); font-size: 1.05rem; }
.round-ctl-stats strong { font-size: 1.5rem; }
.round-ctl-stats span { display: block; font-family: var(--font-body); font-size: .75rem; color: var(--muted); }
.round-ctl-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-rank { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.mini-rank li { display: grid; grid-template-columns: 30px 1fr 90px 46px; gap: 10px; align-items: center; }
.mr-name { display: flex; flex-direction: column; font-weight: 600; line-height: 1.2; min-width: 0; }
.mr-name small { font-weight: 400; }
.mr-score { text-align: right; font-variant-numeric: tabular-nums; }

.spoiler { text-align: center; padding: 36px 20px; border: 2px dashed var(--line-2); border-radius: var(--radius); background: repeating-linear-gradient(-45deg, transparent 0 12px, color-mix(in srgb, var(--bg-2) 70%, transparent) 12px 24px); }
.spoiler-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--card); margin: 0 auto 10px; color: var(--muted); border: 1px solid var(--line); }
.spoiler-open { position: relative; }
.spoiler-hide { float: right; margin: -4px 0 8px 8px; }

.person-list, .pan-list { display: flex; flex-direction: column; gap: 10px; }
.person { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 14px 16px; align-items: center; }
@media (min-width: 760px) { .person { grid-template-columns: 1fr auto auto; } }
.person.inactive { opacity: .6; }
.person-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.person-main > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.person-name { font-weight: 700; }
.person-code code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .08em; background: var(--bg-2); padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.person-actions { display: flex; gap: 2px; justify-content: flex-end; flex-wrap: wrap; }
.role-checks { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; background: var(--bg-2); border-radius: var(--radius-sm); }
.role-checks small { font-weight: 400; }
.pan-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 14px; align-items: center; }
.pan-thumb { width: 64px; height: 64px; border-radius: 12px; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.pan-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pan-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pan-title { font-weight: 700; }
.pan-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.flag { display: inline-flex; gap: 4px; align-items: center; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.flag.ok { background: var(--green-soft); color: var(--green); }
.flag.no { background: var(--red-soft); color: var(--red); }

.publish-card { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.edition-admin-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.edition-admin { display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.edition-admin > div { flex: 1; }
.edition-admin:hover { background: var(--bg-2); }
.rows-editor { display: flex; flex-direction: column; gap: 8px; }
.row-edit { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-edit .input { flex: 1 1 120px; width: auto; }
.media-admin { display: flex; flex-direction: column; gap: 8px; }
.media-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.media-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--bg-2); display: grid; place-items: center; color: var(--muted); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-fields { display: flex; gap: 6px; flex-wrap: wrap; }
.media-fields .input { flex: 1 1 140px; }
.sticky-save { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; z-index: 4; }
.sticky-save .btn { box-shadow: var(--shadow-lg); }
.preview-box { border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 16px 20px; max-height: 480px; overflow: auto; }
.danger-zone { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }

/* ---------------------------------------------------------------- results */

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; margin: 8px 0 12px; }
.podium-step { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.podium-medal { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: #2B1B12; box-shadow: var(--shadow); }
.place-1 .podium-medal { background: #E9B95A; width: 66px; height: 66px; font-size: 1.9rem; }
.place-2 .podium-medal { background: #C9CDD3; }
.place-3 .podium-medal { background: #D49A6A; }
.podium-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(1rem, 2.4vw, 1.35rem); line-height: 1.15; overflow-wrap: anywhere; }
.podium-sub { font-size: .8rem; color: var(--muted); }
.podium-score { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--red); }
.podium-block { width: 100%; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, var(--gold-soft), var(--bg-2)); margin-top: 6px; }
.place-1 .podium-block { height: 120px; background: linear-gradient(180deg, #F1D18A, var(--gold-soft)); }
.place-2 .podium-block { height: 84px; }
.place-3 .podium-block { height: 60px; }
.cat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cat-card { border-top: 4px solid var(--c); }
.cat-head { display: flex; align-items: center; gap: 8px; color: var(--c); margin-bottom: 10px; }
.cat-head h3 { margin: 0; color: var(--ink); }
.cat-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: c; }
.cat-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; counter-increment: c; }
.cat-list li span { display: flex; flex-direction: column; line-height: 1.2; }
.cat-list li span::before { content: counter(c) '.'; font-size: .75rem; color: var(--muted); }
.cat-list li.first span { font-weight: 700; }
.cat-list li strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.award-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.award { display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.award-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--red); flex: none; }
.award-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.award-winner { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar-row { display: grid; grid-template-columns: minmax(90px, 40%) 1fr 46px; gap: 10px; align-items: center; font-size: .92rem; }
.hbar-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.hbar-label { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.facts { padding-left: 1.2em; margin: 0; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.heatmap { border-collapse: separate; border-spacing: 3px; font-size: .82rem; }
.heatmap th { font-weight: 600; text-align: left; padding: 4px 6px; white-space: nowrap; }
.heatmap thead th { height: 110px; vertical-align: bottom; }
.heatmap thead th span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; max-height: 110px; overflow: hidden; text-overflow: ellipsis; }
.heatmap td { width: 40px; min-width: 40px; height: 32px; text-align: center; color: #fff; font-weight: 700; border-radius: 6px; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.heatmap td.nil { color: var(--muted); background: var(--bg-2); text-shadow: none; }
.heatmap td.self { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .35) 0 3px, transparent 3px 7px); opacity: .7; }
.notes-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.notes-list q { display: block; font-style: italic; color: var(--ink); }

/* ---------------------------------------------------------------- modal & toast */

.modal-backdrop { position: fixed; inset: 0; background: rgba(30, 15, 5, .5); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: rise .2s ease-out; }
.modal-wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 8px; }
.modal-head h2 { margin: 0; font-size: 1.35rem; }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 460px); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 500; font-size: .93rem; animation: rise .2s ease-out; pointer-events: auto; }
.toast-ok .icon { color: #7FD6A6; }
.toast-error { background: var(--red); color: #fff; }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 28px 0; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 16px; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; font-size: .9rem; }
.footer-brand { display: flex; gap: 10px; align-items: center; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.footer-note { font-style: italic; }

/* ---------------------------------------------------------------- big screen */

body.screen-mode { background: #120C08; color: #F5EBDD; }
.screen { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(1200px 700px at 50% -20%, #3A2210, #120C08 70%); color: #F5EBDD; --c: #E9B95A; }
.screen .code-box { --c: #F07A8A; }
.screen .code-look { --c: #F2C46B; }
.screen .code-taste { --c: #7FD6A6; }
.screen .code-video { --c: #9DB6E8; }
.screen-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; gap: 16px; flex-wrap: wrap; }
.screen-brand { display: flex; align-items: center; gap: 10px; color: #F5EBDD; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.screen-brand small { font-family: var(--font-body); font-weight: 500; opacity: .6; font-size: .85rem; }
.screen-brand:hover { color: #fff; }
.screen-tools { display: flex; gap: 10px; align-items: center; }
.screen .icon-btn { color: #F5EBDD; }
.screen .icon-btn:hover { background: rgba(255, 255, 255, .1); border-color: transparent; }
.segmented.dark { background: rgba(255, 255, 255, .08); }
.segmented.dark button { color: rgba(245, 235, 221, .7); }
.segmented.dark button.on { background: #F5EBDD; color: #2B1B12; }
.screen-center { flex: 1; display: grid; place-items: center; text-align: center; padding: 24px; }
.screen-hero h1 { font-size: clamp(2.5rem, 7vw, 5.5rem); margin: 20px 0 6px; }
.screen-hero p { font-size: 1.4rem; opacity: .75; }
.screen-next { margin-top: 30px; font-size: clamp(1.3rem, 3vw, 2rem); font-family: var(--font-display); color: #E9B95A; }
.screen-url { margin-top: 18px; font-size: 1.2rem; opacity: .55; letter-spacing: .05em; }
.screen-live { flex: 1; display: grid; gap: 24px; padding: 12px 24px 32px; align-content: center; }
.screen-round { display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.screen-round-title { display: flex; align-items: center; gap: 18px; color: var(--c); }
.screen-round-title small { display: block; text-transform: uppercase; letter-spacing: .2em; font-weight: 700; font-size: 1rem; opacity: .8; text-align: left; }
.screen-round-title h1 { font-size: clamp(3rem, 8vw, 6rem); margin: 0; color: #fff; }
.screen-codes { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; max-width: 1400px; }
.screen-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3.6vw, 3rem); padding: 10px 24px; border-radius: 18px; background: rgba(255, 255, 255, .06); border: 2px solid color-mix(in srgb, var(--c) 60%, transparent); color: var(--c); }
.screen-progress { width: min(900px, 90vw); }
.screen-progress-bar { height: 22px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.screen-progress-bar div { height: 100%; background: var(--c); border-radius: inherit; transition: width .6s ease; }
.screen-progress-text { margin-top: 12px; font-size: clamp(1.2rem, 2.6vw, 1.8rem); }
.screen-progress-text strong { font-size: 1.4em; color: #fff; }
.screen-waiting { font-size: 1.2rem; opacity: .7; }

.reveal { flex: 1; display: flex; flex-direction: column; cursor: pointer; user-select: none; position: relative; overflow: hidden; }
.reveal-slide { flex: 1; display: grid; place-items: center; padding: 24px; text-align: center; }
.reveal-nav { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; opacity: .55; cursor: default; }
.reveal-nav:hover { opacity: 1; }
.slide-intro h1 { font-size: clamp(3rem, 9vw, 7rem); margin: 22px 0 8px; }
.slide-intro p { font-size: clamp(1.4rem, 3vw, 2.2rem); color: #E9B95A; font-family: var(--font-display); }
.slide-kicker { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(1rem, 2vw, 1.4rem); text-transform: uppercase; letter-spacing: .2em; color: #E9B95A; font-weight: 700; }
.slide-title { font-size: clamp(2.4rem, 6.5vw, 5.2rem); margin: 18px 0 30px; color: #fff; }
.slide-drum { font-size: 6rem; line-height: 1; color: rgba(255, 255, 255, .25); animation: pulse 1s infinite; font-family: var(--font-display); }
.slide-answer { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 7vw, 6rem); color: #E9B95A; line-height: 1.05; }
.slide-answer small, .sr-name small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .32em; color: rgba(245, 235, 221, .75); margin-top: 12px; letter-spacing: .02em; }
.slide-answer.big { font-size: clamp(3rem, 8.5vw, 7.5rem); }
.slide-sub { margin-top: 22px; font-size: clamp(1.2rem, 2.6vw, 2rem); color: rgba(245, 235, 221, .8); }
.pop { animation: pop .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { opacity: 0; transform: scale(.7) translateY(20px); } }
.slide-rank { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-direction: column-reverse; gap: 10px; width: min(900px, 92vw); text-align: left; }
.slide-rank li { display: grid; grid-template-columns: 54px 1fr auto; gap: 16px; align-items: center; background: rgba(255, 255, 255, .06); border-radius: 16px; padding: 12px 20px; font-size: clamp(1.1rem, 2.2vw, 1.6rem); }
.slide-rank .rank { width: 46px; height: 46px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.2rem; }
.sr-name { font-family: var(--font-display); font-weight: 700; }
.sr-name small { font-size: .6em; margin-top: 2px; display: inline; margin-left: 8px; }
.slide-medal { width: 140px; height: 140px; border-radius: 50%; margin: 26px auto; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 4.6rem; color: #2B1B12; box-shadow: 0 0 60px rgba(233, 185, 90, .35); }
.slide-podium.place-1 .slide-medal { background: #E9B95A; }
.slide-podium.place-2 .slide-medal { background: #C9CDD3; }
.slide-podium.place-3 .slide-medal { background: #D49A6A; }
.slide-scores { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.slide-scores span { background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 10px 18px; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.slide-scores small { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; opacity: .65; font-weight: 600; }
.slide-scores .tot { background: #E9B95A; color: #2B1B12; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: fall linear infinite; opacity: .9; }
@keyframes fall { to { top: 110%; transform: rotate(720deg) translateX(40px); } }

/* ---------------------------------------------------------------- print pages */

body.print-mode { background: #fff; color: #111; }
.print-page { padding: 16px; max-width: 1000px; margin: 0 auto; color: #111; }
.print-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0 16px; border-bottom: 1px solid #ddd; margin-bottom: 16px; }
.print-options { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.label-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; break-after: page; }
.label-card { border: 2px dashed #bbb; border-radius: 14px; padding: 16px; height: 86mm; display: flex; flex-direction: column; break-inside: avoid; --c: #A3192F; }
.label-card.code-look { --c: #B57A1F; }
.label-card.code-taste { --c: #2E6B4E; }
.label-top { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: .9rem; color: #555; text-transform: uppercase; letter-spacing: .08em; }
.label-code { flex: 1; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 120px; line-height: 1; color: var(--c); }
.label-code.long { font-size: 64px; }
.backstage h1 { margin-top: 10px; }
.secret-stamp { display: inline-block; border: 3px solid #A3192F; color: #A3192F; font-weight: 800; letter-spacing: .15em; padding: 6px 14px; transform: rotate(-2deg); border-radius: 6px; }
.print-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.print-table th, .print-table td { border: 1px solid #999; padding: 10px 12px; text-align: left; }
.print-table th { background: #f3f3f3; }
.print-table td.big { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.tick-box { width: 50px; }
.access-sheet { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.access-card { border: 1px dashed #bbb; border-radius: 14px; padding: 14px; break-inside: avoid; display: flex; flex-direction: column; gap: 10px; }
.access-head { display: flex; gap: 8px; align-items: center; }
.access-head strong { display: block; font-family: var(--font-display); }
.access-head small { color: #666; }
.access-body { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
.access-qr svg { width: 110px; height: 110px; display: block; }
.access-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin-bottom: 4px; }
.access-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; font-size: 1.25rem; letter-spacing: .1em; margin-top: 8px; }
.access-url { color: #555; font-size: .85rem; }

@media print {
  .no-print, .site-header, .site-footer, .toasts { display: none !important; }
  body, body.print-mode { background: #fff; }
  .print-page { padding: 0; max-width: none; }
  @page { size: A4; margin: 10mm; }
}

/* ---------------------------------------------------------------- small screens */

@media (max-width: 560px) {
  .page-head { padding: 26px 0 16px; }
  .hide-sm { display: none; }
  .table th, .table td { padding: 10px 8px; }
  .round-tabs { top: 56px; gap: 5px; }
  .round-tab { padding: 8px 2px; }
  .round-tab .rt-name { font-size: .8rem; }
  .pan-item { grid-template-columns: 48px 1fr; }
  .pan-item .person-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .pan-thumb { width: 48px; height: 48px; }
  .media-row { grid-template-columns: 48px 1fr; }
  .media-row .person-actions { grid-column: 1 / -1; }
  .media-thumb { width: 48px; height: 48px; }
  .mini-rank li { grid-template-columns: 28px 1fr 46px; }
  .mini-rank li .bar { display: none; }
  .podium-medal { width: 44px; height: 44px; font-size: 1.2rem; }
  .place-1 .podium-medal { width: 54px; height: 54px; }
  .countdown > div { min-width: 64px; padding: 8px 10px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
