:root {
  --bg: #0a0c10;
  --bg-2: #0e1116;
  --surface: #13161d;
  --surface-2: #191d26;
  --surface-3: #20252f;
  --line: #242a35;
  --line-2: #2f3644;
  --text: #e6e8ec;
  --muted: #8c94a3;
  --dim: #5c6474;
  --accent: #3d7bfd;
  --accent-2: #2f66dc;
  --gold: #f0b43c;
  --gold-2: #d99a1f;
  --danger: #ef5a50;
  --ok: #45c47c;
  --radius: 10px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(61, 123, 253, .07), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .01em; margin: 0; line-height: 1.1; }
h1 { font-size: 34px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: rgba(61, 123, 253, .4); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.warn { color: var(--gold); }
.pos { color: var(--ok); font-weight: 600; }
.neg { color: var(--danger); font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.row-center { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.pad { padding: 10px; }

.coins { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-weight: 600; white-space: nowrap; }
.coins b { font-variant-numeric: tabular-nums; }
.coin-ico { width: 1.05em; height: 1.05em; flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s, opacity .15s;
  user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 7px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #4c87ff; box-shadow: 0 0 0 3px rgba(61, 123, 253, .18); }
.btn-gold { background: linear-gradient(180deg, #f5c04f, var(--gold-2)); color: #1c1305; }
.btn-gold:hover:not(:disabled) { box-shadow: 0 0 0 3px rgba(240, 180, 60, .2), 0 6px 18px rgba(240, 180, 60, .18); }
.btn-gold .coins { color: #1c1305; }
.btn-ghost { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); border-color: var(--line-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn.danger { color: #ff8a80; }
.btn-live { background: rgba(69, 196, 124, .14); color: var(--ok); border-color: rgba(69, 196, 124, .35); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 1px solid transparent; border-radius: 8px; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link { color: var(--accent); font-size: 14px; font-weight: 600; }
.link:hover { text-decoration: underline; }

.input {
  height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 123, 253, .18); }
select.input { padding-right: 30px; cursor: pointer; }
.input-group { display: flex; }
.input-group .input { flex: 1; border-radius: 8px 0 0 8px; min-width: 0; }
.input-group .btn { border-radius: 0 8px 8px 0; height: 38px; }
.input-group.sm .input { height: 30px; width: 90px; }
.input-group.sm .btn { height: 30px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.field .input { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  --tc: var(--accent);
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.active { color: var(--text); border-color: var(--tc); background: color-mix(in srgb, var(--tc) 16%, var(--surface)); }
.chip .glyph { color: var(--tc); }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.tab { flex: 1; height: 36px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; padding: 0 14px; }
.tab.active { background: var(--surface-3); color: var(--text); }
.tabs-inline { display: inline-flex; margin-bottom: 20px; }
.tabs-inline .tab { flex: none; }

.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; background: rgba(61, 123, 253, .15); color: #8db1ff; font-size: 12px; font-weight: 700; }
.badge.muted { background: var(--surface-3); color: var(--muted); }

.bar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--rc, var(--accent)); border-radius: inherit; transition: width .4s; }
.bar-lg { height: 9px; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.topbar {
  position: sticky; top: 0; z-index: 50; height: 60px; display: flex; align-items: center; gap: 24px;
  padding: 0 24px; background: rgba(10, 12, 16, .86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.brand img { height: 30px; }
.brand b { color: var(--accent); font-weight: 800; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; padding: 8px 12px; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.active { color: var(--text); }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav .dot { position: absolute; top: 6px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.coin-pill { display: flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; background: rgba(240, 180, 60, .09); border: 1px solid rgba(240, 180, 60, .22); }
.coin-pill.up { animation: coinUp .7s; }
.coin-pill.down { animation: coinDown .7s; }
@keyframes coinUp { 30% { box-shadow: 0 0 0 4px rgba(240, 180, 60, .25); transform: scale(1.06); } }
@keyframes coinDown { 30% { box-shadow: 0 0 0 4px rgba(239, 90, 80, .25); } }
.user-pill { display: flex; align-items: center; gap: 9px; padding: 3px 10px 3px 3px; border-radius: 9px; }
.user-pill:hover { background: var(--surface); }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta b { font-size: 14px; }
.user-meta small { color: var(--muted); font-size: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, #2b4fa8, #1b2a4f); font-family: var(--display); font-weight: 700; font-size: 16px; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 13px; border-radius: 7px; }
.avatar.lg { width: 56px; height: 56px; font-size: 26px; border-radius: 12px; }

#view { min-height: calc(100vh - 60px); }
.page { max-width: 1280px; margin: 0 auto; padding: 32px 24px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; }
.section-title { margin: 8px 0 14px; font-size: 22px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 14px; grid-column: 1 / -1; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.balance { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; background: var(--surface); border: 1px solid var(--line); padding: 8px 14px; border-radius: 10px; }
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin-bottom: 10px; }
.lead { color: var(--muted); font-size: 17px; max-width: 520px; margin-top: 10px; }

.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 11px 14px; max-width: 380px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: 9px; box-shadow: var(--shadow); font-size: 14px; font-weight: 500;
  transform: translateX(24px); opacity: 0; transition: all .25s;
}
.toast.in { transform: none; opacity: 1; }
.toast-ok { border-left-color: var(--ok); }
.toast-err { border-left-color: var(--danger); }

.modal-wrap { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(4, 5, 8, .72); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.modal-wrap.in { opacity: 1; }
.modal { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 26px; width: min(440px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: var(--shadow); transform: translateY(10px) scale(.98); transition: transform .2s; }
.modal-wrap.in .modal { transform: none; }
.modal-wide { width: min(860px, 100%); }
.modal-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); font-size: 24px; cursor: pointer; border-radius: 8px; line-height: 1; }
.modal-x:hover { background: var(--surface-3); color: var(--text); }
.confirm-text { font-size: 16px; padding-right: 20px; }

.card {
  --cw: 100%;
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; width: var(--cw); aspect-ratio: 63 / 88; container-type: inline-size;
  perspective: 1200px; transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .35s cubic-bezier(.2, .8, .2, 1); user-select: none; flex: none;
}
.card.tilting { transition: transform .08s linear; }
.card-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, 1.3, .5, 1); font-size: 5.6cqi; }
.card.face-down .card-inner { transform: rotateY(180deg); }
.card-front, .card-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 4.6cqi; overflow: hidden; }
.card-back { transform: rotateY(180deg); }

.card-front {
  padding: 2.4cqi;
  background: linear-gradient(150deg, color-mix(in srgb, var(--rc) 85%, #fff) 0%, var(--rc) 30%, color-mix(in srgb, var(--rc) 50%, #000) 100%);
  box-shadow: 0 .5em 1.4em rgba(0, 0, 0, .5);
}
.cf-frame {
  position: relative; height: 100%; display: flex; flex-direction: column; border-radius: 2.8cqi; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 12%, #12151c) 0%, #0f1218 45%, #0c0e13 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55);
}
.cf-head { display: flex; align-items: center; gap: .45em; padding: .5em .6em .4em; }
.cf-cost {
  width: 2.15em; height: 2.15em; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7aa6ff, var(--accent) 45%, #1d3f99 100%);
  box-shadow: 0 0 0 .14em #0b0d12, 0 0 0 .26em rgba(255, 255, 255, .18);
  font-family: var(--display); font-weight: 800; font-size: 1.15em; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.cf-name { font-family: var(--display); font-weight: 700; font-size: 1.12em; line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cf-art { position: relative; margin: 0 .55em; aspect-ratio: 4 / 3; border-radius: .35em; overflow: hidden; background: #07090c; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 0 0 .15em rgba(0, 0, 0, .5); }
.art-svg, .art-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cf-typeline { display: flex; align-items: center; justify-content: space-between; margin: .45em .55em 0; padding: .22em .45em; border-radius: .3em; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .06); }
.cf-type { display: inline-flex; align-items: center; gap: .35em; font-size: .7em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #c4c9d3; }
.cf-type .glyph { color: var(--tc); width: 1.2em; height: 1.2em; }
.rar-gem { width: .9em; height: .9em; filter: drop-shadow(0 0 .25em var(--rc)); }
.cf-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: .35em; padding: .4em .75em; text-align: center; min-height: 0; overflow: hidden; }
.cf-text { font-size: .8em; line-height: 1.3; color: #dfe2e8; }
.cf-text b { color: #fff; font-weight: 700; }
.cf-flavor { font-size: .66em; line-height: 1.3; color: #7f8797; font-style: italic; }
.cf-foot { position: relative; height: 2.3em; display: flex; align-items: center; justify-content: space-between; padding: 0 .4em .4em; }
.cf-stat { width: 2.25em; height: 2.25em; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.12em; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.cf-atk { background: linear-gradient(160deg, #ffb35c, #d9641e); clip-path: polygon(50% 0, 100% 30%, 82% 100%, 18% 100%, 0 30%); }
.cf-hp { background: linear-gradient(160deg, #ff6e6e, #b8262c); border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%; }
.cf-stat.buffed span { color: #8dffb0; }
.cf-stat.hurt span { color: #ffd1d1; }
.cf-spell { font-family: var(--display); font-size: .72em; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--tc); margin: 0 auto; }
.cf-set { position: absolute; left: 50%; bottom: .55em; transform: translateX(-50%); font-size: .52em; color: #5a6170; letter-spacing: .1em; font-weight: 600; }
.card .cf-spell ~ .cf-set { bottom: .1em; }

.cf-foil { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s; mix-blend-mode: color-dodge; }
.card.r-epique .cf-foil { opacity: .25; background: radial-gradient(circle at var(--mx) var(--my), rgba(200, 150, 255, .55), transparent 55%); }
.card.r-legendaire .cf-foil {
  opacity: .4;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .5), transparent 40%),
    linear-gradient(115deg, transparent 20%, rgba(255, 200, 80, .5) 35%, rgba(120, 220, 255, .45) 50%, rgba(255, 120, 220, .4) 65%, transparent 80%);
  background-size: 100% 100%, 250% 250%;
  background-position: center, var(--mx) var(--my);
}
.card.r-legendaire .card-front { box-shadow: 0 0 1.2em color-mix(in srgb, var(--rc) 45%, transparent), 0 .5em 1.4em rgba(0, 0, 0, .5); }
.card.tilting .cf-foil { opacity: .6; }
.card.tilting.r-legendaire .cf-foil { opacity: .75; }
.card.grayscale .card-front { filter: grayscale(1) brightness(.6); }

.card-back {
  padding: 2.4cqi;
  background: linear-gradient(150deg, #7b62c9, #3d2583 40%, #22134f);
  box-shadow: 0 .5em 1.4em rgba(0, 0, 0, .5);
}
.cb-inner {
  position: relative; height: 100%; border-radius: 2.8cqi; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqi;
  background:
    radial-gradient(circle at 50% 45%, rgba(140, 105, 235, .45), transparent 58%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 2cqi, transparent 2cqi 4cqi),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .025) 0 2cqi, transparent 2cqi 4cqi),
    #2c1a68;
  box-shadow: inset 0 0 0 1.2cqi #2c1a68, inset 0 0 0 1.6cqi rgba(255, 255, 255, .18), inset 0 0 0 3.6cqi #2c1a68, inset 0 0 0 3.9cqi rgba(255, 255, 255, .1);
}
.cb-ring { position: absolute; width: 74cqi; height: 74cqi; border-radius: 50%; border: .5cqi solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 5cqi rgba(255, 255, 255, .03), inset 0 0 8cqi rgba(160, 130, 255, .3); top: 50%; left: 50%; transform: translate(-50%, -56%); }
.cb-logo { position: relative; width: 56cqi; filter: drop-shadow(0 0 3cqi rgba(170, 140, 255, .6)); }
.cb-sub { position: relative; font-family: var(--display); font-size: 5cqi; letter-spacing: .32em; text-transform: uppercase; color: rgba(255, 255, 255, .55); font-weight: 600; }

.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-art { position: relative; overflow: hidden; display: flex; align-items: center; padding: 60px; background: radial-gradient(900px 600px at 20% 30%, rgba(61, 123, 253, .18), transparent 60%), var(--bg-2); border-right: 1px solid var(--line); }
.auth-copy { position: relative; z-index: 2; max-width: 460px; }
.auth-logo { height: 70px; margin-bottom: 26px; }
.auth h1 { font-size: 64px; }
.auth h1 span { color: var(--accent); }
.auth-copy > p { color: var(--muted); font-size: 18px; margin: 14px 0 26px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.auth-points li { padding-left: 22px; position: relative; color: var(--muted); }
.auth-points li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; transform: rotate(45deg); background: var(--accent); }
.auth-points b { color: var(--text); }
.auth-cards { position: absolute; right: -170px; top: 50%; transform: translateY(-50%); width: 420px; height: 520px; }
.ghost-card { position: absolute; width: 240px; aspect-ratio: 63/88; border-radius: 14px; background: linear-gradient(150deg, #5a43a8, #2c1a68); box-shadow: var(--shadow), inset 0 0 0 6px #2c1a68, inset 0 0 0 8px rgba(255, 255, 255, .1); opacity: .5; }
.ghost-card::after { content: ""; position: absolute; inset: 0; background: url(../img/supinfo-logo.png) center / 50% no-repeat; opacity: .55; }
.g1 { top: 40px; left: 140px; transform: rotate(14deg); }
.g2 { top: 70px; left: 70px; transform: rotate(2deg); opacity: .7; }
.g3 { top: 110px; left: 0; transform: rotate(-10deg); opacity: .9; }
.auth-form { align-self: center; justify-self: center; width: min(400px, 100% - 40px); display: flex; flex-direction: column; gap: 16px; }
.form-error { color: #ff8a80; font-size: 14px; background: rgba(239, 90, 80, .1); border: 1px solid rgba(239, 90, 80, .3); padding: 9px 12px; border-radius: 8px; }

.home-hero { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; padding: 34px; border-radius: 18px; border: 1px solid var(--line); margin-bottom: 20px; background: linear-gradient(110deg, rgba(61, 123, 253, .1), transparent 55%), var(--surface); }
.home-hero h1 { font-size: 44px; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; }
.daily { display: flex; align-items: center; gap: 22px; padding: 18px 22px 18px 18px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.daily.ready { border-color: rgba(240, 180, 60, .4); box-shadow: 0 0 40px rgba(240, 180, 60, .08); }
.daily.ready .pack { animation: floaty 3s ease-in-out infinite; }
.daily.claimed .daily-pack { opacity: .45; filter: grayscale(.6); }
.daily-info { display: flex; flex-direction: column; gap: 8px; min-width: 210px; }
.daily-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.daily-info > b { font-size: 17px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.daily-timer { color: var(--muted); font-size: 14px; }
.daily-timer b { color: var(--text); font-variant-numeric: tabular-nums; }
@keyframes floaty { 50% { transform: translateY(-6px) rotate(-1.5deg); } }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.stat > span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.stat > b { font-family: var(--display); font-size: 26px; font-weight: 700; }
.stat small { color: var(--muted); }
.home-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.card-strip { display: flex; gap: 14px; overflow-x: auto; padding: 6px 2px 10px; }
.earn { list-style: none; padding: 0; margin: 0 0 14px; }
.earn li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; gap: 10px; }
.earn li > span:first-child { color: var(--muted); }

.pack {
  --pc: var(--accent);
  position: relative; width: 190px; aspect-ratio: .64; transform-style: preserve-3d; transition: transform .2s; cursor: default;
}
.pack-sm { width: 110px; }
.pack-md { width: 170px; }
.pack-body {
  position: absolute; inset: 7% 0 5% 0; border-radius: 4px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--pc) 70%, #fff) -10%, var(--pc) 25%, color-mix(in srgb, var(--pc) 40%, #05070c) 75%, #05070c 110%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), inset 0 0 30px rgba(0, 0, 0, .35), 0 18px 40px rgba(0, 0, 0, .55);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; container-type: inline-size;
}
.pack-pattern { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 3cqi, transparent 3cqi 9cqi); }
.pack-sheen { position: absolute; inset: -50%; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .35) 50%, transparent 60%); animation: sheen 3.6s ease-in-out infinite; }
@keyframes sheen { 0% { transform: translateX(-60%); } 60%, 100% { transform: translateX(60%); } }
.pack-top-label { position: absolute; top: 6cqi; font-family: var(--display); font-weight: 700; font-size: 6.5cqi; letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.pack-logo { position: relative; width: 44cqi; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); margin-bottom: 6cqi; }
.pack-title { position: relative; font-family: var(--display); font-weight: 800; font-size: 18cqi; line-height: .9; text-transform: uppercase; letter-spacing: .03em; text-shadow: 0 3px 12px rgba(0, 0, 0, .5); }
.pack-name { position: relative; font-family: var(--display); font-weight: 600; font-size: 10cqi; text-transform: uppercase; letter-spacing: .14em; color: rgba(255, 255, 255, .85); }
.pack-type { position: relative; margin-top: 4cqi; color: #fff; }
.pack-count { position: absolute; bottom: 6cqi; font-size: 6cqi; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: rgba(255, 255, 255, .7); background: rgba(0, 0, 0, .3); padding: 1.5cqi 4cqi; border-radius: 99px; }
.pack-crimp { position: absolute; left: 0; right: 0; height: 9%; background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 60%, #fff), color-mix(in srgb, var(--pc) 70%, #000)); -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 8px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 8px 100%; }
.pack-tear { position: absolute; top: 0; left: 0; right: 0; height: 9%; z-index: 2; transform-origin: 100% 100%; }
.pack-tear .pack-crimp { top: 0; height: 100%; border-radius: 3px 3px 0 0; }
.pack-crimp-bottom { bottom: 0; height: 6%; transform: scaleY(-1); }

.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.shop-item { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .2s, transform .2s; }
.shop-item:hover { border-color: color-mix(in srgb, var(--pc) 50%, var(--line)); }
.shop-pack { display: grid; place-items: center; padding: 30px 0 24px; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--pc) 25%, transparent), transparent 65%), var(--bg-2); border-bottom: 1px solid var(--line); }
.shop-item:hover .pack { transform: translateY(-6px) rotate(-2deg); }
.shop-info { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.shop-info .btn { margin-top: auto; }
.type-chips .chip { height: 28px; font-size: 12px; padding: 0 9px; }
.odds { list-style: none; margin: 0; padding: 12px; background: var(--bg-2); border-radius: 10px; border: 1px solid var(--line); font-size: 13px; display: grid; gap: 5px; }
.odds li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.odds li i { width: 8px; height: 8px; transform: rotate(45deg); flex: none; }
.odds li b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.odds-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 2px; }

.scene { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; overflow: hidden; perspective: 1400px; }
.scene.in { opacity: 1; }
.scene-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--best) 18%, #0b0e15) 0%, #050608 70%); }
.scene-bg::after { content: ""; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 55%, rgba(255, 255, 255, .014) 0 6deg, transparent 6deg 18deg); animation: spin 90s linear infinite; }
.scene-flash { position: absolute; inset: 0; background: radial-gradient(circle, var(--flash, #fff), transparent 70%); opacity: 0; pointer-events: none; z-index: 5; }
.scene.flash .scene-flash { animation: flash .9s ease-out; }
@keyframes flash { 0% { opacity: 0; } 12% { opacity: .55; } 100% { opacity: 0; } }
.scene.quake { animation: quake .5s; }
@keyframes quake { 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, -2px); } 80% { transform: translate(3px, 3px); } }
.scene-fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.particle { position: fixed; border-radius: 50%; pointer-events: none; }
.scene-head { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 16px; padding: 18px 24px; z-index: 4; }
.scene-title { font-family: var(--display); font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.scene-daily { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.scene-skip { margin-left: auto; opacity: 0; pointer-events: none; transition: opacity .3s; }
.scene-skip.show { opacity: 1; pointer-events: auto; }
.scene-stage { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.scene-pack { position: relative; transition: transform .5s cubic-bezier(.5, 0, .7, .4), opacity .4s; }
.scene-pack .pack { width: min(260px, 52vw); cursor: pointer; animation: floaty 3s ease-in-out infinite; }
.scene-pack .pack:hover .pack-body { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 0 50px color-mix(in srgb, var(--pc) 50%, transparent), 0 18px 40px rgba(0, 0, 0, .55); }
.pack-glow { position: absolute; left: 50%; top: 8%; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--best); box-shadow: 0 0 60px 30px var(--best); opacity: 0; pointer-events: none; }
.pack.charging { animation: charge .9s ease-in forwards !important; }
@keyframes charge {
  0% { transform: scale(1); }
  20% { transform: scale(1.03) rotate(-2deg); }
  40% { transform: scale(1.04) rotate(2.5deg); }
  60% { transform: scale(1.06) rotate(-3deg) translateX(-3px); }
  80% { transform: scale(1.07) rotate(3deg) translateX(3px); }
  100% { transform: scale(1.08) rotate(0); }
}
.scene-pack.charging-rare .pack-body { animation: rareGlow .9s ease-in forwards; }
@keyframes rareGlow { to { box-shadow: inset 0 0 0 2px var(--best), 0 0 80px var(--best); } }
.pack.torn .pack-tear { animation: tearOff .7s cubic-bezier(.3, .6, .4, 1) forwards; }
@keyframes tearOff { 0% { transform: none; } 30% { transform: rotate(-6deg) translate(4px, -6px); } 100% { transform: rotate(-38deg) translate(120px, -160px); opacity: 0; } }
.pack.torn ~ .pack-glow { animation: glowOut .9s ease-out forwards; }
@keyframes glowOut { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: .8; box-shadow: 0 0 140px 70px var(--best); } }
.scene-pack.gone { transform: translateY(70vh) scale(.9); opacity: 0; }
.scene-hint { color: var(--muted); font-size: 15px; transition: opacity .3s; }
.scene-hint.gone { opacity: 0; }

.reveal-row { position: relative; z-index: 3; display: none; gap: clamp(10px, 1.6vw, 24px); justify-content: center; flex-wrap: wrap; padding: 0 20px; max-width: 1300px; }
.reveal-row.dealt { display: flex; }
.reveal-slot { position: relative; width: clamp(140px, 16vw, 220px); cursor: pointer; animation: deal .65s cubic-bezier(.2, .9, .3, 1.15) backwards; animation-delay: var(--d); }
@keyframes deal { from { transform: translateY(60vh) rotate(12deg) scale(.6); opacity: 0; } }
.reveal-slot .card { --cw: 100%; }
.reveal-slot:not(.flipped):hover .card { transform: perspective(900px) translateY(-10px) rotateX(var(--rx)) rotateY(var(--ry)); }
.reveal-aura { position: absolute; inset: -6%; border-radius: 16px; background: radial-gradient(circle, var(--rc), transparent 70%); opacity: 0; pointer-events: none; filter: blur(14px); }
.reveal-slot.aura .reveal-aura { animation: aura 1.6s ease-in-out infinite; }
.reveal-slot.aura.flipped .reveal-aura { animation: none; opacity: .35; }
@keyframes aura { 0%, 100% { opacity: .25; transform: scale(.95); } 50% { opacity: .6; transform: scale(1.04); } }
.reveal-slot.legend .reveal-aura { opacity: .7 !important; animation: legendAura 2.4s ease-in-out infinite !important; }
@keyframes legendAura { 50% { opacity: .95; transform: scale(1.08); } }
.reveal-slot.legend .card { animation: pop .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { scale: 1; } 40% { scale: 1.12; } 100% { scale: 1; } }
.new-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%) scale(0); background: var(--ok); color: #04210f; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; z-index: 3; transition: transform .3s .5s cubic-bezier(.3, 1.6, .5, 1); }
.reveal-slot.flipped .new-badge { transform: translateX(-50%) scale(1); }
.reveal-label { position: absolute; bottom: -28px; left: 0; right: 0; text-align: center; font-family: var(--display); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rc); font-size: 14px; opacity: 0; transition: opacity .3s .4s; }
.reveal-slot.flipped .reveal-label { opacity: 1; }
.scene-foot { position: relative; z-index: 4; margin-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 16px; opacity: 0; transform: translateY(10px); transition: all .4s; pointer-events: none; }
.scene-foot.show { opacity: 1; transform: none; pointer-events: auto; }
.scene-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: 15px; }
.scene-summary b { color: var(--text); }
.scene-summary .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }
.scene-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.progress-panel { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 18px; }
.progress-main { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: baseline; }
.progress-main span { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.progress-main b { font-family: var(--display); font-size: 30px; }
.progress-main .bar { grid-column: 1 / -1; }
.progress-rarities { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 16px; }
.pr { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 13px; }
.pr span { color: var(--rc); font-weight: 600; }
.pr b { font-variant-numeric: tabular-nums; }
.pr .bar { grid-column: 1 / -1; height: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters .search { width: 240px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 22px 18px; }
.card-grid.compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.grid-cell { position: relative; cursor: pointer; }
.grid-cell .card { --cw: 100%; }
.grid-cell:hover .card:not(.tilting) { transform: perspective(900px) translateY(-4px); }
.grid-cell.missing .card-front { filter: grayscale(1) brightness(.42); }
.grid-cell.missing:hover .card-front { filter: grayscale(.6) brightness(.6); }
.qty { position: absolute; top: -7px; right: -7px; min-width: 28px; height: 24px; padding: 0 7px; display: grid; place-items: center; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 12px; font-weight: 700; z-index: 2; }
.lock { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); background: rgba(10, 12, 16, .85); border: 1px solid var(--line-2); padding: 5px 10px; border-radius: 99px; font-size: 13px; z-index: 2; pointer-events: none; }

.detail { display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: start; }
.detail-card { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.detail-info { display: flex; flex-direction: column; gap: 12px; padding-top: 10px; }
.detail-info h2 { font-size: 32px; }
.rarity-tag { align-self: flex-start; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent); }
.kw-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.kw-list li { font-size: 14px; color: var(--muted); padding: 10px 12px; background: var(--bg-2); border-radius: 8px; border: 1px solid var(--line); }
.kw-list b { color: var(--text); display: block; }
.detail-owned { font-size: 14px; color: var(--muted); }
.detail-owned b { color: var(--text); }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.deck-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.deck-tile { display: flex; gap: 18px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.deck-tile.active { border-color: rgba(61, 123, 253, .5); box-shadow: 0 0 0 1px rgba(61, 123, 253, .25); }
.deck-cover .card { --cw: 110px; }
.deck-empty-cover { width: 110px; aspect-ratio: 63/88; border-radius: 8px; border: 1px dashed var(--line-2); }
.deck-meta { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.deck-types { display: flex; gap: 6px; }
.deck-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; align-items: center; }

.editor { display: grid; grid-template-columns: 1fr 320px; gap: 24px; max-width: 1440px; align-items: start; }
.editor-side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; max-height: calc(100vh - 100px); }
.deck-name { font-family: var(--display); font-size: 20px; font-weight: 700; height: 42px; }
.deck-count { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.deck-count b { color: var(--text); font-size: 20px; font-family: var(--display); }
.deck-count .bar { grid-column: 1 / -1; }
.deck-count.full .bar i { background: var(--ok); }
.curve { display: flex; gap: 5px; height: 70px; align-items: flex-end; padding: 0 2px 18px; position: relative; }
.curve-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.curve-col i { display: block; background: linear-gradient(180deg, #5b8fff, var(--accent-2)); border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s; }
.curve-col span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }
.deck-rows { list-style: none; padding: 0; margin: 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 4px; min-height: 120px; }
.deck-row { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px 0 0; border-radius: 7px; background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 22%, var(--surface-2)), var(--surface-2) 60%); border-left: 3px solid var(--rc); cursor: pointer; font-size: 14px; transition: transform .1s; }
.deck-row:hover { transform: translateX(-3px); background: var(--surface-3); }
.dr-cost { width: 30px; text-align: center; font-family: var(--display); font-weight: 800; font-size: 16px; color: #8db1ff; }
.dr-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.dr-qty { color: var(--gold); font-weight: 700; font-size: 13px; }
.editor-actions { display: flex; gap: 8px; }
.editor-actions .btn { flex: 1; }
.pool-cell.maxed .card { opacity: .35; }
.pool-cell .qty { top: auto; bottom: -8px; right: 50%; transform: translateX(50%); }

.deck-picker { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.deck-picker select { min-width: 200px; }
.banner-live, .banner-warn { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.banner-live { background: rgba(69, 196, 124, .1); border: 1px solid rgba(69, 196, 124, .3); }
.banner-warn { background: rgba(240, 180, 60, .08); border: 1px solid rgba(240, 180, 60, .3); color: #f5d38a; }
.banner-warn a { text-decoration: underline; font-weight: 600; }
.pve-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.pve-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.pve-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--lvl); }
.pve-card.lvl-0 { --lvl: var(--ok); }
.pve-card.lvl-1 { --lvl: var(--accent); }
.pve-card.lvl-2 { --lvl: var(--danger); }
.pve-card h3 { font-size: 24px; }
.pve-card p { flex: 1; font-size: 14px; }
.pve-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.pve-level { color: var(--lvl); letter-spacing: 2px; }
.pve-reward { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.pvp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pvp-grid .panel > p { font-size: 14px; margin-bottom: 14px; line-height: 1.6; }
.pvp-grid .panel > p .coins { vertical-align: middle; }
.queue-on { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: rgba(240, 180, 60, .08); border: 1px solid rgba(240, 180, 60, .3); }
.queue-on .btn { margin-left: auto; }
.sub { margin: 18px 0 8px; font-size: 15px; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.player { display: flex; align-items: center; gap: 10px; }
.player small { display: block; color: var(--muted); font-size: 12px; }
.online-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.online-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(69, 196, 124, .2); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr.me td { background: rgba(61, 123, 253, .07); }
.table .rank { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--muted); width: 50px; }
.table tr.top-1 .rank { color: #f2b13a; }
.table tr.top-2 .rank { color: #c9d1dc; }
.table tr.top-3 .rank { color: #d98a52; }
.ledger { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.ledger li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ledger li small { display: block; color: var(--muted); font-size: 12px; }
.ledger b { font-weight: 500; }
.form-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.form-inline .input { flex: 1; min-width: 160px; }

.gen { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.gen-form { display: flex; flex-direction: column; gap: 22px; }
.gen-section { display: flex; flex-direction: column; gap: 14px; }
.gen-section + .gen-section { padding-top: 20px; border-top: 1px solid var(--line); }
.gen-section h3 small { font-family: var(--font); font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-2.tight { gap: 8px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1.4fr .7fr; gap: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); cursor: pointer; font-size: 14px; font-weight: 500; }
.check:has(input:checked) { border-color: var(--accent); background: rgba(61, 123, 253, .12); }
.check input { accent-color: var(--accent); }
.file-btn { cursor: pointer; }
.gen-save { display: flex; justify-content: flex-end; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.batch { background: var(--bg-2); margin: 0 -20px -20px; padding: 20px !important; border-radius: 0 0 14px 14px; }
.gen-preview-sticky { position: sticky; top: 84px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gen-preview .card { --cw: 320px; }
.admin-cell-actions { position: absolute; inset: auto 8px 10px 8px; display: flex; gap: 6px; justify-content: center; opacity: 0; transition: opacity .15s; z-index: 3; }
.admin-cell:hover .admin-cell-actions { opacity: 1; }

body.in-match { overflow: hidden; }
body.in-match #view { height: calc(100vh - 60px); min-height: 0; }
.match-loading { height: 100%; display: grid; place-items: center; }
.match { position: relative; height: 100%; display: grid; grid-template-columns: 1fr 270px; overflow: hidden; }
.arena {
  position: relative; display: grid; grid-template-rows: auto 1fr auto 1fr auto; min-height: 0; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(61, 123, 253, .08), transparent 70%),
    linear-gradient(180deg, #0c0f15, #0a0c10 50%, #0c0f15);
}
.arena::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px); background-size: 48px 48px; mask: radial-gradient(ellipse at center, #000 30%, transparent 75%); pointer-events: none; }
.side { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.side-opp { padding-top: 0; }
.opp-hand { display: flex; justify-content: center; height: 44px; margin-bottom: 6px; }
.opp-card { width: 44px; aspect-ratio: 63/88; margin: 0 -8px; transform: translateY(-24px) rotate(calc(var(--i) * -4deg)); }
.opp-card .card-back { transform: none; position: relative; width: 100%; height: 100%; border-radius: 4px; padding: 2px; container-type: inline-size; }
.opp-card .cb-inner { border-radius: 3px; }
.opp-card .cb-sub, .opp-card .cb-ring { display: none; }
.hero-bar { display: flex; align-items: center; gap: 16px; padding: 8px 16px; }
.hero-bar.mine { padding-bottom: 0; }
.hero {
  position: relative; width: 74px; height: 74px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(150deg, #2b3a5e, #141b2e); border: 2px solid var(--line-2); transition: box-shadow .2s, transform .2s;
}
.hero-opp { background: linear-gradient(150deg, #5e2b33, #2a1418); }
.hero-avatar { font-family: var(--display); font-size: 30px; font-weight: 800; color: rgba(255, 255, 255, .9); }
.hero-hp { position: absolute; bottom: -10px; right: -10px; min-width: 40px; height: 30px; padding: 0 8px; border-radius: 9px; display: flex; align-items: baseline; justify-content: center; gap: 1px; background: linear-gradient(160deg, #ff6e6e, #b8262c); box-shadow: 0 0 0 2px #0a0c10; font-family: var(--display); }
.hero-hp b { font-size: 19px; font-weight: 800; line-height: 30px; }
.hero-hp small { font-size: 11px; opacity: .7; }
.hero.low .hero-hp { animation: lowHp 1.2s ease-in-out infinite; }
@keyframes lowHp { 50% { box-shadow: 0 0 0 2px #0a0c10, 0 0 16px #ff3b3b; } }
.hero-info { display: flex; flex-direction: column; gap: 6px; min-width: 170px; }
.hero-name { font-size: 15px; }
.energy { display: flex; align-items: center; gap: 8px; }
.energy-num { font-family: var(--display); font-weight: 700; font-size: 15px; color: #8db1ff; min-width: 36px; }
.pips { display: flex; gap: 3px; }
.pips i { width: 11px; height: 11px; transform: rotate(45deg); border-radius: 2px; background: var(--surface-3); border: 1px solid var(--line-2); }
.pips i.on { background: linear-gradient(135deg, #7aa6ff, var(--accent)); border-color: #7aa6ff; box-shadow: 0 0 6px rgba(61, 123, 253, .6); }
.pips i.used { background: rgba(61, 123, 253, .18); border-color: rgba(61, 123, 253, .35); }
.pile { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.pile-card { width: 30px; aspect-ratio: 63/88; position: relative; }
.pile-card .card-back { transform: none; border-radius: 3px; padding: 1.5px; container-type: inline-size; }
.pile-card .cb-inner { border-radius: 2px; }
.pile-card .cb-sub, .pile-card .cb-ring { display: none; }

.lane { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 20px; min-height: 0; }
.lane-empty { color: var(--dim); font-size: 14px; }
.lane-divider { position: relative; z-index: 1; height: 1px; margin: 0 40px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.lane-divider span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #0b0d12; padding: 2px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); font-weight: 700; border-radius: 99px; border: 1px solid var(--line); }

.unit {
  position: relative; width: 104px; height: 132px; border-radius: 12px; cursor: pointer; flex: none;
  background: #0d1016; border: 2px solid var(--rc); box-shadow: 0 8px 20px rgba(0, 0, 0, .5);
  transition: transform .18s, box-shadow .18s, opacity .35s, filter .35s;
}
.unit-art { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; }
.unit-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .85)); }
.unit-art svg, .unit-art img { width: 100%; height: 100%; object-fit: cover; }
.unit-name { position: absolute; left: 6px; right: 6px; bottom: 26px; font-family: var(--display); font-weight: 700; font-size: 12px; line-height: 1.05; text-align: center; text-transform: uppercase; text-shadow: 0 1px 3px #000; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.unit-stat { position: absolute; bottom: -9px; width: 32px; height: 32px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 18px; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); box-shadow: 0 0 0 2px #0a0c10; }
.unit-atk { left: -9px; border-radius: 9px; background: linear-gradient(160deg, #ffb35c, #d9641e); }
.unit-hp { right: -9px; border-radius: 50%; background: linear-gradient(160deg, #ff6e6e, #b8262c); }
.unit-stat.buffed { color: #b5ffcb; }
.unit-hp.hurt { color: #ffd1d1; background: linear-gradient(160deg, #ff4e4e, #8f1419); }
.unit-icons { position: absolute; top: 5px; right: 5px; display: flex; flex-direction: column; gap: 3px; }
.kw { width: 18px; height: 18px; border-radius: 5px; background: rgba(0, 0, 0, .7) center / 12px no-repeat; border: 1px solid rgba(255, 255, 255, .15); }
.kw-poison { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2367e28a'%3E%3Cpath d='M12 2s7 7.5 7 12.5A7 7 0 0 1 5 14.5C5 9.5 12 2 12 2z'/%3E%3C/svg%3E"); }
.kw-life { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff6e8a'%3E%3Cpath d='M12 21s-8-5.2-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 5.8-8 11-8 11z'/%3E%3C/svg%3E"); }
.kw-rale { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9b8ff' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6'/%3E%3C/svg%3E"); }
.unit.taunt { border-radius: 12px 12px 30px 30px; border-width: 3px; border-color: #c9d1dc; }
.unit.taunt::before { content: ""; position: absolute; top: -12px; left: 50%; width: 26px; height: 22px; transform: translateX(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5 21 5v6.5c0 5.5-3.8 9.6-9 11-5.2-1.4-9-5.5-9-11V5z' fill='%23c9d1dc' stroke='%230a0c10' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat; z-index: 3; }
.unit.taunt .unit-art { border-radius: 9px 9px 27px 27px; }
.unit.shielded { box-shadow: 0 0 0 3px rgba(255, 214, 102, .85), 0 0 22px rgba(255, 214, 102, .55), 0 8px 20px rgba(0, 0, 0, .5); }
.unit.shielded::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; background: radial-gradient(circle at 50% 30%, rgba(255, 230, 150, .25), transparent 65%); pointer-events: none; }
.my-turn .unit.ready { box-shadow: 0 0 0 2px #45c47c, 0 0 18px rgba(69, 196, 124, .55), 0 8px 20px rgba(0, 0, 0, .5); }
.my-turn .unit.ready.shielded { box-shadow: 0 0 0 3px rgba(255, 214, 102, .85), 0 0 0 6px #45c47c, 0 0 22px rgba(69, 196, 124, .5); }
.my-turn .unit.ready:hover { transform: translateY(-6px); }
.unit.selected { transform: translateY(-12px) scale(1.06) !important; box-shadow: 0 0 0 3px #fff, 0 0 30px rgba(255, 255, 255, .45) !important; z-index: 5; }
.selecting .unit:not(.targetable):not(.selected), .selecting .hero:not(.targetable) { filter: brightness(.55) saturate(.6); }
.targetable { cursor: crosshair !important; animation: target 1s ease-in-out infinite; }
.unit.targetable, .hero.targetable { box-shadow: 0 0 0 3px #ff5a5a, 0 0 24px rgba(255, 90, 90, .7) !important; }
.lane-me .unit.targetable { box-shadow: 0 0 0 3px #45c47c, 0 0 24px rgba(69, 196, 124, .7) !important; }
@keyframes target { 50% { transform: scale(1.04); } }
.unit.hit, .hero.hit { animation: hit .4s; }
@keyframes hit { 15% { transform: translate(-5px, 2px) rotate(-2deg); filter: brightness(2) saturate(.3); } 35% { transform: translate(5px, -2px) rotate(2deg); } 55% { transform: translate(-3px, 1px); } 75% { transform: translate(2px, 0); } }
.unit.buff { animation: buff .6s; }
@keyframes buff { 40% { transform: scale(1.12); box-shadow: 0 0 0 3px #8dffb0, 0 0 28px rgba(141, 255, 176, .7); } }
.hero.healed { animation: healed .7s; }
@keyframes healed { 40% { box-shadow: 0 0 0 3px #45c47c, 0 0 30px rgba(69, 196, 124, .8); } }
.unit.dying { opacity: 0; transform: scale(.7) rotate(-8deg); filter: brightness(2.5) grayscale(1) blur(2px); }
.unit.summon { animation: summon .5s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes summon { from { transform: translateY(30px) scale(.6); opacity: 0; filter: brightness(2.5); } }

.hand { position: relative; height: 150px; width: 100%; display: flex; justify-content: center; align-items: flex-start; padding-top: 12px; }
.hand-slot { position: relative; margin: 0 -12px; transform: translateY(var(--lift)) rotate(var(--rot)); transform-origin: 50% 120%; transition: transform .2s; }
.hand-slot .card { --cw: 124px; cursor: pointer; }
.hand-slot:hover { z-index: 50 !important; transform: translateY(-112px) rotate(0) scale(1.65); }
.hand .card.playable .card-front { box-shadow: 0 0 0 2px #6fe3ff, 0 0 18px rgba(111, 227, 255, .6); }
.hand-slot:has(.playable) { --lift2: -8px; }
.hand-slot { translate: 0 var(--lift2, 0); }
.hand .card:not(.playable) .card-front { filter: brightness(.7); }
.hand .card.selected { transform: translateY(-30px) scale(1.1); }
.hand .card.selected .card-front { box-shadow: 0 0 0 3px #fff, 0 0 24px rgba(255, 255, 255, .5); }
.card.nope { animation: hit .35s; }
.their-turn .hand .card .card-front { box-shadow: none; }

.match-side { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-left: 1px solid var(--line); background: var(--bg-2); min-height: 0; }
.turn-box { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.turn-box.mine { border-color: rgba(69, 196, 124, .45); background: linear-gradient(180deg, rgba(69, 196, 124, .1), var(--surface)); }
.turn-num { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.turn-box b { font-family: var(--display); font-size: 20px; }
.turn-timer { height: 5px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.turn-timer i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }
.turn-timer i.urgent { background: var(--danger); }
.timer-txt { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.btn-end { height: 54px; font-family: var(--display); font-size: 19px; letter-spacing: .06em; text-transform: uppercase; background: linear-gradient(180deg, #f5c04f, var(--gold-2)); color: #1c1305; border-radius: 12px; }
.btn-end:disabled { background: var(--surface-3); color: var(--dim); opacity: 1; }
.btn-end.pulse { animation: endPulse 1.4s ease-in-out infinite; }
@keyframes endPulse { 50% { box-shadow: 0 0 0 5px rgba(240, 180, 60, .25), 0 0 26px rgba(240, 180, 60, .35); } }
.log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); padding: 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); min-height: 0; }
.log p { line-height: 1.35; }
.log p:last-child { color: var(--text); }
.preview { position: absolute; z-index: 30; right: 290px; top: 50%; transform: translateY(-50%) translateX(10px); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.preview.left { right: auto; left: 20px; }
.preview.show { opacity: 1; transform: translateY(-50%); }
.target-hint { position: absolute; z-index: 30; left: calc(50% - 135px); top: 50%; transform: translate(-50%, -50%); background: rgba(10, 12, 16, .9); border: 1px solid var(--line-2); padding: 8px 16px; border-radius: 99px; font-size: 14px; pointer-events: none; }
kbd { font-family: inherit; font-size: 12px; padding: 1px 6px; border-radius: 4px; background: var(--surface-3); border: 1px solid var(--line-2); }
.float { position: fixed; z-index: 500; pointer-events: none; font-family: var(--display); font-weight: 800; font-size: 34px; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0, 0, 0, .8); }
.float-dmg { color: #ff5a5a; }
.float-heal { color: #6dff9e; }
.float-shield { color: #ffd666; font-size: 22px; }
.played-reveal { position: absolute; z-index: 40; left: calc(50% - 135px); top: 50%; transform: translate(-50%, -50%); animation: reveal .35s cubic-bezier(.3, 1.4, .5, 1); transition: opacity .3s, transform .3s; pointer-events: none; }
.played-reveal.out { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
@keyframes reveal { from { opacity: 0; transform: translate(-50%, -40%) scale(.7); } }
.turn-banner { position: absolute; z-index: 45; left: calc(50% - 135px); top: 50%; transform: translate(-50%, -50%); pointer-events: none; animation: banner 1.5s ease forwards; }
.turn-banner span { display: block; font-family: var(--display); font-weight: 800; font-size: 46px; text-transform: uppercase; letter-spacing: .08em; padding: 10px 50px; background: linear-gradient(90deg, transparent, rgba(61, 123, 253, .35), transparent); text-shadow: 0 2px 12px rgba(0, 0, 0, .8); white-space: nowrap; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scaleX(.6); } 20%, 75% { opacity: 1; transform: translate(-50%, -50%) scaleX(1); } 100% { opacity: 0; transform: translate(-50%, -60%); } }
.end-overlay { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(5, 6, 9, .78); backdrop-filter: blur(5px); animation: fadeIn .4s; }
@keyframes fadeIn { from { opacity: 0; } }
.end-box { text-align: center; padding: 36px 50px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: reveal .5s cubic-bezier(.3, 1.4, .5, 1); min-width: 340px; }
.end-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.end-box h2 { font-size: 64px; margin: 6px 0 18px; text-transform: uppercase; letter-spacing: .04em; }
.won .end-box h2 { color: var(--gold); text-shadow: 0 0 30px rgba(240, 180, 60, .45); }
.lost .end-box h2 { color: #c3c8d2; }
.end-rewards { display: flex; justify-content: center; gap: 14px; margin-bottom: 16px; }
.end-rewards > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 20px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.end-rewards span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.end-rewards b { font-family: var(--display); font-size: 24px; display: flex; align-items: center; justify-content: center; gap: 4px; }

@media (max-width: 1100px) {
  .shop-grid, .pve-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .home-grid, .pvp-grid { grid-template-columns: 1fr; }
  .gen { grid-template-columns: 1fr; }
  .gen-preview { order: -1; }
  .gen-preview-sticky { position: static; }
  .progress-panel { grid-template-columns: 1fr; }
  .match { grid-template-columns: 1fr 210px; }
  .preview { right: 230px; }
  .played-reveal, .coin-flip, .turn-banner, .target-hint { left: calc(50% - 105px); }
}
@media (max-width: 860px) {
  .topbar { padding: 0 14px; gap: 12px; }
  .brand span, .user-meta { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 40px 24px 20px; border-right: 0; }
  .auth-cards { display: none; }
  .auth h1 { font-size: 44px; }
  .auth-form { padding: 20px 0 50px; }
  .home-hero { grid-template-columns: 1fr; padding: 22px; }
  .home-hero h1 { font-size: 34px; }
  .editor { grid-template-columns: 1fr; }
  .editor-side { position: static; max-height: none; }
  .detail { grid-template-columns: 1fr; justify-items: center; }
  .progress-rarities { grid-template-columns: repeat(3, 1fr); }
  .match { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .match-side { flex-direction: row; flex-wrap: wrap; padding: 8px; border-left: 0; border-top: 1px solid var(--line); }
  .match-side .log { display: none; }
  .turn-box { flex: 1; padding: 8px 12px; }
  .btn-end { height: auto; flex: 1; }
  .unit { width: 78px; height: 100px; }
  .lane { gap: 10px; padding: 6px; }
  .hand-slot .card { --cw: 92px; }
  .hand { height: 120px; }
  .hero { width: 58px; height: 58px; }
  .hero-info { min-width: 0; }
  .preview, .played-reveal, .coin-flip, .turn-banner, .target-hint { left: 50%; right: auto; }
}
@media (max-width: 600px) {
  .page { padding: 20px 16px 48px; }
  h1 { font-size: 28px; }
  .shop-grid, .pve-grid, .stat-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; }
  .daily { flex-direction: column; text-align: center; }
  .filters .search { width: 100%; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .deck-list { grid-template-columns: 1fr; }
  .pips i { width: 8px; height: 8px; }
}
.view-root { height: 100%; }
.user-meta small { white-space: nowrap; }
.hint { font-size: 12px; color: var(--dim); }
.auth-form .input { height: 44px; font-size: 15px; }
@media (max-width: 1280px) { .auth-cards { right: -260px; opacity: .45; } }

.card.r-mythique .card-front { box-shadow: 0 0 1.4em color-mix(in srgb, var(--rc) 55%, transparent), 0 .5em 1.4em rgba(0, 0, 0, .5); }
.card.r-mythique .cf-foil {
  opacity: .45;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .45), transparent 40%),
    linear-gradient(120deg, transparent 15%, rgba(255, 80, 100, .55) 35%, rgba(255, 170, 60, .45) 50%, rgba(255, 80, 160, .45) 65%, transparent 85%);
  background-size: 100% 100%, 260% 260%;
  background-position: center, var(--mx) var(--my);
}
.card.r-secret .card-front {
  background: conic-gradient(from var(--spin, 0deg), #2fe0c8, #4a8cff, #b46bff, #ff7ad9, #f2b13a, #2fe0c8);
  animation: secretSpin 6s linear infinite;
  box-shadow: 0 0 1.6em rgba(47, 224, 200, .45), 0 .5em 1.4em rgba(0, 0, 0, .5);
}
.card.r-secret .cf-foil {
  opacity: .5;
  background: repeating-linear-gradient(115deg, rgba(255, 0, 128, .25) 0 6%, rgba(0, 255, 200, .25) 6% 12%, rgba(120, 120, 255, .25) 12% 18%);
  background-size: 300% 300%;
  background-position: var(--mx) var(--my);
}
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes secretSpin { to { --spin: 360deg; } }
.card.r-exclusif .card-front { background: linear-gradient(150deg, #fff, #ffc2ec 25%, var(--rc) 50%, #6b2a5c 100%); box-shadow: 0 0 1.4em rgba(255, 122, 217, .5), 0 .5em 1.4em rgba(0, 0, 0, .5); }
.card.r-exclusif .cf-frame { background: linear-gradient(180deg, #1d1020, #120a14 60%, #0c070d); }
.card.r-exclusif .cf-foil {
  opacity: .4;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .7) 48%, rgba(255, 200, 240, .5) 52%, transparent 70%);
  background-size: 250% 250%;
  background-position: var(--mx) var(--my);
}
.card.tilting.r-mythique .cf-foil, .card.tilting.r-secret .cf-foil, .card.tilting.r-exclusif .cf-foil { opacity: .8; }
.unit.r-secret { border-image: linear-gradient(135deg, #2fe0c8, #b46bff, #ff7ad9, #f2b13a) 1; }

.card-hidden { cursor: help; }
.card-hidden .card-front.hidden-front { padding: 2.4cqi; background: linear-gradient(150deg, #262b36, #161a22); box-shadow: 0 .5em 1.4em rgba(0, 0, 0, .4); }
.card-hidden .cb-inner { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .02) 0 2cqi, transparent 2cqi 4cqi), #11141a; box-shadow: inset 0 0 0 1.2cqi #11141a, inset 0 0 0 1.6cqi rgba(255, 255, 255, .06); gap: 2cqi; }
.card-hidden .cb-logo { width: 34cqi; opacity: .14; filter: none; }
.hidden-q { font-family: var(--display); font-weight: 800; font-size: 30cqi; line-height: 1; color: rgba(255, 255, 255, .12); }
.hidden-num { font-family: var(--display); font-size: 6cqi; letter-spacing: .2em; color: var(--dim); font-weight: 600; }
.hidden-cell:hover .card { transform: none; }

.reveal-slot.aura-big .reveal-aura { inset: -14%; filter: blur(22px); }

.pull-alert {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px; max-width: 420px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 22%, var(--surface-2)), var(--surface-2) 70%);
  border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); border-radius: 10px;
  box-shadow: 0 0 24px color-mix(in srgb, var(--rc) 30%, transparent), var(--shadow); font-size: 14px;
  transform: translateX(30px) scale(.96); opacity: 0; transition: all .35s cubic-bezier(.3, 1.4, .5, 1);
}
.pull-alert.in { transform: none; opacity: 1; }
.pull-tag { flex: none; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #0b0d12; background: var(--rc); }
.pull-feed { list-style: none; margin: 0; padding: 0; }
.pull-feed li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pull-feed li:last-child { border-bottom: 0; }
.pull-feed small { margin-left: auto; color: var(--dim); white-space: nowrap; }

.remember { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); cursor: pointer; }
.remember input { accent-color: var(--accent); width: 16px; height: 16px; }
.end-note { color: var(--muted); font-size: 14px; margin: -4px 0 14px; max-width: 320px; margin-inline: auto; }
.section-title small { font-family: var(--font); font-size: 13px; font-weight: 500; margin-left: 10px; }
.shop-note { margin-top: 18px; }
.drop-chance { display: flex; flex-direction: column; justify-content: center; height: 38px; padding: 0 12px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); }
.drop-chance b { font-size: 14px; }
.drop-chance small { font-size: 11px; color: var(--muted); }
.drop-badge { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--rc); color: var(--rc); }

/* ---------------------------------------------------------------- Casino */
.casino-page { max-width: 1320px; }
.casino-loading { padding: 80px 0; text-align: center; color: var(--muted); }
.casino-head-right { display: flex; align-items: center; gap: 10px; }
.casino-tabs { margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.casino-tabs::-webkit-scrollbar { display: none; }
.casino-tabs .tab { position: relative; white-space: nowrap; }
.casino-tabs .tab .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.casino-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.casino-stage {
  position: relative; height: min(70vh, 660px); min-height: 420px; border-radius: 12px; overflow: hidden;
  background: #05080d; border: 1px solid var(--line); touch-action: manipulation; user-select: none;
}
.casino-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.casino-overlay { position: absolute; inset: 0; pointer-events: none; }
.casino-banner {
  position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  min-width: 220px; padding: 10px 22px 12px; border-radius: 10px; text-align: center;
  background: rgba(10, 12, 16, .88); border: 1px solid var(--line-2); transition: opacity .25s, transform .25s;
}
.casino-banner.show { opacity: 1; transform: translate(-50%, 0); }
.casino-banner small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.casino-banner strong { display: block; font-family: var(--display); font-size: 34px; font-weight: 800; line-height: 1.05; }
.casino-banner .coins { justify-content: center; color: var(--gold); }
.casino-banner.is-win strong, .casino-banner.is-big strong { color: var(--gold); }
.casino-banner.is-big { border-color: var(--gold); }
.casino-banner.is-big strong { font-size: 44px; }
.casino-banner.is-lose strong { color: #ff8a80; }
.casino-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; max-height: min(70vh, 660px); min-height: 420px; overflow-y: auto; }
.casino-panel h2 { margin: 0 0 6px; font-family: var(--display); font-size: 26px; }
.casino-panel h3 { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.casino-panel > p { margin: 0 0 14px; font-size: 14px; }
.casino-panel .btn-lg { margin-top: 10px; }
.casino-panel .chips { margin: 4px 0 6px; }
.casino-panel .chip.active { --tc: var(--gold); }
.casino-status { font-size: 14px; color: var(--muted); margin-bottom: 4px; min-height: 20px; }
.casino-status .ok { color: var(--ok); font-weight: 600; }
.casino-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.casino-note b { color: var(--text); }
.casino-odds { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.casino-odds li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.casino-odds li:last-child { border-bottom: 0; }
.casino-odds li b { font-variant-numeric: tabular-nums; }
.casino-odds li.rare span { color: var(--gold); }
.casino-odds li.lose span { color: #ff8a80; }
.casino-foot { font-size: 12px; margin-top: 12px; }
.casino-row { display: flex; gap: 8px; margin-top: 8px; }
.casino-row .btn { flex: 1; }
.casino-loot h2 { margin: 0 0 12px; font-family: var(--display); }
.casino-loot h3 { margin: 14px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.casino-loot .loot-cards { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 14px; }
.casino-chipbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.casino-chip {
  --cc: #888; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
  background: var(--cc); color: #fff; font-family: var(--display); font-weight: 800; font-size: 15px;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.85), inset 0 0 0 7px var(--cc), inset 0 0 0 8px rgba(255,255,255,.5), 0 2px 6px rgba(0,0,0,.4);
  transition: transform .12s;
}
.casino-chip:hover { transform: translateY(-2px); }
.casino-chip.active { outline: 2px solid var(--gold); outline-offset: 3px; transform: translateY(-3px); }
.casino-chip[data-v="100"] { color: var(--gold); }
.casino-total { display: flex; justify-content: space-between; font-size: 14px; margin: 12px 0 2px; color: var(--muted); }
.casino-total b { color: var(--text); }
.casino-history { display: flex; flex-wrap: wrap; gap: 4px; }
.casino-history i { font-style: normal; width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; }
.casino-history i.red { background: #b5212f; }
.casino-history i.black { background: #1b1d22; border: 1px solid var(--line-2); }
.casino-history i.green { background: #11804a; }
.casino-history i:first-child { outline: 2px solid var(--gold); outline-offset: 1px; }
.casino-label {
  position: absolute; transform: translate(-50%, -50%); padding: 3px 10px; border-radius: 6px; white-space: nowrap;
  background: rgba(8, 10, 14, .82); border: 1px solid rgba(255,255,255,.14); font-family: var(--display); font-weight: 700; font-size: 18px; color: #fff;
}
.casino-label.win { border-color: var(--gold); color: var(--gold); }
.casino-label.lose { color: #ff8a80; }
.casino-label.active { border-color: var(--accent); }
.casino-tip { position: absolute; padding: 4px 8px; border-radius: 6px; background: rgba(8,10,14,.9); border: 1px solid var(--line-2); font-size: 12px; color: var(--text); transform: translate(-50%, -130%); white-space: nowrap; }
.casino-paytable { display: grid; grid-template-columns: 34px 1fr 1fr 1fr 1fr; gap: 4px 6px; align-items: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.casino-paytable img { width: 32px; height: 32px; border-radius: 6px; }
.casino-paytable .h { color: var(--muted); font-size: 11px; text-transform: uppercase; }
@media (max-width: 980px) {
  .casino-wrap { grid-template-columns: 1fr; }
  .casino-stage { height: 58vh; min-height: 340px; }
  .casino-panel { max-height: none; min-height: 0; }
}
@media (max-width: 560px) {
  .casino-stage { height: 52vh; min-height: 300px; border-radius: 10px; }
  .casino-banner strong { font-size: 28px; }
  .casino-banner.is-big strong { font-size: 34px; }
  .casino-head-right .balance { display: none; }
}
@media (max-width: 760px) {
  .casino-page .page-head p { display: none; }
  .casino-stage { height: 50vh; }
}

/* ---------------------------------------------------------------- casino: poker */
.pk-plate {
  position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px; min-width: 128px; border-radius: 30px; pointer-events: auto;
  background: rgba(8, 10, 14, .86); border: 1px solid rgba(255,255,255,.14); color: #fff; white-space: nowrap;
  transition: opacity .2s, border-color .2s, box-shadow .2s;
}
.pk-plate[hidden] { display: none; }
.pk-plate.me { border-color: rgba(242, 193, 78, .5); }
.pk-plate.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(90, 150, 255, .35); }
.pk-plate.folded { opacity: .45; }
.pk-plate.winner { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242, 193, 78, .4); opacity: 1; }
.pk-plate.flash { animation: pk-flash .9s; }
.pk-plate.human .pk-av { box-shadow: 0 0 0 2px rgba(111, 227, 154, .55); }
.pk-plate.human:not(.me) .pk-name::after { content: "joueur"; margin-left: 6px; font-family: var(--body, inherit); font-size: 10px; font-weight: 600; color: #6fe39a; text-transform: uppercase; letter-spacing: .04em; }
.pk-timer { position: absolute; left: 14px; right: 14px; bottom: -3px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.pk-timer[hidden] { display: none; }
.pk-timer i { display: block; height: 100%; width: 100%; background: var(--accent); transition: width .2s linear; }
.pk-timer.low i { background: #ff6b5b; }
.pk-clock { position: relative; display: flex; justify-content: space-between; align-items: baseline; padding: 6px 10px 9px; border-radius: 8px; background: rgba(90, 150, 255, .1); border: 1px solid rgba(90, 150, 255, .3); font-size: 13px; overflow: hidden; }
.pk-clock[hidden] { display: none; }
.pk-clock b { font-family: var(--display); font-size: 17px; }
.pk-clock i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); transition: width .2s linear; }
.pk-clock.low { background: rgba(255, 107, 91, .1); border-color: rgba(255, 107, 91, .4); }
.pk-clock.low i { background: #ff6b5b; }
.pk-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 8px 0 10px; border: 1px solid var(--line-2, rgba(255,255,255,.12)); border-radius: 8px; overflow: hidden; }
.pk-mode button { padding: 8px 6px; background: transparent; border: 0; color: var(--muted); font-weight: 600; cursor: pointer; font-size: 13px; }
.pk-mode button.active { background: var(--bg-2, #1a1e27); color: var(--text); box-shadow: inset 0 -2px 0 var(--gold); }
.pk-count { color: var(--muted); }
.pk-count.on { color: #6fe39a; }
.pk-waiting { display: flex; flex-direction: column; gap: 3px; padding: 12px; margin: 10px 0; border-radius: 8px; border: 1px dashed rgba(242,193,78,.4); }
.pk-bust { color: #ff8a80; font-size: 13px; margin: 6px 0; }
.pk-nextin { font-size: 13px; margin: 8px 0; }
@keyframes pk-flash { 0%, 100% { transform: translate(-50%, -50%); } 30% { transform: translate(-50%, -50%) scale(1.08); } }
.pk-av { font-style: normal; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: hsl(var(--h, 210) 45% 32%); border: 2px solid hsl(var(--h, 210) 55% 55%); font-family: var(--display); font-weight: 800; font-size: 14px; }
.pk-id { display: flex; flex-direction: column; line-height: 1.15; }
.pk-name { font-family: var(--display); font-size: 15px; font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.pk-stack { font-size: 12px; color: var(--gold); }
.pk-stack .coins b { font-weight: 700; }
.pk-act { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 4px); font-style: normal; font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 5px; background: #1d2330; border: 1px solid rgba(255,255,255,.12); color: #dfe6f3; }
.pk-act.fold { color: #9aa3b2; }
.pk-act.raise, .pk-act.bet { background: #3a2a0c; color: #ffd27a; border-color: rgba(242, 193, 78, .4); }
.pk-act.allin { background: #5a1414; color: #ffb3a8; border-color: rgba(255, 120, 100, .5); }
.pk-act.win { background: #3a2a0c; color: var(--gold); border-color: var(--gold); }
.pk-act.show { background: #16202f; color: #cfe0ff; }
.pk-bubble { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -8px); max-width: 220px; white-space: normal; text-align: center;
  padding: 6px 10px; border-radius: 10px; background: #f4f1ea; color: #15171c; font-size: 12px; font-weight: 600; }
.pk-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #f4f1ea; }
.pk-pot { position: absolute; transform: translate(-50%, -50%); padding: 3px 10px; border-radius: 6px; background: rgba(8,10,14,.8); border: 1px solid rgba(242,193,78,.35); font-weight: 700; font-size: 14px; color: #fff; }
.pk-hand { font-size: 15px; }
.pk-actions { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.pk-actions .casino-row .btn { flex: 1; }
.pk-raise { display: flex; flex-direction: column; gap: 8px; }
.pk-presets { display: flex; gap: 4px; }
.pk-presets .btn { flex: 1; padding-left: 0; padding-right: 0; }
.pk-slider, .pk-buy { width: 100%; accent-color: var(--gold); }
.pk-between { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.pk-auto { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.pk-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
.pk-table { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer;
  background: var(--bg-2, #12151c); border: 1px solid var(--line-2, rgba(255,255,255,.1)); color: var(--text); font-size: 12px; }
.pk-table b { font-family: var(--display); font-size: 15px; }
.pk-table.active { border-color: var(--gold); }
.pk-log { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.pk-log li { border-bottom: 1px solid rgba(255,255,255,.04); padding: 2px 0; }
.pk-log b { color: var(--text); }
.pk-log .win, .casino-total b.win { color: #6fe39a; }
.pk-log .lose, .casino-total b.lose { color: #ff8a80; }
.pk-c { font-weight: 700; color: var(--text); }
.pk-c.r { color: #ff6b6b; }
@media (max-width: 760px) {
  .pk-plate { min-width: 0; padding: 3px 8px 3px 3px; gap: 5px; }
  .pk-av { width: 24px; height: 24px; font-size: 11px; }
  .pk-name { font-size: 12px; max-width: 70px; }
  .pk-stack { font-size: 11px; }
  .pk-act { font-size: 10.5px; }
}
