/* ---------------------------------------------------------------------------
   THE ARMORY (the Waffle House shop)

   Same family as the Locker: rounded dark panels, one amber accent for money
   and action, and the real gun on every weapon card. A gun's own accent colour
   (war.js `accent`) lights its card, so the rack reads as nine objects rather
   than nine rows of text.
--------------------------------------------------------------------------- */
.ico-syrup {
  display: inline-block;
  width: .74em; height: .74em;
  margin-right: .34em;
  vertical-align: -.02em;
  border-radius: 0 50% 50% 50%;
  transform: rotate(45deg);
  background: radial-gradient(circle at 35% 35%, #ffe7a6, #ffb03a 45%, #c96a10 100%);
  box-shadow: 0 0 8px rgba(255, 176, 58, .45);
}

#armory { z-index: 70; padding: clamp(10px, 3vh, 36px) clamp(10px, 3vw, 40px); background: rgba(7, 5, 8, .82); backdrop-filter: blur(6px); }
.sh-panel {
  width: min(1180px, 100%);
  max-height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: linear-gradient(180deg, rgba(26, 20, 27, .97), rgba(12, 9, 14, .98));
  border: 1px solid rgba(255, 232, 200, .10);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04);
  overflow: hidden;
  font-family: var(--sans);
  color: var(--text);
  animation: lkIn .18s ease-out;
}
.sh-head { display: flex; align-items: center; gap: 16px; padding: 18px 22px 12px; }
.sh-kicker { margin: 0 0 2px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--amber); }
.sh-title h2 { margin: 0; font-family: var(--display); font-size: 30px; line-height: 1; color: #fff4e2; }
.sh-hint { display: block; margin-top: 4px; font-size: 12.5px; color: var(--dim); }
.sh-bal {
  margin-left: auto;
  display: inline-flex; align-items: baseline;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 176, 58, .10);
  border: 1px solid rgba(255, 176, 58, .32);
  font-family: var(--mono);
}
.sh-bal b { font-size: 20px; color: var(--gold); }
.sh-bal em { margin-left: 6px; font-style: normal; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.sh-close {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 12px;
  border: 0; cursor: pointer;
  color: #1a0f04; background: linear-gradient(180deg, #ffc15a, #ff8a1f);
  font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 6px 22px rgba(255, 138, 31, .3), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.sh-close kbd { font-family: var(--mono); font-size: 10px; padding: 1px 6px; border-radius: 4px; background: rgba(0, 0, 0, .16); }
.sh-tabs { display: flex; gap: 6px; padding: 0 22px 12px; border-bottom: 1px solid rgba(255, 232, 200, .08); }
.sh-tabs button {
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: var(--dim);
  font-family: var(--mono); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; transition: color .15s, background .15s;
}
.sh-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.sh-tabs button.on { color: #1a1206; background: var(--amber); }
.sh-body { min-height: 0; overflow-y: auto; padding: 18px 22px 22px; scrollbar-width: thin; scrollbar-color: rgba(255, 232, 200, .2) transparent; }

.sh-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sh-items.t-weapons { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.sh-items.t-supplies { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sh-items.t-upgrades { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sh-items li { animation: lkRise .28s ease-out backwards; }
.sh-items li:nth-child(2) { animation-delay: .03s; } .sh-items li:nth-child(3) { animation-delay: .06s; }
.sh-items li:nth-child(4) { animation-delay: .09s; } .sh-items li:nth-child(5) { animation-delay: .12s; }
.sh-items li:nth-child(6) { animation-delay: .15s; } .sh-items li:nth-child(7) { animation-delay: .18s; }
.sh-items li:nth-child(8) { animation-delay: .21s; }

/* weapon cards */
.sh-gun button {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; gap: 8px;
  padding: 0 16px 16px;
  text-align: left; color: inherit; font: inherit;
  border-radius: 16px;
  cursor: pointer;
  background:
    radial-gradient(100% 60% at 50% 22%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%),
    linear-gradient(180deg, #221c26, #120e15);
  border: 1px solid color-mix(in srgb, var(--c) 26%, rgba(255, 255, 255, .06));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
  transition: transform .16s ease, border-color .16s, box-shadow .2s;
}
.sh-gun button:hover:not(:disabled) { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 16px 36px rgba(0, 0, 0, .45), 0 0 30px color-mix(in srgb, var(--c) 20%, transparent); }
.sh-gun-art { display: grid; place-items: center; height: 118px; margin: 0 -8px; }
.sh-gun-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .55)); transition: transform .25s ease; }
.sh-gun button:hover:not(:disabled) .sh-gun-art img { transform: scale(1.06) rotate(-2deg); }
.sh-gun-head { display: flex; flex-direction: column; gap: 1px; }
.sh-gun-head em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--c); }
.sh-gun-head b { font-family: var(--display); font-size: 18px; font-weight: 400; color: #fff4e2; }
.sh-gun-blurb { font-size: 12.5px; line-height: 1.4; color: var(--dim); min-height: 2.8em; }
.sh-stats { margin: 0; display: grid; gap: 5px; }
.sh-stats div { display: grid; grid-template-columns: 70px minmax(0, 1fr) 46px; align-items: center; gap: 8px; }
.sh-stats dt { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.sh-stats dd { margin: 0; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.sh-stats dd i { display: block; height: 100%; width: calc(var(--f) * 100%); border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 60%, #fff), var(--c)); }
.sh-stats b { font-family: var(--mono); font-size: 11px; font-weight: 600; text-align: right; color: var(--text); }
.sh-buy { margin-top: auto; padding-top: 6px; display: flex; justify-content: flex-end; }
.sh-price {
  display: inline-flex; align-items: baseline;
  padding: 8px 14px; border-radius: 10px;
  background: linear-gradient(180deg, #ffc15a, #ff8a1f); color: #1a0f04;
  font-family: var(--mono); font-weight: 800; font-size: 14px;
  box-shadow: 0 4px 16px rgba(255, 138, 31, .28);
}
.sh-price .ico-syrup { background: radial-gradient(circle at 35% 35%, #fff, #5a3208 70%); box-shadow: none; }
.sh-owned { padding: 8px 12px; border-radius: 10px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green); background: rgba(125, 255, 178, .08); border: 1px solid rgba(125, 255, 178, .25); }
.sh-gun.owned button { cursor: default; }
.poor .sh-price { background: rgba(255, 255, 255, .07); color: var(--dim); box-shadow: none; }
.poor .sh-price .ico-syrup { background: radial-gradient(circle at 35% 35%, #ddd, #555 70%); }
.poor button { cursor: not-allowed; }
.sh-gun.poor .sh-gun-art img { filter: grayscale(.4) brightness(.75) drop-shadow(0 10px 12px rgba(0, 0, 0, .55)); }

/* supply and upgrade tiles */
.sh-tile button, .sh-bench-items button {
  width: 100%; height: 100%;
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 14px 16px;
  text-align: left; color: inherit; font: inherit;
  border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, #211b24, #130f16);
  border: 1px solid rgba(255, 232, 200, .08);
  transition: transform .15s, border-color .15s, background .15s;
}
.sh-tile button:hover:not(:disabled), .sh-bench-items button:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(255, 176, 58, .45); background: linear-gradient(180deg, #2a2129, #16111a); }
.t-supplies .sh-tile button { grid-template-columns: 1fr; grid-template-rows: auto auto auto; justify-items: start; padding: 18px; gap: 12px; }
.t-supplies .sh-ico { width: 64px; height: 64px; }
.sh-ico {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 35%, rgba(255, 176, 58, .28), rgba(255, 176, 58, .06));
  border: 1px solid rgba(255, 176, 58, .3);
  color: var(--amber);
}
.sh-ico svg { width: 56%; height: 56%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[data-k="armor"] .sh-ico { color: var(--green); background: radial-gradient(circle at 50% 35%, rgba(125, 255, 178, .24), rgba(125, 255, 178, .05)); border-color: rgba(125, 255, 178, .3); }
[data-k="health"] .sh-ico, [data-k="maxhp"] .sh-ico { color: #ff7a6b; background: radial-gradient(circle at 50% 35%, rgba(255, 90, 80, .26), rgba(255, 90, 80, .05)); border-color: rgba(255, 90, 80, .3); }
[data-k="ammo"] .sh-ico { color: var(--blue); background: radial-gradient(circle at 50% 35%, rgba(159, 208, 255, .24), rgba(159, 208, 255, .05)); border-color: rgba(159, 208, 255, .3); }
.sh-tile-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sh-tile-body b { font-size: 15px; font-weight: 600; color: #fff4e2; }
.sh-tile-body em { font-style: normal; font-size: 12.5px; line-height: 1.35; color: var(--dim); }
.t-supplies .sh-buy { justify-self: stretch; }
.sh-pips { display: flex; gap: 4px; margin-top: 5px; }
.sh-pips i { width: 20px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.sh-pips i.on { background: var(--gold); box-shadow: 0 0 8px rgba(255, 209, 102, .5); }
.done button { cursor: default; opacity: .7; }

/* the workbench */
.sh-bench { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
.sh-bench-guns { display: grid; gap: 6px; align-content: start; }
.sh-bench-guns button {
  position: relative;
  display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 8px;
  padding: 6px 10px 6px 6px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255, 232, 200, .08); background: rgba(255, 255, 255, .03); color: var(--dim);
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-align: left;
  transition: border-color .15s, background .15s, color .15s;
}
.sh-bench-guns button img { width: 76px; height: 38px; object-fit: contain; }
.sh-bench-guns button:hover:not(:disabled) { color: var(--text); border-color: rgba(255, 232, 200, .2); }
.sh-bench-guns button.on { color: #fff4e2; border-color: var(--amber); background: rgba(255, 176, 58, .12); }
.sh-bench-guns button:disabled { opacity: .35; cursor: not-allowed; }
.sh-bench-guns button:disabled img { filter: grayscale(1) brightness(.6); }
.sh-bench-guns button i { position: absolute; right: 10px; width: 14px; height: 14px; }
.sh-bench-guns button i svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; }
.sh-bench-main { display: grid; gap: 12px; align-content: start; }
.sh-bench-hero {
  display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr; align-items: center; gap: 16px;
  padding: 10px 20px; border-radius: 16px;
  background: radial-gradient(80% 90% at 30% 50%, rgba(255, 176, 58, .16), transparent 70%), linear-gradient(180deg, #221c26, #120e15);
  border: 1px solid rgba(255, 232, 200, .08);
}
.sh-bench-hero img { width: 100%; max-height: 150px; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .6)); }
.sh-bench-hero div { display: flex; flex-direction: column; gap: 3px; }
.sh-bench-hero em { font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; color: var(--amber); }
.sh-bench-hero b { font-family: var(--display); font-size: 24px; font-weight: 400; color: #fff4e2; }
.sh-bench-hero span { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.sh-bench-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }

/* 3D item art (assets/ui/icon-*.webp). The tinted square stays as a plinth so
   the object has something to sit on; the render overhangs it a little. */
.sh-ico.sh-ico3d {
  overflow: visible;
  border: 0;
  background: radial-gradient(closest-side, rgba(255, 176, 58, .2), transparent);
}
.sh-ico3d img {
  /* width-driven: a percentage HEIGHT does not resolve inside an auto grid
     row and the render came out at its native 320px */
  width: 128%; height: auto; aspect-ratio: 1; object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55));
  transition: transform .22s ease;
}
.sh-tile button:hover:not(:disabled) .sh-ico3d img,
.sh-bench-items button:hover:not(:disabled) .sh-ico3d img { transform: scale(1.1) rotate(-4deg); }
.t-supplies .sh-ico.sh-ico3d { width: 100%; height: 124px; justify-self: stretch; background: radial-gradient(closest-side, rgba(255, 176, 58, .16), transparent); }
.t-supplies .sh-ico3d img { width: 124px; height: 124px; }
.poor .sh-ico3d img, .done .sh-ico3d img { filter: grayscale(.45) brightness(.8) drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); }

/* forts: a card per fort, its ranks underneath */
.sh-items.t-forts { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.sh-fort { display: grid; gap: 10px; }
.sh-fort-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 14px;
  padding: 12px 16px 14px 8px;
  border-radius: 16px;
  background:
    radial-gradient(70% 90% at 25% 50%, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%),
    linear-gradient(180deg, #221c26, #120e15);
  border: 1px solid color-mix(in srgb, var(--c) 26%, rgba(255, 255, 255, .06));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.sh-fort-art { display: grid; place-items: center; min-height: 150px; }
.sh-fort-art img { width: 100%; max-height: 190px; object-fit: contain; filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .6)); }
.sh-fort-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sh-fort-info > em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--c); }
.sh-fort-info > b { font-family: var(--display); font-size: 20px; font-weight: 400; color: #fff4e2; }
.sh-fort-info .sh-gun-blurb { min-height: 0; }
.sh-fort-stats { margin: 2px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.sh-fort-stats div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.sh-fort-stats dt { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.sh-fort-stats dd { margin: 0; font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--text); white-space: nowrap; }
.sh-fort-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.sh-fort-count { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.sh-fort-count b { font-size: 15px; color: var(--c); }
.sh-plant {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 5px 5px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: color-mix(in srgb, var(--c) 10%, transparent); color: #fff4e2;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  transition: background .15s, border-color .15s;
}
.sh-plant kbd { font-family: var(--mono); font-size: 10px; padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
.sh-plant .sh-price { padding: 6px 10px; font-size: 13px; }
.sh-plant:hover:not(:disabled) { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c); }
.sh-plant:disabled { cursor: not-allowed; opacity: .55; }
.sh-plant:disabled .sh-price { background: rgba(255, 255, 255, .07); color: var(--dim); box-shadow: none; }
.sh-fort-ups { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sh-fort-ups button {
  width: 100%;
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 8px 14px 8px 6px;
  text-align: left; color: inherit; font: inherit;
  border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, #211b24, #130f16);
  border: 1px solid rgba(255, 232, 200, .08);
  transition: transform .15s, border-color .15s, background .15s;
}
.sh-fort-ups button:hover:not(:disabled) { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.sh-fu-art {
  width: 76px; height: 64px; display: grid; place-items: center;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 22%, transparent), rgba(255, 255, 255, .02));
  overflow: visible;
}
.sh-fu-art img { width: 90px; height: 90px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); transition: transform .22s ease; }
.sh-fort-ups button:hover:not(:disabled) .sh-fu-art img { transform: scale(1.08); }
.sh-fort-ups .poor .sh-fu-art img, .sh-fort-ups .done .sh-fu-art img { filter: grayscale(.45) brightness(.8) drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); }
.sh-fort-ups .sh-pips i.on { background: var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent); }

@media (max-width: 860px), (max-height: 600px) {
  #armory { padding: 0; }
  .sh-panel { border-radius: 0; height: 100%; max-height: none; }
  .sh-head { padding: 10px 14px 8px; }
  .sh-kicker, .sh-hint { display: none; }
  .sh-title h2 { font-size: 20px; }
  .sh-bal { padding: 6px 12px; } .sh-bal b { font-size: 16px; }
  .sh-close { padding: 8px 12px; }
  .sh-tabs { padding: 0 14px 8px; overflow-x: auto; }
  .sh-tabs button { padding: 7px 12px; font-size: 11px; }
  .sh-body { padding: 10px 12px 14px; }
  .sh-items.t-weapons { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
  .sh-gun-art { height: 80px; }
  .sh-gun-blurb { display: none; }
  .sh-items.t-supplies { grid-template-columns: 1fr; }
  .t-supplies .sh-tile button { grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-rows: none; align-items: center; padding: 12px; }
  .t-supplies .sh-ico { width: 52px; height: 52px; }
  .sh-bench { grid-template-columns: 150px minmax(0, 1fr); }
  .sh-bench-guns button { grid-template-columns: 1fr; padding: 4px; }
  .sh-bench-guns button span { display: none; }
  .sh-bench-guns button img { width: 100%; }
  .sh-bench-hero { display: none; }
  .sh-items.t-forts { grid-template-columns: 1fr; }
  .sh-fort-card { grid-template-columns: 150px minmax(0, 1fr); }
  .sh-fort-art { min-height: 0; }
  .sh-fort-info .sh-gun-blurb { display: none; }
  .t-supplies .sh-ico.sh-ico3d { width: 52px; height: 52px; }
  .t-supplies .sh-ico3d img { width: 128%; height: auto; }
}
