/* PLAGAT WIKI
   Conceito: o "grimório" do duelista – couro escuro, filete dourado e pergaminho, igual à interface do jogo.
   Coluna lateral fixa com as seções + página de leitura; cartas desenhadas com as peças originais. */
:root {
  --bg: #120d0a;          /* couro quase preto */
  --surface: #1b140f;     /* painel */
  --raised: #261c15;      /* painel elevado / hover */
  --line: #3b2d20;        /* filete */
  --line-gold: #6e5430;   /* filete dourado apagado */
  --gold: #d6a54c;        /* dourado do logo */
  --gold-hi: #f2d28c;
  --fg: #ece2d0;          /* texto (pergaminho claro) */
  --muted: #a6957c;
  --faint: #7a6a55;
  --blood: #c4413a;       /* trancado / perigo */
  --chaos: #e0306e;       /* Chaos Stones */
  --ok: #7fb069;
  --f-display: "Marcellus", "Cinzel", Georgia, serif;
  --f-lore: "IM Fell English", Georgia, "Times New Roman", serif;
  --f-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --f-tag: "Oswald", "Arial Narrow", sans-serif;
  --r: 6px;
  --side: 248px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.6 var(--f-body);
  background-image: radial-gradient(1200px 600px at 70% -10%, rgba(214,165,76,.07), transparent 60%);
  background-attachment: fixed;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--gold-hi); text-decoration-color: rgba(242,210,140,.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; color: var(--gold-hi); text-wrap: balance; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: 1.65rem; margin-top: .5rem; }
h3 { font-size: 1.25rem; color: var(--fg); }
p { margin: 0; }
.tab { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- topo */
.topo { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(18,13,10,.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.topo-in { display: flex; align-items: center; gap: 16px; height: 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.marca img { height: 40px; width: auto; }
.marca span { font: 15px var(--f-tag); letter-spacing: .25em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line-gold); padding-left: 10px; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r); width: 42px; height: 42px; padding: 10px; flex-direction: column; justify-content: space-between; cursor: pointer; }
.menu-btn span { display: block; height: 2px; background: var(--gold); border-radius: 2px; }
.busca { position: relative; margin-left: auto; width: min(420px, 100%); min-width: 0; }
.busca input { width: 100%; height: 40px; border-radius: 20px; border: 1px solid var(--line-gold); background: var(--surface); color: var(--fg); padding: 0 16px 0 40px; font: inherit; font-size: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23d6a54c' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; }
.busca input::placeholder { color: var(--faint); }
.busca-res { position: absolute; top: 46px; right: 0; width: min(460px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line-gold); border-radius: var(--r); box-shadow: 0 18px 40px rgba(0,0,0,.6); padding: 6px; }
.busca-res a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; text-decoration: none; color: var(--fg); }
.busca-res a:hover, .busca-res a.sel { background: var(--raised); }
.busca-res small { color: var(--muted); margin-left: auto; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; flex: none; }
.busca-res .vazio { padding: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- estrutura */
.corpo { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); max-width: 1480px; margin: 0 auto; }
.lateral { position: sticky; top: calc(64px + env(safe-area-inset-top, 0px)); height: calc(100vh - 64px - env(safe-area-inset-top, 0px)); overflow: auto; padding: 24px 12px 40px max(16px, env(safe-area-inset-left, 0px)); border-right: 1px solid var(--line); }
.lateral h4 { font: 12px var(--f-tag); letter-spacing: .18em; text-transform: uppercase; color: var(--faint); margin: 20px 10px 6px; }
.lateral h4:first-child { margin-top: 0; }
.lateral a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 4px; color: var(--muted); text-decoration: none; font-size: 15.5px; }
.lateral a:hover { color: var(--fg); background: var(--surface); }
.lateral a.ativo { color: var(--gold-hi); background: var(--raised); box-shadow: inset 2px 0 0 var(--gold); }
.lateral a .n { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
main { min-width: 0; padding-block: 32px 80px; padding-left: max(16px, min(48px, 4vw)); padding-right: max(16px, env(safe-area-inset-right, 0px), min(48px, 4vw)); }
main:focus { outline: none; }
.pagina { display: grid; gap: 28px; max-width: 1080px; }
.leitura { max-width: 760px; display: grid; gap: 16px; }
.leitura p, .leitura li { color: var(--fg); }
.leitura ul, .leitura ol { margin: 0; padding-left: 1.25em; display: grid; gap: 6px; }
.sec { display: grid; gap: 14px; }
.sec + .sec { border-top: 1px solid var(--line); padding-top: 28px; }
.olho { font: 13px var(--f-tag); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.cab { display: grid; gap: 10px; }
.cab p.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.migalha { font-size: 14px; color: var(--faint); }
.migalha a { color: var(--muted); }
.nota { color: var(--muted); font-size: 15px; }
.lore { font-family: var(--f-lore); font-size: 1.2rem; line-height: 1.55; color: #e5d6b8; }
.lore em { color: var(--gold-hi); }

/* ---------------------------------------------------------------- peças */
.painel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.grade { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.grade-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.ficha { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; text-decoration: none; color: var(--fg); }
a.ficha:hover { border-color: var(--line-gold); background: var(--raised); }
.ficha h3 { font-size: 1.12rem; }
.ficha p { color: var(--muted); font-size: 15px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font: 12.5px/1 var(--f-tag); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 3px; border: 1px solid var(--line-gold); color: var(--gold-hi); background: rgba(214,165,76,.06); white-space: nowrap; }
.chip.lock { color: #f0b3ad; border-color: rgba(196,65,58,.55); background: rgba(196,65,58,.08); }
.chip.ok { color: #c4e3b4; border-color: rgba(127,176,105,.5); background: rgba(127,176,105,.08); }
.chip.boss { color: #ffd6a0; border-color: #a8692b; background: rgba(168,105,43,.15); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.moeda { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.moeda img { width: 1.15em; height: 1.15em; object-fit: contain; vertical-align: -.2em; }
.moeda.ouro { color: #f3cf7a; } .moeda.cs { color: #ff7aa8; } .moeda.mk { color: #c9c3b6; } .moeda.xp { color: #9fd0ff; }
.tabela-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th { text-align: left; font: 12.5px var(--f-tag); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--surface); padding: 10px 12px; border-bottom: 1px solid var(--line-gold); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.02); }
.num { text-align: right; }
.passos { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: p; }
.passos > li { counter-increment: p; display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.passos > li::before { content: counter(p); font: 22px var(--f-display); color: var(--gold); width: 38px; height: 38px; border: 1px solid var(--line-gold); border-radius: 50%; display: grid; place-items: center; }
.passos h3 { margin-bottom: 4px; }
.def { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 6px 18px; }
.def dt { color: var(--muted); }
.def dd { margin: 0; }
.aviso { border-left: 3px solid var(--gold); background: rgba(214,165,76,.07); padding: 12px 16px; border-radius: 0 var(--r) var(--r) 0; color: var(--fg); }
details.spoiler { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
details.spoiler > summary { cursor: pointer; padding: 10px 14px; color: var(--gold-hi); font-family: var(--f-display); list-style: none; display: flex; gap: 10px; align-items: center; }
details.spoiler > summary::-webkit-details-marker { display: none; }
details.spoiler > summary::before { content: "▸"; color: var(--gold); transition: transform .15s; }
details.spoiler[open] > summary::before { transform: rotate(90deg); }
details.spoiler > summary small { margin-left: auto; color: var(--faint); font: 12px var(--f-tag); letter-spacing: .12em; text-transform: uppercase; }
details.spoiler > div { padding: 4px 16px 16px; display: grid; gap: 10px; }
.fala { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 12px; font-size: 16px; }
.fala b { font-weight: 500; color: var(--gold); font-family: var(--f-display); }
.fala.narr { grid-template-columns: 1fr; font-style: italic; color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 15px var(--f-display); color: #24180c; background: linear-gradient(#f0d295, #c9953f); border: 1px solid #f6dea4; padding: 9px 18px; border-radius: 4px; text-decoration: none; cursor: pointer; }
.btn.sec2 { background: transparent; color: var(--gold-hi); border-color: var(--line-gold); }

/* ---------------------------------------------------------------- início */
.hero { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-gold); min-height: 360px; display: grid; align-items: end; background: #0c0806; }
.hero > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; opacity: .55; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,8,6,.95) 0%, rgba(12,8,6,.6) 55%, rgba(12,8,6,.15) 100%), linear-gradient(0deg, rgba(12,8,6,.9), transparent 50%); }
.hero-in { position: relative; z-index: 1; padding: clamp(20px, 4vw, 44px); display: grid; gap: 16px; max-width: 640px; }
.hero-in img.logo { width: min(380px, 80%); }
.hero-in p { font-size: 1.15rem; color: #e9dcc3; }
.cifras { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.cifras div { display: grid; }
.cifras b { font: 30px var(--f-display); color: var(--gold-hi); font-weight: 400; line-height: 1.1; }
.cifras span { font: 12px var(--f-tag); letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }

/* ---------------------------------------------------------------- catálogo de cartas */
.filtros { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.filtros label { display: grid; gap: 4px; font: 12px var(--f-tag); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
select, .campo { height: 38px; border-radius: 4px; border: 1px solid var(--line-gold); background: var(--surface); color: var(--fg); font: 15px var(--f-body); padding: 0 10px; width: 100%; min-width: 0; }
.contagem { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 15px; }
.grade-cartas { display: grid; gap: 14px 12px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.gc-item { display: grid; gap: 6px; text-decoration: none; color: var(--fg); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font: inherit; }
.gc-item .carta { transition: transform .15s ease, filter .15s; }
.gc-item:hover .carta, .gc-item:focus-visible .carta { transform: translateY(-3px); filter: drop-shadow(0 8px 14px rgba(0,0,0,.6)); }
.gc-item { min-width: 0; }
.gc-item small span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gc-item small { font-size: 12.5px; color: var(--faint); display: flex; justify-content: space-between; gap: 6px; }
.raridade { font: 11.5px var(--f-tag); letter-spacing: .1em; text-transform: uppercase; }
.r-common { color: #c8c2b6; } .r-uncommon { color: #7ed0a0; } .r-rare { color: #7fb8ff; } .r-epic { color: #e19bff; }
.paginas { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.paginas button { min-width: 38px; height: 36px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 4px; cursor: pointer; font: 15px var(--f-body); }
.paginas button.on { border-color: var(--gold); color: var(--gold-hi); }
.paginas button:disabled { opacity: .4; cursor: default; }

/* ---------------------------------------------------------------- página/modal da carta */
.carta-pag { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: start; }
.carta-pag .lado { display: grid; gap: 12px; position: sticky; top: 90px; }
.variantes { display: flex; gap: 6px; justify-content: center; }
.variantes button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 4px; padding: 5px 12px; cursor: pointer; font: 14px var(--f-body); }
.variantes button.on { border-color: var(--gold); color: var(--gold-hi); }
.efeito { font-size: 1.1rem; color: #f6c79c; }
.flavor { font-family: var(--f-lore); font-style: italic; color: var(--muted); font-size: 1.1rem; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.modal-fundo { position: absolute; inset: 0; background: rgba(5,3,2,.82); }
.modal-caixa { position: relative; width: min(980px, 100%); max-height: 100%; overflow: auto; background: var(--bg); border: 1px solid var(--line-gold); border-radius: 10px; padding: 28px; }
.modal-x { position: absolute; top: 8px; right: 10px; z-index: 2; background: none; border: 0; color: var(--gold-hi); font-size: 34px; line-height: 1; cursor: pointer; width: 44px; height: 44px; }

/* ---------------------------------------------------------------- campanha */
.mapa { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-gold); background: #0c0806; }
.mapa > img { display: block; width: 100%; height: auto; }
.pino { position: absolute; transform: translate(-50%, -100%); display: grid; justify-items: center; text-decoration: none; }
.pino i { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 2px solid #2b1d0e; box-shadow: 0 0 0 3px rgba(214,165,76,.3); }
.pino.building i { border-radius: 3px; background: #e8d4a8; }
.pino.portal i { background: #8fd0ff; }
.pino.boss i { background: #ff9a3c; }
.pino span { position: absolute; bottom: 20px; white-space: nowrap; font: 12px var(--f-body); background: rgba(12,8,6,.9); color: var(--fg); padding: 3px 7px; border-radius: 3px; opacity: 0; pointer-events: none; transition: opacity .12s; border: 1px solid var(--line-gold); }
.pino:hover span, .pino:focus-visible span { opacity: 1; }
.legenda { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--muted); }
.legenda span { display: inline-flex; gap: 6px; align-items: center; }
.legenda i { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); display: inline-block; }
.trilha-lugares { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.trilha-lugares li { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.trilha-lugares .lv { font: 22px var(--f-display); color: var(--gold); text-align: center; line-height: 1; }
.trilha-lugares .lv small { display: block; font: 10px var(--f-tag); letter-spacing: .14em; color: var(--faint); margin-top: 3px; }
.trilha-lugares h3 { font-family: var(--f-lore); font-size: 1.35rem; color: var(--gold-hi); }
.duelistas { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.duelista { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--fg); }
.duelista:hover { border-color: var(--line-gold); background: var(--raised); }
.foto { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 40%, #3a2b1d, #160f0a); border: 2px solid var(--line-gold); display: grid; place-items: center; font: 26px var(--f-display); color: var(--gold); }
.foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.foto img.sprite { object-fit: contain; object-position: center; transform: scale(1.15); }
.duelista h3 { font-size: 1.05rem; }
.duelista p { font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.retrato-grande { width: 100%; max-width: 300px; aspect-ratio: 2/3; border-radius: 8px; border: 1px solid var(--line-gold); background: radial-gradient(circle at 50% 35%, #3a2b1d, #120c08); display: grid; place-items: center; overflow: hidden; }
.retrato-grande img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.retrato-grande img.sprite { object-fit: contain; width: 70%; height: auto; }
.duelo-pag { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; align-items: start; }
.mini-cartas { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }

/* ---------------------------------------------------------------- progressão */
.titulo-amostra { font: 1.15rem var(--f-display); }
.fx-gradient, .fx-shine, .fx-rainbow, .fx-fire { -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.fx-gradient { background-image: linear-gradient(90deg, var(--c1), var(--c2)); }
.fx-shine { background-image: linear-gradient(100deg, var(--c1) 40%, var(--c2) 50%, var(--c1) 60%); background-size: 250% 100%; animation: brilho 3s linear infinite; }
.fx-rainbow { background-image: linear-gradient(90deg, #ff6b6b, #ffd36b, #7dff8a, #6bd1ff, #c38bff, #ff6b6b); background-size: 200% 100%; animation: brilho 4s linear infinite; }
.fx-fire { background-image: linear-gradient(0deg, var(--c1), var(--c2), #fff3c4); background-size: 100% 200%; animation: fogo 1.6s ease-in-out infinite alternate; }
.fx-pulse { animation: pulso 2s ease-in-out infinite; }
.fx-glow { text-shadow: 0 0 10px var(--c1), 0 0 18px var(--c1); }
.fx-glow.fx-gradient, .fx-glow.fx-shine, .fx-glow.fx-rainbow, .fx-glow.fx-fire { text-shadow: none; filter: drop-shadow(0 0 6px var(--c1)); }
@keyframes brilho { to { background-position: -250% 0; } }
@keyframes fogo { to { background-position: 0 100%; } }
@keyframes pulso { 50% { opacity: .65; } }
.molduras { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.moldura { display: grid; gap: 6px; justify-items: center; text-align: center; font-size: 14px; }
.moldura .anel { position: relative; width: 110px; height: 110px; }
.moldura .anel img.r { position: absolute; inset: 16%; width: 68%; height: 68%; border-radius: 50%; object-fit: cover; }
.moldura .anel img.f { position: absolute; inset: 0; width: 100%; height: 100%; }
.dias { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.dia { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 4px; align-content: start; font-size: 14px; }
.dia b { font: 13px var(--f-tag); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.dia.marco { border-color: var(--line-gold); background: linear-gradient(180deg, rgba(214,165,76,.12), var(--surface)); }
.escada { display: grid; gap: 4px; }
.escada div { display: grid; grid-template-columns: minmax(0,1fr) 90px 160px; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 4px; background: var(--surface); font-variant-numeric: tabular-nums; }
.versos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.versos figure { margin: 0; display: grid; gap: 6px; text-align: center; font-size: 14px; color: var(--muted); }
.versos img { border-radius: 6px; aspect-ratio: 831/1314; object-fit: cover; width: 100%; }

/* ---------------------------------------------------------------- carta (montagem do jogo) */
.carta { position: relative; width: 100%; aspect-ratio: 831 / 1314; container-type: inline-size; border-radius: 4.5% / 2.9%; overflow: hidden; user-select: none; }
.carta > * { position: absolute; }
.ct-art { left: 3.325%; top: 1.976%; width: 93.35%; height: 96.08%; object-fit: cover; }
.ct-ph { background: linear-gradient(180deg, color-mix(in srgb, var(--ph) 65%, #000) 0%, #150b10 100%); }
.ct-ph::after { content: ""; position: absolute; inset: 18% 20% 52%; background: url(img/ui/chaos.webp) center/contain no-repeat; opacity: .14; }
.ct-info { left: 4.287%; top: 52.651%; width: 91.426%; height: 44.695%; }
.ct-frame { inset: 0; width: 100%; height: 100%; }
.ct-title { left: 8.694%; top: 5.524%; width: 82.052%; height: 6.334%; }
.ct-name { left: 14.2%; top: 6.088%; width: 71.6%; height: 4.871%; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden;
  font: 6.02cqw/1 var(--f-display); color: #e6e7e8; text-shadow: .24cqw .24cqw 0 rgba(0,0,0,.6); }
.v-gold .ct-name { color: #f8ca68; } .v-holo .ct-name { color: #f4f0ff; }
.ct-gems { left: 0; right: 0; top: 70.09%; transform: translateY(-50%); display: flex; justify-content: center; }
.ct-gems img { height: 8.905cqw; width: auto; margin: 0 -.55cqw; }
.ct-tags { left: 0; right: 0; top: 75.34%; transform: translateY(-50%); display: flex; justify-content: center; gap: 1.52cqw; }
.ct-tag { position: relative; font: 2.76cqw/3.37cqw var(--f-tag); height: 3.37cqw; padding: 0 1.05cqw; border-radius: .54cqw; color: #f7f3ee; background: linear-gradient(var(--t1), var(--t2)); box-shadow: .4cqw .37cqw 0 var(--t3); text-shadow: .23cqw .23cqw 0 color-mix(in srgb, var(--t2) 45%, #000); letter-spacing: .02em; white-space: nowrap; }
.ct-text { left: 10.229%; top: 77.017%; width: 79.543%; height: 11.416%; display: flex; flex-direction: column; justify-content: center; text-align: center; font: 2.35cqw/1.22 var(--f-body); color: #e6e7e8; overflow: hidden; gap: .3em; }
.ct-text .ct-eff { color: #f9ad72; }
.ct-stats { left: 0; right: 0; top: 91.55%; transform: translateY(-50%); text-align: center; font: 5.54cqw/1 var(--f-display); color: #e6e7e8; font-variant-numeric: tabular-nums; }
.ct-stats i, .ct-sstats i { font-style: normal; margin: 0 .12em; }
.ct-code { left: 11.07%; top: 90.6%; font: 2.65cqw/1 var(--f-body); color: rgba(230,230,230,.55); }
.ct-sname { left: 8%; width: 84%; top: 38%; transform: translateY(-50%); text-align: center; font: 10.5cqw/1.12 var(--f-display); color: #e6e7e8;
  text-shadow: 0 0 1.4cqw #000, 0 0 1.4cqw #000, .5cqw .5cqw 0 #000; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; }
.ct-sgems { left: 0; right: 0; top: 69.5%; transform: translateY(-50%); display: flex; justify-content: center; }
.ct-sgems img { height: 18.97cqw; width: auto; margin: 0 -.95cqw; }
.ct-sstats { left: 0; right: 0; top: 83.6%; transform: translateY(-50%); text-align: center; font: 23.7cqw/1 var(--f-display); color: #e6e7e8; text-shadow: 0 0 2cqw #000, 1cqw 1cqw 0 #000; }
.ct-stags { left: 0; right: 0; top: 83.6%; transform: translateY(-50%); display: flex; justify-content: center; }
.ct-stags .ct-tag { font-size: 13cqw; line-height: 15.8cqw; height: 15.8cqw; padding: 0 4cqw; border-radius: 2cqw; box-shadow: 1.5cqw 1.4cqw 0 var(--t3); }
.ct-shine { inset: 0; pointer-events: none; mix-blend-mode: screen; }
.ct-gold { background: linear-gradient(115deg, transparent 35%, rgba(255,226,150,.45) 48%, rgba(255,250,220,.7) 50%, rgba(255,226,150,.45) 52%, transparent 65%); background-size: 300% 100%; animation: carta-brilho 3.6s ease-in-out infinite; }
.ct-holo { background: linear-gradient(125deg, rgba(255,170,220,.28), rgba(150,255,230,.28), rgba(200,170,255,.28), rgba(160,210,255,.28), rgba(255,170,220,.28)); background-size: 300% 300%; animation: carta-holo 6s linear infinite; }
@keyframes carta-brilho { 0% { background-position: 120% 0; } 60%, 100% { background-position: -120% 0; } }
@keyframes carta-holo { to { background-position: 300% 300%; } }

/* ---------------------------------------------------------------- celular */
@media (max-width: 900px) {
  .corpo { grid-template-columns: minmax(0,1fr); }
  .menu-btn { display: flex; }
  .marca span { display: none; }
  .lateral { position: fixed; z-index: 70; top: calc(64px + env(safe-area-inset-top, 0px)); left: 0; width: min(300px, 86vw); height: calc(100vh - 64px - env(safe-area-inset-top, 0px)); background: var(--bg); transform: translateX(-102%); transition: transform .2s; box-shadow: 10px 0 30px rgba(0,0,0,.6); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
  .lateral.aberta { transform: none; }
  .carta-pag, .duelo-pag { grid-template-columns: minmax(0,1fr); }
  .carta-pag .lado { position: static; max-width: 340px; margin: 0 auto; width: 100%; }
  .duelo-pag .retrato-grande { max-width: 220px; }
  .modal-caixa { padding: 20px 16px; }
  .fala { grid-template-columns: minmax(0,1fr); gap: 2px; }
  .escada div { grid-template-columns: minmax(0,1fr) 70px; }
  .escada div span:last-child { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .marca img { height: 32px; }
  .topo-in { gap: 10px; }
  .grade-cartas { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px 8px; }
  .trilha-lugares li { grid-template-columns: 46px minmax(0,1fr); }
  .trilha-lugares li > :last-child { grid-column: 2; }
  .def { grid-template-columns: minmax(0,1fr); gap: 0 0; }
  .def dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
