/* Nearcarta world UI. Tokens come from d7/tokens/tokens.css (the warm Nearcarta palette). The world is the page. */
@font-face{font-family:Inter;src:url(assets/fonts/inter-latin-wght-normal.woff2) format('woff2');font-weight:100 900;font-display:swap}
@font-face{font-family:Fraunces;src:url(assets/fonts/Fraunces-sub.woff2) format('woff2');font-weight:100 900;font-display:swap}
@font-face{font-family:'JetBrains Mono';src:url(assets/fonts/JetBrainsMono-sub.woff2) format('woff2');font-weight:100 800;font-display:swap}
:root{--ink:#17130f;--parch:#f3ead8;--parch2:#cdbfa5;--parch3:#9c8f79;--brass:#d6b46a;--copper:#c98f4e;--mint:#00ec97;--coral:#ff6b6b;--amber:#ffc75c;--ice:#a8d8ff;
  --glass:rgba(31,26,21,.74);--line:rgba(243,234,216,.12);--sans:Inter,system-ui,sans-serif;--serif:Fraunces,Georgia,serif;--mono:'JetBrains Mono',ui-monospace,monospace}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;background:#2b211b;color:var(--parch);font:14px/1.4 var(--sans);-webkit-font-smoothing:antialiased}
#c{position:fixed;inset:0;width:100vw;height:100vh;display:block;outline:none;cursor:default}
#c.hov{cursor:pointer} #c.walk{cursor:crosshair}
.hud{position:fixed;z-index:20;transition:opacity .5s ease,transform .5s ease}
body.story .hud{opacity:0;pointer-events:none} body.story #brand{opacity:1}
body.nohud .hud,body.nohud #title{display:none!important}

/* brand */
#brand{top:18px;left:20px;display:flex;align-items:center;gap:10px;color:var(--parch);text-shadow:0 1px 8px rgba(23,19,15,.6)}
#brand .mark{width:26px;height:26px;display:block;border-radius:8px;color:var(--brass);filter:drop-shadow(0 1px 4px rgba(23,19,15,.5))}
.hero-chip{display:flex;align-items:center;gap:8px;margin-top:8px;color:inherit;text-decoration:none}
.hero-chip img{width:36px;height:36px;border-radius:50%;object-fit:cover;background:#120e0b;box-shadow:0 0 0 2px var(--dye,#d6b46a)}
.hero-chip span{font-weight:600;font-size:13px;max-width:18ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#brand b{display:block;font:600 19px/1 var(--serif);letter-spacing:.01em;font-variation-settings:'SOFT' 60,'WONK' 0,'opsz' 48}
#brand small{display:block;font-size:10.5px;color:var(--parch2);opacity:.85;margin-top:3px;letter-spacing:.01em}

/* controls */
#ctl{top:16px;right:18px;display:flex;gap:8px;align-items:center}
.pill,.ib{appearance:none;border:1px solid var(--line);background:var(--glass);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);color:var(--parch);height:34px;border-radius:17px;font:500 13px var(--sans);padding:0 14px;cursor:pointer;display:inline-flex;align-items:center;gap:7px;transition:background .2s,border-color .2s}
.ib{width:34px;padding:0;justify-content:center}
.pill:hover,.ib:hover{background:rgba(52,44,36,.85);border-color:rgba(243,234,216,.24)}
.pill:focus-visible,.ib:focus-visible{outline:2px solid #f0c987;outline-offset:2px}
.pill.on{background:#e8d5ae;color:#1f1a15;border-color:transparent}
.pill.ice{color:#dceffd} .pill.ice .fi{display:inline-flex;color:var(--ice)}
.pill.ice[data-holding]{background:linear-gradient(90deg,rgba(168,216,255,.35) var(--p,0%),var(--glass) var(--p,0%))}
body.frozen .pill.ice{background:rgba(168,216,255,.2);border-color:rgba(168,216,255,.5)}

/* chronicle strip: one line per decision, recorded mainnet payments */
#chron{left:18px;bottom:18px;width:min(380px,calc(100vw - 36px));background:var(--glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:12px;padding:10px 12px 8px}
#chron .ch{font:600 11px var(--sans);letter-spacing:.08em;text-transform:uppercase;color:var(--parch2);display:flex;align-items:center;gap:7px;margin-bottom:6px}
#chron .ch em{font-style:normal;font-weight:500;letter-spacing:.02em;text-transform:none;color:var(--parch3);margin-left:auto;font-family:var(--mono);font-size:10.5px}
#chron .dot{width:7px;height:7px;border-radius:50%;background:var(--mint);box-shadow:0 0 8px var(--mint)}
#clist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:5px;max-height:92px;overflow:hidden}
#clist li{display:grid;grid-template-columns:16px 1fr auto;gap:8px;align-items:center;font-size:12.5px;animation:rowin .45s ease both}
#clist li i{width:9px;height:9px;border-radius:2px;transform:rotate(45deg);justify-self:center}
#clist li.ok i{background:var(--mint)} #clist li.no i{background:var(--coral)} #clist li.fz i{background:var(--ice)} #clist li.pd i{background:var(--amber)}
#clist li a{font:500 11px var(--mono);color:var(--parch2);text-decoration:none;border-bottom:1px dotted rgba(205,191,165,.5)} #clist li a:hover{color:var(--parch)}
#clist li .s{font:500 10px var(--mono);color:var(--parch3);text-transform:uppercase;letter-spacing:.06em}
@keyframes rowin{from{opacity:0;transform:translateY(6px)}}
#hint{left:50%;bottom:20px;transform:translateX(-50%);font-size:14px;font-weight:600;color:#fff8ea;background:#1a140fe6;padding:8px 16px;border-radius:16px;border:1px solid #f0c987;opacity:0;pointer-events:none}
body.explore #hint{opacity:1} body.explore.moved #hint{opacity:0}

/* speech bubbles: anchored, non-overlapping, ≤10 words */
#bubbles{position:fixed;inset:0;pointer-events:none;z-index:15}
.bub{position:absolute;left:0;top:0;max-width:240px;padding:8px 12px 9px;border-radius:14px;background:#f6eedc;color:#2a1d14;font:500 14.5px/1.3 var(--sans);box-shadow:0 6px 18px rgba(23,19,15,.28),0 1px 0 rgba(255,255,255,.6) inset;white-space:normal;opacity:0;transition:opacity .25s ease}
/* The speaker label inside a town bubble. It was #9aa6c8 (a blue-grey) on the cream bubble
   #dfd8c7, which axe measured at 1.7:1 at 12px — far under the 4.5:1 floor and effectively
   unreadable in daylight. It is also the only blue in the city's palette. #6b5636 on #dfd8c7 is
   6.8:1 and reads as the same warm ink the rest of the project uses. */
.bub .who{display:block;font:600 13px/1 var(--sans);letter-spacing:.08em;text-transform:uppercase;color:#6b5636;margin-bottom:4px}
.bub::after{content:"";position:absolute;width:12px;height:12px;background:inherit;left:var(--tx,20px);top:var(--ty,100%);transform:translate(-50%,-50%) rotate(45deg);border-radius:2px}
.bub.think{background:rgba(246,238,220,.9);font-style:italic;font-weight:450;border-radius:18px}
.bub.think::after{width:8px;height:8px;border-radius:50%;box-shadow:calc(var(--sx,0)*9px) calc(var(--sy,1)*9px) 0 -1px rgba(246,238,220,.85)}
.bub.warn{background:#2a1d14;color:#f3ead8;box-shadow:0 0 0 1px rgba(255,107,107,.55),0 8px 22px rgba(23,19,15,.4)} .bub.warn .who{color:#ff9a8a}
.bub.say.ok{box-shadow:0 0 0 2px rgba(0,236,151,.55),0 6px 18px rgba(23,19,15,.28)}
.bub.say.no{box-shadow:0 0 0 2px rgba(255,107,107,.7),0 6px 18px rgba(23,19,15,.28)}
.bub.say.fz{box-shadow:0 0 0 2px rgba(168,216,255,.8),0 6px 18px rgba(23,19,15,.28)}
.bub .car{display:inline-block;width:.5ch;opacity:.5}

/* cinema: letterbox + title */
#lb i{position:fixed;left:0;right:0;height:0;background:#120e0b;z-index:12;transition:height .9s cubic-bezier(.6,0,.2,1)}
#lb i:first-child{top:0} #lb i:last-child{bottom:0}
body.letterbox #lb i{height:7.5vh}
#title{position:fixed;left:50%;bottom:12vh;transform:translateX(-50%);text-align:center;z-index:13;opacity:0;pointer-events:none;text-shadow:0 2px 18px rgba(23,19,15,.7)}
#title b{display:block;font:500 64px/1 var(--serif);letter-spacing:.005em;font-variation-settings:'SOFT' 80,'opsz' 144}
#title span{display:block;margin-top:10px;font-size:15px;color:var(--parch2);letter-spacing:.04em}

/* iris into a shop door */
#iris{position:fixed;inset:0;z-index:30;pointer-events:none;background:#17130f;opacity:0;--ir:150vmax;-webkit-mask-image:radial-gradient(circle at var(--ix,50%) var(--iy,50%),transparent var(--ir),#000 calc(var(--ir) + 1.5px));mask-image:radial-gradient(circle at var(--ix,50%) var(--iy,50%),transparent var(--ir),#000 calc(var(--ir) + 1.5px))}
#iris.on{opacity:1}

/* loading: a hairline only; the first frame is the town */
#loading{position:fixed;inset:0;z-index:40;background:#17130f;transition:opacity .6s,visibility 0s .6s;pointer-events:none} #loading>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:brightness(.62) saturate(.9);animation:lpz 30s linear both;pointer-events:none} #loading .lc{pointer-events:auto}
#loading .lc{position:absolute;left:50%;bottom:14vh;transform:translateX(-50%);display:grid;justify-items:center;gap:10px;text-align:center;color:#f3ead8;text-shadow:0 1px 10px rgba(23,19,15,.8);background:#1a140fe6;border:1px solid #d6b46a;border-radius:14px;padding:16px 22px}
#loading .lc b{font-size:34px;letter-spacing:.01em} #loading .lc span{font-size:16px;color:#f3ead8} #loading .lc small{font-size:13px;color:#f3ead8}
#loading .lt{display:block;width:min(260px,60vw);height:3px;border-radius:3px;background:rgba(243,234,216,.18);overflow:hidden} #lbar{display:block;height:100%;width:4%;background:#d6b46a;transition:width .3s}
#loading.done{opacity:0;visibility:hidden;pointer-events:none} @keyframes lpz{to{transform:scale(1.04)}}
body:not(.ready) #c{opacity:0} body:not(.ready) .hud,body:not(.ready) #pins{visibility:hidden} body.fb .hud#brand{visibility:visible}
/* The entry row is markup, not the scene: it is usable from the first paint. Two buttons and a badge do
   not need the GPU, and a visitor should not wait on 3.5 MB of town to press Play free. The rule is on
   <html> because the flag is set at parse time, before <body> finishes. #acct is the row it moves into. */
html.chrome-ready body:not(.ready) .net-chrome,
html.chrome-ready body:not(.ready) #acct{visibility:visible;opacity:1;pointer-events:auto}

/* 2D / low-power fallback */
#fb2d{position:fixed;inset:0;z-index:1} #fb2d[hidden]{display:none} #fb2d img{width:100%;height:100%;object-fit:cover;display:block}
.fbpin{position:absolute;transform:translate(-50%,-100%);background:var(--glass);border:1px solid var(--line);border-radius:10px;padding:5px 9px;font-size:12px;white-space:nowrap}
.fbpin{color:inherit;text-decoration:none;cursor:pointer;transition:transform .12s,border-color .12s} .fbpin:hover,.fbpin:focus-visible{border-color:var(--brass,#c9a066);transform:translate(-50%,-100%) scale(1.06);outline:none}
.fbpin::after{content:'Enter \2192';display:block;font-size:10px;color:var(--brass,#c9a066);margin-top:2px}
.fbpin b{font-weight:600} .fbpin span{display:block;font-size:11px;color:var(--parch2)}
body.fb #c{display:none}

@media (max-width:900px){ #brand small{display:none} #chron{width:calc(100vw - 36px)} #title b{font-size:44px} }
@media (prefers-reduced-motion:reduce){ .bub,#lb i,#clist li{transition:none;animation:none} }
/* door prompt + skip-to-shop */
#prompt{left:0;top:0;appearance:none;display:inline-flex;align-items:center;gap:8px;padding:6px 12px 6px 6px;border-radius:16px;border:1px solid rgba(214,180,106,.45);background:rgba(31,26,21,.86);color:var(--parch);font:600 13px var(--sans);cursor:pointer;box-shadow:0 6px 16px rgba(23,19,15,.35);transition:opacity .2s;z-index:6}
#prompt[hidden]{display:none}
#prompt kbd{font:600 10.5px var(--mono);background:var(--brass);color:#1f1a15;border-radius:9px;padding:3px 7px}
#prompt:focus-visible{outline:2px solid #f0c987;outline-offset:2px}
#shopMenu{top:calc(var(--hudTop,92px) + 8px);right:18px;width:260px;background:rgba(31,26,21,.92);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:12px;padding:6px;display:grid;gap:2px;z-index:35;max-height:calc(100vh - 140px);overflow:auto}
#shopMenu[hidden]{display:none}
#shopMenu button{appearance:none;text-align:left;border:0;background:transparent;color:var(--parch);padding:7px 10px;border-radius:8px;cursor:pointer}
#shopMenu button:hover,#shopMenu button:focus-visible{background:rgba(214,180,106,.14);outline:none}
#shopMenu b{display:block;font:600 14px var(--sans)} #shopMenu small{display:block;font-size:12px;color:var(--parch3)}
body.story #shopsBtn{opacity:.85}

/* ---------- Walk / Jump: one small segmented switch ---------- */
#playSeg{display:inline-flex;height:34px;padding:3px;border-radius:17px;background:var(--glass);border:1px solid rgba(214,180,106,.35);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);position:relative}
#playSeg button{appearance:none;border:0;background:transparent;color:var(--parch2);font:600 12.5px var(--sans);height:26px;padding:0 11px 0 9px;border-radius:13px;display:inline-flex;align-items:center;gap:6px;cursor:pointer;transition:background .18s,color .18s}
#playSeg button[aria-checked=true]{background:linear-gradient(180deg,#ead29a,#c99c52);color:#1f1a15;box-shadow:0 1px 0 rgba(255,255,255,.45) inset,0 2px 6px rgba(23,19,15,.35)}
#playSeg button:focus-visible{outline:2px solid #f0c987;outline-offset:1px}
#hint{opacity:1;transition:opacity .4s} body.story #hint{opacity:0}
#hint kbd{font:600 10px var(--mono);background:rgba(214,180,106,.22);color:var(--parch);border-radius:5px;padding:1px 5px;margin:0 1px}

/* ---------- zoom: a brass rail with a lantern-knob ---------- */
#zoom{right:20px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center;gap:17px;padding:8px 6px 10px;border-radius:22px;background:var(--glass);border:1px solid rgba(214,180,106,.32);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 8px 22px rgba(23,19,15,.3)}
#zoom .zb{appearance:none;width:30px;height:30px;border-radius:50%;border:1px solid rgba(214,180,106,.55);background:radial-gradient(circle at 35% 30%,#f2dba6,#c99c52 60%,#8d6630);color:#2a1d14;font:700 17px/1 var(--sans);cursor:pointer;display:grid;place-items:center;box-shadow:0 1px 0 rgba(255,255,255,.5) inset,0 2px 5px rgba(23,19,15,.4)}
#zoom .zb:active{transform:translateY(1px)} #zoom .zb:focus-visible,#zoom .ztrack:focus-visible{outline:2px solid #f0c987;outline-offset:2px}
#zoom .ztrack{position:relative;width:12px;height:150px;border-radius:6px;background:linear-gradient(90deg,#120e0b,#2a221b 50%,#120e0b);box-shadow:0 0 0 1px rgba(214,180,106,.5),0 1px 0 rgba(255,255,255,.08);cursor:pointer;touch-action:none}
#zoom .tk{position:absolute;left:-7px;right:-7px;top:calc(var(--t)*100%);height:1.5px;background:rgba(214,180,106,.55);transform:translateY(-50%);border-radius:1px}
#zoom .zfill{position:absolute;left:3px;right:3px;top:0;height:var(--z,15%);border-radius:3px;background:linear-gradient(180deg,#ffd58a,#d68a3a);box-shadow:0 0 8px rgba(255,190,110,.6)}
#zoom .knob{position:absolute;left:50%;top:var(--z,15%);width:26px;height:26px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle at 35% 30%,#fbe7b8,#d6b46a 45%,#8d6630 100%);box-shadow:0 0 0 2px #2a1d14,0 0 0 3px rgba(214,180,106,.7),0 3px 8px rgba(23,19,15,.55)}
#zoom .kc{position:absolute;inset:7px;border-radius:50%;background:radial-gradient(circle,#fff1c8,#ffb45e 60%,#c46a20);box-shadow:0 0 10px 2px rgba(255,180,90,.75)}
#zoom .zl{font:600 9.5px var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--brass);writing-mode:vertical-rl;transform:rotate(180deg);min-height:58px;text-align:center}
body.story #zoom{opacity:0;pointer-events:none}

/* ---------- overview pins: brass pennants on a stem ---------- */
#pins{position:fixed;inset:0;pointer-events:none;z-index:9}
.pin{position:absolute;left:0;top:0;transform:translate(-50%,-100%);display:flex;flex-direction:column;align-items:center;opacity:0;transition:opacity .25s;pointer-events:none;cursor:pointer;appearance:none;border:0;background:none;padding:0;color:inherit;font:inherit}
.pin.on{pointer-events:none}
.pin.on .ban{pointer-events:auto}
.pin .ban{position:relative;background:#1a140fe6;border:1px solid #f0c987;border-radius:9px;padding:7px 12px 8px 9px;display:flex;align-items:center;gap:8px;white-space:nowrap;box-shadow:0 8px 18px rgba(0,0,0,.55);transition:transform .15s,background .15s;min-height:44px;min-width:44px}
.pin .ic{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 35% 30%,#f2dba6,#c99c52 60%,#8d6630);color:#2a1d14;font:700 11px var(--serif)}
.pin b{display:block;font:650 16px/1.15 var(--serif);color:#fff8ea;letter-spacing:.01em;text-shadow:0 1px 2px #000}
.pin small{display:block;font:600 12px/1.2 var(--sans);color:#f3ead8;margin-top:2px}
.pin .st{width:2px;height:22px;background:linear-gradient(180deg,rgba(214,180,106,.9),rgba(214,180,106,0))}
.pin .ft{width:8px;height:8px;border-radius:50%;background:var(--brass);box-shadow:0 0 0 3px rgba(214,180,106,.25);margin-top:-2px}
.pin:hover .ban,.pin.hv .ban,.pin:focus-visible .ban{transform:translateY(-3px);background:linear-gradient(180deg,#3a2f24,#2a221b);border-color:#f0c987}
.pin:focus-visible{outline:none}
.pin .go{font:600 10px var(--sans);color:#1f1a15;background:var(--brass);border-radius:8px;padding:2px 7px;margin-left:4px;opacity:0;transition:opacity .15s}
.pin:hover .go,.pin.hv .go,.pin:focus-visible .go{opacity:1}

/* ---------- hover name tag ---------- */
#tag{position:fixed;left:0;top:0;z-index:14;pointer-events:none;transform:translate(-50%,-100%);font:600 11px var(--sans);letter-spacing:.03em;color:var(--parch);background:rgba(23,19,15,.82);border:1px solid rgba(214,180,106,.5);border-radius:8px;padding:3px 8px;white-space:nowrap;opacity:0;transition:opacity .12s}
#tag.on{opacity:1} #tag small{color:var(--brass);font-weight:500;margin-left:5px}
#tag small.trk{display:block;margin:2px 0 0;margin-left:0;font:650 11px/1.2 var(--sans);letter-spacing:.04em;color:var(--brass)}
#tag .cd{display:block;width:max-content;max-width:250px;white-space:normal;margin-top:4px;font:400 11px/1.4 var(--sans);letter-spacing:0;color:var(--parch2,#d9ccb4)} #tag .tg{display:block;margin-top:3px;font:500 10px var(--mono,ui-monospace,monospace);color:var(--brass)}
#shopMenu small{line-height:1.35}

/* ---------- placeholder card inside the iris (the real interiors live in the shops layer) ---------- */
@media (max-width:900px){ #zoom{right:10px} #zoom .ztrack{height:110px} #playSeg button{padding:0 9px} }
/* capture-only demo cursor */
#demoCur{position:fixed;left:0;top:0;z-index:99;width:22px;height:22px;pointer-events:none;transform:translate(-100px,-100px);filter:drop-shadow(0 2px 3px rgba(0,0,0,.5))}
#demoCur i{position:absolute;left:-14px;top:-14px;width:28px;height:28px;border-radius:50%;border:2px solid #f0c987;opacity:0;transform:scale(.4)}
/* 2D / low-power fallback: hide controls that only drive the 3D camera */
body.fb #modeBtn,body.fb #playSeg,body.fb #zoom,body.fb #pins,body.fb #tag,body.fb #hint{display:none!important}
/* modeBtn only appears as "Watch" while exploring; story end HUD shows no Explore button */
body:not(.explore) #modeBtn{display:none!important}

/* ---------- shop rooms inside the town (js/shops.js). Tray + proof drawer ported from D8_shops/styles.css, scoped to #shopUI ---------- */
#shopUI{ --base:var(--c-scene,#17130f); --raised:var(--c-pane,#1f1a15); --line:var(--c-line-strong,#3a3128); --text:var(--c-text,#f3ead8); --muted:var(--c-text-3,#9c9182);
  --accent:var(--c-brass,#d6b46a); --on-accent:var(--c-on-accent,#17130f); --ok:var(--p-verified-mark,#00ec97); --no:var(--p-check-failed-mark,#ff6b6b); --ice:var(--p-freeze-mark,#a8d8ff);
  --s1:8px; --s2:16px; --s3:24px; --r:8px; --R:16px; --ease:cubic-bezier(.16,1,.3,1); --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; color:var(--text); font:400 14px/20px Inter,system-ui,sans-serif }
#shopUI[hidden]{display:none} #shopUI *{box-sizing:border-box} #shopUI h1,#shopUI h2,#shopUI h3,#shopUI p{margin:0} #shopUI button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
#shopUI .icon{width:40px;height:40px;display:grid;place-items:center;border-radius:var(--r);background:var(--raised);border:1px solid var(--line);color:var(--muted)}
.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#curfewBtn:hover + #curfewHint, #curfewBtn:focus + #curfewHint, #curfewBtn:focus-visible + #curfewHint{position:fixed;width:auto;height:auto;margin:0;clip:auto;overflow:visible;left:16px;bottom:72px;z-index:40;max-width:36ch;padding:8px 10px;border-radius:8px;background:#1a140fe6;color:#f3ead8;border:1px solid #d6b46a;font:14px/1.35 system-ui,sans-serif}
/* The Back button had NO base rule at all — only a :hover and a mobile override — which is
   exactly why it read as a dark rectangle pasted over the room. It is now the same pill as the
   rest of the chrome: 36px tall, the tray's border and radius, an even gap between arrow, label
   and the Esc key, and a real icon instead of a text arrow. */
#back{
  position:fixed; z-index:210; top:16px; right:16px;
  display:inline-flex; align-items:center; gap:8px;
  height:36px; padding:0 12px 0 10px; box-sizing:border-box;
  background:rgba(26,20,15,.92); color:#f3ead8;
  border:1px solid rgba(214,180,106,.45); border-radius:999px;
  font:500 13px/1 Inter,system-ui,sans-serif;
  box-shadow:0 6px 18px rgba(0,0,0,.32);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  cursor:pointer; transition:background .18s,border-color .18s,color .18s;
}
#back > span[aria-hidden]{font-size:15px;line-height:1;color:#d6b46a;display:inline-block;transform:translateY(-.5px)}
#back:hover,#back:focus-visible{background:rgba(40,31,22,.98);border-color:#d6b46a;color:#f5d08a;outline:none}
#back:focus-visible{outline:2px solid #f5d08a;outline-offset:2px}
#back kbd{
  font:600 10px/1 var(--mono); color:#b9ad95;
  border:1px solid rgba(243,234,216,.22); border-radius:6px;
  padding:3px 6px; margin-left:2px; background:rgba(243,234,216,.06);
}
#shopUI .note.legal{margin-top:24px}
body.in-shop #ctl,body.in-shop #chron,body.in-shop #zoom,body.in-shop #pins,body.in-shop #hint,body.in-shop #tag,body.in-shop #bubbles,body.in-shop #prompt,body.in-shop #title,body.in-shop #lb{display:none!important}
body.entering #pins,body.entering #tag,body.entering #hint,body.entering #prompt{opacity:0;pointer-events:none;transition:opacity .2s}
@media (max-width:720px){ #back{top:12px;right:12px;height:36px;padding:0 12px} #back kbd{display:none} body.in-shop #brand small{display:none} #shopUI #drawer{width:100vw} }
/* the door's light: a warm radial wash from the doorway, never a black frame */
#fade{position:fixed;inset:0;z-index:30;opacity:0;pointer-events:none;display:none;background:radial-gradient(circle at var(--fx,50%) var(--fy,50%),#fff0cf 0,#f4c27a 14%,#c98a4a 34%,#5a3a22 70%,#2a1f16 100%)}
#fade.on{display:block;pointer-events:auto} #fade .ring{position:absolute;left:50%;top:50%;width:28px;height:28px;margin:-14px;border-radius:50%;border:2px solid rgba(23,19,15,.25);border-top-color:#17130f;opacity:0;transition:opacity .3s;animation:spin .8s linear infinite}
#fade.wait .ring{opacity:.8} @keyframes spin{to{transform:rotate(360deg)}}
#shopUI .src { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 var(--s1); border-radius: 999px; font-size: var(--t-small, 13px); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
#shopUI .src::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
#shopUI .src.live::before { background: none; border: 1.5px solid var(--muted); width: 5px; height: 5px; }
#shopUI .src.split { color: #e6c98a; border-color: #d6b46a66; }
#shopUI .src.split::before { background: #7dcea0; }
#shopUI .src.quote { color: #b7e0ea; border-color: #7eb8c966; }
#shopUI .src.quote::before { background: #7eb8c9; }
/* town labels: icon + name only */
#shopUI .coin { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted); color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1; }
#shopUI .hero .coin { width: 32px; height: 32px; font-size: 16px; }
/* in-scene tags (anchored to objects) */
#shopUI #stags { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
#shopUI .stag { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: color-mix(in srgb, var(--base) 86%, transparent); border: 1px solid var(--line); font-size: 12px; white-space: nowrap; transition: opacity .2s var(--ease); }
#shopUI .stag.bare { padding: 4px; }
#shopUI .stag.no { border-color: var(--no); color: var(--no); }
#shopUI .stag.hide { opacity: 0; visibility: hidden; pointer-events: none; }
#shopUI .stag .tok .sym { display: none; }
/* the tray: bottom-left counter slip, one primary action */
/* The primary action must never be able to scroll out of sight. The tray is a flex column:
   the middle region scrolls, the action row and status stay pinned at the bottom. That is
   what fixes the clipped gold button on phones (it sat at y=941 in an 844px viewport) and
   the "menu feels stuck" complaint: the one thing to press is always visible. */
#shopUI #tray { position: fixed; left: var(--s3); bottom: var(--s3); width: 300px; max-height: calc(100dvh - 96px); overflow: hidden; padding: var(--s3); background: var(--raised); border: 1px solid var(--line); border-radius: var(--R); z-index: 4; animation: shup .24s var(--ease); display: flex; flex-direction: column; gap: 0; }
/* The scrollbar has to be visible: an invisible one reads as "the menu is cut off", which is
   exactly how the owner described it. Thin, gold, always shown. */
#shopUI #tray > .t-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #c98f4e #24180f;
  padding-right: 2px;
  /* A grid card inside can be taller than the region. Without this it grows to its content
     and pushes the pinned action row out of the tray: Arena's CTA measured y=836 in 800px. */
  contain: layout paint;
}
#shopUI #tray > .t-scroll > * { min-height: 0; max-width: 100%; }
/* When the panel has more content below the fold, say so. Measured on Mist Bank: 903px of
   content in a 594px region, and a reviewer reading the recording described it as "text cut
   off horizontally through the middle of the letters". It scrolls, but nothing announced that.
   `contain: layout paint` above clips a shadow fade, so this is a strip with its own gradient
   and an arrow, shown only while `data-more` is set by js/shops.js. */
#shopUI #tray > .t-scroll[data-more="1"]::after { content: ''; display: block; height: 26px; }
#shopUI #tray > .t-scroll[data-more="1"] { box-shadow: inset 0 -22px 18px -14px rgba(23,19,15,.95); }
/* The "more below" hint is a static strip owned by /panels/system.css. It is NOT absolutely
   positioned here: measured on Arena, an absolute pill landed on top of the form (86x21px of
   overlap) because the tray's layout did not reserve a row for it. Layout and look both belong
   in one place. */
#shopUI #tray > .t-scroll::-webkit-scrollbar { width: 10px; }
#shopUI #tray > .t-scroll::-webkit-scrollbar-track { background: #24180f; border-radius: 8px; }
#shopUI #tray > .t-scroll::-webkit-scrollbar-thumb { background: #c98f4e; border-radius: 8px; border: 2px solid #24180f; }
#shopUI #tray > .t-scroll::-webkit-scrollbar-thumb:hover { background: #f5d08a; }
#shopUI #tray > .t-actions, #shopUI #tray > .t-row, #shopUI #tray > .rcpt, #shopUI #tray > .t-links { flex: 0 0 auto; }
#shopUI .token-listbox { position: relative; width: 100%; }
#shopUI .token-listbox-btn { width: 100%; min-height: 44px; box-sizing: border-box; padding: 6px 28px 6px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--base); color: var(--text); font: 600 14px/1.2 Inter, system-ui, sans-serif; display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
#shopUI .token-listbox-menu { position: relative; z-index: 2; max-height: min(240px, 42vh); overflow: auto; overscroll-behavior: contain; margin: 4px 0 0; padding: 4px; list-style: none; border-radius: 12px; border: 1px solid var(--line); background: var(--base); box-shadow: 0 12px 28px rgba(0,0,0,.45); }
#shopUI .token-listbox-menu[hidden] { display: none !important; }
#shopUI .token-opt { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border-radius: 8px; cursor: pointer; color: var(--text); }
#shopUI .token-opt.on, #shopUI .token-opt[aria-selected=true], #shopUI .token-opt:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
@keyframes shup { from { transform: translateY(8px); opacity: 0; } }
#shopUI .t-head { display: flex; align-items: center; gap: var(--s1); margin-bottom: var(--s2); }
#shopUI #t-title { display: flex; align-items: center; gap: var(--s1); font-size: 20px; line-height: 28px; flex: 1; }
#shopUI .label { color: var(--muted); font-size: 12px; line-height: 16px; }
#shopUI .hero { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s1); font-size: 40px; line-height: 48px; margin: 4px 0 var(--s3); font-variant-numeric: tabular-nums; }
#shopUI .hero .arrow { color: var(--muted); font-size: 24px; }
#shopUI .hero .unit { font-size: 20px; color: var(--muted); font-weight: 400; }
#shopUI .hero.bump { animation: shbump .32s var(--ease); }
@keyframes shbump { 40% { transform: translateY(-3px); } }
#shopUI .tok { display: inline-flex; align-items: center; gap: 6px; }
#shopUI .tok .tic { position: relative; display: inline-grid; }
#shopUI .tok .ci { position: absolute; right: -3px; bottom: -3px; border-radius: 50%; box-shadow: 0 0 0 2px var(--raised); }
#shopUI .tok .ti { border-radius: 50%; object-fit: cover; display: block; }
#shopUI .hero .tok .ti { width: 32px; height: 32px; } #shopUI .hero .tok .ci { width: 14px; height: 14px; }
#shopUI .hero .tok .sym { font-size: 20px; color: var(--muted); font-weight: 400; }
#shopUI .t-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
#shopUI .act, #shopUI .link { white-space: nowrap; }
#shopUI .act { height: 40px; padding: 0 var(--s2); border-radius: var(--r); font-weight: 600; display: inline-flex; align-items: center; gap: var(--s1); }
#shopUI .act.primary { background: var(--accent); color: var(--on-accent); }
#shopUI .act.primary:hover { filter: brightness(1.06); }
#shopUI .act.primary:active { transform: translateY(1px); }
#shopUI .act.busy { opacity: .6; cursor: progress; }
#shopUI .act.res { background: transparent; border: 1px solid var(--line); cursor: default; padding-left: 12px; }
#shopUI .act.res.no { color: var(--no); border-color: color-mix(in srgb, var(--no) 45%, transparent); }
#shopUI .act.res.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
#shopUI .act.res .glyph { font-size: 14px; }
#shopUI .link { color: #f3ead8; min-height: 40px; font-size: 15px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #d6b46a; }
#shopUI .link:hover { color: var(--text); }
#shopUI .act[hidden] + .link { margin-left: 0; }
/* proof drawer */
#shopUI #drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100vw; background: var(--base); border-left: 1px solid var(--line); padding: var(--s3); transform: translateX(100%); transition: transform .24s var(--ease); z-index: 6; overflow-y: auto; }
#shopUI #drawer.open { transform: none; }
#shopUI .d-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s3); }
#shopUI .d-head h2 { font-size: 20px; line-height: 28px; }
#shopUI .pf { display: grid; gap: var(--s1); }
#shopUI .pf h3 { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: var(--s3); }
#shopUI .row { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s2); padding: 12px 0; border-top: 1px solid var(--line); }
#shopUI .row .k { color: var(--text); }
#shopUI .row .k .why { display: block; color: var(--muted); font-size: 12px; font-family: var(--mono); }
#shopUI .row .v { text-align: right; display: grid; gap: 4px; justify-items: end; }
#shopUI .row .st { font-size: 12px; display: inline-flex; gap: 6px; align-items: center; }
#shopUI .st.no { color: var(--no); } #shopUI .st.ok { color: var(--ok); } #shopUI .st.ice { color: var(--ice); } #shopUI .st.pend { color: var(--muted); }
#shopUI .tx { font-family: var(--mono); font-size: 12px; color: var(--muted); text-decoration: none; }
#shopUI .tx:hover { color: var(--text); }
#shopUI .note, #shopUI .note.to-l { color: #f3ead8; font-size: 14px; line-height: 20px; margin-top: var(--s2); }
#shopUI .tee-pass{border:2px solid #7dcea0;background:#1e2a22;padding:10px;border-radius:12px}
#shopUI .tee-live{font-size:18px;font-weight:700;color:#f3ead8}
#shopUI .holdbar, .pill.ice .holdbar{display:inline-block;width:72px;height:8px;border-radius:4px;background:rgba(243,234,216,.35);overflow:hidden;vertical-align:middle}
#shopUI .holdbar i, .pill.ice .holdbar i{display:block;height:100%;width:0;background:#f3ead8}
#curfewResult{position:fixed;top:58px;right:18px;z-index:21;background:#1a140fe6;color:#f3ead8;border:1px solid #d6b46a;border-radius:10px;padding:8px 12px;font-weight:700}
#shopUI a.row-btn{display:inline-flex;align-items:center;min-height:40px;padding:8px 14px;border-radius:10px;background:#3a2a1c;color:#f3ead8;border:1px solid #d6b46a;font-size:15px;font-weight:700;text-decoration:none}
#shopUI .kv { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }
#shopUI .blurnum { letter-spacing: .12em; color: var(--muted); filter: blur(1.5px); }
/* two-token heroes (Ferry quote) stay on one line */
#shopUI .hero:has(.arrow) { flex-wrap: nowrap; white-space: nowrap; font-size: 30px; line-height: 40px; gap: 6px; }
#shopUI .hero:has(.arrow) .tok .ti { width: 26px; height: 26px; font-size: 13px; }
#shopUI .hero:has(.arrow) .tok .sym { font-size: 16px; }
#shopUI .hero:has(.arrow) .arrow { font-size: 18px; }
/* 2D view: a shop module that failed to load (js/flat.js) */
#shopUI .src.error { color: var(--no); border-color: color-mix(in srgb, var(--no) 55%, transparent); }
#shopUI .src.error::before { background: var(--no); }
#shopUI .note.proof-error, #shopUI .note.proof-missing { color: var(--no); }
/* Mist Bank hero: the on-chain commitment stands in for the amount, which is never shown */
#shopUI .hero .commit { font-family: var(--mono); font-size: 28px; letter-spacing: .02em; color: var(--accent); }
#shopUI .hero .commit + .unit { font-size: 18px; }
.fbpin{font:inherit;text-align:left} #fbpins[hidden]{display:none}

#shopUI [hidden]{display:none!important}

/* ---- Judge B pass: one clear first step, legible HUD, phone layout ---- */
#brand{background:rgba(26,22,18,.55);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:8px 14px 8px 10px;border-radius:12px;border:1px solid rgba(243,234,216,.1);text-shadow:none}
#brand small{color:#e9dcc2;opacity:1}
.pill.go{background:#e0bd72;color:#1f1a15;border-color:transparent;font-weight:600;text-decoration:none}
.pill.go:hover{background:#ebc983}
#rulesBtn{top:18px;left:50%;transform:translateX(-50%);height:38px;border-radius:19px;padding:0 16px;font-size:14px;box-shadow:0 6px 20px rgba(23,19,15,.35)}
#rulesBtn .k{font-size:13px}
#rulesBtn .cue{position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);white-space:nowrap;font:600 11px var(--sans);letter-spacing:.06em;text-transform:uppercase;color:#1f1a15;background:#f3ead8;border-radius:8px;padding:3px 8px;opacity:1;pointer-events:none}
#rulesBtn .cue::before{content:'';position:absolute;bottom:100%;left:50%;margin-left:-5px;border:5px solid transparent;border-bottom-color:#f3ead8}
body.cta #rulesBtn .cue{opacity:1}
body.cta #rulesBtn{animation:ctaPulse 1.6s ease-in-out 4}
@keyframes ctaPulse{0%,100%{box-shadow:0 6px 20px rgba(23,19,15,.35),0 0 0 0 rgba(224,189,114,.55)}50%{box-shadow:0 6px 20px rgba(23,19,15,.35),0 0 0 10px rgba(224,189,114,0)}}
body.in-shop #rulesBtn,body.entering #rulesBtn{opacity:0;pointer-events:none}
body.in-shop #acct,body:has(#drawer.open) #acct{display:none!important}
#shopUI #drawer.open{z-index:24}
#shopUI .d-head{position:sticky;top:0;background:var(--base);z-index:2;padding-bottom:8px}
#chron[hidden]{display:none}
#shopUI .act.cta{display:flex;justify-content:center;width:100%;box-sizing:border-box;margin:0 0 10px;text-decoration:none}
@media (max-width:900px){ #brand small{display:block;font-size:10px} }
@media (max-width:1366px) and (min-width:721px){ #rulesBtn{top:auto;bottom:18px;left:auto;right:18px;transform:none} #rulesBtn .cue{top:auto;bottom:calc(100% + 8px)} #rulesBtn .cue::before{bottom:auto;top:100%;border-bottom-color:transparent;border-top-color:#f3ead8} }
@media (max-width:720px){
  #brand{top:8px;left:8px;padding:6px 10px 6px 8px} #brand b{font-size:16px} #brand .mark{width:22px;height:22px}
  #ctl{top:auto;bottom:calc(10px + env(safe-area-inset-bottom,0px));left:8px;right:8px;flex-wrap:wrap;justify-content:center;gap:6px}
  #ctl .pill,#ctl .ib{height:34px;font-size:12.5px} #ctl .pill{padding:0 11px}
  #rulesBtn{top:auto;bottom:calc(96px + env(safe-area-inset-bottom,0px));height:40px}
  #rulesBtn .cue{top:auto;bottom:calc(100% + 8px)} #rulesBtn .cue::before{bottom:auto;top:100%;border-bottom-color:transparent;border-top-color:#f3ead8}
  #chron{left:8px;right:8px;width:auto;bottom:calc(146px + env(safe-area-inset-bottom,0px));padding:8px 10px}
  #hint{bottom:auto;top:168px;max-width:calc(100vw - 80px);text-align:center;white-space:normal}
}
@media (max-width:900px) and (min-width:721px){ #rulesBtn{bottom:150px} }
#c{touch-action:none}
/* mobile: compact pins (name only), the hint steps aside while pins are up, one-line CTA */
@media (max-width:720px){
  .pin .ban{padding:4px 8px 5px 6px;gap:6px;border-radius:8px}
  .pin .ic{width:18px;height:18px;font-size:10px}
  .pin b{font-size:12.5px} .pin small{display:none} .pin .st{height:14px}
  body.ov #hint{opacity:0!important}
  #rulesBtn{white-space:nowrap}
  #hint{top:calc(var(--hudTop,160px) + 8px);left:12px;right:12px;transform:none;margin:0 auto;width:fit-content;white-space:normal;max-width:none;box-sizing:border-box;font-size:11.5px;text-align:center}
  /* the shop menu fills the band between the top HUD and the controls, and scrolls inside it */
  #shopMenu{top:calc(var(--hudTop,100px) + 8px);bottom:calc(92px + env(safe-area-inset-bottom,0px));left:8px;right:8px;width:auto;max-height:none;align-content:start;z-index:24;background:rgba(31,26,21,.97)}
  /* two fixed rows: getting around (shop menu, jump/walk, watch) above; sky, sound and curfew together below, so the icons never split */
  #ctl{row-gap:0} #ctl::after{content:'';order:4;flex-basis:100%;height:6px}
  #shopsBtn,#playSeg{order:1} #modeBtn{order:2} #skyBtn{order:5} #soundBtn{order:6} #curfewBtn{order:7}
}

/* ---- shop apps inside the town (D8 js/shopui.js): robot line, form, one full-width button, one-line receipt, rules sheet ---- */
#shopUI .say{display:flex;gap:10px;align-items:flex-start;margin:0 0 var(--s2);font-size:15px;line-height:22px}
#shopUI .say .lamp{flex:none;width:10px;height:10px;margin-top:6px;border-radius:50%;background:var(--accent);box-shadow:0 0 12px var(--accent)}
#shopUI .say.bump{animation:shbump .32s var(--ease)}
body[data-app=err] #shopUI .say .lamp{background:var(--no);box-shadow:0 0 12px var(--no)}
body.apps #shopUI .hero{margin:4px 0 var(--s2);font-size:32px;line-height:40px}
#shopUI .form{margin:0 0 var(--s2);display:grid;gap:var(--s1)}
#shopUI .seg,#shopUI .chips{display:flex;flex-wrap:wrap;gap:6px}
#shopUI .seg label,#shopUI .chips label{position:relative}
#shopUI .seg input,#shopUI .chips input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
#shopUI .seg span,#shopUI .chips span{display:inline-flex;align-items:center;height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--line);color:var(--muted);font-size:13px;white-space:nowrap}
#shopUI .seg input:checked+span,#shopUI .chips input:checked+span{border-color:var(--accent);color:var(--text);background:color-mix(in srgb,var(--accent) 14%,transparent)}
#shopUI .seg input:focus-visible+span,#shopUI .chips input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
#shopUI .amt{display:flex;align-items:center;gap:var(--s1);height:48px;width:100%;padding:0 12px;border:1px solid var(--line);border-radius:var(--r);background:var(--base)}
#shopUI .amt input{flex:1;min-width:0;background:none;border:0;color:var(--text);font:600 20px/28px Inter,system-ui,sans-serif;font-variant-numeric:tabular-nums;outline:none}
#shopUI .amt span{color:var(--muted);font-size:13px}
#shopUI .form .to{display:flex;align-items:center;gap:var(--s1);font-size:12px;color:var(--muted)}
#shopUI .form .to select{flex:1;height:32px;padding:0 8px;border-radius:var(--r);border:1px solid var(--line);background:var(--base);color:var(--text);font:500 13px Inter,system-ui,sans-serif}
#shopUI #t-form textarea{width:100%;resize:none;padding:10px 12px;border-radius:var(--r);border:1px solid var(--line);background:var(--base);color:var(--text);font:400 14px/20px Inter,system-ui,sans-serif}
#shopUI #t-form textarea:focus{outline:none;border-color:var(--accent)}
body.apps #shopUI .t-row{display:block}
body.apps #shopUI #t-act{height:48px;width:100%;justify-content:center;font-size:16px}
body.apps #shopUI #t-act[disabled]{opacity:.55;cursor:progress}
body.apps #shopUI #t-act.busy::before{content:'';width:14px;height:14px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;animation:spin .8s linear infinite}
#shopUI .rcpt{min-height:20px;margin-top:var(--s1);display:flex;flex-wrap:wrap;gap:4px var(--s1);align-items:center;font-size:12px;line-height:16px}
#shopUI .rule{font-weight:600} #shopUI .rule.ok{color:var(--ok)} #shopUI .rule.no{color:var(--no)}
#shopUI .rc{font-family:var(--mono);font-size:12px;color:var(--muted);text-decoration:none} #shopUI .rc:hover{color:var(--text)}
#shopUI details.rc{display:inline-block} #shopUI details.rc summary{cursor:pointer;list-style:none;color:var(--muted);font-family:Inter,system-ui,sans-serif;font-size:12px;text-decoration:underline dotted;text-underline-offset:3px}
#shopUI details.rc summary::-webkit-details-marker{display:none} #shopUI details.rc[open] summary{display:none}
#shopUI .t-links{display:flex;flex-wrap:wrap;gap:8px var(--s2)} #shopUI .t-links .link{height:auto;min-height:36px;font-size:15px;color:#f3ead8}
#shopUI .btns{position:sticky;bottom:0;display:flex;flex-wrap:wrap;gap:8px;padding-top:8px;background:var(--raised);z-index:1}
#shopUI .btns .go,#shopUI .btns .ghost{min-height:40px;padding:8px 12px}
#shopUI a.cta8{display:inline-flex;align-items:center;height:28px;font-size:12px;margin:0 0 var(--s1)}
#shopUI .commit{font-family:var(--mono);font-size:22px;color:var(--ice)}
#shopUI .goal{font-size:12px;color:var(--accent);font-weight:600;letter-spacing:.02em}
#shopUI .pts{font-size:14px;color:var(--muted);margin-left:var(--s1)}
#shopUI .feed{list-style:none;margin:0;padding:0;display:grid;gap:2px;max-height:176px;overflow:auto;font-size:12px}
#shopUI .feed li{display:grid;grid-template-columns:72px 1fr auto;gap:var(--s1);padding:6px 0;border-top:1px solid var(--line)}
#shopUI .feed li.no span:nth-child(2){color:var(--no)} #shopUI .feed li.ok span:nth-child(2){color:var(--ok)}
#shopUI .feed.checks li,#shopUI .feed.tee li{grid-template-columns:56px 1fr auto}
#shopUI .hidden-line{font:400 12px/16px ui-monospace,Menlo,monospace;color:#ffe3e3;background:#3b1717;border:1px dashed #ff8a8a;border-radius:6px;padding:4px 6px}
#shopUI .v-block{color:var(--no)} #shopUI .v-warn{color:var(--accent)} #shopUI .v-allow{color:var(--ok)}
#shopUI .tee-badge{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--ok);letter-spacing:.04em;text-transform:uppercase} #shopUI .tee-badge.no{color:var(--no)}
#shopUI .tee-btn{background:none;border:0;padding:4px 0;cursor:pointer;color:var(--accent);font:600 12px Inter,system-ui,sans-serif;text-decoration:underline;text-underline-offset:3px} #shopUI .tee-btn:disabled{color:var(--muted);cursor:progress}
#shopUI #rules{position:fixed;top:0;right:0;bottom:0;width:440px;max-width:100vw;background:var(--base);border-left:1px solid var(--line);padding:var(--s3);transform:translateX(100%);transition:transform .24s var(--ease);z-index:8;overflow:auto;display:flex;flex-direction:column;gap:var(--s2)}
#shopUI #rules.open{transform:none} #shopUI #rules .d-head{margin-bottom:0} #shopUI .r-lede{color:var(--muted)}
#shopUI #r-body{display:grid;gap:var(--s2)} #shopUI #r-body fieldset{border:0;display:grid;gap:var(--s1);padding:0;margin:0;min-width:0}
#shopUI #r-body legend,#shopUI #r-body label{font-size:12px;color:var(--muted)} #shopUI #r-body label{display:grid;gap:4px} #shopUI #r-body label.off{opacity:.55}
#shopUI .grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#shopUI #r-body input:not([type=checkbox]),#shopUI #r-body select{height:40px;padding:0 10px;border-radius:var(--r);border:1px solid var(--line);background:var(--raised);color:var(--text);font:500 14px/20px Inter,system-ui,sans-serif;width:100%}
#shopUI .sfx{position:relative;display:block} #shopUI .sfx i{position:absolute;right:10px;top:10px;font-style:normal;color:var(--muted);font-size:12px}
#shopUI #r-sign{height:48px;justify-content:center;font-size:16px;flex:none}
body.apps:has(#rules.open) #shopUI #tray{opacity:.35;pointer-events:none}
body.apps:has(#rules.open) #back{visibility:hidden}
@media (max-width:720px){ #shopUI #tray{left:8px;right:8px;bottom:8px;width:auto;padding:16px;max-height:calc(100dvh - 84px);overflow:hidden} body.apps #shopUI .hero{font-size:26px;line-height:32px} }
#shopUI .amt{box-sizing:border-box} #shopUI .form .to select{min-width:0;max-width:100%}
#shopUI .feed li{grid-template-columns:56px minmax(0,1fr) minmax(0,40%)} #shopUI .feed:not(.checks):not(.tee) li{grid-template-columns:72px minmax(0,1fr) minmax(0,40%)}
#shopUI .feed li>span{min-width:0;overflow:hidden;text-overflow:ellipsis} #shopUI .feed li>span:nth-child(3){white-space:nowrap;text-align:right}
@media (max-width:720px){ #shopUI #tray{overflow-x:hidden;box-sizing:border-box} }
@media (max-width:720px){ body.in-shop #brand .what{display:none} }
#shopUI .form{grid-template-columns:minmax(0,1fr)} #shopUI .form>*,#shopUI .form [data-testid=tee-panel]{min-width:0;max-width:100%}

/* 390: name-only pins (the room says what it is), so all 8 fit between the HUD and the rules CTA */
@media (max-width:600px){ body.fb .fbpin span,body.fb .fbpin::after{display:none} body.fb .fbpin{padding:7px 11px;font-size:13px} }
#shopUI .rc.tx{text-decoration:underline dotted;text-underline-offset:3px}
#drawer details.lab{margin-top:14px} #drawer details.lab summary{cursor:pointer;color:var(--muted);font-size:12px;text-decoration:underline dotted;text-underline-offset:3px}
@media (max-width:720px){ body.in-shop #acct,body.in-shop #brand{display:none!important} }
#shopUI a.link.more{display:inline-flex;align-items:center} #shopUI a.link.more[hidden]{display:none}

/* Payouts (C3) inside the town tray */
#shopUI .plist { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
#shopUI .plist li { display: grid; grid-template-columns: minmax(0, 1fr) 104px 28px; gap: 6px; align-items: center; }
#shopUI .plist select, #shopUI .p-amt { height: 36px; border: 1px solid var(--line); border-radius: var(--r); background: var(--base); color: var(--text); font: 500 13px Inter, system-ui, sans-serif; min-width: 0; }
#shopUI .plist select { padding: 0 8px; }
#shopUI .p-amt { display: flex; align-items: center; gap: 4px; padding: 0 8px; }
#shopUI .p-amt input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; color: var(--text); font: 600 14px Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; outline: none; }
#shopUI .p-amt span { color: var(--muted); font-size: 11px; }
#shopUI .p-x { height: 28px; width: 28px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
#shopUI .p-x:disabled { opacity: .35; cursor: default; }
#town-intro{position:fixed;left:50%;bottom:18vh;z-index:16;pointer-events:none;transform:translate(calc(-50% + var(--pan, 0px)), 0)}
#town-intro .bub{position:relative;opacity:1;background:#1a140fe6;color:#f3ead8;border:1px solid #d6b46a;border-radius:12px;padding:10px 14px;font:600 16px/1.35 ui-serif,Georgia,serif;max-width:36ch}
#town-intro .walkers{display:flex;justify-content:center;gap:10px;margin-bottom:8px}
#town-intro .walkers i{display:block;width:22px;height:44px;border-radius:11px 11px 4px 4px;background:#d6b46a;animation:introWalk 1s steps(2) infinite}
@keyframes introWalk{50%{transform:translateY(-4px)}}
body.intro-on #fbimg{animation:introCam 22s linear both}
@keyframes introCam{from{transform:scale(1.12) translate3d(3%,1%,0)}to{transform:scale(1.02) translate3d(-2%,-1%,0)}}
#shopUI .skel{display:block;height:28px;width:46%;border-radius:8px;background:linear-gradient(90deg,#3a3128,#d6b46a55,#3a3128);background-size:200% 100%;animation:skel 1.2s linear infinite}
@keyframes skel{to{background-position:-200% 0}}
#shopUI .p-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
#shopUI .p-sum { font-size: 14px; color: #f3ead8; font-variant-numeric: tabular-nums; } #shopUI .p-sum.no { color: #ffb4a8; }
#shopUI #p-add:disabled { opacity: .4; cursor: default; }
#shopUI .t-links .link{white-space:normal;height:auto;min-height:36px;font-size:15px;color:#f3ead8;text-align:left} /* long rule chips wrap inside the panel */

/* JB9: the "Enter" hint only on hover/focus, so pins stay compact at laptop widths */
.fbpin::after{display:none} .fbpin:hover::after,.fbpin:focus-visible::after{display:block}
.fbpin span{max-width:220px;white-space:normal;line-height:1.3}

/* Side panel: 1 you, 2 one action, 3 latest result, 4 history, then Details. Short labels, sentence case, one type scale. */
#drawer .dz-wrap{display:flex;flex-direction:column;gap:12px}
#drawer .dz{background:var(--raised);border:1px solid var(--line);border-radius:12px;padding:14px 16px;display:grid;gap:8px;min-width:0}
#drawer .dz h3{margin:0;font:600 13px/18px Inter,system-ui,sans-serif;color:var(--muted);text-transform:none;letter-spacing:0;display:flex;align-items:center;gap:8px}
#drawer .dz h3 .n{font:600 11px/18px Inter,system-ui,sans-serif;padding:0 7px;border-radius:999px;background:color-mix(in srgb,var(--text) 8%,transparent);color:var(--text)}
#drawer .dz .lead{font:600 16px/22px Inter,system-ui,sans-serif;color:var(--text);margin:0}
#drawer .dz .sub,#drawer .dz .note{font-size:13px;line-height:18px;color:var(--muted);margin:0}
#drawer .chips{display:flex;flex-wrap:wrap;gap:6px}
#drawer .chip{font:500 12px/24px Inter,system-ui,sans-serif;padding:0 10px;border-radius:999px;border:1px solid var(--line);color:var(--text)}
#drawer .chip.ok{border-color:color-mix(in srgb,var(--ok) 50%,transparent);color:var(--ok)} #drawer .chip.ice{border-color:var(--ice);color:var(--ice)}
#drawer .idc{display:inline-flex;align-items:center;gap:4px;max-width:100%;min-width:0}
#drawer .idc code{font:500 13px/20px var(--mono);color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#drawer .ib2{display:inline-grid;place-items:center;min-width:28px;height:28px;border-radius:8px;border:1px solid var(--line);background:transparent;color:var(--muted);font-size:13px;cursor:pointer;text-decoration:none;flex:none}
#drawer .ib2:hover{color:var(--text);border-color:var(--muted)}
#drawer .dz .go{appearance:none;min-height:44px;width:100%;border:0;border-radius:10px;background:var(--accent);color:var(--on-accent);font:600 15px/20px Inter,system-ui,sans-serif;cursor:pointer;padding:0 16px}
#drawer .dz .go[disabled]{opacity:.6;cursor:progress}
#drawer .dz .ghost{appearance:none;min-height:44px;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--text);font:500 14px Inter,system-ui,sans-serif;padding:0 14px;cursor:pointer}
#drawer .dz .btns{display:grid;grid-template-columns:1fr auto;gap:8px}
/* Two buttons in one drawer action: stack them full width. The 1fr/auto grid let a nowrap label
   take the row and squeezed "Run it live" into a one-letter column. One gold button per view: the
   second action is the outlined one. */
#drawer .dz .btns{grid-template-columns:minmax(0,1fr)}
#drawer .dz .btns > button{width:100%;min-width:0;white-space:normal}
#drawer .dz .btns .redteam-next{background:transparent!important;background-image:none!important;color:var(--text)!important;border:1px solid var(--line)!important;box-shadow:none!important;animation:none}
#drawer .dz.act1:has(.go[hidden]):not(:has(h3)){display:none}
#drawer .quote{margin:0;font-size:14px;line-height:20px;color:var(--text);font-style:italic;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
#drawer .card{border-radius:10px;padding:12px 14px;display:grid;gap:4px;border:1px solid var(--line);border-left:4px solid var(--muted);background:var(--base)}
#drawer .card.ok{border-left-color:var(--ok)} #drawer .card.no{border-left-color:var(--no)}
#drawer .card .ch{display:flex;justify-content:space-between;align-items:center;gap:8px}
#drawer .badge{font:700 12px/24px Inter,system-ui,sans-serif;padding:0 10px;border-radius:999px;background:color-mix(in srgb,var(--muted) 20%,transparent);color:var(--text)}
#drawer .badge.ok{background:color-mix(in srgb,var(--ok) 18%,transparent);color:var(--ok)} #drawer .badge.no{background:color-mix(in srgb,var(--no) 18%,transparent);color:var(--no)}
#drawer .card .amt{font:700 18px/24px Inter,system-ui,sans-serif;color:var(--text)}
#drawer .card p{margin:0;font-size:14px;line-height:20px} #drawer .card .to{color:var(--muted)} #drawer .card .to b{color:var(--text);font-weight:600}
#drawer .card .why{color:var(--text)} #drawer .card .lk{margin-top:4px;font-size:13px}
#drawer a.tx,#drawer .rc.tx{display:inline-flex;align-items:center;min-height:24px;font:500 12px/1 var(--mono);color:var(--accent)}
#drawer .hist .row{grid-template-columns:minmax(0,1fr) auto;padding:8px 0;gap:2px 12px;border-top:1px solid var(--line)}
#drawer .hist h3+.row{border-top:0}
#drawer .hist .row .k{font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#drawer .hist .row .k .why{font:400 12px/16px Inter,system-ui,sans-serif;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#drawer .hist .row .v{display:flex;align-items:center;gap:8px}
#drawer .hist .row .v .why,#drawer .hist .row .v a.tx~a.tx,#drawer .hist .row .v .src{display:none}
#drawer .hist .row .st{font-size:12px;font-weight:600} #drawer .st.ok{color:var(--ok)} #drawer .st.no{color:var(--no)} #drawer .st.ice{color:var(--ice)}
#drawer .warn{margin:0;font-size:13px;color:var(--amber,#ffc75c)}
#drawer details>summary{cursor:pointer;min-height:24px;display:flex;align-items:center;font:600 13px/18px Inter,system-ui,sans-serif;color:var(--muted);list-style:none}
#drawer details>summary::before{content:'›';display:inline-block;margin-right:8px;transition:transform .15s} #drawer details[open]>summary::before{transform:rotate(90deg)}
#drawer details.all>summary{padding-top:8px}
#drawer .dz.more{gap:10px} #drawer .dz.more[open]{gap:10px}
#drawer .kv{display:grid;grid-template-columns:96px minmax(0,1fr);gap:8px;font-size:13px;line-height:20px;align-items:center;padding:4px 0}
#drawer .kv>span:first-child{color:var(--muted)} #drawer .kv>span:last-child{min-width:0;overflow-wrap:anywhere;display:flex;flex-wrap:wrap;gap:4px}
#drawer pre.ev{font:11px/16px var(--mono);white-space:pre-wrap;word-break:break-all;background:var(--base);border-radius:8px;padding:10px;margin:0;color:var(--muted)}
#drawer .labrec{font-size:13px} #drawer .labrec .pf h3{font-size:12px;text-transform:none;letter-spacing:0;margin-top:12px}
#drawer .note.legal{font-size:11px;color:#c9bfae;margin-top:4px;text-align:center}
@media (max-width:600px){ #drawer .dz{padding:12px 14px} }
body:has(#drawer.open) #back{visibility:hidden}
#rules .d-head{position:sticky;top:calc(-1 * var(--s3,16px));z-index:3;background:var(--base,#16130f);padding:12px 0;margin-top:-12px}
#rules #r-close{min-width:44px;min-height:44px;font-size:18px}
#rules #r-sign{position:sticky;bottom:12px;z-index:3;min-height:48px;box-shadow:0 -12px 24px var(--base,#16130f)}
#r-status .steps{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:6px;font-size:13px;color:var(--muted,#b9ad95)}
#r-status .steps li.now{color:var(--ink,#f3ead8);font-weight:600}#r-status .steps li.done{color:#5bd69a}

/* proof panels: self-contained city card, never white, readable on any host page */
.pf{background:var(--c-pane,#1f1a15);color:var(--c-text,#f3ead8);border:1px solid var(--c-line-strong,#3a3128);border-radius:12px;padding:4px 16px 14px;margin:0 0 12px}
.pf h3{color:var(--c-brass,#d6b46a)!important;font:600 12px/18px Inter,system-ui,sans-serif;letter-spacing:.06em;text-transform:uppercase;margin:12px 0 4px}
.pf .row{border-top:1px solid var(--c-line-strong,#3a3128)}
.pf .row .k{color:var(--c-text,#f3ead8)!important;font:500 14px/20px Inter,system-ui,sans-serif}
.pf .row .k .why{color:#c9bda8!important;font:400 12px/18px Inter,system-ui,sans-serif}
.pf .note{color:#c9bda8;font-size:13px;line-height:19px}
.pf a.tx,.pf .note a{color:var(--c-brass,#d6b46a)}
.pf .st.ok{color:var(--p-verified-mark,#00ec97)} .pf .st.no{color:var(--p-check-failed-mark,#ff6b6b)}
#drawer .dz .pf{border:0;padding:0;margin:0;background:transparent}

.net{display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 8px;border-radius:999px;font:600 11px/20px Inter,system-ui,sans-serif;letter-spacing:.02em;text-transform:none;margin-right:6px}
.net.mainnet{background:color-mix(in srgb,#00ec97 16%,transparent);color:#00ec97;border:1px solid color-mix(in srgb,#00ec97 45%,transparent)}

/* long account ids (64-char implicit accounts) wrap instead of overflowing the panel */
#shopUI .card, #shopUI .card .to b, #shopUI #t-say, #shopUI .row .k, #shopUI .row .why, #shopUI .goal, #shopUI .commit, #shopUI .kv span { overflow-wrap: anywhere; min-width: 0; }
#drawer .card, #drawer .card .to b, #drawer .row .k, #drawer .row .why, #drawer .kv span, #drawer .goal { overflow-wrap: anywhere; min-width: 0; }

/* readable one-line explanations (payouts, gas): 14px, light text on the dark panel (>= 7:1) */
#shopUI .plain-line { font-size: 14px; line-height: 20px; color: #f3ead8; font-weight: 500; margin: 0; }
#shopUI .plain-line.warn { color: #ffd88a; }
#shopUI .plain-line a { color: #f3d78f; text-decoration: underline; }

/* readable one-line explanations (payouts, gas): 14px, light text on the dark panel (>= 7:1) */
#drawer .plain-line { font-size: 14px; line-height: 20px; color: #f3ead8; font-weight: 500; margin: 0; }
#drawer .plain-line.warn { color: #ffd88a; }
#drawer .plain-line a { color: #f3d78f; text-decoration: underline; }

/* A plain shop list for a visitor who cannot use the city. It does not restyle the canvas.
   ---------------------------------------------------------------------------------------
   One rail, not three overlapping boxes. The town and the shops share a single top-left
   column: "All shops" is the first item, the tray starts BELOW it, and nothing is positioned
   by guesswork. Before this the menu was pushed with `top:64px` and the tray was padded by a
   44px fudge, which is why the button sat on the first tab and looked pasted on. */
nav.all-shops{position:fixed;
  z-index:200;
  top:var(--hudTop,92px); left:16px;
  max-width:min(340px,calc(100vw - 32px));
  background:rgba(26,20,15,.96); color:#fff8ee;
  border:1px solid #c98f4e; border-radius:14px;
  padding:6px 8px; font:600 16px/1.35 system-ui,sans-serif;
  box-shadow:0 12px 30px rgba(0,0,0,.38);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  pointer-events:auto;
}
/* In a shop the rail is the only left-hand chrome, so the tray starts clear of it rather than
   underneath it. `--rail` is the rail's own height, measured in js and set on body; the
   explicit `top` keeps the menu above every tray even before that measurement lands, which is
   the property the layout test pins. */
/* The menu sits BELOW the brand block, not on top of it. The brand used to be 18..107 because it
   carried a second line ("independent, not affiliated with NEAR Foundation"), so a menu at 64
   covered it and 116 was needed to clear it. That line is gone from the header, the brand is now
   18..62, and 74 clears it with a 12px gap. The reclaimed 42px goes to the shop panel, which is
   what lets Arena's form fit without a scrollbar. The js measurement (`setRail`) overrides this;
   this rule is the value before that runs. */
body.in-shop nav.all-shops { top: 74px; }
/* The tray's own top must come from the menu's real bottom, not from a height calculation that
   can round under it. Measured: menu 116..174, tray top 142 — 32px of the menu sat on the tray's
   top-left corner, which reads as a badge stuck onto the panel. --railTop is set from js. */
body.in-shop #shopUI #tray { top: calc(var(--railTop, 116px) + var(--rail, 58px) + 12px); }
/* A floor, not a sum. Every shop has its own `max-height` and they were all written as
   `100dvh - <magic>`, so a tall tray could start above the rail and slide under the menu —
   measured on Arena 2026-11-08: the menu ended at y=122 and the tray started at y=113. A `top`
   floor cannot be beaten by any max-height, so it holds for every shop without touching
   fourteen separate rules. `--rail` is the menu's measured height, set from js; the fallback
   covers a first paint before that runs. */
body.in-shop #shopUI #tray {
  top: calc(var(--hudTop, 92px) + var(--rail, 60px) + 12px);
  padding-top: 20px;
  max-height: none;
  max-height: calc(100dvh - var(--hudTop, 92px) - var(--rail, 60px) - 12px - 18px);
}
body.story nav.all-shops,body.intro-on nav.all-shops,body:not(.ready) nav.all-shops{opacity:1;visibility:visible;pointer-events:auto;z-index:200}
nav.all-shops summary{list-style:none;cursor:pointer;color:#f5d08a}
nav.all-shops summary::-webkit-details-marker{display:none}
nav.all-shops summary:focus-visible{outline:2px solid #f5d08a;outline-offset:2px}
nav.all-shops ul{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:2px}
nav.all-shops a{color:#fff8ee;text-decoration:none}
nav.all-shops a:hover,nav.all-shops a:focus-visible{color:#f5d08a}
/* The menu is the way into every shop, so each row is a real target with one line saying what
   the shop does. Before this the links were 22px tall with text-only labels and no description,
   which reads as a list of names rather than a map of the town. */
nav.all-shops{max-width:min(340px,calc(100vw - 24px))}
nav.all-shops li{min-height:44px}
nav.all-shops li a{display:flex;flex-direction:column;justify-content:center;gap:1px;
  min-height:44px;padding:7px 10px;border-radius:9px;border:1px solid transparent;line-height:1.25}
nav.all-shops li a:hover,nav.all-shops li a:focus-visible{background:#241c14;border-color:#4a3a28;color:#f5d08a;outline:none}
nav.all-shops li a:focus-visible{outline:2px solid #f5d08a;outline-offset:1px}
nav.all-shops li a b{font-weight:700;font-size:15px}
nav.all-shops li a small{display:block;color:#b9ad95;font:500 12px/1.3 system-ui,sans-serif}
nav.all-shops li a:hover small,nav.all-shops li a:focus-visible small{color:#d8c9ad}
nav.all-shops summary{min-height:44px;display:flex;align-items:center;padding:0 2px}


/* Ferry mix sketch (owner-approved): ~420–440px airy tray; room stays the hero */
body.ferry-tray #shopUI #tray{
  width:min(440px,calc(100vw - 28px));
  max-width:440px;
  left:16px; bottom:18px;
  /* stay clear of top badges / brand / HUD; taller for CTA breathing room */
  max-height:calc(100dvh - 96px);
  padding:24px 22px 22px;
  box-sizing:border-box;
  overflow-x:hidden;
  overflow-y:auto;
  background:#1f1a15;
  border:1px solid #3a3128;
  box-shadow:0 16px 40px rgba(0,0,0,.45);
  backdrop-filter:none; -webkit-backdrop-filter:none;
}
/* Drop stacked chrome so Swap fields dominate (sketch comfort) */
body.ferry-tray #shopUI .t-head,
body.ferry-tray #shopUI .label,
body.ferry-tray #shopUI .hero,
body.ferry-tray #shopUI #t-who,
body.ferry-tray #shopUI #t-track,
body.ferry-tray #shopUI .shop-track,
body.ferry-tray #shopUI .say,
body.ferry-tray #shopUI .t-links,
body.ferry-tray #shopUI .rcpt{display:none!important}
body.ferry-tray #shopUI #t-form{margin:0;min-width:0;max-width:100%}
body.ferry-tray #shopUI #t-act[hidden]{display:none!important}
/* Stage gates stay a chip. The card owns quote and cargo, so this must not be a full-width bar. */
body.apps.ferry-tray #shopUI #t-act{
  width:auto!important;
  max-width:min(220px,100%);
  min-width:0;
  box-sizing:border-box;
}
body.ferry-tray #shopUI .t-row{max-width:100%;min-width:0;justify-content:center}
body.ferry-tray #shopUI select,
body.ferry-tray #shopUI input{max-width:100%;min-width:0;box-sizing:border-box}
body.ferry-tray #shopUI .rcpt:empty{display:none}

/* AI Agent character (~72px) + chat popup; send stays INSIDE the card */
#ferry-agent-dock{
  position:fixed; right:20px; bottom:22px; z-index:70;
  display:flex; flex-direction:row; align-items:flex-end; gap:12px;
  pointer-events:none;
}
#ferry-agent-dock > *,
#ferry-agent-dock .ferry-agent-send{pointer-events:auto}
#ferry-agent-dock[hidden]{display:none!important}
.ferry-agent-char{
  position:relative; display:flex; flex-direction:column; align-items:center; gap:6px;
  width:96px; padding:0; border:0; background:transparent; cursor:pointer; color:#fff8ee;
}
.ferry-agent-char:focus-visible{outline:2px solid #f5d08a; outline-offset:4px; border-radius:12px}
.ferry-agent-avatar{
  width:72px; height:72px; object-fit:contain; display:block;
  filter:hue-rotate(195deg) saturate(1.35) brightness(1.05) drop-shadow(0 10px 18px rgba(0,0,0,.45));
}
.ferry-agent-badge{
  position:absolute; top:-2px; right:6px; z-index:1;
  width:26px; height:26px; border-radius:999px;
  background:#fff; color:#2a1608; font:800 15px/26px system-ui,sans-serif;
  text-align:center; box-shadow:0 4px 12px rgba(0,0,0,.35);
  letter-spacing:.02em;
}
.ferry-agent-char[aria-expanded="true"] .ferry-agent-badge{opacity:.35}
.ferry-agent-name{
  margin:0; color:#f5d08a; font:700 11px/1.2 system-ui,sans-serif;
  letter-spacing:.05em; text-transform:uppercase; text-shadow:0 2px 8px rgba(0,0,0,.55);
}
.ferry-agent-pop{
  width:min(300px,calc(100vw - 140px));
  box-sizing:border-box; padding:10px; border-radius:14px;
  border:1px solid #d6b46a66; background:#1f1a15;
  box-shadow:0 12px 28px rgba(0,0,0,.4);
  display:grid; gap:8px; overflow:hidden;
}
.ferry-agent-log{margin:0;color:#f5d08a;font:600 13px/1.35 system-ui,sans-serif;overflow-wrap:anywhere}
.ferry-agent-pop .ferry-agent-row{
  display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:8px; align-items:stretch; min-width:0; margin:0;
}
.ferry-agent-pop input{
  width:100%; min-width:0; box-sizing:border-box; min-height:44px;
  padding:0 12px; border-radius:10px; border:1px solid #4a3a28;
  background:#17130f; color:#fff8ee; font:500 14px/1.2 system-ui,sans-serif;
}
.ferry-agent-pop .ferry-agent-send,
.ferry-agent-pop button.ferry-agent-send{
  width:44px; min-width:44px; height:44px; margin:0; padding:0;
  border:0; border-radius:10px;
  background:linear-gradient(180deg,#f5d08a,#e2b35b); color:#2a1608;
  font:700 16px/1 system-ui,sans-serif; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
}
/* Arena mix tray: same air as Ferry, without hiding the scam result line. */
body.arena-tray #shopUI #tray{
  width:min(440px,calc(100vw - 28px));
  max-width:440px;
  left:16px; bottom:18px;
  max-height:calc(100dvh - 96px);
  padding:24px 22px 22px;
  box-sizing:border-box;
  overflow-x:hidden;
  overflow-y:auto;
  background:#1f1a15;
  border:1px solid #3a3128;
  box-shadow:0 16px 40px rgba(0,0,0,.45);
  backdrop-filter:none; -webkit-backdrop-filter:none;
}
body.arena-tray #shopUI .t-head,
body.arena-tray #shopUI .label,
body.arena-tray #shopUI .hero,
body.arena-tray #shopUI #t-who,
body.arena-tray #shopUI #t-track,
body.arena-tray #shopUI .shop-track,
body.arena-tray #shopUI .say,
body.arena-tray #shopUI .t-links,
body.arena-tray #shopUI .rcpt{display:none!important}
body.arena-tray #shopUI #t-form{margin:0;min-width:0;max-width:100%}
body.arena-tray #shopUI [data-testid=arena-live]{gap:14px}
body.arena-tray #shopUI .ferry-tab{
  min-height:44px;border:0;border-radius:11px;background:transparent;color:#d4c4a8;
  font:700 15px/1 system-ui,sans-serif;
}
body.arena-tray #shopUI .ferry-tab[aria-selected=true]{
  background:linear-gradient(180deg,#f5d08a,#e2b35b);color:#2a1608;
}
body.arena-tray #shopUI .ferry-cta{
  display:inline-flex;align-items:center;justify-content:center;
  width:auto;min-width:min(220px,100%);min-height:44px;padding:10px 22px;
  border:1px solid #c9a05a;border-radius:14px;
  background:linear-gradient(180deg,#ffe2a8 0%,#f5d08a 42%,#e2b35b 100%);
  color:#2a1608;font:700 15px/1.15 system-ui,sans-serif;cursor:pointer;
  box-shadow:0 1px 0 rgba(255,255,255,.55) inset,0 -2px 0 rgba(120,70,20,.22) inset,0 4px 0 #9a6f2e,0 8px 16px rgba(0,0,0,.28);
}
body.arena-tray #shopUI .arena-mode,
body.arena-tray #shopUI .arena-next{
  min-height:44px;padding:8px 14px;border-radius:12px;border:1px solid #4a3a28;
  background:#17130f;color:#fff8ee;font:650 16px/1 system-ui,sans-serif;cursor:pointer;
}
body.arena-tray #shopUI .arena-mode[aria-pressed=true]{border-color:#f5d08a;color:#f5d08a}
body.arena-tray #shopUI .arena-actions{
  display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:center;
}
body.arena-tray #shopUI .ferry-pane{gap:10px}
body.arena-tray #shopUI .ferry-field{gap:4px}
body.arena-tray #shopUI .arena-agent-send{
  background:linear-gradient(180deg,#f5d08a,#e2b35b);color:#2a1608;border:0;
}

@media (max-width:720px){
  body.ferry-tray #shopUI #tray{
    width:min(100vw - 16px,420px); max-width:none;
    left:8px; bottom:calc(8px + env(safe-area-inset-bottom,0px));
    max-height:calc(100dvh - 76px); padding:20px 18px;
  }
  body.arena-tray #shopUI #tray{
    width:min(100vw - 16px,420px); max-width:none;
    left:8px; bottom:calc(8px + env(safe-area-inset-bottom,0px));
    max-height:calc(100dvh - 76px); padding:20px 18px;
  }
  body.arena-tray #arena-agent-dock{
    top:auto; right:8px; gap:8px;
    bottom:calc(100dvh - 76px + 96px);
  }
  #ferry-agent-dock{right:8px;bottom:calc(12px + env(safe-area-inset-bottom,0px));gap:8px}
  .ferry-agent-avatar{width:72px;height:72px}
  .ferry-agent-char{width:88px}
  .ferry-agent-pop{width:min(240px,calc(100vw - 120px))}
}

/* House tray. Opaque card, tabs, raised actions. The city door stays the room. */
body.house-tray #shopUI #tray{
  width:min(440px,calc(100vw - 28px));
  max-width:440px;
  left:16px; bottom:18px;
  top:auto;
  height:auto;
  max-height:calc(100dvh - 196px);
  padding:24px 22px 22px;
  box-sizing:border-box;
  overflow-x:hidden;
  overflow-y:auto;
  background:#1f1a15;
  border:1px solid #3a3128;
  box-shadow:0 16px 40px rgba(0,0,0,.45);
  backdrop-filter:none; -webkit-backdrop-filter:none;
}
/* Toll Bridge tray: same mix as Ferry. The card owns the pass. */
body.toll-tray #shopUI #tray{
  width:min(640px,calc(100vw - 140px));
  max-width:640px;
  left:16px; bottom:18px;
  height:auto;
  min-height:0;
  max-height:calc(100dvh - 96px);
  padding:28px 26px 26px;
  box-sizing:border-box;
  overflow-x:hidden;
  overflow-y:auto;
  background:#1f1a15;
  border:1px solid #3a3128;
  box-shadow:0 16px 40px rgba(0,0,0,.45);
  backdrop-filter:none; -webkit-backdrop-filter:none;
}
body.house-tray #shopUI .t-head,
body.house-tray #shopUI .label,
body.house-tray #shopUI .hero,
body.house-tray #shopUI #t-who,
body.house-tray #shopUI #t-track,
body.house-tray #shopUI .shop-track,
body.house-tray #shopUI .say,
body.house-tray #shopUI .t-links,
body.house-tray #shopUI .rcpt,
body.house-tray #shopUI #t-cta{display:none!important}
body.house-tray #shopUI #t-form{margin:0;min-width:0;max-width:100%}
body.house-tray #shopUI #t-act[hidden]{display:none!important}
body.house-tray #shopUI .ferry-tab{min-height:44px;height:44px;border:0;border-radius:11px;background:transparent;color:#d4c4a8;font:700 15px/1 system-ui,sans-serif}
body.house-tray #shopUI .ferry-tab.on,
body.house-tray #shopUI .ferry-tab[aria-selected=true]{background:linear-gradient(180deg,#f5d08a,#e2b35b)!important;color:#2a1608!important}
body.house-tray #shopUI #house-cta{justify-self:center;width:auto!important;min-width:min(220px,100%);min-height:44px}
body.house-tray #shopUI .ferry-pane{gap:8px}
body.house-tray #shopUI .ferry-field{gap:4px}
body.house-tray #shopUI .ferry-flow{padding:8px 12px}
body.house-tray #shopUI .ferry-card{gap:10px}
@media (max-width:720px){
  body.house-tray #shopUI #tray{
    width:min(440px,calc(100vw - 120px));
    max-height:calc(100dvh - 168px);
    bottom:8px;
    padding:14px 12px 12px;
  }
}
body.house-tray #shopUI .house-record{margin-top:8px;color:#fff8ee}
body.house-tray #shopUI .house-record summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:#f5d08a}
/* "Every transaction on this deed" is the other disclosure in this room and it is a control like
   the one above: measured 20px tall, under the 40px floor, because only .house-record's summary
   carried the height. Same treatment, no new box. */
body.house-tray #shopUI .house-history summary{min-height:44px;display:flex;align-items:center;cursor:pointer;color:#f5d08a}
body.house-tray #shopUI .t-row{max-width:100%;min-width:0;justify-content:center}
.house-tabs{display:flex;gap:12px;margin:0 0 16px;flex-wrap:wrap}
.house-tab{
  display:inline-flex;align-items:center;gap:8px;
  min-height:44px;padding:0 14px;border-radius:12px;
  border:1px solid #4a3a28;background:#2a221b;color:#fff8ee;
  font:600 15px/1 system-ui,sans-serif;cursor:pointer;
}
.house-tab[aria-selected="true"]{background:#3a2e22;border-color:#d6b46a;color:#f5d08a}
.house-tab .house-ico{display:block;flex:none}
.house-panel{display:grid;gap:12px;color:#fff8ee;font:500 15px/1.45 system-ui,sans-serif}
.house-panel[hidden]{display:none!important}
.house-cta{
  min-height:44px;padding:0 16px;border:0;border-radius:12px;cursor:pointer;
  background:linear-gradient(180deg,#f5d08a,#e2b35b);color:#2a1608;
  font:700 15px/1 system-ui,sans-serif;
  box-shadow:0 3px 0 #8a6a32,0 8px 16px rgba(0,0,0,.28);
}
.house-cta:disabled{opacity:.45;cursor:not-allowed}
.house-fields{display:grid;gap:12px}
.house-fields label{display:grid;gap:6px;color:#f5d08a;font:600 13px/1.2 system-ui,sans-serif}
.house-fields input,.house-fields select{
  min-height:44px;padding:0 12px;border-radius:10px;border:1px solid #4a3a28;
  background:#17130f;color:#fff8ee;font:500 15px/1.2 system-ui,sans-serif;
}
.house-seal{
  margin:0;padding:10px 12px;border-radius:12px;border:1px solid #8a3b36;
  background:#2a1412;color:#fff8ee;font:700 14px/1.35 system-ui,sans-serif;
}
.house-hint{margin:0;color:#f5d08a;font:600 14px/1.4 system-ui,sans-serif}
.house-notes{margin:0;padding-left:18px;display:grid;gap:8px}
.house-key{margin:0;overflow-wrap:anywhere;color:#fff8ee;font:500 13px/1.4 ui-monospace,monospace}
#house-agent-dock{
  position:fixed;right:20px;bottom:22px;z-index:70;
  display:flex;flex-direction:row;align-items:flex-end;gap:12px;pointer-events:none;
}
#house-agent-dock > *,
#house-agent-dock .house-agent-send{pointer-events:auto}
#house-agent-dock[hidden]{display:none!important}
.house-agent-char{
  position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;
  width:96px;padding:0;border:0;background:transparent;cursor:pointer;color:#fff8ee;
}
.house-agent-avatar{width:72px;height:72px;object-fit:contain;display:block;filter:drop-shadow(0 10px 18px rgba(0,0,0,.45))}
.house-agent-name{margin:0;color:#f5d08a;font:700 11px/1.2 system-ui,sans-serif;letter-spacing:.05em;text-transform:uppercase}
.house-agent-pop{
  width:min(300px,calc(100vw - 140px));box-sizing:border-box;padding:10px;border-radius:14px;
  border:1px solid #d6b46a66;background:#1f1a15;box-shadow:0 12px 28px rgba(0,0,0,.4);
  display:grid;gap:8px;
}
.house-agent-log{margin:0;color:#f5d08a;font:600 13px/1.35 system-ui,sans-serif;overflow-wrap:anywhere}
.house-agent-pop .house-agent-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px}
.house-agent-pop input{
  width:100%;min-width:0;box-sizing:border-box;min-height:44px;padding:0 12px;border-radius:10px;
  border:1px solid #4a3a28;background:#17130f;color:#fff8ee;font:500 14px/1.2 system-ui,sans-serif;
}
.house-agent-pop .house-agent-send{
  width:44px;min-width:44px;height:44px;border:0;border-radius:10px;cursor:pointer;
  background:linear-gradient(180deg,#f5d08a,#e2b35b);color:#2a1608;font:700 16px/1 system-ui,sans-serif;
}
nav.all-shops a[data-city-shop]{color:#fff8ee;text-decoration:none}
.house-room{padding-bottom:8px}
@media (max-width:720px){
  body.house-tray #shopUI #tray{
    width:min(440px,calc(100vw - 120px));
    left:8px;
    bottom:8px;
    max-height:calc(100dvh - 168px);
    padding:14px 12px 12px;
  }
  #house-agent-dock{right:8px;bottom:calc(12px + env(safe-area-inset-bottom,0px));gap:8px}
  .house-agent-pop{width:min(240px,calc(100vw - 120px))}
}
body.toll-tray #shopUI .t-head,
body.toll-tray #shopUI .label,
body.toll-tray #shopUI .hero,
body.toll-tray #shopUI #t-who,
body.toll-tray #shopUI #t-track,
body.toll-tray #shopUI .shop-track,
body.toll-tray #shopUI .say,
body.toll-tray #shopUI .t-links,
body.toll-tray #shopUI .rcpt{display:none!important}
body.toll-tray #shopUI #t-form{margin:0;min-width:0;max-width:100%}
body.toll-tray #shopUI #t-act[hidden]{display:none!important}
body.toll-tray #shopUI button.ferry-cta{
  display:inline-flex;align-items:center;justify-content:center;
  width:auto;min-width:min(220px,100%);max-width:100%;
  min-height:44px !important;padding:10px 22px;margin:4px auto 0;box-sizing:border-box;
  border:1px solid #c9a05a !important;border-radius:14px;
  background-color:#f5d08a !important;
  background-image:linear-gradient(180deg,#ffe2a8 0%,#f5d08a 42%,#e2b35b 100%) !important;
  color:#2a1608 !important;font:700 15px/1.15 system-ui,sans-serif;cursor:pointer;
  box-shadow:0 1px 0 rgba(255,255,255,.55) inset,0 -2px 0 rgba(120,70,20,.22) inset,0 4px 0 #9a6f2e,0 8px 16px rgba(0,0,0,.28);
}
body.toll-tray #shopUI button.ferry-cta:disabled{opacity:.72;cursor:not-allowed;color:#2a1608;min-height:44px}
body.toll-tray #shopUI button.toll-quiet,
body.toll-tray #shopUI button.toll-quiet:disabled{
  min-height:44px !important;padding:8px 16px !important;border-radius:12px !important;
  border:1px solid #4a3a28 !important;background:#17130f !important;background-image:none !important;
  color:#fff8ee !important;box-shadow:none !important;opacity:1;
}
body.toll-tray #shopUI button.toll-quiet:disabled{opacity:.55 !important;cursor:default}
body.toll-tray #shopUI .t-row{max-width:100%;min-width:0;justify-content:center}
body.toll-tray #shopUI select,
body.toll-tray #shopUI input{max-width:100%;min-width:0;box-sizing:border-box}
#toll-agent-dock{
  position:fixed; right:20px; bottom:22px; z-index:70;
  display:flex; flex-direction:row; align-items:flex-end; gap:12px;
  pointer-events:none;
}
#toll-agent-dock > *,
#toll-agent-dock .toll-agent-send{pointer-events:auto}
#toll-agent-dock[hidden]{display:none!important}
.toll-agent-char{
  position:relative; display:flex; flex-direction:column; align-items:center; gap:6px;
  width:96px; padding:0; border:0; background:transparent; cursor:pointer; color:#fff8ee;
}
.toll-agent-char:focus-visible{outline:2px solid #f5d08a; outline-offset:4px; border-radius:12px}
.toll-agent-avatar{
  width:72px; height:72px; object-fit:contain; display:block;
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.45));
}
.toll-agent-badge{
  position:absolute; top:-2px; right:6px; z-index:1;
  width:26px; height:26px; border-radius:999px;
  background:#fff; color:#2a1608; font:800 15px/26px system-ui,sans-serif;
  text-align:center; box-shadow:0 4px 12px rgba(0,0,0,.35);
}
.toll-agent-char[aria-expanded="true"] .toll-agent-badge{opacity:.35}
.toll-agent-name{
  margin:0; color:#f5d08a; font:700 11px/1.2 system-ui,sans-serif;
  letter-spacing:.05em; text-transform:uppercase; text-shadow:0 2px 8px rgba(0,0,0,.55);
}
.toll-agent-pop{
  width:min(300px,calc(100vw - 140px));
  box-sizing:border-box; padding:10px; border-radius:14px;
  border:1px solid #d6b46a66; background:#1f1a15;
  box-shadow:0 12px 28px rgba(0,0,0,.4);
  display:grid; gap:8px; overflow:hidden;
}
.toll-agent-log{margin:0;color:#f5d08a;font:600 13px/1.35 system-ui,sans-serif;overflow-wrap:anywhere}
.toll-agent-pop .toll-agent-row{
  display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:8px; align-items:stretch; min-width:0;
}
.toll-agent-pop input{
  width:100%; min-width:0; box-sizing:border-box; min-height:44px;
  padding:0 12px; border-radius:10px; border:1px solid #4a3a28;
  background:#17130f; color:#fff8ee; font:500 14px/1.2 system-ui,sans-serif;
}
.toll-agent-pop .toll-agent-send,
.toll-agent-pop button.toll-agent-send{
  width:44px; min-width:44px; height:44px; margin:0; padding:0;
  border:0; border-radius:10px;
  background:linear-gradient(180deg,#f5d08a,#e2b35b); color:#2a1608;
  font:700 16px/1 system-ui,sans-serif; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
}
body.toll-tray #shopUI .stag{pointer-events:none}
body.toll-tray #shopUI .tokw{display:inline-flex;align-items:center;gap:10px}
body.toll-tray #shopUI .tokw img.tok{width:22px;height:22px;flex:none;display:block}
@media (max-width:720px){
  body.toll-tray #shopUI #tray{
    width:min(100vw - 16px,640px); max-width:none;
    left:8px; bottom:calc(8px + env(safe-area-inset-bottom,0px));
    height:auto;
    min-height:0;
    max-height:calc(100dvh - 168px);
    bottom:calc(96px + env(safe-area-inset-bottom,0px));
    padding:16px 16px 18px;
  }
  #toll-agent-dock{right:8px;bottom:calc(12px + env(safe-area-inset-bottom,0px));gap:8px}
  .toll-agent-avatar{width:72px;height:72px}
  .toll-agent-char{width:88px}
  .toll-agent-pop{width:min(240px,calc(100vw - 120px))}
}

/* Reading the proof is its own view: the town menu pill sat on the drawer title on a phone
   ("All shops" over "Mist Bank"), and an open AI dock covered the drawer's last card on desktop. */
@media (max-width:720px){ body:has(#drawer.open) nav.all-shops{display:none} }
body:has(#drawer.open) [id$="-agent-dock"]{display:none!important}

/* Try free, the real-money sign-in, and the network badge.
   One gold action (the Gold rule) and one outlined action. The row is a flex box with a 16px gap and
   sits clear of All shops, so at 390px it wraps under the brand instead of overlapping Back, the dock
   or the menu. The badge is always visible: a judge must never mistake a rehearsal receipt for a mainnet
   one. */
.net-chrome{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
/* Inside the town's top bar it is one item in that row, not a second fixed strip. Two fixed strips at
   the top is what overlapped at 390px. */
.net-chrome.in-topbar{position:static;max-width:none}
.net-chrome .btn-gold,.net-chrome .btn-outline{display:inline-flex;align-items:center;gap:6px;height:38px;border-radius:19px;padding:0 18px;font:600 14px var(--sans);letter-spacing:.01em;text-decoration:none;cursor:pointer}
.net-chrome .btn-gold{background:linear-gradient(180deg,#f5d08a,#d9a24c);color:#221a10;border:1px solid #b3823c;box-shadow:0 6px 18px rgba(23,19,15,.36)}
.net-chrome .btn-gold:hover{filter:brightness(1.06)}
.net-chrome .btn-outline{background:rgba(26,20,15,.72);color:var(--parch);border:1px solid #d6b46a}
.net-chrome .btn-outline:hover{background:rgba(40,31,23,.9)}
.net-chrome .btn-gold .k{font-size:13px}
.net-badge{display:inline-flex;align-items:center;gap:7px;height:30px;border-radius:15px;padding:0 12px;font:700 11px var(--sans);letter-spacing:.09em;cursor:pointer}
.net-badge .dot{width:7px;height:7px;border-radius:50%}
/* The badge hint: under the badge, anchored to its right edge and capped to the viewport, so it stays on screen. */
.net-badge{position:relative}
.net-badge[data-tip]::after{content:attr(data-tip);position:absolute;top:calc(100% + 8px);right:0;width:max-content;max-width:min(260px,calc(100vw - 24px));white-space:normal;text-align:left;padding:7px 10px;border-radius:10px;background:rgba(23,19,15,.94);color:var(--parch);border:1px solid rgba(214,180,106,.5);font:500 12px/1.4 var(--sans);letter-spacing:0;text-transform:none;opacity:0;pointer-events:none;transition:opacity .15s;z-index:40}
.net-badge[data-tip]:hover::after,.net-badge[data-tip]:focus-visible::after{opacity:1}
.net-badge.main{background:rgba(26,20,15,.8);color:#f5d08a;border:1px solid #c98f4e}
.net-badge.main .dot{background:#f5d08a}
.net-badge.test{background:rgba(9,42,40,.85);color:#7fe3d4;border:1px solid #2f9a8c}
.net-badge.test .dot{background:#42d6bf;box-shadow:0 0 8px #42d6bf}
.net-chrome .try-note{margin:0;flex-basis:100%;text-align:right;font:500 12px/1.4 var(--sans);color:var(--parch2);min-height:0}
.try-note:empty{display:none}
.net-pitch{position:fixed;left:50%;transform:translateX(-50%);bottom:16px;margin:0;font:500 12px/1.4 var(--sans);color:var(--parch2);text-align:center;max-width:min(520px,calc(100vw - 32px));pointer-events:none}
body.in-shop .net-pitch,body.story .net-pitch{display:none}
/* The badge sheet. A small card under the top bar, not a modal that blocks the town. */
.net-sheet{position:fixed;inset:0;z-index:400;background:rgba(12,9,7,.5);display:flex;align-items:flex-start;justify-content:flex-end;padding:72px 16px 16px}
.nb-card{background:#1c1611;color:var(--parch);border:1px solid #c98f4e;border-radius:14px;padding:16px 18px;max-width:min(380px,calc(100vw - 32px));font:500 14px/1.5 var(--sans);box-shadow:0 18px 40px rgba(0,0,0,.5)}
.nb-card p{margin:0 0 10px}
.nb-card .nb-net{font-size:12.5px;color:var(--parch2)}
.nb-card b{word-break:break-all}
.nb-card a,.nb-card .nb-link{color:#f5d08a;background:none;border:0;padding:0;font:inherit;text-decoration:underline;cursor:pointer;text-align:left}
.nb-card .nb-close{background:rgba(245,208,138,.12);border:1px solid #d6b46a;color:var(--parch);border-radius:10px;padding:6px 14px;font:600 13px var(--sans);cursor:pointer}
/* The welcome crate card. */
.welcome-wrap{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:420;width:min(460px,calc(100vw - 32px));max-height:calc(100vh - 48px);overflow:auto}
.welcome{background:#1c1611;color:var(--parch);border:1px solid #c98f4e;border-radius:16px;padding:20px 22px;box-shadow:0 24px 60px rgba(0,0,0,.55);font:500 14px/1.55 var(--sans)}
.welcome .w-title{margin:0 0 6px;font:600 19px var(--serif)}
.welcome{position:relative}
.welcome .w-close{position:absolute;top:8px;right:10px;width:32px;height:32px;border:0;border-radius:50%;background:transparent;color:var(--parch2);font:600 20px/1 var(--sans);cursor:pointer}
.welcome .w-close:hover,.welcome .w-close:focus-visible{background:rgba(255,255,255,.08);color:var(--parch)}
body.md-play .welcome-wrap,body.in-shop .welcome-wrap{display:none}
.welcome .w-acct{margin:0 0 12px;font-size:12.5px;color:var(--parch2);word-break:break-all}
.welcome .w-acct a{color:#f5d08a}
.welcome .w-items{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:7px}
.welcome .w-items li{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;border-left:2px solid #c98f4e;padding-left:10px}
.welcome .crate-note{color:var(--parch2);font-size:12px}
.welcome .crate-tx{color:#f5d08a;font-size:12px}
.welcome .w-line{margin:0 0 14px;font-size:12.5px;color:var(--parch2)}
.welcome .btn-gold{width:100%;height:44px;border-radius:22px;background:linear-gradient(180deg,#f5d08a,#d9a24c);color:#221a10;border:1px solid #b3823c;font:600 15px var(--sans);cursor:pointer}
.welcome .w-note{margin:10px 0 0;font-size:12.5px;color:var(--parch2);min-height:0}
.welcome .w-note:empty{display:none}
@media (max-width:900px){
  .net-chrome{gap:8px}
  .net-chrome .btn-gold,.net-chrome .btn-outline{height:36px;padding:0 14px;font-size:13px}
  .net-pitch{bottom:calc(96px + env(safe-area-inset-bottom,0px));font-size:11.5px}
}
@media (max-width:720px){
  .net-chrome{gap:6px;order:-1;flex-basis:100%}
  .net-chrome .btn-gold .lab{white-space:nowrap}
  .net-badge{height:28px;padding:0 10px;font-size:10.5px}
  .net-pitch{display:none}
}

/* A quiet third link: the story is optional, so it reads as a link and never competes with the two
   real actions. */
.net-chrome .btn-quiet{display:inline-flex;align-items:center;height:34px;padding:0 10px;border-radius:17px;font:500 13px var(--sans);color:var(--parch2);text-decoration:none;background:transparent;border:0;cursor:pointer}
.net-chrome .btn-quiet:hover{color:var(--parch);text-decoration:underline}
@media (max-width:720px){ .net-chrome .btn-quiet{height:30px;font-size:12px} }

/* The scam errand, on the front door. It is a card in the town's own chrome, not a shop panel, so a
   visitor meets it before walking anywhere. Hidden until app/src/net/scam.js fills it. */
.scam-host{position:fixed;left:16px;right:16px;bottom:calc(96px + env(safe-area-inset-bottom,0px));z-index:150;display:flex;justify-content:center;pointer-events:none}
/* Wide screens: a compact card in the bottom-right corner (clear of the zoom rail), not the middle of the town. */
@media (min-width:721px){.scam-host{left:auto;right:72px;justify-content:flex-end}.scam-host .scam{width:min(380px,calc(100vw - 104px));padding:12px 14px;font-size:12.5px;max-height:min(52vh,460px)}.scam-host .scam h2{font-size:15px}.scam-host .scam .scam-intro{font-size:12px}}
/* The opening story is a film: the errand waits until it ends. */
body.story .scam-host{display:none}
/* Mainnet cannot run the errand, so it is a short card: what it is and where it runs. */
.scam.compact textarea,.scam.compact .scam-lab,.scam.compact .scam-examples,.scam.compact .btn-gold,.scam.compact .btn-outline{display:none!important}
.scam-host[hidden]{display:none}
/* The errand is a front-door card: inside a shop or a Market Day it would cover the story, so it steps aside. */
body.in-shop .scam-host,body.md-play .scam-host,body:has(#welcomeCard) .scam-host,.scam-host.closed{display:none}
.scam .scam-close{float:right;display:inline-flex;align-items:center;gap:4px;background:rgba(214,180,106,.12);border:1px solid rgba(214,180,106,.45);border-radius:12px;color:var(--parch);font:600 12px/1 var(--sans);cursor:pointer;padding:5px 9px;margin:0 0 6px 8px}
.scam{pointer-events:auto;width:min(560px,100%);background:rgba(24,19,14,.96);color:var(--parch);border:1px solid #c98f4e;border-radius:16px;padding:16px 18px;box-shadow:0 18px 48px rgba(0,0,0,.5);font:500 13.5px/1.55 var(--sans);max-height:min(70vh,560px);overflow:auto}
.scam h2{margin:0 0 6px;font:600 17px var(--serif)}
.scam .scam-intro{margin:0 0 10px;font-size:12.5px;color:var(--parch2)}
.scam .scam-lab{display:block;font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--parch3);margin-bottom:4px}
.scam textarea{width:100%;box-sizing:border-box;background:rgba(10,7,5,.7);color:var(--parch);border:1px solid rgba(214,180,106,.4);border-radius:10px;padding:8px 10px;font:500 13.5px/1.5 var(--sans);resize:vertical}
.scam .scam-examples{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 10px}
.scam .scam-eg{background:none;border:1px dashed rgba(214,180,106,.45);color:var(--parch2);border-radius:12px;padding:3px 9px;font:500 11.5px var(--sans);cursor:pointer;text-align:left}
.scam .scam-eg:hover{color:var(--parch);border-style:solid}
.scam .btn-gold,.scam .btn-outline{display:inline-flex;align-items:center;height:38px;border-radius:19px;padding:0 16px;font:600 13.5px var(--sans);cursor:pointer;margin:0 6px 6px 0}
.scam .btn-gold{background:linear-gradient(180deg,#f5d08a,#d9a24c);color:#221a10;border:1px solid #b3823c}
.scam .btn-outline{background:transparent;color:var(--parch);border:1px solid #d6b46a}
.scam .btn-gold[disabled],.scam .btn-outline[disabled]{opacity:.5;cursor:not-allowed}
/* The forced-submit button is hidden until a refusal has been anchored: `display:inline-flex` above would
   otherwise beat the plain `hidden` attribute. */
.scam [hidden]{display:none!important}
.scam .scam-note{font-size:12.5px;color:var(--parch2);min-height:1.1em;margin:4px 0}
.scam .scam-reply{border-left:2px solid #c98f4e;padding-left:10px;margin:8px 0}
.scam .scam-said{margin:0 0 4px;font:500 14px/1.5 var(--serif)}
.scam .scam-seal,.scam .scam-tee,.scam .scam-digest{margin:2px 0;font-size:12px;color:var(--parch2)}
.scam .scam-receipts{display:grid;gap:5px;margin:8px 0}
.scam .scam-row{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap;font-size:12.5px}
.scam .scam-row.ok{border-left:2px solid #42d6bf;padding-left:8px}
.scam .scam-row.failed{border-left:2px solid #ff6b6b;padding-left:8px}
.scam .scam-row small{opacity:.75}
.scam a{color:#f5d08a}
.scam .pc-ok{color:#42d6bf}
.scam .pc-bad{color:#ff6b6b}
@media (max-width:720px){
  /* On a phone the gold rule CTA sits at the bottom, so the errand stacks above it and never covers it.
     At 390 the card is 434px tall and the CTA occupies the last ~120px, so 152px of clearance plus a
     scrollable body keeps the card's own buttons reachable without hiding the town's. */
  .scam-host{bottom:calc(152px + env(safe-area-inset-bottom,0px));left:8px;right:8px}
  .scam{padding:12px 14px;max-height:min(48vh,380px)}
  .scam .btn-gold,.scam .btn-outline{width:100%;justify-content:center}
}
