:root {
  --bg: #0b0e1a;
  --bg-2: #11152a;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.07);
  --panel-solid: #151a31;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0fa;
  --muted: #9aa0bd;
  --faint: #6c7290;
  --red: #ff4b5c;
  --yellow: #ffcb05;
  --blue: #3d7dff;
  --green: #31d0a0;
  --accent: linear-gradient(135deg, #ff4b5c 0%, #ff8a3d 50%, #ffcb05 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7);
  --card-ratio: 63 / 88;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 0% -10%, rgba(255, 75, 92, 0.16), transparent 60%),
    radial-gradient(800px 600px at 100% 0%, rgba(61, 125, 255, 0.18), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(255, 203, 5, 0.08), transparent 60%),
    var(--bg);
}

/* ------------------------------------------------------------------ Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border-strong); background: var(--panel-2);
  padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 600;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.12); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary {
  background: var(--accent); border: none; color: #1a0f00;
  box-shadow: 0 10px 30px -10px rgba(255, 110, 60, 0.7);
}
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.btn-sm { padding: 6px 12px; font-size: 14px; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.btn svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ Login */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden;
}
.login-cards { position: absolute; inset: 0; pointer-events: none; }
.login-cards span {
  position: absolute; width: 150px; aspect-ratio: var(--card-ratio); border-radius: 12px;
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(2px);
  animation: float 9s ease-in-out infinite;
}
.login-cards span:nth-child(1) { left: 8%; top: 14%; transform: rotate(-14deg); }
.login-cards span:nth-child(2) { left: 18%; bottom: 8%; transform: rotate(10deg); animation-delay: -3s; width: 120px; }
.login-cards span:nth-child(3) { right: 10%; top: 10%; transform: rotate(12deg); animation-delay: -5s; width: 130px; }
.login-cards span:nth-child(4) { right: 16%; bottom: 12%; transform: rotate(-8deg); animation-delay: -1.5s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -18px; } }

.login-box {
  width: min(420px, 100%); padding: 40px 34px 34px; border-radius: 28px;
  background: rgba(17, 21, 42, 0.72); border: 1px solid var(--border-strong);
  backdrop-filter: blur(18px); box-shadow: var(--shadow); position: relative; text-align: center;
  animation: rise .6s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.login-logo { width: 74px; height: 74px; margin: 0 auto 14px; animation: wobble 3.5s ease-in-out infinite; }
@keyframes wobble { 0%, 80%, 100% { rotate: 0deg; } 85% { rotate: -14deg; } 90% { rotate: 12deg; } 95% { rotate: -6deg; } }
.login-box h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.login-box p.sub { margin: 6px 0 26px; color: var(--muted); }
.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border-strong); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: rgba(255, 203, 5, .6); box-shadow: 0 0 0 4px rgba(255, 203, 5, .12); }
select.input { appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa0bd' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
select.input option { background: var(--panel-solid); color: var(--text); }
.login-box .btn-primary { width: 100%; padding: 13px; margin-top: 8px; font-size: 16px; }
.form-error { color: #ff8b97; font-size: 14px; min-height: 20px; margin-top: 10px; }

/* ------------------------------------------------------------------ Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 26, 0.72); backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1440px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand img { width: 32px; height: 32px; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--border); border-radius: 999px; }
.nav a { padding: 8px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; transition: all .2s; display: flex; gap: 8px; align-items: center; }
.nav a svg { width: 17px; height: 17px; }
.nav a:hover { color: var(--text); }
.nav a.active { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); }
.user-chip .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--accent); color: #1a0f00; }
.user-chip .name { font-size: 14px; font-weight: 600; }

.main { max-width: 1440px; margin: 0 auto; padding: 28px 24px 80px; }

/* ------------------------------------------------------------------ Cabeçalhos / stats */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: var(--c, var(--red)); opacity: .12; filter: blur(4px); }
.stat .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 13px; font-weight: 500; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px;
  padding: 10px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.toolbar .input { width: auto; padding: 9px 12px; background-color: rgba(0,0,0,.2); }
.toolbar .search { flex: 1; min-width: 200px; position: relative; }
.toolbar .search .input { width: 100%; padding-left: 38px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 17px; color: var(--faint); }
.toolbar select.input { padding-right: 34px; }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg button.active { background: rgba(255,255,255,.12); color: var(--text); }

/* ------------------------------------------------------------------ Grade de cartas */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 22px 18px; }
.grid.dense { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; }

.tile { cursor: pointer; animation: tileIn .45s var(--ease) both; }
@keyframes tileIn { from { opacity: 0; transform: translateY(10px); } }
.tile .art {
  position: relative; aspect-ratio: var(--card-ratio); border-radius: 4.5% / 3.3%;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), filter .3s;
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.8);
}
.tile:hover .art { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) scale(1.03); box-shadow: 0 26px 40px -18px rgba(0,0,0,.9); }
.tile .art img, .card-placeholder { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.tile .art .shine {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.35), transparent 45%);
  mix-blend-mode: overlay;
}
.tile:hover .art .shine { opacity: 1; }
.tile.missing .art { filter: grayscale(1) brightness(.55) contrast(.9); opacity: .55; }
.tile.missing:hover .art { filter: grayscale(.6) brightness(.8); opacity: .85; }

.card-placeholder {
  display: grid; place-items: center; text-align: center; padding: 12px; font-size: 12px; color: var(--muted);
  background: linear-gradient(160deg, #1d2445, #12162b); border: 1px solid var(--border-strong);
}
.card-placeholder img { width: 46px; height: 46px; opacity: .35; margin: 0 auto 8px; }

.qty-badge {
  position: absolute; top: -8px; right: -8px; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 999px;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #1a0f00;
  background: var(--accent); box-shadow: 0 6px 16px -4px rgba(255, 110, 60, .8); border: 2px solid var(--bg);
}
.lang-badge {
  display: inline-flex; align-items: center; justify-content: center; padding: 2px 7px; border-radius: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; background: var(--lc, #555); color: #fff;
  text-transform: uppercase; line-height: 1.5;
}
.tile .art .langs { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; }
.tile .art .lang-badge { box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.tile .num-badge { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.65); backdrop-filter: blur(4px); }

.tile .info { padding: 10px 2px 0; }
.tile .name { font-weight: 700; font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tile .set { color: var(--muted); font-size: 12.5px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.missing .info { opacity: .5; }

.num { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; color: var(--muted); }
.rarity-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 7px; background: #f3f1ea; height: 24px; }
.rarity-chip .rarity-svg { display: block; }
.type-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 4px; border-radius: 999px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--tc) 22%, transparent); color: color-mix(in srgb, var(--tc) 60%, white); }
.type-dot { width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9px; font-weight: 800; color: #fff; background: var(--tc); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); flex: none; }
.type-dot.lg { width: 22px; height: 22px; font-size: 11px; }

/* ------------------------------------------------------------------ Coleções */
.serie { margin-bottom: 38px; }
.serie-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.serie-head h2 { margin: 0; font-size: 21px; font-weight: 700; }
.serie-head .line { flex: 1; height: 1px; background: var(--border); }
.serie-head .count { color: var(--muted); font-size: 13px; }
.sets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.set-card {
  padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: all .25s var(--ease); position: relative; overflow: hidden;
}
.set-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--panel-2); }
.set-card.started { border-color: rgba(255, 203, 5, .25); }
.set-card .logo { height: 64px; display: flex; align-items: center; justify-content: center; }
.set-card .logo img { max-height: 64px; max-width: 80%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.set-card .logo .logo-text { font-weight: 800; font-size: 18px; text-align: center; opacity: .8; }
.set-card .logo .logo-text.code { font-size: 30px; letter-spacing: .02em; opacity: 1; padding: 4px 16px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(201,42,42,.35), rgba(201,42,42,.12)); color: #ffd6d6; border: 1px solid rgba(255,120,120,.25); }
.set-card .title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.set-card .title img { width: 20px; height: 20px; object-fit: contain; }
.set-card .sub { font-size: 12.5px; color: var(--muted); }
.progress { height: 7px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .6s var(--ease); }
.set-card .row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.set-card .row b { color: var(--text); }
.set-code { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; background: rgba(201, 42, 42, .25); color: #ffb4b4; letter-spacing: .04em; }
.complete-tag { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--green); color: #032; }

.set-hero {
  display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center;
  padding: 26px; border-radius: 24px; margin-bottom: 22px; background: var(--panel); border: 1px solid var(--border); position: relative; overflow: hidden;
}
.set-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 200px at 0% 0%, rgba(255,203,5,.10), transparent); pointer-events: none; }
.set-hero .logo { width: 220px; height: 100px; display: grid; place-items: center; }
.set-hero .logo img { max-height: 100px; max-width: 220px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(0,0,0,.6)); }
.set-hero .logo .logo-text { font-size: 24px; font-weight: 800; text-align: center; }
.set-hero h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.set-hero .sub { color: var(--muted); margin-top: 4px; }
.set-hero .back { margin-bottom: 8px; }
.ring { width: 110px; height: 110px; position: relative; }
.ring svg { width: 100%; height: 100%; rotate: -90deg; }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring .lbl b { font-size: 22px; font-weight: 800; display: block; }
.ring .lbl span { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(4, 6, 14, 0.7); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(980px, 100%); background: linear-gradient(180deg, #161b35, #11152b); border: 1px solid var(--border-strong);
  border-radius: 26px; box-shadow: var(--shadow); position: relative; animation: rise .35s var(--ease);
}
.modal.narrow { width: min(760px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px 0; }
.modal-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.modal-body { padding: 20px 26px 26px; }
.modal-close { position: absolute; top: 16px; right: 16px; z-index: 2; }

/* Adicionar carta */
.add-form { display: grid; gap: 20px; }
.add-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.label { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.number-input { font-size: 30px; font-weight: 800; letter-spacing: .04em; text-align: center; padding: 14px; font-variant-numeric: tabular-nums; }
.lang-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lang-opt {
  border: 1px solid var(--border-strong); background: rgba(0,0,0,.2); border-radius: 12px; padding: 10px 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-weight: 600; font-size: 12.5px; transition: all .15s; min-width: 0; height: 64px;
}
.lang-opt:hover { background: rgba(255,255,255,.06); }
.lang-opt.active { border-color: var(--yellow); background: rgba(255, 203, 5, .1); box-shadow: 0 0 0 3px rgba(255, 203, 5, .12); }
.symbol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 9px; }
.symbol-opt {
  border: 1px solid var(--border-strong); background: rgba(0,0,0,.2); border-radius: 14px; padding: 10px 8px 9px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px; transition: all .15s; text-align: center;
}
.symbol-opt:hover { background: rgba(255,255,255,.06); }
.symbol-opt .ico { height: 40px; min-width: 52px; padding: 0 10px; display: grid; place-items: center; background: #f3f1ea; border-radius: 10px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.symbol-opt .nm { font-size: 12px; font-weight: 600; line-height: 1.15; }
.symbol-opt.active { border-color: var(--yellow); background: rgba(255, 203, 5, .1); box-shadow: 0 0 0 3px rgba(255, 203, 5, .14); }
.hint { font-size: 12.5px; color: var(--faint); }
.link { color: var(--yellow); cursor: pointer; background: none; border: 0; padding: 0; font-weight: 600; font-size: 13px; }

.results { display: grid; gap: 12px; margin-top: 6px; }
.result {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: center; padding: 12px;
  border-radius: 16px; background: rgba(0,0,0,.2); border: 1px solid var(--border); animation: tileIn .35s var(--ease) both;
}
.result.match { border-color: rgba(49, 208, 160, .45); background: rgba(49, 208, 160, .06); }
.result .art { width: 96px; aspect-ratio: var(--card-ratio); border-radius: 6px; overflow: hidden; cursor: zoom-in; }
.result .art img { width: 100%; height: 100%; object-fit: cover; }
.result h3 { margin: 0 0 4px; font-size: 18px; }
.result .line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.result .actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.ok { background: rgba(49, 208, 160, .15); color: #6ff0c6; }
.pill.warn { background: rgba(255, 170, 60, .14); color: #ffc27a; }
.pill.own { background: rgba(255, 203, 5, .15); color: var(--yellow); }

.notice { padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px dashed var(--border-strong); color: var(--muted); font-size: 14px; }
.notice.err { border-color: rgba(255, 75, 92, .4); color: #ffa0aa; background: rgba(255,75,92,.06); }

/* Guia de símbolos */
.guide { display: grid; gap: 8px; }
.guide-row { display: grid; grid-template-columns: 90px 1fr; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.18); }
.guide-row .ico { height: 40px; display: grid; place-items: center; background: #f3f1ea; border-radius: 10px; }
.guide-row b { display: block; }
.guide-row span { font-size: 13px; color: var(--muted); }
.guide-row em { font-style: normal; font-size: 11px; color: var(--yellow); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }

/* Detalhe da carta */
.detail { display: grid; grid-template-columns: 360px 1fr; gap: 30px; padding: 30px; }
.big-card { position: sticky; top: 0; align-self: start; }
.big-card .art { position: relative; aspect-ratio: var(--card-ratio); border-radius: 4.5% / 3.3%;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .2s ease-out;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.9); }
.big-card .art img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.big-card .art .shine { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; mix-blend-mode: color-dodge; opacity: .0; transition: opacity .3s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.45), transparent 40%),
              linear-gradient(115deg, transparent 30%, rgba(255, 120, 200, .25) 45%, rgba(120, 220, 255, .25) 55%, transparent 70%);
  background-size: 100% 100%, 250% 250%; background-position: center, var(--mx, 50%) var(--my, 50%); }
.big-card:hover .art .shine { opacity: .8; }
.big-card.missing .art img { filter: grayscale(1) brightness(.7); }
.detail h2 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail .hp { font-size: 18px; font-weight: 700; color: #ff8b97; }
.detail .sub { color: var(--muted); margin-top: 4px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.fact { padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.2); border: 1px solid var(--border); }
.fact .k { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.fact .v { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 22px 0 10px; }
.attack { padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.18); margin-bottom: 8px; }
.attack .top { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.attack .cost { display: flex; gap: 3px; }
.attack .dmg { margin-left: auto; font-size: 18px; font-weight: 800; }
.attack p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }

.own-box { padding: 16px; border-radius: 18px; background: linear-gradient(135deg, rgba(255,203,5,.10), rgba(255,75,92,.06)); border: 1px solid rgba(255, 203, 5, .25); }
.own-box.empty { background: rgba(255,255,255,.03); border-color: var(--border); }
.own-total { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.own-total b { font-size: 34px; font-weight: 800; }
.own-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.own-row:first-of-type { border-top: 0; }
.own-row .lbl { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; background: rgba(0,0,0,.3); border-radius: 999px; border: 1px solid var(--border-strong); }
.stepper button { width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer; font-size: 18px; font-weight: 700; border-radius: 50%; }
.stepper button:hover { background: rgba(255,255,255,.1); }
.stepper span { min-width: 34px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.add-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.add-inline .input { width: auto; padding: 8px 34px 8px 12px; }

/* Versões (acabamento) */
.ver-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  background: rgba(255,255,255,.08); color: var(--muted); border: 1px solid var(--border); }
.ver-chip.reverse { background: linear-gradient(135deg, rgba(120,220,255,.18), rgba(255,140,220,.18)); color: #cfe9ff; border-color: rgba(160,200,255,.3); }
.ver-chip.special { background: linear-gradient(135deg, rgba(255,203,5,.22), rgba(255,75,92,.18)); color: #ffe08a; border-color: rgba(255,203,5,.35); }
.ver-chip.unknown { border-style: dashed; }
.ver-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.ver-opt { border: 1px solid var(--border-strong); background: rgba(0,0,0,.2); border-radius: 10px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ver-opt small { color: var(--green); font-weight: 700; }
.ver-opt.active { border-color: var(--yellow); background: rgba(255,203,5,.1); box-shadow: 0 0 0 3px rgba(255,203,5,.12); }
.ver-help { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 800; cursor: help; background: rgba(255,255,255,.1); color: var(--muted); border: 0; }
.ver-help:hover::after, .ver-help:focus::after { content: attr(data-tip); position: absolute; bottom: 130%; left: 50%; translate: -50% 0; width: 280px; padding: 10px 12px; border-radius: 10px;
  background: #0d1124; border: 1px solid var(--border-strong); color: var(--text); font-weight: 500; font-size: 12.5px; line-height: 1.45; text-align: left; z-index: 5; box-shadow: var(--shadow); white-space: normal; }
.tile .meta .ver-chip { font-size: 10.5px; }
.own-row .lbl { flex-wrap: wrap; min-width: 0; }
.own-row .stepper { flex: none; }
.own-row .ver-chip { white-space: normal; }
.btn-liga { white-space: normal; text-align: center; }
.own-row .set-ver { width: auto; padding: 4px 30px 4px 10px; font-size: 13px; border-style: dashed; }
.price-table tr.owned td { background: rgba(255,203,5,.06); }
.price-src { overflow-x: auto; }
@media (max-width: 640px) { .price-table td:first-child { white-space: normal; min-width: 110px; } }
.price-table td .pill { font-size: 10.5px; padding: 1px 7px; margin-left: 4px; }
.price-table th { line-height: 1.2; vertical-align: bottom; }

/* Valor de mercado */
.price-box { padding: 16px; border-radius: 18px; background: rgba(49, 208, 160, .05); border: 1px solid rgba(49, 208, 160, .22); }
.price-main { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.price-big { font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: #6ff0c6; line-height: 1.1; }
.price-big.muted { color: var(--muted); font-size: 22px; }
.price-own { text-align: right; padding: 8px 14px; border-radius: 12px; background: rgba(0,0,0,.25); }
.price-own span { display: block; font-size: 12px; color: var(--muted); }
.price-own b { font-size: 18px; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.price-src { padding: 12px; border-radius: 14px; background: rgba(0,0,0,.22); border: 1px solid var(--border); min-width: 0; }
.price-src-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.price-src-head span { font-size: 12px; color: var(--muted); }
.price-src-head .link { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.price-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.price-table th { text-align: right; font-weight: 600; font-size: 11px; color: var(--faint); padding: 0 0 4px 6px; }
.price-table th:first-child, .price-table td:first-child { text-align: left; padding-left: 0; color: var(--muted); font-weight: 500; }
.price-table td { text-align: right; padding: 5px 0 5px 6px; border-top: 1px solid var(--border); vertical-align: top; white-space: nowrap; }
.price-table td b { display: block; font-weight: 700; }
.price-table td small { display: block; font-size: 11px; color: var(--faint); }
.price-liga { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.btn-liga { background: linear-gradient(135deg, #1f6fe0, #1754b0); border: none; color: #fff; box-shadow: 0 10px 24px -12px rgba(31,111,224,.9); }
.btn-liga:hover { background: linear-gradient(135deg, #2b7cf0, #1c5fc4); }
.price-foot { margin-top: 12px; line-height: 1.45; }
@media (max-width: 640px) { .price-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ Estados */
.empty-state { text-align: center; padding: 70px 20px; border-radius: 24px; background: var(--panel); border: 1px dashed var(--border-strong); }
.empty-state img { width: 80px; margin: 0 auto 18px; opacity: .9; }
.empty-state h3 { margin: 0 0 6px; font-size: 22px; }
.empty-state p { color: var(--muted); margin: 0 0 20px; }
.loading { display: grid; place-items: center; padding: 80px 0; color: var(--muted); gap: 14px; }
.spinner { width: 46px; height: 46px; animation: spin 1s linear infinite; }
.spinner.sm { width: 20px; height: 20px; }
@keyframes spin { to { rotate: 360deg; } }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ Toasts */
#toasts { position: fixed; bottom: 24px; left: 50%; translate: -50% 0; z-index: 200; display: grid; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 16px; min-width: 260px;
  background: rgba(22, 27, 53, .95); border: 1px solid var(--border-strong); box-shadow: var(--shadow); backdrop-filter: blur(10px);
  animation: toastIn .35s var(--ease); pointer-events: auto;
}
.toast img { width: 40px; border-radius: 4px; }
.toast .t { font-weight: 700; }
.toast .s { font-size: 13px; color: var(--muted); }
.toast.err { border-color: rgba(255, 75, 92, .5); }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

.fab { display: none; }

/* ------------------------------------------------------------------ Responsivo */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .detail > div { min-width: 0; }
  .add-inline .input { max-width: 100%; }
  .big-card { position: static; max-width: 320px; margin: 0 auto; width: 100%; }
  .add-row { grid-template-columns: 1fr; }
  .set-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .topbar .add-btn-label { display: none; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .brand small, .user-chip .name { display: none; }
  .nav { order: 3; width: 100%; justify-content: center; }
  .nav a { flex: 1; justify-content: center; padding: 8px 10px; }
  .main { padding: 20px 14px 90px; }
  .page-head h1 { font-size: 26px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .result { grid-template-columns: 74px 1fr; }
  .result .art { width: 74px; }
  .result .actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .modal-backdrop { padding: 12px 8px; }
  .modal-head, .modal-body { padding-left: 16px; padding-right: 16px; }
  .facts { grid-template-columns: 1fr; }
  .topbar .add-top { display: none; }
  .toolbar select.input { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .symbol-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .symbol-opt .nm { font-size: 11px; }
  .stat .v { font-size: 24px; }
  .fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
    background: var(--accent); border: 0; color: #1a0f00; box-shadow: 0 14px 30px -8px rgba(255,110,60,.8); cursor: pointer; }
  .fab svg { width: 26px; height: 26px; }
}
