/* ==========================================================================
   Killan nimen äänestys — dark WoW-inspired theme
   ========================================================================== */

:root {
  --bg: #08070c;
  --panel: #15101d;
  --panel-2: #1b1526;
  --gold: #d9b15c;
  --gold-bright: #f6d98a;
  --gold-dim: #8a6a2f;
  --blue: #67b8ff;
  --text: #ece6da;
  --muted: #a79bb5;
  --line: rgba(217, 177, 92, 0.24);
  --line-soft: rgba(255, 255, 255, 0.06);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --serif: "Cinzel", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 820px at 50% -12%, rgba(94, 60, 148, 0.38), transparent 62%),
    radial-gradient(900px 700px at 88% 102%, rgba(28, 74, 116, 0.26), transparent 60%),
    radial-gradient(720px 520px at 8% 84%, rgba(128, 74, 32, 0.14), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.page-glow,
.page-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.page-glow {
  background:
    radial-gradient(600px 320px at 18% 8%, rgba(120, 82, 190, 0.16), transparent 70%),
    radial-gradient(520px 300px at 82% 4%, rgba(60, 120, 180, 0.12), transparent 70%);
}

.page-vignette {
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0, 0, 0, 0.55) 100%);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; }

/* ---------- top bar ---------- */

.topbar {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 177, 92, 0.35), transparent);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(217, 177, 92, 0.16), rgba(0, 0, 0, 0.3));
  color: var(--gold-bright);
  box-shadow: inset 0 0 18px rgba(217, 177, 92, 0.12);
  flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }

.brand-text strong {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.1em;
  color: #f0e3c6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text small {
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

.char-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.char-badge strong { font-family: var(--serif); font-size: 13px; color: var(--gold-bright); font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7fe0a8;
  box-shadow: 0 0 10px rgba(127, 224, 168, 0.8);
  flex: none;
}

/* ---------- layout ---------- */

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 28px 10px;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 34px;
  align-items: start;
}

.app-grid.solo { grid-template-columns: minmax(0, 1fr); }

.main-col { min-width: 0; }

.sidebar { position: sticky; top: 22px; }

/* ---------- shared bits ---------- */

.view { animation: fadeUp 0.42s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.lede { margin: 12px 0 0; color: #b9aec6; font-size: 15px; line-height: 1.65; max-width: 54ch; }

.card-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(155deg, rgba(32, 24, 45, 0.94), rgba(12, 9, 17, 0.97) 70%),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.card-frame::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(246, 217, 138, 0.5), transparent);
  opacity: 0.7;
  pointer-events: none;
}

/* ---------- register hero ---------- */

.register-hero,
.done-hero {
  display: grid;
  grid-template-columns: minmax(260px, 352px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(22px, 3vw, 40px);
}

.hero-portrait {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(217, 177, 92, 0.28);
  background: radial-gradient(120% 90% at 50% 18%, #2b2142 0%, #171020 62%, #0c0911 100%);
  aspect-ratio: 6 / 7;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 0 60px rgba(120, 82, 190, 0.12);
}

.portrait-glow {
  position: absolute;
  inset: -18% -12% auto;
  height: 80%;
  background: radial-gradient(closest-side, rgba(150, 105, 220, 0.32), transparent);
  filter: blur(8px);
}

.hero-img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.portrait-shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(4, 3, 7, 0.96) 6%, rgba(4, 3, 7, 0.55) 52%, transparent);
}

/* ---------- WoW nameplate ---------- */

.nameplate {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 14px 18px;
  text-align: center;
  z-index: 2;
}

.np-name {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(19px, 1.8vw, 24px);
  letter-spacing: 0.03em;
  color: #f8f1e1;
  text-shadow: 0 2px 6px #000, 0 0 22px rgba(246, 217, 138, 0.35);
  overflow-wrap: anywhere;
}

.np-guild {
  display: block;
  margin-top: 3px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(16px, 1.6vw, 21px);
  letter-spacing: 0.015em;
  color: var(--blue);
  text-shadow: 0 2px 6px #000, 0 0 16px rgba(80, 160, 255, 0.5);
  overflow-wrap: anywhere;
}

.long-guild .np-guild { font-size: clamp(13px, 1.35vw, 17px); }
.xlong-guild .np-guild { font-size: clamp(11px, 1.15vw, 15px); }

.hero-nameplate { padding-bottom: 20px; }

/* ---------- hero copy ---------- */

.hero-copy h1 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: 0.01em;
  color: #f4e9d2;
  text-shadow: 0 2px 24px rgba(217, 177, 92, 0.18);
}

.done-copy h1 {
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: 0.01em;
  color: #f4e9d2;
  text-shadow: 0 2px 24px rgba(217, 177, 92, 0.18);
}

.hero-copy form { margin-top: 22px; }

.hero-copy label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-copy input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(217, 177, 92, 0.3);
  background: rgba(7, 5, 11, 0.82);
  color: #f6eddc;
  font-family: var(--sans);
  font-size: 17px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.45);
}

.hero-copy input::placeholder { color: #6f657e; }

.hero-copy input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(217, 177, 92, 0.16), inset 0 1px 6px rgba(0, 0, 0, 0.45);
}

.hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #8d829c;
}

.hint strong { color: #e0b96a; font-weight: 600; }

.error { margin: 12px 0 0; font-size: 13.5px; color: #ff9d9d; }

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 28px;
  border: 1px solid #f0d48c;
  border-radius: 10px;
  background: linear-gradient(180deg, #f6dd97, #cda650 58%, #9c7728);
  color: #1d1408;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.07em;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(217, 177, 92, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: filter 0.18s, transform 0.18s;
}

.btn-gold:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-gold:active { transform: translateY(0); }
.btn-gold:disabled { opacity: 0.55; cursor: wait; transform: none; }

.btn-gold:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.howto {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: #9c90ac;
}

.howto li { position: relative; padding-left: 18px; line-height: 1.5; }

.howto li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 8px;
  line-height: 20px;
  color: var(--gold-dim);
}

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

.vote-head { margin-bottom: 22px; }
.vote-head h1 { font-size: clamp(28px, 3.6vw, 42px); color: #f4e9d2; }
.vote-head .lede { margin-top: 8px; }

/* ---------- progress ---------- */

.progress-block { margin: 0 0 22px; }

.progress-labels {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

#progressLeft { color: #e7d3a0; font-weight: 600; }
#progressCount { font-variant-numeric: tabular-nums; }

.progress-track {
  height: 11px;
  border-radius: 99px;
  background: #211a2c;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.progress-fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8d6a28, #d9b15c 55%, #f6d98a);
  box-shadow: 0 0 18px rgba(246, 217, 138, 0.45);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 2.4s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 55% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---------- vote cards ---------- */

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.cards.locked { pointer-events: none; }

.vote-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(217, 177, 92, 0.26);
  border-radius: 14px;
  overflow: hidden;
  background: #100c16;
  cursor: pointer;
  text-align: center;
  color: inherit;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, opacity 0.3s ease, filter 0.3s ease;
}

.vote-card:hover {
  transform: translateY(-6px);
  border-color: rgba(246, 217, 138, 0.6);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), 0 0 42px rgba(126, 82, 200, 0.22);
}

.vote-card:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 4px; }

.vote-card:nth-child(1) .card-art { background: radial-gradient(115% 85% at 50% 16%, #31254e 0%, #191125 60%, #0c0911 100%); }
.vote-card:nth-child(3) .card-art { background: radial-gradient(115% 85% at 50% 16%, #1d3348 0%, #131c2a 60%, #090c11 100%); }

.card-art { position: relative; aspect-ratio: 6 / 7; overflow: hidden; }

.card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.35s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.vote-card:hover .card-art img { transform: scale(1.025); }

.card-art .nameplate { padding: 20px 16px 22px; background: linear-gradient(to top, rgba(3, 2, 5, 0.95) 4%, rgba(3, 2, 5, 0.62) 48%, transparent); }

.pick-mark {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f8e2a0, #c9a24a);
  color: #241806;
  font-size: 22px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.5) rotate(-20deg);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.vote-card.picked {
  transform: translateY(-6px) scale(1.015);
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 2px rgba(246, 217, 138, 0.85), 0 26px 60px rgba(0, 0, 0, 0.6), 0 0 60px rgba(246, 217, 138, 0.35);
}

.vote-card.picked .pick-mark { opacity: 1; transform: scale(1) rotate(0); }

.vote-card.faded { opacity: 0.32; filter: grayscale(0.75); transform: scale(0.985); }

.card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 12px;
  border-top: 1px solid rgba(217, 177, 92, 0.22);
  background: rgba(0, 0, 0, 0.32);
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d9b15c;
  transition: background 0.22s, color 0.22s;
}

.card-cta .arrow { font-size: 15px; line-height: 1; transition: transform 0.22s; }

.vote-card:hover .card-cta {
  background: linear-gradient(180deg, #f2d78c, #c39c46);
  color: #1e1508;
}

.vote-card:hover .card-cta .arrow { transform: translateX(4px); }

.vs {
  align-self: center;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(217, 177, 92, 0.45);
  background: radial-gradient(circle at 38% 30%, #2c2142, #120d1b 70%);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  box-shadow: 0 0 0 5px rgba(8, 6, 12, 0.75), 0 8px 22px rgba(0, 0, 0, 0.5);
}

.kbd-hint {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
  color: #7f748d;
}

kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--sans);
  font-size: 11px;
  color: #c9bfd6;
}

/* ---------- sidebar / ranking ---------- */

.panel {
  border: 1px solid rgba(217, 177, 92, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(28, 21, 39, 0.92), rgba(15, 11, 21, 0.94));
  padding: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
}

.panel + .panel { margin-top: 18px; }

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-head h2 {
  font-size: 15px;
  letter-spacing: 0.06em;
  color: #efdfb8;
  font-weight: 700;
}

.panel-meta { font-size: 11px; letter-spacing: 0.08em; color: #8b8098; white-space: nowrap; }

.leader-line {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  font-size: 12.5px;
  color: #9f93ad;
}

.leader-line strong { color: var(--gold-bright); font-family: var(--serif); font-size: 13.5px; }

.ranking { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

.rank-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid transparent;
  transition: background 0.2s;
}

.rank-row:hover { background: rgba(255, 255, 255, 0.05); }

.rank-row.top {
  border-color: rgba(217, 177, 92, 0.34);
  background: linear-gradient(90deg, rgba(217, 177, 92, 0.16), rgba(217, 177, 92, 0.02));
}

.rank-no {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: #8d819b;
  text-align: center;
}

.rank-row.top .rank-no { color: var(--gold-bright); }

.rank-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.rank-name {
  font-size: 13px;
  color: #ddd3e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row.top .rank-name { color: #f4e9d2; }

.rank-bar { height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }

.rank-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8d6a28, #d9b15c); opacity: 0.75; }

.rank-wins {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  min-width: 22px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.voters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

.voter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  font-size: 12.5px;
}

.voter-row:last-child { border-bottom: 0; }

.voter-name { color: #cfc4dd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.voter-row.me .voter-name { color: var(--gold-bright); }

.voter-row.me .voter-name::after { content: " · sinä"; color: #8b8098; font-size: 11px; }

.voter-votes { display: flex; align-items: center; gap: 6px; color: #8f849c; font-variant-numeric: tabular-nums; white-space: nowrap; }

.voter-votes .done-check { color: #7fe0a8; font-size: 12px; }

.empty-note { margin: 6px 0; font-size: 12.5px; color: #8b8098; }

/* ---------- done view ---------- */

.done-hero { align-items: center; }

.done-portrait { max-width: 100%; }

.winner-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0 24px;
  padding: 16px 18px;
  border: 1px solid rgba(217, 177, 92, 0.34);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(217, 177, 92, 0.14), rgba(217, 177, 92, 0.02));
}

.winner-banner .crown {
  font-size: 38px;
  line-height: 1;
  color: var(--gold-bright);
  text-shadow: 0 0 24px rgba(246, 217, 138, 0.45);
}

.winner-banner small {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9c90ac;
  margin-bottom: 2px;
}

.winner-banner strong { font-family: var(--serif); font-size: 21px; color: #f6ecd6; }

.done-copy .btn-gold { margin-top: 0; }

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

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 36px 20px 42px;
  color: #6f657e;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.footer-sep { color: var(--gold-dim); font-size: 8px; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 50;
  max-width: min(90vw, 440px);
  padding: 12px 18px;
  border: 1px solid rgba(217, 177, 92, 0.55);
  border-radius: 10px;
  background: #1c1526;
  color: #f5e9d2;
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  animation: toastIn 0.25s ease both;
}

.toast.error { border-color: rgba(255, 130, 130, 0.55); }

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .app-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .panel + .panel { margin-top: 0; }
}

@media (max-width: 860px) {
  .wrap { padding: 24px 20px 6px; }
  .topbar { padding: 14px 20px; }
  .topbar::after { left: 20px; right: 20px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .cards .vs { margin: -2px auto; width: 46px; height: 46px; }
  .card-art { aspect-ratio: 1 / 1.04; }
  .register-hero, .done-hero { grid-template-columns: minmax(0, 1fr); }
  .hero-portrait { max-width: 330px; margin: 0 auto; width: 100%; }
  .hero-copy h1, .done-copy h1 { margin-top: 4px; }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .vote-head .lede { margin-top: 6px; }
}

@media (max-width: 560px) {
  .brand-text small { display: none; }
  .brand-text strong { font-size: 13px; max-width: 158px; }
  .char-badge { padding: 6px 10px; font-size: 11px; gap: 6px; }
  .char-badge strong { max-width: 104px; font-size: 12px; }
  .char-badge > span:not(.badge-dot) { display: none; }
  .wrap { padding: 18px 14px 4px; }
  .topbar { padding: 12px 14px; }
  .topbar::after { left: 14px; right: 14px; }
  .card-frame { border-radius: 14px; }
  .register-hero, .done-hero { padding: 18px 16px 22px; gap: 22px; }
  .vote-head h1 { font-size: 26px; }
  .hero-copy h1, .done-copy h1 { font-size: 30px; }
  .nameplate { padding: 12px 10px 14px; }
  .card-art .nameplate { padding: 16px 12px 18px; }
  .np-name { font-size: 20px; }
  .np-guild { font-size: 17px; }
  .long-guild .np-guild { font-size: 14px; }
  .xlong-guild .np-guild { font-size: 12px; }
  .card-cta { padding: 12px; font-size: 11.5px; }
  .footer { padding: 28px 14px 34px; font-size: 9px; letter-spacing: 0.16em; }
  .winner-banner strong { font-size: 18px; }
}

@media (max-width: 430px) {
  .brand-text { display: none; }
  .brand { gap: 0; }
}

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