/* ============================================================
   CDZ IDLE — tema: Santuário (mármore, ouro) + Cosmo (azul profundo)
   ============================================================ */
:root {
  --bg: #070815;
  --bg2: #0e1028;
  --panel: rgba(16, 18, 44, .88);
  --panel2: #1a1d48;
  --line: #2e3270;
  --line-gold: #8a6a24;
  --text: #f1ecdf;
  --muted: #a7a3c4;
  --gold: #f2c24e;
  --gold-2: #ffe7a0;
  --gold-3: #a8781e;
  --marble: #e9e4d6;
  --accent: #7fd6ff;
  --cosmo: #5a7dff;
  --good: #5fe08a;
  --bad: #ff5a5a;
  --R: #6fb2ff;
  --SR: #c58bff;
  --SSR: #f2c24e;
  --side: 210px;
  --top: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, sans-serif;
  min-height: 100vh;
}
/* céu do cosmo: gradiente + estrelas desenhadas por CSS */
#cosmos {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 75% -10%, rgba(90, 125, 255, .28), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(242, 194, 78, .12), transparent 60%),
    radial-gradient(circle at 50% 40%, #131640 0%, #070815 70%);
}
#cosmos::before, #cosmos::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff, transparent),
    radial-gradient(1px 1px at 30% 70%, #cfd8ff, transparent),
    radial-gradient(1.5px 1.5px at 55% 15%, #fff, transparent),
    radial-gradient(1px 1px at 80% 50%, #fff, transparent),
    radial-gradient(1px 1px at 90% 85%, #ffe7a0, transparent),
    radial-gradient(1.5px 1.5px at 65% 90%, #fff, transparent),
    radial-gradient(1px 1px at 20% 90%, #cfd8ff, transparent),
    radial-gradient(1px 1px at 45% 45%, #fff, transparent);
  background-size: 420px 420px;
  opacity: .55;
  animation: brilho 6s ease-in-out infinite alternate;
}
#cosmos::after { background-size: 640px 640px; background-position: 120px 80px; opacity: .35; animation-delay: 3s; }
@keyframes brilho { from { opacity: .25; } to { opacity: .65; } }

h1, h2, h3, .logo, .cinzel { font-family: 'Cinzel', serif; letter-spacing: .04em; }

button {
  font: inherit; color: inherit; cursor: pointer;
  background: linear-gradient(#22265a, #171a42); border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 12px; font-weight: 800;
  transition: transform .08s, border-color .15s, box-shadow .15s, filter .15s;
}
button:hover:not(:disabled) { border-color: var(--gold); box-shadow: 0 0 12px rgba(242, 194, 78, .25); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary {
  background: linear-gradient(#ffd973, #d79a26 55%, #a8701a); color: #2a1a02;
  border: 1px solid #ffe7a0; text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 2px 0 #5a3a08;
}
button.primary:hover:not(:disabled) { filter: brightness(1.08); }
button.gold { background: linear-gradient(#3a2d0e, #241b06); border-color: var(--gold); color: var(--gold-2); }
button.on { border-color: var(--good); }
button.wide { width: 100%; margin-top: 10px; }
button small { display: block; font-size: 11px; font-weight: 600; opacity: .9; margin-top: 2px; }
button.link { background: none; border: none; color: var(--muted); text-decoration: underline; padding: 4px; box-shadow: none; }
.icon-btn { padding: 6px 10px; font-size: 18px; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.big { font-size: 18px; }
.warn-text { color: #ffb04a; font-weight: 700; }

/* ---------- barra superior ---------- */
#topbar {
  position: sticky; top: 0; z-index: 20; height: var(--top);
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: linear-gradient(rgba(7, 8, 21, .96), rgba(10, 11, 30, .92));
  border-bottom: 1px solid var(--line-gold);
  box-shadow: 0 1px 0 rgba(242, 194, 78, .25), 0 6px 24px rgba(0, 0, 0, .5);
}
#btn-menu { display: none; }
.logo { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; line-height: 1; }
.logo-cdz {
  font-family: 'Cinzel Decorative', serif; font-weight: 900; font-size: 26px;
  background: linear-gradient(#fff4c8, #f2c24e 45%, #9c6a12); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #3a2404);
}
.logo-idle { font-weight: 900; font-size: 18px; color: var(--accent); text-shadow: 0 0 10px rgba(127, 214, 255, .6); }
.logo small { width: 100%; font-family: 'Nunito', sans-serif; letter-spacing: .12em; font-size: 10px; color: var(--muted); text-transform: uppercase; }
.res { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.coin {
  display: flex; align-items: center; gap: 6px; min-width: 96px;
  background: linear-gradient(#141738, #0c0e26); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px 4px 4px; font-weight: 900;
}
.coin i { width: 22px; height: 22px; border-radius: 50%; display: inline-block; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .35); }
.coin.gold i { background: radial-gradient(circle at 35% 30%, #fff3b5, #f2c24e 45%, #8a5a10); }
.coin.xp i { background: radial-gradient(circle at 35% 30%, #e8f6ff, #7fd6ff 45%, #2a4ab8); }
.coin.gem i { background: conic-gradient(from 45deg, #c9a8ff, #7a5aff, #c9a8ff, #7a5aff, #c9a8ff); clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); border-radius: 0; }

/* ---------- estrutura: menu lateral + conteúdo ---------- */
#layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
#tabs {
  position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top)); overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px; padding: 12px 10px;
  background: linear-gradient(90deg, rgba(8, 9, 24, .95), rgba(12, 13, 34, .85));
  border-right: 1px solid var(--line-gold);
}
#tabs button {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: 4px; box-shadow: none;
  padding: 9px 10px; font-family: 'Cinzel', serif; font-weight: 800; font-size: 14px; letter-spacing: .03em;
}
#tabs button .ico { width: 22px; text-align: center; filter: saturate(.8); }
#tabs button em { margin-left: auto; font-style: normal; font-size: 12px; opacity: .7; }
#tabs button:hover { border-color: var(--line); background: rgba(255, 255, 255, .03); box-shadow: none; }
#tabs button.active {
  color: #2a1a02; border-color: #ffe7a0;
  background: linear-gradient(90deg, #ffd973, #d79a26);
  box-shadow: 0 0 14px rgba(242, 194, 78, .35);
}
#tabs button[data-locked] { color: #8d89aa; }
.nav-sep {
  margin: 12px 6px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: var(--gold-3);
  display: flex; align-items: center; gap: 8px;
}
.nav-sep::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-gold), transparent); }
.nav-foot { margin-top: auto; padding-top: 12px; }

main { padding: 18px 20px 28px; min-width: 0; }
.tab { display: none; }
.tab.active { display: block; animation: aparece .25s ease; }
@keyframes aparece { from { opacity: 0; transform: translateY(6px); } }

.page-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.page-head h1 {
  margin: 0; font-size: 28px; font-weight: 900;
  background: linear-gradient(#fff4c8, #f2c24e 50%, #b07a1a); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-head p { margin: 0; color: var(--muted); font-family: 'Cinzel', serif; }

/* painéis com moldura dourada e cantos de templo */
.panel, .frame {
  position: relative;
  background: var(--panel); border: 1px solid var(--line-gold); border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), 0 10px 30px rgba(0, 0, 0, .35);
}
.panel { padding: 16px; margin-bottom: 14px; }
.panel::before, .frame::before {
  content: ''; position: absolute; inset: 4px; border: 1px solid rgba(242, 194, 78, .14); pointer-events: none; border-radius: 2px;
}
.panel h2, .panel h3 { margin: 0 0 12px; color: var(--gold-2); }
.panel h2 { font-size: 19px; }
.panel h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.panel h3::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-gold), transparent); }
.row { margin: 6px 0; }
.kv { display: flex; justify-content: space-between; gap: 10px; margin: 7px 0; }
.kv span { color: var(--muted); }
.btns, .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.btns button, .actions button { flex: 1; min-width: 130px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 0; }

/* ---------- Santuário (lobby) ---------- */
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.hero-banner {
  position: relative; min-height: 300px; overflow: hidden; padding: 26px;
  background:
    linear-gradient(90deg, rgba(7, 8, 21, .95) 0%, rgba(7, 8, 21, .75) 45%, rgba(7, 8, 21, .1) 100%),
    radial-gradient(500px 360px at 78% 50%, rgba(255, 120, 60, .35), transparent 70%),
    linear-gradient(135deg, #1a1440, #2a1430 60%, #3a1a10);
}
.hero-banner .boss-art {
  position: absolute; right: 2%; bottom: -6%; height: 118%; max-width: 50%; object-fit: contain; z-index: 0;
  filter: drop-shadow(0 0 22px rgba(255, 150, 80, .45));
}
.hero-banner > :not(.boss-art) { position: relative; z-index: 1; }
.tag-red {
  display: inline-block; font-family: 'Cinzel', serif; font-weight: 900; font-size: 12px; letter-spacing: .12em;
  background: linear-gradient(90deg, #b3141e, #ff3a3a); color: #fff; padding: 4px 12px; transform: skewX(-12deg);
}
.hero-banner h2 { font-size: 40px; margin: 12px 0 2px; color: #fff; text-shadow: 0 3px 0 #000; font-weight: 900; }
.hero-banner .sub { color: var(--gold-2); font-family: 'Cinzel', serif; margin-bottom: 16px; }
.stage-dots { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.stage-dots span {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 12px;
  border: 2px solid #3a3f80; color: #8d89aa; background: #0c0e26;
}
.stage-dots span.done { border-color: var(--gold); color: #2a1a02; background: var(--gold); }
.stage-dots span.cur { border-color: var(--accent); color: #fff; box-shadow: 0 0 12px var(--accent); background: #1a3a7a; }
.stage-dots span.boss { border-color: #ff5a5a; color: #ff5a5a; }
.power-rec { font-weight: 900; margin-bottom: 14px; }
.power-rec b { color: #ff6a5a; font-size: 22px; }
.team-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.team-strip .mini {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--line-gold); border-radius: 3px;
  background: radial-gradient(circle at 50% 30%, #2a2f6a, #0c0e26);
}
.team-strip .mini img { position: absolute; inset: 4% 0 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.team-strip .mini .n { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-family: 'Cinzel', serif; font-weight: 900; font-size: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .9)); }
.team-strip .mini .p { position: absolute; top: 4px; left: 6px; font-weight: 900; font-size: 14px; color: var(--gold); text-shadow: 0 1px 2px #000; }
.team-strip .mini.empty { display: grid; place-items: center; color: var(--line); font-size: 28px; }

/* ---------- batalha ---------- */
.battle-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.battle-wrap { overflow: hidden; line-height: 0; padding: 0; background: #000; }
#battle { width: 100%; height: auto; image-rendering: pixelated; display: block; }
.bar { height: 10px; background: #070815; border: 1px solid var(--line-gold); border-radius: 6px; overflow: hidden; margin: 8px 0; }
#afk-bar { height: 100%; width: 0; background: linear-gradient(90deg, #a8701a, var(--gold), #fff4c8); transition: width .25s; }

/* ---------- cartas de cavaleiro ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.hcard {
  position: relative; border-radius: 4px; padding: 0 0 8px; text-align: center; cursor: pointer; user-select: none;
  background: radial-gradient(circle at 50% 30%, #262a66, #0c0e26 75%);
  border: 1px solid var(--line); overflow: hidden;
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.hcard::after { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(255, 255, 255, .06); pointer-events: none; }
.hcard:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, .5); }
.hcard img, .slot img, .dhead img.big { object-fit: contain; }
.hcard img.art, .slot img.art, .dhead img.art { image-rendering: auto !important; }
.hcard img { width: 100%; height: 132px; image-rendering: pixelated; display: block; margin: 0 auto 4px; object-position: bottom; padding-top: 18px; }
.hcard.r-R { border-color: color-mix(in srgb, var(--R) 60%, transparent); }
.hcard.r-SR { border-color: color-mix(in srgb, var(--SR) 70%, transparent); background: radial-gradient(circle at 50% 30%, #3a2466, #0e0c26 75%); }
.hcard.r-SSR { border-color: var(--SSR); background: radial-gradient(circle at 50% 30%, #5a4316, #1a1206 75%); box-shadow: 0 0 14px rgba(242, 194, 78, .25); }
.hcard.sel { outline: 2px solid var(--accent); outline-offset: 2px; }
.hcard.inteam { opacity: .78; }
.hcard.locked { filter: grayscale(1) brightness(.45); cursor: default; }
.hcard.locked:hover { transform: none; box-shadow: none; }
.rar, .rtag {
  font-family: 'Cinzel', serif; font-weight: 900; font-size: 11px; padding: 2px 7px; border-radius: 2px; color: #120e18;
}
.rar { position: absolute; top: 5px; left: 5px; z-index: 1; }
.r-R .rar, .rtag.r-R { background: var(--R); }
.r-SR .rar, .rtag.r-SR { background: var(--SR); }
.r-SSR .rar, .rtag.r-SSR { background: linear-gradient(#fff4c8, var(--SSR)); }
.hname { font-family: 'Cinzel', serif; font-weight: 900; font-size: 14px; line-height: 1.1; padding: 0 4px; }
.htitle { font-size: 11px; color: var(--muted); }
.hlvl { font-size: 11px; margin-top: 2px; }
.stars { color: var(--gold); letter-spacing: -1px; }
.stars .off { color: #3a3460; }
.pow { font-size: 11px; color: var(--accent); font-weight: 800; }
.tag-team { position: absolute; top: 5px; right: 5px; z-index: 1; font-size: 9px; background: var(--good); color: #0a2a10; padding: 2px 5px; border-radius: 2px; font-weight: 900; }
.new, .dup { font-size: 11px; font-weight: 900; margin-top: 3px; }
.new { color: var(--good); }
.dup { color: var(--muted); }

/* ---------- formação ---------- */
.formation { display: flex; gap: 14px; align-items: flex-end; justify-content: center; padding: 10px 0; flex-wrap: wrap; }
.flabel { font-family: 'Cinzel', serif; font-size: 13px; color: var(--gold-2); font-weight: 900; }
.slot {
  position: relative; width: 120px; height: 160px; border: 1px dashed var(--line); border-radius: 4px; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #1f2356, #0c0e26); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; cursor: pointer;
  padding-bottom: 6px;
}
.slot.r-R, .slot.r-SR, .slot.r-SSR { border-style: solid; }
.slot.r-SSR { border-color: var(--SSR); }
.slot.r-SR { border-color: var(--SR); }
.slot.r-R { border-color: var(--R); }
.slot.sel { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 16px rgba(127, 214, 255, .45); }
.slot img { width: 100%; height: 110px; image-rendering: pixelated; object-position: bottom; }
.slot .sname { font-family: 'Cinzel', serif; font-weight: 900; font-size: 13px; }
.slot .slvl { font-size: 11px; color: var(--muted); }
.slot .empty { font-size: 34px; color: var(--line); margin: auto; }
.slot .rm { position: absolute; top: 4px; right: 4px; padding: 0 6px; font-size: 11px; border-radius: 3px; }
.formation.queue { gap: 10px; }
.qslot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.enemy-arrow { color: #ff6a5a; font-family: 'Cinzel', serif; font-weight: 900; text-align: center; font-size: 14px; align-self: center; }

/* ---------- evolução ---------- */
.heroes-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 14px; align-items: start; }
.detail { position: sticky; top: calc(var(--top) + 14px); }
.dhead { display: flex; gap: 14px; align-items: center; }
.dhead img.big {
  width: 130px; height: 170px; image-rendering: pixelated; border: 1px solid var(--line-gold); border-radius: 4px; padding: 6px;
  background: radial-gradient(circle at 50% 30%, #2a2f6a, #0c0e26);
}
.dhead img.r-SSR { border-color: var(--SSR); background: radial-gradient(circle at 50% 30%, #5a4316, #1a1206); }
.dhead img.r-SR { border-color: var(--SR); }
.dname { font-family: 'Cinzel', serif; font-size: 24px; font-weight: 900; color: #fff; }
.dtitle { color: var(--gold-2); font-family: 'Cinzel', serif; }
.stats { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.stats th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12px; }
.stats td, .stats th { padding: 5px 6px; border-bottom: 1px solid rgba(138, 106, 36, .35); }
.stats td.up { color: var(--good); }
.skill { background: rgba(10, 11, 30, .7); border-radius: 3px; padding: 10px 12px; border-left: 3px solid var(--gold); }
.locked-box { margin-top: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 3px; color: var(--muted); text-align: center; }

/* seções de evolução no detalhe do cavaleiro */
.evo { margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(138, 106, 36, .5); border-radius: 3px; background: rgba(10, 11, 30, .55); }
.evo h4 { margin: 0 0 6px; font-family: 'Cinzel', serif; color: var(--gold-2); font-size: 14px; }
.evo.locked { opacity: .65; border-style: dashed; }
.evo .wide { margin-top: 8px; }

/* ---------- Treinamento e Forja ---------- */
.coin.item { min-width: 0; padding: 4px 10px; gap: 4px; font-size: 13px; }
.train-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.forge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.task { display: flex; gap: 12px; align-items: center; padding: 10px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 3px; background: rgba(10, 11, 30, .6); }
.task-art { width: 70px; height: 90px; flex: none; object-fit: contain; object-position: bottom; border-radius: 3px; background: radial-gradient(circle at 50% 30%, #262a66, #0c0e26); }
.task-art.empty { display: grid; place-items: center; font-size: 30px; color: var(--line); border: 1px dashed var(--line); }
.task-art.trio { display: flex; width: 120px; }
.task-art.trio img { width: 40px; height: 90px; object-fit: contain; object-position: bottom; }
.task-body { flex: 1; min-width: 0; }
.task-body .bar { margin: 6px 0; }
.small-btn { padding: 4px 10px; font-size: 12px; margin-top: 6px; }
select {
  width: 100%; margin: 6px 0; padding: 7px 8px; font: inherit; color: var(--text);
  background: #0c0e26; border: 1px solid var(--line-gold); border-radius: 3px;
}
.sub-h { font-family: 'Cinzel', serif; color: var(--gold-2); margin: 14px 0 6px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 10px; font-size: 13px; border-radius: 999px; }
.chip small { display: inline; margin: 0 0 0 4px; color: var(--accent); }
.chip.on { background: linear-gradient(#ffd973, #d79a26); color: #2a1a02; border-color: #ffe7a0; }
.chip.on small { color: #4a2a02; }

/* ---------- invocação ---------- */
.banner-box {
  text-align: center; overflow: hidden;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(242, 194, 78, .25), transparent 70%),
    linear-gradient(160deg, #1d1650, #12193f 55%, #2a1a08);
}
.rates { display: flex; justify-content: center; gap: 16px; margin: 12px 0; flex-wrap: wrap; font-weight: 800; }
.pool { margin: 8px 0; line-height: 1.8; }
.summon-res { margin: 12px 0; }
.reveal { animation: reveal .5s both; }
@keyframes reveal { from { opacity: 0; transform: scale(.4) rotateY(90deg); filter: brightness(3); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- janelas de recompensa e avisos ---------- */
#modal { position: fixed; inset: 0; background: radial-gradient(circle, rgba(10, 12, 40, .75), rgba(0, 0, 0, .9)); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal-box {
  position: relative; width: min(680px, 100%); max-height: 90vh; overflow: auto; text-align: center; padding: 26px 22px 20px;
  background: linear-gradient(#141740, #0a0b22);
  border: 1px solid var(--gold); border-radius: 4px;
  box-shadow: 0 0 0 4px rgba(10, 11, 34, .9), 0 0 0 5px var(--line-gold), 0 0 60px rgba(242, 194, 78, .25);
  animation: surge .3s ease;
}
@keyframes surge { from { opacity: 0; transform: scale(.92); } }
.modal-box::before {
  content: ''; position: absolute; left: 50%; top: -1px; width: 60%; height: 3px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #fff4c8, transparent);
}
.modal-box h2 {
  margin: 0 0 10px; font-size: 26px; font-weight: 900;
  background: linear-gradient(#fff4c8, #f2c24e 50%, #b07a1a); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.reward-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.reward {
  min-width: 110px; padding: 10px 14px; border: 1px solid var(--line-gold); border-radius: 3px;
  background: radial-gradient(circle at 50% 0%, rgba(242, 194, 78, .18), rgba(10, 11, 30, .9));
  font-weight: 900; font-size: 18px;
}
.reward small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
#toasts { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: calc(100vw - 32px); }
.toast {
  background: linear-gradient(#1a1d48, #10122e); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 3px; padding: 10px 14px; transition: opacity .4s, transform .4s; animation: tin .25s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
}
.toast.good { border-left-color: var(--gold); }
.toast.warn { border-left-color: #ffb04a; }
.toast.out { opacity: 0; transform: translateX(30px); }
@keyframes tin { from { opacity: 0; transform: translateX(30px); } }

/* ---------- telas menores ---------- */
@media (max-width: 1100px) {
  .battle-grid, .heroes-layout, .lobby-grid, .train-grid, .forge-grid { grid-template-columns: 1fr; }
  .detail { position: static; }
}
@media (max-width: 820px) {
  #btn-menu { display: inline-block; }
  #layout { grid-template-columns: 1fr; }
  #tabs {
    position: fixed; top: var(--top); left: 0; bottom: 0; width: 240px; height: auto; z-index: 30;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  body.menu-aberto #tabs { transform: none; box-shadow: 10px 0 40px rgba(0, 0, 0, .6); }
  main { padding: 14px 16px 24px; }
  .hero-banner h2 { font-size: 30px; }
  .hero-banner .boss-art { opacity: .3; max-width: 75%; right: -10%; }
  .hero-banner h2 { text-shadow: 0 2px 8px #000, 0 3px 0 #000; }
}
@media (max-width: 520px) {
  .logo-cdz { font-size: 20px; }
  .logo small { display: none; }
  .coin { min-width: 0; padding-right: 8px; font-size: 13px; }
  .coin i { width: 18px; height: 18px; }
  .slot { width: 96px; height: 132px; }
  .slot img { height: 88px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .hcard img { height: 112px; }
  .team-strip { gap: 4px; }
}

/* ---------------- Missões e Eventos ---------------- */
#tabs button em.badge {
  opacity: 1; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 900;
  background: #d8342a; color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 8px rgba(216, 52, 42, .6);
}
.bar > div { height: 100%; background: linear-gradient(90deg, #2a4ab8, #7fd6ff); transition: width .25s; }
.bar.gold > div { background: linear-gradient(90deg, #a8701a, var(--gold), #fff4c8); }
.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.row-between h3 { flex: 1; }
.sub-tabs { margin-bottom: 14px; }
.chip .dot { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 8px; background: #d8342a; color: #fff; font-size: 10px; font-weight: 900; }
.mission {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px;
  background: rgba(10, 11, 30, .7); border: 1px solid #2a2a44; border-left: 3px solid #3a3a5a; border-radius: 3px;
}
.mission .m-body { flex: 1; min-width: 0; }
.mission .bar { margin: 6px 0 4px; height: 8px; }
.mission > button { min-width: 112px; }
.mission.ready { border-left-color: var(--gold); box-shadow: inset 0 0 18px rgba(242, 194, 78, .12); }
.mission.got { opacity: .55; }
.mission.bonus { border-color: var(--line-gold); }
.login-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 12px; }
.login-day {
  position: relative; text-align: center; padding: 10px 4px; min-height: 92px; font-size: 12px;
  background: #0c0e26; border: 1px solid var(--line-gold); border-radius: 3px;
}
.login-day small { display: block; font-family: 'Cinzel', serif; color: var(--gold-2); margin-bottom: 6px; }
.login-day.today { border-color: var(--gold); box-shadow: 0 0 14px rgba(242, 194, 78, .45); }
.login-day.got { opacity: .5; }
.login-day.big { background: linear-gradient(#2a2108, #120f04); }
.login-day em, .pass-r em { position: absolute; top: 2px; right: 6px; font-style: normal; color: #6dff8a; font-weight: 900; }
.pass-track { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 12px; }
.pass-col { flex: 0 0 92px; display: flex; flex-direction: column; gap: 6px; }
.pass-lv { text-align: center; font-family: 'Cinzel', serif; font-weight: 900; color: #777; border-bottom: 2px solid #333; }
.pass-col.ok .pass-lv { color: var(--gold); border-color: var(--gold); }
.pass-r {
  position: relative; min-height: 70px; padding: 6px 4px; font-size: 11px; line-height: 1.35; text-align: center;
  background: #0c0e26; border: 1px solid #2a2a44; border-radius: 3px; color: inherit;
}
.pass-r.ready { border-color: var(--gold); box-shadow: 0 0 10px rgba(242, 194, 78, .35); }
.pass-r.got { opacity: .5; }
.pass-r.premium { background: linear-gradient(#24103a, #12081e); border-color: #6a3a9a; opacity: .75; }
.beast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 10px 0 12px; }
.beast {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; text-align: center; font-size: 12px;
  background: #0c0e26; border: 1px solid #2a2a44; border-radius: 3px;
}
.beast.boss { border-color: #8a2a2a; }
.beast.unknown { opacity: .45; }
.beast-art { height: 90px; display: flex; align-items: flex-end; justify-content: center; font-size: 34px; }
.beast-art img { max-height: 90px; max-width: 100%; }
.beast.unknown .beast-art img { filter: brightness(0); }
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.event-card h2 { margin-top: 8px; }
.event-art {
  height: 200px; display: flex; align-items: flex-end; justify-content: center; font-size: 60px; margin-bottom: 8px;
  background: radial-gradient(ellipse at 50% 80%, rgba(216, 52, 42, .35), transparent 70%); border-bottom: 1px solid var(--line-gold);
}
.event-art img { max-height: 196px; max-width: 100%; }
.event-art.rush { gap: 0; font-size: 30px; }
.event-art.rush img { max-height: 120px; max-width: 17%; margin: 0 -2%; }
.warn-box { border-color: #d8342a; color: #ffd0c8; }
details summary { cursor: pointer; color: var(--gold-2); margin: 6px 0; }
@media (max-width: 820px) {
  .login-grid { grid-template-columns: repeat(4, 1fr); }
  .mission { flex-wrap: wrap; }
  .mission > button { width: 100%; }
}

/* ---------------- Conta / nuvem / ranking ---------------- */
.conta-btn { flex-shrink: 0; margin-left: 0; padding: 6px 12px; border-radius: 999px; font-size: 13px; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.conta-btn.on { border-color: var(--gold); color: var(--gold-2); }
.acc-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.acc-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--gold-2); }
.acc-form input {
  padding: 9px 10px; font: inherit; color: #fff; background: #0c0e26; border: 1px solid var(--line-gold); border-radius: 3px;
}
.acc-form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 10px rgba(242, 194, 78, .3); }
.good-text { color: #6dff8a; }
.save-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.save-choice .panel { margin: 0; }
.rank-table { width: 100%; margin-top: 10px; }
.rank-table td:nth-child(2) { font-weight: 700; }
.rank-table tr.me td { background: rgba(242, 194, 78, .15); color: var(--gold-2); }
@media (max-width: 1180px) { .conta-btn span { display: none; } .conta-btn { padding: 6px 10px; } }
@media (max-width: 820px) {
  .save-choice { grid-template-columns: 1fr; }
}
