/* ============================================================
   Eurovision 2026 — feuille de style
   ============================================================ */
:root {
  --bg: #0a0818;
  --ink: #f3effb;
  --muted: #a99fc7;
  --faint: #6f6791;
  --card: rgba(255, 255, 255, 0.045);
  --card-hi: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.10);
  --magenta: #ff2e7e;
  --pink: #ff6fb5;
  --blue: #00d4ff;
  --purple: #b14bff;
  --gold: #ffd24a;
  --grad: linear-gradient(135deg, #ff2e7e 0%, #b14bff 52%, #00d4ff 100%);
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.9);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ─── Fond aurora ─────────────────────────────────────────── */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5;
}
.aurora span:nth-child(1) { width: 60vw; height: 60vw; background: #ff2e7e; top: -18vw; left: -12vw; animation: drift 22s ease-in-out infinite; }
.aurora span:nth-child(2) { width: 55vw; height: 55vw; background: #00d4ff; bottom: -16vw; right: -14vw; animation: drift 26s ease-in-out infinite reverse; }
.aurora span:nth-child(3) { width: 48vw; height: 48vw; background: #b14bff; top: 32vh; left: 28vw; opacity: 0.32; animation: drift 30s ease-in-out infinite; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 5vh) scale(1.12); }
}

/* ─── Écrans ──────────────────────────────────────────────── */
.screen { min-height: 100dvh; }
[hidden] { display: none !important; }

/* ════════════════ LOGIN ════════════════ */
#screen-login {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 22px; min-height: 100dvh;
}
.login { width: 100%; max-width: 420px; min-width: 0; }

.brand { text-align: center; margin-bottom: 30px; }
.heart {
  width: 56px; height: 56px;
  filter: drop-shadow(0 5px 18px rgba(239, 51, 64, 0.5));
  animation: beat 2.6s ease-in-out infinite;
}
.heart-big { width: 76px; height: 76px; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  8% { transform: scale(1.16); }
  16% { transform: scale(1); }
  24% { transform: scale(1.10); }
}
.brand-title {
  margin-top: 14px;
  font-size: clamp(2rem, 9.5vw, 2.7rem); font-weight: 800; letter-spacing: 0.04em;
  white-space: nowrap; color: #fff;
}
.brand-sub { color: var(--muted); font-size: 0.74rem; letter-spacing: 0.36em; text-transform: uppercase; margin-top: 2px; }
.brand-tag { margin-top: 13px; font-size: 0.98rem; font-weight: 700; color: var(--pink); }
.brand-host { margin-top: 3px; color: var(--faint); font-size: 0.8rem; }
.login-tagline { text-align: center; color: var(--muted); margin: 0 0 22px; font-size: 0.95rem; }

/* sélecteur de profil */
.user-picker { display: flex; flex-direction: column; gap: 12px; }
.user-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px 16px; transition: transform 0.14s, border-color 0.14s, background 0.14s;
}
.user-card:active { transform: scale(0.97); }
.user-card:hover { background: var(--card-hi); }
.user-emoji {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.7rem; flex: none;
  background: rgba(255, 255, 255, 0.06);
}
.user-card .uc-name { font-weight: 700; font-size: 1.1rem; }
.user-card .uc-go { margin-left: auto; color: var(--faint); font-size: 1.4rem; }

/* pavé PIN */
.pin-pad { text-align: center; }
.pin-back { color: var(--muted); font-size: 0.9rem; padding: 6px 4px; margin-bottom: 8px; }
.pin-who {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.15rem; margin-bottom: 20px;
}
.pin-who .user-emoji { width: 40px; height: 40px; font-size: 1.3rem; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin-bottom: 8px; }
.pin-dots i {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--line); transition: all 0.16s;
}
.pin-dots i.on { background: var(--grad); border-color: transparent; transform: scale(1.18); }
.pin-error { min-height: 22px; color: #ff6f8f; font-size: 0.86rem; font-weight: 600; margin-bottom: 8px; }
.pin-pad.shake { animation: shake 0.42s; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  30%, 70% { transform: translateX(6px); }
  50% { transform: translateX(-9px); }
}
.pin-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  max-width: 290px; margin: 6px auto 0;
}
.pin-key {
  aspect-ratio: 1.5; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 1.5rem; font-weight: 700;
  transition: transform 0.1s, background 0.1s;
}
.pin-key:active { transform: scale(0.92); background: var(--card-hi); }
.pin-key.ghost { background: none; border: none; }
.pin-key.act { font-size: 1.1rem; color: var(--muted); }

.credit { margin-top: 30px; color: var(--faint); font-size: 0.74rem; letter-spacing: 0.04em; }

/* ════════════════ APP ════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
  background: rgba(10, 8, 24, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 9px; }
.heart-sm { width: 27px; height: 27px; animation: none; filter: drop-shadow(0 2px 7px rgba(239, 51, 64, 0.5)); }
.logo-txt { display: flex; flex-direction: column; line-height: 1.04; }
.logo-txt b { font-size: 0.96rem; font-weight: 800; letter-spacing: 0.01em; }
.logo-txt small { font-size: 0.54rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.me-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px 5px 5px; font-weight: 700; font-size: 0.92rem;
}
.me-chip .mc-emoji {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.05rem; background: rgba(255, 255, 255, 0.07);
}

.tab { max-width: 640px; margin: 0 auto; padding: 0 14px 110px; }

/* barre live "qui passe / qui suit" */
.livebar-wrap {
  position: sticky; top: 53px; z-index: 20;
  background: rgba(10, 8, 24, 0.94); backdrop-filter: blur(12px);
  padding: 10px 0 11px; margin: 0 -2px;
}
.livebar {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 11px 13px 12px;
}
.livebar.is-live { border-color: rgba(255, 46, 126, 0.45); background: rgba(255, 46, 126, 0.06); }
.lb-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.71rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
}
.lb-live { display: flex; align-items: center; gap: 6px; color: var(--magenta); }
.lb-live.off { color: var(--faint); }
.lb-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lb-live:not(.off) .lb-dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 46, 126, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(255, 46, 126, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 46, 126, 0); }
}
.lb-count { color: var(--gold); letter-spacing: 0.04em; }
.lb-main { display: flex; align-items: center; gap: 10px; margin: 9px 0 5px; }
.lb-nav {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  background: var(--card-hi); border: 1px solid var(--line);
  font-size: 1.05rem; color: var(--ink); display: grid; place-items: center;
}
.lb-nav:active { transform: scale(0.9); }
.lb-nav:disabled { opacity: 0.28; }
.lb-cur { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.lb-flag { font-size: 2.1rem; flex: none; }
.lb-cur-txt { min-width: 0; }
.lb-country { font-weight: 800; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-artist { color: var(--muted); font-size: 0.81rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-idle { flex: 1; text-align: center; font-weight: 700; color: var(--muted); }
.lb-hint { margin: 9px 2px 0; font-size: 0.77rem; color: var(--muted); line-height: 1.45; text-align: center; }
.lb-hint b { color: var(--ink); }
.lb-next { font-size: 0.81rem; color: var(--muted); text-align: center; }
.lb-next b { color: var(--ink); font-weight: 700; }
.lb-cta {
  width: 100%; margin-top: 9px; padding: 11px; border-radius: 12px;
  font-weight: 800; font-size: 0.95rem; color: #fff; background: var(--grad);
}
.lb-cta:active { transform: scale(0.985); }
.lb-prog { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.lb-prog .count { font-size: 0.71rem; font-weight: 800; color: var(--gold); white-space: nowrap; }
.progress-track { flex: 1; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 99px; background: var(--grad); transition: width 0.45s cubic-bezier(.3,1,.4,1); }

/* cartes participants */
.cards { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.pcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 15px 15px 16px; box-shadow: var(--shadow);
  transition: border-color 0.2s, background 0.2s;
}
.pcard.rated { border-color: rgba(255, 210, 74, 0.32); background: rgba(255, 210, 74, 0.035); }
.pcard.now { border-color: var(--magenta); box-shadow: 0 0 0 1px var(--magenta), var(--shadow); }

.pcard-top { display: flex; align-items: center; gap: 12px; }
.pos {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; font-weight: 800; font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.06); color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pflag { font-size: 2.05rem; line-height: 1; flex: none; }
.pmeta { min-width: 0; flex: 1; }
.pmeta .country { font-weight: 800; font-size: 1.08rem; }
.pmeta .song { color: var(--muted); font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmeta .song em { color: var(--ink); font-style: normal; font-weight: 600; }

/* note */
.score-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.score-slider { flex: 1; -webkit-appearance: none; appearance: none; height: 30px; background: none; }
.score-slider::-webkit-slider-runnable-track {
  height: 9px; border-radius: 99px;
  background: linear-gradient(90deg, var(--fill, var(--magenta)) var(--pct, 0%), rgba(255,255,255,0.10) var(--pct, 0%));
}
.score-slider::-moz-range-track { height: 9px; border-radius: 99px; background: rgba(255,255,255,0.10); }
.score-slider::-moz-range-progress { height: 9px; border-radius: 99px; background: var(--fill, var(--magenta)); }
.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; margin-top: -9px; border: 3px solid var(--fill, var(--magenta));
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}
.score-slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 3px solid var(--fill, var(--magenta)); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}
.score-box { flex: none; width: 64px; text-align: center; }
.score-val { font-size: 1.7rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; color: var(--fill, var(--faint)); }
.score-val.empty { color: var(--faint); }
.score-out { display: block; font-size: 0.62rem; color: var(--faint); letter-spacing: 0.1em; margin-top: 2px; }

.pcard-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.comment {
  flex: 1; resize: none; min-height: 40px; max-height: 130px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 11px; font-size: 0.9rem;
}
.comment:focus { outline: none; border-color: var(--purple); background: rgba(255, 255, 255, 0.06); }
.comment::placeholder { color: var(--faint); }
.save-tag { flex: none; font-size: 0.72rem; font-weight: 700; min-width: 22px; text-align: center; }
.save-tag.ok { color: #4fd6a0; }
.save-tag.wait { color: var(--faint); }
.save-tag.err { color: #ff6f8f; }
.btn-clear {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.05); color: var(--muted); font-size: 1rem;
}
.btn-clear:active { transform: scale(0.9); }

.list-foot { text-align: center; color: var(--faint); font-size: 0.8rem; margin-top: 22px; }

/* barre d'onglets */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; gap: 6px; padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  background: rgba(10, 8, 24, 0.92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbtn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px; border-radius: 14px; font-size: 0.74rem; font-weight: 700;
  color: var(--faint); transition: color 0.15s, background 0.15s;
}
.tabbtn .ic { font-size: 1.25rem; filter: grayscale(0.6) opacity(0.7); transition: filter 0.15s; }
.tabbtn.is-active { color: var(--ink); background: var(--card-hi); }
.tabbtn.is-active .ic { filter: none; }

/* ════════════════ COMPARAISON ════════════════ */
.comparison { padding-top: 16px; }
.cmp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cmp-h2 { font-size: 1.15rem; font-weight: 800; }
.cmp-refresh { color: var(--muted); font-size: 0.82rem; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; }
.cmp-section { margin-bottom: 26px; }
.cmp-section > h3 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--muted); margin: 0 4px 11px;
}
.cmp-empty { text-align: center; color: var(--faint); padding: 40px 20px; }

/* classement du groupe */
.rank-row {
  display: flex; align-items: center; gap: 11px;
  background: var(--card); border: 1px solid var(--line); border-radius: 15px;
  padding: 10px 12px; margin-bottom: 9px;
}
.rank-row.podium-1 { border-color: rgba(255, 210, 74, 0.5); background: rgba(255, 210, 74, 0.07); }
.rank-row.podium-2 { border-color: rgba(196, 206, 224, 0.4); }
.rank-row.podium-3 { border-color: rgba(205, 140, 95, 0.4); }
.rank-pos { font-weight: 900; font-size: 1rem; width: 26px; text-align: center; color: var(--muted); }
.rank-row.podium-1 .rank-pos, .rank-row.podium-2 .rank-pos, .rank-row.podium-3 .rank-pos { font-size: 1.3rem; }
.rank-flag { font-size: 1.7rem; flex: none; }
.rank-meta { flex: 1; min-width: 0; }
.rank-meta b { font-size: 0.97rem; }
.rank-meta span { display: block; color: var(--muted); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-avg { flex: none; text-align: center; width: 50px; }
.rank-avg b { font-size: 1.35rem; font-weight: 900; color: var(--gold); }
.rank-avg span { display: block; font-size: 0.6rem; color: var(--faint); letter-spacing: 0.08em; }
.rank-chips { display: flex; gap: 4px; }
.dot {
  width: 27px; height: 27px; border-radius: 8px; flex: none;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 800;
  color: #0a0818; font-variant-numeric: tabular-nums;
}
.dot.none { background: rgba(255,255,255,0.07) !important; color: var(--faint); }

.rank-row { cursor: pointer; }
.rank-comments {
  margin: -2px 4px 11px; padding: 11px 13px;
  background: rgba(255,255,255,0.025); border: 1px solid var(--line); border-radius: 13px;
}
.rank-comments .cmt { display: flex; gap: 8px; font-size: 0.87rem; margin: 7px 0; }
.rank-comments .cmt:first-child { margin-top: 0; }
.rank-comments .cmt-emoji { flex: none; }
.rank-comments .cmt-none { color: var(--faint); font-size: 0.83rem; }

/* podiums perso */
.podiums { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; }
.podium {
  background: var(--card); border: 1px solid var(--line); border-radius: 15px;
  padding: 12px 9px; text-align: center;
}
.podium-who { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-bottom: 10px; }
.podium-who .pe { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; }
.podium-who b { font-size: 0.85rem; }
.podium-item { margin: 8px 0; }
.podium-item .pi-rank { font-size: 0.7rem; font-weight: 800; color: var(--gold); }
.podium-item .pi-flag { font-size: 1.5rem; }
.podium-item .pi-country { font-size: 0.76rem; color: var(--muted); }
.podium-item .pi-score { font-size: 0.84rem; font-weight: 800; }
.podium-empty { color: var(--faint); font-size: 0.78rem; padding: 14px 0; }

/* faits marquants */
.facts { display: flex; flex-direction: column; gap: 10px; }
.fact {
  display: flex; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 13px 14px;
}
.fact-ic { font-size: 1.7rem; flex: none; }
.fact-body { flex: 1; min-width: 0; }
.fact-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.fact-main { font-weight: 800; font-size: 1rem; margin-top: 1px; }
.fact-sub { font-size: 0.82rem; color: var(--muted); }

/* ─── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: #1d1536; border: 1px solid var(--line); color: var(--ink);
  padding: 11px 18px; border-radius: 99px; font-size: 0.88rem; font-weight: 600;
  z-index: 60; opacity: 0; transition: opacity 0.25s, transform 0.25s; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Sheet (menu profil) ─────────────────────────────────── */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(5, 4, 12, 0.6);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 440px;
  background: #15102b; border: 1px solid var(--line); border-bottom: none;
  border-radius: 22px 22px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  animation: sheetup 0.26s cubic-bezier(.2,.9,.3,1);
}
@keyframes sheetup { from { transform: translateY(100%); } }
.sheet-handle { width: 38px; height: 4px; border-radius: 99px; background: var(--line); margin: 4px auto 16px; }
.sheet-me { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sheet-me .se { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; }
.sheet-me b { font-size: 1.1rem; }
.sheet-me span { display: block; color: var(--muted); font-size: 0.82rem; }
.sheet-btn {
  width: 100%; padding: 14px; border-radius: 14px; font-weight: 700; font-size: 0.95rem;
  background: var(--card); border: 1px solid var(--line); display: flex; gap: 9px; justify-content: center;
}
.sheet-btn.danger { color: #ff6f8f; }

/* ════════════════ RÉSULTATS ════════════════ */
.resultats { padding-top: 16px; }
.res-intro { color: var(--muted); font-size: 0.85rem; margin: 0 4px 16px; }
.res-section { margin-bottom: 24px; }
.res-section > h3 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--muted); margin: 0 4px 11px;
}
.res-empty { text-align: center; color: var(--faint); padding: 30px 18px; }

/* probabilité de victoire */
.wp-note { color: var(--muted); font-size: 0.8rem; margin: 0 4px 12px; }
.wp-row { display: flex; align-items: center; gap: 9px; padding: 6px 3px; }
.wp-row.fav .wp-country { color: var(--gold); font-weight: 800; }
.wp-flag { font-size: 1.35rem; flex: none; }
.wp-country { width: 86px; flex: none; font-size: 0.84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-bar { flex: 1; height: 13px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.wp-fill { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width 0.5s cubic-bezier(.3, 1, .4, 1); }
.wp-row.fav .wp-fill { background: linear-gradient(90deg, #ff2e7e, var(--gold)); }
.wp-pct { width: 52px; flex: none; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.wp-row.fav .wp-pct { color: var(--gold); }
.wp-weak { color: var(--faint); font-size: 0.84rem; margin: 10px 3px 0; line-height: 1.8; }

.res-winner {
  display: flex; gap: 13px; align-items: center;
  background: rgba(255, 210, 74, 0.09); border: 1px solid rgba(255, 210, 74, 0.42);
  border-radius: 16px; padding: 14px; margin-bottom: 14px;
}
.res-winner .rw-flag { font-size: 2.5rem; flex: none; }
.res-winner .rw-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); }
.res-winner .rw-country { font-weight: 900; font-size: 1.25rem; }
.res-winner .rw-sub { font-size: 0.82rem; color: var(--muted); }

.res-rank {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 9px 11px; margin-bottom: 8px;
}
.res-rank.win { border-color: rgba(255, 210, 74, 0.5); background: rgba(255, 210, 74, 0.07); }
.res-rank .rr-pos { font-weight: 900; width: 24px; text-align: center; color: var(--muted); }
.res-rank.win .rr-pos { color: var(--gold); font-size: 1.15rem; }
.res-rank .rr-flag { font-size: 1.6rem; flex: none; }
.res-rank .rr-meta { flex: 1; min-width: 0; }
.res-rank .rr-meta b { font-size: 0.95rem; }
.res-rank .rr-meta span { display: block; font-size: 0.73rem; color: var(--muted); }
.res-rank .rr-note { flex: none; font-size: 0.72rem; font-weight: 700; color: var(--pink); text-align: right; }
.res-rank .rr-total { flex: none; font-weight: 900; font-size: 1.3rem; color: var(--gold); min-width: 44px; text-align: right; }

.res-entry {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  padding: 8px 10px; margin-bottom: 7px;
}
.res-entry.now { border-color: rgba(255, 46, 126, 0.45); }
.re-flag { font-size: 1.5rem; flex: none; }
.re-country { flex: 1; min-width: 0; font-weight: 700; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.re-num { width: 58px; flex: none; }
.re-num label { display: block; font-size: 0.56rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; text-align: center; margin-bottom: 2px; }
.re-num input {
  width: 100%; text-align: center; padding: 7px 3px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  font-weight: 800; font-size: 0.95rem;
}
.re-num input:focus { outline: none; border-color: var(--purple); background: rgba(255, 255, 255, 0.08); }
.re-total { width: 38px; flex: none; text-align: center; font-weight: 900; font-size: 0.95rem; color: var(--gold); }
.re-total.empty { color: var(--faint); }

/* reveal */
.pcard, .rank-row, .fact, .res-rank { animation: rise 0.4s both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 360px) {
  .score-box { width: 56px; }
}
