/* Mockup gallery for GDD section 13 (portrait 360x640 logical px, shown at 1x).
   No web fonts: system monospace stack (Consolas has full Vietnamese coverage on Windows). */
:root {
  --bg: #0d0e12;
  --ink: #e6e8ef;
  --quiet: #8d93a3;
  --line: #2a2f3b;
  --pn: #1d212b;        /* panel */
  --pn2: #262b37;       /* raised panel */
  --pn3: #313849;       /* hover / selected */
  --hi: #4b546a;        /* panel highlight edge */
  --lo: #0a0b0f;        /* panel dark edge */
  --gold: #f2c443;
  --gem: #5fd3f0;
  --medal: #e98a3c;
  --red: #e5483b;
  --green: #5fbf5a;
  --orange: #f0953a;
  /* rarity frames (roster_mvp.json rarities.frame) */
  --r-common: #9aa0a6; --r-rare: #4a90d9; --r-epic: #a259d9; --r-legendary: #e8b83a; --r-mythic: #e0483a;
  /* faction colours (GDD 13.3) */
  --f-recruit: #b08d57; --f-knight: #c0c6cc; --f-hero: #e8b83a; --f-dark: #8b2a3a; --f-undead: #7fa08a; --f-goblin: #6aa84f; --f-wanderer: #3fa7a0; --f-villager: #d9a441;
  --mono: Consolas, "Lucida Console", "DejaVu Sans Mono", "Courier New", monospace;
  color-scheme: dark;
}
/* ---------- the phone screen: 360x640 logical px at 1x ---------- */
.phone { position: relative; width: 360px; height: 640px; overflow: hidden; background: #12141a; border-radius: 12px;
  font: 11px/1.35 var(--mono); color: var(--ink); user-select: none; }
.phone b { font-weight: 700; }
.rg { position: absolute; left: 0; width: 360px; z-index: 1; } /* each region is its own stacking context; DOM order layers them */
.phone .dim { filter: brightness(.38) saturate(.6); }
.scrim { position: absolute; inset: 0; background: rgba(5,6,10,.62); }

/* region overlay (toggle) */
body.show-regions .rg[data-r] { outline: 1px dashed rgba(255,80,200,.85); outline-offset: -1px; }
body.show-regions .rg[data-r]::after { content: attr(data-r); position: absolute; right: 2px; top: 1px; z-index: 50;
  font: 9px/1 var(--mono); color: #fff; background: rgba(160,20,120,.9); padding: 1px 3px; pointer-events: none; }

/* ---------- pixel UI primitives ---------- */
.pn { background: var(--pn); box-shadow: inset 1px 1px 0 var(--hi), inset -1px -1px 0 var(--lo), 0 0 0 1px #000; }
.pn2 { background: var(--pn2); box-shadow: inset 1px 1px 0 #59637c, inset -1px -1px 0 var(--lo), 0 0 0 1px #000; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 3px; font: 700 11px/1 var(--mono); color: #fff;
  background: #3b6fa8; border: 0; padding: 0 8px; height: 22px; cursor: pointer; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -2px 0 rgba(0,0,0,.35), 0 0 0 1px #000; text-shadow: 1px 1px 0 #000; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(0,0,0,.4), 0 0 0 1px #000; }
.btn.gold { background: #b98a1c; }
.btn.green { background: #3f8f3c; }
.btn.red { background: #a8342b; }
.btn.grey, .btn[disabled] { background: #444a57; color: #b6bbc6; }
.btn.ghost { background: #262b37; }
.btn.on { background: #e0a92a; color: #1a1306; text-shadow: none; }
.btn.big { height: 56px; font-size: 14px; }
.seg { display: inline-flex; gap: 2px; }
.seg .btn { height: 20px; padding: 0 5px; font-size: 10px; }
.num { font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
.q { color: var(--quiet); }
.up { color: #8ef08a; }
.bad { color: #ff6b5e; }
.warn { color: var(--orange); }
.ok { color: #7be07a; }
.gld { color: var(--gold); }
.gm { color: var(--gem); }
.md { color: var(--medal); }
.tiny { font-size: 9px; }
.sm { font-size: 10px; }
.lg { font-size: 13px; }
.xl { font-size: 16px; }
.c { text-align: center; }
.r { text-align: right; }
.row { display: flex; align-items: center; gap: 4px; }
.sp { flex: 1; }
.dot { display: inline-block; width: 7px; height: 7px; background: var(--red); box-shadow: 0 0 0 1px #000, inset -1px -1px 0 #8e1d14;
  border-radius: 1px; vertical-align: middle; }
.badge { position: absolute; top: 4px; right: 12px; }
.newtag { font: 700 8px/1 var(--mono); background: var(--red); color: #fff; padding: 1px 2px; box-shadow: 0 0 0 1px #000; }
.lock { color: #7c8191; }
.lock::before { content: ""; display: inline-block; width: 7px; height: 6px; margin-right: 3px; background: #7c8191;
  box-shadow: 0 -3px 0 -1px #12141a, 0 -4px 0 -1px #7c8191; vertical-align: 0; }

/* currency icons, drawn as tiny pixel shapes */
.ic { display: inline-block; vertical-align: -1px; flex: none; }
.ic.gold { width: 9px; height: 9px; background: var(--gold); clip-path: polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%);
  box-shadow: inset -2px -2px 0 #b07d10, inset 2px 2px 0 #fff2a8; }
.ic.gem { width: 8px; height: 8px; background: var(--gem); transform: rotate(45deg) scale(.85); box-shadow: inset -2px -2px 0 #2b8fb5, inset 1px 1px 0 #d8f8ff; outline: 1px solid #000; }
.ic.medal { width: 9px; height: 10px; background: linear-gradient(var(--red) 0 3px, transparent 3px), radial-gradient(circle at 50% 66%, var(--medal) 0 3.6px, #000 3.7px 4.4px, transparent 4.5px); }
.ic.ticket { width: 10px; height: 7px; background: #d9c38a; box-shadow: inset 0 0 0 1px #7a6531; clip-path: polygon(0 0,100% 0,100% 35%,85% 50%,100% 65%,100% 100%,0 100%,0 65%,15% 50%,0 35%); }
.ic.tticket { width: 10px; height: 7px; background: #c58cf2; box-shadow: inset 0 0 0 1px #5c2a86; clip-path: polygon(0 0,100% 0,100% 35%,85% 50%,100% 65%,100% 100%,0 100%,0 65%,15% 50%,0 35%); }
.ic.shard { width: 6px; height: 8px; background: #c58cf2; clip-path: polygon(50% 0,100% 40%,60% 100%,0 60%); }

/* bars */
.bar { position: relative; height: 6px; background: #0b0c10; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #2b3040; }
.bar > i { position: absolute; left: 1px; top: 1px; bottom: 1px; background: var(--green); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.bar.boss > i { background: var(--red); }
.bar.gold > i { background: var(--gold); }
.bar.purple > i { background: #a259d9; }
.bar.blue > i { background: #4a90d9; }

/* rarity frames: colour + stars (colour-blind rule, GDD 13.3) */
.rf { position: relative; background: #2a2f3b; box-shadow: inset 0 0 0 2px var(--rc), 0 0 0 1px #000; overflow: hidden; flex: none; }
.rf.common { --rc: var(--r-common); } .rf.rare { --rc: var(--r-rare); } .rf.epic { --rc: var(--r-epic); }
.rf.legendary { --rc: var(--r-legendary); } .rf.mythic { --rc: var(--r-mythic); }
.rf.epic, .rf.legendary { background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--rc) 35%, #2a2f3b) 0, #22262f 75%); }
.rf .stars { position: absolute; left: 2px; bottom: 1px; font: 7px/1 var(--mono); color: var(--rc); text-shadow: 1px 1px 0 #000; letter-spacing: -1px; }
.rf.none { --rc: #3a3f4b; background: #1a1d24; }
.rf.locked { --rc: #3a3f4b; background: repeating-linear-gradient(45deg, #1a1d24 0 3px, #22262f 3px 6px); }
.rf.unowned .spr { filter: brightness(0); opacity: .9; }
.rf.unowned { background: #3a4050; }
.rf.away .spr { opacity: .35; }
.rf.sel { box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #000; }

/* ---------- sprites: idle strip, 4 frames x 144 px (2x native); --k = scale relative to native 72 px cell ---------- */
.spr { display: block; background-repeat: no-repeat; image-rendering: pixelated; image-rendering: crisp-edges;
  --k: 1; --cx: 0; --cy: 0;
  background-size: calc(288px * var(--k)) calc(72px * var(--k));
  background-position: calc(var(--cx) * var(--k) * -1px) calc(var(--cy) * var(--k) * -1px); }
.spr.idle { animation: idle .5s steps(4) infinite; }
@keyframes idle { to { background-position: calc((var(--cx) + 288) * var(--k) * -1px) calc(var(--cy) * var(--k) * -1px); } }
.m-pt24 { width: 24px; height: 24px; --k: 1; --cx: 22; --cy: 19; }      /* 1x head+torso */
.m-full1 { width: 32px; height: 32px; --k: 1; --cx: 18; --cy: 16; }     /* 1x full body */
.m-up2 { width: 48px; height: 48px; --k: 2; --cx: 22; --cy: 19; }       /* 2x head+torso */
.m-card { width: 60px; height: 58px; --k: 2; --cx: 19; --cy: 19; }      /* 2x full body for cards */
.m-cell1 { width: 72px; height: 72px; --k: 1; }                         /* battle, 1x native */
.m-cell2 { width: 144px; height: 144px; --k: 2; }                       /* detail / boss, 2x */
.flip { transform: scaleX(-1); }

/* ---------- top bar (y 0-40) ---------- */
.topbar { top: 0; height: 40px; background: linear-gradient(#262b37, #1b1f28); box-shadow: inset 0 -1px 0 #000, inset 0 -2px 0 #39415a; }
.topbar .l1, .topbar .l2 { display: flex; align-items: center; gap: 6px; height: 20px; padding: 0 4px 0 6px; }
.topbar .l1 { padding-top: 2px; }
.topbar .stage { font-weight: 700; color: #fff; }
.waves { display: inline-flex; gap: 2px; }
.waves i { width: 5px; height: 5px; background: #e5e7ee; box-shadow: 0 0 0 1px #000; }
.waves i.o { background: #3b4150; }
.waves i.b { background: var(--red); }
.cur { display: inline-flex; align-items: center; gap: 3px; }
.gps { color: #b5e08a; font-size: 9px; cursor: pointer; text-decoration: underline dotted; }
.plus { width: 14px; height: 14px; padding: 0; font: 700 11px/1 var(--mono); color: #fff; background: #3f8f3c; border: 0; box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.3); cursor: pointer; }
.gear { margin-left: auto; width: 20px; height: 18px; background: #343a49; border: 0; color: #cfd3dc; font-size: 13px; line-height: 1; padding: 0; box-shadow: 0 0 0 1px #000, inset 1px 1px 0 #59637c; cursor: pointer; }
.zone { color: #c9e3b0; font-size: 10px; }
.bosstag { margin-left: auto; font: 700 10px/1 var(--mono); background: #7a1d16; color: #ffd6cf; padding: 2px 5px; box-shadow: 0 0 0 1px #000, inset 0 1px 0 #b3392d; }

/* ---------- battle strip (y 40-240): prototype colours (index.html drawBg) ---------- */
.battle { top: 40px; height: 200px; overflow: hidden; background: linear-gradient(#6fa7d6, #bfe0ef 120px); }
.battle .lay { position: absolute; left: 0; right: 0; }
.battle .far { top: 52px; height: 58px; background:
  linear-gradient(135deg, transparent 49.5%, #9cbfd0 50%) 0 100% / 60px 34px repeat-x,
  linear-gradient(225deg, transparent 49.5%, #9cbfd0 50%) 60px 100% / 60px 34px repeat-x; opacity: .9; }
.battle .far2 { top: 74px; height: 40px; background: radial-gradient(ellipse 77px 34px at 60px 40px, #7fae8a 98%, transparent 100%) 0 0 / 120px 40px repeat-x; }
.battle .mid { top: 84px; height: 30px; background: radial-gradient(ellipse 50px 22px at 37px 30px, #4f8a5c 98%, transparent 100%) -20px 0 / 74px 30px repeat-x; }
.battle .trees { top: 70px; height: 44px; background:
  linear-gradient(#3d5a2e, #3d5a2e) 9px 30px / 3px 14px repeat-x,
  radial-gradient(circle at 10px 18px, #2f6b3a 9px, transparent 9.5px) 0 0 / 52px 44px repeat-x,
  radial-gradient(circle at 10px 10px, #3f7d45 6px, transparent 6.5px) 0 0 / 52px 44px repeat-x; background-size: 52px 44px; background-repeat: repeat-x; }
.battle .grass { top: 108px; bottom: 0; background: #5d9a52; }
.battle .band { top: 110px; height: 40px; background: #56914c;
  background-image: linear-gradient(#4c8443, #4c8443), linear-gradient(#4c8443, #4c8443);
  background-size: 4px 1px, 4px 1px; background-position: 7px 9px, 25px 27px; }
.battle .band::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(#4c8443,#4c8443) 0 8px / 3px 1px repeat-x, linear-gradient(#4c8443,#4c8443) 16px 26px / 3px 1px repeat-x;
  background-size: 32px 1px; background-repeat: repeat-x; }
.battle .soil { top: 150px; bottom: 0; background: #5d9a52; background-image: linear-gradient(#4c8443,#4c8443), linear-gradient(#4c8443,#4c8443);
  background-size: 32px 1px, 32px 1px; background-position: 4px 12px, 20px 30px; background-repeat: repeat-x; }
.ent { position: absolute; width: 72px; height: 72px; }
.ent .sh { position: absolute; left: 26px; top: 44px; width: 20px; height: 5px; background: rgba(0,0,0,.22); border-radius: 50%; }
.ent.boss { width: 144px; height: 144px; }
.ent.boss .sh { left: 46px; top: 88px; width: 52px; height: 10px; }
.ent.dim2 .spr { opacity: .55; }
.hud-dps { position: absolute; right: 6px; top: 4px; font-size: 10px; }
.hud-spd { position: absolute; right: 6px; top: 18px; }
.hud-boss { position: absolute; left: 70px; width: 220px; top: 32px; }
.hud-boss .row { gap: 5px; font-size: 10px; }
.hud-boss .bar { flex: 1; height: 8px; }
.bossname { position: absolute; font: 700 9px/1 var(--mono); color: #ffe1a1; background: rgba(60,15,10,.85); padding: 2px 3px; box-shadow: 0 0 0 1px #000; white-space: nowrap; }
.dmg { position: absolute; font-weight: 700; white-space: nowrap; color: #fff; text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; font-size: 10px; }
.dmg.crit { color: #ffd23f; font-size: 14px; }
.dmg.foe { color: #ff8a7a; }
.farm { position: absolute; left: 6px; bottom: 6px; }
.next { position: absolute; right: 6px; bottom: 9px; font-size: 10px; color: #fff; text-shadow: 1px 1px 0 #000; }
.toggle { display: inline-flex; align-items: center; gap: 4px; font: 700 10px/1 var(--mono); padding: 3px 5px; background: rgba(20,24,32,.8); box-shadow: 0 0 0 1px #000; color: #fff; cursor: pointer; }
.toggle i { width: 16px; height: 9px; background: #3b4150; box-shadow: inset 0 0 0 1px #000; position: relative; }
.toggle i::after { content: ""; position: absolute; left: 1px; top: 1px; width: 7px; height: 7px; background: #9aa0a6; }
.toggle.on i { background: #3f8f3c; }
.toggle.on i::after { left: 8px; background: #fff; }

/* ---------- portrait strip (y 240-284) ---------- */
.pstrip { top: 240px; height: 44px; background: #161920; box-shadow: inset 0 1px 0 #000, inset 0 2px 0 #333a4a, inset 0 -1px 0 #000; }
.pstrip .ports { position: absolute; left: 4px; top: 6px; display: flex; gap: 1px; }
.pc { position: relative; width: 24px; }
.pc .rf { width: 24px; height: 24px; box-shadow: inset 0 0 0 1px var(--rc), 0 0 0 1px #000; }
.pc .cd { position: absolute; inset: 0; background: conic-gradient(transparent 0 var(--a), rgba(0,0,0,.6) var(--a) 360deg); }
.pc.ready .rf { box-shadow: inset 0 0 0 1px #fff7c2, 0 0 0 1px #000, 0 0 4px 1px #ffe27a; }
.pc .hp { margin-top: 3px; height: 3px; background: #000; }
.pc .hp i { display: block; height: 3px; background: var(--green); }
.pc .hp i.lowhp { background: var(--red); }
.revive { position: absolute; right: 3px; top: 4px; width: 52px; height: 36px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(#8a3fc4, #5d2690); color: #fff; font: 700 10px/1.1 var(--mono); border: 0; cursor: pointer;
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.35); text-shadow: 1px 1px 0 #000; }
.revive.glow { animation: glow 1.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 1px #000, 0 0 8px 2px #d59cff, inset 0 1px 0 rgba(255,255,255,.35); } }

/* ---------- bottom nav (y 580-640) ---------- */
.nav { top: 580px; height: 60px; display: flex; background: linear-gradient(#232835, #171a22); box-shadow: inset 0 1px 0 #000, inset 0 2px 0 #3d4560; }
.nav button { position: relative; flex: 1; border: 0; background: transparent; color: #aab0bd; font: 700 10px/1.2 var(--mono); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0; }
.nav button + button { box-shadow: inset 1px 0 0 #0b0d12; }
.nav button.act { color: #fff; background: linear-gradient(#3a4257, #252b39); box-shadow: inset 0 3px 0 var(--gold); }
.nav .ni { width: 20px; height: 18px; image-rendering: pixelated; }
.nav .dot { position: absolute; top: 6px; right: 16px; }
.ni.up { background: linear-gradient(90deg, transparent 8px, #8ef08a 8px 12px, transparent 12px) 0 6px / 20px 12px no-repeat,
  conic-gradient(from 135deg at 50% 0, #8ef08a 0 90deg, transparent 90deg) 0 0 / 20px 9px no-repeat; }
.ni.team { background: radial-gradient(circle at 6px 5px, #c0c6cc 3.5px, transparent 4px), radial-gradient(circle at 14px 5px, #e8b83a 3.5px, transparent 4px),
  linear-gradient(#c0c6cc,#c0c6cc) 2px 10px / 8px 8px no-repeat, linear-gradient(#e8b83a,#e8b83a) 10px 10px / 8px 8px no-repeat; }
.ni.gacha { background: linear-gradient(#a259d9,#a259d9) 3px 6px / 14px 12px no-repeat, linear-gradient(#e8b83a,#e8b83a) 1px 3px / 18px 4px no-repeat, linear-gradient(#fff,#fff) 9px 3px / 2px 15px no-repeat; }
.ni.adv { background: conic-gradient(from 150deg at 50% 0, #7fae8a 0 60deg, transparent 60deg) 0 2px / 20px 16px no-repeat, linear-gradient(#e5483b,#e5483b) 9px 0 / 2px 8px no-repeat, linear-gradient(#e5483b,#e5483b) 11px 0 / 5px 4px no-repeat; }
.ni.more { background: radial-gradient(circle, #cfd3dc 2px, transparent 2.5px) 0 7px / 7px 6px repeat-x; }

/* ---------- content panel (y 284-580) ---------- */
.panel { top: 284px; height: 296px; background: #181b23; overflow: hidden; }
.subtabs { display: flex; gap: 3px; padding: 5px 6px 0; height: 32px; }
.subtabs .btn { height: 22px; }
.subtabs .btn.act { background: #4a5570; box-shadow: inset 0 2px 0 var(--gold), 0 0 0 1px #000; }

/* M2 upgrade rows */
.buybar { height: 36px; display: flex; align-items: center; gap: 4px; padding: 0 6px; background: #1f232d; box-shadow: inset 0 -1px 0 #000; }
.urow { position: relative; height: 64px; display: flex; align-items: center; gap: 6px; padding: 0 6px; box-shadow: inset 0 -1px 0 #0b0d12, inset 0 -2px 0 #262b37; }
.urow .rf { width: 48px; height: 48px; cursor: pointer; }
.urow .info { flex: 1; min-width: 0; font-size: 10px; line-height: 15px; }
.urow .info .nm { font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }
.mlad { display: inline-flex; gap: 1px; vertical-align: -1px; margin-right: 4px; }
.mlad i { width: 15px; height: 6px; background: #0b0c10; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #2b3040; position: relative; }
.mlad i.f { background: var(--gold); }
.mlad i.p { background: linear-gradient(90deg, #b5e08a var(--p), #0b0c10 var(--p)); }
.buy { width: 82px; height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; cursor: pointer;
  font: 700 12px/1 var(--mono); color: #fff; text-shadow: 1px 1px 0 #000; background: #3b4a2a; flex: none;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 2px var(--gold), inset 0 3px 0 rgba(255,255,255,.12); }
.buy small { font-size: 9px; font-weight: 400; color: #e7e2c8; }
.buy.no { background: #353945; color: #9da2ad; box-shadow: 0 0 0 1px #000, inset 0 0 0 2px #4b5162; }
.buy.no small { color: #ff6b5e; font-weight: 700; }
.buy:active { transform: translateY(1px); }
.tagdisc { font-size: 9px; color: #b5e08a; background: #263a22; padding: 0 3px; box-shadow: 0 0 0 1px #000; }
.scrollhint { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3px;
  background: linear-gradient(transparent, #181b23 70%); font-size: 9px; color: var(--quiet); }
.vscroll { position: absolute; right: 1px; width: 3px; background: #4b546a; }

/* generic sheet (M3, M7, M11-M14) */
.sheet { background: #1a1d25; box-shadow: 0 -2px 0 #000, inset 0 1px 0 #4b546a; }
.shead { height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 6px; background: linear-gradient(#2c3241, #222733); box-shadow: inset 0 -1px 0 #000, inset 0 -2px 0 #39415a; }
.shead .back { font-weight: 700; color: #cfd3dc; min-width: 44px; height: 44px; display: flex; align-items: center; cursor: pointer; }
.shead .ttl { font-weight: 700; color: #fff; font-size: 12px; letter-spacing: .3px; }
.shead .x { margin-left: auto; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #cfd3dc; cursor: pointer; }
.sect { padding: 6px 8px; }
.kv { display: grid; grid-template-columns: 74px 1fr; gap: 2px 6px; font-size: 10px; line-height: 14px; }
.kv dt { color: var(--gold); font-weight: 700; }
.kv dd { margin: 0; }
.chip { display: inline-block; padding: 0 3px; font-size: 9px; box-shadow: 0 0 0 1px #000; background: #2f3544; margin-right: 2px; }
.chip.ok { background: #24401f; color: #9bf08f; }
.chip.lockc { background: #22252d; color: #6b7080; }

/* hold-to-confirm (1.2 s) */
.hold { position: relative; overflow: hidden; }
.hold::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.28); }
.hold:active::before { width: 100%; transition: width 1.2s linear; }

/* M5 gacha */
.banner { position: absolute; left: 6px; right: 6px; top: 6px; height: 98px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 120%, #6b3a9a 0, #2b1e46 60%, #1a1530 100%); box-shadow: 0 0 0 1px #000, inset 0 0 0 2px var(--r-legendary); }
.banner .rays { position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 110%, rgba(255,220,120,.10) 0 6deg, transparent 6deg 14deg); }
.gbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 64px; flex: 1; border: 0; cursor: pointer; position: relative;
  font: 700 12px/1 var(--mono); color: #fff; text-shadow: 1px 1px 0 #000; background: #3b6fa8;
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.3), inset 0 -3px 0 rgba(0,0,0,.35); }
.gbtn small { font-size: 9px; font-weight: 400; color: #dfe6f3; }
.gbtn.free { background: #3f8f3c; }
.gbtn.ten { background: #8a3fc4; }

/* M5b cards */
.gcard { position: relative; width: 64px; height: 88px; display: flex; flex-direction: column; align-items: center;
  animation: flipin .45s both; transform-origin: 50% 50%; }
.gcard .rf { width: 64px; height: 88px; display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.gcard .id { position: absolute; left: 4px; top: 3px; font-size: 8px; color: #cfd3dc; line-height: 1; }
.gcard .rn { font: 700 8px/1 var(--mono); color: var(--rc); margin-top: 1px; text-shadow: 1px 1px 0 #000; }
.gcard .dup { font: 700 8px/1 var(--mono); margin-top: 3px; color: #e6e8ef; }
.gcard .dup.new { color: #fff; background: var(--red); padding: 1px 3px; box-shadow: 0 0 0 1px #000; }
.gcard .parts { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle, var(--rc) 1px, transparent 1.5px) 0 0 / 11px 13px; opacity: .45; mask-image: linear-gradient(transparent, #000 40%, transparent); }
@keyframes flipin { from { transform: rotateY(90deg) scale(.9); filter: brightness(3); } to { transform: none; filter: none; } }

/* modal box */
.modal { position: absolute; z-index: 2; background: #1d212b; box-shadow: 0 0 0 1px #000, 0 0 0 3px #59637c, 0 0 0 4px #000, 0 8px 24px rgba(0,0,0,.6); }
.mhead { text-align: center; font: 700 15px/1 var(--mono); color: var(--gold); letter-spacing: 1px; text-shadow: 1px 1px 0 #000; }

/* tables / lines */
.lines > div { line-height: 16px; }
.hr { height: 2px; background: #0b0d12; box-shadow: 0 1px 0 #2f3544; margin: 3px 0; }
.card { background: #20242e; box-shadow: inset 1px 1px 0 #4b546a, inset -1px -1px 0 #0a0b0f, 0 0 0 1px #000; position: relative; }
.card .ttl { position: absolute; top: -1px; left: 6px; right: 6px; display: flex; gap: 6px; transform: translateY(-50%); font-size: 10px; font-weight: 700; }
.card .ttl span { background: #20242e; padding: 0 3px; }
.tower { position: absolute; left: 10px; top: 8px; width: 92px; height: 166px; background: linear-gradient(90deg, #3a3346, #4a4258 50%, #3a3346);
  box-shadow: 0 0 0 1px #000, inset 0 0 0 2px #5b5270; }
.tower .fl { height: 32px; display: flex; align-items: center; justify-content: center; font-size: 10px; box-shadow: inset 0 -2px 0 #2a2433; color: #d8d2e4; }
.tower .fl.cur { background: #6b4a1a; color: #fff; font-weight: 700; box-shadow: inset 0 0 0 2px var(--gold); }
.tower .fl.done { color: #8fd18a; }
.rf { display: grid; place-items: center; }
.battle .bg { position: absolute; inset: 0; background: linear-gradient(#6fa7d6, #bfe0ef 120px); }
.battle .bg.crypt { filter: hue-rotate(150deg) saturate(.45) brightness(.7); } /* Hầm mộ: same layers, new palette (GDD 3.4) */

/* ---------- GDD 6A: RNG layers ---------- */
.battle.half { filter: brightness(.62) saturate(.8); }
.mini3 { display: inline-block; width: 10px; height: 10px; margin-right: 2px; box-shadow: 0 0 0 1px #000;
  background: conic-gradient(#ffd23f 0 25%, #f3e9ff 0 50%, #ffd23f 0 75%, #f3e9ff 0) 0 0 / 3.4px 3.4px; }
.demo { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 2px 0; }
.demo .btn { height: 24px; font-size: 11px; }
.demo .btn.on { background: #e0a92a; color: #1a1306; text-shadow: none; }
.howto { margin: 8px 2px 0; padding: 8px 10px; font-size: 12px; line-height: 18px; color: #c4c9d4; background: var(--pn); box-shadow: inset 1px 1px 0 var(--hi), inset -1px -1px 0 var(--lo), 0 0 0 1px #000; }
.howto > b { color: var(--gold); }
.howto p { margin: 4px 0 0; }
.howto .ie { margin: 0 2px; }

/* M5b bàn quay 3x3 — layers inside the cabinet: cell backgrounds (1) < winning-line connectors (2) < sprites + frames (3) < reels (4) < line markers (5) */
.slot-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 38%, #3a2a5c, #15121f 72%); }
.slot-bg::after { content: ""; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 38%, rgba(255,220,140,.06) 0 5deg, transparent 5deg 12deg); }
.slot-bg.jp { background: radial-gradient(ellipse at 50% 38%, #6a4a10, #24170a 75%); }
.em { display: inline-block; width: 16px; height: 16px; fill: currentColor; flex: none; vertical-align: middle; }
.ie { display: inline-block; line-height: 0; vertical-align: -3px; margin-right: 2px; }
/* symbol palette: --fc = faction colour, --fi = emblem ink on a chip of that colour */
.s-recruit { --fc: var(--f-recruit); --fi: #2a1a08; }
.s-knight { --fc: var(--f-knight); --fi: #1a2030; }
.s-hero { --fc: var(--f-hero); --fi: #2a1800; }
.s-dark { --fc: #b23a4c; --fi: #ffe0e4; }
.s-undead { --fc: var(--f-undead); --fi: #0e2016; }
.s-goblin { --fc: var(--f-goblin); --fi: #0e2008; }
.s-wanderer { --fc: var(--f-wanderer); --fi: #062423; }
.s-villager { --fc: var(--f-villager); --fi: #2a1c04; }
.s-wild { --fc: #f2c443; --fi: #3a2200; }
.s-jester { --fc: #c03a72; --fi: #fff0c8; }

/* header + status bar */
.slhead { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px; background: linear-gradient(#2a2238, #1a1524); box-shadow: inset 0 -1px 0 #000, inset 0 -2px 0 #4a3a5e; }
.slhead .mhead { font-size: 13px; }
.slhead .cost { display: inline-flex; align-items: center; gap: 3px; font: 700 11px/1 var(--mono); color: var(--gem); }
.slhead .toggle { font-size: 11px; }
.sbar { position: relative; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; font: 11px/1 var(--mono); background: rgba(0,0,0,.42); box-shadow: inset 0 -1px 0 #000; }
.sb-w { font-weight: 700; color: #8d93a3; padding: 3px 6px; background: #1a1622; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #3a3448; }
.sb-w b { font-size: 13px; }
.sb-w.on { color: #2a1a00; background: linear-gradient(#ffe27a, #d9a326); box-shadow: 0 0 0 1px #000, inset 0 1px 0 #fff3c0, inset 0 -2px 0 #9a6a10; }
.sb-b { color: #cfd3dc; } .sb-b b { color: var(--gold); }
.sb-jl { color: var(--quiet); }
.jpm { display: inline-flex; gap: 2px; }
.jpm i { width: 6px; height: 12px; background: #2b2f3b; box-shadow: 0 0 0 1px #000; }
.jpm i.on { background: var(--gold); box-shadow: 0 0 0 1px #000, inset 0 2px 0 #fff3c0; }
.sb-jn { color: #fff; }
.sb-je { line-height: 0; }
.jpban { position: absolute; left: 16px; right: 16px; top: 2px; height: 28px; display: none; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(#6a4608, #2e1c02); box-shadow: 0 0 0 1px #000, inset 0 0 0 2px #f2c443, inset 0 0 0 3px #000, 0 0 14px 3px rgba(255,200,60,.55); }
.jpban::before, .jpban::after { content: ""; position: absolute; top: 4px; width: 14px; height: 20px; background: #b98a1c; box-shadow: inset 0 0 0 1px #000; }
.jpban::before { left: -12px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 45% 50%); }
.jpban::after { right: -12px; clip-path: polygon(0 0, 100% 0, 55% 50%, 100% 100%, 0 100%); }
.sbar.isjp > :not(.jpban) { visibility: hidden; }
.sbar.isjp .jpban { display: flex; animation: jpdrop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes jpdrop { from { transform: translateY(-14px) scale(.6); opacity: 0; } }
.jpt { font: 700 22px/1 var(--mono); letter-spacing: 2px; color: #ffe27a;
  text-shadow: 2px 0 #000, -2px 0 #000, 0 2px #000, 0 -2px #000, 2px 2px #000, -2px 2px #000, 0 4px #7a4a00; animation: jpt .45s steps(1) infinite alternate; }
@keyframes jpt { to { color: #fff8d8; } }
.jps { display: inline-flex; align-items: center; gap: 4px; font: 700 11px/1 var(--mono); color: #fff; text-shadow: 1px 1px 0 #000; }

/* cabinet */
.slotwell { position: absolute; inset: 0; }
.slotwell .cab { position: absolute; inset: 0 2px; background: linear-gradient(#2c2140, #1b1427); box-shadow: inset 0 0 0 1px #000, inset 0 0 0 2px #5a4878, inset 0 0 0 3px #000; }
.slotwell .cab::before { content: ""; position: absolute; inset: 3px; padding: 6px; background: radial-gradient(circle at 3px 3px, #6b5530 0 1.6px, transparent 2px) 0 0 / 6px 6px space;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.slotwell .well { position: absolute; left: 38px; top: 26px; width: 284px; height: 284px; background: #0c0911; box-shadow: 0 0 0 1px #6b5530, 0 0 0 2px #000, inset 0 2px 6px rgba(0,0,0,.9); }
.slotwell.jp .cab::before { background-image: radial-gradient(circle at 3px 3px, #fff1b0 0 1.8px, transparent 2.2px); filter: drop-shadow(0 0 2px #ffc531); animation: bulbs .3s steps(1) infinite alternate; }
@keyframes bulbs { to { filter: brightness(.5); } }
.slotwell.jp .well { box-shadow: 0 0 0 1px #000, 0 0 0 3px #ffd23f, 0 0 0 4px #000, 0 0 16px 6px rgba(255,200,60,.55); animation: jpwell .6s steps(1) infinite alternate; }
@keyframes jpwell { to { box-shadow: 0 0 0 1px #000, 0 0 0 3px #fff4c2, 0 0 0 4px #000, 0 0 24px 9px rgba(255,220,90,.75); } }

/* cells: background + 4x emblem watermark (layer 1), sprite + rarity frame + chips (layer 3) */
.cbg, .rb { position: absolute; width: 88px; height: 88px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--fc) 52%, #1a1424) 0, color-mix(in srgb, var(--fc) 28%, #120e18) 60%, color-mix(in srgb, var(--fc) 16%, #0b0910) 100%); }
.cbg { z-index: 1; }
.cbg .wm, .rb .wm { position: absolute; left: 12px; top: 8px; width: 64px; height: 64px; color: color-mix(in srgb, var(--fc) 40%, #fff); opacity: .38; }
.cbg.s-wild, .rb.s-wild { background: radial-gradient(circle at 50% 40%, #e8c255 0, #9a7012 55%, #3e2804 100%); }
.cbg.s-wild .wm, .rb.s-wild .wm { color: #fff6c8; opacity: .55; }
.cbg.s-jester, .rb.s-jester { background: linear-gradient(rgba(16,8,18,.5), rgba(16,8,18,.5)), repeating-conic-gradient(#8a2456 0 25%, #2a6a4a 0 50%) 0 0 / 22px 22px; }
.cbg.s-jester .wm, .rb.s-jester .wm { color: #ffd6e6; opacity: .5; }
.slotwell .cfg.rf { position: absolute; z-index: 3; display: block; width: 88px; height: 88px; overflow: visible; background: none;
  box-shadow: inset 0 0 0 3px var(--rc), inset 0 0 0 4px rgba(0,0,0,.5), 0 0 0 1px #000; }
.cfg .spr { position: absolute; left: 14px; top: 10px; }
.cfg .plate { position: absolute; left: 3px; right: 3px; bottom: 3px; height: 16px; display: flex; align-items: center; justify-content: space-between; padding: 0 3px;
  background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.75)); }
.cfg .st { font: 11px/1 var(--mono); color: var(--rc); letter-spacing: -2px; text-shadow: 1px 1px 0 #000, -1px 0 0 #000; }
.cfg .uid { font: 700 11px/1 var(--mono); color: #fff; text-shadow: 1px 1px 0 #000; }
.schip { position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; display: grid; place-items: center; background: var(--fc); color: var(--fi);
  box-shadow: 0 0 0 1px #000, inset 1px 1px 0 rgba(255,255,255,.4), inset -1px -1px 0 rgba(0,0,0,.35); }
.schip.guest { left: auto; right: 4px; }
.cnew { position: absolute; right: 4px; top: 4px; font: 700 11px/1 var(--mono); color: #fff; background: var(--red); padding: 2px 3px; box-shadow: 0 0 0 1px #000; text-shadow: 1px 1px 0 #000; }
.schip.guest ~ .cnew { top: 27px; }
.cup { position: absolute; left: 50%; top: -7px; margin-left: -10px; width: 20px; height: 14px; display: grid; place-items: center; font: 700 11px/1 var(--mono); color: #b6ff9a;
  background: #1f6a22; box-shadow: 0 0 0 1px #000, inset 0 1px 0 #6fd86a; animation: upb .5s steps(1) infinite alternate; }
@keyframes upb { to { transform: translateY(-2px); } }
.slotwell .hid { visibility: hidden; }
.slotwell .stop { animation: stopb .24s ease-out; }
@keyframes stopb { 0% { transform: translateY(-14px); } 65% { transform: translateY(3px); } 100% { transform: none; } }
.slotwell .cfg.flipup { animation: flipin .5s both; }
/* the winning pattern: every cell off a paying line is dimmed */
.slotwell .cbg, .slotwell .cfg { transition: filter .2s; }
.slotwell.has-wins .cbg:not(.lit), .slotwell.has-wins .cfg:not(.lit) { filter: brightness(.45) saturate(.25); }
.slotwell.has-wins .cfg.rf.lit { box-shadow: inset 0 0 0 3px var(--rc), inset 0 0 0 4px rgba(0,0,0,.5), 0 0 0 1px #000, 0 0 0 3px #ffd23f, 0 0 8px 3px rgba(255,190,40,.45); }

/* winning lines: under the sprites, faction colour on a gold halo */
.plines { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; overflow: visible; filter: drop-shadow(0 0 2px rgba(255,200,50,.9)); }
.pl { opacity: 0; } .pl.on { opacity: 1; }
.pl path { fill: none; stroke-linejoin: round; stroke-linecap: square; }
.pl-u { stroke: #000; stroke-width: 9; opacity: .8; }
.pl-g { stroke: #fff3b0; stroke-width: 5; }
.pl-c { stroke: var(--lc); stroke-width: 3; }
.anim .pl.on path { stroke-dasharray: 700; stroke-dashoffset: 700; animation: drawl .3s ease-out forwards; }
@keyframes drawl { to { stroke-dashoffset: 0; } }
.slotwell.jp .pl.on { opacity: .55; }
.slotwell.jp .pl-c { stroke-width: 2; }
.slotwell.jp .pl-u { stroke-width: 5; }

/* line markers (start) and "+1" badges (end) */
.pm { position: absolute; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 2px; font: 700 11px/1 var(--mono); color: #6f6880;
  background: #17131f; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #3a3348; }
.pm.v { width: 30px; height: 38px; flex-direction: column; } .pm.h { width: 44px; height: 22px; } .pm.d { width: 34px; height: 22px; }
.pm .pme { display: none; line-height: 0; }
.pm.on { color: #ffe9a0; background: linear-gradient(#4e360a, #2a1a04); text-shadow: 1px 1px 0 #000;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 2px #f2c443, inset 0 0 0 3px #000, 0 0 8px 2px rgba(255,200,60,.55); }
.pm.on .pme { display: block; }
.pb { position: absolute; z-index: 5; display: none; align-items: center; justify-content: center; gap: 2px; font: 700 11px/1 var(--mono); color: #2a1a00;
  background: linear-gradient(#ffe27a, #d9a326); box-shadow: 0 0 0 1px #000, inset 0 1px 0 #fff6c8, inset 0 -2px 0 #9a6a10, 0 0 8px 2px rgba(255,200,60,.55); }
.pb.v { width: 30px; height: 38px; flex-direction: column; } .pb.h { width: 44px; height: 20px; } .pb.d { width: 34px; height: 20px; }
.pb.on { display: flex; }
.pb .pbe { line-height: 0; background: #1d1428; box-shadow: 0 0 0 1px #000; }
.anim .pb.on { animation: pop .35s cubic-bezier(.3,1.8,.5,1); }
.anim .pm.on { animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.2); } }
.ps { position: absolute; z-index: 5; width: 6px; height: 6px; background: #2a2434; box-shadow: 0 0 0 1px #000; transform: rotate(45deg); }

/* spinning reels */
.reel { position: absolute; z-index: 4; width: 88px; height: 280px; overflow: hidden; background: #0c0911; }
.reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(12,9,17,.9), transparent 25%, transparent 75%, rgba(12,9,17,.9)); }
.reel .strip { display: flex; flex-direction: column; gap: 8px; filter: blur(1px) brightness(1.1); animation: reelspin .3s linear infinite; }
.reel .rb { position: relative; flex: none; }
.reel .rb .spr { position: absolute; left: 14px; top: 10px; }
@keyframes reelspin { from { transform: translateY(-576px); } to { transform: none; } }

/* result panel */
.rpanel { position: absolute; left: 8px; right: 8px; top: 4px; height: 144px; padding: 6px 8px; font: 11px/14px var(--mono); display: flex; flex-direction: column; gap: 4px; }
.rpanel.wait { align-items: center; justify-content: center; }
.rpanel.fresh { animation: rpin .3s ease-out; }
@keyframes rpin { from { transform: translateY(8px); opacity: 0; } }
.rp-h { font-size: 12px; line-height: 18px; white-space: nowrap; overflow: hidden; }
.rp-h.tight { font-size: 11px; letter-spacing: -.3px; }
.rp-t { display: flex; gap: 12px; height: 50px; }
.tg { display: flex; flex-direction: column; gap: 2px; }
.tl { font: 700 11px/12px var(--mono); color: var(--gold); white-space: nowrap; }
.tl.new { color: #ff7a6c; }
.ths { display: flex; gap: 4px; }
.th { width: 36px; height: 36px; background: #1a1622; box-shadow: inset 0 0 0 2px var(--rc), 0 0 0 1px #000; }
.th .spr { position: absolute; left: 2px; top: 0; }
.th .tid { position: absolute; left: 2px; right: 2px; bottom: 2px; font: 700 11px/11px var(--mono); text-align: center; color: #fff; background: rgba(0,0,0,.65); }
.th .tup { position: absolute; right: 1px; top: 1px; font: 700 11px/1 var(--mono); color: #8ef08a; text-shadow: 1px 1px 0 #000; }
.tmore { align-self: center; font: 700 11px/1 var(--mono); color: var(--quiet); padding: 0 2px; }
.rp-x { height: 16px; line-height: 16px; white-space: nowrap; overflow: hidden; }
.jcol { color: #ff7a9a; }
.rpanel .hr { margin: 0; flex: none; }
.rpanel > * { flex: none; }
.rp-p { display: flex; align-items: center; gap: 8px; height: 28px; }
.rp-p > span { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pity { height: 24px; padding: 0 8px; font-size: 11px; white-space: nowrap; }
.rc-common { color: var(--r-common); } .rc-rare { color: #6fb0ff; } .rc-epic { color: #c07cf0; } .rc-legendary { color: var(--r-legendary); }
/* line grades (6A.2) and imprint tiers (6A.3) */
.g1 { color: #9aa0a6; } .g2 { color: #6fb0ff; } .g3 { color: #c07cf0; } .g4 { color: #f2c443; }
.an1 { color: #d0955a; } .an2 { color: #d4dbe2; } .an3 { color: #f2c443; } .an4 { color: #ff5a4a; }

/* M15 chọn 1/3 */
.pick { position: absolute; top: 2px; width: 112px; height: 216px; padding: 6px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: #20242e; box-shadow: inset 0 0 0 2px var(--rc), 0 0 0 1px #000; font-size: 10px; text-align: center; cursor: pointer; transition: transform .12s, opacity .12s; }
.pick.common { --rc: var(--r-common); } .pick.rare { --rc: var(--r-rare); } .pick.epic { --rc: var(--r-epic); } .pick.legendary { --rc: var(--r-legendary); }
.pick.epic, .pick.legendary { background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rc) 30%, #20242e) 0, #1b1e26 75%); }
.pick:hover { filter: brightness(1.12); }
.pick.sel { transform: translateY(-4px); box-shadow: inset 0 0 0 2px var(--rc), 0 0 0 2px #fff, 0 0 12px 2px rgba(255,255,255,.45); }
.pick.dimmed { opacity: .42; }
.pick .pr { font: 700 9px/1 var(--mono); color: var(--rc); text-shadow: 1px 1px 0 #000; }
.pick .pnm { font-weight: 700; color: #fff; font-size: 11px; line-height: 14px; min-height: 28px; display: flex; align-items: center; }
.pick .pe { line-height: 13px; color: #d8dbe3; flex: 1; }
.pick .pt { font: 700 9px/1 var(--mono); padding: 2px 4px; background: #2f3544; box-shadow: 0 0 0 1px #000; }
.pick .pt.new { background: var(--red); color: #fff; }
.ri { position: relative; width: 48px; height: 48px; flex: none; background: #14161c; box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #3a3f4b; }
.ri::before, .ri::after { content: ""; position: absolute; }
.ri.flag::before { left: 13px; top: 6px; width: 3px; height: 36px; background: #c8a46a; }
.ri.flag::after { left: 16px; top: 7px; width: 22px; height: 15px; background: #c0392b; clip-path: polygon(0 0, 100% 0, 78% 50%, 100% 100%, 0 100%); }
.ri.glass::before { left: 13px; top: 6px; width: 22px; height: 36px; background: #e8b83a; clip-path: polygon(0 0, 100% 0, 58% 50%, 100% 100%, 0 100%, 42% 50%); }
.ri.glass::after { left: 20px; top: 30px; width: 8px; height: 8px; background: #fff2a8; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.ri.horn::before { left: 6px; top: 14px; width: 36px; height: 20px; background: #d9b46a; clip-path: polygon(0 38%, 100% 0, 100% 100%, 0 62%); }
.ri.horn::after { left: 36px; top: 12px; width: 6px; height: 24px; background: #8a6414; }
.ri.sword::before { left: 22px; top: 5px; width: 4px; height: 30px; background: #dfe6ef; box-shadow: inset -1px 0 0 #8d93a3; }
.ri.sword::after { left: 13px; top: 33px; width: 22px; height: 4px; background: #b98a1c; box-shadow: 9px 4px 0 -1px #6b4a1a, 9px 8px 0 -1px #6b4a1a; }
.ri.burst::before { inset: 6px; background: #ffd23f; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ri.dice::before { inset: 10px; background: radial-gradient(circle, #222 2.5px, transparent 3px) 2px 2px / 9.5px 9.5px, #f3f3f3; box-shadow: 0 0 0 1px #000; }
.cdbar { height: 6px; }
.cdbar > i { animation: cdown 8s linear infinite; right: 1px; }
@keyframes cdown { from { right: 1px; } to { right: calc(100% - 1px); } }

/* M16 bản sao + Hấp thụ */
.cmp { display: flex; gap: 4px; padding: 4px 6px; height: 200px; }
.cmp .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 4px 5px; font-size: 10px;
  background: #20242e; box-shadow: inset 1px 1px 0 #4b546a, inset -1px -1px 0 #0a0b0f, 0 0 0 1px #000; }
.cmp .col.new { box-shadow: inset 0 0 0 1px var(--r-epic), 0 0 0 1px #000; }
.cmp .ch { font-weight: 700; color: #fff; height: 16px; white-space: nowrap; }
.cmp .sl { display: flex; align-items: center; gap: 3px; height: 18px; padding: 0 3px; background: #1a1d25; white-space: nowrap; overflow: hidden; }
.anbox { margin-top: auto; padding: 3px 4px; line-height: 13px; background: #15171d; box-shadow: inset 0 0 0 1px #3a3f4b; }
.absorb { padding: 4px 10px; display: flex; flex-direction: column; gap: 2px; }
.opt { display: flex; align-items: center; gap: 6px; height: 20px; font-size: 10px; cursor: pointer; color: #b9bfcc; }
.opt i { width: 10px; height: 10px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2px #7c8191; }
.opt.on { color: #fff; }
.opt.on i { background: var(--gold); box-shadow: inset 0 0 0 2px #000, 0 0 0 1px var(--gold); }
