:root {
  color-scheme: dark;
  --ink: #101311;
  --panel: #191e1b;
  --panel-raised: #202722;
  --line: #354139;
  --muted: #a2aa9f;
  --paper: #f1eee4;
  --gold: #d7ad65;
  --green: #8eb58b;
  --red: #d77564;
  --blue: #82aeca;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--sans);
  background: var(--ink);
  color: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 72% -12%, #293329 0, transparent 43rem),
    radial-gradient(ellipse at 2% 42%, #211e19 0, transparent 38rem),
    var(--ink);
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.topbar {
  min-height: 76px;
  padding: 0 clamp(18px, 5vw, 72px);
  border-bottom: 1px solid #ffffff12;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  color: var(--paper);
  display: flex;
  gap: 11px;
  align-items: center;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .17em;
  white-space: nowrap;
}
.brand i { display: block; color: var(--gold); font-style: normal; margin-top: 3px; }
.brand-mark { font-size: 25px; color: var(--gold); }
.main-nav { display: flex; gap: 7px; margin-left: auto; }
.nav-link {
  cursor: pointer;
  border: 0;
  padding: 11px 13px;
  background: none;
  color: var(--muted);
  font-size: 13px;
}
.nav-link:hover, .nav-link.is-active { color: var(--paper); }
.nav-link.is-active { box-shadow: inset 0 -2px var(--gold); }
.install-button, .button {
  border: 1px solid var(--gold);
  border-radius: 7px;
  background: var(--gold);
  color: #171812;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.install-button { padding: 9px 13px; font-size: 12px; }
.button:hover, .install-button:hover { transform: translateY(-1px); background: #e6c17e; }
.button.secondary { background: transparent; border-color: var(--line); color: var(--paper); }
.button.secondary:hover { border-color: var(--gold); background: #ffffff0a; }
.button.danger { background: transparent; border-color: #70403a; color: #e99a8b; }
.button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.app-shell { max-width: 1320px; margin: 0 auto; padding: 42px clamp(18px, 5vw, 72px) 72px; }
.loading-state, .empty-state { color: var(--muted); padding: 40px 0; }
.eyebrow { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { font-size: clamp(38px, 6vw, 72px); line-height: 1.02; margin: 15px 0 18px; letter-spacing: -.035em; }
h2 { font-size: clamp(27px, 4vw, 42px); margin-bottom: 12px; }
h3 { font-size: 22px; margin-bottom: 9px; }
.lead { color: #c5c8be; max-width: 600px; line-height: 1.65; font-size: 16px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 42px 0 18px; }
.section-heading p { color: var(--muted); margin-bottom: 2px; font-size: 13px; }
.hero-banner {
  border: 1px solid #b5996136;
  border-radius: 15px;
  min-height: 320px;
  padding: clamp(28px, 5vw, 60px);
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.2fr) minmax(200px, .8fr);
  background:
    linear-gradient(90deg, #111512 0%, #111512ed 44%, #11151250 100%),
    url("./cardart/dragon.png") right center / auto 130% no-repeat,
    #1e241f;
  overflow: hidden;
}
.hero-banner h1 span { color: var(--gold); }
.hero-actions { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 27px; }
.hero-art-note { align-self: end; justify-self: end; color: #c8c9bf; font-size: 11px; text-transform: uppercase; letter-spacing: .11em; }
.step-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 23px; }
.step-card, .panel {
  border: 1px solid var(--line);
  background: #171c19de;
  border-radius: 10px;
}
.step-card { padding: 17px; display: flex; gap: 13px; align-items: center; }
.step-number { color: var(--gold); font: 24px var(--serif); }
.step-card strong { display: block; font-size: 13px; margin-bottom: 3px; }
.step-card span:last-child { color: var(--muted); font-size: 11px; }
.boss-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.boss-card {
  text-align: left;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.boss-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.boss-card.selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.boss-image { height: 178px; background-size: cover; background-position: center 30%; position: relative; }
.boss-image::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, var(--panel)); }
.boss-info { padding: 0 18px 18px; }
.boss-info h3 { margin: -1px 0 7px; }
.boss-info p { color: var(--muted); font-size: 12px; line-height: 1.5; min-height: 36px; margin-bottom: 15px; }
.boss-stats { display: flex; gap: 15px; color: var(--gold); font-size: 12px; font-weight: 700; }
.badge, .tag {
  display: inline-flex;
  border: 1px solid #ffffff20;
  border-radius: 99px;
  color: #c6c9bf;
  padding: 4px 9px;
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.boss-info .badge { margin-bottom: 11px; color: var(--gold); border-color: #d7ad6545; }
.tier-picker { margin: 20px 0 4px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tier-picker strong { display: block; margin-top: 7px; }
.tier-picker p { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.tier-picker select { min-width: 200px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-raised); color: var(--paper); padding: 11px 12px; }
.deck-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 25px; align-items: start; }
.deck-sidebar { position: sticky; top: 18px; }
.deck-meter { padding: 20px; margin-bottom: 13px; }
.meter-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.meter-count { font: 26px var(--serif); color: var(--gold); }
.progress-track { height: 5px; border-radius: 9px; background: #343b36; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--gold); transition: width .2s; }
.quota-list { margin-top: 16px; display: grid; gap: 8px; }
.quota-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.quota-row.complete { color: var(--green); }
.filter-stack { display: grid; gap: 6px; padding: 10px; }
.filter-label { padding: 9px 12px 4px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.filter-button {
  border: 0; background: none; border-radius: 6px; padding: 10px 12px; text-align: left;
  color: var(--muted); cursor: pointer; font-size: 12px;
}
.filter-button.active, .filter-button:hover { background: #ffffff0c; color: var(--paper); }
.filter-button span { float: right; color: var(--gold); }
.collection-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.search-box {
  background: var(--panel); border: 1px solid var(--line); color: var(--paper); border-radius: 7px;
  padding: 12px; min-width: 0; width: 100%;
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 12px; }
.game-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #1b201d;
  display: flex;
  flex-direction: column;
}
.game-card-art { height: 132px; background-size: cover; background-position: center 28%; position: relative; }
.game-card-art::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent,#1b201d); }
.game-card-content { padding: 0 12px 12px; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: var(--gold); font-size: 10px; margin-bottom: 7px; }
.game-card h3 { font: 16px var(--serif); line-height: 1.2; margin-bottom: 6px; }
.card-stats { color: var(--green); font-size: 11px; margin-bottom: 7px; }
.card-text { color: #b7bdb3; font-size: 11px; line-height: 1.45; margin-bottom: 11px; flex: 1; }
.card-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-controls .button { padding: 7px 10px; font-size: 11px; }
.quantity { color: var(--muted); font-size: 11px; }
.deck-notice { border-left: 2px solid var(--gold); color: var(--muted); padding: 4px 0 4px 12px; margin: 16px 0 0; font-size: 11px; line-height: 1.5; }
.battle-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.battle-head p { color: var(--muted); margin-bottom: 0; }
.siege-head { padding: 24px; border: 1px solid #51453b; border-radius: 10px; background: linear-gradient(90deg,#111512f2 0%,#111512d9 58%,#11151270),var(--siege-castle) center 44% / cover; }
.battle-board { display: grid; gap: 12px; }
.war-board { display: grid; gap: 12px; padding: 12px; border: 1px solid #51453b; border-radius: 10px; background: linear-gradient(180deg,#111512c9,#111512e8),var(--siege-battlefield) center / cover; }
.war-status { padding: 20px; }
.war-status-main { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.war-status h2 { margin: 8px 0 13px; }
.war-resource-stack { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }
.war-towers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 19px; }
.tower-card { min-height: 104px; padding: 12px; display: flex; flex-direction: column; justify-content: center; gap: 5px; border: 1px solid #856d45; border-radius: 8px; background: linear-gradient(90deg,#151714e8,#1517148c),var(--tower-art) center 38% / cover; color: var(--paper); text-align: left; text-shadow: 0 1px 3px #000; }
.tower-card span { color: var(--gold); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.tower-card strong { font: 16px var(--serif); }
.tower-card small { color: var(--muted); font-size: 10px; }
.tower-card.destroyed { border-color: var(--line); background: #131715; opacity: .55; }
.tower-card.destroyed strong { color: var(--muted); }
.king-card { grid-column: 1 / -1; min-height: 154px; border-color: #783e39; background: linear-gradient(90deg,#211917ed,#2119178c),var(--tower-art) center 32% / cover; }
.horde-panel, .partner-panel { padding: 16px; }
.horde-token-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-height: 48px; }
.horde-token { position: relative; width: 38px; height: 42px; overflow: hidden; border: 1px solid #85534a; border-radius: 50% 50% 7px 7px; background: #321f1e; }
.horde-token img { width: 100%; height: 100%; object-fit: cover; }
.horde-token b { position: absolute; right: 2px; bottom: 2px; min-width: 15px; padding: 1px 3px; border-radius: 99px; background: #111b; color: white; text-align: center; font-size: 9px; }
.horde-overflow { color: var(--red); font: 18px var(--serif); }
.partner-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.partner-card { min-height: 110px; padding: 10px; border: 1px solid #4b4540; border-radius: 7px; background: #211f1c; }
.partner-card img { float: left; width: 48px; height: 64px; margin: 0 8px 5px 0; border: 1px solid #62574b; border-radius: 4px; object-fit: cover; }
.partner-card span { display: block; color: var(--gold); font-size: 9px; text-transform: uppercase; }
.partner-card strong { display: block; margin: 6px 0 4px; font: 14px var(--serif); }
.partner-card small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.partner-health { clear: both; margin: 7px 0; }
.partner-health-label { display: flex; justify-content: space-between; margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.partner-health-label b { color: var(--text); font-weight: 600; }
.partner-health-track { height: 5px; overflow: hidden; border-radius: 99px; background: #51423d; }
.partner-health-track i { display: block; height: 100%; border-radius: inherit; background: #72a86c; transition: width .2s ease; }
.partner-health-track i.critical { background: var(--red); }
.war-player-side { margin-top: 5px; }
.war-player-side .hero-life-tracker { margin-top: 13px; }
.battle-top { display: grid; grid-template-columns: minmax(0,1fr) minmax(230px,.62fr); gap: 12px; }
.battle-panel { padding: 20px; }
.boss-battle { min-height: 205px; position: relative; overflow: hidden; }
.boss-battle::after { content: ""; position: absolute; inset: 0; z-index: 0; opacity: .26; background-image: var(--boss-art); background-position: right center; background-size: auto 150%; background-repeat: no-repeat; pointer-events: none; }
.boss-battle > * { position: relative; z-index: 1; }
.boss-battle h2 { margin: 10px 0 14px; }
.boss-health { display: flex; align-items: center; gap: 12px; }
.health-number { color: var(--red); font: 28px var(--serif); white-space: nowrap; }
.health-track { height: 8px; border-radius: 8px; flex: 1; max-width: 320px; background: #482c29; overflow: hidden; }
.health-track span { display: block; height: 100%; background: var(--red); }
.resource-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.resource-pill { border-radius: 6px; padding: 8px 10px; background: #ffffff0b; border: 1px solid #ffffff12; font-size: 12px; }
.resource-pill b { color: var(--gold); }
.hero-life-tracker { max-width: 480px; margin-top: 19px; padding: 12px 14px; border: 1px solid #d7756460; border-radius: 8px; background: #101311db; }
.hero-life-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: #e3c3b8; font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.hero-life-heading strong { color: var(--paper); font: 25px var(--serif); letter-spacing: 0; white-space: nowrap; }
.hero-life-heading small { color: var(--muted); font: 11px var(--sans); }
.hero-life-track { height: 9px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #482c29; }
.hero-life-track span { display: block; height: 100%; border-radius: inherit; background: #d77564; transition: width .25s ease; }
.hero-life-track span.critical { background: #ed5547; }
.hero-armor-label { margin-top: 7px; color: var(--muted); font-size: 10px; }
.hero-armor-label b { color: var(--gold); }
.intent-panel { display: flex; flex-direction: column; justify-content: space-between; }
.intent-panel .eyebrow { font-size: 10px; }
.intent-panel h3 { margin: 12px 0 6px; }
.intent-panel p { color: #c1c5bc; font-size: 12px; line-height: 1.5; margin-bottom: 0; }
.round-pill { color: var(--gold); font-size: 11px; }
.battlefield { display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 12px; }
.unit-zones { display: grid; gap: 12px; }
.zone { padding: 16px; }
.zone-title { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 11px; }
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.unit-slot {
  border: 1px dashed #465047;
  border-radius: 8px;
  min-height: 100px;
  padding: 11px;
  background: #ffffff04;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.unit-slot.filled { border-style: solid; border-color: #536249; background: #222b24; }
.slot-empty { color: #717a71; font-size: 11px; align-self: center; margin: auto; }
.unit-slot strong { font: 15px var(--serif); }
.unit-slot small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.unit-actions { display: flex; justify-content: space-between; gap: 5px; margin-top: 9px; }
.unit-actions button { border: 1px solid var(--line); border-radius: 5px; background: #ffffff08; padding: 5px 7px; font-size: 10px; cursor: pointer; }
.unit-actions button:hover { border-color: var(--gold); }
.hero-panel { padding: 16px; }
.hero-panel h3 { margin: 9px 0; }
.hero-panel p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.hero-controls { display: flex; gap: 7px; align-items: center; margin: 9px 0; }
.hero-controls button { padding: 4px 9px; }
.hand-section { margin-top: 22px; }
.hand-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.hand-header h3 { margin: 0; }
.hand-header span { color: var(--muted); font-size: 12px; }
.hand-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 10px; }
.battle-card .game-card-art { height: 100px; }
.battle-card .button { width: 100%; }
.log-panel { max-height: 260px; overflow: auto; }
.log-panel h3 { position: sticky; top: -20px; padding: 3px 0 10px; background: var(--panel); }
.log-list { display: grid; gap: 9px; }
.log-entry { border-top: 1px solid #ffffff12; padding-top: 8px; color: #b4bbb1; font-size: 10px; line-height: 1.5; }
.log-entry strong { color: var(--gold); font-weight: 600; }
.battle-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; }
.scene-line { border-top: 1px solid #ffffff16; margin-top: 15px; padding-top: 12px; color: #b8bdb4; font-size: 11px; line-height: 1.5; }
.modal-backdrop { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: #000a; }
.modal { width: min(520px,100%); max-height: min(80vh,700px); overflow: auto; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.modal h2 { font-size: 26px; }
.modal p { color: var(--muted); line-height: 1.6; font-size: 13px; }
.modal-options { display: grid; gap: 8px; margin-top: 15px; }
.modal-option { border: 1px solid var(--line); background: #ffffff06; border-radius: 7px; padding: 12px; text-align: left; cursor: pointer; }
.modal-option:hover { border-color: var(--gold); }
.modal-option small { display: block; color: var(--muted); margin-top: 4px; }
.learn-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 20px; }
.learn-card { padding: 19px; }
.learn-card p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.learn-icon { color: var(--gold); font: 24px var(--serif); margin-bottom: 12px; }
.rule-note { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 17px; }
.toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10; }
.toast { background: #e8dfcc; color: #171a16; border-radius: 7px; box-shadow: 0 5px 30px #0009; padding: 11px 16px; font-size: 12px; }
.end-screen { text-align: center; padding: 70px 20px; }
.end-screen p { color: var(--muted); }
.error-box { background: #3b211f; border: 1px solid #70403a; border-radius: 8px; padding: 16px; color: #f0b1a5; }

@media (max-width: 800px) {
  .topbar { gap: 10px; flex-wrap: wrap; padding: 12px 18px 0; }
  .brand { padding-bottom: 6px; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; margin: 0; }
  .nav-link { flex: 0 0 auto; padding-inline: 10px; white-space: nowrap; }
  .install-button { margin-left: auto; }
  .app-shell { padding-top: 25px; }
  .hero-banner { grid-template-columns: 1fr; min-height: 310px; background-position: right center; }
  .hero-art-note { display: none; }
  .boss-grid { grid-template-columns: 1fr; }
  .boss-card { display: grid; grid-template-columns: 38% 1fr; }
  .boss-image { height: 100%; min-height: 175px; }
  .boss-info { padding: 17px; }
  .boss-info h3 { font-size: 18px; }
  .boss-info p { min-height: 0; }
  .deck-layout { grid-template-columns: 1fr; }
  .deck-sidebar { position: static; }
  .deck-sidebar-inner { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
  .filter-stack { align-content: start; }
  .battle-top { grid-template-columns: 1fr; }
  .battlefield { grid-template-columns: 1fr; }
  .hero-panel { order: -1; }
  .partner-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .war-status-main { align-items: start; flex-direction: column; }
  .war-resource-stack { justify-content: start; }
}
@media (max-width: 520px) {
  .brand { font-size: 9px; }
  .brand-mark { font-size: 20px; }
  .nav-link { padding: 10px 5px; font-size: 11px; }
  .hero-banner { padding: 25px 20px; background-image: linear-gradient(90deg,#111512 0%,#111512df 62%,#11151285),url("./cardart/dragon.png"); background-size: cover; }
  .hero-banner h1 { font-size: 42px; }
  .step-strip { grid-template-columns: 1fr; }
  .step-card { padding: 12px; }
  .deck-sidebar-inner { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .game-card-art { height: 103px; }
  .game-card-content { padding: 0 9px 9px; }
  .game-card h3 { font-size: 14px; }
  .card-text { font-size: 10px; }
  .battle-head { align-items: start; flex-direction: column; }
  .slot-grid { gap: 5px; }
  .unit-slot { padding: 8px; min-height: 91px; }
  .unit-slot strong { font-size: 12px; }
  .unit-actions { flex-direction: column; }
  .hand-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .learn-grid { grid-template-columns: 1fr; }
  .tier-picker { align-items: stretch; flex-direction: column; }
  .tier-picker select { min-width: 0; width: 100%; }
  .war-towers { grid-template-columns: 1fr; }
  .king-card { grid-column: auto; }
  .partner-grid { grid-template-columns: 1fr 1fr; }
}

/* Deck list sidebar */
.deck-list-panel { max-height: 280px; overflow: hidden; display: flex; flex-direction: column; }
.deck-list { overflow-y: auto; max-height: 220px; display: flex; flex-direction: column; gap: 4px; }
.deck-list-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 7px; border-radius: 6px; background: #ffffff08; border: 1px solid var(--line); }
.deck-list-name { font-size: 11px; line-height: 1.3; flex: 1; min-width: 0; }
.deck-list-name small { color: var(--muted); }
.deck-list-btn { border: 1px solid var(--line); background: #ffffff0c; color: var(--paper); border-radius: 5px; width: 28px; height: 28px; cursor: pointer; font-size: 14px; flex-shrink: 0; }
.deck-list-btn:hover { border-color: var(--gold); color: var(--gold); }
.quota-row.over { color: #e99a8b; }
.game-card.in-deck { outline: 1px solid #c9a22766; }
.card-control-btns { display: flex; gap: 6px; }

/* Sticky battle status strip */
.status-strip {
  position: sticky; top: 0; z-index: 4;
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 10px; margin: 0 0 12px;
  background: #0e120fd9; border: 1px solid var(--line); border-radius: 10px;
  backdrop-filter: blur(8px);
}
.status-chip {
  display: flex; flex-direction: column; gap: 1px;
  padding: 5px 9px; border-radius: 7px;
  background: #ffffff0a; border: 1px solid #ffffff10;
  min-width: 64px;
}
.status-chip .status-label { font-size: 9px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.status-chip strong { font-size: 14px; font-weight: 600; color: var(--paper); }
.status-chip.boss strong { color: #e99a8b; }
.status-chip.hero strong { color: #8fd4a0; }
.status-chip.jewel strong { color: #7ec8e3; }
.status-chip.soul strong { color: #c9a0e3; }
.critical-text { color: #ff6b5a !important; }
.charge-pill { border-color: #c9a227 !important; color: var(--gold); }
.jewel-pill b { color: #7ec8e3; }
.soul-pill b { color: #c9a0e3; }

/* Clearer unit slots */
.unit-slot.filled { border-color: #ffffff22; background: #ffffff0a; }
.unit-slot small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.zone-title { font-weight: 600; }
.log-panel .log-list { max-height: 220px; overflow-y: auto; }
.log-entry { font-size: 12px; line-height: 1.45; padding: 4px 0; border-bottom: 1px solid #ffffff08; }

/* ---- Siege additions (Knights vs Warlords) ---- */
.hero-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hero-col h2 { margin: 2px 0 6px; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 8px; margin-top: 10px; }
.hero-card { text-align: left; background: #ffffff06; border: 1px solid var(--line); border-radius: 8px; padding: 10px; color: var(--paper); cursor: pointer; font: inherit; }
.hero-card:hover { border-color: var(--gold); }
.hero-card.is-chosen { border-color: var(--gold); background: #e0b84a14; }
.hero-cmd { display: grid; gap: 3px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.lane-block h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; }
.unit-row { display: flex; flex-wrap: wrap; gap: 8px; min-height: 64px; }
.unit-tile { width: 130px; text-align: left; background: #11151bcc; border: 1px solid var(--line); border-radius: 8px; padding: 7px; color: var(--paper); font: inherit; cursor: default; }
.unit-tile.mine:not([disabled]) { cursor: pointer; border-color: #7cb87a; }
.unit-tile.mine:not([disabled]):hover { border-color: var(--gold); }
.unit-tile.enemy { border-color: #70403a; }
.unit-tile.taunt { outline: 2px dashed var(--gold); }
.unit-tile.done { opacity: .55; }
.unit-tile b { display: block; font-size: 12px; }
.unit-tile span { font-size: 12px; color: var(--green); }
.unit-tile small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.kw-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.kw-chip { font-size: 9px; letter-spacing: .04em; padding: 2px 5px; border-radius: 4px; background: #e0b84a22; color: var(--gold); }
.tower { display: inline-flex; flex-direction: column; align-items: center; min-width: 60px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; margin-right: 4px; font-size: 10px; color: var(--muted); }
.tower b { font-size: 16px; color: var(--paper); }
.tower.down { opacity: .4; text-decoration: line-through; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.actions .small { font-size: 11px; }
.hand-card { width: 190px; text-align: left; background: #11151b; border: 1px solid var(--line); border-radius: 8px; padding: 8px; color: var(--paper); font: inherit; cursor: pointer; }
.hand-card:hover { border-color: var(--gold); }
.hand-card.unaffordable { opacity: .55; }
.hand-card b { display: block; font-size: 12px; }
.hand-card span, .hand-card small { display: block; font-size: 10px; color: var(--muted); }
.hand-card p { font-size: 10px; line-height: 1.4; color: #b7bdb3; margin: 6px 0 0; }
.deck-card h3 { font-size: 14px; margin: 6px 0 2px; }
.hand-grid { gap: 8px; }
@media (max-width: 760px) { .hero-cols { grid-template-columns: 1fr; } }
.mode-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.side-pick { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; margin-left: 8px; }
