/* Forge from the Arena lineup: a side drawer on desktop, a bottom sheet on phones. */
.lineup-forge-btn { margin-top: 6px; color: var(--amber); font-weight: 700; font-size: .82rem; }
.lineup-forge-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.arena-forge-drawer { position: fixed; z-index: 55; top: calc(84px + env(safe-area-inset-top, 0px)); right: 18px; bottom: 18px;
  width: min(420px, calc(100vw - 36px)); display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 10px; padding: 18px;
  border: 1px solid rgba(255, 189, 74, .45); border-top: 3px solid var(--amber); border-radius: 16px;
  background: linear-gradient(170deg, #1d1a24f7, #0c0d14fa 55%); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); color: var(--text); }
.arena-forge-drawer[hidden] { display: none; }
.arena-forge-head { position: relative; padding-right: 32px; }
.arena-forge-head h3 { margin: 2px 0 0; font-family: var(--heading); font-size: 1.5rem; text-transform: uppercase; color: #ffdc92; }
.arena-forge-close { position: absolute; top: -4px; right: -4px; border: 0; background: none; color: var(--muted); font-size: 1.5rem; cursor: pointer; }
.arena-forge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; overflow: auto; align-content: start; }
.arena-forge-list li { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03); }
.arena-forge-list li.is-ready { border-color: rgba(255, 189, 74, .3); }
.arena-forge-list li.is-blocked { opacity: .55; }
.arena-forge-card { display: grid; gap: 2px; } .arena-forge-card strong { font-size: 1rem; } .arena-forge-card span { color: var(--muted); font-size: .8rem; }
.arena-forge-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .arena-forge-actions select { min-width: 0; }
.arena-forge-reason { color: var(--muted); }
@media (max-width: 760px) {
  .arena-forge-drawer { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 78vh; border-radius: 18px 18px 0 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
}
/* Complete my lineup: the plan summary under the shopping list. */
.arena-forge-summary { margin: 0; padding: 10px 12px; border: 1px solid rgba(255, 189, 74, .3); border-radius: 10px; background: rgba(255, 189, 74, .07); font-size: .85rem; font-weight: 600; }
#arenaCompleteLineup { border-color: rgba(255, 189, 74, .55); color: #ffdc92; }
/* Phase 3: the Forge remembers an Arena trip. */
.forge-arena-context { position: sticky; top: calc(72px + env(safe-area-inset-top, 0px)); z-index: 20; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid rgba(255, 189, 74, .45); border-left: 4px solid var(--amber);
  border-radius: 12px; background: #17141ef2; backdrop-filter: blur(6px); }
.forge-arena-context[hidden] { display: none; }
.forge-arena-context p { margin: 0; font-size: .88rem; } .forge-arena-context b { color: #ffdc92; }
/* Scannable single-slot drawer: one compact row per card, projection on the right. */
.arena-forge-drawer { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
.arena-forge-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.arena-forge-filter { flex: 1 1 160px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255, 255, 255, .04); color: var(--text); }
.arena-forge-pay { flex: 0 1 auto; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: #0c0d14; color: var(--text); }
.arena-forge-list li.arena-forge-row { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; }
.arena-forge-row.is-best { border-color: rgba(255, 189, 74, .7); background: rgba(255, 189, 74, .08); }
.arena-forge-card strong em { font-style: normal; font-weight: 600; color: var(--muted); }
.arena-forge-badge { justify-self: start; padding: 1px 7px; border-radius: 999px; background: var(--amber); color: #1a1205; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.arena-forge-proj { font-family: var(--heading); font-size: 1.45rem; color: #ffdc92; min-width: 3.2ch; text-align: right; }
.arena-forge-go { padding: 8px 14px; min-height: 40px; }
.arena-forge-empty { color: var(--muted); }
.arena-forge-blocked { border-top: 1px solid var(--line); padding-top: 8px; color: var(--muted); font-size: .82rem; }
.arena-forge-blocked summary { cursor: pointer; font-weight: 700; } .arena-forge-blocked-row { margin: 6px 0 0; }
/* Oct 28: the drawer is fixed but lives inside the lineup panel. When the Squire guide highlights that panel
   (.guide-target sets isolation), the drawer's z-index only counts inside it and the sticky entry panel
   (Prize Vault) painted on top. While the drawer is open, lift its containers above their neighbours. */
:is(#mainArenaSetup, .lineup-panel):has(.arena-forge-drawer:not([hidden])) { position: relative; z-index: 56; }
.arena-forge-drawer { background: linear-gradient(170deg, #1d1a24, #0c0d14 55%); }
