/* ==========================================================================
   BlockbusterBattles — Horizontal Full-Screen SAP Design System (styles.css)
   One unified widescreen layout across Laptop + Landscape Phone (100dvh, zero scroll)
   ========================================================================== */

:root {
  --bg-deep: #090e1a;
  --bg-stage: #111827;
  --bg-surface: #1b2436;
  --bg-surface-2: #243047;
  --border-subtle: rgba(148, 163, 184, 0.22);
  --border-strong: rgba(148, 163, 184, 0.42);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --gold: #f59e0b;
  --gold-bright: #fbbf24;
  --gold-soft: rgba(245, 158, 11, 0.18);
  --crimson: #e11d48;
  --crimson-soft: rgba(225, 29, 72, 0.2);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.2);
  --sky: #38bdf8;
  --sky-soft: rgba(56, 189, 248, 0.18);

  --touch-min: 44px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.38);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, #1a2442 0%, var(--bg-deep) 72%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  touch-action: manipulation;
}

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  touch-action: manipulation;
  user-select: none;
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   FULL-SCREEN WIDESCREEN APP SHELL (Same Look on Laptop & Landscape Phone)
   ========================================================================== */
.app-shell {
  width: 100%;
  max-width: 1360px;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96) 0%, rgba(9, 14, 26, 0.99) 100%);
  box-shadow: 0 0 48px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.screen {
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ==========================================================================
   SHARED BUTTONS & BADGES
   ========================================================================== */
.btn {
  min-height: var(--touch-min);
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: clamp(0.78rem, 1.3vw, 0.95rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn--primary {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  color: #111827;
  box-shadow: 0 3px 0 #92400e, 0 4px 14px rgba(245, 158, 11, 0.28);
}

.btn--secondary {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.btn--danger {
  background: var(--crimson);
  color: #ffffff;
  box-shadow: 0 2px 0 #9f1239;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn--sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.icon-btn {
  min-width: 38px;
  min-height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.98rem;
}

.pack-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-bright);
  border: 1px solid rgba(251, 191, 36, 0.38);
  white-space: nowrap;
}

/* ==========================================================================
   TOP HUD BAR (Single Compact Row)
   ========================================================================== */
.hud-bar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: calc(6px + var(--safe-top)) calc(12px + var(--safe-right)) 6px calc(12px + var(--safe-left));
  background: rgba(11, 17, 32, 0.96);
  border-bottom: 1px solid var(--border-subtle);
}

.hud-stats {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: clamp(0.76rem, 1.25vw, 0.9rem);
  font-weight: 800;
  white-space: nowrap;
}

.hud-pill--gold { border-color: rgba(245, 158, 11, 0.5); color: var(--gold-bright); }
.hud-pill--hearts { border-color: rgba(225, 29, 72, 0.5); color: #fda4af; }
.hud-pill--trophies { border-color: rgba(16, 185, 129, 0.5); color: #6ee7b7; }
.hud-pill--turn { color: var(--text-secondary); }
.hud-label { font-size: 0.66rem; color: var(--text-muted); }

.selection-banner {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #e0f2fe;
  font-size: clamp(0.7rem, 1.1vw, 0.84rem);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selection-banner.is-active {
  background: var(--gold-soft);
  border-color: rgba(251, 191, 36, 0.6);
  color: #fef3c7;
}

.btn-inline-cancel {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   FULL-SCREEN 2-ROW PLAYFIELD (Board Top + Horizontal 5+2 Shop Bottom)
   ========================================================================== */
.shop-main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1.18fr) minmax(0, 1fr);
  gap: clamp(6px, 1.2vh, 12px);
  padding: clamp(6px, 1vh, 10px) calc(12px + var(--safe-right)) clamp(6px, 1vh, 10px) calc(12px + var(--safe-left));
  overflow: hidden;
}

.board-section,
.shop-section {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(6px, 1vh, 10px) clamp(8px, 1vw, 12px);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.zone-header {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: clamp(4px, 0.8vh, 8px);
}

.zone-title {
  margin: 0;
  font-size: clamp(0.68rem, 1.05vw, 0.82rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.zone-meta {
  font-size: clamp(0.62rem, 0.95vw, 0.75rem);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ROW 1: 5 STUDIO LANES */
.lanes-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 12px);
}

.lane-col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lane-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.lane-name {
  font-size: clamp(0.58rem, 0.95vw, 0.76rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lane-dir {
  font-size: clamp(0.54rem, 0.85vw, 0.68rem);
  font-weight: 800;
  color: var(--gold-bright);
  white-space: nowrap;
}

.lane-card-slot {
  flex: 1;
  min-height: 0;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border-strong);
  background: rgba(27, 36, 54, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.lane-card-slot.has-movie {
  border-style: solid;
  border-color: transparent;
  padding: 0;
}

.slot-plus { font-size: 1.4rem; line-height: 1; color: var(--text-muted); }
.slot-hint { font-size: 0.68rem; color: var(--text-muted); }

/* Compact Combined Footer per Lane: Active Stat + Bolted Trap Socket side-by-side */
.lane-footer-row {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 4px;
  height: clamp(28px, 4.2vh, 36px);
}

.lane-stat-bar {
  height: 100%;
  padding: 0 5px;
  border-radius: 6px;
  background: #0b1325;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: clamp(0.66rem, 1.05vw, 0.86rem);
  font-weight: 800;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lane-stat-bar.is-buffed {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.5);
}

.lane-trap-socket {
  height: 100%;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px dashed rgba(225, 29, 72, 0.42);
  color: var(--text-muted);
  font-size: clamp(0.56rem, 0.85vw, 0.7rem);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.lane-trap-socket.has-trap {
  border-style: solid;
  border-color: rgba(225, 29, 72, 0.78);
  background: var(--crimson-soft);
  color: #fecdd3;
}

.trap-socket-icon { font-size: 0.82rem; flex-shrink: 0; line-height: 1; }
.trap-socket-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ROW 2: HORIZONTAL SAP SHOP TRAY (5 Movies Left | Divider | 2 Items Right) */
.shop-tray-row {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) 1px minmax(0, 2.2fr);
  gap: clamp(6px, 1vw, 12px);
  align-items: stretch;
}

.shop-divider {
  background: var(--border-subtle);
  margin: 4px 0;
}

.shop-movies-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(5px, 0.85vw, 10px);
}

.shop-movie-btn {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 8px;
  padding: 0;
  display: block;
  position: relative;
}

.shop-movie-btn.is-empty {
  border: 1px dashed var(--border-subtle);
  background: rgba(15, 23, 42, 0.45);
  color: var(--text-muted);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-items-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(5px, 0.8vw, 10px);
}

.shop-item-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: clamp(6px, 1vh, 10px) clamp(6px, 0.8vw, 10px);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  overflow: hidden;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.shop-item-card--buff {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(160deg, rgba(6, 78, 59, 0.55) 0%, var(--bg-surface) 100%);
}

.shop-item-card--trap {
  border-color: rgba(225, 29, 72, 0.55);
  background: linear-gradient(160deg, rgba(136, 19, 55, 0.55) 0%, var(--bg-surface) 100%);
}

.shop-item-card.is-empty {
  border-style: dashed;
  border-color: var(--border-subtle);
  background: rgba(15, 23, 42, 0.45);
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.item-card-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.item-type-tag {
  font-size: clamp(0.54rem, 0.82vw, 0.68rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.item-type-tag--buff { background: var(--emerald-soft); color: #6ee7b7; }
.item-type-tag--trap { background: var(--crimson-soft); color: #fda4af; }

.item-card-name {
  font-size: clamp(0.68rem, 1.05vw, 0.88rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
}

.item-card-effect {
  font-size: clamp(0.58rem, 0.88vw, 0.74rem);
  color: var(--text-secondary);
  line-height: 1.2;
}

/* ==========================================================================
   VINTAGE PLAYBILL / MOVIE TICKET CARD (Fluid Full-Height, Zero Overlap)
   ========================================================================== */
.playbill-card {
  --pb-bg-1: #2a2117;
  --pb-bg-2: #14100b;
  --pb-accent: #f5c542;
  --pb-ink: #fdf6e3;
  --pb-sub: rgba(253, 246, 227, 0.74);
  --pb-border: rgba(245, 197, 66, 0.55);

  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 8px;
  padding: clamp(4px, 0.8vh, 8px) clamp(5px, 0.7vw, 8px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  color: var(--pb-ink);
  background:
    radial-gradient(circle at 0 50%, var(--bg-deep) 5px, transparent 5.5px),
    radial-gradient(circle at 100% 50%, var(--bg-deep) 5px, transparent 5.5px),
    linear-gradient(165deg, var(--pb-bg-1) 0%, var(--pb-bg-2) 100%);
  border: 1px solid var(--pb-border);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25), var(--shadow-card);
  overflow: hidden;
}

.playbill-card::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  pointer-events: none;
}

.playbill-card::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

/* Genre Palettes */
.playbill-card.genre--horror { --pb-bg-1: #5c0f1f; --pb-bg-2: #16060b; --pb-accent: #fb7185; --pb-ink: #fff1f2; --pb-border: rgba(251, 113, 133, 0.58); }
.playbill-card.genre--scifi { --pb-bg-1: #0e4a5a; --pb-bg-2: #071923; --pb-accent: #fbbf24; --pb-ink: #ecfeff; --pb-border: rgba(56, 189, 248, 0.55); }
.playbill-card.genre--drama { --pb-bg-1: #4a3519; --pb-bg-2: #1b1309; --pb-accent: #fcd34d; --pb-ink: #fef9c3; --pb-border: rgba(252, 211, 77, 0.6); }
.playbill-card.genre--comedy { --pb-bg-1: #7c2d23; --pb-bg-2: #240c09; --pb-accent: #fdba74; --pb-ink: #fff7ed; --pb-border: rgba(251, 146, 60, 0.62); }
.playbill-card.genre--action { --pb-bg-1: #163a70; --pb-bg-2: #08152b; --pb-accent: #60a5fa; --pb-ink: #eff6ff; --pb-border: rgba(96, 165, 250, 0.6); }
.playbill-card.genre--animation { --pb-bg-1: #4c1d6e; --pb-bg-2: #190929; --pb-accent: #e879f9; --pb-ink: #fdf4ff; --pb-border: rgba(232, 121, 249, 0.58); }

.playbill-card.is-frozen,
.shop-item-card.is-frozen {
  box-shadow: inset 0 0 0 2px #7dd3fc, 0 0 12px rgba(56, 189, 248, 0.48);
  border-color: #7dd3fc;
}

.pb-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  font-size: clamp(0.56rem, 0.9vw, 0.72rem);
  font-weight: 800;
  color: var(--pb-accent);
}

.pb-top-right {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pb-year { font-family: var(--font-mono); }

.pb-mpaa {
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--pb-ink);
  font-size: clamp(0.5rem, 0.78vw, 0.64rem);
  line-height: 1.1;
}

/* Inline header badges so they NEVER overlap movie titles */
.pb-dupe-badge {
  font-family: var(--font-mono);
  font-size: clamp(0.52rem, 0.8vw, 0.66rem);
  font-weight: 900;
  color: #111827;
  background: linear-gradient(180deg, #fde68a 0%, #f59e0b 100%);
  border: 1px solid #fffbeb;
  border-radius: 999px;
  padding: 0 5px;
  line-height: 1.3;
}

.pb-freeze-badge {
  font-size: clamp(0.62rem, 0.9vw, 0.78rem);
  line-height: 1;
}

.pb-center {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 3px;
  gap: 2px;
}

.pb-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(0.68rem, 1.15vw, 1.02rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--pb-ink);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.pb-orig-title {
  font-size: clamp(0.56rem, 0.85vw, 0.72rem);
  color: var(--pb-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.pb-genre-tag {
  font-size: clamp(0.5rem, 0.75vw, 0.64rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pb-accent);
  opacity: 0.92;
}

.pb-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 18px;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.pb-buff-pips { display: flex; align-items: center; gap: 3px; }
.pb-buff-pip {
  font-size: clamp(0.62rem, 0.95vw, 0.78rem);
  line-height: 1;
  padding: 1px 3px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(110, 231, 183, 0.45);
}
.pb-buff-more { font-size: 0.62rem; font-weight: 800; color: #6ee7b7; }

.pb-cost-tag {
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 0.95vw, 0.78rem);
  font-weight: 900;
  color: var(--gold-bright);
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(251, 191, 36, 0.5);
  padding: 1px 8px;
  border-radius: 999px;
}

.pb-upgrade-tag {
  font-size: clamp(0.54rem, 0.85vw, 0.7rem);
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #111827;
  background: var(--gold-bright);
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.playbill-card--battle {
  width: clamp(130px, 22vw, 200px);
  height: clamp(140px, 36vh, 230px);
  padding: 10px 10px 8px;
}

.playbill-card--battle .pb-stat-callout {
  font-family: var(--font-mono);
  font-size: clamp(0.86rem, 1.4vw, 1.15rem);
  font-weight: 900;
  color: var(--gold-bright);
}

.playbill-card--preview {
  width: 112px;
  height: 142px;
  flex-shrink: 0;
}

/* ==========================================================================
   BOTTOM ACTION BAR (Roll + Freeze | Context Actions | End Turn)
   ========================================================================== */
.thumb-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px calc(12px + var(--safe-right)) max(8px, var(--safe-bottom)) calc(12px + var(--safe-left));
  background: rgba(9, 14, 26, 0.98);
  border-top: 1px solid var(--border-subtle);
}

.thumb-left,
.thumb-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.thumb-btn {
  min-height: clamp(38px, 6.2vh, 46px);
  padding: 0 18px;
}

.thumb-btn--battle {
  min-width: clamp(120px, 16vw, 180px);
}

.btn-cost-pill {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: var(--gold-bright);
}

.board-action-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
  border: 1px solid var(--gold);
  min-width: 0;
}

.board-action-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.board-action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   TAP-TO-SELECT INTERACTIVE PULSE STATES
   ========================================================================== */
@keyframes targetPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.9); }
  50% { box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.3); }
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.95); }
  50% { box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.35); }
}

.is-selected {
  outline: 2px solid var(--gold-bright);
  outline-offset: 1px;
  transform: translateY(-2px);
}

.is-valid-target { border-color: var(--sky) !important; animation: targetPulse 1.2s infinite ease-in-out; }
.is-upgrade-target { border-color: var(--gold-bright) !important; animation: goldPulse 1s infinite ease-in-out; }
.is-overwrite-warning { border-color: #fb7185 !important; box-shadow: 0 0 0 2px rgba(251, 113, 133, 0.75); }

/* ==========================================================================
   HOME SCREEN (2-Column Horizontal Split)
   ========================================================================== */
.screen--home {
  padding: calc(16px + var(--safe-top)) calc(20px + var(--safe-right)) max(16px, var(--safe-bottom)) calc(20px + var(--safe-left));
}

.home-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: center;
}

.home-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.marquee-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  padding: 4px 10px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 999px;
  background: var(--gold-soft);
}

.brand-title {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.brand-title span { color: var(--gold-bright); }
.brand-subtitle { margin: 0; font-size: clamp(0.85rem, 1.3vw, 1rem); color: var(--text-secondary); }
.home-footer { display: flex; gap: 8px; margin-top: 8px; }

.home-packs-col {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-title {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
}

.section-pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--sky);
  background: var(--sky-soft);
  padding: 3px 8px;
  border-radius: 999px;
}

.pack-grid { display: flex; flex-direction: column; gap: 10px; }

/* ==========================================================================
   BATTLE SCREEN (Horizontal Single-Screen Stage)
   ========================================================================== */
.battle-controls-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + var(--safe-top)) calc(12px + var(--safe-right)) 8px calc(12px + var(--safe-left));
  background: rgba(11, 17, 32, 0.96);
  border-bottom: 1px solid var(--border-subtle);
}

.playback-group { display: flex; align-items: center; gap: 6px; }
.ctrl-btn {
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.battle-scoreboard-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-name { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.studio-score { font-size: 1.35rem; font-weight: 900; color: var(--gold-bright); }
.battle-pips { display: flex; align-items: center; gap: 6px; }

.pip {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--border-strong);
}

.pip.is-player-win { background: var(--emerald); border-color: #6ee7b7; }
.pip.is-opponent-win { background: var(--crimson); border-color: #fda4af; }
.pip.is-draw { background: var(--gold); border-color: #fde68a; }

.battle-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  padding: 8px 16px;
  gap: 8px;
}

.battle-lane-banner { text-align: center; }
.battle-lane-title { display: block; font-size: clamp(0.95rem, 1.8vw, 1.3rem); font-weight: 900; letter-spacing: 0.08em; color: var(--gold-bright); }
.battle-lane-sub { font-size: 0.78rem; color: var(--text-muted); }

.battle-clash-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 4vw, 48px);
}

.battle-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.battle-vs-badge {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--gold-soft);
  border: 2px solid var(--gold);
  color: var(--gold-bright);
  font-weight: 900;
  display: grid;
  place-items: center;
}

.battle-event-feed {
  width: min(680px, 100%);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-align: center;
  font-size: clamp(0.78rem, 1.2vw, 0.94rem);
  font-weight: 700;
}

.battle-lane-strip {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.battle-footer { justify-content: flex-end; }

/* ==========================================================================
   OVERLAYS, INSPECTOR & TOASTS
   ========================================================================== */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(14px, var(--safe-top)) max(14px, var(--safe-right)) max(14px, var(--safe-bottom)) max(14px, var(--safe-left));
}

.bottom-sheet,
.modal-card {
  width: min(560px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--bg-stage);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.sheet-header,
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-title, .modal-title { margin: 0; font-size: 1.1rem; font-weight: 800; }
.sheet-subtitle { margin: 3px 0 0; font-size: 0.8rem; color: var(--text-muted); }
.sheet-actions, .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.toast-container {
  position: fixed;
  top: calc(56px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 440px);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: #1e293b;
  border: 1px solid var(--border-strong);
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.toast--error { background: #4c0519; border-color: var(--crimson); color: #ffe4e6; }
.toast--success { background: #064e3b; border-color: var(--emerald); color: #d1fae5; }

/* Narrow / Portrait Mobile Layout (Phones & Narrow Split-Screen) */
@media (max-width: 680px) {
  .hud-bar {
    grid-template-columns: 1fr auto;
    row-gap: 5px;
    padding-left: calc(8px + var(--safe-left));
    padding-right: calc(8px + var(--safe-right));
  }

  .hud-stats {
    gap: 4px;
  }

  .hud-pill {
    padding: 3px 7px;
    font-size: 0.74rem;
  }

  .selection-banner {
    grid-column: 1 / -1;
    order: 3;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    padding: 4px 10px;
  }

  .selection-banner:not(.is-active) {
    display: none;
  }

  .screen--home {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: calc(12px + var(--safe-top)) calc(14px + var(--safe-right)) max(16px, var(--safe-bottom)) calc(14px + var(--safe-left));
  }

  .home-layout {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 16px;
  }

  .home-packs-col {
    max-height: none;
    overflow: visible;
  }

  .shop-main {
    padding-left: calc(8px + var(--safe-left));
    padding-right: calc(8px + var(--safe-right));
    gap: 6px;
  }

  .board-section,
  .shop-section {
    padding: 5px 6px;
  }

  .zone-meta {
    display: none;
  }

  .lanes-grid,
  .shop-movies-grid {
    gap: 4px;
  }

  .lane-header {
    padding: 2px 4px;
    justify-content: center;
  }

  .lane-dir {
    display: none;
  }

  .lane-footer-row {
    grid-template-columns: 1fr;
    height: auto;
    gap: 3px;
  }

  .lane-stat-bar {
    min-height: 22px;
    font-size: 0.66rem;
    padding: 0 3px;
  }

  .lane-trap-socket {
    min-height: 26px;
    font-size: 0.58rem;
    padding: 0 3px;
  }

  .playbill-card.has-stat-rail {
    grid-template-columns: minmax(0, 1fr) 8px;
    gap: 3px;
    padding: 4px 2px 4px 4px;
  }

  .pb-stat-rail {
    padding: 1px;
    gap: 2px;
  }

  .pb-mpaa,
  .pb-genre-tag {
    display: none;
  }

  .shop-tray-row {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.28fr) minmax(0, 0.72fr);
    gap: 5px;
  }

  .shop-divider {
    display: none;
  }

  .thumb-bar {
    flex-wrap: wrap;
    gap: 6px;
    padding-left: calc(8px + var(--safe-left));
    padding-right: calc(8px + var(--safe-right));
  }

  .board-action-strip {
    order: -1;
    flex: 1 1 100%;
    justify-content: space-between;
  }

  .board-action-label {
    max-width: none;
    flex: 1;
  }

  .thumb-btn {
    padding: 0 12px;
    min-height: 40px;
  }

  .thumb-btn--battle {
    min-width: 108px;
  }

  .battle-controls-bar {
    flex-wrap: wrap;
    gap: 6px;
    padding-left: calc(8px + var(--safe-left));
    padding-right: calc(8px + var(--safe-right));
  }

  .battle-scoreboard-inline {
    order: 3;
    flex: 1 1 100%;
    justify-content: center;
    gap: 8px;
  }

  .studio-name {
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .battle-stage {
    padding: 6px 8px;
    gap: 6px;
  }

  .battle-clash-arena {
    gap: 8px;
  }

  .playbill-card--battle,
  .battle-empty-card {
    width: clamp(108px, 37vw, 165px);
    height: clamp(144px, 28vh, 198px);
  }

  .battle-vs-badge {
    width: 34px;
    height: 34px;
    font-size: 0.78rem;
  }

  .battle-lane-chip {
    padding: 4px 2px;
    font-size: 0.54rem;
  }
}

/* Landscape Phone Compression (e.g. 844x390 iPhone / Android Landscape) */
@media (max-height: 480px) {
  .screen--home {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .zone-header { margin-bottom: 3px; }
  .zone-meta { display: none; }
  .hud-bar { padding-top: calc(4px + var(--safe-top)); padding-bottom: 4px; }
  .thumb-bar { padding-top: 4px; padding-bottom: max(4px, var(--safe-bottom)); }
  .shop-main { gap: 5px; padding-top: 5px; padding-bottom: 5px; }
  .board-section, .shop-section { padding: 5px 7px; }
  .pb-genre-tag { display: none; }

  .battle-controls-bar { padding-top: calc(4px + var(--safe-top)); padding-bottom: 4px; }
  .ctrl-btn { min-width: 34px; min-height: 34px; font-size: 0.82rem; }
  .battle-stage { padding: 4px 12px; gap: 4px; }
  .battle-lane-title { font-size: 0.88rem; }
  .battle-lane-sub { display: none; }
  .battle-side { gap: 3px; }
  .playbill-card--battle,
  .battle-empty-card { height: clamp(96px, 30vh, 134px); padding: 6px; }
  .battle-stat-pill { padding: 2px 10px; font-size: 0.82rem; }
  .battle-event-feed { padding: 4px 10px; font-size: 0.76rem; }
  .battle-lane-strip { display: none; }
}

/* ==========================================================================
   T12: HOME RESUME CARD, PACK CARDS & PACK PREVIEW MODAL
   ========================================================================== */
.home-resume-slot {
  width: 100%;
}

.resume-card {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.16) 0%, var(--bg-surface) 100%);
  border: 1px solid rgba(16, 185, 129, 0.5);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resume-card-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resume-card-actions {
  display: flex;
  gap: 8px;
}

.pack-card {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--pack-theme, var(--gold));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pack-card.is-locked {
  border-color: var(--border-subtle);
  background: rgba(27, 36, 54, 0.72);
}

.pack-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pack-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: var(--text-primary);
}

.pack-card-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pack-status-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.pack-status-pill--free {
  background: var(--emerald-soft);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.pack-status-pill--unlocked {
  background: var(--sky-soft);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.pack-status-pill--locked {
  background: var(--gold-soft);
  color: var(--gold-bright);
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.pack-card-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.pack-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pack-card-count {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pack-card-actions {
  display: flex;
  gap: 8px;
}

.pack-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pack-preview-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.pack-sample-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 10px;
}

.pack-dev-note {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.74rem;
  color: #bae6fd;
}

/* T12.5: Additive Pool Launch & Dead Cells ON/OFF Pack Toggles */
.home-play-slot {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn--play-hero {
  width: 100%;
  min-height: 50px;
  font-size: 1rem;
}

.pool-active-summary {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.pack-card.is-disabled {
  opacity: 0.72;
  border-style: dashed;
}

.pack-status-pill--off {
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.pack-toggle-btn.is-on {
  background: var(--emerald-soft);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.55);
}

.pack-toggle-btn.is-off {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   T13.5: 5-LANE QUINTILE COLOR INDEX RAIL (Side of Playbill Card)
   ========================================================================== */
.playbill-card.has-stat-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(12px, 1.3vw, 18px);
  gap: 5px;
  padding-right: 4px;
}

.pb-main {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pb-stat-rail {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 2px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.pb-q-cell {
  flex: 1;
  width: 100%;
  min-height: 0;
  border-radius: 3px;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

/* 5-Step Quality Scale (Q1 = Black -> Q5 = Brightish Red) */
.pb-q--1 {
  background: #121216;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.pb-q--2 { background: #450a0a; }
.pb-q--3 { background: #881313; }
.pb-q--4 { background: #dc2626; }
.pb-q--5 {
  background: #ff3b3b;
  box-shadow: inset 0 0 0 1px rgba(255, 215, 215, 0.45), 0 0 6px rgba(255, 59, 59, 0.65);
}

/* Subtle white indicator on the row matching a board card's current lane */
.pb-q-cell.is-active-lane {
  box-shadow: 0 0 0 1.5px #ffffff, 0 0 8px rgba(255, 255, 255, 0.65);
  transform: scaleX(1.12);
}

/* Compact Legend in Shop Header */
.quintile-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.58rem, 0.9vw, 0.72rem);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
}

.ql-order {
  color: var(--text-muted);
  font-weight: 700;
}

.ql-scale {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ql-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
}

.ql-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

@media (max-width: 780px) {
  .ql-order { display: none; }
}

/* ==========================================================================
   T13.6: COMPLETIONIST ACHIEVEMENTS (Shop Cues & Sticker Book Modal)
   ========================================================================== */
.pb-ach-pill {
  font-size: clamp(0.48rem, 0.72vw, 0.62rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 1px 4px;
  border-radius: 999px;
  line-height: 1.25;
  white-space: nowrap;
}

.pb-ach-pill--new {
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.65);
  color: #7dd3fc;
}

.pb-ach-pill--bought {
  background: rgba(203, 213, 225, 0.16);
  border: 1px solid rgba(203, 213, 225, 0.45);
  color: #e2e8f0;
}

.pb-ach-pill--won {
  background: rgba(245, 158, 11, 0.28);
  border: 1px solid rgba(251, 191, 36, 0.78);
  color: #fde68a;
}

.modal-card--wide {
  width: min(860px, 96vw);
  max-height: 90dvh;
}

.ach-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.ach-stat-box {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ach-stat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.ach-stat-counts {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
}

.ach-progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.ach-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #fbbf24 100%);
}

.ach-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ach-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ach-filter-btn {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.ach-filter-btn.is-active {
  background: var(--gold-soft);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

.ach-movie-tile {
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ach-movie-tile.is-mastered {
  border-color: rgba(251, 191, 36, 0.7);
  background: linear-gradient(155deg, rgba(245, 158, 11, 0.14) 0%, var(--bg-surface) 100%);
}

.ach-movie-tile.is-unseen {
  opacity: 0.7;
}

.ach-movie-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.ach-movie-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ach-movie-year {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ach-stamps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.ach-stamp {
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.22);
}

.ach-stamp.is-earned-bought {
  border-style: solid;
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
}

.ach-stamp.is-earned-won {
  border-style: solid;
  border-color: rgba(251, 191, 36, 0.75);
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
}

.home-footer {
  flex-wrap: wrap;
}

/* ==========================================================================
   T14: STAT INSPECTOR SHEET (5-Lane Table, Deltas, Buffs & Trap Risks)
   ========================================================================== */
.insp-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.insp-chip {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.insp-chip--dupe {
  background: var(--gold-soft);
  border-color: rgba(251, 191, 36, 0.65);
  color: var(--gold-bright);
}

.insp-chip--ach-bought {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.55);
  color: #bae6fd;
}

.insp-chip--ach-won {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.75);
  color: #fde68a;
}

.insp-stats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.insp-stat-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.insp-stat-row.is-active-lane {
  border-color: var(--gold-bright);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.14) 0%, var(--bg-surface) 100%);
}

.insp-q-bar {
  width: 10px;
  height: 28px;
  border-radius: 4px;
}

.insp-stat-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.insp-lane-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.insp-active-tag {
  font-size: 0.6rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--gold-bright);
  color: #111827;
  letter-spacing: 0.04em;
}

.insp-lane-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.insp-stat-values {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.insp-val-main {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  font-weight: 900;
  color: var(--text-primary);
}

.insp-val-main.is-positive { color: #6ee7b7; }
.insp-val-main.is-negative { color: #fda4af; }

.insp-val-delta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
}

.insp-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.insp-section-title {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.insp-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.insp-buff-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.48);
  color: #a7f3d0;
}

.insp-trap-risk {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--crimson-soft);
  border: 1px solid rgba(225, 29, 72, 0.48);
  color: #fecdd3;
}

.insp-empty-note {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==========================================================================
   T15: SAP BATTLE PLAYBACK ANIMATIONS & RUN SUMMARY MODAL
   ========================================================================== */
.ctrl-btn.is-active {
  background: var(--gold-soft);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

.battle-empty-card {
  width: clamp(130px, 22vw, 200px);
  height: clamp(140px, 36vh, 230px);
  border-radius: 10px;
  border: 2px dashed var(--border-strong);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.86rem;
}

.battle-trap-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--crimson-soft);
  border: 1px solid rgba(225, 29, 72, 0.6);
  color: #fecdd3;
  white-space: nowrap;
}

.battle-trap-pill.is-idle {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.battle-stat-pill {
  font-family: var(--font-mono);
  font-size: clamp(0.88rem, 1.5vw, 1.15rem);
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 999px;
  background: #0b1325;
  border: 1px solid var(--border-strong);
  color: var(--gold-bright);
}

.battle-stat-pill.is-nerfed {
  border-color: var(--crimson);
  color: #fda4af;
}

.battle-stat-pill.is-winner {
  border-color: var(--emerald);
  color: #6ee7b7;
}

/* SAP Clash Animations */
@keyframes smackLeft {
  0% { transform: translateX(0) rotate(0deg); }
  45% { transform: translateX(34px) rotate(4deg) scale(1.04); }
  100% { transform: translateX(0) rotate(0deg); }
}

@keyframes smackRight {
  0% { transform: translateX(0) rotate(0deg); }
  45% { transform: translateX(-34px) rotate(-4deg) scale(1.04); }
  100% { transform: translateX(0) rotate(0deg); }
}

@keyframes trapGlitch {
  0%, 100% { transform: translateX(0); filter: none; }
  20% { transform: translateX(-6px); filter: hue-rotate(40deg) brightness(1.3); }
  40% { transform: translateX(6px); filter: saturate(2); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes koFlyLeft {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(-42px, 16px) rotate(-14deg) scale(0.88); opacity: 0.35; }
}

@keyframes koFlyRight {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(42px, 16px) rotate(14deg) scale(0.88); opacity: 0.35; }
}

.battle-side.is-smack-left { animation: smackLeft 0.38s ease-out; }
.battle-side.is-smack-right { animation: smackRight 0.38s ease-out; }
.battle-side.is-trap-hit { animation: trapGlitch 0.42s ease-in-out; }
.battle-side.is-ko-left { animation: koFlyLeft 0.36s ease-out forwards; }
.battle-side.is-ko-right { animation: koFlyRight 0.36s ease-out forwards; }
.battle-side.is-winner .playbill-card {
  box-shadow: 0 0 0 2px var(--emerald), 0 0 22px rgba(16, 185, 129, 0.55);
}

.battle-event-feed.is-trap { border-color: var(--crimson); color: #fecdd3; background: rgba(136, 19, 55, 0.35); }
.battle-event-feed.is-win { border-color: var(--emerald); color: #a7f3d0; background: rgba(6, 78, 59, 0.4); }
.battle-event-feed.is-loss { border-color: var(--crimson); color: #fecdd3; background: rgba(136, 19, 55, 0.4); }
.battle-event-feed.is-draw { border-color: var(--gold); color: #fef3c7; background: rgba(146, 64, 14, 0.35); }

/* Bottom 5-Lane Mini Progress Strip */
.battle-lane-chip {
  padding: 5px 6px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.64rem;
  font-weight: 800;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.battle-lane-chip.is-current { border-color: var(--gold-bright); color: var(--gold-bright); }
.battle-lane-chip.is-player-win { border-color: var(--emerald); background: var(--emerald-soft); color: #a7f3d0; }
.battle-lane-chip.is-opponent-win { border-color: var(--crimson); background: var(--crimson-soft); color: #fecdd3; }
.battle-lane-chip.is-draw { border-color: var(--gold); background: var(--gold-soft); color: #fde68a; }

/* Run Summary Modal */
.summary-hero {
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  border: 1px solid var(--border-strong);
}

.summary-hero--won {
  background: linear-gradient(155deg, rgba(245, 158, 11, 0.24) 0%, rgba(16, 185, 129, 0.14) 100%);
  border-color: var(--gold-bright);
}

.summary-hero--lost {
  background: linear-gradient(155deg, rgba(225, 29, 72, 0.22) 0%, var(--bg-surface) 100%);
  border-color: rgba(225, 29, 72, 0.6);
}

.summary-stats-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-secondary);
}

.summary-ribbons {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.55);
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: #fef3c7;
}

.summary-slate-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.summary-slate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
}