.arsenal-page {
  --arsenal-header: calc(4rem + env(safe-area-inset-top, 0px));
  /* Functional-text floor: operational metadata never renders below 11px. */
  --arsenal-meta: .6875rem;
  --arsenal-label: .75rem;
  --arsenal-muted: #8a958d;
  margin: 0;
  min-width: 20rem;
  min-height: 100svh;
  padding-top: var(--arsenal-header);
  overflow-x: hidden; /* fallback: Safari < 16 ignores clip */
  overflow-x: clip;
  overscroll-behavior-x: none;
  background: var(--obsidian);
  color: var(--paper);
}

.arsenal-page::before { opacity: .035; mix-blend-mode: soft-light; }
.arsenal-page h1,
.arsenal-page h2,
.arsenal-page h3 { max-width: none; margin: 0; }
.arsenal-page button { border-radius: var(--radius); }
.arsenal-page [hidden] { display: none !important; }
.arsenal-page .skip-link { min-height: 2.75rem; display: flex; align-items: center; }

.instrument-label,
.player-facts,
.panel-kicker,
.provenance-note,
.equipment-role,
.state-lock,
.hero-specs,
.inspection-header,
.panel-tabs,
.technical-specs dt,
.stat-label,
.operational-readout,
.loadout-summary dt,
.history-heading,
.timeline-date,
.timeline-meta,
.local-note {
  font-family: var(--mono);
  letter-spacing: .075em;
  text-transform: uppercase;
}

.instrument-label { margin: 0; color: #7d8981; font-size: var(--arsenal-label); font-weight: 720; }

.arsenal-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--arsenal-header);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  padding: env(safe-area-inset-top, 0px) clamp(1rem, 2vw, 1.75rem) 0;
  border-bottom: 1px solid #303a34;
  background: rgba(9,13,11,.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.arsenal-header .brand { min-height: 2.75rem; color: white; }
/* Sound is on by default here (the Arsenal is the game-like surface); mint says so. */
.arsenal-header .sound-toggle { color: #c5cbc7; border-color: #3a453e; font-size: var(--arsenal-meta); }
.arsenal-header .sound-toggle[aria-pressed="true"] { color: var(--signal-mint); border-color: rgba(155,255,224,.4); }
.app-player { min-width: 0; display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.app-player h1 { display: flex; align-items: baseline; gap: .5rem; margin-top: .12rem; font-size: clamp(.95rem, 1.4vw, 1.25rem); line-height: 1; white-space: nowrap; }
.app-player h1 small { color: var(--signal-mint); font-family: var(--mono); font-size: var(--arsenal-meta); letter-spacing: .1em; text-transform: uppercase; }
.player-context { margin: 0 0 .14rem; color: var(--arsenal-muted); font-family: var(--mono); font-size: var(--arsenal-meta); letter-spacing: .075em; text-transform: uppercase; }
.player-facts { display: flex; align-items: center; gap: .65rem; color: #9ba49e; font-size: var(--arsenal-meta); }
.player-facts > span + span::before { content: "/"; margin-right: .65rem; color: #465149; }
.player-facts > span:last-child { color: #d8dcd8; font-weight: 750; }


.arsenal-workspace {
  height: calc(100svh - var(--arsenal-header));
  min-height: 36rem;
  display: grid;
  grid-template-columns: clamp(13.75rem, 17vw, 16rem) minmax(21rem, 1fr) clamp(21rem, 28vw, 25rem);
  margin-top: 0;
  overflow: hidden;
  background: #0b100d;
}

.equipment-panel,
.inspection-panel { min-width: 0; }
.equipment-panel { z-index: 2; overflow-y: auto; display: flex; flex-direction: column; padding: 1.15rem .85rem; background: linear-gradient(90deg, #111713 0%, #101612 76%, #0d1310 100%); }
.panel-kicker { padding: .15rem .55rem .8rem; color: #89938c; font-size: var(--arsenal-label); }
.provenance-note { margin: .5rem 1rem 0; color: var(--arsenal-muted); font-size: var(--arsenal-meta); line-height: 1.5; }
.provenance-note summary { min-height: 2.75rem; display: flex; align-items: center; cursor: pointer; }
.provenance-note p { margin: .15rem 0 .5rem; text-transform: none; letter-spacing: 0; }

.equipment-stage {
  position: relative;
  min-width: 0;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, rgba(155,255,224,.075), transparent 38%), #0b100d;
}
.loadout-atmosphere { position: absolute; z-index: -1; inset: 0; overflow: hidden; }
.loadout-atmosphere::before { content: ""; position: absolute; inset: 7%; border: 1px solid rgba(255,255,255,.035); background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 4rem 4rem; -webkit-mask-image: radial-gradient(circle at center, black, transparent 74%); mask-image: radial-gradient(circle at center, black, transparent 74%); }
.loadout-atmosphere::after { content: ""; position: absolute; width: min(65vw, 40rem); aspect-ratio: 1; left: 50%; top: 49%; transform: translate(-50%, -50%); border: 1px solid rgba(155,255,224,.1); border-radius: 50%; box-shadow: 0 0 0 5rem rgba(155,255,224,.015), 0 0 0 10rem rgba(155,255,224,.01); }
.equipment-hero { position: relative; width: 100%; height: 100%; min-height: 0; display: grid; place-items: center; padding: clamp(1rem, 2vw, 1.75rem); }
.equipment-readout { position: absolute; z-index: 3; }
.equipment-readout-left { inset: 1.5rem auto auto 1.5rem; max-width: min(17rem, 42%); }
.equipment-role { margin: .65rem 0 .2rem; color: var(--signal-mint); font-size: var(--arsenal-label); font-weight: 750; }
.equipment-readout-left h2 { max-width: 7ch; font-size: clamp(2.4rem, 5vw, 5.5rem); line-height: .82; }
.equipment-figure { position: relative; width: min(70%, 31rem); height: min(72svh, 43rem); min-height: 24rem; display: grid; place-items: center; margin: 0; }
.equipment-figure picture { position: relative; z-index: 2; height: 92%; display: block; transition: opacity 150ms ease, transform 150ms ease; }
.equipment-figure img { width: auto; height: 100%; object-fit: contain; filter: drop-shadow(0 1.6rem 1.25rem rgba(0,0,0,.48)); }
.equipment-orbit { position: absolute; width: 92%; aspect-ratio: 1; border: 1px solid rgba(155,255,224,.12); border-radius: 50%; transform: rotate(-12deg); }
.equipment-hero.is-swapping .equipment-figure picture { opacity: .18; transform: translateY(.3rem) scale(.985); }
.equipment-readout-right { inset: auto 1.5rem 1.5rem auto; width: min(14rem, 40%); }
.state-lock { display: flex; align-items: center; gap: .5rem; margin: 0 0 .65rem; color: var(--signal-mint); font-size: var(--arsenal-label); }
.state-lock > span { width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 .2rem rgba(155,255,224,.08); }
.hero-specs { margin: 0; border-top: 1px solid #303a34; }
.hero-specs div { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid #303a34; }
.hero-specs dt { color: var(--arsenal-muted); font-size: var(--arsenal-meta); }
.hero-specs dd { margin: 0; color: #e4e7e4; font-size: var(--arsenal-label); font-weight: 750; text-align: right; }

.inspection-panel { display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(90deg, #0f1511, #111713 9%); box-shadow: -1.5rem 0 3rem rgba(0,0,0,.14); }
.inspection-header { flex: 0 0 auto; min-height: 4.7rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .9rem 1rem .65rem; }
.inspection-header > div { min-width: 0; display: grid; gap: .15rem; }
.inspection-header > div > strong { overflow: hidden; font-family: var(--display); font-size: 1.15rem; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.check-in-trigger { min-width: 6.5rem; min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; border: 1px solid var(--signal-mint); background: var(--signal-mint); color: var(--ink); font-family: var(--mono); font-size: var(--arsenal-label); font-weight: 820; letter-spacing: .075em; text-transform: uppercase; cursor: pointer; }
.panel-tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .2rem; padding: .35rem .65rem .6rem; background: transparent; }
.panel-tab { min-height: 2.75rem; padding: .5rem .35rem; border: 0; background: transparent; color: #78837b; font-family: inherit; font-size: var(--arsenal-meta); font-weight: 750; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.panel-tab[aria-selected="true"] { background: linear-gradient(135deg, rgba(155,255,224,.105), rgba(155,255,224,.025)); color: white; }
.panel-scroll { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #455149 #111713; }
.inspection-mode { padding: 1rem; }
.passport-group { padding: 0 0 1rem; }
.passport-group + .passport-group { padding-top: 1rem; border-top: 1px solid #303a34; }
.passport-group h2 { margin-bottom: .65rem; color: #dfe3df; font-family: var(--mono); font-size: var(--arsenal-label); letter-spacing: .07em; text-transform: uppercase; }
.technical-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid #303a34; }
.technical-specs div { min-width: 0; padding: .65rem; border-bottom: 1px solid #303a34; }
.technical-specs div:nth-child(odd) { border-right: 1px solid #303a34; }
.technical-specs div:nth-last-child(-n+2) { border-bottom: 0; }
.technical-specs dt { margin-bottom: .22rem; color: var(--arsenal-muted); font-size: var(--arsenal-meta); }
.technical-specs dd { margin: 0; overflow-wrap: anywhere; color: #edf0ed; font-size: .72rem; font-weight: 690; line-height: 1.28; }
.stat-stack { display: grid; gap: .65rem; }
.equipment-stat { display: grid; grid-template-columns: minmax(4.4rem, 1fr) auto; gap: .35rem 1rem; align-items: center; }
.stat-label { color: #8b968e; font-size: var(--arsenal-meta); }
.stat-value { color: white; font-family: var(--mono); font-size: var(--arsenal-label); text-align: right; }
.stat-meter { grid-column: 1 / -1; width: 100%; height: .3rem; border: 0; background: #2d3831; accent-color: var(--signal-ember); }
.stat-meter::-webkit-progress-bar { background: #2d3831; }
.stat-meter::-webkit-progress-value { background: var(--signal-ember); }
.stat-meter::-moz-progress-bar { background: var(--signal-ember); }
.equipment-stat[data-stat="release"] .stat-meter { accent-color: var(--signal-mint); }
.equipment-stat[data-stat="release"] .stat-meter::-webkit-progress-value { background: var(--signal-mint); }
.equipment-stat[data-stat="release"] .stat-meter::-moz-progress-bar { background: var(--signal-mint); }
.operational-readout { display: grid; gap: .35rem; padding: 1rem; border: 1px solid #354139; background: #0c120f; }
.operational-readout .readout-label { color: var(--arsenal-muted); font-family: var(--mono); font-size: var(--arsenal-meta); letter-spacing: .075em; text-transform: uppercase; }
.operational-readout strong { color: var(--signal-mint); font-size: 1rem; line-height: 1.3; }
.operational-readout > span { color: #9aa49d; font-family: var(--body); font-size: .72rem; letter-spacing: 0; line-height: 1.4; text-transform: none; }
.loadout-summary { margin: 1rem 0 0; border-top: 1px solid #303a34; }
.loadout-summary div { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid #303a34; }
.loadout-summary dt { color: var(--arsenal-muted); font-size: var(--arsenal-meta); }
.loadout-summary dd { margin: 0; font-family: var(--mono); font-size: var(--arsenal-label); font-weight: 750; }
.compact-note { margin: 1rem 0 0; color: #7f8a82; font-size: .7rem; }
.clear-signals { min-height: 2.75rem; margin-top: .75rem; padding: .5rem 0; border: 0; background: transparent; color: #89948c; font-family: var(--mono); font-size: var(--arsenal-meta); letter-spacing: .07em; text-decoration: underline; text-underline-offset: .2rem; text-transform: uppercase; cursor: pointer; }

.dna-signature { padding: .15rem 0 .2rem; }
.dna-signature strong { color: white; font-size: clamp(1.1rem, 2vw, 1.65rem); line-height: 1.05; }
.pocket-dna { --pocket-y: 63%; --channel-width: 19%; --hold-alpha: .7; --whip-depth: 20%; --release-angle: -7deg; position: relative; height: clamp(18rem, 43vh, 25rem); display: grid; place-items: center; margin: .85rem 0 0; overflow: hidden; border: 1px solid #344038; background: #0a0f0c; }
.pocket-dna::before { content: ""; position: absolute; inset: .65rem; border: 1px solid rgba(255,255,255,.035); }
.dna-head-reference { position: relative; z-index: 1; height: 92%; display: block; opacity: .24; filter: grayscale(1) contrast(1.15); }
.dna-head-reference img { width: auto; height: 100%; object-fit: contain; }
.dna-calibration { position: absolute; z-index: 3; inset: 1.2rem auto 1.8rem .75rem; display: flex; flex-direction: column; justify-content: space-between; color: var(--arsenal-muted); font-family: var(--mono); font-size: var(--arsenal-meta); letter-spacing: .08em; }
.dna-field { position: absolute; z-index: 2; width: min(40%, 9rem); height: 65%; top: 15%; left: 50%; transform: translateX(-50%); }
.dna-field::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(155,255,224,.11) 1px, transparent 1px), linear-gradient(90deg, rgba(155,255,224,.11) 1px, transparent 1px); background-size: 1rem 1rem; opacity: var(--hold-alpha); }
.dna-pocket-zone { position: absolute; left: 50%; top: var(--pocket-y); width: calc(var(--channel-width) * 2.2); height: var(--whip-depth); transform: translate(-50%, -50%); border: 1px solid var(--signal-ember); border-radius: 50%; background: rgba(255,154,82,.14); }
.dna-channel { position: absolute; top: 22%; bottom: 10%; left: 50%; width: var(--channel-width); transform: translateX(-50%); border-inline: 1px solid rgba(155,255,224,.78); background: rgba(155,255,224,.045); }
.dna-shooter { position: absolute; left: 8%; right: 8%; top: 18%; height: 1px; background: var(--signal-ember); transform: rotate(var(--release-angle)); box-shadow: 0 .45rem 0 rgba(255,154,82,.42); }
.dna-shooter-b { top: 25%; opacity: .45; }
.dna-release-vector { position: absolute; left: 50%; top: 18%; width: 1px; height: 29%; background: var(--signal-mint); opacity: .62; transform: rotate(var(--release-angle)); transform-origin: bottom; }
.dna-origin { position: absolute; left: 50%; top: var(--pocket-y); width: .55rem; height: .55rem; transform: translate(-50%, -50%); border: 1px solid var(--signal-mint); border-radius: 50%; background: #0b100d; }
.pocket-dna[data-placement="high"] { --pocket-y: 34%; }
.pocket-dna[data-placement="mid-high"] { --pocket-y: 43%; }
.pocket-dna[data-placement="mid"] { --pocket-y: 53%; }
.pocket-dna[data-placement="mid-low"] { --pocket-y: 63%; }
.pocket-dna[data-placement="low"] { --pocket-y: 72%; }
.pocket-dna[data-channel="1"] { --channel-width: 10.45%; } .pocket-dna[data-channel="2"] { --channel-width: 11.9%; } .pocket-dna[data-channel="3"] { --channel-width: 13.35%; } .pocket-dna[data-channel="4"] { --channel-width: 14.8%; } .pocket-dna[data-channel="5"] { --channel-width: 16.25%; } .pocket-dna[data-channel="6"] { --channel-width: 17.7%; } .pocket-dna[data-channel="7"] { --channel-width: 19.15%; } .pocket-dna[data-channel="8"] { --channel-width: 20.6%; } .pocket-dna[data-channel="9"] { --channel-width: 22.05%; } .pocket-dna[data-channel="10"] { --channel-width: 23.5%; }
.pocket-dna[data-hold="1"] { --hold-alpha: .305; } .pocket-dna[data-hold="2"] { --hold-alpha: .37; } .pocket-dna[data-hold="3"] { --hold-alpha: .435; } .pocket-dna[data-hold="4"] { --hold-alpha: .5; } .pocket-dna[data-hold="5"] { --hold-alpha: .565; } .pocket-dna[data-hold="6"] { --hold-alpha: .63; } .pocket-dna[data-hold="7"] { --hold-alpha: .695; } .pocket-dna[data-hold="8"] { --hold-alpha: .76; } .pocket-dna[data-hold="9"] { --hold-alpha: .825; } .pocket-dna[data-hold="10"] { --hold-alpha: .89; }
.pocket-dna[data-whip="1"] { --whip-depth: 11.1%; } .pocket-dna[data-whip="2"] { --whip-depth: 13.2%; } .pocket-dna[data-whip="3"] { --whip-depth: 15.3%; } .pocket-dna[data-whip="4"] { --whip-depth: 17.4%; } .pocket-dna[data-whip="5"] { --whip-depth: 19.5%; } .pocket-dna[data-whip="6"] { --whip-depth: 21.6%; } .pocket-dna[data-whip="7"] { --whip-depth: 23.7%; } .pocket-dna[data-whip="8"] { --whip-depth: 25.8%; } .pocket-dna[data-whip="9"] { --whip-depth: 27.9%; } .pocket-dna[data-whip="10"] { --whip-depth: 30%; }
.pocket-dna[data-release="1"] { --release-angle: -2.75deg; } .pocket-dna[data-release="2"] { --release-angle: -3.5deg; } .pocket-dna[data-release="3"] { --release-angle: -4.25deg; } .pocket-dna[data-release="4"] { --release-angle: -5deg; } .pocket-dna[data-release="5"] { --release-angle: -5.75deg; } .pocket-dna[data-release="6"] { --release-angle: -6.5deg; } .pocket-dna[data-release="7"] { --release-angle: -7.25deg; } .pocket-dna[data-release="8"] { --release-angle: -8deg; } .pocket-dna[data-release="9"] { --release-angle: -8.75deg; } .pocket-dna[data-release="10"] { --release-angle: -9.5deg; }
.history-heading { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .75rem; border-bottom: 1px solid #3a443e; color: #7f8a82; font-size: var(--arsenal-meta); }
.history-heading strong { color: var(--signal-ember); }
.equipment-timeline { margin: 0; padding: 0; list-style: none; }
.timeline-event { display: grid; grid-template-columns: 3.25rem .55rem minmax(0, 1fr); gap: .65rem; padding: .85rem 0; border-bottom: 1px solid #303a34; }
.timeline-date { color: #7d8981; font-size: var(--arsenal-meta); }
.timeline-marker { width: .5rem; height: .5rem; margin-top: .1rem; border-radius: 50%; background: var(--signal-ember); }
.timeline-content { min-width: 0; }
.timeline-meta { display: flex; gap: .6rem; color: #7b867e; font-size: var(--arsenal-meta); }
.timeline-content h3 { margin: .25rem 0 .18rem; color: #edf0ed; font-size: .85rem; line-height: 1.2; }
.timeline-content > p { margin: 0; color: #98a29b; font-size: var(--arsenal-label); line-height: 1.4; }
.timeline-media { grid-column: 3; width: 100%; height: 5rem; margin-top: .25rem; overflow: hidden; border: 1px solid #303a34; background: #0b100d; }
.timeline-media img { width: 100%; height: 100%; padding: .35rem; object-fit: contain; }

.check-in-dialog { width: min(calc(100% - 1.5rem), 38rem); max-height: min(90svh, 44rem); overflow: auto; overflow-x: hidden; padding: 0; border: 1px solid #434f47; background: #111713; color: var(--paper); box-shadow: 0 2rem 8rem rgba(0,0,0,.65); }
.check-in-dialog::backdrop { background: rgba(4,7,5,.82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.check-in-dialog form { padding: clamp(1.25rem, 4vw, 2rem); }
.check-in-dialog header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #3a453e; }
.check-in-dialog h2 { max-width: 10ch; margin-top: .45rem; font-size: clamp(2rem, 7vw, 4rem); line-height: .88; }
.dialog-close { flex: 0 0 auto; width: 2.75rem; height: 2.75rem; border: 1px solid #536058; background: transparent; color: white; font-size: 1.3rem; cursor: pointer; }
.signal-controls { display: grid; gap: 1rem; padding: 1.25rem 0; }
.signal-controls label { display: grid; gap: .45rem; }
.signal-controls label > span { display: flex; justify-content: space-between; font-family: var(--mono); font-size: var(--arsenal-label); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.signal-controls output { color: var(--signal-mint); }
.signal-controls input[type="range"] { width: 100%; min-height: 2.75rem; margin: 0; accent-color: var(--signal-mint); }
.signal-controls small { display: flex; justify-content: space-between; color: #78837b; font-family: var(--mono); font-size: var(--arsenal-meta); letter-spacing: .07em; text-transform: uppercase; }
.check-note { display: grid; gap: .5rem; color: #9aa49d; font-family: var(--mono); font-size: var(--arsenal-label); letter-spacing: .07em; text-transform: uppercase; }
.check-note input { min-height: 3.25rem; padding: .75rem; border: 1px solid #526057; background: #0b100d; color: white; }
.save-signal { width: 100%; min-height: 3.5rem; display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding: .8rem 1rem; border: 1px solid var(--signal-mint); background: var(--signal-mint); color: var(--ink); font-family: var(--mono); font-size: var(--arsenal-label); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.local-note { margin: .7rem 0 0; color: #77837b; font-size: var(--arsenal-meta); }
.save-toast { position: fixed; z-index: 200; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); min-width: min(90vw, 20rem); margin: 0; padding: .85rem 1rem; background: var(--signal-mint); color: var(--ink); box-shadow: 0 1rem 3rem rgba(0,0,0,.35); font-family: var(--mono); font-size: var(--arsenal-label); font-weight: 800; letter-spacing: .07em; text-align: center; text-transform: uppercase; }

@media (hover: hover) {
  .panel-tab:hover { color: white; }
  .check-in-trigger:hover,
  .save-signal:hover { border-color: white; background: white; }
}

@media (min-width: 900px) {
  .arsenal-workspace { grid-template-columns: clamp(11rem, 13vw, 13.5rem) minmax(21rem, 1fr) clamp(21rem, 28vw, 25rem); overflow: clip; }
  .equipment-panel {
    position: relative;
    overflow: visible;
    padding: 0;
    background: transparent;
  }
  .panel-kicker { display: none; }
  /* Loadout wheel (desktop) is defined in the "Loadout wheel" section below. */
  .equipment-readout-left {
    inset: 1.35rem 50% auto auto;
    width: min(28rem, 70%);
    max-width: none;
    transform: translateX(50%);
    text-align: center;
  }
  .equipment-role { margin: 0 0 .28rem; }
  .equipment-readout-left h2 {
    max-width: none;
    font-size: clamp(2.5rem, 4vw, 4.75rem);
    line-height: .9;
    white-space: nowrap;
  }
  .equipment-figure { transform: translateY(.65rem); }
}

@media (max-width: 1120px) and (min-width: 900px) {
  .player-facts { display: none; }
  .arsenal-workspace { grid-template-columns: 11rem minmax(19rem, 1fr) 21rem; }
  .equipment-figure { width: 78%; }
}

@media (max-width: 899px) {
  .arsenal-page { --arsenal-header: calc(3.75rem + env(safe-area-inset-top, 0px)); padding-top: 0; }
  .arsenal-header { position: sticky; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; padding-inline: .85rem; }
  /* Phone/tablet app bar: brand | player | sound. The player block may shrink but
   * never spill: every box in the chain can go below its content width, so the name
   * truncates with an ellipsis instead of sliding under the wordmark. */
  .app-player { justify-content: flex-end; overflow: hidden; }
  .app-player > div { min-width: 0; }
  .player-context,
  .player-facts { display: none; }
  .app-player h1 { min-width: 0; align-items: center; justify-content: flex-end; font-size: .76rem; }
  .app-player h1 > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* The site's gold Demo tag, short enough to stay visible on phones ("Arsenal" is read, not shown). */
  .app-player h1 small { flex: 0 0 auto; padding: .12rem .35rem; border: 1px solid rgba(255,154,82,.55); color: var(--signal-ember); font-size: var(--arsenal-meta); font-weight: 750; letter-spacing: .075em; line-height: 1.2; }
  .app-player h1 .demo-scope { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* Sound is a system control, not a second call to action: a borderless icon with a
   * full 44px target, set off from the player by a hairline. Mint waves = on. */
  .arsenal-header .sound-toggle { position: relative; width: 2.75rem; margin-right: -.35rem; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .arsenal-header .sound-toggle::before { content: ""; position: absolute; top: 30%; bottom: 30%; left: 0; width: 1px; background: #2c3630; }
  .arsenal-header .sound-toggle:active { transform: scale(.94); }
  .arsenal-header .sound-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .arsenal-workspace { height: auto; min-height: calc(100svh - var(--arsenal-header)); display: flex; flex-direction: column; margin-top: 0; overflow: visible; }
  .equipment-stage { order: 1; min-height: min(50svh, 29rem); }
  .equipment-hero { min-height: min(50svh, 29rem); padding: 1rem; }
  .equipment-readout-left { inset: 1rem auto auto 1rem; max-width: 50%; }
  .equipment-readout-left h2 { font-size: clamp(2rem, 10vw, 3.4rem); }
  .equipment-figure { width: 72%; height: min(45svh, 25rem); min-height: 19rem; }
  .equipment-figure picture { z-index: 4; height: 90%; pointer-events: none; }
  .equipment-readout-right { inset: auto 1rem 1rem auto; width: 42%; }
  .hero-specs div { padding: .42rem 0; }
  .equipment-panel { order: 2; overflow: hidden; overflow: clip; display: block; padding: .75rem 0; background: linear-gradient(180deg, #101612, #111713); }
  .panel-kicker { padding: 0 .85rem .55rem; }
  .provenance-note { margin: 0 .85rem; padding-top: .25rem; }
  .provenance-note summary { min-height: 2.75rem; }
  .inspection-panel { order: 3; overflow: visible; box-shadow: none; }
  .panel-tabs { position: sticky; z-index: 80; top: var(--arsenal-header); order: 1; background: rgba(13,19,16,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .inspection-header { order: 2; min-height: 4.5rem; }
  .panel-scroll { order: 3; overflow: visible; }
  .inspection-mode { min-height: 18rem; padding: 1rem .85rem calc(2rem + env(safe-area-inset-bottom, 0px)); }
  .pocket-dna { height: min(56svh, 26rem); }
}

@media (max-width: 430px) and (max-height: 860px) {
  .equipment-stage,
  .equipment-hero { min-height: 24rem; }
  .equipment-figure { height: 21rem; min-height: 18rem; }
  .equipment-readout-left h2 { font-size: 2.2rem; }
  .equipment-readout-right { width: 45%; }
  .state-lock { margin-bottom: .4rem; }
  .hero-specs div { padding: .35rem 0; }
}

@media (max-width: 430px) {
  .arsenal-header { gap: .4rem; padding-inline: .6rem; }
  .arsenal-header .brand { min-width: 0; }
  .arsenal-header .brand-word { font-size: .82rem; }
  .app-player h1 { font-size: var(--arsenal-label); }
}

/* Below 375px the name needs the room more than the tag does; Demo stays in the Details sheet. */
@media (max-width: 374px) {
  .app-player h1 small { display: none; }
}

/* Release stabilization — preview disclosure, DNA key, reflow fixes. */
.preview-status { grid-column: 1 / -1; justify-self: start; margin-top: -.35rem; min-height: 1.5rem; display: inline-flex; align-items: center; gap: .45rem; color: var(--arsenal-muted); font-family: var(--mono); font-size: var(--arsenal-meta); letter-spacing: 0; text-transform: none; text-decoration: none; }
.preview-status span { padding: .1rem .35rem; border: 1px solid rgba(255,154,82,.55); color: var(--signal-ember); font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.preview-status:hover { color: var(--paper); }
.provenance-note summary { color: #9aa49d; }
.provenance-note p { max-width: 36rem; color: #9aa49d; font-family: var(--body); font-size: .8125rem; }
.dna-key { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: .75rem 0 0; border: 1px solid #303a34; }
.dna-key div { min-width: 0; padding: .6rem .55rem; }
.dna-key div + div { border-left: 1px solid #303a34; }
.dna-key dt { margin-bottom: .2rem; color: var(--arsenal-muted); font-family: var(--mono); font-size: var(--arsenal-meta); letter-spacing: .06em; text-transform: uppercase; }
.dna-key dd { margin: 0; color: #edf0ed; font-family: var(--mono); font-size: var(--arsenal-label); font-weight: 750; }


/* Mobile/tablet hero: stack title, equipment, and specs so the photo never covers text. */
@media (max-width: 899px) {
  .equipment-stage,
  .equipment-hero { min-height: 0; }
  .equipment-hero { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; place-items: stretch; gap: .5rem; padding: 1rem .85rem .9rem; }
  .equipment-readout,
  .equipment-readout-left,
  .equipment-readout-right { position: static; inset: auto; width: auto; max-width: none; }
  .equipment-role { margin-top: 0; }
  .equipment-readout-left h2 { max-width: none; font-size: clamp(2rem, 9vw, 3rem); line-height: .9; }
  .equipment-figure { justify-self: center; width: min(78%, 22rem); height: clamp(15rem, 40svh, 22rem); min-height: 0; }
  .equipment-figure { display: flex; align-items: center; justify-content: center; }
  .equipment-figure picture { height: 100%; min-height: 0; }
  .equipment-figure img { max-height: 100%; }
  .equipment-readout-right { display: grid; gap: .4rem; }
  .state-lock { margin: 0; }
  .hero-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid #303a34; }
  .hero-specs div { grid-template-columns: 1fr; gap: .2rem; padding: .5rem 0; border-bottom: 0; }
  .hero-specs div + div { padding-left: .6rem; border-left: 1px solid #303a34; }
  .hero-specs dd { text-align: left; }
}

@media (max-width: 430px) and (max-height: 860px) {
  .equipment-figure { height: clamp(14rem, 36svh, 19rem); }
}

@media (max-width: 380px) {
  .dna-key { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dna-key div:nth-child(3) { border-left: 0; }
  .dna-key div:nth-child(n+3) { border-top: 1px solid #303a34; }
}

/* Loadout wheel.
   One ellipse drives everything: stick positions, the tray edge (same centre, radii + gap),
   and the selection light, which sits on the tray edge facing the stage.
   Desktop turns the wheel vertically; phones and tablets turn it horizontally. */
@property --slot-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.loadout-rail {
  --wheel-step: 21deg;
  --wheel-ease: cubic-bezier(.22, .8, .22, 1);
  position: relative;
  z-index: 1;
  touch-action: pan-y;
  overscroll-behavior-x: none;
}
.loadout-rail::before,
.loadout-rail::after { content: ""; position: absolute; pointer-events: none; }
.loadout-rail::before {
  z-index: -1;
  border: 1px solid rgba(155,255,224,.2);
  border-radius: 50%;
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
}
.loadout-rail::after {
  z-index: 2;
  border-radius: 999px;
  background: rgba(205,255,241,.92);
  box-shadow: 0 0 .3rem rgba(155,255,224,.9), 0 0 .85rem rgba(155,255,224,.48), 0 0 1.6rem rgba(155,255,224,.22);
  transform: translate(-50%, -50%);
}
.arsenal-page .loadout-slot {
  --pos: 0;
  --slot-angle: calc(var(--pos) * var(--wheel-step));
  --slot-w: 3.6rem;
  --slot-h: 4.8rem;
  position: absolute;
  width: var(--slot-w);
  height: var(--slot-h);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c9ceca;
  opacity: .5;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: --slot-angle 460ms var(--wheel-ease), width 460ms var(--wheel-ease), height 460ms var(--wheel-ease), opacity 260ms ease, transform 200ms var(--wheel-ease);
}
.loadout-slot[data-carousel-position="-2"] { --pos: -2; }
.loadout-slot[data-carousel-position="-1"] { --pos: -1; }
.loadout-slot[data-carousel-position="1"] { --pos: 1; }
.loadout-slot[data-carousel-position="2"] { --pos: 2; }
.loadout-slot[data-carousel-position="-1"],
.loadout-slot[data-carousel-position="1"] { --slot-w: 4.4rem; --slot-h: 5.9rem; opacity: .78; }
.loadout-slot[data-carousel-position="0"] { --slot-w: 5.4rem; --slot-h: 7.2rem; opacity: 1; }
/* A stick wrapping from one end of the wheel to the other fades across instead of cutting through the middle. */
.arsenal-page .loadout-slot[data-carousel-wrap] { transition: none; animation: wheel-wrap 460ms ease both; }
@keyframes wheel-wrap { from { opacity: 0; } }
.loadout-slot::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 0;
  width: 78%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(155,255,224,.34) 0%, rgba(155,255,224,.12) 42%, transparent 74%);
  filter: blur(.45rem);
  opacity: 0;
  transform: translate(-50%, .35rem) scale(.8);
  transition: opacity 180ms ease, transform 220ms var(--wheel-ease);
  pointer-events: none;
}
.loadout-slot img {
  grid-area: 1 / 1;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(.34) saturate(.68) contrast(1.04) drop-shadow(0 .65rem .48rem rgba(0,0,0,.68));
  transform: scale(.94);
  transition: transform 200ms var(--wheel-ease), filter 200ms ease;
}
.loadout-slot[data-role="retired"] img { filter: grayscale(.9) saturate(.3) contrast(1) drop-shadow(0 .65rem .48rem rgba(0,0,0,.68)); }
.loadout-slot[aria-selected="true"] { color: white; }
.loadout-slot[aria-selected="true"]::before { opacity: .72; transform: translate(-50%, .12rem) scale(1); }
.loadout-slot[aria-selected="true"] img { filter: saturate(.96) contrast(1.08) brightness(1.05) drop-shadow(0 .9rem .65rem rgba(0,0,0,.8)); transform: scale(1.04); }
.slot-copy { position: absolute; z-index: 2; top: calc(100% + .3rem); left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none; }
.slot-copy strong,
.slot-state { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.slot-copy span { color: var(--arsenal-muted); font-family: var(--mono); font-size: var(--arsenal-meta); font-weight: 720; letter-spacing: .075em; text-transform: uppercase; transition: color 200ms ease; }
.loadout-slot[aria-selected="true"] .slot-copy span { color: var(--signal-mint); }
@media (hover: hover) {
  .arsenal-page .loadout-slot:not([aria-selected="true"]):hover { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  .loadout-slot:not([aria-selected="true"]):hover img { filter: saturate(.9) contrast(1.07) brightness(1.03) drop-shadow(0 .8rem .58rem rgba(0,0,0,.76)); }
}

@media (min-width: 900px) {
  .loadout-rail {
    --wheel-focus: 3.7rem;   /* rail right edge -> selected stick centre */
    --wheel-rx: 170%;        /* of rail width */
    --wheel-ry: 54%;         /* of rail height */
    --wheel-gap: 3.5rem;     /* stick path -> tray edge */
    display: block;
    flex: 1;
    min-height: 0;
    margin: 0;
  }
  .loadout-rail::before {
    left: calc(100% - var(--wheel-focus) - 2 * var(--wheel-rx) - var(--wheel-gap));
    top: calc(50% - var(--wheel-ry) - var(--wheel-gap));
    width: calc(2 * var(--wheel-rx) + 2 * var(--wheel-gap));
    height: calc(2 * var(--wheel-ry) + 2 * var(--wheel-gap));
    background:
      radial-gradient(ellipse 12% 30% at 100% 50%, rgba(155,255,224,.08), transparent),
      linear-gradient(90deg, rgba(7,11,9,.96) 55%, rgba(19,29,23,.62) 85%, rgba(30,42,35,.72) 100%);
    box-shadow: inset -1.4rem 0 2.8rem rgba(0,0,0,.18), 1.3rem 0 3.2rem rgba(0,0,0,.13);
  }
  .loadout-rail::after {
    left: calc(100% - var(--wheel-focus) + var(--wheel-gap));
    top: 50%;
    width: 3px;
    height: 3.4rem;
  }
  .arsenal-page .loadout-slot {
    left: calc(100% - var(--wheel-focus) + var(--wheel-rx) * (cos(var(--slot-angle)) - 1));
    top: calc(50% + var(--wheel-ry) * sin(var(--slot-angle)));
  }
}

@media (max-width: 899px) {
  .panel-kicker { display: none; }
  /* Same ground as the stage, so the arch is the only edge between them. */
  .equipment-panel { padding: 0; background: #0b100d; }
  .loadout-rail {
    --wheel-focus: 3.5rem;   /* rail top -> selected stick centre */
    --wheel-rx: 49%;         /* of rail width; keeps outer labels 16px+ inside the screen */
    --wheel-ry: 8rem;
    --wheel-gap: 3.3rem;
    display: block;
    height: var(--wheel-dock);
    margin: 0;
  }
  .loadout-rail::before {
    left: calc(50% - var(--wheel-rx) - var(--wheel-gap));
    top: calc(var(--wheel-focus) - var(--wheel-gap));
    width: calc(2 * var(--wheel-rx) + 2 * var(--wheel-gap));
    height: calc(2 * var(--wheel-ry) + 2 * var(--wheel-gap));
    background:
      radial-gradient(ellipse 30% 12% at 50% 0%, rgba(155,255,224,.08), transparent),
      linear-gradient(180deg, rgba(30,42,35,.72) 0%, rgba(19,29,23,.62) 20%, rgba(7,11,9,.96) 60%);
  }
  .loadout-rail::after {
    left: 50%;
    top: calc(var(--wheel-focus) - var(--wheel-gap));
    width: 3.4rem;
    height: 3px;
  }
  .arsenal-page .loadout-slot {
    --slot-w: 2.9rem;
    --slot-h: 3.8rem;
    left: calc(50% + var(--wheel-rx) * sin(var(--slot-angle)));
    top: calc(var(--wheel-focus) + var(--wheel-ry) * (1 - cos(var(--slot-angle))));
  }
  .loadout-slot[data-carousel-position="-1"],
  .loadout-slot[data-carousel-position="1"] { --slot-w: 3.4rem; --slot-h: 4.5rem; }
  .loadout-slot[data-carousel-position="0"] { --slot-w: 4.1rem; --slot-h: 5.4rem; }
  .slot-copy { top: calc(100% + .15rem); }

  /* First screen: header + stick + status/specs + wheel fill the small viewport exactly,
     with the wheel docked on the bottom edge. Details scroll in beneath it. */
  .arsenal-page { --wheel-dock: calc(9.75rem + env(safe-area-inset-bottom, 0px)); }
  .equipment-stage { height: calc(100svh - var(--arsenal-header) - var(--wheel-dock)); min-height: 21rem; }
  .equipment-hero { height: 100%; min-height: 0; }
  .equipment-figure { width: min(84%, 26rem); height: 100%; min-height: 0; }
  /* Details form a full second screen, so "Details" pages cleanly under the header. */
  .equipment-readout-right { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .equipment-readout-right .hero-specs { grid-column: 1 / -1; }
  .details-jump { min-height: 2.75rem; display: inline-flex; align-items: center; gap: .4rem; padding: 0 .1rem 0 .75rem; border: 0; background: transparent; color: #c5cbc7; font-family: var(--mono); font-size: var(--arsenal-label); font-weight: 750; letter-spacing: .075em; text-transform: uppercase; cursor: pointer; }
}

/* Tablets: a larger wheel so the sticks keep pace with the bigger stage. */
@media (min-width: 600px) and (max-width: 899px) {
  .arsenal-page { --wheel-dock: calc(12rem + env(safe-area-inset-bottom, 0px)); }
  .loadout-rail { --wheel-focus: 4.5rem; --wheel-ry: 11rem; --wheel-gap: 4.2rem; --wheel-rx: 46%; }
  .arsenal-page .loadout-slot { --slot-w: 3.6rem; --slot-h: 4.8rem; }
  .loadout-slot[data-carousel-position="-1"],
  .loadout-slot[data-carousel-position="1"] { --slot-w: 4.3rem; --slot-h: 5.7rem; }
  .loadout-slot[data-carousel-position="0"] { --slot-w: 5.2rem; --slot-h: 7rem; }
}

.details-jump { display: none; }
@media (max-width: 899px) { .details-jump { display: inline-flex; } }

@media (max-width: 899px) {
  /* The wheel's tray is wider than the screen; contain it inside the wheel so nothing can pan sideways. */
  .loadout-rail { overflow: hidden; overflow: clip; }

  /* One ring system, concentric with the stick, sized to the smaller side of its frame. */
  .loadout-atmosphere::after { display: none; }
  .equipment-figure { container-type: size; }
  .equipment-orbit { inset: 0; margin: auto; width: 88%; height: auto; aspect-ratio: 1; border-color: rgba(155,255,224,.14); transform: none; }
  @supports (width: 1cqmin) { .equipment-orbit { width: 96cqmin; } }
  .equipment-orbit::before { content: ""; position: absolute; inset: 17%; border: 1px solid rgba(155,255,224,.08); border-radius: 50%; }
  .equipment-orbit::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(155,255,224,.07), transparent 62%); }

}

/* Floating Check In: the primary action stays on the phone/tablet first screen. */
.check-in-float { display: none; }
@media (max-width: 899px) {
  /* Long stick names wrap before they can run under the button. */
  .equipment-readout-left h2 { max-width: calc(100% - 7.25rem); }
  .check-in-float { position: absolute; z-index: 5; top: 1rem; right: .85rem; display: inline-flex; min-width: 0; gap: .55rem; padding: .7rem .7rem; box-shadow: 0 .6rem 1.6rem rgba(0,0,0,.35), 0 0 0 1px rgba(155,255,224,.35); }
}

/* Details sheet (phones and tablets): slides up over the first screen, dims the page behind it,
   follows a drag on its grabber/tabs/header, and snaps open or shut. */
.sheet-grabber,
.sheet-backdrop { display: none; }
@media (max-width: 899px) {
  .sheet-backdrop {
    position: fixed;
    z-index: 140;
    inset: 0;
    display: block;
    background: rgba(4,7,5,.62);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
  }
  body[data-sheet="open"] .sheet-backdrop { opacity: 1; pointer-events: auto; }
  body[data-sheet="open"] { overflow: hidden; }
  .inspection-panel {
    position: fixed;
    z-index: 150;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(100svh - var(--arsenal-header) - .75rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top: 1px solid #2c3731;
    border-radius: 1.25rem 1.25rem 0 0;
    background: #121914;
    box-shadow: 0 -1.5rem 3rem rgba(0,0,0,.45);
    transform: translateY(calc(100% + 3.5rem));
    transition: transform 380ms cubic-bezier(.32, .72, 0, 1);
  }
  body[data-sheet="open"] .inspection-panel { transform: none; }
  .inspection-panel[data-dragging] { transition: none; }
  .sheet-grabber { position: relative; flex: 0 0 auto; order: 0; display: block; height: 1.6rem; cursor: grab; touch-action: none; }
  .sheet-grabber::before { content: ""; position: absolute; top: .6rem; left: 50%; width: 2.5rem; height: 5px; border-radius: 999px; background: #46534b; transform: translateX(-50%); }
  .panel-tabs { position: relative; top: auto; padding-top: .1rem; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; touch-action: none; }
  .inspection-header { touch-action: none; }
  .panel-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .inspection-mode { min-height: 0; }
  .provenance-note { margin-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); }
}
/* Swiping up on the stick opens the sheet; only where the first screen fits, so short landscape screens still scroll. */
@media (max-width: 899px) and (min-height: 501px) {
  .equipment-stage { touch-action: pinch-zoom; }
}

@media (prefers-reduced-motion: reduce) {
  .arsenal-page { scroll-behavior: auto; }
  .equipment-figure picture,
  .loadout-slot,
  .loadout-slot img,
  .slot-state { transition: none !important; }
  .equipment-hero.is-swapping .equipment-figure picture { opacity: 1; transform: none; }
  .loadout-rail { scroll-behavior: auto; }
  .arsenal-page .loadout-slot[data-carousel-wrap] { animation: none; }
  .inspection-panel,
  .sheet-backdrop { transition: none !important; }
}
