/* Goblin Arena: Cogwhistle's bits of screen (js/arena/town/town-hud.js, town-talk.js, town-travel.js): wanted stars, witnesses, the district's
   name, busking, what E would do, the town map, the card for talking to someone, and the Whistle-Tube's stops */
#twstars { position: absolute; top: 54px; right: 14px; font: 30px var(--f-ui); letter-spacing: 2px; color: #ffe14a; text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 2px 0 #3a2a08; pointer-events: none; display: none; }
#twstars.show { display: block; }
#twstars.lost { opacity: 0.35; }
#twstars.up { animation: twstarsup 0.4s ease-out 3; }
@keyframes twstarsup { 50% { transform: scale(1.25); color: #ff5a3a; } }
#twwit { position: absolute; top: 96px; right: 14px; padding: 4px 12px; border-radius: 10px; background: var(--wk-plate); border: 2px solid var(--wk-ink); box-shadow: var(--wk-drop-sm); color: var(--wk-amber); font-family: var(--f-ui); font-weight: bold; pointer-events: none; white-space: nowrap; max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; display: none; }
#twwit.show { display: block; animation: gspromptin 0.2s ease-out; }
#twplace { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); padding: 6px 18px; border-radius: 10px; background: rgba(20, 14, 6, 0.6); color: #fbe7b0; font: 24px var(--f-ui); text-shadow: 0 2px 3px #000; pointer-events: none; white-space: nowrap; display: none; }
#twplace.show { display: block; animation: twplacein 3.2s ease-out both; }
@keyframes twplacein { 0% { opacity: 0; transform: translate(-50%, 8px); } 12%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
#twbusk { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); padding: 4px 14px; border-radius: 99px; background: rgba(42, 30, 8, 0.7); border: 1px solid rgba(242, 182, 50, 0.55); color: #ffe9a8; font-weight: bold; pointer-events: none; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; display: none; }
#twbusk.show { display: block; }
/* a shift at one of the town's shops (trade/trade-hud.js): a plate under the stars, the next chore, a bar filling */
#twtrade { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); box-sizing: border-box; padding: 5px 14px 9px; border-radius: 10px; background: var(--wk-plate); border: 2px solid var(--wk-ink); box-shadow: var(--wk-drop-sm); color: #ffe9a8; pointer-events: none; text-align: center; display: none; }
#twtrade.show { display: block; }
.twtradetop { font: bold 14px var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.twtradesub { font: 13px var(--f-ui); color: #e8dcc0; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.twtradebar { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #7aff2a var(--k, 0%), rgba(255, 255, 255, 0.12) var(--k, 0%)); visibility: hidden; }
#twtrade.busy .twtradebar { visibility: visible; }
#twtrade.hot .twtradebar { background: linear-gradient(90deg, #ff3a1a var(--k, 0%), rgba(255, 255, 255, 0.12) var(--k, 0%)); }
/* what E would do (#twprompt) and the nameplates over goblins (#twplate): css/world-tags.css */
#twmap { position: absolute; left: 12px; top: 56px; width: 128px; height: 128px; border-radius: 50%; border: 2px solid rgba(242, 182, 50, 0.55); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); pointer-events: none; display: none; }
#twmap.show { display: block; }
/* yer hostility, under the map: a plate with a bar that fills red as it rises (town-standing.js) */
#twhos { position: absolute; left: 12px; top: 194px; width: 128px; box-sizing: border-box; padding: 3px 8px 7px; border-radius: 10px; background: var(--wk-plate); border: 2px solid var(--wk-ink); box-shadow: var(--wk-drop-sm); color: #e8dcc0; font: bold 12px var(--f-ui); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; display: none; }
#twhos::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 3px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #ff3a1a var(--hos, 50%), rgba(255, 255, 255, 0.12) var(--hos, 50%)); }
#twhos.show { display: block; }
#twhos.outlaw { color: #ff5a3a; border-color: #6a0a0a; }
#twhos.loved { color: #7aff2a; }
#twhos.up { animation: twstarsup 0.4s ease-out 2; }
/* sneaking (crouched or lying down in town): a small plate under yer hostility, whether anyone can see you (town-sneak.js) */
#twsneak { position: absolute; left: 12px; top: 232px; width: 128px; box-sizing: border-box; padding: 3px 8px; border-radius: 10px; background: var(--wk-plate); border: 2px solid var(--wk-ink); box-shadow: var(--wk-drop-sm); color: #9ad8a0; font: bold 12px var(--f-ui); text-align: center; pointer-events: none; white-space: nowrap; display: none; }
#twsneak.show { display: block; animation: gspromptin 0.2s ease-out; }
#twsneak.seen { color: var(--wk-amber); }
#scopes.atstation #twmap, #scopes.atstation #twprompt, #scopes.atstation #twbusk, #scopes.atstation #twhos, #scopes.atstation #twtrade, #scopes.atstation #twsneak { display: none; }
#twtalk { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 90; width: max-content; max-width: calc(100% - 24px); padding: 10px 12px; border-radius: 14px; background: rgba(16, 12, 6, 0.92); border: 1px solid rgba(242, 182, 50, 0.6); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6); color: #fbe7b0; display: none; }
#twtalk.show { display: block; }
.twtalkwho { font: 16px var(--f-ui); margin: 0 4px 8px; text-align: center; }
.twtalkrow { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.twtalkbtn { position: relative; min-width: 44px; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(242, 182, 50, 0.5); background: rgba(70, 50, 20, 0.9); color: #fff3d0; font: bold 15px system-ui, sans-serif; cursor: pointer; }
.twtalkbtn:hover, .twtalkbtn.padfocus, .twtalkbtn:focus-visible { background: rgba(140, 100, 30, 0.95); outline: 2px solid #ffe14a; }
.twtalkbtn small { position: absolute; top: 2px; right: 5px; font-size: 10px; opacity: 0.6; }
.twtalkbye { background: rgba(80, 30, 20, 0.9); }
body.touchy .twtalkbtn small { display: none; }
#twtube { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 90; width: min(560px, calc(100% - 24px)); box-sizing: border-box; padding: 10px 12px; border-radius: 14px; background: rgba(8, 20, 12, 0.93); border: 1px solid rgba(122, 255, 154, 0.55); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6); color: #d8ffe0; display: none; }
#twtube.show { display: block; }
.twtuberow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.twtuberow .twtalkbtn { padding: 8px 6px; background: rgba(30, 70, 40, 0.92); border-color: rgba(122, 255, 154, 0.45); }
.twtuberow .twtalkbtn:hover, .twtuberow .twtalkbtn.padfocus, .twtuberow .twtalkbtn:focus-visible { background: rgba(50, 120, 60, 0.95); }
.twtuberow .twtalkbye { background: rgba(80, 30, 20, 0.9); }
#twwhoosh { position: fixed; inset: 0; z-index: 95; pointer-events: none; display: none; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(20, 60, 30, 0.88) 0%, rgba(4, 16, 8, 0.97) 70%); }
#twwhoosh.show { display: flex; animation: twwhoosh 0.9s ease-in-out both; }
.twwhooshname { font: 28px var(--f-ui); color: #d8ffe0; text-shadow: 0 2px 6px #000; animation: twwhooshspin 0.9s ease-in-out both; text-align: center; padding: 0 16px; }
@keyframes twwhoosh { 0% { opacity: 0; } 35%, 65% { opacity: 1; } 100% { opacity: 0; } }
@keyframes twwhooshspin { 0% { transform: scale(0.4) rotate(-20deg); } 50% { transform: scale(1.1) rotate(0); } 100% { transform: scale(1.6); } }
@media (max-width: 600px) {
  #twstars { font-size: 22px; top: 88px; right: 10px; }
  #twwit { top: 120px; right: 10px; font-size: 12px; max-width: calc(100% - 120px); }
  #twbusk { top: 88px; left: auto; right: 10px; transform: none; max-width: calc(100% - 120px); font-size: 13px; }
  #twtrade { top: 150px; left: auto; right: 8px; transform: none; max-width: calc(100% - 116px); padding: 4px 8px 8px; }
  .twtradetop { font-size: 12px; white-space: normal; }
  .twtradesub { font-size: 11px; white-space: normal; }
  #twmap { width: 92px; height: 92px; top: 48px; left: 8px; }
  #twhos { width: 92px; top: 146px; left: 8px; font-size: 10px; padding: 2px 4px 6px; }
  #twsneak { width: 92px; top: 172px; left: 8px; font-size: 10px; padding: 2px 4px; }
  #twplace { font-size: 18px; }
  #twtalk, #twtube { bottom: 210px; }
  .twtuberow { grid-template-columns: repeat(2, 1fr); }
  .twtalkbtn { padding: 8px 10px; font-size: 14px; }
}
body.touchplaying #twtalk, body.touchplaying #twtube { bottom: calc(190px + env(safe-area-inset-bottom, 0px)); }
/* the Gobbodrome: buying at the bar or from a seller (drome/drome-snacks.js), the town's talk card's look */
/* the Gobbodrome's cards (arena/drome/): the buy card and the Gobbo-Bracer, in the workshop style (ART_STYLE.md
   section 9): riveted iron plates with an ink drop, Rye headings in brass over a dashed rule, Rubik buttons a degree
   off square, the primary in hazard stripes, potion green for the good, segmented bars */
#dmbuy, #dmhost, #cgbar, #dmdev, #twdice, #twlot, #rnshop, #rnstable { position: fixed; z-index: 90; box-sizing: border-box; padding: 22px 14px 14px; border-radius: 10px; border: 3px solid var(--wk-ink, #0a0612);
  background: var(--wk-stripes, none), var(--wk-plate, linear-gradient(170deg, #3a4048, #2a2e36)); box-shadow: var(--wk-drop, 0 6px 0 #0a0612); color: var(--wk-paper, #f0ece0);
  font: 500 14px var(--f-ui, system-ui, sans-serif); display: none; }
#dmbuy.show, #dmhost.show, #cgbar.show, #dmdev.show, #twdice.show, #twlot.show, #rnshop.show, #rnstable.show { display: block; }
#dmbuy::after, #dmhost::after, #cgbar::after, #dmdev::after, #twdice::after, #twlot::after, #rnshop::after, #rnstable::after { content: ""; position: absolute; top: 6px; left: 7px; right: 7px; height: 12px; pointer-events: none;
  background: var(--wk-rivet-dot) left center / 12px 12px no-repeat, var(--wk-rivet-dot) right center / 12px 12px no-repeat; }
#dmbuy .twtalkwho, #dmhost .twtalkwho, #cgbar .twtalkwho, #twdice .twtalkwho, #twlot .twtalkwho, #rnshop .twtalkwho, #rnstable .twtalkwho, .dmdevtop b { font: 400 18px var(--f-head, serif); color: var(--wk-brass, #f2b632); text-shadow: 2px 2px 0 var(--wk-ink, #0a0612); }
#dmbuy .twtalkwho, #dmhost .twtalkwho, #cgbar .twtalkwho, #twdice .twtalkwho, #twlot .twtalkwho, #rnshop .twtalkwho { padding-bottom: 8px; margin: 0 0 10px; border-bottom: 3px dashed var(--wk-ink, #0a0612); }
.dmbuybtn, #dmbuy .twtalkbye, #cgbar .twtalkbye, #twdice .twtalkbye, #twlot .twtalkbye, #rnshop .twtalkbye, #rnstable .twtalkbye, .dmdevbtn { position: relative; min-height: 48px; padding: 6px 8px; border-radius: 10px; border: 3px solid var(--wk-ink, #0a0612); background: var(--wk-plate, #2a2e36);
  box-shadow: var(--wk-drop-sm, 0 4px 0 #0a0612); color: var(--wk-paper, #f0ece0); font: 800 13px var(--f-ui, system-ui, sans-serif); text-transform: uppercase; letter-spacing: 1px;
  text-shadow: 1px 1px 0 var(--wk-ink, #0a0612); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; rotate: -1deg; }
.dmbuybtn:nth-child(even), .dmdevbtn:nth-child(even) { rotate: 1deg; }
.dmbuybtn:hover, .dmbuybtn.padfocus, .dmdevbtn:not(:disabled):hover { filter: brightness(1.12); transform: translateY(-2px); }
.dmbuybtn:active, .dmdevbtn:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--wk-ink, #0a0612); }
.dmbuybtn:focus-visible, .dmbuybtn.padfocus, .dmdevbtn:focus-visible { outline: 3px solid var(--wk-potion, #7aff2a); outline-offset: 2px; }
.dmbuybtn small, .dmdevbtn small { position: absolute; top: 3px; right: 6px; font-size: 10px; letter-spacing: 0; opacity: 0.6; }
#dmbuy, #cgbar, #rnshop { left: 50%; bottom: 150px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); }
.dmbuyrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dmbuyname { text-transform: none; letter-spacing: 0; font-weight: 800; }
.dmbuycost { font-size: 12px; color: var(--wk-brass, #f2b632); }
.dmbuyrow .twtalkbye { grid-column: 1 / -1; }
@media (max-width: 720px) { #dmbuy, #cgbar, #rnshop { bottom: 210px; } .dmbuyrow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body.touchplaying #dmbuy, body.touchplaying #cgbar, body.touchplaying #rnshop { bottom: calc(190px + env(safe-area-inset-bottom, 0px)); }
/* Gimlet the Matchmaker's card (drome/drome-host-menu.js): pick rows of buttons, the one picked lit potion green */
#dmhost { left: 50%; bottom: 150px; transform: translateX(-50%); width: 460px; max-width: calc(100% - 24px); max-height: calc(100vh - 200px); overflow-y: auto; }
.dmhostrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 8px; }
.dmhostrow .dmbuybtn { min-height: 44px; text-transform: none; letter-spacing: 0; }
.dmhostrow .dmbuybtn.on { background: var(--wk-deep, #15181e); color: var(--wk-potion, #7aff2a); box-shadow: inset 0 0 0 2px var(--wk-potion, #7aff2a), var(--wk-drop-sm, 0 4px 0 #0a0612); }
.dmhostrow .dmhostgo { background: repeating-linear-gradient(-45deg, #c8902a 0 10px, #0a0612 10px 20px); color: #fff3d0; }
.dmhostlab { font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--wk-brass, #f2b632); margin: 6px 0 4px; }
.dmhostnews { margin: 0 0 8px; font-weight: 700; }
.dmhosthow { margin: 0 0 8px; font-size: 13px; color: #c8ccd4; }
.dmhostlist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dmhostname { padding: 3px 8px; border-radius: 8px; border: 2px solid var(--wk-ink, #0a0612); background: var(--wk-deep, #15181e); font-weight: 700; }
.dmhostbracket { margin-bottom: 10px; }
.dmhostbout { padding: 4px 8px; margin-bottom: 4px; border-radius: 8px; background: var(--wk-deep, #15181e); font-weight: 600; }
.dmhostbout.on { box-shadow: inset 0 0 0 2px var(--wk-magic, #2ae0ff); }
.dmhostbout .won { color: var(--wk-potion, #7aff2a); font-weight: 800; }
.dmhostbout .lost { opacity: 0.5; text-decoration: line-through; }
@media (max-width: 720px) { #dmhost { bottom: 210px; max-height: calc(100vh - 250px); } }
body.touchplaying #dmhost { bottom: calc(190px + env(safe-area-inset-bottom, 0px)); max-height: calc(100vh - 230px); }
#dmdev { left: 16px; bottom: 150px; z-index: 88; width: 310px; max-width: calc(100% - 32px); }
.dmdevtop { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 3px dashed var(--wk-ink, #0a0612); }
.dmdevturn { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #9aa8b8; }
.dmdevsecs { margin-left: auto; min-width: 46px; text-align: center; padding: 3px 8px; border-radius: 8px; border: 3px solid var(--wk-ink, #0a0612); background: var(--wk-deep, #15181e); font-weight: 800; color: var(--wk-potion, #7aff2a); }
.dmdevsecs.hurry { color: var(--wk-red, #ff3a1a); }
.dmdevhand { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-bottom: 10px; }
.dmdevfront { display: flex; flex-direction: column; gap: 6px; }
.dmdevfront .gcard { --gw: 128px; box-shadow: 0 0 0 3px var(--wk-ink, #0a0612), 0 0 16px rgba(42, 224, 255, 0.55); }
.dmdevswap { position: relative; padding: 0; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; rotate: -1deg; }
.dmdevswap:nth-child(odd) { rotate: 1deg; }
.dmdevswap .gcard { --gw: 74px; box-shadow: 0 0 0 3px var(--wk-ink, #0a0612), 0 4px 0 var(--wk-ink, #0a0612); }
.dmdevswap .gcard .gabmini { display: none; }
.dmdevswap:not(:disabled):hover .gcard { transform: translateY(-3px); }
.dmdevswap:focus-visible { outline: 3px solid var(--wk-potion, #7aff2a); outline-offset: 2px; }
.dmdevswap:disabled { cursor: default; }
.dmdevswap.ko .gcard, .dmdevswap:disabled .gcard { filter: grayscale(0.85) brightness(0.7); }
.dmdevtag { padding: 3px 8px; min-height: 22px; border-radius: 6px; border: 2px solid var(--wk-ink, #0a0612); background: var(--wk-plate, #2a2e36); font: 800 11px var(--f-ui, system-ui, sans-serif); text-transform: uppercase; letter-spacing: 1px; color: var(--wk-potion, #7aff2a); }
.dmdevswap small { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--wk-ink, #0a0612); background: var(--wk-brass, #f2b632); color: var(--wk-ink, #0a0612); font: 800 11px/16px var(--f-ui, system-ui, sans-serif); text-align: center; }
.dmdevrow.one { grid-template-columns: 1fr; }
.dmdevhp { height: 12px; border: 2px solid var(--wk-ink, #0a0612); background: var(--wk-deep, #15181e); }
.dmdevhp i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--wk-potion, #7aff2a) 0 10px, transparent 10px 14px); }
.dmdevhp i.low { background: repeating-linear-gradient(90deg, var(--wk-red, #ff3a1a) 0 10px, transparent 10px 14px); }
.dmdevrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dmdevrow.small { grid-template-columns: 1fr 1fr; margin-top: 10px; }
.dmdevbtn i { font-style: normal; font-weight: 500; font-size: 11px; letter-spacing: 0; opacity: 0.8; text-transform: none; }
.dmdevbtn.atk { --pill: var(--wk-well, #1a1e26); background: linear-gradient(var(--pill), var(--pill)) center / calc(100% - 18px) calc(100% - 12px) no-repeat, var(--wk-hazard, #f2b632); text-shadow: none; }
.dmdevbtn.swap { box-shadow: var(--wk-drop-sm, 0 4px 0 #0a0612), inset 5px 0 0 var(--wk-potion, #7aff2a); }
.dmdevbtn.ko, .dmdevbtn:disabled { opacity: 0.45; cursor: default; filter: grayscale(0.8); }
.dmdevrow.small .dmdevbtn { min-height: 44px; }
.dmdevnote { margin-top: 8px; font-size: 12px; color: #9aa8b8; }
.dmdevend { font: 400 22px var(--f-head, serif); text-align: center; margin: 2px 0 8px; color: var(--wk-brass, #f2b632); text-shadow: 2px 2px 0 var(--wk-ink, #0a0612); }
.dmdevend.won { color: var(--wk-potion, #7aff2a); }
@media (max-width: 720px) { #dmdev { left: 50%; transform: translateX(-50%); bottom: auto; top: 64px; width: min(340px, calc(100% - 24px)); padding: 18px 10px 10px; } .dmdevfront .gcard { --gw: 104px; } .dmdevswap .gcard { --gw: 64px; } }
/* subtitles (js/arena/subs.js): what goblins and gnomes say, in English, with their own words under it */
#gssubs { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; z-index: 5; }
.gssub { max-width: 100%; padding: 4px 12px 5px; border-radius: 8px; background: rgba(10, 8, 4, 0.72); text-align: center; transition: opacity 0.1s linear; }
.gssubline { color: #fff4dc; font: 17px/1.3 system-ui, sans-serif; text-shadow: 0 1px 2px #000; }
.gssubwho { color: var(--wk-amber, #f2b632); font-weight: bold; }
.gssubheard { color: rgba(255, 236, 200, 0.55); font: italic 13px/1.25 system-ui, sans-serif; }
@media (max-width: 600px) { #gssubs { bottom: auto; top: 148px; } .gssubline { font-size: 14px; } .gssubheard { font-size: 11px; } }
body.touchplaying #gssubs { bottom: auto; top: 148px; }
/* (on a phone the bracer covers the subtitles' place up top: while it's out, just the newest goes under it) */
@media (max-width: 720px) { body:has(#dmdev.show) #gssubs { top: auto; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); } body:has(#dmdev.show) .gssub:not(:last-child) { display: none; } }
/* the bracer's top row: who you're up against, their card out front and how many they've got left */
.dmdevfoe { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 6px 8px; border: 3px solid var(--wk-ink, #0a0612); border-radius: 8px; background: var(--wk-deep, #15181e); }
.dmdevfoeart { flex: 0 0 auto; width: 52px; height: 52px; border: 2px solid var(--wk-ink, #0a0612); border-radius: 6px; overflow: hidden; background: #2a2e36; box-shadow: 0 0 10px rgba(255, 58, 26, 0.35); }
.dmdevfoeart svg { width: 100%; height: 100%; display: block; }
.dmdevfoeinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dmdevfoetop { display: flex; align-items: center; gap: 6px; }
.dmdevfoetop small { font: 800 10px var(--f-ui, system-ui, sans-serif); letter-spacing: 1px; color: var(--wk-red, #ff3a1a); }
.dmdevfoetop b { font: 400 15px var(--f-head, serif); color: var(--wk-brass, #f2b632); text-shadow: 1px 1px 0 var(--wk-ink, #0a0612); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmdevpips { margin-left: auto; display: flex; gap: 4px; }
.dmdevpips i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--wk-ink, #0a0612); background: var(--wk-paper, #f0ece0); }
.dmdevpips i.out { background: var(--wk-potion, #7aff2a); }
.dmdevpips i.ko { background: #4a4a52; }
.dmdevfoecard { font-size: 12px; color: #c8d0d8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .dmdevfoe { padding: 4px 6px; margin-bottom: 6px; } .dmdevfoeart { width: 40px; height: 40px; } }
/* Crookbones, street dice with Shifty Mott (arena/town/town-dice-card.js): the Gobbodrome's buy card's plate, with the
   two pairs of bones side by side (ivory, ink pips, the one's pip red), a win in potion green, a loss in red */
#twdice { left: 50%; bottom: 12px; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); padding: 20px 12px 12px; }
#twdice .twdicetop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.twdicegob { font: 800 14px var(--f-ui, system-ui, sans-serif); color: var(--wk-paper, #f0ece0); text-shadow: none; }
.twdicerules { font-size: 13px; opacity: 0.85; text-align: center; margin: 0 4px 8px; }
.twdicetable { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.twdicepair { padding: 4px 6px 6px; border-radius: 8px; border: 2px solid var(--wk-ink, #0a0612); background: rgba(10, 6, 18, 0.45); text-align: center; }
.twdicewho { font: 800 11px var(--f-ui, system-ui, sans-serif); text-transform: uppercase; letter-spacing: 1px; color: var(--wk-brass, #f2b632); }
.twdicebones { display: flex; justify-content: center; gap: 8px; margin: 4px 0 2px; }
.twdie { width: 36px; height: 36px; box-sizing: border-box; padding: 4px; border-radius: 7px; border: 3px solid var(--wk-ink, #0a0612); background: #e8e0c8; box-shadow: 0 3px 0 var(--wk-ink, #0a0612);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center; rotate: -3deg; }
.twdie:nth-child(even) { rotate: 4deg; }
.twdie span { width: 6px; height: 6px; border-radius: 50%; }
.twdie span.on { background: var(--wk-ink, #0a0612); }
.twdieone span.on { background: #9a3020; width: 9px; height: 9px; }
.twdieblank { background: rgba(232, 224, 200, 0.15); box-shadow: none; }
.twdiceval { font: 800 13px var(--f-ui, system-ui, sans-serif); }
.twdicenote { text-align: center; margin: 0 4px 8px; font-weight: 600; }
.twdicewin { color: var(--wk-potion, #7aff2a); }
.twdicelose { color: #ff8a7a; }
.twdicetie { color: var(--wk-brass, #f2b632); }
#twdice .twdicerow { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
#twdice .twdicerow.twdicethree { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#twdice .twdicerow .twtalkbye { grid-column: auto; }
@media (max-width: 720px) { #twdice { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); } #twdice .twdicerow { grid-template-columns: repeat(3, minmax(0, 1fr)); } #twdice .twdicerow.twdicethree { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* (the camera's over the table while you play, so the card sits along the bottom, over the touch controls it doesn't need) */
body.touchplaying #twdice { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
/* (a phone on its side has no room above or below the card for the table: it goes down the left, the table on the right) */
@media (max-height: 500px) { #twdice, body.touchplaying #twdice { top: 6px; bottom: auto; left: 8px; transform: none; width: min(400px, 56%); padding-top: 16px; } .twdicerules { display: none; } #twdice .twdicerow { grid-template-columns: repeat(3, minmax(0, 1fr)); } #twdice .twdicerow.twdicethree { grid-template-columns: repeat(2, minmax(0, 1fr)); } #twdice .dmbuybtn small { display: none; } #twdice .dmbuybtn { min-height: 44px; } }
/* the Drover's egg shop at the ranch (arena/ranch/ranch-shop.js): his word, the buy button, yer eggs */
.rnshopsay { margin: 0 0 10px; max-width: 420px; color: var(--wk-paper, #efe6cf); font-size: 14px; }
.rnshoprow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.rnshoprow .dmbuybtn:disabled { opacity: 0.5; filter: grayscale(0.6); }
.rnshopeggs { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; min-height: 48px; }
.rnshopegg { display: inline-flex; border-radius: 8px; }
.rnshopegg.new { outline: 3px solid var(--wk-brass, #f2b632); }
@media (max-width: 400px) { .rnshoprow { grid-template-columns: minmax(0, 1fr); } }
/* yer stable at the ranch (arena/ranch/ranch-stable.js): a place to a row, its badge, how it's doing, and its buttons */
#rnstable { left: 50%; bottom: 120px; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 200px); display: none; flex-direction: column; padding: 20px 12px 12px; }
#rnstable.show { display: flex; }
.rnstabletop { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rnstabletop .twtalkwho { flex: 1; min-width: 0; }
.rnstabletop .twtalkbye { flex: 0 0 48px; width: 48px; }
.rnstablelist { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.rnplace { padding: 8px; border-radius: 8px; border: 2px solid var(--wk-ink, #0a0612); background: rgba(10, 6, 18, 0.45); display: flex; flex-direction: column; gap: 6px; }
.rnplacetop { display: flex; gap: 10px; align-items: center; }
.rnplacewho { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.rnplacewho b, .rnempty b { font: 800 15px var(--f-ui, system-ui, sans-serif); color: var(--wk-brass, #f2b632); overflow-wrap: anywhere; }
.rnplaceline { font-size: 13px; opacity: 0.9; overflow-wrap: anywhere; }
.rnmythic { color: #e8e0f0; }
.rnhorseicon { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; border: 4px solid; box-sizing: border-box; display: grid; place-items: center; font-size: 20px; box-shadow: 0 0 0 2px var(--wk-ink, #0a0612); }
.rnhorseicon.foal { width: 34px; height: 34px; flex-basis: 34px; font-size: 16px; }
.rnbar { height: 8px; border-radius: 4px; border: 2px solid var(--wk-ink, #0a0612); background: rgba(10, 6, 18, 0.6); overflow: hidden; max-width: 260px; }
.rnbar span { display: block; height: 100%; background: var(--wk-brass, #f2b632); }
.rnplacebtns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rnplacebtns .rnstablebtn { flex: 1 1 auto; min-width: 88px; min-height: 44px; font-size: 14px; }
.rnplacebtns .rnstablebtn:disabled { opacity: 0.5; filter: grayscale(0.6); }
.rneggbtn { display: inline-flex; align-items: center; gap: 6px; }
.rnnamein { flex: 1 1 160px; min-width: 0; min-height: 44px; box-sizing: border-box; padding: 6px 10px; border-radius: 8px; border: 3px solid var(--wk-ink, #0a0612); background: #efe6cf; color: #1a1420; font: 600 15px var(--f-ui, system-ui, sans-serif); }
.rnglueask { flex: 1 1 100%; margin: 0; font-weight: 600; }
.rnglueyes { background: #5a1a2a !important; }
@media (max-width: 720px) { #rnstable { bottom: 200px; max-height: calc(100vh - 230px); } }
body.touchplaying #rnstable { bottom: calc(180px + env(safe-area-inset-bottom, 0px)); max-height: calc(100vh - 220px - env(safe-area-inset-bottom, 0px)); }
@media (max-height: 500px) { #rnstable, body.touchplaying #rnstable { top: 6px; bottom: auto; max-height: calc(100vh - 12px); padding-top: 16px; } }
/* riding (arena/ranch/ride.js): who you're on, its wind for a gallop, and what it's up to; flying the army's copter
   the same plate (arena/town/town-heli.js): how high, and the keys */
#rdhud, #hlhud { position: fixed; z-index: 86; top: 58px; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  max-width: calc(100% - 24px); box-sizing: border-box; padding: 5px 12px; border-radius: 10px; border: 3px solid var(--wk-ink, #0a0612); background: var(--wk-plate, #2a2e36);
  color: var(--wk-paper, #f0ece0); font: 700 13px var(--f-ui, system-ui, sans-serif); pointer-events: none; }
#rdhud.show, #hlhud.show { display: flex; }
.hlhudalt { font-variant-numeric: tabular-nums; opacity: 0.9; }
#hlhud.hurt .hlhudalt { color: #ff8a5a; opacity: 1; }
.rdhudname { color: var(--wk-brass, #f2b632); }
.rdhudwind { width: 90px; height: 8px; border-radius: 4px; border: 2px solid var(--wk-ink, #0a0612); background: rgba(10, 6, 18, 0.6); overflow: hidden; }
.rdhudwind span { display: block; height: 100%; background: var(--wk-potion, #7aff2a); }
.rdhudwind span.blown { background: #c86a3a; }
.rdhudsay { font-weight: 600; opacity: 0.9; }
.rdhudsay:empty { display: none; }
@media (max-width: 560px) { #rdhud, #hlhud { top: 196px; } }
/* the stable card's two tabs (yer stable, the stud board), and asks waiting on an answer */
.rnstabs { display: flex; gap: 6px; margin: 8px 0; }
.rnstab { flex: 1 1 0; min-height: 44px; font-size: 14px; opacity: 0.7; }
.rnstab.on { opacity: 1; border-color: var(--wk-brass, #f2b632); color: var(--wk-brass, #f2b632); }
.rnask { border-color: var(--wk-brass, #f2b632); }

/* ---------- The Gilded Gear (arena/casino/): its tables' games over the town, and the piano's keys ---------- */
/* (sat at a table: the game's window opens over the town's view, which is #scopes at 75) */
body.atcasino :is(.gamewin, #duel, #roulette, #blackjack, #poker, #plinko, #falls, #slots, #ride, #gobbo, #market, #inventory, #trade, #shop, #avatar) { z-index: 80; }
body.atcasino #toast { z-index: 85; }
#cgpiano { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 90; display: none; box-sizing: border-box; width: max-content; max-width: calc(100% - 16px);
  padding: 10px; border-radius: 10px; border: 3px solid var(--wk-ink, #0a0612); background: var(--wk-plate, linear-gradient(170deg, #3a4048, #2a2e36)); box-shadow: var(--wk-drop, 0 6px 0 #0a0612); }
#cgpiano.show { display: block; }
#cgpiano .cgkeys { position: relative; display: flex; gap: 3px; touch-action: none; }
#cgpiano .cgkey { position: relative; width: 40px; height: 120px; border-radius: 0 0 6px 6px; border: 2px solid var(--wk-ink, #0a0612); background: #f4ecd8; color: #3a2a1a; font: 700 12px var(--f-ui, sans-serif);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; box-sizing: border-box; cursor: pointer; user-select: none; -webkit-user-select: none; }
#cgpiano .cgkey.lit, #cgpiano .cgkey.padfocus { background: #ffd27a; }
#cgpiano .cgsharp { position: absolute; top: 0; width: 28px; height: 72px; right: -16px; z-index: 1; border-radius: 0 0 5px 5px; border: 2px solid var(--wk-ink, #0a0612); background: #1a1418; color: #f2b632;
  font: 700 10px var(--f-ui, sans-serif); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; box-sizing: border-box; cursor: pointer; user-select: none; -webkit-user-select: none; }
#cgpiano .cgsharp.lit, #cgpiano .cgsharp.padfocus { background: #ff3ac0; color: #fff; }
#cgpiano .cgpianofoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--wk-brass, #f2b632); font: 500 12px var(--f-ui, sans-serif); }
#cgpiano .cgpianofoot button { min-height: 40px; min-width: 40px; padding: 4px 12px; border-radius: 8px; border: 3px solid var(--wk-ink, #0a0612); background: var(--wk-plate, #2a2e36); color: #fff3b0; font: 700 14px var(--f-ui, sans-serif); cursor: pointer; }
@media (max-width: 480px) { #cgpiano { padding: 6px; } #cgpiano .cgkeys { gap: 1px; } #cgpiano .cgkey { width: calc((100vw - 40px) / 10); min-width: 30px; height: 104px; } #cgpiano .cgsharp { width: 22px; right: -12px; height: 62px; } #cgpiano .cgpianofoot small { display: none; } }
/* Cogwhistle's property (arena/town/town-lots-card.js): the dice card's plate, a line or two on the place, and the
   shop that's open now lit potion green */
#twlot { left: 50%; bottom: 12px; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow-y: auto; padding: 20px 12px 12px; }
#twlot .twdicetop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.twlotline { font-size: 13px; text-align: center; margin: 0 4px 6px; }
.twlotwarn { color: var(--wk-brass, #f2b632); }
.twlotrow .twloton { border-color: var(--wk-potion, #7aff2a); }
.twlotauc { color: var(--wk-brass, #f2b632); }
/* the Neighbourhood Watch's mission on: what to do next, under the hostility chip (js/arena/town/town-watch.js) */
#twmis { position: absolute; left: 12px; top: 230px; max-width: min(300px, calc(100% - 24px)); box-sizing: border-box; padding: 4px 10px; border-radius: 10px; background: var(--wk-plate); border: 2px solid var(--wk-ink); box-shadow: var(--wk-drop-sm); color: #cfe0ff; font: bold 12px var(--f-ui); line-height: 1.3; pointer-events: none; display: none; }
#twmis.show { display: block; }
#scopes.atstation #twmis { display: none; }
@media (max-width: 600px) { #twmis { top: 172px; left: 8px; max-width: calc(100% - 130px); font-size: 11px; padding: 3px 7px; } }
