/* prodscene1 (2026-10-15): production buildings as a lived-in painted scene + big storage gauge.
   Scoped to .overlay-card.prod-scene and .pin-fill only. */
.overlay-card.prod-scene {
  width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; border: none;
  padding: 0; overflow: hidden; background: #1e140c; position: relative;
}
.overlay-card.prod-scene > .overlay-x { display: none; }
.overlay-card.prod-scene > #overlayBody { position: absolute; z-index: 4; overflow: auto; overscroll-behavior: contain; }
.prod-scene .wk2 {
  padding: 0 16px 14px; border-radius: 16px; border: 2px solid var(--brass, #c9a24a);
  background: linear-gradient(170deg, rgba(248,236,208,.96), rgba(232,211,166,.96));
  box-shadow: 0 10px 30px rgba(10,6,2,.55);
}
.prod-scene .wk2 .wk-banner { height: auto; aspect-ratio: auto; margin: 0 -16px; background: transparent; border: none; box-shadow: none; overflow: visible; }
.prod-scene .wk2 .wk-pan, .prod-scene .wk2 .wk-vignette, .prod-scene .wk2 .wk-ready { display: none; }
.prod-scene .wk2 .wk-plaque { position: relative; left: auto; bottom: auto; margin: -2px auto 0; width: max-content; border-radius: 0 0 12px 12px; border-top: none; }
.prod-scene .wk2 .cl-sub .cl-bar { display: none; }

/* back button in the game's look */
.ps-back {
  position: absolute; z-index: 6; top: max(12px, env(safe-area-inset-top)); left: 12px;
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 2px solid #c9a24a;
  background: linear-gradient(180deg, #8b5a2b, #5e3a1f); color: #f7ecd4;
  font: 700 1.02rem var(--serif, Georgia, serif); letter-spacing: .02em; cursor: pointer;
  box-shadow: 0 4px 12px rgba(10,6,2,.5); text-shadow: 0 1px 1px #1a1208;
}
.ps-back:hover { filter: brightness(1.12); }

/* ---- stage ---- */
.ps-stage { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.ps-bg {
  position: absolute; inset: -6%; background-size: 260% auto; background-repeat: no-repeat;
  filter: blur(3px) saturate(1.08) brightness(.86); transform: scale(1.04);
  animation: psDrift 40s ease-in-out infinite alternate;
}
@keyframes psDrift { to { transform: scale(1.1) translate(-1.5%, -1%); } }
.ps-light { position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 55% at 40% 42%, rgba(255,226,160,.28), rgba(0,0,0,0) 70%),
              linear-gradient(180deg, rgba(20,12,6,.25), rgba(20,12,6,0) 30%, rgba(20,12,6,0) 60%, rgba(20,12,6,.55));
  animation: psSun 9s ease-in-out infinite alternate; }
@keyframes psSun { to { opacity: .75; } }
.ps-hero { position: absolute; left: 38%; top: 50%; width: min(52vh, 46vw, 640px); transform: translate(-50%, -50%); }
.ps-cut { display: block; width: 100%; height: auto; filter: drop-shadow(0 16px 22px rgba(10,6,2,.6)); animation: psBreathe 7s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes psBreathe { 50% { transform: scale(1.012); } }
.ps-front { position: absolute; left: 0; right: 0; bottom: 0; height: 18%; }

/* sky life */
.ps-cloud { position: absolute; top: 6%; width: 220px; height: 60px; border-radius: 50%; background: radial-gradient(ellipse, rgba(255,250,240,.35), rgba(255,250,240,0) 70%); animation: psCloud 70s linear infinite; }
.ps-cloud.c2 { top: 16%; width: 300px; animation-duration: 95s; animation-delay: -40s; opacity: .7; }
@keyframes psCloud { from { transform: translateX(-30vw); } to { transform: translateX(120vw); } }
.ps-bird { position: absolute; top: 14%; width: 14px; height: 6px; border-top: 2px solid rgba(30,20,12,.7); border-radius: 50% 50% 0 0; animation: psBird 26s linear infinite; }
.ps-bird::after { content: ""; position: absolute; left: 12px; top: -2px; width: 14px; height: 6px; border-top: 2px solid rgba(30,20,12,.7); border-radius: 50% 50% 0 0; }
.ps-bird.b2 { top: 20%; animation-duration: 34s; animation-delay: -15s; transform: scale(.7); }
@keyframes psBird { from { left: -5%; } 50% { margin-top: -18px; } to { left: 105%; } }
.ps-mine .ps-sky, .ps-fire .ps-bird { display: none; }

/* particles */
.ps-parts { position: absolute; inset: 0; }
.ps-p { position: absolute; bottom: -10px; width: var(--sz); height: var(--sz); border-radius: 50%;
  background: rgba(255,232,160,.85); box-shadow: 0 0 8px rgba(255,220,130,.8);
  animation: psRise var(--d) linear infinite; animation-delay: var(--dl); opacity: 0; }
@keyframes psRise { 0% { transform: translate(0,0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translate(40px,-85vh); opacity: 0; } }
.ps-wood .ps-p { top: -10px; bottom: auto; width: calc(var(--sz) * 2.2); height: var(--sz); border-radius: 60% 0; background: #7a9a3a; box-shadow: none; animation-name: psLeaf; }
.ps-wood .ps-p:nth-child(3n) { background: #c4822e; }
@keyframes psLeaf { 0% { transform: translate(0,0) rotate(0); opacity: 0; } 10% { opacity: .9; } 50% { transform: translate(-50px,50vh) rotate(200deg); } 100% { transform: translate(30px,105vh) rotate(420deg); opacity: .2; } }
.ps-mine .ps-p { background: rgba(210,190,160,.55); box-shadow: none; }
.ps-fire .ps-p { background: #ffb347; box-shadow: 0 0 8px #ff7a1a; }
.ps-front { background: linear-gradient(0deg, rgba(20,12,6,.45), rgba(20,12,6,0)); }
@keyframes psSway { from { transform: skewX(-4deg); } to { transform: skewX(5deg); } }
.ps-smoke { position: absolute; display: none; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(rgba(230,225,215,.55), rgba(230,225,215,0) 70%); left: 62%; top: 14%; animation: psSmoke 6s ease-out infinite; }
.ps-smoke.s2 { animation-delay: -3s; left: 58%; }
.ps-fire .ps-smoke, .ps-craft .ps-smoke, .ps-grain .ps-smoke { display: block; }
@keyframes psSmoke { 0% { transform: translate(0,0) scale(.4); opacity: 0; } 20% { opacity: .9; } 100% { transform: translate(30px,-120px) scale(2.4); opacity: 0; } }
.ps-glow { position: absolute; display: none; left: 35%; top: 45%; width: 30%; height: 30%; border-radius: 50%; background: radial-gradient(rgba(255,190,90,.6), rgba(255,190,90,0) 70%); animation: psFlick 1.6s ease-in-out infinite alternate; }
.ps-mine .ps-glow, .ps-fire .ps-glow { display: block; }
@keyframes psFlick { 0% { opacity: .5; } 40% { opacity: .9; } 70% { opacity: .65; } 100% { opacity: 1; } }

/* ---- storage gauge ---- */
.ps-gauges { position: absolute; display: flex; align-items: flex-end; gap: 14px; }
.ps-gauge { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ps-silo { position: relative; width: 92px; height: 176px; border-radius: 46px 46px 12px 12px; overflow: hidden;
  background: linear-gradient(90deg, rgba(18,14,12,.88), rgba(44,36,30,.88) 50%, rgba(18,14,12,.88));
  border: 3px solid #c9a24a; box-shadow: 0 8px 20px rgba(10,6,2,.6), inset 0 0 14px rgba(0,0,0,.6); }
.ps-gauge.small .ps-silo { width: 58px; height: 110px; border-radius: 29px 29px 10px 10px; }
.ps-liquid { position: absolute; left: 0; right: 0; bottom: 0; height: var(--ps-fill);
  background: linear-gradient(180deg, color-mix(in srgb, var(--ps-tint) 75%, #fff), var(--ps-tint) 35%, color-mix(in srgb, var(--ps-tint) 70%, #000));
  transition: height .9s ease; }
.ps-wave { position: absolute; left: -50%; top: -6px; width: 200%; height: 12px; border-radius: 45%;
  background: color-mix(in srgb, var(--ps-tint) 60%, #fff); opacity: .8; animation: psWave 3s linear infinite; }
@keyframes psWave { to { transform: translateX(25%); } }
.ps-pct { position: absolute; inset: 0; display: grid; place-items: center; font: 800 1.35rem system-ui, sans-serif; color: #fff8e6; text-shadow: 0 2px 3px #1a1208, 0 0 6px #1a1208; }
.ps-gauge.small .ps-pct { font-size: .95rem; }
.ps-amt { padding: 4px 12px; border-radius: 10px; background: linear-gradient(180deg, #8b5a2b, #5e3a1f); border: 2px solid #c9a24a; color: #f7ecd4; font: 600 .9rem system-ui, sans-serif; text-align: center; line-height: 1.15; white-space: nowrap; }
.ps-amt b { font-size: 1.25rem; color: #fff; }
.ps-amt span { display: block; font: 700 .78rem var(--serif, Georgia, serif); letter-spacing: .04em; opacity: .9; }
.ps-gauge.small .ps-amt { font-size: .78rem; padding: 3px 8px; } .ps-gauge.small .ps-amt b { font-size: 1rem; }
.ps-gauge.near .ps-silo { border-color: #ffd56a; }
.ps-gauge.full .ps-liquid { filter: brightness(1.25) saturate(1.2); }
.ps-gauge.full .ps-silo { border-color: #ffe08a; animation: psFull 1.1s ease-in-out infinite; }
@keyframes psFull { 50% { box-shadow: 0 0 0 4px rgba(255,213,106,.9), 0 0 34px 12px rgba(255,213,106,.75), inset 0 0 14px rgba(0,0,0,.4); } }
.ps-tag { padding: 3px 12px; border-radius: 999px; background: #ffd56a; color: #3e2616; font: 800 .9rem system-ui, sans-serif; box-shadow: 0 3px 8px rgba(0,0,0,.4); animation: psBob 1.1s ease-in-out infinite; }
@keyframes psBob { 50% { transform: translateY(-4px); } }
.ps-stage.is-full .ps-hero::after { content: ""; position: absolute; inset: 10% 5% 0; border-radius: 50%; background: radial-gradient(rgba(255,213,106,.45), rgba(255,213,106,0) 65%); animation: psFlick 1.2s ease-in-out infinite alternate; z-index: -1; }

/* ---- desktop / laptop: scene left, controls card on the right ---- */
@media (min-width: 821px) {
  .overlay-card.prod-scene > #overlayBody { top: 16px; right: 16px; bottom: 16px; width: 420px; }
  .ps-gauges { left: calc((100% - 452px) * .78); bottom: 7%; transform: translateX(-50%); }
  .ps-hero { left: calc((100% - 452px) * .42); width: min(62vh, 40vw, 640px); }
}
/* ---- phone: scene on top, controls sheet below (scrolls over the scene) ---- */
@media (max-width: 820px) {
  .overlay-card.prod-scene > #overlayBody { left: 0; right: 0; bottom: 0; top: 0; padding: calc(44dvh) 8px 8px; }
  .prod-scene .wk2 { margin: 0; }
  .ps-stage { bottom: auto; height: 50dvh; }
  .ps-hero { left: 38%; top: 54%; width: min(64vw, 34dvh); }
  .ps-gauges { right: 12px; bottom: calc(6dvh + 14px); gap: 8px; }
  .ps-silo { width: 64px; height: 118px; border-radius: 32px 32px 10px 10px; }
  .ps-gauge.small .ps-silo { width: 44px; height: 80px; }
  .ps-pct { font-size: 1.05rem; }
  .ps-amt { font-size: .76rem; padding: 3px 8px; } .ps-amt b { font-size: 1rem; }
  .ps-tag { font-size: .76rem; padding: 2px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-stage *, .ps-stage *::after { animation: none !important; }
}

/* ---- town map: tiny fill bar under each open production building ---- */
.pin .pin-fill { position: absolute; left: 50%; bottom: -4px; z-index: 9; width: 44px; height: 7px; display: block; transform: translateX(-50%);
  border-radius: 999px; background: rgba(26,18,8,.72); border: 1px solid rgba(201,162,74,.85); overflow: hidden; pointer-events: none; }
.pin .pin-fill i { display: block; height: 100%; background: linear-gradient(90deg, #4f9a5e, #8fd29a); transition: width .9s linear; }
.pin .pin-fill.near i { background: linear-gradient(90deg, #d8a73a, #ffd56a); }
.pin .pin-fill.full { border-color: #ffe08a; animation: pinFillPulse 1.1s ease-in-out infinite; }
.pin .pin-fill.full i { background: linear-gradient(90deg, #f0b93a, #ffe08a); }
@keyframes pinFillPulse { 50% { box-shadow: 0 0 0 2px rgba(255,213,106,.8), 0 0 12px 4px rgba(255,213,106,.7); } }

/* ---- prodscene2: worker figure with his own bubble ---- */
.prod-scene .wk2 .wk-bubble { display: none; }
.ps-worker { position: absolute; z-index: 3; left: calc((100% - 452px) * .14); bottom: 10%; width: 92px; color: rgba(34,24,16,.92); }
.ps-sil, .ps-fig { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 1.5px rgba(255,236,190,.55)) drop-shadow(0 6px 8px rgba(0,0,0,.45));
  transform-origin: 50% 100%; animation: psWork 2.4s ease-in-out infinite; }
.ps-worker.asking .ps-sil, .ps-worker.asking .ps-fig { animation: psWave2 1.6s ease-in-out infinite; }
@keyframes psWork { 50% { transform: rotate(-3deg) translateY(1px); } }
@keyframes psWave2 { 50% { transform: translateY(-3px); } }
.ps-say { position: absolute; left: 50%; bottom: calc(100% + 10px); width: max-content; max-width: 260px; transform: translateX(-30%);
  padding: 7px 12px 8px; border-radius: 14px; background: #fbf3df; border: 2px solid #c9a24a; color: #3e2616;
  box-shadow: 0 6px 16px rgba(10,6,2,.45); animation: psBob 4s ease-in-out infinite; }
.ps-say::after { content: ""; position: absolute; left: 30%; bottom: -9px; width: 14px; height: 14px; background: #fbf3df;
  border-right: 2px solid #c9a24a; border-bottom: 2px solid #c9a24a; transform: rotate(45deg); }
.ps-say span { display: block; font: 800 .66rem system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #8b5a2b; }
.ps-say p { margin: 1px 0 0; font: 600 .92rem/1.25 var(--serif, Georgia, serif); }
.ps-worker.asking .ps-say { border-color: #e0a63a; background: #fff5d6; }
@media (max-width: 820px) {
  .ps-worker { left: 10px; bottom: calc(6dvh + 6px); width: 60px; }
  .ps-say { max-width: 200px; transform: translateX(-12%); padding: 5px 9px 6px; }
  .ps-say::after { left: 16%; }
  .ps-say p { font-size: .8rem; }
}

/* ---- prodscene2: main storage meter (Storehouse / Silo) ---- */
.ms { margin: 8px 0 2px; padding: 8px 10px 9px; border-radius: 12px; background: rgba(62,38,22,.08); border: 1.5px solid rgba(139,90,43,.35); }
.ms-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font: 700 .86rem system-ui, sans-serif; color: #5a4030; }
.ms-name { font-family: var(--serif, Georgia, serif); font-size: .98rem; color: #3e2616; }
.ms-name b { font-family: system-ui, sans-serif; font-size: 1.05rem; margin-left: 4px; }
.ms-bar { position: relative; height: 14px; margin-top: 5px; border-radius: 999px; background: rgba(62,38,22,.2); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }
.ms-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4f9a5e, #8fd29a); transition: width .9s ease; }
.ms-bar em { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(79,154,94,.45) 0 5px, rgba(79,154,94,.15) 5px 10px); }
.ms.near .ms-bar i { background: linear-gradient(90deg, #d8a73a, #ffd56a); }
.ms.near .ms-name b { color: #a8741a; }
.ms.full { border-color: #c0392b; background: rgba(192,57,43,.08); animation: msPulse 1.1s ease-in-out infinite; }
.ms.full .ms-bar i { background: linear-gradient(90deg, #c0392b, #e8705f); }
.ms.full .ms-name b { color: #b03024; }
@keyframes msPulse { 50% { box-shadow: 0 0 0 3px rgba(192,57,43,.35), 0 0 14px 2px rgba(192,57,43,.35); } }
.ms-warn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; font: 700 .84rem system-ui, sans-serif; color: #9a3a2e; }
.ms-go { min-height: 32px; padding: 3px 12px; border-radius: 999px; border: 2px solid #c9a24a; background: linear-gradient(180deg, #8b5a2b, #5e3a1f); color: #f7ecd4; font: 700 .82rem system-ui, sans-serif; cursor: pointer; }

/* workers_v1 cutouts: size by height (figures vary in width) */
.ps-worker.has-fig { width: auto; }
.ps-fig { width: auto; height: 160px; max-width: none; }
@media (max-width: 820px) { .ps-fig { height: 100px; } }

/* rpshow1: Ruler Power on upgrade cards + completion pop */
.uc-rp { margin-top: 6px; font: 700 .86rem system-ui, sans-serif; color: #6b4a2a; }
.uc-rp b { color: #7a4fb0; }
.uc-rp-btn { font-size: .78em; font-weight: 700; opacity: .9; }
.rp-pop { position: fixed; left: 50%; top: 18%; z-index: 100001; transform: translateX(-50%); padding: 10px 22px; border-radius: 14px;
  background: linear-gradient(180deg, #5b3a8c, #3a2260); border: 2px solid #e6c46a; color: #fff3d6; font: 700 1.1rem var(--serif, Georgia, serif);
  box-shadow: 0 8px 26px rgba(0,0,0,.5), 0 0 22px rgba(230,196,106,.55); pointer-events: none; animation: rpPop 2.6s ease forwards; }
.rp-pop b { font-size: 1.5rem; color: #ffe08a; margin-right: 4px; }
@keyframes rpPop { 0% { opacity: 0; transform: translate(-50%, 14px) scale(.85); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 22% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -26px); } }
.ruler-bar.rp-glow { box-shadow: 0 0 0 2px #ffe08a, 0 0 16px 4px rgba(255,213,106,.8); transition: box-shadow .3s; }
.ruler-bar .ruler-fill { transition: width 1.2s ease; }

/* workers_v1 sit in the painting: soft ground shadow, scene-matched tone, rim light toned down (no bright outline glow) */
.ps-worker.has-fig::before { content: ""; position: absolute; left: 50%; bottom: -6px; width: 92%; height: 16px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(ellipse at center, rgba(20,12,6,.55), rgba(20,12,6,0) 70%); z-index: -1; }
.ps-worker.has-fig .ps-fig { filter: brightness(.9) saturate(.92) sepia(.12) contrast(1.02) drop-shadow(0 3px 3px rgba(10,6,2,.35)); }
.ps-mine .ps-worker.has-fig .ps-fig { filter: brightness(.82) saturate(.85) sepia(.18) contrast(1.04) drop-shadow(0 3px 3px rgba(10,6,2,.4)); }
.ps-fire .ps-worker.has-fig .ps-fig { filter: brightness(.88) saturate(.95) sepia(.22) contrast(1.03) drop-shadow(0 3px 3px rgba(10,6,2,.4)); }
.ps-grain .ps-worker.has-fig .ps-fig { filter: brightness(.93) saturate(.95) sepia(.1) drop-shadow(0 3px 3px rgba(10,6,2,.3)); }

/* fill1: Collect opens at the bar (10% of the 4h day bin); a tick on the gauge marks it */
.ps-thr { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed rgba(255,232,170,.85); z-index: 1; }
.ps-thr::after { content: "Ready"; position: absolute; right: 4px; top: -15px; font: 700 .58rem system-ui, sans-serif; color: #ffe8aa; text-shadow: 0 1px 2px #000; letter-spacing: .04em; }
.ps-gauge.small .ps-thr::after { display: none; }
.wk2 .cl .wk-collect.filling, .wk2 .cl .wk-collect.filling:disabled { opacity: 1; filter: none; background: rgba(62,38,22,.1); color: #6b4a2a; border: 2px dashed rgba(139,90,43,.45);
  box-shadow: none; font-size: 1rem; font-weight: 700; cursor: default; }

/* portrait1: framed head-and-shoulders worker + a still speech bubble, at the top of the controls card (no motion) */
.wp { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 2px; }
.wp-frame { flex: none; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 38%, #f3e2bd, #c9a46a 70%, #8b5a2b); border: 3px solid #c9a24a;
  box-shadow: 0 0 0 2px #5e3a1f, 0 3px 8px rgba(30,16,6,.35); color: #5e3a1f; }
.wp-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.wp-tool { width: 34px; height: 34px; opacity: .85; }
.wp-say { position: relative; flex: 1; min-width: 0; padding: 6px 10px 7px; border-radius: 12px; background: #fbf3df; border: 1.5px solid #c9a24a; color: #3e2616; }
.wp-say::before { content: ""; position: absolute; left: -7px; top: 20px; width: 11px; height: 11px; background: #fbf3df;
  border-left: 1.5px solid #c9a24a; border-bottom: 1.5px solid #c9a24a; transform: rotate(45deg); }
.wp-who { display: block; font: 800 .64rem system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #8b5a2b; }
.wp-say p { margin: 1px 0 0; font: 600 .9rem/1.25 var(--serif, Georgia, serif); }
.wp.asking .wp-say { border-color: #e0a63a; background: #fff5d6; }
.wp.asking .wp-say::before { background: #fff5d6; border-color: #e0a63a; }
@media (max-width: 820px) { .wp-frame { width: 48px; height: 48px; } .wp-tool { width: 28px; height: 28px; } .wp-say p { font-size: .84rem; } }
.ps-worker { display: none !important; }

/* prodfix1: scenes with no building cutout show the painting itself up close and in focus */
.ps-stage.ps-nocut .ps-bg { background-size: 330% auto; filter: blur(.6px) saturate(1.1) brightness(.95); }
.ps-stage.ps-nocut .ps-smoke, .ps-stage.ps-nocut .ps-glow { display: none; }
/* prodfix1: dwarf stall holdings + unaffordable trades */
.dw-have { display: block; width: 100%; margin-top: 3px; font-size: 12px; opacity: .8; }
.dw-have.short { color: #a8432f; opacity: 1; }
.dw-row.dw-off .dw-deal { opacity: .55; filter: grayscale(.6); }
/* batch9: Silo / Storehouse painted scenes (art fills the stage, crisp; keeper's line as a caption) */
.ps-stage.ps-store .ps-bg { inset: 0; background-size: cover; background-position: center; filter: none; transform: none; animation: none; }
.ps-stage.ps-store .ps-light { background: linear-gradient(180deg, rgba(20,12,6,.2), rgba(20,12,6,0) 25%, rgba(20,12,6,0) 70%, rgba(20,12,6,.5)); }
.ps-cap { position: absolute; left: 16px; bottom: 16px; max-width: 520px; padding: 7px 14px 8px; border-radius: 12px;
  background: rgba(24,15,8,.78); border: 1.5px solid rgba(201,162,74,.8); color: #f7ecd4; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.ps-cap span { display: block; font: 800 .66rem system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #e9c46a; }
.ps-cap p { margin: 1px 0 0; font: 600 .95rem/1.3 var(--serif, Georgia, serif); }
@media (min-width: 821px) { .ps-cap { right: auto; max-width: min(520px, calc(100% - 452px - 220px)); } }
@media (max-width: 820px) { .ps-cap { left: 8px; bottom: calc(6dvh + 8px); max-width: calc(100% - 110px); padding: 5px 10px 6px; } .ps-cap p { font-size: .82rem; } }

/* st2: painted lumber camp (forest) */
.ps-stage.ps-painted .ps-smoke, .ps-stage.ps-painted .ps-glow, .ps-stage.ps-painted .ps-sky { display: none; }

/* phonefit1 (2026-10-18): on phones the controls sheet sits flush at the bottom and never starts below the fold;
   the scene fills whatever space is left above it. */
@media (max-width: 820px) {
  .overlay-card.prod-scene > #overlayBody { display: flex; flex-direction: column; padding: calc(max(12px, env(safe-area-inset-top)) + 54px) 8px 8px; }
  .overlay-card.prod-scene > #overlayBody > * { flex: none; }
  .overlay-card.prod-scene > #overlayBody > :first-child { margin-top: auto; }
}
@media (max-width: 820px) and (max-height: 760px) {
  .prod-scene .wk2 { padding-bottom: 4px; }
  .prod-scene .wk2 .ms { margin-top: 4px; }
  .prod-scene .wk2 .wp:not(.asking) .wp-say p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .prod-scene .wk2 .wp { margin-top: 6px; }
  .prod-scene .wk2 .wp-frame { width: 40px; height: 40px; }
  .prod-scene .wk2 .cl .wk-collect { min-height: 46px; font-size: 1.15rem; }
  .prod-scene .wk2 .wk-big { margin-top: 6px; }
  .prod-scene .wk2 .uc { margin-top: 6px; padding-top: 8px; padding-bottom: 8px; }
  .prod-scene .wk2 .uc-btn { min-height: 44px; margin-top: 6px; }
  .prod-scene .wk2 .tale-btn { min-height: 36px; }
  .prod-scene .wk2 .wk-rate { margin: 4px 2px; }
  .prod-scene .wk2 .wk-details { margin-top: 2px; }
  .prod-scene .wk2 .wk-details > summary { min-height: 26px; }
}

/* dig1 — Hire a digger panel on Dwarf Stall */
.dw-hire {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  background: rgba(40, 28, 14, 0.55);
  border: 1.5px solid #c9a45c;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 10px;
}
.dw-hire.live { border-color: #6bc46d; box-shadow: 0 0 0 1px rgba(107,196,109,0.25); }
.dw-hire-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dw-hire-txt b { color: #f3e2c0; font-size: 0.92rem; }
.dw-hire-txt span { color: #c4a882; font-size: 0.72rem; line-height: 1.3; }
.dw-hire-cd { grid-column: 1 / -1; font-size: 0.68rem; color: #a89070; }
.dw-hire.live .dw-hire-cd { color: #8fd98f; }
.dw-hire .btn { white-space: nowrap; padding: 8px 12px; font-size: 0.82rem; }
