html,body{height:100%;overflow:hidden}main.fullscreen-game{max-width:none;margin:0;padding:0;width:100%;height:100dvh;display:flex;flex-direction:column;background:#171b15}.fullscreen-game .game{display:block;flex:1;min-height:0;border:0}.fullscreen-game .viewport{height:100%;min-height:0;box-shadow:none}.hud{z-index:5;display:flex;align-items:center;justify-content:center;gap:18px;min-height:100px;padding:10px 24px;border-top:4px ridge #7a7358;background:repeating-linear-gradient(0deg,#ffffff02 0px,#ffffff02 1px,transparent 1px,transparent 4px),linear-gradient(#383b30,#22281f 60%,#151c16);box-shadow:0 -7px 25px #0007}.hud button{font-size:13px;padding:10px 13px;border:2px ridge #69715a;background:linear-gradient(#3e4735,#252f23);box-shadow:inset 0 0 9px #0005}.hud-health{width:96px;height:76px;border:3px ridge #857a59;border-radius:45%;text-align:center;background:radial-gradient(ellipse at 35% 25%,#a1684a,#663829 55%,#271f18);box-shadow:inset 0 0 15px #0008}.hud-health small{font-size:8px;letter-spacing:1px;color:#dbbc94;margin-top:10px}.hud-health strong{font:32px monospace;color:#ffdec0;text-shadow:0 2px #24190f}.hud-actions{display:flex;gap:5px;flex-wrap:wrap;max-width:330px}.hud-actions>span{width:100%;color:#a6b585;font:10px monospace;letter-spacing:3px}.hud-weapon{min-width:150px;border:2px inset #505942;padding:8px 12px;background:#151e15;font:12px monospace;color:#b9c39a}.hud-weapon small{font-size:9px}.hud .primary{width:auto;max-width:180px}.hud-system{display:grid;grid-template-columns:1fr 1fr;gap:4px}.hud-system button{font-size:10px;padding:6px 9px}.game-panel{position:fixed;z-index:10;right:22px;top:95px;width:340px;max-height:calc(100dvh - 215px);overflow:auto;padding:26px;border:3px ridge #77765b;background:linear-gradient(135deg,#30392aef,#19231af5);box-shadow:0 15px 60px #0009}.game-panel[hidden]{display:none!important}.journal-panel{width:430px}.game-panel #log{height:230px;max-height:30dvh}.close-panel{position:absolute;right:8px;top:7px;padding:2px 9px;font-size:21px}.game-panel .section-label{padding-right:18px}.camera-help{position:absolute;top:20px;right:20px;font-size:10px;color:#e1d3ad;background:#1d281bd4;padding:8px 12px;pointer-events:none}canvas#minimap{position:absolute;top:57px;right:20px;width:160px;height:100px;border:2px ridge #80765c;opacity:.9;pointer-events:none}#hint{bottom:17px}.map-label{top:20px}.viewport #world{touch-action:none}@media(max-width:850px){.hud{gap:8px;padding:8px;min-height:116px;flex-wrap:wrap}.hud-health{width:68px;height:65px}.hud-health strong{font-size:25px}.hud-weapon{display:none}.hud-actions{max-width:260px}.hud .primary{font-size:11px}.game-panel{top:75px;right:10px;width:min(340px,calc(100vw - 20px));max-height:calc(100dvh - 215px)}.camera-help{display:none}canvas#minimap{top:20px;width:112px;height:70px}}

.game-panel{display:block}#toast{position:absolute;bottom:55px;left:50%;transform:translateX(-50%);max-width:75%;font-size:12px;color:#e3d4b3;text-shadow:0 1px 4px #000;background:#1920189c;padding:5px 12px;pointer-events:none}

/* Field kit: metal chassis, canvas pockets and a phosphor readout. */
.game-panel.field-kit {
  top:50%;left:50%;right:auto;transform:translate(-50%,-50%);
  width:min(860px,calc(100vw - 24px));max-height:calc(100dvh - 26px);
  padding:20px;border:2px solid #77735a;border-radius:13px;
  background:repeating-linear-gradient(110deg,#fff0 0 4px,#fff3a006 5px 6px),
    linear-gradient(155deg,#504f40,#272d27 55%,#36372a);
  box-shadow:0 0 0 4px #171e18,0 0 0 5px #555541,0 24px 90px #000c,inset 0 0 18px #151710;
}
.kit-header,.kit-footer {display:flex;align-items:center;justify-content:space-between;gap:12px}
.kit-header {padding:0 0 12px;border-bottom:1px solid #93816170}
.kit-header h2 {margin:4px 0 0;color:#f0deb2}
.kit-serial {font:12px monospace;color:#d3bc85;border:1px solid #847857;padding:6px 10px;white-space:nowrap}
.kit-grid {display:grid;grid-template-columns:1fr 1.15fr 1.5fr;gap:12px;margin:14px 0}
.kit-well {min-width:0;padding:12px;border:1px solid #746c51;border-radius:7px;background:#161d19;box-shadow:inset 0 2px 13px #0009}
.kit-well h3 {margin:0 0 10px;color:#e3ce9d}
.kit-item {display:flex;width:100%;align-items:center;gap:9px;text-align:left;margin-bottom:7px;padding:7px 8px;border-radius:4px;background:#293329}
.kit-item[hidden],.field-kit #heal[hidden] {display:none}
.kit-item[aria-pressed="true"] {border-color:#cfb16f;background:#3e4330}
.kit-item small,.kit-slot small {margin-top:2px;color:#b1b99b}
.kit-icon {position:relative;display:grid;place-items:center;width:31px;height:28px;flex:none}
.kit-gun {width:52px;height:34px;flex:none;object-fit:contain;filter:drop-shadow(0 2px 2px #000a)}
.kit-weapon-preview {display:block;width:100%;height:112px;object-fit:contain;filter:drop-shadow(0 5px 5px #000b)}
.kit-weapon-preview[hidden] {display:none}
.kit-medicine {border:1px solid #a98f71;border-radius:4px;background:#683e32;color:#f1d6ae;font:bold 21px monospace}
.kit-filter {border:3px double #a99467;border-radius:38%;background:repeating-linear-gradient(90deg,#817655 0 3px,#383b2e 3px 5px);width:25px;margin-inline:3px}
.kit-figure {position:relative;height:166px;margin-bottom:8px;overflow:hidden;border:1px solid #556653;background:radial-gradient(ellipse at bottom,#52645180,#14201a 72%),repeating-linear-gradient(0deg,#71957824 0 1px,transparent 1px 17px)}
.kit-figure canvas {width:100%;height:100%;object-fit:contain}
.kit-slot {display:block;width:100%;padding:6px 8px;border:1px solid #666348;border-radius:3px;background:#262c23;color:#dcd3ad;font-size:12px;text-align:left}
.kit-slot small {letter-spacing:.09em;text-transform:uppercase}
.kit-hands {display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:5px}
.kit-readout {background:repeating-linear-gradient(0deg,#b1e3a805 0 1px,transparent 1px 4px),radial-gradient(ellipse at top,#233a31,#101e1a 80%);color:#c2e1c2}
.kit-readout h3 {margin:15px 0 8px;color:#d3ebc9;font-family:monospace}
.kit-readout p {font-size:14px;line-height:1.5}
.kit-data {padding-top:10px;border-top:1px solid #67897955;color:#a7ceac}
.kit-footer {justify-content:space-between;border-top:1px solid #93816170;padding-top:12px}
.kit-footer button {margin-left:auto;min-width:112px;border-color:#a79164;background:#484534}
.kit-footer kbd,.kit-readout kbd {margin-left:12px}
@media(max-width:610px){
  .game-panel.field-kit {padding:12px}
  .kit-grid {grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px}
  .kit-readout {grid-column:1/-1}
  .kit-well {padding:8px}
  .kit-figure {height:120px}
}

/* Wear collects on exposed edges, around fasteners and below the latches. */
.game-panel.field-kit {
  border:6px ridge #888166;border-radius:7px;
  background-image:var(--kit-grain),
    radial-gradient(ellipse at 3% 85%,#95512e 0%,transparent 22%),
    radial-gradient(ellipse at 79% 0%,#a78f66 0%,transparent 31%),
    radial-gradient(ellipse at 100% 65%,#774c2d,transparent 27%),
    repeating-linear-gradient(116deg,transparent 0 23px,#b8ad7f44 24px,transparent 25px 39px),
    linear-gradient(150deg,#575e46,#31382b 42%,#574a32);
  background-blend-mode:overlay,normal,normal,normal,normal,normal;
  box-shadow:0 0 0 3px #171910,0 20px 80px #000d,inset 0 0 0 2px #b4a48165,inset 0 0 16px 5px #0c100bd9;
}
.field-kit::before,.field-kit::after {
  content:'';position:absolute;pointer-events:none;inset:4px;
}
.field-kit::before {
  background:
    radial-gradient(circle at 5px 5px,#181a12 0 1px,#b4ac89 2px,#38392b 4px,transparent 5px) top left,
    radial-gradient(circle at 5px 5px,#181a12 0 1px,#b4ac89 2px,#38392b 4px,transparent 5px) top right,
    radial-gradient(circle at 5px 5px,#181a12 0 1px,#b4ac89 2px,#38392b 4px,transparent 5px) bottom left,
    radial-gradient(circle at 5px 5px,#181a12 0 1px,#b4ac89 2px,#38392b 4px,transparent 5px) bottom right;
  background-size:10px 10px;background-repeat:no-repeat;
}
.field-kit::after {
  border:1px dashed #b4a67b4d;
  clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 0,9px 9px,9px calc(100% - 9px),calc(100% - 9px) calc(100% - 9px),calc(100% - 9px) 9px,9px 9px);
}
.field-kit .kit-well {border:3px inset #76755e;border-radius:4px;box-shadow:inset 0 2px 14px #000c,0 1px #ad9a6266}
.field-kit .kit-slot {background:var(--kit-grain),linear-gradient(145deg,#5d5740,#282d21);background-blend-mode:overlay;border:2px inset #7a6c4c}
.field-kit .kit-footer button {background:var(--kit-grain),linear-gradient(#64634c,#373a2b);background-blend-mode:overlay;border:2px ridge #9a8862}
.kit-weapon-marshal {filter:grayscale(.8) brightness(1.35) drop-shadow(0 2px 3px #000b)}
.kit-weapon-short {transform:scaleX(.76);filter:sepia(.36) brightness(.92) drop-shadow(0 2px 3px #000b)}

#shopinterior {display:none}
dialog.shop-dialog {width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#211c15;overflow:auto}
.shop-dialog #normaldialog {display:none}
.shop-dialog #shopinterior {position:relative;isolation:isolate;display:flex;flex-direction:column;min-height:100%;padding:clamp(14px,3vw,42px);overflow:hidden}
.shop-scene {position:absolute;z-index:-1;left:50%;top:50%;width:max(100vw,177.684dvh);aspect-ratio:1672/941;transform:translate(-50%,-50%)}
.shop-room {
  display:block;width:100%;height:100%;
  filter:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='detail' color-interpolation-filters='sRGB'%3E%3CfeConvolveMatrix order='3' kernelMatrix='0 -.29 0 -.29 2.16 -.29 0 -.29 0' preserveAlpha='true' edgeMode='duplicate'/%3E%3C/filter%3E%3C/svg%3E#detail") contrast(1.045);
}
.shop-heading {display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.shop-heading h2 {margin:3px 0;color:#eed9ab;text-shadow:0 2px 6px #000}
.shop-heading small {color:#ded1ad}
#shopseller {position:absolute;left:50.8%;bottom:46.6%;width:18.8%;padding:0;border:0;background:transparent;transform:translateX(-50%);text-shadow:0 2px 5px #000}
#shopseller img {
  display:block;width:100%;transform-origin:50% 100%;
  filter:brightness(.94) saturate(.92) drop-shadow(5px 4px 9px #1c120d65);
}
#shopseller .seller-idle {animation:seller-idle-visibility 32s ease-in-out infinite}
#shopseller .seller-gesture {position:absolute;bottom:0;left:0;height:100%;object-fit:contain;object-position:center bottom;opacity:0}
#shopseller .seller-head {animation:seller-head-gesture 32s ease-in-out infinite}
#shopseller .seller-ammo {animation:seller-ammo-gesture 32s ease-in-out infinite}
@keyframes seller-idle-visibility {
  0%,24%,38%,62%,84%,100% {opacity:1}
  26%,36%,64%,82% {opacity:0}
}
@keyframes seller-head-gesture {
  0%,24%,38%,100% {opacity:0}
  26%,36% {opacity:1}
}
@keyframes seller-ammo-gesture {
  0%,62%,84%,100% {opacity:0}
  64%,82% {opacity:1}
}
#shopseller span {position:absolute;top:106%;left:50%;transform:translateX(-50%);white-space:nowrap;padding:7px 12px;border:1px solid #aa9160;background:#282b20ed;color:#eddbb0}
#shopseller:hover span,#shopseller:focus-visible span {background:#554631}
@media(prefers-reduced-motion:reduce){
  #shopseller img,#shopseller .seller-idle,#shopseller .seller-gesture {animation:none}
}
#shopcatalog {align-self:center;margin-top:auto;width:min(900px,100%);max-height:40dvh;overflow:auto;padding:14px 18px;background:#19251fef;border:2px ridge #92815b;box-shadow:0 8px 22px #0008}
#shopstock {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
#shopstock button {font-size:13px;text-align:left;padding:7px 9px}
#shopcaps {margin:4px 0 9px;color:#e8c986}
@media(max-width:640px){#shopstock{grid-template-columns:1fr}}
.kit-weapon-preview {background:url("assets/revolver-v1.webp") center/contain no-repeat}
.kit-weapon-atlas {background-image:url("assets/revolvers-shop-v1.webp");background-size:500% 200%;background-position:var(--weapon-x) var(--weapon-y);background-repeat:no-repeat}
.kit-weapon-preview.kit-weapon-atlas {width:126px;margin-inline:auto}
.kit-weapon-scout{--weapon-x:0%;--weapon-y:0%}
.kit-weapon-peacemaker{--weapon-x:25%;--weapon-y:0%}
.kit-weapon-bulldog{--weapon-x:50%;--weapon-y:0%}
.kit-weapon-rhino{--weapon-x:75%;--weapon-y:0%}
.kit-weapon-anaconda{--weapon-x:100%;--weapon-y:0%}
.kit-weapon-enfield{--weapon-x:0%;--weapon-y:100%}
.kit-weapon-mateba{--weapon-x:25%;--weapon-y:100%}
.kit-weapon-korth{--weapon-x:50%;--weapon-y:100%}
.kit-weapon-bfr{--weapon-x:75%;--weapon-y:100%}
.kit-weapon-bod{--weapon-x:100%;--weapon-y:100%}
.kit-gun.kit-weapon-atlas {height:52px}
.kit-weapon-preview.kit-weapon-atlas {width:112px}
#shopstock button {display:flex;align-items:center;gap:7px}
#shopstock .kit-gun {width:42px;height:42px}

.field-kit,#shopcatalog {
  --kit-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='230' height='167'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.085 .16' numOctaves='4' seed='12'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='.66'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Cpath fill='%23888' filter='url(%23g)' d='M0 0h230v167H0z'/%3E%3C/svg%3E");
}
#shopcatalog {
  border:5px ridge #857c5e;border-radius:5px;
  background:var(--kit-grain),radial-gradient(ellipse at 92% 12%,#865232,transparent 45%),linear-gradient(130deg,#505945,#2e382c 62%,#594732);
  background-blend-mode:overlay,normal,normal;
  box-shadow:0 0 0 2px #191b14,0 10px 30px #000b,inset 0 0 13px #11170f;
}
.shop-catalog-header {display:flex;align-items:center;justify-content:space-between;gap:12px}
.shop-catalog-header h3 {margin:4px 0 9px;color:#f0dfb7}
#shopcaps {color:#f2d692}
#shoptabs {display:flex;flex-wrap:wrap;gap:4px;margin-bottom:9px}
#shoptabs button {
  flex:1 0 auto;padding:6px 9px;border:2px outset #857d60;
  background:var(--kit-grain),linear-gradient(#616148,#323a2d);
  background-blend-mode:overlay;font-size:13px;color:#e4dac1;
}
#shoptabs button[aria-pressed="true"] {
  border-style:inset;border-color:#a38a58;background:#282d21;color:#ffe2a1;
}
#shopstock {padding:6px;background:#141c16;border:2px inset #797156}
#shopstock button {
  background:var(--kit-grain),linear-gradient(120deg,#394237,#232d24);
  background-blend-mode:overlay;border-color:#797258;color:#f0e3c8;
}
#shopstock button:hover:not(:disabled) {border-color:#ddbd79;background:#414b37}
#shopstock button:disabled {opacity:.69}
.shop-empty {grid-column:1/-1;margin:10px;color:#ded4b7}
#shopcatalog {
  border:7px ridge #8d8979;
  background:var(--kit-grain),radial-gradient(ellipse at 10% 0%,#b1aaa06b,transparent 40%),radial-gradient(ellipse at 97% 90%,#9a562f,transparent 34%),repeating-linear-gradient(114deg,#fff0 0 25px,#cec6ac48 26px,#fff0 27px 41px),linear-gradient(145deg,#555a55,#282e2b 63%,#514b42);
  background-blend-mode:overlay,normal,normal,normal,normal;
  box-shadow:0 0 0 3px #141716,inset 0 0 0 1px #d6c7a56e,inset 0 0 16px #080b0a,0 12px 32px #000d;
}
#shopstock[hidden],#shopitemcard[hidden] {display:none}
#shopitemcard {padding:10px;border:3px inset #807d68;background:#202a23}
.shop-item-grid {display:grid;grid-template-columns:minmax(100px,180px) minmax(0,1fr);gap:14px;align-items:center}
.shop-item-image {width:min(100%,160px);aspect-ratio:1;margin:auto;filter:drop-shadow(0 4px 4px #0009)}
.shop-ammo-icon {background:url("assets/ammo-shop-v1.webp") var(--ammo-x,0%) var(--ammo-y,0%)/200% 200% no-repeat}
.shop-ammo-offset {--ammo-x:100%}
.shop-ammo-piercing {--ammo-y:100%}
.shop-ammo-burst {--ammo-x:100%;--ammo-y:100%}
.ammo-caliber-38 {transform:scale(.74,.94)}
.ammo-caliber-357 {transform:scale(.8,1.08)}
.ammo-caliber-44 {transform:scale(.99,1.02)}
.ammo-caliber-45 {transform:scale(1.16,1.02)}
#shopstock .shop-ammo-icon {width:38px;height:38px;flex:none;filter:drop-shadow(0 2px 2px #000a)}
#bagammo button {display:flex;align-items:center;gap:6px}
#bagammo .shop-ammo-icon {width:26px;height:26px;flex:none}
#shopitemstory,#shopitemstats {margin:7px 0;color:#d3d6bf;font-size:14px}
#shopitemstats {color:#e5ca88;white-space:pre-line}
#bagammo {display:grid;gap:4px;margin-bottom:8px}
#bagammo button {text-align:left;padding:5px 7px;font-size:12px}
#bagammo button[aria-pressed="true"] {border-color:#c4aa69;color:#f5d791}

/* Cast steel front plate, chipped enamel and recessed controls. */
#shopcatalog {
  position:relative;padding:17px 21px 15px;border:8px ridge #858274;
  background:
    radial-gradient(ellipse at 2% 88%,#af6b3a9c,transparent 21%),
    radial-gradient(ellipse at 91% 4%,#a15b3785,transparent 23%),
    var(--kit-grain),
    repeating-linear-gradient(104deg,transparent 0 16px,#d8ccb828 17px,transparent 18px 31px),
    linear-gradient(152deg,#77786b 0%,#424a40 34%,#303a33 61%,#615442 100%);
  background-blend-mode:normal,normal,overlay,normal,normal;
  box-shadow:0 0 0 3px #151812,0 0 0 5px #71634a,0 15px 38px #000d,inset 0 0 0 2px #dfcba36e,inset 0 0 17px #0a0f0c;
}
#shopcatalog::before {
  content:'';position:absolute;inset:2px;pointer-events:none;
  background:
    radial-gradient(circle at 7px 7px,#241b13 0 2px,#6c4931 2.5px,#c4b79a 4px,#484136 5px,transparent 6px) top left,
    radial-gradient(circle at 7px 7px,#241b13 0 2px,#6c4931 2.5px,#c4b79a 4px,#484136 5px,transparent 6px) top right,
    radial-gradient(circle at 7px 7px,#241b13 0 2px,#6c4931 2.5px,#c4b79a 4px,#484136 5px,transparent 6px) bottom left,
    radial-gradient(circle at 7px 7px,#241b13 0 2px,#6c4931 2.5px,#c4b79a 4px,#484136 5px,transparent 6px) bottom right;
  background-size:14px 14px;background-repeat:no-repeat;
}
.shop-catalog-header {margin-bottom:7px;padding:1px 9px;background:#262c24;border:2px inset #82795f;box-shadow:inset 0 0 8px #000a}
#shoptabs button {border:3px ridge #a0967c;box-shadow:inset 0 0 5px #141610,0 2px 2px #1118;text-shadow:0 1px 2px #111}
#shoptabs button[aria-pressed="true"] {border:3px inset #93815b;box-shadow:inset 0 0 8px #000}
#shopstock,#shopitemcard {border:4px inset #89816a;box-shadow:inset 0 0 13px #000b,0 1px #c5b48a6e}
#shopstock button {border:2px outset #6f7462;box-shadow:inset 0 -2px #151b15}
#shopitemcard {background:repeating-linear-gradient(0deg,#bee9b509 0 1px,transparent 1px 4px),radial-gradient(ellipse at top,#263f32,#15221b 75%)}

/* Stamped plates with irregular losses along the exposed edges. */
#shopcatalog {
  --shop-screw:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 23 23'%3E%3Cdefs%3E%3CradialGradient id='s' cx='.32' cy='.23' r='.75'%3E%3Cstop stop-color='%23c7bda1'/%3E%3Cstop offset='.42' stop-color='%23898069'/%3E%3Cstop offset='.76' stop-color='%23473d30'/%3E%3Cstop offset='1' stop-color='%23231d17'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='11.5' cy='11.5' r='10.8' fill='%23292017' stroke='%2375583e'/%3E%3Ccircle cx='11.5' cy='10.8' r='8.1' fill='url(%23s)' stroke='%23585242'/%3E%3Cpath d='M6 7l11 7' stroke='%23cec0a1' stroke-width='3'/%3E%3Cpath d='M6 6l11 7' stroke='%2325211a' stroke-width='2.5'/%3E%3C/svg%3E");
  padding-inline:26px;border-color:#625d50;
}
#shopcatalog::before {
  inset:2px;
  background:var(--shop-screw) top left,var(--shop-screw) top right,var(--shop-screw) bottom left,var(--shop-screw) bottom right;
  background-size:21px 21px;background-repeat:no-repeat;
}
#shopstock {gap:7px;padding:8px;border-color:#58574a;background:#111611}
#shopstock button {
  position:relative;isolation:isolate;
  border:1px solid #787364;border-top-color:#b2a58a;border-bottom:3px solid #141914;
  background:var(--kit-grain),radial-gradient(ellipse at 94% 7%,#98604485,transparent 32%),linear-gradient(150deg,#5d6052,#323b31 47%,#454438);
  background-blend-mode:overlay,normal,normal;
  box-shadow:inset 1px 1px #beb59a60,inset -3px -5px 9px #161a16bd;
  text-shadow:0 1px 2px #141812;
}
#shopstock button::before {
  content:'';position:absolute;z-index:-1;inset:0;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='64' viewBox='0 0 420 64' preserveAspectRatio='none'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M0 44l14-8 10 2 9-9 13-1m-22 10 2 8 13 7M420 4l-22 9-10-2-9 8-16 4m25-12-6-7m-3 15 2 9 12 5M222 63l5-9 13-4 8-12 10-3' stroke='%23181b15' stroke-width='2' opacity='.75'/%3E%3Cpath d='M1 46l14-8 10 2 8-9 13-1m351-15-9-2-9 8-16 4M224 63l5-8 13-4 8-12' stroke='%23c8b798' opacity='.38'/%3E%3Cpath d='M70 9l32-4m216 48 39-4m-205 3 22-3M347 8l10-2' stroke='%23d4cab4' opacity='.38'/%3E%3C/g%3E%3C/svg%3E") center/100% 100% no-repeat;
}
#shopstock button:nth-child(3n+1) {clip-path:polygon(0 7px,7px 0,37% 0,39% 4px,45% 0,100% 0,100% calc(100% - 5px),calc(100% - 8px) 100%,0 100%)}
#shopstock button:nth-child(3n+2) {clip-path:polygon(0 0,calc(100% - 10px) 0,100% 7px,100% 100%,64% 100%,61% calc(100% - 4px),57% 100%,0 100%)}
#shopstock button:nth-child(3n+3)::before {transform:scaleX(-1)}
#shopstock button:focus-visible {outline:0;box-shadow:inset 0 0 0 2px #f2c772}
#shopstock button:hover:not(:disabled) {background-color:#69705a;background-blend-mode:overlay,normal,screen}
@media(max-width:610px){#shopcatalog{padding-inline:17px}}

#shopitemcard {
  background:
    radial-gradient(ellipse at 23% 32%,#243a28a8,#101a13db),
    url("assets/shop-scratched-metal.webp") center/cover no-repeat,
    #273a2a;
  box-shadow:inset 0 0 23px 4px #080e09c9,0 1px #c5b48a6e;
}
.shop-item-grid {perspective:650px;perspective-origin:90px 50%}
.shop-item-image.kit-weapon-atlas {
  position:relative;
  width:min(100%,176px);
  background-image:none;
  filter:none;
  transform-style:preserve-3d;
  animation:shop-weapon-turn 8s linear infinite;
  transform-origin:center;
}
.weapon-turn-layer {
  position:absolute;inset:0;
  background:url("assets/revolvers-shop-v1.webp") var(--weapon-x) var(--weapon-y)/500% 200% no-repeat;
  filter:brightness(.53) saturate(.65);
}
.weapon-turn-face {filter:none}
.shop-item-image.kit-weapon-atlas::before {
  content:'';position:absolute;left:50%;top:27%;width:13.2px;height:47%;
  background:linear-gradient(180deg,#606361 0%,#282e2c 42%,#554130 54%,#2c211b 100%);
  clip-path:polygon(29% 0,71% 0,100% 22%,90% 49%,78% 53%,90% 90%,72% 100%,28% 100%,10% 90%,22% 53%,10% 49%,0 22%);
  transform:translateX(-50%) rotateY(90deg);
}
@keyframes shop-weapon-turn {
  from {transform:rotateX(-12deg) rotateY(0deg)}
  to {transform:rotateX(-12deg) rotateY(360deg)}
}
@media(prefers-reduced-motion:reduce){
  .shop-item-image.kit-weapon-atlas {animation:none;transform:rotateX(-12deg) rotateY(18deg)}
}
#shopreply {padding:8px 11px;margin:0 0 9px;border-left:3px solid #bc9657;background:#211f17;color:#efe0b8}
#shopreply strong {color:#ddb777;font-size:12px;letter-spacing:.06em;text-transform:uppercase}
#shopreply p {margin:2px 0;font-size:14px;line-height:1.4;color:inherit}
#bagammoreserve {margin:10px 0}
#bagammoreserve h3 {font-size:13px;margin-bottom:4px}
.bag-ammo-reserve-row {display:flex;align-items:center;gap:5px;font-size:12px;line-height:1.25;padding:3px 1px}
.bag-ammo-reserve-row .shop-ammo-icon {width:28px;height:28px;flex:none}

html:not(.world-ready) .fullscreen-game {visibility:hidden}
#loadingscreen {position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:28px;background:radial-gradient(ellipse at 40% 30%,#444638,#18231c 70%);color:#dfd0ad;text-align:center}
#loadingscreen[hidden] {display:none}
#loadingscreen>div {padding:30px 38px;border:3px ridge #857657;box-shadow:0 12px 55px #0007;background:#222c22}
#loadingscreen h1 {font-size:25px;letter-spacing:2px}
#loadingscreen small {color:#c7b28a;letter-spacing:3px}
#loadingmessage {margin:22px 0 0;font-size:14px;color:#c8cfb3}
#loadingretry {margin-top:16px}

#characterpanel {width:min(480px,calc(100vw - 24px));top:24px;max-height:calc(100dvh - 150px);padding:22px;background:repeating-linear-gradient(0deg,#ffffff02 0 1px,transparent 1px 4px),linear-gradient(135deg,#30392a,#19231a)}
#characterpanel .portrait {float:left;width:78px;height:92px;margin:8px 16px 12px 0}
#characterpanel h2 {margin:12px 0 5px} #characterpanel h3 {font-size:12px;letter-spacing:2px;text-transform:uppercase;color:#d8bd82;margin:16px 0 6px}
#characterpanel .divider {clear:both} #characterpanel .muted {font-size:12px;line-height:1.5}
.character-points {padding:10px;border:1px solid #81754f;background:#121b12;color:#e4c98c;font:12px monospace}
.character-row {display:grid;grid-template-columns:1fr 48px 32px;align-items:center;gap:10px;padding:4px 7px;border-bottom:1px solid #9ea57a22;font-size:13px}
.character-row strong {text-align:right;font:16px monospace;color:#d9dfb4}.character-row button {padding:1px 7px;min-height:26px;color:#eed49b;background:#39432c;border:1px solid #81754f}
.character-row button:disabled {opacity:.3;cursor:default} #characterderived {border-left:2px solid #a38c59;padding-left:10px}

.music-controls {grid-column:1 / -1;display:grid;grid-template-columns:auto 1fr;gap:3px 8px;align-items:center;max-width:220px}
.music-controls label {display:flex;align-items:center;gap:5px;color:#c8cfb3;font-size:10px;white-space:nowrap}
.music-controls input {width:68px;accent-color:#b9b184;cursor:pointer;margin:0}
.music-controls small {grid-column:1 / -1;font-size:9px;line-height:1.2;color:#adb895}
@media(max-width:850px){.music-controls small {display:none}.music-controls {gap:3px;max-width:200px}.music-controls label {font-size:9px}.music-controls input {width:48px}}

.voice-controls {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px;padding:7px 0;border-bottom:1px solid #8d916647}
.voice-controls button {font-size:11px;padding:5px 9px}.voice-controls small {font-size:11px;color:#b5c29e}
#voicetoggle {grid-column:1 / -1} .shop-dialog .voice-controls {padding:8px 16px;margin:0;background:#20291e}

.voice-choice,.voice-speed {display:flex;align-items:center;gap:7px;font-size:12px;color:#c9d2b3}
.voice-choice select {max-width:min(280px,65vw);background:#1b271b;color:#d8dfc3;border:1px solid #697655;padding:5px;font:12px sans-serif}
.voice-speed input {width:100px;accent-color:#b9b184}.voice-controls #voicestatus {flex-basis:100%}
dialog.mary-evening {background:radial-gradient(ellipse at 20% 10%,#64452b66,transparent 65%),#101512;min-height:340px;animation:mary-fade-in 2.2s ease-out}
.mary-evening::backdrop {background:#050706e8}
.mary-evening .voice-controls {display:none}
.mary-evening #normaldialog {padding:24px 18px}
.mary-evening #dialogtext {font-size:18px;line-height:1.9;max-width:650px;margin:24px auto}
.mary-evening #choices {margin-top:30px}
.mary-evening #dialogtext {white-space:pre-line}
@keyframes mary-fade-in {from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){dialog.mary-evening{animation:none}}

/* A worn metal lever for the optional romantic dialogue tone. */
.hud-system .mature-switch {display:flex;align-items:center;gap:8px;background:linear-gradient(135deg,#474b3e,#222a22);border:1px solid #928565;box-shadow:inset 0 1px #c7bd9166,inset 0 -2px #101710;padding:7px 10px}
.mature-switch::before {content:'';width:27px;height:13px;flex-shrink:0;border:1px solid #807962;border-radius:3px;background:linear-gradient(90deg,#b5a889 0 10px,#101911 11px);box-shadow:inset 0 2px 3px #0008}
.mature-switch[aria-checked="true"]::before {background:linear-gradient(90deg,#263a28 0 15px,#c1ab7b 16px);box-shadow:0 0 6px #cba45644,inset 0 2px 3px #0008}
.mature-switch[aria-checked="true"] {color:#edcd8b}

#maryeveningimage {display:none}
dialog.mary-illustrated {width:min(960px,94vw);max-height:92dvh;overflow-y:auto}
.mary-illustrated #normaldialog {padding:8px}
.mary-illustrated #dialogportrait {display:none}
.mary-illustrated #maryeveningimage {display:block;width:100%;height:auto;max-height:60dvh;object-fit:contain;margin:16px auto;border:1px solid #938363;box-shadow:0 5px 24px #0009;background:#171912;animation:mary-fade-in 2.2s ease-out}
.mary-illustrated #dialogtext {font-size:16px;line-height:1.65;margin:18px auto}
@media(prefers-reduced-motion:reduce){.mary-illustrated #maryeveningimage{animation:none}}
.quarry-exit{position:absolute;right:18px;top:170px;z-index:5;background:#24271f;color:#e3d0a0;border:1px solid #a68b52;padding:9px 14px;border-radius:4px;max-width:45%;font-size:12px}
.quarry-exit[hidden]{display:none}
#quest{white-space:pre-line}

/* Recovered protective gear uses the same field-kit item cards. */
.gear-icon {display:block;width:50px;height:50px;flex:none;background-image:url("assets/quarry-gear-caches-v1.webp");background-size:200% 300%;background-repeat:no-repeat;filter:drop-shadow(0 2px 2px #0007)}
.gear-minerHelmet {background-position:0 0}.gear-quiltedVest {background-position:100% 0}.gear-fieldBinoculars {background-position:0 50%}.gear-owlVisor {background-position:100% 50%}
.gear-preview {width:140px;height:140px;margin:4px auto;filter:drop-shadow(0 5px 5px #0008)}
.gear-icon[hidden] {display:none}.gear-slots {display:grid;gap:5px}.gear-slots .kit-slot {min-height:48px}

@media(min-width:611px){.field-kit .kit-items{max-height:min(490px,calc(100dvh - 220px));overflow:auto;scrollbar-color:#77765b #19231a}}

/* Binocular inspection cursor shares the existing hover readout. */
.viewport #world.scouting-cursor{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 15l3-8h5l2 8m2 0l2-8h5l3 8M13 17h6' fill='%235a674d' stroke='%23ead5a0' stroke-width='2'/%3E%3Ccircle cx='9' cy='21' r='6' fill='%23232d25' stroke='%23ead5a0' stroke-width='2'/%3E%3Ccircle cx='23' cy='21' r='6' fill='%23232d25' stroke='%23ead5a0' stroke-width='2'/%3E%3C/svg%3E") 16 16,help!important}
#hint{max-width:min(850px,85%);white-space:normal;text-align:center;line-height:1.4}
#dialogtext{white-space:pre-line}
