/**
 * css/style.css — Sunlit Botanical Woodland Tabletop Stylesheet (`modern_tactical_bright`)
 * Bramblepack: Wild Tactics (Track B v1.0)
 *
 * STRICT INVARIANTS:
 *   - Locked Palette: #2D5B54, #285657, #C48B4D, #6D8059, #8CC591, #966338, #552E18, #EBDCA6, #22211B, #14121F
 *   - Exact 9-Slice `border-image` on `frame_panel.png` and `btn_primary.png` (ZERO stretched raster chrome!)
 *   - ZERO `backdrop-filter: blur(...)` anywhere!
 *   - `overflow: visible !important; position: relative;` on buttons so `.notify-badge` NEVER clips!
 *   - 9-Language overflow-safe flexible grids (`minmax(0, 1fr)`) & crisp WCAG AA+ contrast (`#14121F` on parchment/gold)
 */

:root {
  --wood-teal: #2D5B54;
  --wood-teal-deep: #285657;
  --wood-amber: #C48B4D;
  --wood-sage: #6D8059;
  --wood-mint: #8CC591;
  --wood-oak: #966338;
  --wood-bark: #552E18;
  --parchment: #EBDCA6;
  --parchment-bright: #F9EAC7;
  --parchment-cream: #FFF9E6;
  --ink-dark: #14121F;
  --ink-comic: #22211B;
  --stone-taupe: #786455;
  --font-display: 'Lilita One', 'Bangers', 'Segoe UI Black', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--wood-teal-deep);
  color: var(--ink-dark);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

[hidden] {
  display: none !important;
}

#app-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--wood-teal-deep);
}

#modal-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}

#modal-root > * {
  pointer-events: auto;
}

#modal-root > .is-closing,
#modal-root > .is-closing *,
.bp-modal-backdrop.is-closing,
.bp-modal-backdrop.is-closing *,
.bp-exit-backdrop.is-closing,
.bp-exit-backdrop.is-closing * {
  pointer-events: none !important;
}

.bp-behind-modal,
.bp-behind-modal * {
  pointer-events: none !important;
}

#ui-motion-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 155;
  display: none;
}

/* -------------------------------------------------------------------------
 * 9-Slice Painted Game Chrome (Exact `art_manifest.json` Slices — Zero Stretch!)
 * ------------------------------------------------------------------------- */
.frame-panel-9s {
  box-sizing: border-box;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 20px 22px 20px 22px;
  border-image: url('../assets/ui/frame_panel.png') 139 151 140 151 fill / 20px 22px 20px 22px / 0 stretch;
  color: var(--ink-dark);
  filter: drop-shadow(0 6px 14px rgba(18, 16, 24, 0.36));
}

.btn-primary-9s {
  position: relative;
  overflow: visible !important;
  box-sizing: border-box;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-width: 15px 14px 26px 14px;
  border-image: url('../assets/ui/btn_primary.png') 85 61 165 63 fill / 15px 14px 26px 14px / 0 stretch;
  color: var(--ink-dark);
  font-family: var(--font-display);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 0 rgba(20, 18, 31, 0.45));
}

.btn-primary-9s:disabled:not([data-bp-modal-disabled="1"]) {
  opacity: 0.62;
  cursor: default;
  filter: grayscale(0.35);
}

.btn-primary-text {
  display: block;
  color: #14121F;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(255, 249, 230, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Notification Red-Dot Badge (NEVER Clipped!) */
.notify-badge {
  position: absolute;
  top: -7px;
  right: -2px;
  z-index: 30;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #DC2626;
  border: 2px solid #FFF9E6;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 11px;
  line-height: 15px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}

button {
  overflow: visible !important;
  position: relative;
  font-family: inherit;
}

.btn-label {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.22;
}

/* -------------------------------------------------------------------------
 * 1. Real 0-100% Boot Asset Loader
 * ------------------------------------------------------------------------- */
#boot-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background:
    linear-gradient(180deg, rgba(40, 86, 87, 0.45) 0%, rgba(28, 27, 41, 0.65) 100%),
    url('../assets/art/title_bg.png') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.boot-card {
  width: min(460px, 92vw);
  border-width: 30px 34px 30px 34px;
  border-image-width: 30px 34px 30px 34px;
  text-align: center;
  padding: 8px 12px;
}

.boot-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--wood-bark);
  margin-bottom: 4px;
}

.boot-logo {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 46px);
  letter-spacing: 0.03em;
  color: #FFF9E6;
  -webkit-text-stroke: 2.2px #1C1B29;
  text-shadow: 0 4px 0 #1C1B29;
}

.boot-sub {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--wood-teal-deep);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.boot-track {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: #D8C794;
  border: 2.5px solid var(--ink-comic);
  overflow: hidden;
  padding: 2px;
}

.boot-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #458F4B 0%, #8CC591 100%);
  transition: width 140ms ease-out;
}

.boot-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-comic);
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------------
 * 2. Title Screen (`#screen-title`)
 * ------------------------------------------------------------------------- */
.screen-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#screen-title {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 28% 52%, rgba(255, 249, 230, 0.14) 0%, rgba(20, 18, 31, 0.44) 100%),
    url('../assets/art/title_bg.png') center center / cover no-repeat;
  padding: 16px 24px 22px;
}

.title-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 5;
}

.title-currency-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--parchment-cream);
  border: 2.5px solid var(--ink-comic);
  box-shadow: 0 3px 0 var(--ink-comic);
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink-dark);
  font-variant-numeric: tabular-nums;
}

.title-currency-pill img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.title-util-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wood-pill-btn {
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 11px;
  background: var(--parchment);
  border: 2.5px solid var(--ink-comic);
  box-shadow: 0 3px 0 var(--ink-comic);
  color: var(--ink-dark);
  font-family: var(--font-display);
  font-size: clamp(12px, 1.05vw, 15px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.wood-pill-btn--warn {
  background: #F4CBB8;
  color: #4A1912;
}

.title-center-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 44%) minmax(340px, 480px);
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 44px);
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.title-hero-column {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
}

.title-portrait-host {
  position: relative;
  width: min(400px, 36vw);
  height: min(400px, 56vh);
  display: flex;
  align-items: center;
  justify-content: center;
}

.title-portrait-host img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(20, 18, 31, 0.55));
}

.title-command-card {
  border-width: 32px 36px 32px 36px;
  border-image-width: 32px 36px 32px 36px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 4px 8px 6px;
}

.title-emblem-wrap {
  text-align: center;
}

.hero-main-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 48px);
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: #FFF9E6;
  -webkit-text-stroke: 2.2px #1C1B29;
  text-shadow: 0 4.5px 0 #1C1B29;
}

.hero-sub-banner {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--wood-teal);
  border: 2px solid var(--ink-comic);
  color: #FFF9E6;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.03em;
}

.title-stats-strip {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--wood-bark);
  background: rgba(150, 99, 56, 0.14);
  border: 1.5px solid rgba(85, 46, 24, 0.28);
  border-radius: 10px;
  padding: 6px 10px;
  font-variant-numeric: tabular-nums;
}

.season-selector-btn {
  width: 100%;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 11px;
  background: var(--parchment-cream);
  border: 2px solid var(--wood-oak);
  color: var(--ink-dark);
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.season-selector-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.title-play-cta {
  width: 100%;
  min-height: 68px;
  border-width: 18px 16px 32px 16px;
  border-image-width: 18px 16px 32px 16px;
}

.title-play-cta .btn-primary-text {
  font-size: clamp(20px, 2.2vw, 28px);
}

.title-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.title-meta-grid > * {
  min-width: 0;
  max-width: 100%;
}

.meta-tile-btn {
  min-height: 46px;
  padding: 6px 8px;
  border-radius: 11px;
  background: var(--parchment);
  border: 2.5px solid var(--ink-comic);
  box-shadow: 0 3px 0 var(--ink-comic);
  color: var(--ink-dark);
  font-family: var(--font-display);
  font-size: clamp(11px, 1vw, 14px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.meta-tile-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------
 * 3. Unified 16:9 Command Tabletop (`#screen-game` — 100% Width)
 * ------------------------------------------------------------------------- */
#screen-game {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #214546 0%, #285657 50%, #1F3D39 100%);
}

#topbar-hud {
  flex: 0 0 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(180deg, #552E18 0%, #3E2110 100%);
  border-bottom: 3px solid var(--ink-comic);
  z-index: 15;
}

.hud-left-cluster,
.hud-right-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.hud-chip {
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--parchment-cream);
  border: 2px solid var(--ink-comic);
  color: var(--ink-dark);
  font-family: var(--font-display);
  font-size: clamp(12px, 1vw, 14px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hud-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.hud-chip--round {
  background: var(--wood-amber);
  color: #14121F;
}

.hud-chip--round.is-boss {
  background: #FDE047;
  color: #14121F;
}

.hud-chip--season {
  background: var(--wood-teal);
  color: #FFF9E6;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  padding: 0 11px;
}

.heart-glyph {
  color: #DC2626;
  font-size: 16px;
  line-height: 1;
}

.hud-nav-btn {
  min-height: 34px;
  padding: 4px 9px;
  border-radius: 9px;
  background: var(--parchment);
  border: 2px solid var(--ink-comic);
  box-shadow: 0 2px 0 var(--ink-comic);
  color: var(--ink-dark);
  font-family: var(--font-display);
  font-size: clamp(11px, 0.92vw, 13px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.hud-nav-btn img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  flex-shrink: 0;
}

.hud-nav-btn--speed {
  background: #D9F99D;
  color: #14121F;
  min-width: 54px;
}

.hud-nav-btn--warn {
  background: #F4CBB8;
  color: #4A1912;
}

/* 3-Column Grid: 22% Left | 56% Center | 22% Right */
#tabletop-main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 22% 56% 22%;
  padding: 6px 8px 8px;
  gap: 0;
}

.tabletop-col {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#col-left {
  padding-right: 6px;
}

#col-right {
  padding-left: 6px;
}

.woodland-box {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 2px;
}

.box-synergy {
  flex: 1.25 1 0;
}

.box-fallen {
  flex: 0.75 1 0;
}

.box-scout {
  flex: 0.95 1 0;
}

.box-log {
  flex: 1.05 1 0;
}

.panel-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
  flex-shrink: 0;
}

.panel-heading {
  margin: 0 0 5px;
  font-family: var(--font-display);
  font-size: clamp(13px, 1.1vw, 16px);
  color: var(--wood-bark);
  letter-spacing: 0.02em;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-heading-row .panel-heading {
  margin-bottom: 0;
}

.mini-count-chip {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--wood-bark);
  color: #FFF9E6;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.boss-alert-chip {
  padding: 2px 7px;
  border-radius: 6px;
  background: #DC2626;
  color: #FFF9E6;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* Left Column: Synergy Ladder & Fallen Pack */
.synergy-ladder-scroll,
.fallen-scroll,
.combat-log-scroll,
.scout-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.synergy-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  margin-bottom: 5px;
  border-radius: 10px;
  background: rgba(255, 249, 230, 0.78);
  border: 1.5px solid rgba(150, 99, 56, 0.45);
  transition: transform 160ms ease, background 160ms ease;
}

.synergy-row.tier-1 {
  background: #FFF9E6;
  border-color: var(--wood-teal);
  border-width: 2px;
}

.synergy-row.tier-2 {
  background: #FFFBEB;
  border-color: #B45309;
  border-width: 2px;
}

.synergy-row.is-pulsing {
  transform: scale(1.05);
}

.syn-thumb {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  border: 1.5px solid var(--ink-comic);
  background: var(--parchment);
  flex-shrink: 0;
}

.syn-info {
  flex: 1 1 auto;
  min-width: 0;
}

.syn-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.syn-name {
  font-family: var(--font-display);
  font-size: 12.5px;
  color: var(--ink-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.syn-pips {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
  color: var(--wood-bark);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.syn-summary {
  font-size: 10.5px;
  font-weight: 700;
  color: #3A3D36;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
}

.fallen-empty-note {
  font-size: 12px;
  font-weight: 700;
  color: #5C5346;
  padding: 6px 4px;
}

.fallen-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 6px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: rgba(120, 100, 85, 0.16);
  border: 1px solid rgba(85, 46, 24, 0.28);
}

.fallen-item img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: contain;
  filter: grayscale(0.9);
  background: #D9CDB2;
  border: 1px solid #552E18;
  flex-shrink: 0;
  margin-top: 1px;
}

.fallen-meta {
  min-width: 0;
  flex: 1;
}

.fallen-name {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-dark);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
  line-height: 1.18;
}

.fallen-sub {
  font-size: 10px;
  font-weight: 700;
  color: #5C5346;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: break-word;
  line-height: 1.18;
}

/* Center Column: 64% Arena Stage + 36% 5-Card Draft Tray (extra arena breathing room) */
#arena-stage {
  position: relative;
  flex: 0 0 calc(64% - 3px);
  height: calc(64% - 3px);
  min-height: 0;
  border-radius: 14px;
  border: 3px solid var(--ink-comic);
  overflow: hidden;
  background: #285657;
  box-shadow: 0 4px 12px rgba(14, 12, 22, 0.38);
}

#arena-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#arena-canvas:active {
  cursor: grabbing;
}

#vfx3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

#cutin-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9;
  cursor: pointer;
}

/* Non-Blocking Tutorial Callout */
.tutorial-callout {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  width: min(560px, 94%);
  padding: 7px 11px;
  border-radius: 12px;
  background: #FFF9E6;
  border: 2.5px solid var(--wood-bark);
  box-shadow: 0 6px 16px rgba(20, 18, 31, 0.38);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: auto;
}

.tutorial-callout-text {
  min-width: 0;
  flex: 1;
}

.tutorial-callout-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--wood-teal-deep);
}

.tutorial-callout-text p {
  margin: 2px 0 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-comic);
  line-height: 1.3;
}

.tutorial-callout-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.tutorial-mini-btn {
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 8px;
  border: 2px solid var(--ink-comic);
  background: var(--parchment);
  color: var(--ink-dark);
  font-family: var(--font-display);
  font-size: 11px;
  cursor: pointer;
}

.tutorial-mini-btn--primary {
  background: #4FA35D;
  color: #FFF9E6;
}

/* Selected Pack Unit Reorder Pill */
.pack-sel-bar {
  position: absolute;
  bottom: 8px;
  left: 10px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 249, 230, 0.94);
  border: 2px solid var(--wood-bark);
  color: var(--ink-dark);
  font-size: 12px;
  font-weight: 800;
}

.pack-sel-btns {
  display: inline-flex;
  gap: 4px;
}

.sel-micro-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1.5px solid var(--ink-comic);
  background: var(--parchment);
  color: var(--ink-dark);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Bottom 5-Card Draft Tray (36% height) */
#draft-tray {
  flex: 0 0 calc(36% - 3px);
  height: calc(36% - 3px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-width: 16px 18px 16px 18px;
  border-image-width: 16px 18px 16px 18px;
}

.draft-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
}

.draft-economy-group,
.draft-cta-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.gold-purse-pill {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #FFFBEB;
  border: 2px solid var(--wood-oak);
  color: var(--ink-dark);
  font-family: var(--font-display);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.gold-purse-pill img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.pack-cap-pill {
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(45, 91, 84, 0.14);
  border: 1.5px solid rgba(45, 91, 84, 0.4);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--wood-teal-deep);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stipend-pill {
  padding: 3px 8px;
  border-radius: 8px;
  background: #DCFCE7;
  border: 1.5px solid #15803D;
  font-size: 11px;
  font-weight: 800;
  color: #14532D;
  white-space: nowrap;
}

.draft-hint-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--wood-bark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 140ms ease;
}

.draft-hint-label.is-battle-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.tray-action-btn {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 9px;
  border: 2px solid var(--ink-comic);
  box-shadow: 0 2px 0 var(--ink-comic);
  background: var(--parchment);
  color: var(--ink-dark);
  font-family: var(--font-display);
  font-size: clamp(11px, 0.92vw, 13px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.tray-action-btn img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex-shrink: 0;
}

.tray-action-btn--reroll {
  background: #FDE68A;
}

.tray-action-btn--sell {
  background: #FECACA;
  color: #450A0A;
}

.tray-action-btn:disabled:not([data-bp-modal-disabled="1"]) {
  opacity: 0.52;
  cursor: default;
  box-shadow: none;
}

.fight-cta-btn {
  min-width: 96px;
  min-height: 36px;
  padding: 0 8px;
  border-width: 9px 11px 15px 11px;
  border-image-width: 9px 11px 15px 11px;
}

.fight-cta-btn .btn-primary-text {
  font-size: clamp(13px, 1.15vw, 16px);
}

/* 5-Card Horizontal Draft Grid */
.draft-cards-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.draft-cards-grid > * {
  min-width: 0;
  max-width: 100%;
}

.draft-card {
  position: relative;
  height: 100%;
  min-height: 0;
  border-radius: 10px;
  background: #FFF9E6;
  border: 2px solid var(--wood-oak);
  box-shadow: 0 3px 0 rgba(34, 33, 27, 0.3);
  padding: 4px 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease;
}

.draft-card:hover:not(.is-purchased):not(.is-unaffordable) {
  transform: translateY(-3px);
  border-color: var(--wood-teal-deep);
}

.draft-card.rarity-rare {
  border-color: #2E7899;
}

.draft-card.rarity-epic {
  border-color: #7C3AED;
}

.draft-card.is-seasonal {
  background: linear-gradient(180deg, #FFFDF2 0%, #FDE68A 100%);
  border-color: #B45309;
}

.draft-card.is-purchased {
  opacity: 0.36;
  cursor: default;
  pointer-events: none;
}

.draft-card.is-battle-locked {
  opacity: 0.64;
  cursor: default;
  pointer-events: none;
}

.draft-card.is-unaffordable {
  opacity: 0.72;
}

.dc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 800;
}

.dc-hotkey {
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(85, 46, 24, 0.14);
  color: var(--wood-bark);
  font-variant-numeric: tabular-nums;
}

.dc-cost {
  padding: 1px 6px;
  border-radius: 999px;
  background: #FACC15;
  border: 1.5px solid var(--ink-comic);
  color: #14121F;
  font-family: var(--font-display);
  font-size: 11px;
}

.dc-art-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dc-art-wrap img {
  max-width: 100%;
  max-height: 100%;
  height: clamp(38px, 6.8vh, 66px);
  object-fit: contain;
}

.dc-syn-up {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 1px 5px;
  border-radius: 6px;
  background: #15803D;
  color: #FFF9E6;
  font-size: 9.5px;
  font-weight: 800;
}

.dc-name {
  font-family: var(--font-display);
  font-size: clamp(10px, 0.84vw, 12px);
  color: var(--ink-dark);
  text-align: center;
  white-space: normal;
  line-height: 1.12;
}

/* Season 2–4 Arena Tactical Strip, Mythic Frames & Alpha Foil Borders */
.arena-tactical-strip {
  position: absolute;
  bottom: 8px;
  right: 10px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.forecast-badge {
  padding: 4px 9px;
  border-radius: 999px;
  border: 2px solid var(--ink-comic);
  background: #FFF9E6;
  color: var(--ink-dark);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.forecast-badge--favored {
  background: #DCFCE7;
  border-color: #15803D;
  color: #14532D;
}

.forecast-badge--danger {
  background: #FEE2E2;
  border-color: #B91C1C;
  color: #7F1D1D;
}

.totem-hud-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.totem-hud-chip {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #FFF9E6;
  border: 1.5px solid var(--wood-bark);
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.totem-hud-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.leader-ult-btn {
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 2px solid var(--ink-comic);
  background: #D6D3D1;
  color: var(--ink-dark);
  font-family: var(--font-display);
  font-size: 11px;
  cursor: pointer;
}

.leader-ult-btn.is-armed {
  background: linear-gradient(90deg, #FDE047 0%, #F59E0B 100%);
  color: #14121F;
  box-shadow: 0 2px 0 var(--ink-comic);
}

.sel-micro-btn--undo {
  background: #FDE68A;
  width: 28px;
}

.draft-card.frame-alpha_solar_foil {
  border-color: #D97706;
  background: linear-gradient(155deg, #FFFDF5 0%, #FEF08A 52%, #FDE68A 100%);
}

.draft-card.frame-alpine_frost_rim {
  border-color: #0284C7;
  background: linear-gradient(155deg, #F0F9FF 0%, #E0F2FE 65%, #BAE6FD 100%);
}

.draft-card.frame-mythic_storybook {
  border-color: #B45309;
  border-width: 2.5px;
  background: linear-gradient(155deg, #FFFBEB 0%, #FEF3C7 55%, #FDE047 100%);
}

.hybrid-syn-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 7px;
  margin-bottom: 5px;
  border-radius: 8px;
  background: #FEF3C7;
  border: 1.5px solid #D97706;
  font-size: 10.5px;
  font-weight: 800;
  color: #14121F;
}

.dc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  margin-top: 2px;
}

.dc-stat {
  padding: 1px 5px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  color: #FFFFFF;
  border: 1.5px solid var(--ink-comic);
  font-variant-numeric: tabular-nums;
}

.dc-stat--atk {
  background: #D97706;
}

.dc-stat--hp {
  background: #DC2626;
}

.dc-tribes {
  flex: 0 0 auto;
  min-width: 0;
  text-align: center;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--wood-teal-deep);
  white-space: normal;
  line-height: 1.12;
}

/* Right Column: Next Rival Scout + Combat Log + Guided Tips */
.scout-rival-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  color: var(--wood-teal-deep);
  margin-bottom: 5px;
}

.scout-lineup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.scout-unit-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 5px;
  border-radius: 8px;
  background: #FFF9E6;
  border: 1.5px solid rgba(150, 99, 56, 0.45);
  min-width: 0;
}

.scout-unit-chip.is-boss {
  border-color: #DC2626;
  background: #FEF2F2;
}

.scout-unit-chip img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--parchment);
  flex-shrink: 0;
}

.scout-unit-meta {
  min-width: 0;
  flex: 1;
}

.scout-unit-name {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-dark);
  white-space: normal;
  line-height: 1.15;
}

.scout-unit-stats {
  font-size: 10px;
  font-weight: 800;
  color: var(--wood-bark);
  font-variant-numeric: tabular-nums;
}

.tips-drawer {
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: #FFFBEB;
  border: 1.5px solid var(--wood-amber);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-comic);
  line-height: 1.35;
  max-height: 120px;
  overflow-y: auto;
}

.tips-drawer p {
  margin: 0 0 4px;
}

.tips-drawer p:last-child {
  margin-bottom: 0;
}

.log-entry {
  padding: 4px 6px;
  margin-bottom: 4px;
  border-radius: 7px;
  background: rgba(255, 249, 230, 0.72);
  border-left: 3px solid var(--wood-oak);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-comic);
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.log-entry--clash {
  border-left-color: #D97706;
}

.log-entry--synergy {
  border-left-color: #2D5B54;
  background: #ECFDF5;
}

.log-entry--death {
  border-left-color: #DC2626;
  background: #FEF2F2;
}

.log-entry--boss {
  border-left-color: #B45309;
  background: #FEF3C7;
}

/* Responsive Compact Window Guardrails (1280x720 & Split-Screen) */
@media (max-height: 760px) {
  #topbar-hud {
    flex: 0 0 44px;
    height: 44px;
  }
  .hud-chip,
  .hud-nav-btn {
    min-height: 30px;
    height: 30px;
    padding: 0 7px;
    font-size: 11px;
  }
  .frame-panel-9s {
    border-width: 14px 16px 14px 16px;
    border-image-width: 14px 16px 14px 16px;
  }
  #draft-tray {
    border-width: 12px 14px 12px 14px;
    border-image-width: 12px 14px 12px 14px;
  }
  .synergy-row {
    padding: 3px 5px;
    margin-bottom: 3px;
  }
  .syn-thumb {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 1180px) {
  .draft-hint-label {
    display: none;
  }
  .hud-chip--season {
    display: none;
  }
}
