:root {
  --bg: #1a0f0c;
  --bg2: #2a1813;
  --panel: #2f1d17;
  --line: #5a3a2c;
  --text: #f5e6d6;
  --muted: #b89d88;
  --accent: #f08a3c;
  --accent2: #ffc27a;
  --good: #7fd36a;
  --bad: #ff5d4a;
  --mana: #4fb4ff;
  --cinder: #e8603c; --tide: #3a9ad9; --grove: #5fb34a; --gloam: #9a5ad6; --ash: #d9a441;
  --common: #c9c2b8; --rare: #4fb4ff; --epic: #c77dff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 0%, #3a1d14 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: var(--text); background: #1d110d; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.center { justify-content: center; }
.err { color: var(--bad); min-height: 1.2em; margin: 6px 0; font-size: 14px; }

.btn {
  background: linear-gradient(#4a2e22, #3a2219);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px;
  color: var(--text); font-weight: 600; transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; filter: none; transform: none; }
.btn.primary { background: linear-gradient(#f39a4c, #c9551f); border-color: #ffb36b; color: #1b0d07; }
.btn.big { font-size: 1.15rem; padding: 14px 22px; }
.btn.small { padding: 6px 10px; font-size: .85rem; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: #8a3a30; color: #ffb0a6; }

#app { min-height: 100%; }
.screen { display: none; min-height: 100dvh; padding: 12px 16px 24px; max-width: 1100px; margin: 0 auto; }
.screen.active { display: block; }
.bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar h2 { font-size: 1.3rem; }
.panel { background: rgba(47, 29, 23, .8); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.panel h3 { margin: 16px 0 8px; }
.panel label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.panel select { width: 100%; max-width: 420px; }
.prose li { margin-bottom: 6px; line-height: 1.45; }

/* Title */
.title-wrap { max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; padding-top: 4vh; text-align: center; }
.logo-flame { width: 72px; height: 72px; filter: drop-shadow(0 0 18px rgba(232, 96, 60, .7)); animation: flicker 2.4s infinite ease-in-out; }
@keyframes flicker { 50% { transform: scale(1.06) rotate(-2deg); filter: drop-shadow(0 0 26px rgba(255, 150, 60, .9)); } }
.logo-kicker { margin: 4px 0 0; letter-spacing: .25em; text-transform: uppercase; font-size: .8rem; color: var(--muted); }
.logo h1 { font-size: clamp(2.2rem, 10vw, 3.4rem); letter-spacing: .02em; background: linear-gradient(#ffe0a8, #f08a3c 60%, #b8401c); -webkit-background-clip: text; background-clip: text; color: transparent; font-family: Georgia, "Times New Roman", serif; }
.tagline { color: var(--muted); margin: 6px 0 0; }
.profile-box { background: rgba(47, 29, 23, .7); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: left; }
.profile-box label { font-size: .8rem; color: var(--muted); }
.profile-box input { flex: 1; min-width: 0; }
.record { margin-top: 8px; color: var(--muted); }
.record b { color: var(--text); }
.menu { display: flex; flex-direction: column; gap: 10px; }
.foot { color: var(--muted); font-size: .85rem; }
.chk { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; }

.diff-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.diff { text-align: left; background: #24150f; border: 2px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.diff span { color: var(--muted); font-size: .88rem; }
.diff.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240, 138, 60, .25); }

/* ---------- Cards ---------- */
.card {
  --fc: var(--cinder);
  position: relative; width: var(--w, 150px); aspect-ratio: 5 / 7; container-type: inline-size; flex: none; user-select: none;
}
/* .ci is the actual card face; sized in cqw so it scales with whatever width the .card gets */
.card > .ci {
  position: absolute; inset: 0; border-radius: 7cqw; padding: 4cqw; display: flex; flex-direction: column;
  background: linear-gradient(160deg, color-mix(in srgb, var(--fc) 55%, #000) 0%, #1b100c 100%);
  border: 1.6cqw solid color-mix(in srgb, var(--fc) 70%, #000);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .5);
}
.card.f-cinder { --fc: var(--cinder); } .card.f-tide { --fc: var(--tide); } .card.f-grove { --fc: var(--grove); } .card.f-gloam { --fc: var(--gloam); } .card.f-ash { --fc: var(--ash); }
/* Ashfall cards (NFTs from packs): a gold foil frame and a shine that sweeps across */
.card.s-ashfall > .ci { border-color: #f3c96b; background: linear-gradient(160deg, #4a3518 0%, #1b120c 70%, #3a2a14 100%); box-shadow: 0 0 0 1cqw #6b4b16, 0 0 8cqw rgba(243, 201, 107, .55), 0 3px 10px rgba(0, 0, 0, .5); overflow: hidden; }
.card.s-ashfall > .ci::after { content: ""; position: absolute; inset: -40% -60%; background: linear-gradient(105deg, transparent 40%, rgba(255, 240, 200, .35) 50%, transparent 60%); animation: ashShine 3.2s infinite; pointer-events: none; }
@keyframes ashShine { 0% { transform: translateX(-60%); } 60%, 100% { transform: translateX(60%); } }
.card.s-ashfall .name { color: #ffe9b0; }
.card .set-tag { position: absolute; top: 2cqw; left: 50%; transform: translateX(-50%); font-size: 5.5cqw; letter-spacing: .12em; color: #1b120c; background: #f3c96b; padding: 0 3cqw; border-radius: 3cqw; font-weight: 800; }
.card.unowned { filter: grayscale(.9) brightness(.55); }
@media (prefers-reduced-motion: reduce) { .card.s-ashfall > .ci::after { animation: none; } }
.card .art { height: 46%; border-radius: 4cqw; overflow: hidden; border: 1cqw solid rgba(0, 0, 0, .5); background: #000; }
.card .art svg { width: 100%; height: 100%; display: block; }
.card.t-spell .art { border-radius: 50% 50% 4cqw 4cqw / 30% 30% 4cqw 4cqw; }
.card .name { font-weight: 700; font-size: 9.5cqw; line-height: 1.1; margin-top: 3cqw; text-align: center; font-family: Georgia, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .type { font-size: 6.2cqw; text-align: center; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 1cqw; }
.card .text { font-size: 7.4cqw; line-height: 1.22; text-align: center; margin-top: 2.5cqw; flex: 1; overflow: hidden; color: #f0dfcf; }
.card .text b { color: var(--accent2); }
.card .cost {
  position: absolute; top: -3cqw; left: -3cqw; width: 20cqw; height: 20cqw; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 12cqw;
  background: radial-gradient(circle at 35% 30%, #bfe6ff, var(--mana) 50%, #0d4a80); color: #04172a; border: 1cqw solid #082640;
}
.card .stat { position: absolute; bottom: -3cqw; width: 20cqw; height: 20cqw; display: grid; place-items: center; font-weight: 800; font-size: 12cqw; border: 1cqw solid #000; }
.card .stat.atk { left: -3cqw; background: radial-gradient(circle at 35% 30%, #ffe2a0, #e0901c 60%, #7a4300); color: #2a1400; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); border: none; }
.card .stat.hp { right: -3cqw; background: radial-gradient(circle at 35% 30%, #ffb3a8, #d43a2a 60%, #6a0f08); border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; color: #fff; }
.card .gem { position: absolute; top: 47%; left: 50%; transform: translate(-50%, -50%) rotate(45deg); width: 7cqw; height: 7cqw; border: .8cqw solid #000; }
.card.r-common .gem { background: var(--common); } .card.r-rare .gem { background: var(--rare); } .card.r-epic .gem { background: var(--epic); box-shadow: 0 0 6cqw var(--epic); }
.card .owned { position: absolute; top: 2cqw; right: 3cqw; font-size: 7cqw; background: rgba(0, 0, 0, .6); padding: 0 3cqw; border-radius: 4cqw; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; justify-items: center; padding: 6px 4px 20px; }
.card-grid .card { --w: 100%; max-width: 180px; cursor: pointer; }
.card-grid.small { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px 8px; }
.card-grid .card.maxed { opacity: .45; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.filters button { background: #24150f; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .85rem; }
.filters button.on { background: var(--accent); color: #1b0d07; border-color: var(--accent2); }

/* Deck list */
.deck-row { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #24150f; flex-wrap: wrap; }
.deck-row .dn { flex: 1; min-width: 140px; }
.deck-row .dn small { display: block; color: var(--muted); }
.deck-row.active { border-color: var(--accent); }
.pips { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.pips i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Editor */
.editor { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.ed-deck { position: sticky; top: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.ed-deck input { width: 100%; }
.ed-count { margin: 8px 0; }
.ed-count span:first-child { font-weight: 800; font-size: 1.2rem; }
#ed-list { list-style: none; margin: 0; padding: 0; max-height: 48vh; overflow: auto; }
#ed-list li { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; margin-bottom: 3px; background: #1d110d; border-left: 4px solid var(--fc); cursor: pointer; }
#ed-list li:hover { background: #2c1a13; }
#ed-list .c { width: 22px; height: 22px; border-radius: 50%; background: var(--mana); color: #04172a; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; }
#ed-list .n { flex: 1; }
#ed-list .x { color: var(--accent2); font-weight: 700; }
.curve { display: flex; align-items: flex-end; gap: 3px; height: 44px; margin-bottom: 22px; }
.curve div { flex: 1; background: var(--mana); border-radius: 3px 3px 0 0; position: relative; min-height: 2px; opacity: .8; }
.curve div span { position: absolute; bottom: -16px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); }

.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: baseline; }
.history .res { font-weight: 800; width: 56px; }
.history .res.win { color: var(--good); } .history .res.loss { color: var(--bad); }
.history .meta { color: var(--muted); font-size: .85rem; }

/* ---------- Match ---------- */
#screen-match { padding: 0; max-width: 900px; }
.match { display: flex; flex-direction: column; height: 100dvh; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 4px; }
.hero-bar { display: flex; align-items: center; gap: 10px; padding: 2px 4px; }
.hero { position: relative; width: clamp(54px, 13vw, 76px); aspect-ratio: 1; border-radius: 50%; flex: none; }
.hero .portrait { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 3px solid #d9a93e; background: #000; }
.hero .portrait svg { width: 100%; height: 100%; display: block; }
.hero .hp { position: absolute; bottom: -4px; right: -6px; min-width: 30px; height: 30px; padding: 0 4px; border-radius: 15px; background: radial-gradient(circle at 35% 30%, #ffb3a8, #d43a2a 60%, #6a0f08); display: grid; place-items: center; font-weight: 800; border: 2px solid #000; }
.hero-info { flex: 1; min-width: 0; }
.hero-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.piles { font-size: .78rem; color: var(--muted); }
.mana { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; margin: 2px 0; font-size: .8rem; }
.mana i { width: 11px; height: 11px; transform: rotate(45deg); background: #10304a; border: 1px solid #2a6a9a; display: inline-block; margin-right: 1px; }
.mana i.full { background: radial-gradient(circle at 35% 30%, #d6f0ff, var(--mana)); border-color: #bfe6ff; box-shadow: 0 0 5px var(--mana); }
.mana b { margin-left: 6px; color: #bfe6ff; }

.board { flex: 1; display: flex; justify-content: center; align-items: center; gap: clamp(4px, 1.5vw, 10px); min-height: 96px; border-radius: 14px; padding: 6px; }
.board.enemy { background: linear-gradient(rgba(154, 90, 214, .07), rgba(0, 0, 0, .15)); }
.board.player { background: linear-gradient(rgba(0, 0, 0, .15), rgba(240, 138, 60, .08)); }
.board.dropzone { outline: 2px dashed var(--accent); outline-offset: -4px; }
.board .empty { color: rgba(245, 230, 214, .25); font-size: .85rem; }
.midline { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.turn-tag { font-weight: 800; font-size: .85rem; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #1b0d07; white-space: nowrap; }
.turn-tag.enemy { background: var(--gloam); color: #fff; }
.last-log { flex: 1; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.end-turn { background: linear-gradient(#ffd27a, #e08a1e); color: #1b0d07; border-color: #ffe0a8; }
.end-turn.pulse { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 194, 122, .35); } }

.unit {
  --fc: var(--cinder); --uw: clamp(58px, 16vw, 92px);
  position: relative; width: var(--uw); aspect-ratio: 4 / 5; border-radius: 12px; flex: none;
  border: 3px solid color-mix(in srgb, var(--fc) 75%, #000); background: #000; cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .6); transition: transform .15s, box-shadow .15s;
}
.unit.f-cinder { --fc: var(--cinder); } .unit.f-tide { --fc: var(--tide); } .unit.f-grove { --fc: var(--grove); } .unit.f-gloam { --fc: var(--gloam); } .unit.f-ash { --fc: #f3c96b; box-shadow: 0 0 10px rgba(243, 201, 107, .6), 0 3px 8px rgba(0, 0, 0, .6); }
.unit .art { position: absolute; inset: 0; border-radius: 9px; overflow: hidden; }
.unit .art svg { width: 100%; height: 100%; display: block; }
.unit .stat { position: absolute; bottom: -8px; width: 26px; height: 26px; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.unit .stat.atk { left: -8px; background: radial-gradient(circle at 35% 30%, #ffe2a0, #e0901c 60%, #7a4300); color: #2a1400; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.unit .stat.hp { right: -8px; background: radial-gradient(circle at 35% 30%, #ffb3a8, #d43a2a 60%, #6a0f08); border-radius: 50%; border: 2px solid #000; }
.unit .stat.hp.hurt { color: #ffd0c8; }
.unit .stat.buffed { color: #c6ffb0; }
.unit .kws { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; }
.unit .kws span { font-size: 10px; font-weight: 800; background: #1b100c; border: 1px solid var(--line); border-radius: 6px; padding: 1px 4px; }
.unit.guard { border-style: double; border-width: 5px; border-color: #d9c7a0; }
.unit.ward::after { content: ""; position: absolute; inset: -5px; border-radius: 15px; border: 2px solid rgba(168, 230, 255, .8); box-shadow: 0 0 10px rgba(168, 230, 255, .6); pointer-events: none; }
.unit.sleepy .art { filter: grayscale(.4) brightness(.75); }
.unit.ready { box-shadow: 0 0 0 3px var(--good), 0 0 14px var(--good); }
.unit.selected { transform: translateY(-8px) scale(1.06); box-shadow: 0 0 0 3px #fff, 0 0 18px var(--accent2); }
.target { animation: targetGlow .9s infinite; }
@keyframes targetGlow { 0%, 100% { box-shadow: 0 0 0 3px var(--bad), 0 0 10px var(--bad); } 50% { box-shadow: 0 0 0 4px #ffb0a6, 0 0 22px var(--bad); } }
.hero.target .portrait { border-color: var(--bad); }
.unit.lunge-up { animation: lungeUp .3s; } .unit.lunge-down { animation: lungeDown .3s; }
@keyframes lungeUp { 50% { transform: translateY(-26px) scale(1.08); } }
@keyframes lungeDown { 50% { transform: translateY(26px) scale(1.08); } }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.hint { min-height: 1.6em; font-size: .85rem; color: var(--accent2); text-align: center; display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.hand { display: flex; gap: 6px; overflow-x: auto; padding: 14px 6px 6px; min-height: calc(var(--hw) * 1.4 + 22px); --hw: clamp(80px, 23vw, 124px); scrollbar-width: thin; }
.hand .card { --w: var(--hw); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.hand .card.playable > .ci { box-shadow: 0 0 0 2px var(--good), 0 0 12px rgba(127, 211, 106, .7); }
.hand .card.selected { transform: translateY(-10px); }
.hand .card.selected > .ci { box-shadow: 0 0 0 3px #fff, 0 0 18px var(--accent2); }
.hand .card.unaffordable { filter: brightness(.6) saturate(.6); }
.hand .card .text { font-size: 7cqw; }

.cast-banner { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 40; text-align: center; }
.cast-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cast-banner .card { --w: clamp(130px, 36vw, 180px); margin: 0 auto; }
.cast-banner .who { margin-bottom: 6px; font-weight: 700; text-shadow: 0 2px 4px #000; }
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.floater { position: absolute; font-weight: 900; font-size: 1.5rem; transform: translate(-50%, -50%); animation: floatUp 1s forwards; text-shadow: 0 2px 0 #000, 0 0 8px #000; }
.floater.dmg { color: #ff6a55; } .floater.heal { color: #8fff74; } .floater.ward { color: #a8e6ff; font-size: 1rem; } .floater.buff { color: #ffe27a; font-size: 1rem; }
@keyframes floatUp { 0% { opacity: 0; margin-top: 0; } 15% { opacity: 1; } 100% { opacity: 0; margin-top: -40px; } }

.log-panel { position: fixed; right: 8px; top: 8px; bottom: 8px; width: min(340px, calc(100vw - 16px)); background: rgba(26, 15, 12, .97); border: 1px solid var(--line); border-radius: 12px; padding: 10px; z-index: 60; display: flex; flex-direction: column; }
.log-panel[hidden] { display: none; }
.log-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.log-panel ol { overflow: auto; margin: 0; padding-left: 22px; font-size: .85rem; line-height: 1.4; color: var(--muted); }

.overlay { position: fixed; inset: 0; background: rgba(10, 5, 3, .78); display: grid; place-items: center; z-index: 70; padding: 16px; }
.overlay[hidden] { display: none; }
.result-box { background: var(--panel); border: 2px solid var(--accent); border-radius: 16px; padding: 24px; text-align: center; max-width: 360px; width: 100%; }
.result-box h2 { font-size: 2.4rem; font-family: Georgia, serif; margin-bottom: 8px; }
.result-box.win h2 { color: var(--accent2); } .result-box.loss h2 { color: #c9a0ff; }
#zoom .card { --w: min(300px, 80vw); }
#zoom .zoom-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
#zoom .kwhelp { max-width: 320px; font-size: .9rem; color: var(--muted); text-align: center; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(80px); background: #3a2219; border: 1px solid var(--accent); padding: 10px 16px; border-radius: 10px; transition: transform .25s; z-index: 90; max-width: 90vw; }
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 720px) {
  .editor { grid-template-columns: 1fr; }
  .ed-deck { position: static; order: -1; }
  #ed-list { max-height: 30vh; }
  .diff-pick { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px 8px; }
}
@media (max-height: 700px) {
  .hand { --hw: clamp(66px, 17vw, 96px); }
  .unit { --uw: clamp(52px, 13vw, 78px); }
  .board { min-height: 80px; }
}

/* Account, Ashfall packs, GEM */
.acct { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.acct span { flex: 1; min-width: 160px; }
.ash-btn { border-color: #b98a2e; background: linear-gradient(#5a4320, #3a2a14); }
.coll-note { margin: 0 0 10px; }
.small { font-size: .85rem; }
.packs p { line-height: 1.45; }
.packs-status { min-height: 1.2em; margin: 8px 0; padding: 0; border-radius: 10px; }
.packs-status:not(:empty) { padding: 8px 12px; background: #24150f; border: 1px solid var(--line); }
.packs-status.err { color: var(--bad); } .packs-status.good { color: var(--good); } .packs-status.warn { color: var(--accent2); }
.wallet-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.gem-box { background: #24150f; border: 1px solid #b98a2e; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.gem-ico { display: inline-block; width: 12px; height: 12px; transform: rotate(45deg); background: radial-gradient(circle at 35% 30%, #e6fff7, #3ad9a8 60%, #0b5a44); border: 1px solid #000; margin-right: 4px; }
.pack-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 14px; border: 2px solid #f3c96b; background: linear-gradient(160deg, #4a3518, #1b120c); text-align: center; }
.pack span { color: var(--muted); font-size: .85rem; }
.pack-art { width: 64px; height: 84px; border-radius: 8px; background: linear-gradient(135deg, #f3c96b, #8a5a1c 50%, #f3c96b); box-shadow: 0 0 14px rgba(243, 201, 107, .6); }
.pack-art.gem { background: linear-gradient(135deg, #3ad9a8, #0b5a44 50%, #f3c96b); }
.merge-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.result-gem { color: var(--accent2); min-height: 1em; }
#signin-code .code { font-size: 1.4rem; letter-spacing: .1em; color: var(--accent2); }
@media (max-width: 420px) { .pack-row { grid-template-columns: 1fr; } }
