:root {
  --bg: #0a1430;
  --bg2: #0f1d44;
  --panel: #14275e;
  --line: rgba(255, 255, 255, .12);
  --text: #f3f5fb;
  --muted: #9fb0d8;
  --gold: #f2c14e;
  --gold2: #ffd86b;
  --red: #e63946;
  --green: #3ddc97;
  --blue: #4ea8ff;
  --font-display: 'Black Han Sans', 'Noto Sans KR', 'Noto Color Emoji', sans-serif;
  --font: 'Noto Sans KR', 'Noto Color Emoji', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(242, 193, 78, .16), transparent 60%),
    radial-gradient(900px 500px at 100% 45%, rgba(78, 168, 255, .10), transparent 60%),
    radial-gradient(900px 500px at 0% 75%, rgba(230, 57, 70, .10), transparent 60%),
    var(--bg);
}
body.modal-open { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: var(--gold2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 16px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 20, 48, .78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; min-height: 58px; padding-block: 8px;
}
.brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brand-ko { font-family: var(--font-display); font-size: 24px; }
.brand-ko em { font-style: normal; color: var(--gold); }
.brand-en { font-size: 11px; letter-spacing: .2em; color: var(--muted); font-weight: 700; }
.top-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.countdown {
  display: flex; align-items: center; gap: 8px;
  background: rgba(242, 193, 78, .12);
  border: 1px solid rgba(242, 193, 78, .35);
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.countdown b { font-variant-numeric: tabular-nums; color: var(--gold2); }
.me-cc {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--line); font-size: 18px; cursor: help;
}
.me-cc[hidden] { display: none; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #1f2f66; color: var(--text); border: 1px solid rgba(255, 255, 255, .2);
  padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.update-bar {
  position: fixed; left: 50%; top: 70px; z-index: 80; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  background: var(--gold); color: #1a1300; font-weight: 900; font-size: 14px;
  padding: 8px 8px 8px 16px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.update-bar button { background: #1a1300; color: var(--gold2); font-weight: 900; border-radius: 999px; padding: 6px 12px; }

.ts-box {
  position: fixed; left: 50%; bottom: 20px; z-index: 75; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px);
  background: #1f2f66; border: 1px solid rgba(242, 193, 78, .5); border-radius: 16px;
  padding: 12px 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); text-align: center;
  /* 확인 위젯이 뒤에서 돌아갈 수 있게 display:none 대신 숨김 처리 */
  visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.ts-box.show { visibility: visible; opacity: 1; pointer-events: auto; }
.ts-box p { font-size: 13px; font-weight: 800; color: var(--gold2); margin-bottom: 8px; }

/* ---------- race ---------- */
.race { padding-top: 22px; }
.race-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.race-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 4.4vw, 40px); line-height: 1.1; }
.race-title b { color: var(--gold); font-weight: 400; font-variant-numeric: tabular-nums; }
.race-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.season-tag {
  display: inline-block; margin-bottom: 8px;
  font-size: 12px; font-weight: 900; letter-spacing: .18em;
  color: var(--bg); background: var(--gold); border-radius: 6px; padding: 3px 9px;
}
.dday {
  display: flex; flex-direction: column; align-items: flex-end; text-align: right;
  background: linear-gradient(160deg, rgba(242, 193, 78, .16), rgba(255, 255, 255, .03));
  border: 1px solid rgba(242, 193, 78, .4); border-radius: 16px; padding: 10px 16px;
}
.dday-label { font-size: 12px; font-weight: 800; color: var(--muted); }
.dday-num {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 5vw, 48px);
  line-height: 1.05; color: var(--gold2); font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.dday-sub { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.dday.is-day .dday-num { color: var(--red); }

.track {
  position: relative; height: 200px;
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #c8553d, #b44a33);
  box-shadow: inset 0 -20px 40px rgba(0, 0, 0, .25), 0 20px 50px rgba(0, 0, 0, .35);
}
.track::before {
  content: ""; position: absolute; inset: 36px 0 0 0;
  background: repeating-linear-gradient(180deg, transparent 0 40px, rgba(255, 255, 255, .5) 40px 42px);
}
.crowd {
  position: absolute; inset: 0 0 auto 0; height: 36px;
  background:
    radial-gradient(circle at 6px 9px, #ffd86b 3px, transparent 4px) 0 0 / 18px 18px,
    radial-gradient(circle at 12px 14px, #4ea8ff 3px, transparent 4px) 4px 2px / 22px 18px,
    radial-gradient(circle at 8px 10px, #e63946 3px, transparent 4px) 9px 6px / 26px 18px,
    linear-gradient(#1a2c5c, #22386e);
  border-bottom: 3px solid #fff;
  animation: crowd 1.2s steps(2) infinite;
}
@keyframes crowd { 50% { background-position: 0 -2px, 4px 0, 9px 4px, 0 0; } }
.marks { position: absolute; inset: 36px 0 0 0; }
.mark { position: absolute; top: 0; bottom: 0; border-left: 2px dashed rgba(255, 255, 255, .22); }
.mark span { position: absolute; top: 4px; left: 4px; font-size: 11px; font-weight: 900; color: rgba(255, 255, 255, .8); }
.mark.start { border-left: 4px solid #fff; }
.finish-line {
  position: absolute; top: 36px; bottom: 0; left: 90%; width: 14px;
  background: conic-gradient(#fff 25%, #111 0 50%, #fff 0 75%, #111 0) 0 0 / 14px 14px;
}
.goal {
  position: absolute; right: 1%; bottom: 0; width: 8.5%; min-width: 64px;
  display: flex; flex-direction: column; align-items: center; z-index: 2;
}
.goal-flag {
  font-size: 11px; font-weight: 900; letter-spacing: .08em;
  background: #fff; color: var(--bg); border-radius: 4px; padding: 1px 6px; margin-bottom: 4px;
  white-space: nowrap;
}
.medal { width: 62px; filter: drop-shadow(0 0 calc(6px + var(--near, 0) * 18px) rgba(255, 216, 107, .9)); animation: medal 2.4s ease-in-out infinite; }
@keyframes medal { 50% { transform: translateY(-4px) rotate(-4deg); } }
.podium {
  width: 64px; height: 34px; margin-top: 2px;
  display: grid; place-items: center;
  background: linear-gradient(#ffffff, #cdd5e8); color: var(--bg);
  font-family: var(--font-display); font-size: 20px;
  border-radius: 6px 6px 0 0;
}

.runner {
  position: absolute; bottom: 8px; left: 4%; width: 104px;
  transform: translateX(-45%);
  transition: left 1.8s cubic-bezier(.25, .8, .3, 1);
  z-index: 3;
}
.runner::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 2px; height: 8px;
  border-radius: 50%; background: rgba(0, 0, 0, .28); z-index: -1;
}
.runner-tag {
  position: absolute; left: 50%; top: -6px; transform: translateX(-50%);
  background: var(--gold); color: #1a1300; font-weight: 900; font-size: 12px;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.runner-tag::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; margin-left: -4px;
  border: 4px solid transparent; border-bottom: 0; border-top-color: var(--gold);
}
.runner-svg { display: block; width: 100%; overflow: visible; }
.runner-svg * { transform-box: view-box; }
.r-body { transform-origin: 58px 98px; animation: bob .15s ease-in-out infinite alternate; }
.r-leg { transform-origin: 58px 98px; animation: leg .3s ease-in-out infinite alternate; }
.r-shin { transform-origin: 58px 119px; animation: shin .3s ease-in-out infinite alternate; }
.r-arm { transform-origin: 60px 60px; animation: arm .3s ease-in-out infinite alternate; }
.r-leg-back, .r-leg-back .r-shin, .r-arm-back { animation-direction: alternate-reverse; }
.r-tie { transform-origin: 62px 57px; animation: flap .12s ease-in-out infinite alternate; }
.r-hair-flap { transform-origin: 52px 27px; animation: flap .12s ease-in-out infinite alternate-reverse; }
@keyframes bob { from { transform: translateY(0) rotate(7deg); } to { transform: translateY(-4px) rotate(7deg); } }
@keyframes leg { from { transform: rotate(-40deg); } to { transform: rotate(34deg); } }
@keyframes shin { from { transform: rotate(14deg); } to { transform: rotate(82deg); } }
@keyframes arm { from { transform: rotate(45deg); } to { transform: rotate(-50deg); } }
@keyframes flap { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
.runner.sprint .r-body { animation-duration: .07s; }
.runner.sprint .r-leg, .runner.sprint .r-shin, .runner.sprint .r-arm { animation-duration: .14s; }

.dust { position: absolute; left: 0; bottom: 4px; width: 40px; height: 20px; }
.dust i {
  position: absolute; bottom: 0; left: 20px; width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255, 230, 210, .55); animation: dust .6s linear infinite;
}
.dust i:nth-child(2) { animation-delay: -.2s; }
.dust i:nth-child(3) { animation-delay: -.4s; }
@keyframes dust {
  from { transform: translate(0, 0) scale(.5); opacity: .9; }
  to { transform: translate(-36px, -10px) scale(1.4); opacity: 0; }
}
.gain {
  position: absolute; bottom: 120px; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 26px; color: var(--gold2);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .4); pointer-events: none; z-index: 4;
  animation: gain 1.6s ease-out forwards;
}
@keyframes gain { from { opacity: 0; transform: translate(-50%, 10px); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -40px); } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.stat {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
}
.stat .k { font-size: 12px; color: var(--muted); font-weight: 700; }
.stat .v { font-family: var(--font-display); font-size: 28px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 15px; color: var(--muted); margin-left: 2px; }
.v.pos { color: var(--green); }
.v.neg { color: #ff8a92; }

.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.shelf-card { border: 1px dashed rgba(255, 255, 255, .18); border-radius: 14px; padding: 12px 14px; }
.shelf-title { font-weight: 900; font-size: 14px; }
.shelf-title span { font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 6px; }
.trophies { list-style: none; padding: 0; display: grid; gap: 6px; margin-top: 8px; }
.trophies li { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.trophies .ti { font-size: 22px; }
.trophies b { display: block; font-size: 14px; }
.trophies .tn { color: var(--muted); font-size: 12px; }
.nominators { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nom { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .06); border-radius: 999px; padding: 4px 10px 4px 6px; font-size: 12px; font-weight: 700; }
.nom .fl { font-size: 18px; }

/* ---------- arena ---------- */
.arena { padding-top: 44px; }
.section-head { text-align: center; }
.section-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 3.4vw, 30px); }
.section-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

.ring { position: relative; width: 100%; height: 880px; margin-top: 8px; }
.spokes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.spokes line { stroke: rgba(255, 255, 255, .16); stroke-width: 1.5; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.spokes line.clear { stroke: var(--gold); stroke-dasharray: none; stroke-width: 2.5; }
.spokes line.hot { stroke: var(--gold2); stroke-width: 2.5; stroke-dasharray: none; }
.spokes .orbit {
  fill: none; stroke: rgba(242, 193, 78, .3); stroke-width: 1.5; stroke-dasharray: 2 9;
  vector-effect: non-scaling-stroke; animation: orbit 40s linear infinite;
}
@keyframes orbit { to { stroke-dashoffset: -600; } }

.face {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 320px; text-align: center; z-index: 1;
}
.face-halo {
  position: absolute; left: 50%; top: 150px; width: 420px; height: 420px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 193, 78, .32), transparent 62%);
  animation: halo 3.2s ease-in-out infinite;
}
@keyframes halo { 50% { transform: translate(-50%, -50%) scale(1.08); opacity: .75; } }
.face-art {
  position: relative; width: 300px; height: 300px; margin: 0 auto;
  border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #2f55b0, #13245a 72%);
  border: 6px solid var(--gold);
  box-shadow: 0 0 0 8px rgba(242, 193, 78, .14), 0 24px 60px rgba(0, 0, 0, .5);
}
.face-svg, .face-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.face.has-photo .face-svg { display: none; }
.face-mouth { transform-box: view-box; transform-origin: 150px 189px; animation: pout 2.6s ease-in-out infinite; }
@keyframes pout { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.25, .8); } 90% { transform: scale(.9, 1.15); } }
.face-caption { position: relative; margin-top: 14px; font-weight: 800; color: var(--muted); }
.face-caption b { font-family: var(--font-display); font-weight: 400; color: var(--gold2); font-size: 26px; margin-left: 4px; }
.face-sub { position: relative; font-size: 12px; color: var(--muted); margin-top: 2px; }

.node {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  width: 180px; text-align: left; padding: 12px;
  background: linear-gradient(180deg, rgba(26, 48, 112, .96), rgba(15, 29, 68, .96));
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  z-index: 2;
}
.node:hover, .node:focus-visible {
  transform: translate(-50%, -50%) scale(1.06);
  border-color: var(--gold); box-shadow: 0 14px 40px rgba(242, 193, 78, .25);
  outline: none; z-index: 5;
}
.node.is-clear {
  border-color: rgba(242, 193, 78, .7);
  background: linear-gradient(180deg, rgba(74, 58, 14, .97), rgba(36, 28, 8, .97));
}
.n-top { display: flex; align-items: center; justify-content: space-between; }
.n-icons { font-size: 22px; letter-spacing: 2px; line-height: 1; }
.n-ringwrap { position: relative; width: 42px; height: 42px; }
.n-ring { width: 42px; height: 42px; transform: rotate(-90deg); }
.n-ring circle { fill: none; stroke-width: 5; }
.n-ring .bg { stroke: rgba(255, 255, 255, .12); }
.n-ring .fg { stroke: var(--green); stroke-linecap: round; transition: stroke-dasharray .8s; }
.is-clear .n-ring .fg { stroke: var(--gold); }
.n-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.n-title { display: block; font-weight: 900; font-size: 15px; line-height: 1.3; margin: 8px 0 6px; }
.n-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 700; }
.effort.pos { color: var(--green); }
.effort.neg { color: #ff8a92; }
.n-bar { display: block; height: 5px; margin-top: 6px; border-radius: 9px; overflow: hidden; background: rgba(230, 57, 70, .45); }
.n-bar i { display: block; height: 100%; background: var(--blue); }
.n-diff { font-size: 10px; color: var(--gold); letter-spacing: 1px; }

/* ---------- stamp ---------- */
.stamp {
  font-family: var(--font-display); font-weight: 400; color: var(--red);
  border: 3px solid currentColor; border-radius: 8px;
  padding: 3px 8px; line-height: 1.05; text-align: center; letter-spacing: .04em;
  transform: rotate(-14deg);
  box-shadow: inset 0 0 0 2px rgba(230, 57, 70, .3);
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 2.1'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 2.1'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.stamp-sm {
  position: absolute; right: -12px; top: -16px; font-size: 13px;
  background: rgba(255, 250, 240, .95);
}
.stamp small { display: block; font-family: var(--font); font-weight: 900; font-size: .55em; letter-spacing: 0; margin-top: 2px; }

.stamp-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; pointer-events: none;
  background: rgba(5, 10, 25, .6);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.stamp-overlay.show { opacity: 1; visibility: visible; }
.stamp-box { position: relative; display: grid; place-items: center; }
.big-stamp {
  font-size: clamp(42px, 10vw, 96px);
  padding: 14px 30px; border-width: 8px; border-radius: 18px;
  background: rgba(255, 250, 240, .97);
  animation: stampIn .5s cubic-bezier(.2, .9, .3, 1.25) both;
}
.big-stamp small { font-size: .26em; margin-top: 8px; }
@keyframes stampIn {
  0% { transform: rotate(-14deg) scale(3.4); opacity: 0; }
  55% { transform: rotate(-14deg) scale(.9); opacity: 1; }
  75% { transform: rotate(-14deg) scale(1.05); }
  100% { transform: rotate(-14deg) scale(1); }
}
.boom {
  position: absolute; top: -70px; right: -40px;
  font-family: var(--font-display); font-size: clamp(32px, 7vw, 64px);
  color: var(--gold2); text-shadow: 3px 3px 0 var(--red), -2px -2px 0 #000;
  transform: rotate(12deg);
  animation: boom .5s .32s cubic-bezier(.2, .9, .3, 1.4) both;
}
@keyframes boom { from { opacity: 0; transform: rotate(12deg) scale(.2); } to { opacity: 1; transform: rotate(12deg) scale(1); } }
.page.shake { animation: shake .45s .3s; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 5px); }
  40% { transform: translate(7px, -6px); }
  60% { transform: translate(-5px, 3px); }
  80% { transform: translate(3px, -2px); }
}
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 61; overflow: hidden; }
.confetti i {
  position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--rot)); } }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 16px;
  background: rgba(3, 8, 22, .72); backdrop-filter: blur(4px);
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative; width: min(760px, 100%); max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, #16295f, #0d1a40);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: pop .22s ease-out;
}
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal-body { overflow: auto; padding: 22px; overscroll-behavior: contain; }
.m-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  background: #24397a; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); font-size: 16px;
}
.m-close:hover { background: #31499a; }
.m-head { display: flex; gap: 14px; align-items: center; padding-right: 44px; }
.m-icons { font-size: 40px; line-height: 1; }
.m-head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 4vw, 30px); line-height: 1.15; }
.m-head p { color: var(--muted); font-size: 13px; margin-top: 4px; font-weight: 700; }
.m-head .stamp { position: static; margin-left: auto; font-size: 15px; flex: none; background: rgba(255, 250, 240, .95); }
.m-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 8px; }
.m-score { background: rgba(255, 255, 255, .05); border-radius: 14px; padding: 12px; }
.m-score .k { font-size: 12px; color: var(--muted); font-weight: 700; }
.m-score .v { font-family: var(--font-display); font-size: 26px; }
.pbar { height: 10px; border-radius: 9px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 6px; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #9af5c9); border-radius: 9px; transition: width .6s; }
.m-desc { color: #d5ddf3; line-height: 1.65; margin: 10px 0 4px; }
.m-h3 { font-size: 15px; font-weight: 900; margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; }
.m-h3 .hint { font-size: 12px; font-weight: 500; color: var(--muted); }

.steps { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.steps li {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .06); border-radius: 10px;
  padding: 6px 10px; font-size: 13px; font-weight: 700;
}
.steps li.lock { opacity: .55; }
.steps li .note { font-weight: 500; color: var(--muted); font-size: 11px; }
.steps .arrow { color: var(--muted); font-size: 12px; background: none; padding: 0; }

.tl { list-style: none; padding: 0; }
.tl li {
  display: grid; grid-template-columns: 78px 1fr auto; gap: 10px; align-items: start;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.tl li:last-child { border-bottom: 0; }
.tl .d { font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 2px; }
.tl .t { font-size: 14px; line-height: 1.5; }
.tl .src { font-size: 11px; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.tl .src:hover { color: var(--gold2); }
.tl li.soon { background: rgba(78, 168, 255, .07); border-radius: 10px; padding-inline: 8px; }
.pts { font-weight: 900; font-size: 13px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pts.pos { background: rgba(61, 220, 151, .15); color: var(--green); }
.pts.neg { background: rgba(230, 57, 70, .18); color: #ff8a92; }
.pts.zero { background: rgba(255, 255, 255, .08); color: var(--muted); }
.pts.soon { background: rgba(78, 168, 255, .18); color: var(--blue); }
.tag {
  display: inline-block; font-size: 11px; font-weight: 800;
  padding: 1px 7px; border-radius: 6px; margin-left: 4px; vertical-align: 1px;
  background: rgba(242, 193, 78, .15); color: var(--gold2);
}

.vote-q { font-size: 14px; color: #d5ddf3; margin-bottom: 10px; }
.vote-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vbtn {
  padding: 14px; border-radius: 14px; font-weight: 900; font-size: 16px;
  background: rgba(255, 255, 255, .06); border: 2px solid transparent;
  transition: transform .1s, background .2s;
}
.vbtn:active { transform: scale(.97); }
.vbtn.yes { border-color: rgba(78, 168, 255, .55); }
.vbtn.no { border-color: rgba(230, 57, 70, .55); }
.vbtn.yes.on { background: var(--blue); color: #06142e; }
.vbtn.no.on { background: var(--red); }
.vbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin: 12px 0 4px; background: rgba(255, 255, 255, .1); }
.vbar .y { background: var(--blue); transition: width .6s; }
.vbar .n { background: var(--red); transition: width .6s; }
.vlegend { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--muted); }
.vlegend .yy { color: var(--blue); }
.vlegend .nn { color: #ff8a92; }
.cbreak { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; margin-top: 12px; }
.crow { display: grid; grid-template-columns: 26px minmax(56px, 92px) 1fr 38px; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; color: #d5ddf3; }
.crow .cn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow .bar.empty, .n-bar.empty { background: rgba(255, 255, 255, .1); }
.vote-empty { margin: 12px 0 4px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); text-align: center; font-size: 14px; font-weight: 700; color: var(--muted); }
.poll-closed { margin-top: 12px; font-size: 14px; font-weight: 800; color: var(--gold2); }
.hint-k { font-weight: 700; color: var(--muted); margin-left: 4px; }
.crow .fl { font-size: 17px; }
.crow .bar { height: 6px; border-radius: 9px; overflow: hidden; background: rgba(230, 57, 70, .45); }
.crow .bar i { display: block; height: 100%; background: var(--blue); }
.crow .p { text-align: right; font-variant-numeric: tabular-nums; }
.crow.me { color: var(--gold2); }
.crow.no-c { color: var(--gold2); }
.demo-note { font-size: 11px; color: var(--muted); margin-top: 8px; }
.demo-badge { font-size: 10px; font-weight: 900; color: var(--bg); background: var(--muted); border-radius: 4px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; }

.reacts { display: flex; gap: 8px; flex-wrap: wrap; }
.rbtn {
  display: flex; gap: 6px; align-items: center;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line);
  font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums;
  transition: transform .1s;
}
.rbtn .e { font-size: 18px; }
.rbtn.on { border-color: var(--gold); background: rgba(242, 193, 78, .18); }
.rbtn:active { transform: scale(.92); }

.cform { display: flex; gap: 8px; margin: 10px 0; }
.cform input {
  flex: 1; min-width: 0; padding: 11px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  color: var(--text); font: inherit; font-size: 14px;
}
.cform input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.cform button { background: var(--gold); color: #1a1300; font-weight: 900; border-radius: 12px; padding: 0 16px; }
.clist { list-style: none; padding: 0; display: grid; gap: 6px; }
.clist li { background: rgba(255, 255, 255, .05); border-radius: 10px; padding: 8px 10px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.clist .who { font-size: 12px; color: var(--muted); font-weight: 700; margin-right: 6px; }

.admin { display: none; margin-top: 22px; border: 1px dashed rgba(242, 193, 78, .55); border-radius: 14px; padding: 12px 14px; }
body.demo .admin { display: block; }
.admin-title { font-size: 13px; font-weight: 900; color: var(--gold2); }
.admin p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.admin .btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.abtn { padding: 9px 13px; border-radius: 10px; background: rgba(255, 255, 255, .1); font-weight: 800; font-size: 13px; }
.abtn:hover { background: rgba(255, 255, 255, .18); }
.abtn.red { background: var(--red); }
.abtn.red:hover { background: #ff4d5a; }

/* ---------- poll ---------- */
.poll { padding-top: 40px; }
.poll-card {
  border-radius: 20px; padding: 22px;
  background: linear-gradient(135deg, rgba(242, 193, 78, .14), rgba(78, 168, 255, .08));
  border: 1px solid rgba(242, 193, 78, .3);
}
.poll-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(230, 57, 70, .7); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(230, 57, 70, 0); } 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); } }
.poll-q { font-size: clamp(18px, 2.6vw, 22px); font-weight: 900; margin: 6px 0 14px; }
.poll-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- feed ---------- */
.feed { padding-top: 40px; }
.feed-list { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 8px; }
.feed-item {
  display: grid; grid-template-columns: 84px auto 1fr auto; gap: 12px; align-items: center;
  width: 100%; text-align: left;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  transition: background .15s;
}
.feed-item:hover { background: rgba(255, 255, 255, .08); }
.feed-item .d { font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.feed-item .chip { font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, .08); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.feed-item .t { font-size: 14px; line-height: 1.45; }
.more-btn { display: block; margin: 12px auto 0; padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-weight: 800; font-size: 14px; }
.more-btn[hidden] { display: none; }

/* ---------- layout + sponsor slots ---------- */
.rail { display: none; }
.ad-slot { position: relative; }
.ad-empty {
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  border: 2px dashed rgba(242, 193, 78, .35); border-radius: 14px;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .015) 0 12px, rgba(255, 255, 255, .045) 12px 24px);
  transition: border-color .2s;
}
.ad-empty:hover, .ad-empty:focus-visible { border-color: var(--gold); outline: none; }
.sp-word {
  font-family: var(--font-display); font-weight: 400; font-size: 22px; letter-spacing: .2em;
  color: rgba(255, 216, 107, .55); transition: color .2s;
}
.ad-empty:hover .sp-word, .ad-empty:focus-visible .sp-word { color: var(--gold2); }
.ad-label {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  font-size: 10px; font-weight: 900; letter-spacing: .1em;
  color: var(--bg); background: var(--muted); border-radius: 4px; padding: 1px 5px;
}
.ad-sold { display: block; border-radius: 12px; overflow: hidden; }
.ad-sold img { display: block; width: 100%; height: auto; }
.rail-stack { display: grid; gap: 10px; }
.rail .ad-empty { width: 200px; height: 200px; }
.rail .ad-sold { width: 200px; }

.ad-inline { margin-top: 24px; }
.ad-inline .ad-empty { height: 100px; max-width: 728px; margin: 0 auto; }
.ad-inline .ad-sold { max-width: 728px; margin: 0 auto; }

@media (min-width: 1360px) {
  .layout {
    display: grid; grid-template-columns: 200px minmax(0, 1fr) 200px; gap: 16px;
    max-width: 1600px; margin: 0 auto; padding: 0 16px;
  }
  /* 양옆 스폰서: 화면 아래쪽에 고정 (본문 끝에 닿으면 함께 멈춤) */
  .rail { display: flex; flex-direction: column; justify-content: flex-end; }
  .rail-stack { position: sticky; bottom: 16px; padding-top: 22px; }
  .ad-inline { display: none; }
}

/* ---------- ads info ---------- */
.ads-info { padding-top: 48px; }
.ads-card {
  border-radius: 20px; padding: 24px;
  background: linear-gradient(160deg, rgba(242, 193, 78, .12), rgba(255, 255, 255, .03) 55%);
  border: 1px solid rgba(242, 193, 78, .3);
}
.ad-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.ad-product { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.ad-product b { display: block; font-size: 15px; }
.ad-product .w { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; word-break: keep-all; }
.ad-product .s { font-size: 11px; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.ad-product .p { font-family: var(--font-display); color: var(--gold2); font-size: 18px; margin-top: 8px; }
.ads-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ads-box { background: rgba(0, 0, 0, .15); border-radius: 14px; padding: 14px 16px; }
.ads-box h3 { font-size: 14px; font-weight: 900; margin-bottom: 10px; }
.ads-note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.ads-reject { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.ads-reject li::before { content: "✕"; color: #ff8a92; font-weight: 900; margin-right: 8px; }
.mail-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: #1a1300; font-weight: 900; font-size: 15px;
  border-radius: 12px; padding: 12px 18px; text-decoration: none;
}
.mail-pending { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; }
.mail-pending span { font-size: 22px; }

.appeals { list-style: none; padding: 0; display: grid; gap: 8px; margin-top: 8px; }
.appeals li { font-size: 13px; line-height: 1.5; }
.appeals .d { display: inline-block; font-size: 11px; font-weight: 800; color: var(--gold2); margin-right: 6px; font-variant-numeric: tabular-nums; }
.appeals a { font-size: 11px; color: var(--muted); margin-left: 4px; white-space: nowrap; }

.m-why { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 10px; font-size: 13px; color: #d5ddf3; }
.m-why .meter { font-weight: 800; white-space: nowrap; }
.m-why .meter i { font-style: normal; letter-spacing: 1px; }
.m-why .meter .off { opacity: .22; }
.n-heat { font-size: 11px; color: var(--muted); font-weight: 700; margin-top: 4px; display: block; }

/* ---------- footer ---------- */
.foot { padding-top: 46px; padding-bottom: 40px; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }
.demo-row[hidden] { display: none; }
.demo-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.demo-reset { display: none; }
body.demo .demo-reset { display: inline-block; }
.demo-toggle { padding: 8px 14px; border-radius: 999px; border: 1px dashed rgba(255, 255, 255, .25); font-size: 12px; font-weight: 800; color: var(--muted); }
body.demo .demo-toggle { border-color: var(--gold); color: var(--gold2); }

.win-banner {
  position: absolute; inset: 36px 0 0 0; display: grid; place-items: center; z-index: 5;
  font-family: var(--font-display); font-size: clamp(24px, 5vw, 44px); color: var(--gold2);
  text-shadow: 0 3px 0 #000; background: rgba(0, 0, 0, .35);
  animation: pop .4s ease-out;
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .node { width: 160px; padding: 10px; }
  .n-title { font-size: 14px; }
  .ring { height: 820px; }
}
@media (max-width: 880px) {
  .ring {
    height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px;
  }
  .spokes { display: none; }
  .face { position: relative; left: auto; top: auto; transform: none; grid-column: 1 / -1; width: auto; margin: 10px 0 18px; }
  .face-halo { width: 320px; height: 320px; top: 120px; }
  .face-art { width: 240px; height: 240px; }
  .node { position: relative; left: auto; top: auto; transform: none; width: auto; }
  .node:hover, .node:focus-visible { transform: scale(1.02); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .shelf { grid-template-columns: 1fr; }
  .ad-products { grid-template-columns: 1fr 1fr; }
  .ads-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .brand-ko { font-size: 20px; }
  .brand-en { display: none; }
  .race-head { align-items: stretch; }
  .race-head > div:first-child { width: 100%; }
  .dday { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 10px; text-align: left; }
  .dday-sub { width: 100%; }
  .countdown { font-size: 12px; padding: 5px 10px; }
  .track { height: 160px; }
  .runner { width: 78px; }
  .runner-tag { font-size: 11px; top: -10px; }
  .medal { width: 44px; }
  .podium { width: 46px; height: 26px; font-size: 16px; }
  .goal { min-width: 48px; right: 0; }
  .goal-flag { font-size: 9px; padding: 1px 4px; }
  .mark span { font-size: 9px; }
  .mark:nth-child(even) span { display: none; }
  .stat .v { font-size: 22px; }
  .face-art { width: 200px; height: 200px; }
  .face-halo { width: 280px; height: 280px; top: 100px; }
  .modal { padding: 0; }
  .modal-card { max-height: 100vh; height: 100%; border-radius: 0; }
  .modal-body { padding: 18px 16px; }
  .m-icons { font-size: 32px; }
  .m-scores { grid-template-columns: 1fr 1fr; }
  .cbreak { grid-template-columns: 1fr; }
  .tl li { grid-template-columns: 1fr auto; }
  .tl .d { grid-column: 1 / -1; padding: 0; }
  .feed-item { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .feed-item .d { grid-column: 1; }
  .feed-item .chip { grid-column: 2; grid-row: 1; justify-self: end; }
  .feed-item .t { grid-column: 1; }
  .feed-item .pts { grid-column: 2; grid-row: 2; justify-self: end; }
  .ads-card { padding: 18px 16px; }
  .ad-products { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ring { gap: 8px; }
  .node { padding: 10px; border-radius: 14px; }
  .n-icons { font-size: 18px; letter-spacing: 1px; }
  .n-ringwrap, .n-ring { width: 36px; height: 36px; }
  .n-pct { font-size: 10px; }
  .n-title { font-size: 13px; margin: 6px 0 4px; }
  .n-meta { font-size: 11px; }
  .stamp-sm { right: -6px; top: -12px; font-size: 11px; }
}
@media (max-width: 330px) {
  .ring { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
