/* Dreadful Armory - discord-bot-visual-style.md. Near-black, faint grid, crimson selection,
   purple gear, steel/red vehicles, Bahnschrift caps. Offline: system fonts only. */
:root {
  --bg: #0b0c0e; --bg2: #101114; --panel: #141518; --panel2: #191a1e; --line: #2a2c31; --line2: #3a3c42;
  --text: #f4f2ef; --muted: #8d9096; --dim: #5d6066;
  --crimson: #b0182c; --crimson-glow: #e0233b; --purple: #6b2fa3; --purple-glow: #9b5bd6; --steel: #6f7c88; --steel-glow: #9aa7b3;
  --ok: #7fd18b; --warn: #ffcf5a; --bad: #ff6b7a;
  --accent: var(--crimson); --glow: var(--crimson-glow);
  --head: Bahnschrift, "DIN Alternate", "Segoe UI", system-ui, sans-serif;
  --body: "Segoe UI", system-ui, sans-serif;
  --chamfer: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
body[data-accent="purple"] { --accent: var(--purple); --glow: var(--purple-glow); }
body[data-accent="steel"] { --accent: var(--steel); --glow: var(--crimson-glow); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text); font: 14px/1.4 var(--body); overflow: hidden;
  background:
    radial-gradient(90% 60% at 60% 115%, color-mix(in srgb, var(--glow) 22%, transparent), transparent 70%),
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg);
  display: grid; grid-template-rows: 60px 1fr 22px; grid-template-columns: minmax(0, 1fr);
}
.boot {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; gap: 22px;
  background:
    radial-gradient(60% 50% at 50% 110%, rgba(224,35,59,.22), transparent 72%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg);
}
.boot .brand { min-height: 58px; box-shadow: 0 14px 45px rgba(0,0,0,.45); }
.boot p { margin: 0; color: var(--muted); font: 700 12px var(--head); letter-spacing: .16em; text-transform: uppercase; }
.boot #boot-retry { margin-top: 18px; min-height: 44px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
code { font: 12px Consolas, monospace; color: #cfcac4; }
.dim { color: var(--muted); }

/* ---- top bar */
.top { display: flex; align-items: stretch; gap: 18px; border-bottom: 1px solid var(--line); background: rgba(8,9,10,.85); min-width: 0; }
.brand { display: flex; align-items: center; font: 700 15px var(--head); letter-spacing: .3em; flex: none; }
.brand .mark { background: var(--crimson); align-self: stretch; display: flex; align-items: center; padding: 0 16px 0 20px; }
.brand .word { padding: 0 16px; color: var(--text); background: #e9e6e1; color: #111; align-self: stretch; display: flex; align-items: center; }
#nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; min-width: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
#nav::-webkit-scrollbar { display: none; }
.tab { scroll-snap-align: center; }
.tab .short { display: none; }
.tab { background: none; border: 0; padding: 18px 16px; min-height: 44px; font: 700 13px var(--head); letter-spacing: .22em; color: var(--muted); white-space: nowrap; position: relative; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--crimson-glow); }
.tab.on::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 10px; height: 2px; background: var(--crimson-glow); }
#status { display: flex; align-items: center; gap: 8px; padding-right: 16px; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line2); background: var(--panel); padding: 4px 9px; font: 700 11px var(--head); letter-spacing: .12em; white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); } .pill.off { color: var(--muted); } .pill.warn { color: var(--warn); } .pill.mock { color: #111; background: var(--warn); border-color: var(--warn); }

/* ---- three columns */
main { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(300px, 360px); min-height: 0; }
#catalog { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: rgba(12,13,15,.78); }
#list-head { padding: 14px 14px 6px; }
.searchbox { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); background: var(--bg2); padding: 0 10px; color: var(--muted); }
.searchbox:focus-within { border-color: var(--accent); }
.searchbox input { flex: 1; background: none; border: 0; outline: 0; padding: 9px 0; color: var(--text); min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.chip { border: 1px solid var(--line2); background: var(--panel); padding: 3px 8px; font: 700 10.5px var(--head); letter-spacing: .1em; color: var(--muted); }
.chip b { font-weight: 400; margin-left: 5px; color: var(--dim); }
.chip.on { color: #fff; background: var(--crimson); border-color: var(--crimson); }
.chip.on b { color: rgba(255,255,255,.75); }
.check { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--muted); font-size: 12px; }
.count { padding: 4px 14px 6px; font: 700 11px var(--head); letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
#list { flex: 1; overflow-y: auto; position: relative; min-height: 0; scrollbar-color: var(--line2) transparent; }
#list-inner { position: relative; }
.row { position: absolute; left: 8px; right: 8px; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 1px solid transparent; background: none; text-align: left; }
.row:hover { background: var(--panel2); border-color: var(--line); }
.row.sel { background: linear-gradient(90deg, color-mix(in srgb, var(--crimson) 28%, transparent), transparent 85%); border-color: color-mix(in srgb, var(--crimson-glow) 55%, transparent); box-shadow: inset 3px 0 0 var(--crimson-glow); }
.row.unsel { opacity: .55; }
.thumb { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: var(--bg2); border: 1px solid var(--line); clip-path: var(--chamfer); }
.thumb.small { width: 26px; height: 26px; }
.thumb { position: relative; overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb.has-img svg { visibility: hidden; }
.t-crimson { color: #e4566a; } .t-purple { color: #b48ae4; } .t-steel { color: var(--steel-glow); }
.rt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rn { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.star { color: var(--warn); }
.tag { font: 700 9.5px var(--head); letter-spacing: .12em; padding: 2px 6px; border: 1px solid; white-space: nowrap; }
.tag.ok { color: var(--ok); border-color: #2f6b3a; } .tag.warn { color: var(--warn); border-color: #7a6224; } .tag.bad { color: var(--bad); border-color: #8a2430; } .tag.dim { color: var(--muted); border-color: var(--line2); }
.empty { padding: 18px; color: var(--muted); }

/* ---- centre */
#detail { overflow-y: auto; min-height: 0; padding: 18px 22px 30px; }
.hero { position: relative; aspect-ratio: 16 / 8; max-height: 46vh; min-height: 220px; width: 100%; overflow: hidden; border: 1px solid var(--line); clip-path: var(--chamfer); background: linear-gradient(#0d0e10, #131418); }
.hero.small { aspect-ratio: auto; min-height: 150px; }
.hero .grid { position: absolute; inset: 0; background: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 40px 40px; }
.hero .glow { position: absolute; inset: 0; background: radial-gradient(70% 70% at 60% 110%, color-mix(in srgb, var(--glow) 55%, transparent), transparent 70%), radial-gradient(40% 50% at 62% 45%, rgba(255,255,255,.05), transparent 70%); }
.hero .kicker { position: absolute; left: 0; top: 0; background: var(--accent); color: #fff; font: 700 12px var(--head); letter-spacing: .3em; padding: 7px 14px 7px 16px; }
.hero .art { position: absolute; left: 30%; right: 4%; top: 6%; bottom: 26%; display: grid; place-items: center; color: color-mix(in srgb, var(--glow) 55%, #fff 10%); opacity: .5; }
.hero .art svg { width: min(46%, 260px); height: auto; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--glow) 60%, transparent)); }
.hero .art .state { display: none; position: absolute; bottom: 0; font: 700 10px var(--head); letter-spacing: .3em; color: var(--warn); opacity: .9; }
.hero .art:not(.has-img):not(.loading):not(.missing) .pending, .hero .art.missing .missing-t, .hero .art.loading .loading-t { display: block; }
.hero .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .art.has-img { inset: 0; opacity: 1; }
.hero .art.has-img svg { display: none; }
.hero .art.loading::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.06) 50%, transparent 80%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .hero .art.loading::before { animation: none; } }
.hero h1 { position: absolute; left: 26px; bottom: 34px; margin: 0; font: 700 clamp(26px, 4.4vw, 54px)/1 var(--head); letter-spacing: .06em; text-shadow: 0 3px 18px rgba(0,0,0,.85); max-width: 90%; }
.hero.small h1 { position: static; padding: 52px 26px 0; }
.hero .sub { position: absolute; left: 28px; bottom: 12px; margin: 0; color: #c9c5bf; }
.hero.small .sub { position: static; padding: 8px 28px 18px; text-transform: none; }
.panel { margin-top: 16px; background: rgba(20,21,24,.86); border: 1px solid var(--line); padding: 16px 18px; clip-path: var(--chamfer); }
.info { display: grid; grid-template-columns: 130px 1fr; gap: 7px 14px; margin: 0; }
.info dt { color: var(--accent); filter: brightness(1.5); font: 700 11px var(--head); letter-spacing: .14em; text-transform: uppercase; padding-top: 2px; }
.info dd { margin: 0; }
.note { color: #d9cfa6; background: rgba(255,207,90,.06); border-left: 2px solid var(--warn); padding: 7px 10px; margin: 12px 0 0; font-size: 13px; }
.hint { color: var(--dim); font-size: 12px; margin: 8px 0 0; }
.contents { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 4px; }
.contents li { padding: 6px 10px; background: var(--bg2); border-left: 2px solid var(--accent); }
.contents li.a-policy, .contents li.a-unavailable { border-left-color: var(--dim); color: var(--muted); }
.addbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; font: 700 10.5px var(--head); letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.field select { background: var(--bg2); border: 1px solid var(--line2); padding: 7px 8px; text-transform: none; letter-spacing: 0; font: 13px var(--body); }
.stepper { display: inline-flex; border: 1px solid var(--line2); background: var(--bg2); }
.stepper button { width: 34px; border: 0; background: none; font-size: 18px; color: var(--text); }
.stepper button:hover { background: var(--panel2); }
.stepper input { width: 52px; text-align: center; border: 0; background: none; padding: 7px 0; font: 600 14px var(--body); letter-spacing: 0; }
.stepper.small button { width: 24px; font-size: 15px; } .stepper.small input { width: 34px; padding: 3px 0; font-size: 13px; }
.primary { background: var(--crimson); border: 0; color: #fff; font: 700 13px var(--head); letter-spacing: .2em; padding: 11px 20px; clip-path: var(--chamfer); }
.primary:hover:not(:disabled) { background: var(--crimson-glow); }
.primary:disabled { background: #3a2a2d; color: #8d7f81; }
.ghost { background: none; border: 1px solid var(--line2); font: 700 12px var(--head); letter-spacing: .16em; padding: 10px 16px; }
.spawn { background: repeating-linear-gradient(135deg, #1c1d21 0 8px, #222327 8px 16px); border: 1px dashed var(--line2); color: var(--dim); font: 700 13px var(--head); letter-spacing: .2em; padding: 11px 20px; }
.lcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.lcard { display: flex; flex-direction: column; gap: 3px; text-align: left; background: var(--bg2); border: 1px solid var(--line); padding: 12px 14px; clip-path: var(--chamfer); }
.lcard.sel { border-color: var(--crimson-glow); box-shadow: inset 3px 0 0 var(--crimson-glow); }
.lcard span { font-size: 12px; color: var(--muted); }
.back { display: none; }

/* ---- right: loadout */
#loadout { border-left: 1px solid var(--line); background: rgba(12,13,15,.85); padding: 14px 16px; overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.lhead { display: flex; flex-direction: column; gap: 6px; }
.kick { font: 700 11px var(--head); letter-spacing: .24em; color: var(--crimson-glow); }
.kick em { color: var(--warn); font-style: normal; }
.lhead select, .lname { background: var(--bg2); border: 1px solid var(--line2); padding: 7px 9px; width: 100%; }
.lname { font: 700 18px var(--head); letter-spacing: .08em; text-transform: uppercase; }
.lname:focus, .lhead select:focus { outline: 0; border-color: var(--crimson-glow); }
.lbtns { display: flex; gap: 6px; }
.lbtns button { flex: 1; background: var(--panel); border: 1px solid var(--line2); font: 700 10.5px var(--head); letter-spacing: .14em; padding: 6px 0; color: var(--muted); }
.lbtns button:hover { color: var(--text); border-color: var(--muted); }
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 80px; }
.lines li { display: flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line); padding: 5px 6px; }
.lines li.empty { color: var(--muted); border-style: dashed; padding: 14px; font-size: 13px; }
.lines .ln { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lines select { background: var(--bg2); border: 1px solid var(--line2); font-size: 12px; padding: 2px; }
.x { background: none; border: 0; color: var(--muted); font-size: 18px; width: 22px; }
.x:hover { color: var(--bad); }
.sum { display: flex; justify-content: space-between; font: 700 11px var(--head); letter-spacing: .1em; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.problems { margin: 0; padding: 8px 10px 8px 24px; background: rgba(255,107,122,.07); border-left: 2px solid var(--bad); color: #f0b3ba; font-size: 12.5px; }
.wide { width: 100%; }
.why { margin: 0; font-size: 11.5px; color: var(--dim); }
#loadout-tab { display: none; }
#toast { position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px); opacity: 0; transition: .2s; background: #1b1c20; border: 1px solid var(--line2); border-left: 3px solid var(--crimson-glow); padding: 9px 14px; pointer-events: none; max-width: 90vw; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.proto { font: 700 10px/22px var(--head); letter-spacing: .22em; text-align: center; color: #111; background: var(--warn); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.fatal { padding: 30px; color: var(--bad); white-space: pre-wrap; }

/* ---- mid width: loadout under the detail */
@media (max-width: 1180px) {
  main { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  #loadout { position: fixed; right: 0; top: 60px; bottom: 22px; width: min(380px, 92vw); transform: translateX(100%); transition: transform .2s; z-index: 5; box-shadow: -20px 0 40px rgba(0,0,0,.6); }
  body[data-pane="loadout"] #loadout { transform: none; }
  #loadout-tab { display: block; position: fixed; right: 16px; bottom: 36px; z-index: 6; background: var(--crimson); border: 0; color: #fff; font: 700 12px var(--head); letter-spacing: .2em; padding: 11px 16px; clip-path: var(--chamfer); }
  #loadout-tab b { margin-left: 6px; background: rgba(0,0,0,.35); padding: 1px 6px; }
  .lhead .back { display: inline-block; align-self: flex-start; background: none; border: 1px solid var(--line2); font: 700 11px var(--head); letter-spacing: .14em; padding: 5px 10px; }
}

/* ---- phone: list / detail / loadout, one at a time */
@media (max-width: 760px) {
  body { grid-template-rows: auto 1fr 22px; }
  .top { flex-wrap: wrap; gap: 0; }
  .brand { font-size: 12px; height: 40px; }
  #status { margin-left: auto; padding: 0 10px; gap: 5px; }
  #status .pill { font-size: 9.5px; padding: 3px 6px; }
  #status .pill.mock, #status .nm { display: none; }
  .top > * { min-width: 0; }
  #nav { order: 3; flex-basis: 100%; justify-content: flex-start; border-top: 1px solid var(--line); }
  .tab { padding: 12px 12px; font-size: 11.5px; letter-spacing: .14em; }
  .tab.on::after { bottom: 4px; left: 12px; right: 12px; }
  main { grid-template-columns: 1fr; }
  #catalog, #detail { grid-column: 1; grid-row: 1; }
  body[data-pane="list"] #detail, body[data-pane="detail"] #catalog, body[data-pane="loadout"] #catalog { display: none; }
  body[data-pane="loadout"] #detail { display: none; }
  #loadout { top: 0; bottom: 22px; width: 100vw; background: var(--bg); }
  body[data-pane="loadout"] #loadout-tab { display: none; }
  #detail { padding: 10px 12px 90px; }
  #detail > .back { display: inline-block; background: none; border: 1px solid var(--line2); font: 700 11px var(--head); letter-spacing: .14em; padding: 6px 12px; margin-bottom: 10px; }
  .hero { aspect-ratio: 4 / 3; max-height: none; min-height: 0; }
  .hero h1 { left: 14px; bottom: 30px; font-size: 26px; }
  .hero .sub { left: 16px; bottom: 9px; font-size: 12.5px; }
  .hero .art { left: 8%; right: 8%; bottom: 30%; }
  .info { grid-template-columns: 96px 1fr; }
  .addbar .primary, .addbar .spawn { flex: 1 1 100%; }
  .proto { font-size: 8.5px; letter-spacing: .12em; }
}

/* ---- 4C refinements: availability, readability, sorting, touch */
.panel, .explain, .note, .reasons, .why-not, .contents li { overflow-wrap: anywhere; }
.statusline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.avail { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 18px; }
.avail li { display: flex; align-items: baseline; gap: 8px; color: #d6d2cc; }
.yn { font: 700 12px var(--head); width: 16px; text-align: center; flex: none; }
.yn.y { color: var(--ok); } .yn.n { color: var(--dim); }
.explain { margin: 10px 0 0; color: #c9c5bf; font-size: 13.5px; line-height: 1.5; }
.why-not { margin: 10px 0 0; padding: 8px 12px; border-left: 2px solid var(--warn); background: rgba(255,207,90,.06); color: #e6d9ae; font-size: 13px; line-height: 1.45; }
.reasons { margin-top: 12px; padding: 10px 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.reasons b { font: 700 11px var(--head); letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.reasons ul { margin: 6px 0 0; padding-left: 18px; color: #d6d2cc; line-height: 1.5; }
.contents li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.contents li.off { border-left-color: var(--dim); color: var(--muted); }
.contents .lw { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 9px; }
.tools .check { margin-top: 0; }
.sort { display: inline-flex; align-items: center; gap: 6px; font: 700 10.5px var(--head); letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.sort select { background: var(--bg2); border: 1px solid var(--line2); padding: 4px 6px; font: 12.5px var(--body); letter-spacing: 0; text-transform: none; }
.lines li.bad { border-color: #8a2430; }
.why { margin: 0; padding-left: 16px; font-size: 11.5px; color: var(--dim); }
#loadout-tab .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-left: 6px; vertical-align: middle; }
.fatal { display: grid; place-content: center; gap: 18px; height: 100vh; text-align: center; color: var(--text); padding: 24px; }
.fatal .brand { justify-content: center; height: 48px; }
.fatal p { max-width: 420px; margin: 0 auto; color: #d6d2cc; }

/* comfortable touch targets wherever there is no mouse, and on narrow screens */
@media (pointer: coarse), (max-width: 1180px) {
  .chip { min-height: 36px; padding: 6px 10px; }
  .lbtns button, .back, .ghost, .primary, .spawn, .sort select, .field select, .lhead select, .lname { min-height: 44px; }
  .stepper button { width: 44px; min-height: 44px; }
  .stepper input { min-height: 44px; }
  .stepper.small button { width: 38px; min-height: 38px; } .stepper.small input { min-height: 38px; width: 40px; }
  .x { width: 38px; min-height: 38px; }
  .lines select { min-height: 38px; }
  .check input { width: 20px; height: 20px; }
}
@media (max-width: 760px) {
  .tab .long { display: none; } .tab .short { display: inline; }
  #nav { justify-content: flex-start; padding: 0 6px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
  .tab { padding: 12px 14px; min-height: 46px; }
  .avail { grid-template-columns: 1fr; }
  .statusline code { font-size: 11px; }
}

/* phone: the LOADOUT button is a bar in the page flow (never on top of controls); chips scroll sideways */
@media (max-width: 760px) {
  body { grid-template-rows: auto minmax(0, 1fr) auto 22px; }
  #loadout-tab { position: static; grid-row: 3; width: 100%; clip-path: none; min-height: 48px; padding: 0 16px; text-align: left; display: flex; align-items: center; gap: 8px; justify-content: center; }
  body[data-pane="loadout"] #loadout-tab { display: none; }
  #detail { padding-bottom: 24px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}

/* tablet and below: the tab bar gets its own full-width row, so no label is ever cut off */
@media (max-width: 1180px) {
  body { grid-template-rows: auto minmax(0, 1fr) 22px; }
  .top { flex-wrap: wrap; gap: 0; }
  .brand { height: 48px; }
  #status { margin-left: auto; padding: 0 12px; }
  #nav { order: 3; flex-basis: 100%; justify-content: center; border-top: 1px solid var(--line); }
  .tab { padding: 12px 18px; }
  .tab.on::after { bottom: 4px; }
  #loadout { top: 0; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}
@media (max-width: 760px) {
  body { grid-template-rows: auto minmax(0, 1fr) auto 22px; }
  .brand { height: 40px; }
  #nav { justify-content: flex-start; }
  .tab { padding: 12px 14px; }
  .hero .art .state { top: 0; bottom: auto; }
}
@media (min-width: 761px) and (max-width: 1180px) { #detail { padding-bottom: 88px; } }
