/* ══════════════════════════════════════════════════════════════════════════
   FORJA DEL TITÁN — hoja de estilo
   Dirección visual: metal caliente sobre carbón. HUD de juego, no dashboard.
   ══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg:        #08090d;
  --bg-2:      #0d0f15;
  --panel:     #12141c;
  --panel-2:   #171a24;
  --panel-3:   #1e2230;
  --line:      #262b3a;
  --line-2:    #333a4d;

  --txt:       #e8eaf0;
  --txt-2:     #a4abbd;
  --txt-3:     #6b7285;

  --ember:     #ff7a2f;
  --ember-2:   #ff9f5c;
  --ember-dim: #7a3a15;
  --gold:      #e8b552;
  --arcane:    #8b5cf6;
  --arcane-2:  #b18cff;
  --ice:       #5fd4ff;
  --blood:     #ff4d6d;
  --leaf:      #63d68f;

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;

  --shadow: 0 10px 34px rgba(0,0,0,.55);
  --glow-ember: 0 0 24px rgba(255,122,47,.30);

  --font-display: 'Cinzel', Georgia, serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --nav-w: 232px;
  --top-h: 66px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Textura de fondo: brasas lejanas */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 620px at 12% -8%,  rgba(255,122,47,.13), transparent 62%),
    radial-gradient(760px 540px at 92% 4%,   rgba(139,92,246,.11), transparent 60%),
    radial-gradient(1000px 700px at 50% 108%, rgba(95,212,255,.07), transparent 65%),
    var(--bg);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .30;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: #454e66; }

h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: .01em; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--ember-2); }

.ic { flex: none; vertical-align: -.15em; }

/* ═══ LAYOUT ═══════════════════════════════════════════════════════════════ */

#app { min-height: 100vh; }

.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100vh; }

/* ── Barra superior ── */
.topbar {
  position: sticky; top: 0; z-index: 60;
  height: var(--top-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px;
  background: rgba(10,12,17,.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-hero { display: flex; align-items: center; gap: 13px; min-width: 0; }
.lvl-badge {
  position: relative; width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900; font-size: 17px;
  color: #12140f;
  background: linear-gradient(160deg, #ffd98b, var(--gold) 45%, #a97c22);
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  box-shadow: 0 0 18px rgba(232,181,82,.35);
}
.hero-meta { min-width: 0; }
.hero-name {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-title { font-size: 11.5px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .09em; }

.xpwrap { flex: 1; min-width: 90px; max-width: 340px; }
.xpwrap .lbl { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--txt-3);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 5px; }
.bar { height: 8px; background: #0a0c12; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.bar > i {
  display: block; height: 100%; border-radius: 20px;
  background: linear-gradient(90deg, var(--ember-dim), var(--ember) 55%, var(--gold));
  box-shadow: 0 0 12px rgba(255,122,47,.55);
  transition: width .5s cubic-bezier(.2,.8,.2,1);
}

.wallet { display: flex; gap: 6px; margin-left: auto; }
.coin {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 20px;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.coin small { font-size: 13px; }
.coin.gold  { color: var(--gold); }
.coin.gem   { color: var(--arcane-2); }
.coin.seal  { color: var(--ember-2); }
.coin.key   { color: var(--ice); }
.coin.streak{ color: #ff9a6a; }
.coin.pulse { animation: coinPop .5s ease; }
@keyframes coinPop { 0%{transform:scale(1)} 40%{transform:scale(1.22)} 100%{transform:scale(1)} }

/* ── Navegación ── */
.nav {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column;
  padding: 20px 14px;
  background: linear-gradient(180deg, #0c0e14, #090a0f);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand-mark {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: 11px; color: #14100a;
  background: linear-gradient(150deg, var(--ember-2), var(--ember) 50%, #b4441a);
  box-shadow: var(--glow-ember);
}
.brand-txt { font-family: var(--font-display); font-weight: 900; font-size: 15px; line-height: 1.1; }
.brand-txt small { display: block; font-family: var(--font); font-weight: 600;
  font-size: 9.5px; letter-spacing: .18em; color: var(--txt-3); text-transform: uppercase; }

.nav-list { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--txt-2); font-size: 14px; font-weight: 600;
  border: 1px solid transparent; text-align: left; width: 100%;
  transition: background .16s, color .16s, border-color .16s;
}
.nav-item:hover { background: var(--panel); color: var(--txt); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(255,122,47,.16), rgba(255,122,47,.04));
  color: #ffd0ac; border-color: rgba(255,122,47,.32);
}
.nav-item.active .ic { color: var(--ember); }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 10px;
  background: var(--ember); color: #12100c; font-size: 11px; font-weight: 800;
}
.nav-badge.dim { background: var(--line-2); color: var(--txt-2); }
.nav-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.act-chip {
  display: block; padding: 11px 12px; border-radius: 11px;
  background: var(--panel); border: 1px solid var(--line);
}
.act-chip .k { font-size: 10px; letter-spacing: .14em; color: var(--txt-3); text-transform: uppercase; }
.act-chip .v { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--gold); }
.act-chip .d { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }

/* ── Contenido ── */
.main { min-width: 0; display: flex; flex-direction: column; }
.view { padding: 26px 30px 90px; max-width: 1280px; width: 100%; margin: 0 auto; }
.view-head { margin-bottom: 22px; }
.view-head h1 { font-size: 27px; font-weight: 900; letter-spacing: .02em; }
.view-head p { color: var(--txt-3); font-size: 13.5px; margin-top: 4px; }

/* ═══ PIEZAS ═══════════════════════════════════════════════════════════════ */

.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow);
}
.panel-pad { padding: 18px; }
.panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 14.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.panel-head .sub { margin-left: auto; font-size: 12px; color: var(--txt-3); }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: minmax(0,380px) minmax(0,1fr); gap: 18px; align-items: start; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  background: var(--panel-3); border: 1px solid var(--line-2);
  font-size: 13.5px; font-weight: 700; color: var(--txt);
  transition: transform .12s, background .16s, border-color .16s, box-shadow .16s;
}
.btn:hover:not(:disabled) { background: #262b3b; border-color: #444d66; transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(160deg, var(--ember-2), var(--ember) 55%, #c9521c);
  border-color: #ff9a5c; color: #17100a; box-shadow: 0 4px 18px rgba(255,122,47,.28);
}
.btn-primary:hover:not(:disabled) { background: linear-gradient(160deg, #ffb27c, #ff8b45 55%, #d85c22); }
.btn-gold { background: linear-gradient(160deg,#ffdf9b,var(--gold) 55%,#a97c22); border-color:#ffd98b; color:#1a1509; }
.btn-arcane { background: linear-gradient(160deg,#a98bff,var(--arcane) 60%,#5b34c4); border-color:#b18cff; color:#0f0a1c; }
.btn-danger { background: linear-gradient(160deg,#ff7a90,#e03050 60%,#a01c34); border-color:#ff8fa2; color:#1a0a0e; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--txt-2); }
.btn-ghost:hover:not(:disabled) { background: var(--panel-2); color: var(--txt); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--panel-3); border: 1px solid var(--line-2); color: var(--txt-2);
}
.tag.done { background: rgba(99,214,143,.14); border-color: rgba(99,214,143,.4); color: var(--leaf); }
.tag.lock { background: rgba(255,77,109,.1); border-color: rgba(255,77,109,.32); color: #ff8fa2; }

.muted { color: var(--txt-3); }
.hint  { font-size: 12.5px; color: var(--txt-3); }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

.empty { padding: 44px 20px; text-align: center; color: var(--txt-3); }
.empty .ic { opacity: .35; margin-bottom: 10px; }

/* ═══ AVATAR ═══════════════════════════════════════════════════════════════ */

.avatar-stage {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(ellipse 78% 52% at 50% 96%, rgba(255,122,47,.16), transparent 70%),
    linear-gradient(180deg, #0f1119, #08090d 72%);
  border: 1px solid var(--line);
}
.avatar-stage::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.014) 3px 4px);
  pointer-events: none;
}
.avatar-floor {
  position: absolute; left: 50%; bottom: 8%; width: 62%; height: 26px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255,122,47,.28), transparent 72%);
  filter: blur(6px);
}
.avatar-svg { display: block; width: 100%; height: auto; position: relative; }
.avatar-svg .av-body { animation: breathe 4.4s ease-in-out infinite; transform-box: fill-box; }
@keyframes breathe {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50%      { transform: translateY(-3px) scaleY(1.012); }
}
.avatar-svg .av-cape { animation: capeSway 5.6s ease-in-out infinite; transform-origin: 160px 130px; }
@keyframes capeSway { 0%,100% { transform: skewX(0deg); } 50% { transform: skewX(2.4deg); } }
.avatar-svg .halo { animation: haloSpin 9s linear infinite; transform-origin: 160px 60px; }
@keyframes haloSpin { to { transform: rotate(360deg); } }
.avatar-svg .spark { animation: rise linear infinite; }
@keyframes rise {
  0%   { transform: translateY(0) scale(1); opacity: 0; }
  15%  { opacity: .95; }
  100% { transform: translateY(-230px) scale(.3); opacity: 0; }
}
.avatar-svg .bolt { animation: flick 2.6s steps(2) infinite; }
.bolt-1{animation-delay:.3s}.bolt-2{animation-delay:.7s}.bolt-3{animation-delay:1.1s}
.bolt-4{animation-delay:1.5s}.bolt-5{animation-delay:1.9s}
@keyframes flick { 0%,88%,100%{opacity:0} 90%,96%{opacity:.85} }

.avatar-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(6,7,10,.94) 62%);
}
.avatar-caption .stage-name {
  font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--gold);
  text-shadow: 0 0 18px rgba(232,181,82,.32);
}
.avatar-caption .stage-ep { font-size: 12.5px; color: var(--txt-2); margin-top: 2px; }
.avatar-caption .stage-q { font-size: 12px; color: var(--txt-3); font-style: italic; margin-top: 7px; }

.stage-rail { display: flex; gap: 3px; margin-top: 12px; }
.stage-rail i {
  flex: 1; height: 4px; border-radius: 4px; background: var(--line);
  transition: background .3s, box-shadow .3s;
}
.stage-rail i.on { background: linear-gradient(90deg, var(--ember), var(--gold)); box-shadow: 0 0 8px rgba(255,122,47,.6); }
.stage-rail i.cur { background: var(--gold); box-shadow: 0 0 12px rgba(232,181,82,.8); }

/* ═══ ACTIVIDADES ══════════════════════════════════════════════════════════ */

.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 11px; }
.act-card {
  position: relative; display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 13px 13px 14px; border-radius: 12px; text-align: left;
  background: var(--panel-2); border: 1px solid var(--line);
  transition: transform .14s, border-color .16s, background .16s;
  overflow: hidden;
}
.act-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ac, var(--line-2)); opacity: .55; transition: opacity .16s;
}
.act-card:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--panel-3); }
.act-card:hover::before { opacity: 1; }
.act-card.on {
  background: linear-gradient(150deg, rgba(255,255,255,.05), transparent), var(--panel-3);
  border-color: color-mix(in srgb, var(--ac) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ac) 22%, transparent), 0 6px 20px rgba(0,0,0,.4);
}
.act-card.on::before { opacity: 1; }
.act-ico {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  border-radius: 10px; color: var(--ac);
  background: color-mix(in srgb, var(--ac) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ac) 30%, transparent);
}
.act-card.on .act-ico { background: var(--ac); color: #10110f; }
.act-body { min-width: 0; flex: 1; }
.act-name { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.act-tag { font-size: 10.5px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .07em; margin-top: 2px; }
.act-gain { display: flex; gap: 8px; margin-top: 7px; font-size: 11px; font-weight: 700; }
.act-gain span { color: var(--txt-3); }
.act-gain .xp { color: var(--gold); }
.act-check {
  position: absolute; top: 11px; right: 11px; width: 20px; height: 20px;
  border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center;
  color: transparent; transition: all .18s;
}
.act-card.on .act-check { background: var(--ac); border-color: var(--ac); color: #10110f; }

/* ═══ MISIONES ═════════════════════════════════════════════════════════════ */

.quest {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line);
  transition: border-color .16s, background .16s;
}
.quest.done { border-color: rgba(99,214,143,.34); background: linear-gradient(90deg, rgba(99,214,143,.07), transparent); }
.quest.claimed { opacity: .5; }
.quest-mark {
  width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center;
  background: var(--panel-3); border: 1px solid var(--line-2); color: var(--txt-3);
}
.quest.done .quest-mark { background: rgba(99,214,143,.16); border-color: rgba(99,214,143,.45); color: var(--leaf); }
.quest-body { flex: 1; min-width: 0; }
.quest-name { font-size: 14px; font-weight: 700; }
.quest-desc { font-size: 12.5px; color: var(--txt-3); margin-top: 1px; }
.quest-prog { display: flex; align-items: center; gap: 9px; margin-top: 8px; }
.quest-prog .bar { flex: 1; height: 5px; }
.quest-prog .bar > i { background: linear-gradient(90deg, var(--leaf), #9ff0bd); box-shadow: none; }
.quest-prog .n { font-size: 11.5px; font-weight: 700; color: var(--txt-3); font-variant-numeric: tabular-nums; }
.quest-rew { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.quest-rew .amts { display: flex; gap: 8px; font-size: 11.5px; font-weight: 700; }

/* ═══ EQUIPO / INVENTARIO ══════════════════════════════════════════════════ */

.slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.slot {
  position: relative; aspect-ratio: 1; border-radius: 11px;
  background: var(--panel-2); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--txt-3);
  transition: transform .14s, border-color .16s, box-shadow .16s;
  overflow: hidden;
}
.slot:hover { transform: translateY(-2px); border-color: var(--line-2); }
.slot.filled { border-color: var(--rc); box-shadow: inset 0 0 24px color-mix(in srgb, var(--rc) 16%, transparent); color: var(--rc); }
.slot.filled::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--rc);
}
.slot .slot-label {
  position: absolute; bottom: 5px; left: 0; right: 0; text-align: center;
  font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--txt-3);
}
.slot.filled .slot-label { color: color-mix(in srgb, var(--rc) 78%, white); }
.slot .ilvl {
  position: absolute; top: 4px; right: 6px; font-size: 9.5px; font-weight: 800; color: var(--txt-3);
}

.item-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border-radius: 11px; background: var(--panel-2);
  border: 1px solid var(--line); border-left: 3px solid var(--rc);
  transition: background .15s, transform .12s;
}
.item-row:hover { background: var(--panel-3); transform: translateX(2px); }
.item-row.sel { background: color-mix(in srgb, var(--rc) 12%, var(--panel-3)); border-color: var(--rc); }
.item-ico {
  width: 38px; height: 38px; flex: none; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--rc) 13%, transparent); color: var(--rc);
  border: 1px solid color-mix(in srgb, var(--rc) 30%, transparent);
}
.item-main { flex: 1; min-width: 0; }
.item-name { font-size: 13.5px; font-weight: 700; color: var(--rc);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { font-size: 11.5px; color: var(--txt-3); }
.item-affixes { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; }
.item-affixes span { font-size: 11.5px; color: #9fd8ff; }
.item-actions { display: flex; gap: 6px; flex: none; }
.item-score { font-size: 12px; font-weight: 800; color: var(--txt-2); font-variant-numeric: tabular-nums; }
.score-up { color: var(--leaf); }
.score-down { color: #ff8fa2; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--txt-2);
}
.chip:hover { border-color: var(--line-2); color: var(--txt); }
.chip.on { background: rgba(255,122,47,.15); border-color: rgba(255,122,47,.45); color: #ffc9a6; }

/* ═══ JEFES ════════════════════════════════════════════════════════════════ */

.boss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 16px; }
.boss-card {
  position: relative; border-radius: var(--r); overflow: hidden;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); text-align: left; width: 100%;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.boss-card:hover:not(.locked) { transform: translateY(-4px); border-color: var(--bc); box-shadow: 0 14px 40px rgba(0,0,0,.55); }
.boss-card.locked { opacity: .52; filter: grayscale(.7); cursor: not-allowed; }
.boss-card.dead .boss-art { filter: grayscale(1) brightness(.5); }
.boss-art {
  position: relative; height: 190px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 62%, color-mix(in srgb, var(--bc) 34%, transparent), transparent 70%);
  /* `contain: paint` acota el repintado de cada monstruo a su tarjeta.
     Nada de `content-visibility: auto` aquí: con estas tarjetas entra en un
     bucle de relayout que congela el proceso de render. */
  contain: paint;
}
.boss-art .mon-svg { width: 178px; height: 178px; }
.boss-art::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 52%, var(--panel) 98%);
}
.boss-info { padding: 14px 16px 16px; position: relative; }
.boss-act {
  position: absolute; top: -30px; left: 16px; z-index: 2;
  font-family: var(--font-display); font-weight: 900; font-size: 11px; letter-spacing: .14em;
  padding: 4px 10px; border-radius: 20px; text-transform: uppercase;
  background: rgba(8,9,13,.82); border: 1px solid var(--bc); color: var(--bc);
}
.boss-name { font-family: var(--font-display); font-weight: 700; font-size: 17.5px; line-height: 1.15; }
.boss-title { font-size: 11.5px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .09em; margin-top: 2px; }
.boss-lore { font-size: 12.5px; color: var(--txt-2); margin-top: 9px; line-height: 1.5; }
.boss-stats { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.stat-pill {
  display: flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px;
  background: var(--panel-3); border: 1px solid var(--line); font-size: 11.5px; font-weight: 700;
}
.boss-dead-stamp {
  position: absolute; top: 62px; left: 50%; transform: translate(-50%,-50%) rotate(-13deg); z-index: 3;
  font-family: var(--font-display); font-weight: 900; font-size: 23px; letter-spacing: .12em;
  color: var(--blood); border: 4px solid var(--blood); padding: 5px 16px; border-radius: 6px;
  opacity: .9; text-shadow: 0 0 12px rgba(255,77,109,.5);
}
.crack-note { margin-top: 9px; font-size: 11.5px; color: var(--ember-2); }

/* ═══ ANIMACIONES DE MONSTRUOS ═════════════════════════════════════════════ */

.mon-svg { display: block; }
.mon-svg .mon-breathe { animation: monBreathe 3.4s ease-in-out infinite; transform-origin: center 70%; }
@keyframes monBreathe { 0%,100%{transform:scale(1)} 50%{transform:scale(1.035,.975)} }
.mon-svg .mon-float { animation: monFloat 4.2s ease-in-out infinite; }
@keyframes monFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-11px)} }
.mon-svg .mon-jaw { animation: monJaw 2.9s ease-in-out infinite; transform-origin: center top; }
@keyframes monJaw { 0%,72%,100%{transform:scaleY(1)} 84%{transform:scaleY(1.22)} }
.mon-svg .mon-spin { animation: monSpin 26s linear infinite; transform-origin: 160px 160px; }
.mon-svg .mon-spin-rev { animation: monSpin 18s linear infinite reverse; transform-origin: 160px 160px; }
@keyframes monSpin { to { transform: rotate(360deg); } }
.mon-svg .mon-pupil { animation: monLook 5.2s ease-in-out infinite; }
@keyframes monLook { 0%,100%{transform:translate(0,0)} 30%{transform:translate(3px,-1px)} 65%{transform:translate(-3px,1px)} }
.mon-svg .mon-hand-h { animation: monSpin 12s steps(12) infinite; transform-origin: 160px 146px; }
.mon-svg .mon-hand-m { animation: monSpin 3s linear infinite; transform-origin: 160px 146px; }
.mon-svg .mon-drip { animation: drip 2.6s ease-in infinite; }
@keyframes drip { 0%{transform:translateY(0);opacity:.8} 70%{transform:translateY(16px);opacity:.5} 100%{transform:translateY(24px);opacity:0} }
.mon-svg .mon-spike { animation: spikePulse 2.4s ease-in-out infinite; transform-origin: 160px 176px; }
@keyframes spikePulse { 0%,100%{opacity:.6} 50%{opacity:1} }
.mon-svg .mon-ring { animation: ringPulse 3.2s ease-out infinite; transform-origin: 160px 176px; }
@keyframes ringPulse { 0%{transform:scale(.85);opacity:.5} 100%{transform:scale(1.2);opacity:0} }
.mon-svg .mon-reflect { animation: wobble 5s ease-in-out infinite; transform-origin: 160px 180px; }
@keyframes wobble { 0%,100%{transform:skewX(0) scale(1)} 33%{transform:skewX(3deg) scale(1.02,.99)} 66%{transform:skewX(-3deg) scale(.99,1.01)} }
.mon-svg .mon-shard { animation: monFloat 3.6s ease-in-out infinite; }
.shard-1{animation-delay:.4s}.shard-2{animation-delay:.9s}.shard-3{animation-delay:1.3s}
.mon-svg .mon-sand { animation: sandFall 3s ease-in infinite; transform-origin: center top; }
@keyframes sandFall { 0%{transform:scaleY(1)} 100%{transform:scaleY(.05)} }
.mon-svg .mon-feed { animation: feedScroll 1.8s linear infinite; }
.feed-1{animation-delay:.2s}.feed-2{animation-delay:.4s}.feed-3{animation-delay:.6s}.feed-4{animation-delay:.8s}
@keyframes feedScroll { 0%{opacity:0;transform:translateY(10px)} 20%,80%{opacity:.7} 100%{opacity:0;transform:translateY(-16px)} }
.mon-svg .mon-shadow { animation: shadowPulse 4.6s ease-in-out infinite; transform-origin: 160px 200px; }
@keyframes shadowPulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.03);opacity:.88} }
.mon-svg .wisp { animation: wispRise 4s ease-in-out infinite; }
.wisp-1{animation-delay:.3s}.wisp-2{animation-delay:.7s}.wisp-3{animation-delay:1s}
.wisp-4{animation-delay:1.4s}.wisp-5{animation-delay:1.8s}.wisp-6{animation-delay:2.2s}.wisp-7{animation-delay:2.6s}
@keyframes wispRise { 0%{opacity:0;transform:translateY(20px)} 40%{opacity:.6} 100%{opacity:0;transform:translateY(-40px)} }
.mon-svg .spark { animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%,100%{opacity:.2;transform:scale(.7)} 50%{opacity:1;transform:scale(1.3)} }

/* Monstruos de rejilla: sin animación. Con doce a la vez el rasterizado de
   SVG (rotaciones, dasharray, partículas) se come todos los fotogramas. */
.mon-svg.mon-static * { animation: none !important; }

.mon-chip { display: inline-block; }
.mon-chip .mon-svg { width: 100%; height: 100%; }

/* ═══ COMBATE ══════════════════════════════════════════════════════════════ */

.fight {
  position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 50% 30%, #16121c, #06070a 70%);
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.fight::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.012) 3px 4px);
}
.fight-top { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.fight-arena { flex: 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px;
  padding: 10px 26px; position: relative; min-height: 0; }
.fight-side { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 0; }
.fight-side .art { width: min(100%, 300px); aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.fight-side .art > * { width: 100%; height: 100%; }
.fight-side.hit .art { animation: hitShake .34s; }
@keyframes hitShake {
  0%,100%{transform:translateX(0)} 20%{transform:translateX(-11px)}
  45%{transform:translateX(9px)} 70%{transform:translateX(-5px)}
}
.fight-side.hit .art::after {
  content: ''; position: absolute; inset: 0; background: rgba(255,80,80,.34);
  mix-blend-mode: screen; animation: flashOut .34s;
}
@keyframes flashOut { to { opacity: 0 } }
.fight-side.crit .art::after { background: rgba(255,220,120,.5); }

.hpbar { width: 100%; max-width: 340px; }
.hpbar .nm { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.hpbar .nm b { font-family: var(--font-display); font-size: 15px; }
.hpbar .nm span { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--txt-2);
  font-variant-numeric: tabular-nums; }
.hpbar .track { height: 15px; background: #0a0c12; border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; position: relative; }
.hpbar .fill { height: 100%; transition: width .35s cubic-bezier(.2,.8,.2,1); }
.hpbar.enemy .fill { background: linear-gradient(90deg, #8a1f34, var(--blood)); }
.hpbar.hero  .fill { background: linear-gradient(90deg, #1f6b3a, var(--leaf)); }
.hpbar .shield-fill { position: absolute; inset: 0; height: 100%;
  background: linear-gradient(90deg, #3d5a8a, #7fb0ff); opacity: .85; transition: width .35s; }
.hpbar .ghost { position: absolute; inset: 0; height: 100%; background: rgba(255,255,255,.28);
  transition: width .9s ease .18s; }

.fight-mid {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 5;
}
.vs { font-family: var(--font-display); font-weight: 900; font-size: 30px; color: var(--txt-3); opacity: .5; }
.phase-tag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ember-2); }

.timing-bar {
  position: relative; height: 46px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #0d0f16, #090b11);
  border: 1px solid var(--line-2); cursor: pointer; user-select: none;
}
.timing-bar .zone {
  position: absolute; top: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(232,181,82,.45), rgba(255,122,47,.34));
  border-left: 2px solid var(--gold); border-right: 2px solid var(--gold);
  box-shadow: 0 0 22px rgba(232,181,82,.4) inset;
}
.timing-bar .zone.perfect {
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,220,140,.4));
}
.timing-bar .needle {
  position: absolute; top: -3px; bottom: -3px; width: 4px; border-radius: 3px;
  background: #fff; box-shadow: 0 0 16px #fff, 0 0 30px var(--ember);
  transform: translateX(-50%);
}
.timing-bar .hint-txt {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--txt-3);
  pointer-events: none;
}
.timing-bar.locked { cursor: default; opacity: .55; }

.fight-bottom { padding: 14px 22px 20px; border-top: 1px solid var(--line);
  background: rgba(8,9,13,.7); backdrop-filter: blur(10px); }
.fight-actions { display: flex; gap: 10px; margin-top: 11px; }
.fight-log {
  max-height: 92px; overflow-y: auto; margin-top: 11px;
  font-size: 12.5px; color: var(--txt-2); display: flex; flex-direction: column-reverse; gap: 4px;
}
.fight-log .ln { padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.035); }
.fight-log .ln b { color: var(--gold); }
.fight-log .ln.crit b { color: #fff2c8; }
.fight-log .ln.bad b { color: #ff8fa2; }

.dmg-pop {
  position: absolute; font-family: var(--font-display); font-weight: 900; font-size: 30px;
  pointer-events: none; animation: dmgFloat 1s ease-out forwards; z-index: 8;
  text-shadow: 0 3px 12px rgba(0,0,0,.8);
}
.dmg-pop.crit { font-size: 42px; color: #ffe08a; }
.dmg-pop.enemy-dmg { color: #ffb9c4; }
.dmg-pop.heal { color: var(--leaf); }
@keyframes dmgFloat {
  0%   { transform: translate(-50%,0) scale(.5); opacity: 0; }
  22%  { transform: translate(-50%,-26px) scale(1.14); opacity: 1; }
  100% { transform: translate(-50%,-84px) scale(.9); opacity: 0; }
}

.taunt {
  max-width: 620px; margin: 0 auto; text-align: center; font-style: italic;
  color: var(--txt-2); font-size: 14px; padding: 10px 0;
}

/* ═══ MAZMORRA ═════════════════════════════════════════════════════════════ */

.dgn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px,1fr)); gap: 15px; }
.dgn-card {
  position: relative; padding: 17px; border-radius: var(--r); text-align: left; width: 100%;
  background: linear-gradient(150deg, color-mix(in srgb, var(--dc) 16%, var(--panel)), var(--bg-2));
  border: 1px solid var(--line); transition: transform .16s, border-color .16s;
}
.dgn-card:hover:not(.locked) { transform: translateY(-3px); border-color: var(--dc); }
.dgn-card.locked { opacity: .48; filter: grayscale(.6); cursor: not-allowed; }
.dgn-card .n { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.dgn-card .s { font-size: 12px; color: var(--txt-3); font-style: italic; margin-top: 2px; }
.dgn-card .meta { display: flex; gap: 7px; margin-top: 12px; flex-wrap: wrap; }

.rooms { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.room-dot {
  flex: 1; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 11px; font-weight: 800; color: var(--txt-3);
}
.room-dot.done { background: rgba(99,214,143,.16); border-color: rgba(99,214,143,.4); color: var(--leaf); }
.room-dot.cur { background: rgba(255,122,47,.2); border-color: var(--ember); color: var(--ember-2);
  animation: roomPulse 1.6s ease-in-out infinite; }
@keyframes roomPulse { 0%,100%{box-shadow:0 0 0 0 rgba(255,122,47,.4)} 50%{box-shadow:0 0 0 6px rgba(255,122,47,0)} }
.room-dot.elite { border-color: var(--gold); color: var(--gold); }

/* ═══ HABILIDADES ══════════════════════════════════════════════════════════ */

.tree { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.branch { padding: 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.branch-head { display: flex; align-items: center; gap: 11px; margin-bottom: 6px; }
.branch-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brc) 15%, transparent); color: var(--brc);
  border: 1px solid color-mix(in srgb, var(--brc) 34%, transparent); }
.branch-head h3 { font-size: 16px; }
.branch-head .sp { font-size: 11.5px; color: var(--txt-3); }
.branch-tiers { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.tier-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--txt-3);
  display: flex; align-items: center; gap: 8px; }
.tier-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.skill {
  display: flex; gap: 11px; padding: 11px 12px; border-radius: 11px; text-align: left; width: 100%;
  background: var(--panel-2); border: 1px solid var(--line); transition: all .15s;
}
.skill:hover:not(:disabled) { border-color: var(--brc); background: var(--panel-3); }
.skill:disabled { opacity: .45; cursor: not-allowed; }
.skill.maxed { border-color: color-mix(in srgb, var(--brc) 55%, transparent);
  background: color-mix(in srgb, var(--brc) 10%, var(--panel-2)); }
.skill-rank { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center;
  font-weight: 800; font-size: 12.5px; background: var(--panel-3); border: 1px solid var(--line-2); }
.skill.has .skill-rank { background: var(--brc); color: #0d0d12; border-color: var(--brc); }
.skill-name { font-size: 13px; font-weight: 700; }
.skill-desc { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; line-height: 1.4; }

/* ═══ AÑO / CALENDARIO ═════════════════════════════════════════════════════ */

.year-map { display: grid; grid-template-columns: repeat(auto-fill, 15px); gap: 3px; }
.day-cell {
  width: 15px; height: 15px; border-radius: 3px;
  background: #1c2030; border: 1px solid rgba(255,255,255,.06);
  transition: transform .12s, box-shadow .12s;
}
.day-cell:hover { transform: scale(1.45); z-index: 3; box-shadow: 0 0 0 1.5px var(--ember); }
.day-cell.l1 { background: #3a2a18; }
.day-cell.l2 { background: #6b4520; }
.day-cell.l3 { background: #a86428; }
.day-cell.l4 { background: #e08a34; }
.day-cell.l5 { background: linear-gradient(135deg,#ffb35c,var(--gold)); box-shadow: 0 0 8px rgba(232,181,82,.5); }
.day-cell.rest { background: #1c2a3a; border-color: rgba(95,212,255,.2); }
.day-cell.today { box-shadow: 0 0 0 2px var(--ice); }
/* Los días que faltan siguen visibles: el mapa debe leerse como un año entero,
   no como una racha que se corta en el día de hoy. */
.day-cell.future { background: #101320; border-style: dashed; border-color: rgba(255,255,255,.09); }

.legend { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--txt-3); }
.legend i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }

.kpi { padding: 15px 16px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.kpi .k { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--txt-3); }
.kpi .v { font-family: var(--font-display); font-weight: 900; font-size: 25px; margin-top: 5px; }
.kpi .d { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }
.kpi.ember .v { color: var(--ember-2); }
.kpi.gold  .v { color: var(--gold); }
.kpi.ice   .v { color: var(--ice); }
.kpi.leaf  .v { color: var(--leaf); }

/* ═══ LOGROS ═══════════════════════════════════════════════════════════════ */

.ach {
  display: flex; align-items: center; gap: 13px; padding: 13px 15px;
  border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line);
}
.ach.got { border-color: rgba(232,181,82,.4);
  background: linear-gradient(90deg, rgba(232,181,82,.09), transparent); }
.ach-ico { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: var(--panel-3); border: 1px solid var(--line-2); color: var(--txt-3); }
.ach.got .ach-ico { background: linear-gradient(150deg, var(--gold), #a97c22); color: #191307; border-color: var(--gold); }
.ach-name { font-size: 13.5px; font-weight: 700; }
.ach.got .ach-name { color: var(--gold); }
.ach-desc { font-size: 12px; color: var(--txt-3); }
.ach-rew { margin-left: auto; text-align: right; font-size: 11.5px; font-weight: 700; flex: none; }

/* ═══ MODALES Y AVISOS ═════════════════════════════════════════════════════ */

.overlay {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px;
  background: rgba(4,5,8,.82); backdrop-filter: blur(8px); animation: fadeIn .2s ease;
}
.modal {
  width: min(560px, 100%); max-height: 86vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
  animation: modalIn .3s cubic-bezier(.2,.9,.25,1);
}
.modal.wide { width: min(880px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(22px) scale(.97) } to { opacity: 1; transform: none } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.x-btn { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  color: var(--txt-3); border: 1px solid var(--line); }
.x-btn:hover { color: var(--txt); background: var(--panel-3); }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 400;
  display: flex; flex-direction: column; gap: 9px; pointer-events: none; max-width: 340px; }
.toast {
  display: flex; align-items: center; gap: 11px; padding: 12px 15px; border-radius: 12px;
  background: rgba(18,20,28,.97); border: 1px solid var(--line-2);
  box-shadow: 0 12px 34px rgba(0,0,0,.6); font-size: 13.5px; font-weight: 600;
  animation: toastIn .34s cubic-bezier(.2,.9,.25,1); pointer-events: auto;
}
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(46px) } to { opacity: 1; transform: none } }
@keyframes toastOut { to { opacity: 0; transform: translateX(46px) } }
.toast .ti { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; }
.toast.gold .ti { background: rgba(232,181,82,.18); color: var(--gold); }
.toast.xp .ti { background: rgba(255,122,47,.18); color: var(--ember-2); }
.toast.win .ti { background: rgba(99,214,143,.18); color: var(--leaf); }
.toast.bad .ti { background: rgba(255,77,109,.18); color: var(--blood); }
.toast.arcane .ti { background: rgba(139,92,246,.2); color: var(--arcane-2); }

/* Subida de nivel */
.levelup-burst {
  position: fixed; inset: 0; z-index: 350; pointer-events: none; display: grid; place-items: center;
}
.levelup-burst .ring {
  position: absolute; width: 120px; height: 120px; border-radius: 50%;
  border: 3px solid var(--gold); animation: ringOut 1.3s ease-out forwards;
}
@keyframes ringOut { to { width: 900px; height: 900px; opacity: 0; border-width: 1px } }
.levelup-card {
  text-align: center; padding: 30px 44px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(24,20,14,.97), rgba(12,11,9,.97));
  border: 1px solid var(--gold); box-shadow: 0 0 70px rgba(232,181,82,.34);
  animation: modalIn .45s cubic-bezier(.2,.9,.25,1);
}
.levelup-card .k { font-size: 11.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.levelup-card .v { font-family: var(--font-display); font-weight: 900; font-size: 62px; line-height: 1;
  margin: 6px 0; background: linear-gradient(180deg, #fff3d0, var(--gold) 55%, #a97c22);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.levelup-card .d { font-size: 13.5px; color: var(--txt-2); }

/* Botín */
.loot-item {
  display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-radius: 12px;
  background: color-mix(in srgb, var(--rc) 9%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--rc) 42%, transparent);
  animation: lootIn .45s cubic-bezier(.2,.9,.25,1) backwards;
}
@keyframes lootIn { from { opacity: 0; transform: translateY(18px) scale(.94) } to { opacity: 1; transform: none } }

/* ═══ ONBOARDING ═══════════════════════════════════════════════════════════ */

.intro { min-height: 100vh; display: grid; place-items: center; padding: 30px 20px; }
.intro-card { width: min(660px, 100%); text-align: center; }
.intro-title {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(34px, 7vw, 62px);
  line-height: 1; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff0d4, var(--gold) 42%, #b4441a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 26px rgba(255,122,47,.35));
}
.intro-sub { color: var(--txt-2); font-size: 15px; margin-top: 14px; line-height: 1.65; }
.intro-form { margin-top: 30px; display: flex; flex-direction: column; gap: 13px; }
.field { text-align: left; }
.field label { display: block; font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--txt-3); margin-bottom: 6px; }
.input {
  width: 100%; padding: 13px 15px; border-radius: 11px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--txt); font-size: 14.5px;
  transition: border-color .16s, box-shadow .16s;
}
.input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255,122,47,.14); }
textarea.input { resize: vertical; min-height: 74px; }

.rules { display: grid; gap: 10px; margin-top: 26px; text-align: left; }
.rule { display: flex; gap: 12px; padding: 13px 15px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line); }
.rule .n { font-family: var(--font-display); font-weight: 900; font-size: 17px; color: var(--ember);
  flex: none; width: 22px; }
.rule .t { font-size: 13.5px; color: var(--txt-2); line-height: 1.55; }
.rule .t b { color: var(--txt); }

/* ═══ RESPONSIVE ═══════════════════════════════════════════════════════════ */

@media (max-width: 1080px) {
  .split { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .tree { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; z-index: 90;
    flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-right: none; border-top: 1px solid var(--line);
    background: rgba(9,10,15,.97); backdrop-filter: blur(18px);
  }
  .brand, .nav-foot { display: none; }
  .nav-list { flex-direction: row; width: 100%; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-item { flex-direction: column; gap: 3px; padding: 8px 6px; font-size: 9.5px; min-width: 62px;
    border-radius: 9px; text-align: center; letter-spacing: .02em; }
  .nav-item span.lbl { white-space: nowrap; }
  .nav-badge { position: absolute; top: 3px; right: 8px; min-width: 15px; height: 15px; font-size: 9px; padding: 0 4px; }
  .nav-item { position: relative; }
  .view { padding: 18px 15px 108px; }
  .topbar { padding: 0 14px; gap: 11px; height: 60px; }
  .xpwrap { display: none; }
  .wallet { gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .wallet::-webkit-scrollbar { display: none; }
  .coin { padding: 5px 8px; font-size: 12px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .slot-grid { grid-template-columns: repeat(4, 1fr); }
  .fight-arena { grid-template-columns: 1fr; gap: 4px; padding: 8px 14px; }
  .fight-side .art { width: min(60vw, 190px); }
  .fight-mid { position: static; transform: none; flex-direction: row; gap: 14px; }
  .vs { font-size: 18px; }
  .view-head h1 { font-size: 22px; }
  .boss-grid, .dgn-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 17px; }
  .toasts { left: 14px; right: 14px; bottom: 84px; max-width: none; }
}

@media (max-width: 420px) {
  .act-grid { grid-template-columns: 1fr; }
  .year-map { grid-template-columns: repeat(auto-fill, 12px); }
  .day-cell { width: 12px; height: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; }
}
body.reduce-motion .avatar-svg *, body.reduce-motion .mon-svg * { animation: none !important; }
