/* ============================================================
   INTERACTIVE ARSENAL (features page)
   ============================================================ */
.arsenal__head { max-width: 640px; margin-bottom: clamp(22px, 4vw, 40px); }
.arsenal__head h2 { font-family: var(--display); font-size: clamp(28px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.02em; margin: 12px 0 10px; }
.arsenal__head p { color: var(--fg-muted); font-size: 16px; max-width: 64ch; }
.arsenal__head .ticks--row { display: flex; flex-wrap: wrap; gap: 9px 24px; margin-top: 18px; }
.arsenal__head .ticks--row li { font-size: 14px; color: var(--fg-muted); }
.arsenal__head .ticks--row svg { width: 17px; height: 17px; margin-top: 1px; }
.arsenal__head .frow__stat { margin-top: 16px; }

.arsenal__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: clamp(16px, 2.4vw, 28px); align-items: stretch; }

/* --- 3D stage --- */
.ar-stage {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-strong); min-height: 460px;
  background:
    radial-gradient(120% 90% at 50% 18%, rgba(34,211,238,0.12), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--bg-1));
  isolation: isolate;
}
.ar-viewport { position: absolute; inset: 0; width: 100%; height: 100%; }
.ar-viewport canvas { width: 100% !important; height: 100% !important; display: block; cursor: grab; touch-action: none; }
.ar-viewport canvas:active { cursor: grabbing; }
.ar-stage__meta { position: absolute; top: 14px; left: 16px; z-index: 2; pointer-events: none; display: flex; flex-direction: column; gap: 3px; }
.ar-stage__name { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; text-shadow: 0 2px 12px rgba(0,0,0,0.6); }
.ar-stage__class { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--aqua); }
.ar-stage__hint { position: absolute; right: 14px; bottom: 12px; z-index: 2; pointer-events: none; display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; color: var(--fg-dim); opacity: 0.85; }
.ar-stage__hint svg { opacity: 0.8; }
.ar-stage__status { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; text-align: center; padding: 20px; font-family: var(--mono); font-size: 12px; color: var(--fg-muted); background: rgba(4,7,10,0.55); backdrop-filter: blur(2px); }
.ar-stage__status.is-hidden { display: none; }
.ar-stage::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 0.2s var(--ease);
  background: rgba(4,7,10,0.35) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 50 50'><circle cx='25' cy='25' r='20' fill='none' stroke='%2322d3ee' stroke-width='4' stroke-linecap='round' stroke-dasharray='80 40'><animateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.9s' repeatCount='indefinite'/></circle></svg>") center / 34px no-repeat; }
.ar-stage.is-busy::after { opacity: 1; }

/* --- controls panel --- */
.ar-panel { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ar-field { min-width: 0; }
.ar-field__label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 10px; }
.ar-field__hint { color: var(--fg-dim); text-transform: none; letter-spacing: 0; opacity: 0.7; margin-left: 6px; }

/* class tabs */
.ar-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 11px; }
.ar-tab { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--fg-muted); transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease); }
.ar-tab:hover { color: var(--fg); border-color: var(--aqua-line); }
.ar-tab.is-on { color: var(--on-aqua); background: var(--aqua); border-color: var(--aqua); font-weight: 700; }

/* weapon list */
.ar-weapons { display: flex; flex-wrap: wrap; gap: 7px; max-height: 148px; overflow-y: auto; padding: 2px 4px 2px 0; scrollbar-width: thin; scrollbar-color: var(--aqua-line) transparent; }
.ar-weapons::-webkit-scrollbar { width: 6px; }
.ar-weapons::-webkit-scrollbar-thumb { background: var(--aqua-line); border-radius: 999px; }
.ar-wpn { font-size: 13px; padding: 7px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--fg-muted); transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease); }
.ar-wpn:hover { color: var(--fg); border-color: var(--aqua-line); background: var(--surface-2); }
.ar-wpn.is-on { color: var(--fg); border-color: var(--aqua); background: var(--aqua-ghost); box-shadow: inset 0 0 0 1px var(--aqua-line); }

/* camo swatches */
.ar-camos { display: flex; gap: 8px; overflow-x: auto; padding: 3px 2px 10px; scrollbar-width: thin; scrollbar-color: var(--aqua-line) transparent; }
.ar-camos::-webkit-scrollbar { height: 6px; }
.ar-camos::-webkit-scrollbar-thumb { background: var(--aqua-line); border-radius: 999px; }
.ar-camo { flex: none; width: 46px; height: 46px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); padding: 0; position: relative; transition: transform 0.16s var(--ease), border-color 0.16s var(--ease); background: var(--surface-2); }
.ar-camo img { width: 100%; height: 100%; object-fit: cover; }
.ar-camo:hover { transform: translateY(-2px); border-color: var(--aqua-line); }
.ar-camo.is-on { border-color: var(--aqua); box-shadow: 0 0 0 2px var(--aqua), 0 6px 16px rgba(34,211,238,0.25); }

/* attachments (engine-built selects) */
.ar-attachments { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.ar-attachments.is-empty { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--fg-dim); line-height: 1.5; }
.attachment-choice { display: flex; flex-direction: column; min-width: 0; }
.attachment-choice > label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-dim); margin-bottom: 5px; }
.attachment-choice select {
  width: 100%; appearance: none; -webkit-appearance: none; font: inherit; font-size: 13px;
  padding: 9px 30px 9px 11px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239db1b9' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 10px center;
  color: var(--fg); cursor: pointer; transition: border-color 0.18s var(--ease); text-overflow: ellipsis;
}
.attachment-choice select:hover { border-color: var(--aqua-line); }
.attachment-choice select:disabled { opacity: 0.55; cursor: default; }
.attachment-choice select option { background: var(--surface); color: var(--fg); }

.ar-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.ar-cta .btn { flex: 1 1 auto; justify-content: center; }

/* responsive */
@media (max-width: 880px) {
  .arsenal__grid { grid-template-columns: 1fr; }
  .ar-stage { aspect-ratio: 1 / 1; min-height: 340px; }
}
@media (max-width: 440px) {
  .ar-attachments { grid-template-columns: 1fr; }
  .ar-stage { aspect-ratio: 4 / 5; }
}
@media (prefers-reduced-motion: reduce) {
  .ar-camo, .ar-wpn, .ar-tab { transition: none; }
  .ar-camo:hover { transform: none; }
}

/* --- Arsenal: weapon marquee cards + reveal --- */
.vcard--wpn { width: 300px; text-align: left; }
.vcard--wpn .vcard__img { height: 138px; }
.vcard--wpn .vcard__img img { max-height: 138px; }
.vcard--wpn .vcard__meta { margin-top: 12px; }
.arsenal__more { text-align: center; margin-top: 36px; }
.arsenal__more-hint { margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--fg-dim); }
.arsenal__deep { margin-top: 44px; }
.arsenal__deep.is-open { animation: arDeepIn .42s var(--ease) both; }
@keyframes arDeepIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .arsenal__deep.is-open { animation: none; } }

/* Workshop controls in the Features arsenal. */
#arReset { pointer-events:auto; align-self:flex-start; margin-top:6px; padding:5px 10px; border:1px solid var(--line-strong); border-radius:6px; background:var(--surface-2); color:inherit; cursor:pointer; }
#arCamoSearch { width:100%; margin-bottom:10px; padding:9px 12px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface-2); color:var(--text); }
.ar-camo[hidden] { display:none; }
.ar-camo:disabled,.ar-wpn:disabled { cursor:wait; opacity:.6; }

/* Compact, searchable finish library. */
.ar-camo-current { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; min-height:32px; }
#arCamoSelected { font-size:13px; font-weight:600; color:var(--fg); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ar-original { flex-shrink:0; padding:6px 10px; border:1px solid var(--line-strong); border-radius:7px; color:var(--fg-muted); background:transparent; font-size:12px; cursor:pointer; }
.ar-original[aria-pressed="true"] { color:var(--aqua); border-color:var(--aqua-line); background:rgba(34,211,238,.08); }
#arCamoSearch { font-size:13px; color:var(--fg); padding:10px 12px; }
#arCamoSearch:focus-visible { outline:2px solid var(--aqua); outline-offset:2px; }
.ar-camos { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:9px; max-height:184px; overflow-y:auto; overflow-x:hidden; padding:4px 8px 4px 3px; scrollbar-gutter:stable; }
.ar-camo { width:100%; height:auto; aspect-ratio:1; border-radius:8px; }
.ar-camo.is-on { border-color:var(--aqua); box-shadow:0 0 0 2px var(--aqua); }
.ar-camo.is-on::after { content:'✓'; position:absolute; right:3px; bottom:3px; width:17px; height:17px; display:grid; place-items:center; background:var(--aqua); color:#071317; border-radius:50%; font-size:12px; font-weight:700; }
.ar-camo:focus-visible,.ar-original:focus-visible { outline:2px solid var(--aqua); outline-offset:2px; }
.ar-camo-empty { margin:8px 0; font-size:13px; color:var(--fg-muted); }


#arsenalDeep { scroll-margin-top: 100px; }

/* Keep the workshop visible, with an explicit lightweight preview start. */
.ar-show { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:4; background:#1984ed; color:#fff; border:1px solid #60afff; padding:14px 26px; border-radius:10px; box-shadow:0 8px 32px #167ad744; white-space:nowrap; }
.ar-show:hover { background:#3298ff; transform:translate(-50%,-50%); }
.ar-show[hidden] { display:none; }
.ar-stage:not([data-ready="true"]) .ar-stage__hint { visibility:hidden; }
.ar-stage:has(.ar-show:not([hidden])) .ar-stage__status { inset:auto 12px 20px; background:none; backdrop-filter:none; }
