/* Ammo pictures. Only .ssdns-ammo is styled, so a flag-off page is unchanged. */
.ssdns-ammo { position: relative; display: inline-block; vertical-align: middle; line-height: 0; flex: 0 0 auto; }
.ssdns-playercard .ssdns-ammo-cylinder,
.ssm-drawer .ssdns-ammo-cylinder {
  width: 72px;
  height: 72px;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
}
.ssdns-playercard .ssdns-ammo .ammo-round,
.ssm-drawer .ssdns-ammo .ammo-round { width: auto; }
.ssdns-playercard .ssdns-ammo-tube.is-drawer,
.ssm-drawer .ssdns-ammo-tube.is-drawer {
  width: 148px;
  max-width: none;
  flex: 0 0 auto;
}
.ssdns-ammo-cylinder { width: 112px; height: 112px; }
.ssdns-ammo-cylinder.is-drawer { width: 96px; height: 96px; }
.ssdns-ammo-cylinder.is-gear { width: 88px; height: 88px; }
.ssdns-ammo-cylinder.is-strip { width: 64px; height: 64px; }
.ssdns-ammo-cylinder.is-demo { width: 180px; height: 180px; }
.ammo-cylinder-svg { width: 100%; height: 100%; display: block; }
.ammo-rim { fill: #b7b3ad; stroke: #2c261f; stroke-width: 1.6; }
.ammo-pin { fill: #3a342c; stroke: #c9a227; stroke-width: 1.4; }
.ammo-pin-core { fill: #14110e; }
.ssdns-ammo.is-jammed .ammo-pin { fill: #8d1f18; stroke: #e23b32; }

.ssdns-ammo .ammo-round {
  border-radius: 50%;
  border: 1px solid #1a120c;
  padding: 0;
  margin: 0;
  min-height: 0;
  min-width: 0;
  line-height: 1;
  background: #16120e;
  color: #fff;
  font: 700 9px/1 system-ui, sans-serif;
  cursor: pointer;
  box-sizing: border-box;
}
.ssdns-ammo-cylinder .ammo-round {
  position: absolute;
  transform: translate(-50%, -50%);
}
.ssdns-ammo .ammo-round.is-loaded {
  background: radial-gradient(circle at 38% 32%, #fff4d2, #e0b44a 42%, #8a5a16 78%);
  border-color: #5c3d10;
}
.ssdns-ammo .ammo-round.is-primer.is-loaded {
  border-color: #6d4e16;
  background:
    radial-gradient(circle at 50% 50%, #a86b3c 0 12%, #f4f0e8 14% 26%, #5c4634 27% 32%, transparent 33%),
    var(--case, #e0b44a);
  box-shadow: inset 0 1px 1px rgba(255, 244, 210, 0.75), inset 0 -2px 3px rgba(70, 40, 8, 0.5);
}
.ssdns-ammo .ammo-round.is-spent {
  background: radial-gradient(circle at 50% 40%, #3a342c, #120e0b 72%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}
.ssdns-ammo .ammo-round.is-locked {
  background: #2a2420;
  color: #e23b32;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #e23b32;
}
.ssdns-ammo .ammo-round.is-jam {
  background: radial-gradient(circle at 38% 32%, #ffb0a8, #c4322a 46%, #4a100c 80%);
  border-color: #e23b32;
}
.ssdns-ammo .ammo-round.is-next { outline: 2px solid #e23b32; outline-offset: 1px; }
.ssdns-ammo.is-jammed .ammo-round.is-loaded { filter: grayscale(0.45); }

.ssdns-ammo-tube { width: 220px; max-width: 100%; }
.ssdns-ammo-tube.is-strip { width: 160px; }
.ssdns-ammo-tube.is-drawer { width: 168px; }
.ssdns-ammo-tube.is-demo { width: 280px; }
.ammo-tube {
  position: relative;
  display: block;
  height: 28px;
  border-radius: 14px;
  background: linear-gradient(#5c564c, #2a261f);
  border: 2px solid #1a1612;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.ssdns-ammo-tube.is-strip .ammo-tube,
.ssdns-ammo-tube.is-drawer .ammo-tube { height: 24px; }
.ssdns-ammo-tube .ammo-round {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.ammo-tube-fire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  z-index: 0;
  cursor: pointer;
}
.ssdns-ammo-tube .ammo-round.is-cart,
.ssdns-ammo-dots .ammo-round.is-cart {
  width: 28px;
  height: 12px;
  border-radius: 2px;
  border: 0;
  background: transparent;
  padding: 0;
}
.ssdns-ammo-tube .ammo-round.is-cart svg,
.ssdns-ammo-dots .ammo-round.is-cart svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.ssdns-ammo-dots .ammo-round.is-shell { width: 26px; height: 12px; margin-right: 3px; }
.ssdns-ammo .ammo-round.is-shell.is-gauge-410 { width: 36px; height: 6px; }
.ssdns-ammo .ammo-round.is-shell.is-gauge-12 { width: 34px; height: 12px; }
.ssdns-ammo .ammo-round.is-shell.is-gauge-10 { width: 43px; height: 16px; }
.ssdns-ammo-tube.is-compact .ammo-tube { height: 44px; border-radius: 8px; }
.ssdns-ammo-tube.is-compact .ammo-round.is-cart { width: 16px; height: 8px; }
.ssdns-ammo-tube.is-strip.is-compact .ammo-round.is-cart,
.ssdns-ammo-tube.is-drawer.is-compact .ammo-round.is-cart { width: 14px; height: 7px; }
.ssdns-ammo-tube.is-compact .ammo-round.is-shell.is-gauge-410 { width: 28px; height: 5px; }
.ssdns-ammo-tube.is-compact .ammo-round.is-shell.is-gauge-12 { width: 22px; height: 8px; }
.ssdns-ammo-tube.is-compact .ammo-round.is-shell.is-gauge-10 { width: 26px; height: 11px; }
.ssdns-ammo-tube.is-strip.is-compact .ammo-round.is-shell.is-gauge-410,
.ssdns-ammo-tube.is-drawer.is-compact .ammo-round.is-shell.is-gauge-410 { width: 22px; height: 4px; }
.ssdns-ammo-tube.is-strip.is-compact .ammo-round.is-shell.is-gauge-12,
.ssdns-ammo-tube.is-drawer.is-compact .ammo-round.is-shell.is-gauge-12 { width: 18px; height: 6px; }
.ssdns-ammo-tube.is-strip.is-compact .ammo-round.is-shell.is-gauge-10,
.ssdns-ammo-tube.is-drawer.is-compact .ammo-round.is-shell.is-gauge-10 { width: 20px; height: 8px; }
.ssdns-ammo .ammo-round.is-spent.is-cart { filter: grayscale(0.9) brightness(0.72); }
.ssdns-ammo .ammo-round.is-jam.is-cart { outline: 2px solid #e23b32; }
.ammo-follower {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 8px;
  border-radius: 2px;
  background: linear-gradient(#e7c56a, #8a6a28);
  box-shadow: 1px 0 0 #1a140c;
  z-index: 2;
  pointer-events: none;
}
.ssdns-ammo.is-jammed .ammo-follower { background: linear-gradient(#e23b32, #6b1410); }
.ammo-spring {
  position: absolute;
  top: 3px;
  height: calc(100% - 6px);
  z-index: 2;
  pointer-events: none;
}
.ammo-spring path {
  fill: none;
  stroke: #efe8da;
  stroke-width: 1.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.ssdns-ammo-dots { line-height: 0; }
.ssdns-ammo-dots .ammo-round {
  width: 14px;
  height: 14px;
  margin-right: 2px;
}
.ssdns-ammo-dots .ammo-round:last-child { margin-right: 0; }

.ssm-drawer .ssdns-ammo button,
.cylinder-row .ssdns-ammo button,
.gun .ssdns-ammo button,
.chambers .ssdns-ammo button {
  min-height: 0;
  padding: 0;
  background-image: none;
}
.ssm-drawer .cylinder-graphic { align-items: center; }
.ssm-drawer .cylinder-graphic .ssdns-ammo { flex: 0 0 auto; }
.init-who .cylinder-row { flex-basis: 100%; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.turn-strip .cylinder-row { flex-wrap: wrap; }

/* 0.3.54 round art by ammo type (drawn in CSS). Empty / fired / X states above still win. */
/* 0.3.54: powder & ball = a plain round lead ball. No cap, no primer; soft highlight. */
.ssdns-ammo .ammo-round.is-primer.is-loaded.rt-ball {
  border-color: #3b3d40;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55) 0 6%, rgba(220, 224, 228, 0.35) 14%, transparent 34%),
    radial-gradient(circle at 42% 38%, #a3a8ad, #7c8288 34%, #555b61 66%, #2f3337 92%);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.45);
}
.ssdns-ammo .ammo-round.is-primer.is-loaded.rt-cart {
  border-color: #5c3d10;
  background:
    radial-gradient(circle at 50% 50%, #b9b4aa 0 13%, #e9e2d0 15% 22%, #7a5a20 24% 27%, transparent 29%),
    radial-gradient(circle at 50% 50%, transparent 0 66%, #7a5420 68% 74%, transparent 76%),
    radial-gradient(circle at 36% 30%, #fff1c2, #e3b54a 40%, #a8741c 76%, #6b4810 95%);
}
.ssdns-ammo .ammo-round.is-primer.is-loaded.rt-rf22 {
  border-color: #6d4e16;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 48%, #8a6220 50% 58%, transparent 60%),
    radial-gradient(circle at 38% 32%, #fff6d4, #ecc76a 46%, #b5852c 82%);
  transform: translate(-50%, -50%) scale(.78);
}
.ssdns-ammo-dots .ammo-round.is-primer.is-loaded.rt-rf22 { transform: scale(.78); }
.ssdns-ammo .ammo-round.is-primer.is-loaded.rt-buck {
  border-color: #6d1a14;
  background:
    radial-gradient(circle at 50% 50%, #c6b07a 0 14%, #8a6a2c 16% 20%, transparent 22%),
    radial-gradient(circle at 50% 50%, transparent 0 62%, #b98b34 64% 92%, #6d4e16 94%),
    radial-gradient(circle at 36% 30%, #ff8a7a, #c4322a 50%, #6d120c 90%);
}
/* 0.3.54 sample: hex lead = dark round with a glowing green serpent-spiral rune (forked tongue). Strip size = plain spiral. */
.ssdns-ammo .ammo-round.is-primer.is-loaded.rt-hex {
  border-color: #1b3d22;
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2040%2040%27%3E%3Cdefs%3E%3Cfilter%20id%3D%27g%27%20x%3D%27-50%25%27%20y%3D%27-50%25%27%20width%3D%27200%25%27%20height%3D%27200%25%27%3E%3CfeGaussianBlur%20stdDeviation%3D%271.6%27/%3E%3C/filter%3E%3C/defs%3E%3Cg%20fill%3D%27none%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M20%2020%20m0%20-2%20a2%202%200%201%201%20-2%202%20a4%204%200%200%201%204%20-4%20a6%206%200%200%201%206%206%20a8%208%200%200%201%20-8%208%20a10%2010%200%200%201%20-10%20-10%20a12%2012%200%200%201%2012%20-12%20M22%208%20L25.5%206.5%20M22%208%20L24.5%2010.5%27%20stroke%3D%27%233fd36b%27%20stroke-width%3D%274.7%27%20filter%3D%27url%28%23g%29%27%20opacity%3D%27.9%27/%3E%3Cpath%20d%3D%27M20%2020%20m0%20-2%20a2%202%200%201%201%20-2%202%20a4%204%200%200%201%204%20-4%20a6%206%200%200%201%206%206%20a8%208%200%200%201%20-8%208%20a10%2010%200%200%201%20-10%20-10%20a12%2012%200%200%201%2012%20-12%20M22%208%20L25.5%206.5%20M22%208%20L24.5%2010.5%27%20stroke%3D%27%230a1a0e%27%20stroke-width%3D%273.0%27%20opacity%3D%27.55%27/%3E%3Cpath%20d%3D%27M20%2020%20m0%20-2%20a2%202%200%201%201%20-2%202%20a4%204%200%200%201%204%20-4%20a6%206%200%200%201%206%206%20a8%208%200%200%201%20-8%208%20a10%2010%200%200%201%20-10%20-10%20a12%2012%200%200%201%2012%20-12%20M22%208%20L25.5%206.5%20M22%208%20L24.5%2010.5%27%20stroke%3D%27%23c8ffd0%27%20stroke-width%3D%272.2%27/%3E%3C/g%3E%3C/svg%3E") center / 78% 78% no-repeat,
    radial-gradient(circle closest-side at 50% 50%, rgba(63, 211, 107, 0.22), transparent 70%),
    radial-gradient(circle at 36% 30%, #4a4f52, #24282a 56%, #0d0f10 90%);
  box-shadow: 0 0 5px 1px rgba(63, 211, 107, 0.55), inset 0 0 4px rgba(63, 211, 107, 0.4);
}
.ssdns-ammo-cylinder.is-strip .ammo-round.is-primer.is-loaded.rt-hex,
.ssdns-ammo-dots.is-strip .ammo-round.is-primer.is-loaded.rt-hex {
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2040%2040%27%3E%3Cdefs%3E%3Cfilter%20id%3D%27g%27%20x%3D%27-50%25%27%20y%3D%27-50%25%27%20width%3D%27200%25%27%20height%3D%27200%25%27%3E%3CfeGaussianBlur%20stdDeviation%3D%271.6%27/%3E%3C/filter%3E%3C/defs%3E%3Cg%20fill%3D%27none%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M20%2020%20a3%203%200%200%201%203%20-3%20a5.5%205.5%200%200%201%205.5%205.5%20a8.5%208.5%200%200%201%20-8.5%208.5%20a11%2011%200%200%201%20-11%20-11%20a12%2012%200%200%201%2012%20-12%27%20stroke%3D%27%233fd36b%27%20stroke-width%3D%276.5%27%20filter%3D%27url%28%23g%29%27%20opacity%3D%27.9%27/%3E%3Cpath%20d%3D%27M20%2020%20a3%203%200%200%201%203%20-3%20a5.5%205.5%200%200%201%205.5%205.5%20a8.5%208.5%200%200%201%20-8.5%208.5%20a11%2011%200%200%201%20-11%20-11%20a12%2012%200%200%201%2012%20-12%27%20stroke%3D%27%230a1a0e%27%20stroke-width%3D%274.8%27%20opacity%3D%27.55%27/%3E%3Cpath%20d%3D%27M20%2020%20a3%203%200%200%201%203%20-3%20a5.5%205.5%200%200%201%205.5%205.5%20a8.5%208.5%200%200%201%20-8.5%208.5%20a11%2011%200%200%201%20-11%20-11%20a12%2012%200%200%201%2012%20-12%27%20stroke%3D%27%23c8ffd0%27%20stroke-width%3D%274%27/%3E%3C/g%3E%3C/svg%3E") center / 90% 90% no-repeat,
    radial-gradient(circle at 36% 30%, #3a3f42, #1c2022 60%, #0d0f10 90%);
}

/* 0.3.54 sample: shell head seen end-on, all rings concentric (per Jessey's photo):
   steel primer, copper primer ring, brass head, slight rim edge, then a bold gauge-colour ring.
   Slugs add a thin black ring between the brass and the gauge ring. Size scales by gauge. */
.ssdns-ammo .ammo-round.is-primer.is-loaded.rt-shell { --hull: #c4322e; --hull-l: #e0574f; --slug: transparent;
  border: 0;
  background:
    radial-gradient(circle closest-side at 44% 40%, rgba(255,255,255,.9) 0 3%, transparent 8%),
    radial-gradient(circle closest-side at 50% 50%,
      #eef1f3 0, #b9c0c6 7%, #7e868d 12%, #3d3a36 13.5%,
      #e39a6c 15%, #b8643a 19%, #7a3b1f 23%, #4a3218 24.5%,
      #f4e2a0 26%, #dcbb62 36%, #c9a24a 48%, #a8822e 55%,
      #7a5a1e 57%, #f0d88a 59%, #8a6a2a 61%,
      var(--slug) 61.5%, var(--slug) 68%,
      var(--hull-l) 68.5%, var(--hull) 86%, #1a120c 97%, transparent 100%);
  box-shadow: none;
  transform: translate(-50%, -50%) scale(var(--g, .9));
}
.ssdns-ammo .ammo-round.is-primer.is-loaded.rt-shell.is-slug { --slug: #0d0d0d; }
.ssdns-ammo .ammo-round.is-primer.is-loaded.rt-shell.is-gauge-12 { --g: .9; }
.ssdns-ammo .ammo-round.is-primer.is-loaded.rt-shell.is-gauge-410 { --hull: #1f5a9c; --hull-l: #4a9ae8; --g: .74; }
.ssdns-ammo .ammo-round.is-primer.is-loaded.rt-shell.is-gauge-10 { --hull: #1a5a26; --hull-l: #3f9a4c; --g: 1; }
/* 0.3.54 sample: the single rifle-musket ball is as big as a Ball n Cap chamber ball. */
.ssdns-ammo-dots .ammo-round.rt-ball { width: 30px; height: 30px; }
.ssdns-ammo-dots.is-demo .ammo-round.rt-ball { width: 47px; height: 47px; }
.ssdns-ammo-dots.is-drawer .ammo-round.rt-ball { width: 25px; height: 25px; }
.ssdns-ammo-dots.is-gear .ammo-round.rt-ball { width: 23px; height: 23px; }
.ssdns-ammo-dots.is-strip .ammo-round.rt-ball { width: 17px; height: 17px; }
/* 0.3.54 sample: a misfired powder & ball chamber keeps the lead ball and gets a red ring + red X,
   so the ball itself never reads as red. */
.ssdns-ammo .ammo-round.is-jam.rt-ball {
  border: 2px solid #e23b32;
  background:
    linear-gradient(45deg, transparent 0 43%, #e23b32 43% 57%, transparent 57%),
    linear-gradient(-45deg, transparent 0 43%, #e23b32 43% 57%, transparent 57%),
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55) 0 6%, rgba(220, 224, 228, 0.35) 14%, transparent 34%),
    radial-gradient(circle at 42% 38%, #a3a8ad, #7c8288 34%, #555b61 66%, #2f3337 92%);
  box-shadow: 0 0 0 1px #4a100c, inset 0 -2px 3px rgba(0, 0, 0, 0.45);
}
