/* ============ SAURON DECK — tema Mordor ============ */
:root {
  --bg: #0b0705;
  --bg2: #120b06;
  --surface: #1a1009;
  --surface2: #221408;
  --line: #3a2412;
  --ember: #ff5a00;
  --ember2: #ff8a2a;
  --gold: #d4a941;
  --ash: #a89880;
  --text: #efe4d0;
  --dim: #b3a288;
  --danger: #ff3d2e;
  --u: #4aa3d4; --b: #9a7bb0; --r: #e04b3a; --c: #b8a88f;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, .hero-sub { font-family: 'Cinzel', serif; }
a { color: var(--ember2); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 4rem 1.5rem 5rem;
  background:
    radial-gradient(ellipse 80% 55% at 50% 28%, rgba(255,90,0,.16), transparent 60%),
    linear-gradient(180deg, #170c04 0%, var(--bg) 78%);
  border-bottom: 1px solid var(--line);
}
.hero-sky {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,170,80,.8), transparent 60%),
    radial-gradient(1px 1px at 32% 8%, rgba(255,200,120,.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 55% 14%, rgba(255,140,60,.7), transparent 60%),
    radial-gradient(1px 1px at 76% 10%, rgba(255,200,120,.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 22%, rgba(255,160,70,.7), transparent 60%),
    radial-gradient(1px 1px at 22% 34%, rgba(255,200,120,.4), transparent 60%),
    radial-gradient(1px 1px at 68% 30%, rgba(255,180,90,.5), transparent 60%);
  animation: emberFloat 9s ease-in-out infinite alternate;
}
@keyframes emberFloat { from { transform: translateY(0); } to { transform: translateY(-14px); } }

/* Ojo de Sauron */
.eye-wrap { position: relative; width: 240px; height: 220px; margin-bottom: 1rem; }
.eye-glow {
  position: absolute; left: 50%; top: 74px; transform: translate(-50%,-50%);
  width: 300px; height: 190px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,90,0,.55), rgba(255,60,0,.18) 55%, transparent 72%);
  filter: blur(14px);
  animation: pulse 3.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:.75; transform:translate(-50%,-50%) scale(1);} 50% { opacity:1; transform:translate(-50%,-50%) scale(1.09);} }
.eye {
  position: absolute; left: 50%; top: 74px; transform: translate(-50%,-50%);
  width: 190px; height: 118px; border-radius: 50%;
  background: radial-gradient(ellipse at center, #ffd27a 0%, #ff9c2e 26%, #ff5a00 52%, #c22b00 72%, #4a0e00 92%);
  box-shadow: 0 0 44px rgba(255,90,0,.75), 0 0 130px rgba(255,60,0,.4);
  overflow: hidden;
}
.eye-fire {
  position: absolute; inset: -22%;
  background:
    radial-gradient(ellipse 30% 46% at 28% 42%, rgba(255,236,170,.55), transparent 70%),
    radial-gradient(ellipse 26% 40% at 72% 60%, rgba(255,236,170,.4), transparent 70%);
  animation: flicker 1.5s ease-in-out infinite alternate;
}
@keyframes flicker { from { transform: rotate(-2.5deg) scale(1);} to { transform: rotate(2.5deg) scale(1.07);} }
.eye-pupil {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 21px; height: 108px; background: #0c0502; border-radius: 50%;
  box-shadow: 0 0 16px 5px rgba(20,4,0,.9);
  animation: pupil 6.5s ease-in-out infinite;
}
@keyframes pupil { 0%,100% { width:21px; } 50% { width:13px; } }
.tower {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 34px; height: 96px;
  background: linear-gradient(180deg, #1d0f05, #060302);
  clip-path: polygon(28% 0, 72% 0, 62% 12%, 84% 30%, 70% 34%, 78% 100%, 22% 100%, 30% 34%, 16% 30%, 38% 12%);
}
.hero-kicker { font-size: .82rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.hero h1 {
  font-size: clamp(3.4rem, 11vw, 7rem); font-weight: 800; letter-spacing: .1em;
  line-height: 1.02; margin-top: .4rem;
  background: linear-gradient(180deg, #ffe8b0 12%, var(--gold) 46%, #7a5216 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 60px rgba(255,120,20,.25);
}
.hero-sub { font-size: clamp(1rem, 3vw, 1.5rem); letter-spacing: .58em; text-indent: .58em; color: var(--ash); margin-top: .2rem; }
.hero-tag { margin-top: 1.1rem; font-style: italic; color: var(--dim); max-width: 34rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.6rem; }
.chip {
  background: rgba(255,90,0,.08); border: 1px solid var(--line);
  padding: .38rem .9rem; border-radius: 999px; font-size: .84rem; color: var(--dim);
}
.chip b { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.8rem; }
.btn {
  display: inline-block; padding: .72rem 1.5rem; border-radius: 8px;
  font: 600 .93rem 'IBM Plex Sans', sans-serif; letter-spacing: .03em;
  cursor: pointer; text-decoration: none; transition: .2s;
  border: 1px solid transparent;
}
.btn-ember { background: linear-gradient(180deg, #ff7a1a, #d43c00); color: #1b0800; box-shadow: 0 4px 24px rgba(255,90,0,.35); }
.btn-ember:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,90,0,.5); }
.btn-ghost { background: transparent; color: var(--gold); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); background: rgba(212,169,65,.07); }

/* ---------- SECCIONES ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 1.4rem; }
.section { padding: 4.2rem 0 1rem; }
.sec-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; color: var(--text);
  display: flex; align-items: baseline; gap: .8rem; margin-bottom: 1rem;
}
.sec-title span {
  color: var(--ember); font-size: .72em;
  border: 1px solid var(--line); border-radius: 6px; padding: .05em .5em;
  background: var(--surface);
}
.sec-lead { color: var(--dim); max-width: 52rem; margin-bottom: 1.8rem; }
.sec-lead strong, .engine-step strong { color: var(--ember2); font-weight: 600; }

/* Motor */
.engine { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 1rem; align-items: stretch; }
.engine-step {
  background: linear-gradient(180deg, var(--surface), var(--bg2));
  border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem;
}
.engine-num {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #ff9c2e, #c22b00); color: #1b0800;
  font: 800 1rem 'Cinzel', serif; margin-bottom: .8rem; box-shadow: 0 0 18px rgba(255,90,0,.45);
}
.engine-step h3 { font-size: 1.02rem; margin-bottom: .5rem; color: var(--gold); }
.engine-step p { font-size: .92rem; color: var(--dim); }
.engine-arrow { align-self: center; color: var(--ember); font-size: 1.8rem; }
.engine-note {
  margin-top: 1.4rem; padding: 1rem 1.3rem; border-left: 3px solid var(--gold);
  background: rgba(212,169,65,.05); border-radius: 0 10px 10px 0;
  color: var(--dim); font-size: .95rem;
}
.engine-note b { color: var(--gold); }

/* Stats */
.stats-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1.2rem; }
.panel {
  background: linear-gradient(180deg, var(--surface), var(--bg2));
  border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem;
}
.panel-title { font-size: 1rem; color: var(--gold); margin-bottom: 1.1rem; }
.panel-title small { color: var(--ash); font-family: 'IBM Plex Sans'; font-weight: 400; }
.panel-foot { margin-top: .9rem; font-size: .8rem; color: var(--ash); }
.curve { display: flex; align-items: flex-end; gap: .5rem; height: 150px; }
.curve-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; height: 100%; justify-content: flex-end; }
.curve-bar {
  width: 100%; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--ember2), #a32800);
  box-shadow: 0 0 14px rgba(255,90,0,.25);
  min-height: 3px; transition: height .8s cubic-bezier(.2,.8,.2,1);
}
.curve-num { font-size: .78rem; color: var(--text); font-weight: 600; }
.curve-lbl { font-size: .75rem; color: var(--ash); }
.comp-row { display: flex; justify-content: space-between; align-items: center; padding: .42rem 0; border-bottom: 1px dashed rgba(58,36,18,.7); font-size: .9rem; }
.comp-row:last-child { border-bottom: 0; }
.comp-row b { color: var(--gold); }
.comp-row .comp-n { color: var(--text); font-weight: 600; }
.cbar { margin-bottom: .75rem; }
.cbar-top { display: flex; justify-content: space-between; font-size: .82rem; margin-bottom: .25rem; color: var(--dim); }
.cbar-track { height: 10px; border-radius: 5px; background: #241505; overflow: hidden; }
.cbar-fill { height: 100%; border-radius: 5px; }

/* Estrategia */
.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 1.4rem; }
.phase-card { background: linear-gradient(180deg, var(--surface), var(--bg2)); border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem; }
.phase-card h3 { color: var(--gold); font-size: .98rem; margin-bottom: .6rem; }
.phase-card .turns { font-size: .74rem; letter-spacing: .14em; color: var(--ember); text-transform: uppercase; display: block; margin-bottom: .5rem; }
.phase-card p { font-size: .9rem; color: var(--dim); }
.plan-general {
  background: rgba(255,90,0,.05); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.3rem 1.5rem; color: var(--text); font-size: 1rem;
}
.strategy-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.2rem; }
.strategy-extra .panel h3 { color: var(--gold); font-size: .95rem; margin-bottom: .5rem; }
.strategy-extra .panel p { font-size: .9rem; color: var(--dim); }

/* Combos */
.combos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.combo {
  display: flex; gap: .9rem; background: linear-gradient(180deg, var(--surface), var(--bg2));
  border: 1px solid var(--line); border-radius: 12px; padding: 1.05rem 1.2rem; font-size: .92rem; color: var(--dim);
}
.combo::before { content: '⚔'; color: var(--ember); font-size: 1.1rem; }

/* Deck */
.deck-controls { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1.6rem; position: sticky; top: 0; z-index: 30; background: linear-gradient(180deg, var(--bg) 82%, transparent); padding: .9rem 0 1.1rem; }
#deck-search {
  width: 100%; max-width: 430px; padding: .7rem 1.05rem; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font: 400 .95rem 'IBM Plex Sans'; outline: none;
}
#deck-search:focus { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255,90,0,.15); }
.cat-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.cat-tab {
  padding: .4rem .95rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--dim); font: 500 .82rem 'IBM Plex Sans'; cursor: pointer; transition: .15s;
}
.cat-tab:hover { color: var(--text); border-color: var(--gold); }
.cat-tab.active { background: linear-gradient(180deg, #ff7a1a, #d43c00); color: #1b0800; border-color: transparent; font-weight: 600; }
/* Modo edición */
.deck-tools { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.btn-edit {
  padding: .7rem 1.2rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--gold); font: 600 .9rem 'IBM Plex Sans'; cursor: pointer; transition: .18s;
  white-space: nowrap;
}
.btn-edit:hover { border-color: var(--gold); background: rgba(212,169,65,.08); }
.btn-edit.active { background: linear-gradient(180deg, #ff7a1a, #d43c00); color: #1b0800; border-color: transparent; }
.edit-bar {
  display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between;
  background: rgba(255,90,0,.07); border: 1px solid #4a2c12; border-radius: 11px; padding: .7rem 1rem;
}
.edit-bar[hidden] { display: none; }
.edit-hint { font-size: .86rem; color: var(--dim); }
.edit-hint b { color: var(--ember2); }
.edit-actions { display: flex; gap: .7rem; align-items: center; }
.edit-count { font-size: .82rem; color: var(--gold); background: rgba(212,169,65,.1); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .8rem; white-space: nowrap; }
.btn-reset { padding: .4rem .9rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--dim); font: 500 .82rem 'IBM Plex Sans'; cursor: pointer; transition: .15s; }
.btn-reset:hover { border-color: var(--danger); color: var(--danger); }
.changes-log { display: flex; flex-direction: column; gap: .3rem; padding: .3rem 0; }
.changes-log[hidden] { display: none; }
.change-row { font-size: .82rem; color: var(--dim); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.change-row .chg-out { color: var(--ash); text-decoration: line-through; }
.change-row .chg-arrow { color: var(--ember); }
.change-row .chg-in { color: var(--gold); font-weight: 600; }
.change-row .chg-undo { margin-left: auto; background: none; border: 0; color: var(--ash); font-size: .76rem; cursor: pointer; text-decoration: underline; }
.change-row .chg-undo:hover { color: var(--ember2); }
/* botón quitar en la carta */
.card-remove {
  position: absolute; top: 7px; left: 7px; z-index: 3;
  background: rgba(12,5,2,.9); border: 1px solid var(--danger); color: #ff7a6a;
  border-radius: 7px; padding: .12rem .5rem; font: 600 .74rem 'IBM Plex Sans'; cursor: pointer; transition: .15s;
}
.card-remove:hover { background: var(--danger); color: #1b0800; }
.card-tile.swapped .card-img-wrap { outline: 2px solid var(--gold); outline-offset: 1px; }
.card-newbadge {
  position: absolute; top: 7px; right: 7px; z-index: 3; background: linear-gradient(180deg, #ff9c2e, #c22b00);
  color: #1b0800; border-radius: 7px; padding: .1rem .5rem; font: 700 .72rem 'IBM Plex Sans';
}
/* panel de swap dentro del modal */
.swap-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.swap-head img { width: 84px; border-radius: 7px; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.swap-head-txt { font-size: 1rem; color: var(--text); }
.swap-head-txt b { color: var(--ember2); }
.swap-head-txt small { display: block; color: var(--dim); font-size: .84rem; margin-top: .2rem; }
.swap-options { display: flex; flex-direction: column; gap: .8rem; }
.swap-opt { display: grid; grid-template-columns: 92px 1fr; gap: 1rem; background: linear-gradient(180deg, var(--surface), var(--bg2)); border: 1px solid var(--line); border-radius: 12px; padding: .9rem; align-items: start; }
.swap-opt.restore { border-color: #3a5a2a; background: rgba(120,180,90,.05); }
.swap-opt img { width: 100%; border-radius: 7px; box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.swap-opt h4 { color: var(--gold); font-size: 1rem; font-family: 'IBM Plex Sans'; }
.swap-opt .so-type { color: var(--ember2); font-size: .78rem; margin: .15rem 0 .45rem; }
.swap-opt .so-oracle { font-size: .78rem; color: var(--ash); white-space: pre-line; margin-bottom: .5rem; max-height: 4.6em; overflow: hidden; }
.swap-opt .so-razon { font-size: .86rem; color: var(--dim); margin-bottom: .7rem; }
.swap-opt .so-razon b { color: var(--gold); }
.btn-swapin { padding: .45rem 1rem; border-radius: 8px; border: 0; background: linear-gradient(180deg, #ff7a1a, #d43c00); color: #1b0800; font: 600 .84rem 'IBM Plex Sans'; cursor: pointer; }
.btn-swapin:hover { filter: brightness(1.1); }
.btn-swapin.restore { background: linear-gradient(180deg, #8fce6a, #4e8a2f); }
.swap-none { color: var(--dim); font-size: .9rem; padding: .8rem 0; }
.swap-cancel { margin-top: 1.1rem; background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 8px; padding: .5rem 1.1rem; font: 500 .84rem 'IBM Plex Sans'; cursor: pointer; }
.swap-cancel:hover { border-color: var(--gold); color: var(--gold); }

/* selector de carta (buscador + banquillo) */
.reco-word { color: var(--gold); font-style: normal; }
.picker-controls {
  position: sticky; top: -1.6rem; z-index: 6;
  background: linear-gradient(180deg, #201207 82%, rgba(32,18,7,.6));
  padding: .8rem 0 .7rem; margin-bottom: .3rem;
  display: flex; flex-direction: column; gap: .55rem;
}
#picker-search {
  width: 100%; padding: .62rem .95rem; border-radius: 9px; background: var(--surface);
  border: 1px solid var(--line); color: var(--text); font: 400 .9rem 'IBM Plex Sans'; outline: none;
}
#picker-search:focus { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255,90,0,.15); }
.picker-types { display: flex; flex-wrap: wrap; gap: .4rem; }
.picker-type {
  padding: .28rem .7rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--dim); font: 500 .76rem 'IBM Plex Sans'; cursor: pointer; transition: .15s;
}
.picker-type span { opacity: .55; }
.picker-type:hover { color: var(--text); border-color: var(--gold); }
.picker-type.active { background: linear-gradient(180deg, #ff7a1a, #d43c00); color: #1b0800; border-color: transparent; }
.picker-type.active span { opacity: .8; }
.picker-sec-label { font: 600 .82rem 'IBM Plex Sans'; letter-spacing: .03em; color: var(--gold); margin: .9rem 0 .6rem; }
.picker-sec-label span { color: var(--ash); font-weight: 400; }
.reco-label { color: var(--ember2); }
.reco-list { display: flex; flex-direction: column; gap: .7rem; }
.picker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: .65rem;
  max-height: 46vh; overflow-y: auto; padding: .15rem .25rem .4rem;
}
.picker-card { cursor: pointer; transition: transform .14s; }
.picker-card:hover { transform: translateY(-3px); }
.pc-img { position: relative; border-radius: 7px; overflow: hidden; aspect-ratio: 488/680; background: var(--surface2); box-shadow: 0 3px 10px rgba(0,0,0,.5); }
.pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-img::after {
  content: '＋ Meter'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255,90,0,.82); color: #1b0800; font: 700 .82rem 'IBM Plex Sans'; opacity: 0; transition: opacity .14s;
}
.picker-card:hover .pc-img::after { opacity: 1; }
.pc-name { font-size: .72rem; color: var(--text); margin-top: .32rem; line-height: 1.2; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-cost { font-size: .68rem; color: var(--ash); text-align: center; }

.cat-block { margin-bottom: 2.6rem; }
.cat-head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: .4rem; }
.cat-head h3 { font-size: 1.25rem; color: var(--gold); }
.cat-head .cat-count { color: var(--ash); font-size: .85rem; }
.cat-desc { color: var(--dim); font-size: .9rem; max-width: 56rem; margin-bottom: 1.1rem; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 1rem; }
.card-tile { position: relative; cursor: pointer; transition: transform .18s; }
.card-tile:hover { transform: translateY(-5px) scale(1.02); z-index: 2; }
.card-img-wrap { position: relative; border-radius: 9px; overflow: hidden; background: var(--surface2); aspect-ratio: 488/680; box-shadow: 0 6px 18px rgba(0,0,0,.55); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-qty {
  position: absolute; top: 7px; right: 7px; background: rgba(12,5,2,.88); border: 1px solid var(--gold);
  color: var(--gold); border-radius: 7px; padding: .1rem .5rem; font: 700 .82rem 'IBM Plex Sans';
}
.card-hover {
  position: absolute; inset: auto 0 0 0; padding: 2rem .7rem .7rem;
  background: linear-gradient(180deg, transparent, rgba(8,3,1,.96) 42%);
  opacity: 0; transition: opacity .18s; font-size: .78rem; color: var(--text); line-height: 1.45;
  border-radius: 0 0 9px 9px;
}
.card-tile:hover .card-hover { opacity: 1; }
.card-hover b { color: var(--ember2); display: block; margin-bottom: .15rem; font-size: .8rem; }
.card-name { margin-top: .5rem; font-size: .84rem; font-weight: 500; color: var(--text); text-align: center; }
.card-sub { font-size: .72rem; color: var(--ash); text-align: center; }
.commander-feature {
  display: grid; grid-template-columns: 300px 1fr; gap: 1.8rem; align-items: start;
  background: linear-gradient(135deg, rgba(255,90,0,.09), var(--bg2) 55%);
  border: 1px solid #4a2c12; border-radius: 16px; padding: 1.6rem; margin-bottom: 2.4rem;
}
.commander-feature img { width: 100%; border-radius: 12px; box-shadow: 0 10px 40px rgba(255,90,0,.25); }
.commander-feature h3 { font-size: 1.5rem; color: var(--gold); margin-bottom: .3rem; }
.commander-feature .cmd-type { color: var(--ember2); font-size: .85rem; margin-bottom: .9rem; }
.commander-feature .cmd-text { font-size: .92rem; color: var(--dim); white-space: pre-line; border-left: 3px solid var(--line); padding-left: 1rem; margin-bottom: 1rem; }
.commander-feature .cmd-reason { color: var(--text); font-size: .95rem; }
.commander-feature .cmd-reason b { color: var(--gold); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(5,2,1,.86); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; max-width: 780px; width: 100%; max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, #201207, var(--bg2)); border: 1px solid #4a2c12; border-radius: 16px; padding: 1.6rem;
}
.modal-close { position: absolute; top: .8rem; right: .9rem; background: none; border: 0; color: var(--ash); font-size: 1.2rem; cursor: pointer; }
.modal-close:hover { color: var(--ember2); }
.modal-grid { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; }
.modal-grid img { width: 100%; border-radius: 11px; box-shadow: 0 10px 34px rgba(0,0,0,.6); }
.modal-grid h3 { color: var(--gold); font-size: 1.25rem; margin-bottom: .2rem; }
.modal-type { color: var(--ember2); font-size: .84rem; margin-bottom: .8rem; }
.modal-oracle { font-size: .88rem; color: var(--dim); white-space: pre-line; border-left: 3px solid var(--line); padding-left: .9rem; margin-bottom: 1rem; }
.modal-reason { background: rgba(212,169,65,.06); border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1.05rem; font-size: .93rem; }
.modal-reason b { color: var(--gold); display: block; margin-bottom: .3rem; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.modal-meta { margin-top: .8rem; font-size: .78rem; color: var(--ash); }

/* Toast / footer */
.toast {
  position: fixed; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, #ff7a1a, #d43c00); color: #1b0800;
  font-weight: 600; padding: .7rem 1.4rem; border-radius: 10px; z-index: 200;
  box-shadow: 0 8px 30px rgba(255,90,0,.4);
}
footer { border-top: 1px solid var(--line); margin-top: 4rem; padding: 2.2rem 1.4rem 2.8rem; text-align: center; color: var(--ash); font-size: .84rem; }
footer p + p { margin-top: .4rem; }

/* Responsive */
@media (max-width: 940px) {
  .engine { grid-template-columns: 1fr; }
  .engine-arrow { transform: rotate(90deg); justify-self: center; }
  .stats-grid, .phases, .strategy-extra, .combos { grid-template-columns: 1fr; }
  .commander-feature { grid-template-columns: 1fr; }
  .commander-feature img { max-width: 300px; margin: 0 auto; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-grid img { max-width: 260px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-sky, .eye-glow, .eye-fire, .eye-pupil { animation: none; }
  .card-tile, .btn { transition: none; }
}
