/* shared pulse (scene continue buttons) */
@keyframes plPulse { 50% { opacity: .65; } }

/* ===== The Stash (loadout) ===== */
.stash-camp { position: relative; height: 210px; margin: 10px 0 14px; border-radius: 10px; overflow: hidden; border: 2px solid var(--royal-night); box-shadow: inset 0 0 0 1px #253160;
  background: linear-gradient(180deg, #0d1018 0%, #1b1a22 45%, #101838 62%, #0a0f24 63%, #080c1a 100%); }
.stash-camp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 37%; background: repeating-linear-gradient(90deg, rgba(0,0,0,.22) 0 2px, transparent 2px 24px); }
.stash-fire { position: absolute; left: 50%; bottom: 10%; width: 74px; height: 74px; margin-left: -37px; z-index: 2; }
.stash-fire img { width: 100%; height: 100%; object-fit: contain; animation: stashFlick 1.3s ease-in-out infinite; transform-origin: 50% 100%; }
.stash-fire i { position: absolute; left: -160%; right: -160%; bottom: -40%; height: 260%; background: radial-gradient(ellipse 50% 45% at 50% 70%, rgba(215,185,110,.35), transparent 70%); pointer-events: none; animation: plPulse 1.8s ease-in-out infinite; }
@keyframes stashFlick { 50% { transform: scaleY(1.06) scaleX(.97); filter: brightness(1.12); } }
.stash-hero { position: absolute; left: 22%; bottom: 4%; width: 150px; height: 190px; z-index: 3; }
.stash-hero .hero-live, .stash-hero .hero-live .sprite { position: absolute; inset: 0; }
.stash-chest { position: absolute; right: 22%; bottom: 8%; width: 96px; height: 80px; z-index: 3; filter: drop-shadow(0 0 12px rgba(217,189,118,.35)); }
.stash-chest img { width: 100%; height: 100%; object-fit: contain; }
.stash-wearing { position: absolute; left: 14px; top: 12px; z-index: 4; padding: 6px 12px; border-radius: 8px; background: rgba(4,7,17,.72); border: 1px solid rgba(201,161,59,.45); text-align: left; }
.stash-wearing small {
  display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mist) !important;
}
.stash-wearing b { color: var(--gold-2); font-size: 15px; }

/* ===== Cinematic scenes (WebGL) ===== */
.cine { position: fixed; inset: 0; z-index: 99991; background: var(--black); opacity: 0; overflow: hidden; font-family: var(--font-display); }   /* every scene plays full screen: no letterbox bars */
.cine-sub { position: absolute; left: 50%; bottom: 10.5vh; z-index: 4; width: min(84vw, 1000px); transform: translateX(-50%); text-align: center; color: #eee5ce;
  font-size: clamp(17px, 3.1vh, 30px); line-height: 1.4; letter-spacing: .01em; text-shadow: 0 2px 8px var(--black), 0 0 22px rgba(0,0,0,.95); pointer-events: none; }
.cine-sub span { display: inline-block; }
.cine-continue { position: absolute; z-index: 5; border: 1px solid rgba(239,230,210,.45); background: rgba(4,7,17,.7); color: var(--paper); font: 600 15px var(--font-body); padding: 8px 18px; border-radius: 999px; cursor: pointer; left: 50%; bottom: 2.4vh; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .6s; }
.cine.done .cine-continue { opacity: 1; pointer-events: auto; animation: plPulse 2s ease-in-out infinite; }
.cine-overlay { position: absolute; inset: 0; width: 100% !important; height: 100% !important; z-index: 4; pointer-events: none; }
/* with the WebGL camp the fire is particles: the logs stay, the drawn flame steps back */
.stash-camp.gl .stash-fire img { animation: none; filter: brightness(.55) saturate(.6); }
.stash-camp.gl .stash-fire i { display: none; }
.stash-camp .cine-overlay { z-index: 3; }
.stash-camp .stash-wearing { z-index: 5; }

.modal:has(.stash-camp) { width: min(1280px, 94vw); max-width: none; }
.stash-camp { height: 300px; }
.stash-hero { width: 190px; height: 250px; left: 24%; }
.stash-fire { width: 96px; height: 96px; margin-left: -48px; }
.stash-chest { width: 120px; height: 100px; right: 22%; }

/* ===== Split-screen hero select ===== */
.modal.split-modal { position: fixed !important; inset: 0 !important; width: calc(100 * var(--hvw)) !important; max-width: none !important; height: calc(100 * var(--hvh)) !important; max-height: none !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: var(--black) !important; zoom: 1 !important; transform: none !important; overflow: hidden; }
/* ===== Gearing up: two steps (deck, then armor), the card book, tracked goals ===== */

.pb { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(201,161,59,.45); background: rgba(4,7,17,.45); color: var(--ivory); font-size: 13px; cursor: help; }
.pb .ico { width: 16px; height: 16px; }
.pb b { font-weight: 700; }
.pb.locked { opacity: .5; filter: grayscale(.9); border-style: dashed; }
.pb.locked small { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
/* the armor window opens a little wider than the deck step, and every tile is one compact card */
.modal.stash-modal:has(.armor-step) { width: min(560px, 46vw) !important; }
.track-btn { font: 600 11px var(--font-body); padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(201,161,59,.7); background: rgba(4,7,17,.6); color: var(--ivory); cursor: pointer; }
.track-btn.on { background: linear-gradient(180deg, var(--gilt), #b58f31); color: #121628; border-color: #e9c66a; }
.track-btn:hover { filter: brightness(1.15); }
.cb-body { max-height: min(62vh, calc(var(--hvh, 1vh) * 62)); overflow-y: auto; padding-right: 6px; }
.cb-group { margin-bottom: 14px; }
.cb-group h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.cb-group h3 small { font: 500 12.5px var(--font-body); opacity: .85; }
.cb-grid { display: flex; flex-wrap: wrap; gap: 20px 18px; padding: 14px 6px 8px 14px; }   /* room for each card's cost gem, which sits off its top-left corner */
.cb-card { position: relative; cursor: pointer; border-radius: 10px; }
.cb-card .card.mini { --card-w: 112px; --card-h: 158px; font-size: 9.5px; transition: none !important; transform: none !important; }
.cb-card .card.mini:hover { transform: none !important; }
.cb-card.picked { outline: 2px solid var(--gilt); outline-offset: 2px; }
.cb-group.locked .cb-card .card { filter: grayscale(.85) brightness(.62); }
.cb-over { position: absolute; left: 4px; right: 4px; bottom: 4px; display: grid; gap: 5px; justify-items: center; text-align: center; padding: 7px 6px; border-radius: 8px; background: rgba(5,8,19,.92); border: 1px solid rgba(201,161,59,.6); }
.cb-over small { font: 500 10.5px/1.3 var(--font-body); color: var(--ivory); }
.track-panel {
  position: absolute; top: 100%; left: 12px; margin-top: 8px; width: 250px; z-index: 5; pointer-events: none; padding: 7px 10px 8px;
  background: var(--royal-mid) !important; border: 1px solid var(--gilt) !important; border-radius: 0 !important; color: var(--ivory) !important;
  box-shadow: inset 0 0 0 3px var(--royal-mid), inset 0 0 0 4px rgba(201, 161, 59, .45), 0 12px 30px rgba(5, 9, 24, .6) !important;
}
.track-panel .tp-head { display: block; font: 700 10.5px var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gilt); margin-bottom: 4px; }
.track-panel .tp-row { display: flex; gap: 7px; align-items: flex-start; padding: 3px 0; }
.track-panel .tp-row i { font-style: normal; color: var(--gilt); width: 12px; flex: 0 0 auto; }
.track-panel .tp-row b { display: block; font-size: 12.5px; line-height: 1.2; }
.track-panel .tp-row small { display: block; font-size: 11px; line-height: 1.3; opacity: .8; }
.track-panel .tp-row.done i, .track-panel .tp-row.done small { color: #9fe08a; opacity: 1; }
@media (max-width: 760px) { .track-panel { width: 200px; left: 8px; } }
.pb.base { border-color: rgba(201,161,59,.8); background: rgba(17,27,69,.55); }
/* ----- cleanup round: veil between scenes, kit chips and tips, armor tiles ----- */

.kw-pop { pointer-events: none; }
.mg-line.mg-found { color: #e9c66a; font-weight: 600; }
.track-full {
  position: fixed; left: 50%; top: 50%; z-index: 960; width: min(400px, 90vw); transform: translate(-50%, -50%) scale(.96); opacity: 0;
  pointer-events: none; transition: opacity .2s, transform .2s; padding: 14px 16px; background: var(--royal-mid) !important;
  border: 1px solid var(--gilt) !important; border-radius: 0 !important; color: var(--ivory) !important;
  box-shadow: inset 0 0 0 3px var(--royal-mid), inset 0 0 0 4px rgba(201, 161, 59, .45), 0 12px 30px rgba(5, 9, 24, .6) !important;
}
.track-full.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.track-full > b { display: block; font-size: 16px; color: var(--gilt); margin-bottom: 4px; }
.track-full > p { font-size: 12.5px; line-height: 1.4; margin: 0 0 10px; opacity: .9; }
.track-full > p em { font-style: normal; color: #e9c66a; font-weight: 600; }
.tf-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(201,161,59,.2); }
.tf-row span { flex: 1; min-width: 0; } .tf-row span b { display: block; font-size: 13px; } .tf-row span small { display: block; font-size: 11px; opacity: .8; line-height: 1.3; }

/* an active power's badge in the status row: the card's painting in a small gold ring */
.status.power .pw-badge { width: 1.5em; height: 1.5em; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--gilt); vertical-align: middle; margin-right: 2px; box-shadow: 0 0 0 1px var(--shade-60); }

/* the demo's ending card */
.demo-card { margin: 12px auto; max-width: 560px; padding: 14px 18px; border-radius: 12px; text-align: center; background: linear-gradient(180deg, rgba(201,161,59,.22), rgba(201,161,59,.06)); border: 1px solid var(--gold, var(--gilt)); }
.demo-card h3 { margin: 0 0 6px; font-family: var(--font-display); color: var(--gold-2, #e9c66a); }
.demo-card p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.demo-card .wishlist-btn { text-decoration: none; display: inline-block; }
.owned-chip.full-game { opacity: .75; font-style: italic; }
