:root {
  --bg: #0b0918;
  --panel: rgba(20, 16, 44, 0.92);
  --panel-edge: #3b2f6e;
  --text: #ece6ff;
  --muted: #9a90c4;
  --gold: #ffc94a;
  --orange: #ff9a3c;
  --teal: #4ff0e0;
  --pink: #ff4f8b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

#game {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

#ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: auto;
}
.screen.active { display: flex; animation: fadeIn 0.25s ease-out; }
#screen-pause, #screen-gameover { background: rgba(8, 6, 20, 0.6); backdrop-filter: blur(3px); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.menu-box, .panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.panel {
  min-width: min(360px, 100%);
  padding: 28px 32px;
  background: var(--panel);
  border: 2px solid var(--panel-edge);
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(79, 240, 224, 0.12), inset 0 0 30px rgba(0, 0, 0, 0.4);
}

.logo { margin: 0 0 18px; text-align: center; line-height: 1; }
.logo-main {
  display: block;
  font-size: clamp(40px, 8vw, 86px);
  letter-spacing: 0.06em;
  font-weight: 900;
  background: linear-gradient(180deg, #fff3c4 0%, var(--gold) 45%, var(--orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 180, 60, 0.45)) drop-shadow(0 4px 0 #3a1f0c);
}
.logo-sub {
  display: block;
  margin-top: 10px;
  font-size: clamp(14px, 2.4vw, 22px);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--teal);
  text-shadow: 0 0 12px rgba(79, 240, 224, 0.6);
}

h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: 0.05em; color: var(--gold); }
h2.bad { color: var(--pink); }

.btn {
  min-width: 220px;
  padding: 12px 22px;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  background: linear-gradient(180deg, #2c2460, #1d1842);
  border: 2px solid #4a3d8c;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.08s, border-color 0.15s, box-shadow 0.15s;
}
.btn:hover { border-color: var(--teal); box-shadow: 0 0 16px rgba(79, 240, 224, 0.35); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  color: #2a1606;
  background: linear-gradient(180deg, #ffe08a, var(--gold) 50%, var(--orange));
  border-color: #ffe9b0;
}
.btn.primary:hover { box-shadow: 0 0 20px rgba(255, 201, 74, 0.55); }

.hint { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.stats {
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px 24px;
  margin: 4px 0 12px;
  font-size: 16px;
}
.stats dt { color: var(--muted); }
.stats dd { margin: 0; text-align: right; font-weight: 700; color: var(--text); }

/* --- Overlays ------------------------------------------------------------- */
.screen.dim { background: rgba(8, 6, 20, 0.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.screen { overflow-y: auto; }
.sub { margin: 0 0 14px; color: var(--muted); text-align: center; }
.more { color: var(--gold); font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; }
.choice { display: flex; flex-direction: column; align-items: center; max-width: 960px; width: 100%; margin: auto; }
.lvl-title { font-size: 42px; text-shadow: 0 0 22px rgba(255, 201, 74, 0.6); animation: pop 0.4s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Cards ---------------------------------------------------------------- */
.cards { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; width: 100%; }
.card {
  --rc: #b4afc6;
  position: relative;
  width: 200px;
  min-height: 250px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(36, 28, 76, 0.97), rgba(18, 14, 40, 0.97));
  border: 2px solid var(--rc);
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 18px color-mix(in srgb, var(--rc) 35%, transparent), inset 0 0 26px rgba(0, 0, 0, 0.45);
  animation: cardIn 0.35s cubic-bezier(.2, 1.3, .4, 1) both;
}
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
@keyframes cardIn { from { transform: translateY(24px) scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
.card.pickable { cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.card.pickable:hover { transform: translateY(-6px) scale(1.03); box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 0 30px var(--rc); }
.card-rarity {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--rc); color: #120a22; white-space: nowrap;
}
.card-icon {
  width: 72px; height: 72px; margin: 8px 0 6px; border-radius: 14px;
  display: grid; place-items: center;
  background: radial-gradient(circle, color-mix(in srgb, var(--rc) 30%, transparent), transparent 70%);
}
.card-icon img { width: 64px; height: 64px; }
.card-name { font-weight: 800; font-size: 17px; color: #fff; line-height: 1.15; }
.card-type { font-size: 12px; color: var(--muted); margin: 3px 0 6px; }
.card-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 0 0 6px; }
.card-chips .chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 3px; border-radius: 999px;
  background: rgba(159, 216, 255, 0.1); border: 1px solid rgba(159, 216, 255, 0.28); color: #cfeaff; font-size: 11px; font-weight: 600; white-space: nowrap; }
.card-chips .chip img { width: 18px; height: 18px; }
.card-desc { margin: 0 0 6px; font-size: 13px; color: #cfc8ea; }
.card-lines { list-style: none; margin: 0; padding: 0; font-size: 13.5px; line-height: 1.45; flex: 1; }
.card-lines li { color: #e6e0ff; }
.card-lines li.up { color: #7dffb0; font-weight: 700; }
.card-lines li.bad { color: #ff7a9a; font-weight: 700; }
.card-foot { display: flex; gap: 6px; width: 100%; margin-top: 10px; justify-content: center; }
.key {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  border: 1.5px solid var(--rc); color: var(--rc); font-weight: 800; font-size: 13px;
}
.hex { width: 15px; height: 16px; vertical-align: -3px; margin: 0 3px 0 4px; }

.buy, .lock {
  font: inherit; font-weight: 800; font-size: 14px; border-radius: 10px; cursor: pointer; padding: 8px 10px;
  border: 2px solid #4a3d8c; color: var(--text); background: #241d52;
}
.buy { flex: 1; color: #2a1606; background: linear-gradient(180deg, #ffe08a, var(--gold) 55%, var(--orange)); border-color: #ffe9b0; }
.buy:hover:not(:disabled) { box-shadow: 0 0 14px rgba(255, 201, 74, 0.6); }
.buy:disabled { background: #2a2448; color: #8a82ad; border-color: #3a3264; cursor: not-allowed; font-size: 12.5px; }
.lock { font-size: 12px; min-width: 62px; }
.lock.on { background: #4ff0e0; color: #0a2a2a; border-color: #bffcff; }
.card.locked { box-shadow: 0 0 0 3px rgba(79, 240, 224, 0.6), 0 0 20px rgba(79, 240, 224, 0.4); }
.card.sold { border-style: dashed; border-color: #3a3264; background: rgba(18, 14, 40, 0.6); justify-content: center; animation: none; }
.sold-label { color: #7dffb0; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; animation: pop 0.35s; }

/* --- Shop ----------------------------------------------------------------- */
.shop { width: min(1180px, 100%); margin: auto; }
.shop-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; gap: 12px; }
.shop-head .sub { text-align: left; margin: 0; }
.currency {
  display: flex; align-items: center; gap: 4px; padding: 8px 16px; border-radius: 14px;
  background: var(--panel); border: 2px solid #6a4a1e; font-size: 26px; font-weight: 900; color: #ffd27a;
}
.currency .hex { width: 24px; height: 26px; }
.currency.flash { animation: coinFlash 0.4s; }
@keyframes coinFlash { 50% { transform: scale(1.12); color: #fff; } }
.shop-body { display: flex; gap: 20px; align-items: flex-start; }
.shop-main { flex: 1; min-width: 0; }
.shop-cards { justify-content: flex-start; }
.shop-cards .card { width: calc(25% - 12px); min-width: 180px; }
.shop-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.shop-actions .btn { min-width: 180px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.shop-side {
  width: 270px; flex: none; padding: 14px 16px; border-radius: 16px;
  background: var(--panel); border: 2px solid var(--panel-edge);
}
.shop-side h3 { margin: 4px 0 8px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.owned-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.owned {
  --rc: #4a3d8c; position: relative; width: 52px; height: 52px; border-radius: 10px;
  border: 2px solid var(--rc); background: rgba(10, 8, 24, 0.6); display: grid; place-items: center;
}
.owned img { width: 44px; height: 44px; }
.owned.small { width: 40px; height: 40px; }
.owned.small img { width: 34px; height: 34px; }
.owned.empty { border-style: dashed; border-color: #3a3264; }
.owned .lv {
  position: absolute; right: -5px; bottom: -5px; min-width: 18px; padding: 0 4px; height: 18px; border-radius: 9px;
  background: var(--gold); color: #2a1606; font-size: 11px; font-weight: 900; display: grid; place-items: center;
}
.stats.compact { font-size: 13.5px; gap: 3px 12px; margin: 0; }

.victory h2 { font-size: 34px; text-shadow: 0 0 24px rgba(255, 201, 74, 0.8); }
.hint.dev { opacity: 0.6; font-size: 12px; }

@media (max-width: 860px) {
  .shop-body { flex-direction: column; }
  .shop-side { width: 100%; max-height: none; }
  .shop-cards .card { width: calc(50% - 8px); min-width: 0; }
  .card { width: calc(50% - 8px); min-width: 150px; min-height: 0; }
}
@media (max-width: 420px) {
  .card { padding: 12px 8px 10px; }
  .card-icon { width: 56px; height: 56px; }
  .card-icon img { width: 48px; height: 48px; }
  .card-name { font-size: 15px; }
  .card-lines { font-size: 12.5px; }
  .card-foot { flex-wrap: wrap; }
  .lock { flex: 1; }
}

.synergies { list-style: none; margin: 0 0 12px; padding: 0; font-size: 12.5px; display: grid; gap: 6px; }
.synergies li { padding: 6px 8px; border-radius: 8px; background: rgba(10, 8, 24, 0.5); color: #8f88b4; border: 1px solid #2a2450; }
.synergies .syn-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.synergies li b { font-size: 13px; color: #b3acd8; }
.synergies li em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.synergies li p { margin: 4px 0 0; line-height: 1.35; }
.synergies li.part { border-color: #6a5a20; }
.synergies li.on { border-color: #8dffb0; color: #c8ffd8; box-shadow: 0 0 10px rgba(141, 255, 176, 0.25); }
.synergies li.on b, .synergies li.on em { color: #8dffb0; }
.syn-reqs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.req { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px 1px 2px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  border: 1px dashed #4a3d8c; color: #8f88b4; background: rgba(10, 8, 24, 0.5); white-space: nowrap; }
.req img { width: 20px; height: 20px; opacity: 0.45; filter: grayscale(0.8); }
.req.met { border: 1px solid #8dffb0; color: #c8ffd8; }
.req.met img { opacity: 1; filter: none; }
.req.met::after { content: "✓"; color: #8dffb0; margin-left: 2px; }
.req[data-tip] { cursor: help; }
.req .bar { display: inline-block; width: 34px; height: 5px; margin-left: 4px; border-radius: 3px; background: #2a2450; overflow: hidden; }
.req .bar i { display: block; height: 100%; background: var(--gold); }
.synergies li.compact p { font-size: 12px; }
.card-lines li.tag { color: #b3acd8; font-size: 12px; font-style: italic; margin-top: 3px; }
.card-lines li.syn { color: #8dffb0; font-weight: 800; margin-top: 3px; text-shadow: 0 0 8px rgba(141, 255, 176, 0.5); }

/* Shop side panel scrolls on its own so it never runs off the screen. */
.shop-side { max-height: calc(100vh - 130px); overflow-y: auto; scrollbar-width: thin; }
.btn.small { min-width: 0; width: 100%; padding: 7px 10px; font-size: 13.5px; margin-bottom: 10px; }
.owned[data-tip], .wrow[data-tip] { cursor: help; }
.stats dt.zero, .stats dd.zero { opacity: 0.4; }

/* Hover card */
#tooltip { position: fixed; z-index: 50; pointer-events: none; }
#tooltip .card { animation: none; width: 230px; min-height: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 10px 40px rgba(0,0,0,.6), 0 0 22px color-mix(in srgb, var(--rc) 40%, transparent); }

/* Loadout overlay */
.loadout { width: min(1180px, 100%); height: min(660px, calc(100vh - 32px)); margin: auto; display: flex; flex-direction: column;
  padding: 16px 20px; border-radius: 18px; background: var(--panel); border: 2px solid var(--panel-edge); }
.loadout-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.loadout-head .sub { text-align: left; margin: 0; }
.loadout-head .btn { min-width: 0; padding: 8px 16px; font-size: 15px; }
.loadout-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 22px; min-height: 0; flex: 1; }
.loadout-grid[hidden], .lo-panel[hidden] { display: none; }
.lo-tabs { display: flex; gap: 6px; margin-bottom: 12px; border-bottom: 2px solid var(--panel-edge); }
.lo-tab { font: inherit; font-size: 14px; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent;
  margin-bottom: -2px; padding: 6px 14px 8px; cursor: pointer; letter-spacing: 0.04em; }
.lo-tab:hover { color: #fff; }
.lo-tab.on { color: #fff; border-bottom-color: var(--teal); }
.lo-tab .key-hint { margin-left: 4px; }
.lo-panel { min-height: 0; flex: 1; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.lo-panel.loadout-grid { overflow: hidden; }
.lo-panel > .muted { margin: 0 0 10px; }
.lo-stats { columns: 2 220px; column-gap: 22px; }
.lo-stats .stat-group { break-inside: avoid; }
.lo-syn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.lo-syn-grid li { margin: 0; }
.dmg-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dmg-table th { text-align: left; font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 4px 8px; border-bottom: 1px solid var(--panel-edge); }
.dmg-table td { padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.dmg-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dmg-table td.num:nth-child(2) { width: 32%; }
.dmg-table tbody tr:not(.other):hover { background: rgba(255,255,255,0.05); }
.dmg-table .src { display: flex; align-items: center; gap: 8px; }
.dmg-table .src img { width: 30px; height: 30px; border-radius: 7px; background: rgba(0,0,0,0.3); box-shadow: inset 0 0 0 2px var(--rc); }
.dmg-table .src b { color: #fff; font-weight: 600; }
.dmg-table .src .lv { font-size: 12px; color: var(--muted); }
.dmg-table tr.other .src b { color: var(--muted); }
.dmg-table .bar { display: block; height: 4px; margin-top: 3px; border-radius: 2px; background: rgba(255,255,255,0.08); overflow: hidden; }
.dmg-table .bar i { display: block; height: 100%; background: var(--rc); }
.dmg-table tfoot td { font-weight: 700; color: #fff; border-bottom: 0; border-top: 1px solid var(--panel-edge); }
.lo-col { min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.lo-col h3 { margin: 4px 0 8px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lo-col h4 { margin: 10px 0 4px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.lo-col h4:first-child { margin-top: 4px; }
.lo-col .stats.compact { grid-template-columns: 1fr auto; }
.lo-col > .muted { margin: -4px 0 8px; }
.wrow { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 10px; margin-bottom: 4px; }
.wrow:hover { background: rgba(255, 255, 255, 0.05); }
.wrow b { display: block; color: #fff; font-size: 14.5px; }
.wrow > div > span { font-size: 12px; color: var(--muted); }
@media (max-width: 860px) { .shop-side { max-height: none; } }
@media (max-width: 900px) {
  .loadout { max-height: none; height: auto; }
  .loadout-grid { grid-template-columns: 1fr; }
  .lo-panel, .lo-panel.loadout-grid { overflow: visible; }
  .lo-syn-grid { grid-template-columns: 1fr; }
  .lo-col { overflow: visible; }
}

.victory { animation: victoryIn 0.8s cubic-bezier(.2, 1.4, .4, 1); box-shadow: 0 0 60px rgba(255, 201, 74, 0.35), inset 0 0 30px rgba(0,0,0,0.4); border-color: #ffc94a; }
@keyframes victoryIn { from { transform: scale(0.6) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
#screen-victory.dim { background: rgba(8, 6, 20, 0.35); backdrop-filter: none; -webkit-backdrop-filter: none; }

.levelup-actions { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 18px; }
.levelup-actions .btn { min-width: 170px; }
.currency.small { font-size: 20px; padding: 6px 12px; }
.currency.small .hex { width: 18px; height: 20px; }
.key-hint { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid currentColor; border-radius: 5px; font-size: 12px; opacity: 0.7; }

/* --- Menu, settings, how to play ----------------------------------------- */
#menu-lumi { width: 220px; height: 150px; margin: -10px 0 4px; }
.logo-main { animation: logoGlow 3s ease-in-out infinite; }
@keyframes logoGlow { 50% { filter: drop-shadow(0 0 30px rgba(255, 180, 60, 0.7)) drop-shadow(0 4px 0 #3a1f0c); } }
.settings { min-width: min(420px, 100%); }
.settings .row { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; font-weight: 700; }
.settings input[type=range] { flex: 1; accent-color: var(--teal); }
.settings input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--teal); }
#set-volume-val { width: 42px; text-align: right; color: var(--muted); }
.seg { display: flex; border: 2px solid #4a3d8c; border-radius: 10px; overflow: hidden; }
.seg button { font: inherit; font-weight: 700; padding: 6px 12px; background: #1d1842; color: var(--muted); border: 0; cursor: pointer; }
.seg button.on { background: var(--teal); color: #0a2a2a; }
.howto { max-width: 920px; width: 100%; }
.howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px 22px; margin-bottom: 8px; }
.howto h3 { margin: 6px 0 4px; color: var(--teal); font-size: 16px; }
.howto p, .howto li { margin: 0 0 6px; font-size: 14px; line-height: 1.45; color: #d8d2f0; }
.howto ul { margin: 0; padding-left: 18px; }
kbd { display: inline-block; padding: 0 6px; border: 1px solid #6a5cb0; border-bottom-width: 2px; border-radius: 5px; font: inherit; font-size: 12px; background: #241d52; color: #fff; }
.xp-dot, .mx-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.mx-dot { background: #ffb83a; box-shadow: 0 0 8px #ffb83a; border-radius: 2px; transform: rotate(45deg); }

/* --- Touch controls ------------------------------------------------------- */
#touch-ui { position: fixed; inset: 0; pointer-events: none; }
#touch-ui button {
  position: absolute; pointer-events: auto; border-radius: 50%; font: inherit; font-weight: 900; color: #fff;
  border: 2px solid rgba(79, 240, 224, 0.7); background: rgba(20, 16, 44, 0.65); touch-action: none;
}
#touch-burst { right: max(20px, env(safe-area-inset-right)); bottom: max(26px, env(safe-area-inset-bottom)); width: 86px; height: 86px; font-size: 38px; color: #ffe08a; }
#touch-burst.ready { box-shadow: 0 0 24px rgba(79, 240, 224, 0.8); border-color: #bffcff; }
#touch-pause { right: 16px; top: 100px; width: 48px; height: 48px; font-size: 16px; }

/* Purchase flash on shop cards. */
.card.bought-flash { animation: boughtFlash 0.5s ease-out; }
@keyframes boughtFlash { 0% { box-shadow: 0 0 0 0 rgba(255, 220, 120, 0.9); transform: scale(1.04); } 100% { box-shadow: 0 0 0 30px rgba(255, 220, 120, 0); transform: none; } }

/* Hero select */
.choice.wide { max-width: 1100px; }
.cards.heroes { max-width: 940px; gap: 12px; }
.cards.heroes .card { width: 220px; min-height: 0; padding: 8px 12px 8px; }
.cards.heroes .card-icon { width: 54px; height: 54px; margin: 2px 0 2px; }
.cards.heroes .card-icon img { width: 50px; height: 50px; }
.cards.heroes .card-name { font-size: 15.5px; }
.cards.heroes .card-type { margin: 1px 0 4px; }
.cards.heroes .card-desc { font-size: 12px; line-height: 1.3; margin-bottom: 4px; }
.cards.heroes .card-lines { line-height: 1.3; }
.cards.heroes .card-foot { margin-top: 6px; }
.cards.heroes .card-lines { font-size: 12.5px; }
.difficulty-row { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; color: var(--muted); margin: 4px 0 2px; }
.seg#difficulty button { padding: 6px 14px; }
.seg#difficulty button.on { background: var(--dc, var(--teal)); color: #1a1028; }
.sub.small { font-size: 13px; margin: 2px 0 10px; min-height: 1em; }
.bolts { display: flex; gap: 3px; margin-left: auto; }
.bolts svg { width: 16px; height: 20px; }
.bolts svg.off { opacity: 0.22; filter: grayscale(1); }
.btn.danger { background: linear-gradient(#c7283a, #7a1020); color: #fff2f2; border-color: #ff6a6a; }
.card.last-pick { outline: 2px dashed rgba(255, 201, 74, 0.6); outline-offset: 4px; }
@media (max-width: 860px) { .cards.heroes .card { width: calc(50% - 8px); min-height: 0; } }
#screen-heroselect h2 { font-size: 26px; margin-bottom: 2px; }
#screen-heroselect .sub { margin-bottom: 6px; }
#screen-heroselect .sub.small { margin: 2px 0 8px; }

.shop-interest { margin-right: auto; align-self: center; color: #ffd27a; font-size: 14px; font-weight: 700; }
.shop-interest:empty { display: none; }
