:root {
  --bg: #060a13;
  --bg-2: #0b1120;
  --panel: rgba(12, 18, 32, 0.78);
  --panel-solid: #0d1424;
  --line: rgba(201, 164, 92, 0.22);
  --line-2: rgba(201, 164, 92, 0.45);
  --text: #eee6d2;
  --muted: #9aa3b5;
  --gold: #ffd100;
  --bronze: #c9a45c;
  --bronze-hi: #f0d596;
  --arcane: #5cc6d6;
  --alliance: #3d7fe0;
  --horde: #d0342c;
  --danger: #d0342c;
  --tip-bg: rgba(6, 10, 26, 0.94);
  --tip-line: #7d7f86;
  --display: 'Cinzel', 'Times New Roman', serif;
  --deco: 'Cinzel Decorative', 'Cinzel', serif;
  --body: 'Alegreya Sans', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 50% 520px, rgba(92, 198, 214, 0.06), transparent 70%),
    linear-gradient(to bottom, #04070e 0, var(--bg) 700px, #080d19 100%);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.45;
  min-height: 100vh;
}
img { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.muted { color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 16px 56px;
  text-align: center;
  isolation: isolate;
}
.hero::after {
  content: '';
  position: absolute; inset: auto 0 0 0; height: 140px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: -1;
}
.stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-inner { max-width: 760px; margin: 0 auto; }
.logo {
  width: min(560px, 92vw);
  height: auto;
  margin: 0 auto -18px;
  mix-blend-mode: lighten;
  -webkit-mask-image: radial-gradient(ellipse 62% 64% at 50% 52%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 64% at 50% 52%, #000 60%, transparent 100%);
  filter: drop-shadow(0 0 30px rgba(92, 198, 214, 0.25));
  animation: float 9s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-6px); } }

.guild { display: flex; align-items: center; justify-content: center; gap: 16px; }
.orn {
  flex: 1; max-width: 140px; height: 12px;
  background:
    radial-gradient(circle at 100% 50%, var(--bronze-hi) 0 3px, transparent 4px),
    linear-gradient(to right, transparent, var(--bronze) 70%, var(--bronze-hi)) center / 100% 1px no-repeat;
}
.orn:last-child { transform: scaleX(-1); }
h1 {
  margin: 0;
  font-family: var(--deco);
  font-weight: 900;
  font-size: clamp(30px, 7vw, 58px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  background: linear-gradient(to bottom, #fff6da 0%, var(--bronze-hi) 40%, var(--bronze) 70%, #7c5a22 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.8)) drop-shadow(0 0 24px rgba(240, 213, 150, 0.25));
}
.tagline { margin: 12px auto 22px; color: var(--muted); max-width: 46ch; }

.countdown {
  display: flex; justify-content: center; gap: 10px;
  margin: 0 0 26px;
  font-variant-numeric: tabular-nums;
}
.countdown .unit {
  position: relative;
  min-width: 74px;
  padding: 10px 10px 8px;
  background: linear-gradient(to bottom, rgba(20, 28, 48, 0.9), rgba(8, 12, 24, 0.9));
  border: 1px solid var(--line-2);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(240, 213, 150, 0.15), 0 6px 20px rgba(0, 0, 0, 0.4);
}
.countdown .num { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--bronze-hi); display: block; line-height: 1.1; }
.countdown .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }
.countdown .live { font-family: var(--display); color: var(--gold); font-size: 22px; }
.countdown-caption { margin: -16px 0 22px; font-size: 13px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2);
  background: linear-gradient(to bottom, #1a2338, #0e1526);
  padding: 9px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s, filter 0.15s, transform 0.05s;
}
.btn:hover { border-color: var(--bronze-hi); filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
/* Botón rojo al estilo de la interfaz del juego */
.btn-primary {
  font-family: var(--display);
  letter-spacing: 0.04em;
  color: var(--gold);
  text-shadow: 0 1px 0 #000;
  border: 1px solid #d9b25f;
  background: linear-gradient(to bottom, #b3261e 0%, #7a100b 55%, #5c0a06 100%);
  box-shadow: inset 0 1px 0 rgba(255, 190, 150, 0.35), inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.5);
}
.btn-primary:hover { filter: brightness(1.2); border-color: #ffe2a0; }
.btn-hero { padding: 12px 30px 12px 14px; font-size: 20px; }
.btn-hero img { border-radius: 4px; border: 1px solid #000; }
.btn-hero { animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: inset 0 1px 0 rgba(255, 190, 150, 0.35), 0 0 0 6px rgba(255, 209, 0, 0.06), 0 0 30px rgba(255, 120, 60, 0.35); } }
.btn-danger { border-color: #7a2420; color: #ffb4ad; background: #2a1110; }
.btn[disabled] { opacity: 0.6; cursor: wait; }
.icon-btn {
  appearance: none; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-size: 20px; padding: 4px 8px; border-radius: 6px;
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.linkish { appearance: none; background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 0; }

/* ---------- Layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px 40px; display: grid; gap: 22px; }
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(240, 213, 150, 0.06), 0 10px 40px rgba(0, 0, 0, 0.35);
}
/* Esquinas doradas */
.panel::before, .panel::after {
  content: '';
  position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--bronze);
  pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.panel-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
h2 { margin: 0; font-family: var(--display); font-size: 22px; color: var(--bronze-hi); letter-spacing: 0.03em; }
h2 .count { font-size: 15px; color: var(--muted); font-family: var(--body); letter-spacing: 0; }
.panel-sub { margin: 0; color: var(--muted); font-size: 15px; }
.sub-h { font-family: var(--display); color: var(--bronze); font-size: 16px; margin: 18px 0 10px; }

/* ---------- Alianza vs Horda ---------- */
.versus {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch;
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  /* Un solo degradado para todo el banner, sin cortes entre columnas */
  background: linear-gradient(to right, rgba(61, 127, 224, 0.3), rgba(12, 18, 32, 0.9) 40%, rgba(12, 18, 32, 0.9) 60%, rgba(208, 52, 44, 0.3));
}
.side {
  position: relative;
  padding: 22px 22px 18px;
  display: grid; gap: 12px; align-content: start;
  min-width: 0;
}
.side.horde { text-align: right; }
.side-top { display: flex; align-items: center; gap: 14px; }
.side.horde .side-top { flex-direction: row-reverse; }
.crest-big { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--bronze); box-shadow: 0 0 24px rgba(0, 0, 0, 0.6); }
.side.alliance .crest-big { box-shadow: 0 0 26px rgba(61, 127, 224, 0.55); }
.side.horde .crest-big { box-shadow: 0 0 26px rgba(208, 52, 44, 0.55); }
.side-name { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: 0.05em; }
.side-num { font-family: var(--display); font-size: 44px; font-weight: 900; line-height: 1; }
.side-num small { font-family: var(--body); font-size: 14px; font-weight: 400; color: var(--muted); display: block; }
.avatars { display: flex; flex-wrap: wrap; gap: 4px; }
.side.horde .avatars { justify-content: flex-end; }
.avatars img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--c, var(--line-2)); background: #000; }
.avatars .more { font-size: 13px; color: var(--muted); align-self: center; padding: 0 4px; }
.vs {
  display: grid; place-items: center; padding: 0 8px;
  background: radial-gradient(closest-side, rgba(240, 213, 150, 0.1), transparent);
  font-family: var(--deco); font-weight: 900; font-size: 26px; color: var(--bronze-hi);
  text-shadow: 0 0 20px rgba(240, 213, 150, 0.4);
}
.tug { grid-column: 1 / -1; display: flex; height: 6px; background: #000; }
.tug .a { background: linear-gradient(to right, #1f4f9c, var(--alliance)); transition: width 0.6s; }
.tug .h { background: linear-gradient(to left, #8a1812, var(--horde)); transition: width 0.6s; }
.versus-note { grid-column: 1 / -1; margin: 0; padding: 10px 16px; font-size: 15px; background: rgba(6, 10, 19, 0.9); color: #ffd98a; text-align: center; }

/* ---------- Grupo de mazmorra ---------- */
.party { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.role-card {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center;
  padding: 14px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent);
  border: 1px solid var(--line);
}
.role-card > img { width: 52px; height: 52px; border-radius: 8px; border: 1px solid #000; box-shadow: 0 0 0 1px var(--line-2); grid-row: span 2; }
.role-card .rn { font-family: var(--display); font-size: 16px; color: var(--bronze-hi); }
.role-card .rc { font-family: var(--display); font-size: 30px; font-weight: 900; line-height: 1; }
.role-card .rc small { font-family: var(--body); font-size: 14px; font-weight: 400; color: var(--muted); }
.role-card .pips { grid-column: 1 / -1; display: flex; gap: 4px; flex-wrap: wrap; min-height: 26px; }
.role-card .pips img { width: 26px; height: 26px; border-radius: 4px; border: 1px solid #000; box-shadow: 0 0 0 1px var(--c); }
.party-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: center; padding-top: 4px; }
.group-slots { display: flex; gap: 6px; }
.slot { width: 38px; height: 38px; border-radius: 6px; border: 1px dashed var(--line-2); display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); }
.slot img { width: 100%; height: 100%; border-radius: 5px; }
.slot.filled { border-style: solid; border-color: var(--bronze); }

/* ---------- Clases ---------- */
.class-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; align-items: end; }
.class-col { display: grid; gap: 8px; justify-items: center; text-align: center; }
.class-bar {
  width: 100%; height: 110px;
  display: flex; align-items: flex-end;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.class-bar span {
  display: block; width: 100%;
  min-height: 3px;
  background: linear-gradient(to top, color-mix(in srgb, var(--c) 30%, transparent), var(--c));
  box-shadow: 0 0 16px color-mix(in srgb, var(--c) 50%, transparent);
  transition: height 0.6s cubic-bezier(.2, .8, .2, 1);
}
.class-col img { width: 44px; height: 44px; border-radius: 8px; border: 1px solid #000; box-shadow: 0 0 0 1px var(--c); }
.class-col.zero img { filter: grayscale(1) brightness(0.55); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
.class-col .n { font-family: var(--display); font-size: 20px; font-weight: 700; line-height: 1; }
.class-col.zero .n { color: var(--muted); }
.class-col .nm { font-size: 13px; color: var(--c); line-height: 1.1; }
.class-col .nm small { color: var(--muted); }

/* ---------- Filtros ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none; cursor: pointer;
  padding: 6px 13px; border-radius: 99px;
  border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  font-size: 15px;
}
.chip:hover { color: var(--text); border-color: var(--bronze-hi); }
.chip.is-on { background: linear-gradient(to bottom, var(--bronze-hi), var(--bronze)); border-color: var(--bronze-hi); color: #1c1305; font-weight: 700; }

/* ---------- Lista: tarjetas estilo tooltip del juego ---------- */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: 14px;
  padding: 14px 14px 12px;
  border-radius: 5px;
  background: var(--tip-bg);
  border: 1px solid var(--tip-line);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9), inset 0 0 0 2px rgba(255, 255, 255, 0.06), 0 8px 26px rgba(0, 0, 0, 0.5);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  animation: rise 0.4s both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px 120px at 0 0, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--c), 0 12px 34px rgba(0, 0, 0, 0.6), 0 0 28px color-mix(in srgb, var(--c) 35%, transparent);
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.card.alt { opacity: 0.82; }
.portrait { position: relative; width: 62px; height: 62px; }
.portrait .race { width: 62px; height: 62px; border-radius: 50%; border: 2px solid var(--bronze); box-shadow: 0 0 0 2px #000, 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); }
.portrait .cls { position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #000; box-shadow: 0 0 0 1px var(--c); background: #000; }
.portrait .lvl {
  position: absolute; left: -6px; bottom: -6px;
  min-width: 24px; height: 20px; padding: 0 4px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--gold);
  background: #000; border: 1px solid var(--bronze); border-radius: 10px;
}
.card-body { position: relative; min-width: 0; }
.card h3 { margin: 0; font-family: var(--body); font-weight: 700; font-size: 19px; color: var(--c); overflow-wrap: anywhere; text-shadow: 0 1px 0 #000; }
.card .t-line { font-size: 15px; color: #fff; }
.card .t-faint { font-size: 14px; color: var(--muted); }
.card .t-faint b { color: var(--text); }
.card .t-role { font-size: 14px; color: #1eff00; }
.card .t-fac-alliance { color: #7fb1ff; }
.card .t-fac-horde { color: #ff7d73; }
.card .profs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.card .profs span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.card .profs img { width: 20px; height: 20px; border-radius: 3px; border: 1px solid #000; }
.badge-alt { font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--tip-line); color: var(--muted); margin-left: 6px; vertical-align: 2px; font-family: var(--body); }
.card .notes { margin-top: 8px; font-size: 14px; color: var(--gold); overflow-wrap: anywhere; }
.card .edit {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  appearance: none; border: 1px solid var(--tip-line); background: rgba(0, 0, 0, 0.6);
  border-radius: 4px; padding: 2px 8px; font-size: 13px; cursor: pointer; color: var(--muted);
}
.card .edit:hover { color: var(--text); border-color: var(--bronze-hi); }
.empty { grid-column: 1 / -1; text-align: center; padding: 40px 16px; color: var(--muted); }
.empty img { margin: 0 auto 12px; width: 56px; height: 56px; border-radius: 10px; opacity: 0.8; }

/* ---------- Hoguera ---------- */
.campfire { position: relative; display: flex; justify-content: center; margin: -4px 0 18px; }
.campfire canvas { display: block; max-width: 100%; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; touch-action: manipulation; }
.campfire-tip {
  position: absolute; transform: translate(-50%, -100%);
  display: grid; justify-items: center; gap: 1px;
  padding: 5px 10px; border-radius: 4px;
  background: var(--tip-bg); border: 1px solid var(--tip-line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  font-size: 14px; white-space: nowrap; pointer-events: none; z-index: 2;
}
.campfire-tip[hidden] { display: none; }
.campfire-tip span { font-size: 12px; color: var(--muted); }
.card.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 2px var(--c), 0 0 36px color-mix(in srgb, var(--c) 60%, transparent); } }

/* ---------- Admin ---------- */
.admin { border-color: rgba(208, 52, 44, 0.4); }
.trash { display: grid; gap: 8px; }
.trash-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(0, 0, 0, 0.3); }
.trash-row img { width: 32px; height: 32px; border-radius: 50%; }
.trash-row .grow { flex: 1; min-width: 0; }
.trash-row .btn { padding: 5px 12px; font-size: 14px; }

/* ---------- Diálogo ---------- */
.dialog {
  width: min(700px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  color: var(--text);
  background: linear-gradient(to bottom, #111a2e, #080d19);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  box-shadow: 0 0 0 1px #000, 0 30px 90px rgba(0, 0, 0, 0.8), 0 0 60px rgba(92, 198, 214, 0.08);
}
.dialog[open] { animation: pop 0.2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.dialog::backdrop { background: rgba(2, 4, 10, 0.75); backdrop-filter: blur(4px); }
.dialog form { padding: 20px; display: grid; gap: 16px; }
.dialog-small { width: min(400px, calc(100vw - 24px)); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Vista previa del personaje en el formulario */
.preview {
  --c: var(--bronze);
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border-radius: 6px;
  background: radial-gradient(500px 100px at 0 50%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%), var(--tip-bg);
  border: 1px solid var(--tip-line);
  transition: background 0.3s;
}
.preview .portrait { flex: none; }
.preview .pv-name { font-weight: 700; font-size: 18px; color: var(--c); }
.preview .pv-line { font-size: 14px; color: var(--muted); }

.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: 14px; font-weight: 700; color: var(--bronze-hi); padding: 0; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.field > span { margin-bottom: 0; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row .grow { min-width: 0; }
input {
  width: 100%;
  font: inherit; color: var(--text);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 10px 12px;
}
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 209, 0, 0.15); }
input::placeholder { color: #5f6778; }

.picker { display: flex; flex-wrap: wrap; gap: 8px; }
.pick {
  appearance: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 78px; padding: 6px 4px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.35);
  font-size: 12px; line-height: 1.15; text-align: center;
  color: var(--muted);
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
}
.pick img { width: 42px; height: 42px; border-radius: 6px; border: 1px solid #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); transition: filter 0.12s; }
.pick:hover { color: var(--text); transform: translateY(-1px); }
.pick:hover img { filter: brightness(1.15); }
.pick[aria-pressed='true'] {
  border-color: var(--gold);
  background: rgba(255, 209, 0, 0.08);
  color: var(--text);
}
.pick[aria-pressed='true'] img { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(255, 209, 0, 0.45); }
.picker-faction .pick { width: 150px; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 8px 12px; font-size: 17px; font-family: var(--display); }
.picker-faction .pick img { width: 36px; height: 36px; border-radius: 50%; }
.picker-faction .pick[data-v='alliance'][aria-pressed='true'] { border-color: var(--alliance); background: rgba(61, 127, 224, 0.18); }
.picker-faction .pick[data-v='alliance'][aria-pressed='true'] img { box-shadow: 0 0 0 2px var(--alliance), 0 0 16px rgba(61, 127, 224, 0.6); }
.picker-faction .pick[data-v='horde'][aria-pressed='true'] { border-color: var(--horde); background: rgba(208, 52, 44, 0.18); }
.picker-faction .pick[data-v='horde'][aria-pressed='true'] img { box-shadow: 0 0 0 2px var(--horde), 0 0 16px rgba(208, 52, 44, 0.6); }
.picker .hint { color: var(--muted); font-size: 14px; font-style: italic; }

.gender { display: inline-flex; gap: 4px; }
.gender button, .segmented button {
  appearance: none; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.35); color: var(--muted);
  padding: 2px 10px; border-radius: 5px; font-size: 14px; font-weight: 400;
}
.gender button[aria-pressed='true'], .segmented button[aria-pressed='true'] { border-color: var(--gold); color: var(--text); background: rgba(255, 209, 0, 0.12); }
.segmented { display: flex; gap: 6px; }
.segmented button { padding: 9px 18px; font-size: 15px; }

.form-error { margin: 0; color: #ff9b92; min-height: 1.2em; font-size: 15px; }
.form-error:empty { display: none; }

/* ---------- Pie / aviso ---------- */
.foot { max-width: 1120px; margin: 0 auto; padding: 0 16px 32px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(20px);
  background: var(--tip-bg); border: 1px solid var(--bronze); color: var(--gold);
  padding: 10px 16px; border-radius: 6px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s; max-width: calc(100vw - 32px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 860px) {
  .class-grid { grid-template-columns: repeat(5, 1fr); row-gap: 18px; }
  .class-bar { height: 56px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-bottom: 40px; }
  .logo { margin-bottom: -8px; }
  .orn { max-width: 40px; }
  .countdown { gap: 6px; }
  .countdown .unit { min-width: 0; flex: 1; max-width: 76px; padding: 8px 4px 6px; }
  .countdown .num { font-size: 24px; }
  .panel { padding: 16px; }
  .versus { grid-template-columns: 1fr 1fr; }
  .vs { display: none; }
  .side { padding: 16px 14px; }
  .crest-big { width: 44px; height: 44px; }
  .side-name { font-size: 16px; }
  .side-num { font-size: 34px; }
  .avatars img { width: 26px; height: 26px; }
  .class-grid { grid-template-columns: repeat(3, 1fr); }
  .class-bar { height: 44px; }
  .party { grid-template-columns: 1fr; gap: 10px; }
  .role-card { padding: 10px 12px; }
  .role-card > img { width: 40px; height: 40px; }
  .field-row { grid-template-columns: 1fr; }
  .pick { width: calc((100% - 24px) / 4); }
  .picker-faction .pick { width: calc((100% - 8px) / 2); }
  .roster { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
