/* =====================================================================================================
   modal-fix.css  (loaded LAST)
   1. Every modal / sheet follows the theme (Night mode off = light card + dark text, on = dark card + light text).
      The old rules forced a dark card on phones and used 50% see-through glass, so text blended into the background.
   2. Modal scrollbars are hidden (the content still scrolls).
   3. Action sheet (Sit / Rest / Sleep ...) cards are smaller.
   ===================================================================================================== */

/* ---------- 1. theme tokens for every modal surface ---------- */
.lgcard,.rcard,.shcard,.sheet,.mcard,.wn-card,.sgn-card,.ucard,.v2sheet{
  --ink:#1b1f33;--mut:#4f5770;--m-chip:#e9ecf5;--m-chip2:#f2f4fa;--m-line:rgba(20,26,52,.12)}
html[data-theme="dark"] .lgcard,html[data-theme="dark"] .rcard,html[data-theme="dark"] .shcard,html[data-theme="dark"] .sheet,
html[data-theme="dark"] .mcard,html[data-theme="dark"] .wn-card,html[data-theme="dark"] .sgn-card,html[data-theme="dark"] .ucard,html[data-theme="dark"] .v2sheet{
  --ink:#f1f3fa;--mut:#b5bbd1;--m-chip:rgba(255,255,255,.12);--m-chip2:rgba(255,255,255,.07);--m-line:rgba(255,255,255,.14)}

/* card surface: nearly opaque so the text never fights the picture behind it (also beats body.v2m's forced dark card) */
html body .lgcard,html body.v2m .lgm .lgcard,html body .rcard,html body .shcard,html body .sheet,html body .mcard,html body .wn-card,html body .sgn-card,html body .ucard{
  background:rgba(255,255,255,.96);color:#1b1f33;border-color:rgba(20,26,52,.1)}
html[data-theme="dark"] body .lgcard,html[data-theme="dark"] body.v2m .lgm .lgcard,html[data-theme="dark"] body .rcard,html[data-theme="dark"] body .shcard,
html[data-theme="dark"] body .sheet,html[data-theme="dark"] body .mcard,html[data-theme="dark"] body .wn-card,html[data-theme="dark"] body .sgn-card,html[data-theme="dark"] body .ucard{
  background:rgba(24,28,46,.97);color:#f1f3fa;border-color:rgba(255,255,255,.14)}
html body.v2m .lgm .lghd b,html body .lghd b{color:inherit}
html body .v2sheet{background:rgba(255,255,255,.96);color:#1b1f33}
html[data-theme="dark"] body .v2sheet{background:rgba(22,26,40,.97);color:#fff}

/* headings, hints, small print */
.lgcard .hsub,.lgcard .lab2,.lgcard .empty,.lgcard small,.lgcard .mtd,.lgcard .lgnote,.lgbody h4{color:var(--mut)}
.lgcard b,.lgcard h3,.lgcard .tl,.lgcard .trow{color:var(--ink)}

/* tabs, chips and small buttons */
html body .lgtabs button:not(.on),.lgcard .mtc,.lgcard .trchips button:not(.on),.lgcard .mtr>button,.lgcard .mts button,.lghd button{
  background:var(--m-chip);color:var(--ink);-webkit-backdrop-filter:none;backdrop-filter:none}
html body .lgtabs button:not(.on){color:var(--ink)}
html body .lgtabs button.on,.lgcard .trchips button.on{background:#1b1f33;color:#fff}
html[data-theme="dark"] body .lgtabs button.on,html[data-theme="dark"] .lgcard .trchips button.on{background:#3f77ff;color:#fff}

/* light panels inside a modal: tinted in light mode, dim in dark mode, text always the theme colour */
.lgcard .sgrp,.lgcard .mtc2,.lgcard .mtl,.lgcard .trv,.lgcard .tropt,.lgcard .lgsum,.lgcard .gmcard,.lgcard .htile,.lgcard .kbrow kbd{
  background:var(--m-chip2);color:var(--ink)}
.lgcard .sgrp>*+*,.lgcard .mtr,.lgcard .lgq,.lgcard .lgb,.lgcard .gmc,.lgcard .kbrow{border-color:var(--m-line)!important}
.lgcard .mtl,.lgcard .mtc2{color:var(--ink)}
.lgcard .lgev p,.lgcard .lgev small{color:var(--mut)}
.lgcard .lgev h3{color:var(--ink)}
html[data-theme="dark"] .lgcard .lgwarn{background:rgba(255,196,0,.14);color:#ffd77a}
html[data-theme="dark"] .lgcard .lgwarn.good,html[data-theme="dark"] .lgcard .lgfx .good{background:rgba(52,211,120,.16);color:#7be8ab}
html[data-theme="dark"] .lgcard .lgfx .bad{background:rgba(255,99,99,.16);color:#ff9d9d}
html[data-theme="dark"] .lgcard .lgfx span{background:var(--m-chip)}

/* switches: visible in both themes (the "off" ones used to disappear in dark mode) */
.sw2{background:#b8bfd0}
.sw2 i{background:#fff}
html[data-theme="dark"] .sw2{background:#59618a}
html[data-theme="dark"] .sw2 i{background:#fff}
.sw2.on,html[data-theme="dark"] .sw2.on{background:var(--grn,#075BFF)}
.sw2.on i,html[data-theme="dark"] .sw2.on i{background:#fff}

/* ---------- 2. no scrollbars inside modals (they still scroll) ---------- */
.lgcard,.lgbody,.lgm,.rcard,.shcard,.sheet,.mcard,.ucard,.v2sheet,.v2bd,.wn-card,.lgtabs{scrollbar-width:none;-ms-overflow-style:none}
.lgcard::-webkit-scrollbar,.lgbody::-webkit-scrollbar,.lgm::-webkit-scrollbar,.rcard::-webkit-scrollbar,.shcard::-webkit-scrollbar,.sheet::-webkit-scrollbar,
.mcard::-webkit-scrollbar,.ucard::-webkit-scrollbar,.v2sheet::-webkit-scrollbar,.v2bd::-webkit-scrollbar,.wn-card::-webkit-scrollbar,.lgtabs::-webkit-scrollbar{display:none;width:0;height:0}
.lgbody{padding-right:18px}

/* ---------- 3. action sheet (Sit / Rest / Sleep ...): smaller cards, more breathing room ---------- */
#use .sheet.usesheet{padding:16px 18px calc(20px + var(--sab,0px));max-height:none}
.usesheet h2{font-size:19px}
.usesheet .usesub{margin:2px 0 14px;font-size:13px}
.uacts{grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:12px}
.uact{min-height:0;padding:10px 12px;gap:5px;border-radius:14px;background:var(--m-chip2)}
.uact .u1{gap:4px}
.uact b{font-size:15px;color:var(--ink)}
.uact i{padding:2px 8px;font-size:10.5px;background:var(--m-chip);color:var(--mut)}
.uact .u2{font-size:12px}
.uact em{padding:3px 8px;font-size:12px;background:var(--m-chip);color:var(--ink)}

/* ---------- verified badge screen ---------- */
.vplans{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:8px 0 12px}
.vplan{display:flex;flex-direction:column;align-items:flex-start;gap:2px;border:2px solid var(--m-line,rgba(20,26,52,.14));background:var(--m-chip2,#f3f4f9);color:var(--ink);border-radius:16px;padding:12px 14px;font:inherit;text-align:left;cursor:pointer}
.vplan b{font-size:14px}.vplan span{font:800 18px Outfit,system-ui,sans-serif}.vplan small{color:var(--mut);font-size:11.5px}
.vplan.on{border-color:#1d9bf0;box-shadow:0 0 0 3px rgba(29,155,240,.18)}

/* ---------- game-song mute button next to the time pill ---------- */
#v2top .v2mus{pointer-events:auto;width:32px;height:32px;flex:none;border:0;border-radius:50%;background:var(--v2-pill);color:#fff;display:grid;place-items:center;font-size:13px;padding:0;box-shadow:0 2px 7.5px rgba(0,0,0,.3);cursor:pointer}
#v2top .v2mus.off{color:#ff9d9d;opacity:.9}
body.v2m #v2top .v2mus{width:34px;height:34px;font-size:14px}

/* ---------- Transport: info chips stay on ONE line (scroll sideways if needed); shop buttons line up ---------- */
.lgfx.trfx{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-bottom:2px}
.lgfx.trfx::-webkit-scrollbar{display:none}
.lgfx.trfx span{flex:none;white-space:nowrap;padding:5px 10px;font-size:12px}
.lgq>.lgbtn,.lgb>.lgbtn{flex:none;width:122px;text-align:center;padding:10px 6px;font-size:12.5px;overflow:hidden;text-overflow:ellipsis}
.lgq>div,.lgb>div:nth-child(2){min-width:0;overflow-wrap:anywhere}

/* ---------- Boutique on phones: small preview pinned at the top, only the options scroll, so you always see your changes ---------- */
@media (max-width:767.98px){
  html:root body .screen.light .appview .abody.stx{display:flex;flex-direction:column;overflow:hidden;padding:0;min-height:0}
  html:root body .abody.stx>.stleft{flex:none;display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 0 2px}
  html:root body .abody.stx .stpv{width:auto;height:min(27vh,210px);aspect-ratio:3/4;margin:0 auto;border-radius:18px}
  html:root body .abody.stx .stdesc{max-width:92%;font-size:12px;line-height:1.35;max-height:2.8em;overflow:hidden}
  html:root body .abody.stx>.sttabs{flex:none;position:static;flex-wrap:nowrap;overflow-x:auto;padding:6px 14px 6px}
  html:root body .abody.stx>#stBody{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 14px 18px;scrollbar-width:none;overscroll-behavior:contain}
  html:root body .abody.stx>#stBody::-webkit-scrollbar{display:none}
}

/* ---------- small spinner inside a button while its request is running ---------- */
.is-busy{position:relative;pointer-events:none;color:transparent!important;text-shadow:none!important;cursor:progress}
.is-busy>*{opacity:0!important}
.is-busy::after{content:"";position:absolute;left:50%;top:50%;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;
  border:2.2px solid var(--bb-c,#fff);border-top-color:transparent;opacity:.9;animation:bbspin .7s linear infinite;box-sizing:border-box}
@keyframes bbspin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.is-busy::after{animation-duration:1.6s}}

.lgauto{display:flex;align-items:center;gap:10px;width:100%;border:0;background:var(--m-chip2,#f3f4f9);color:var(--ink);border-radius:16px;padding:12px 14px;margin:8px 0;text-align:left;font:inherit;cursor:pointer}
.lgauto .tl{flex:1;font-weight:700;font-size:14px}.lgauto .sub{display:block;font-weight:500;font-size:12px;color:var(--mut);margin-top:2px}

/* ---------- profile achievements: first 3, then View more / See less ---------- */
.acms .acx{display:none}.acms.open .acx{display:block}
.acmmore{display:block;margin:10px auto 0;border:0;border-radius:999px;padding:8px 18px;font:700 13px Outfit,system-ui,sans-serif;background:var(--m-chip,#e9ecf5);color:var(--ink);cursor:pointer}

.vexp{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin:12px 0 4px;padding:12px 14px;border-radius:16px;background:var(--m-chip2,#f3f4f9)}
.vexp span{font-size:12px;color:var(--mut)}.vexp b{font:800 17px Outfit,system-ui,sans-serif;color:var(--ink)}.vexp small{margin-left:auto;font-weight:700;color:#1d9bf0}
.vauto{display:flex;align-items:center;gap:8px;margin:10px 2px 0;font-size:13px;color:var(--ink)}

/* ---------- night sky: a few small stars, only on some nights (decided in app.js ENV) ---------- */
.scene::before{content:"";position:absolute;left:0;top:0;width:2px;height:2px;border-radius:50%;pointer-events:none;z-index:0;
  background:transparent;opacity:var(--stars,0);transition:opacity 2s;
  box-shadow:43vw 17vh 0 1px rgba(255,255,255,.9),85vw 11vh 0 0px rgba(255,255,255,.9),70vw 14vh 0 0.5px rgba(255,255,255,.9),76vw 11vh 0 0px rgba(255,255,255,.9),6vw 13vh 0 1px rgba(255,255,255,.9),55vw 12vh 0 0px rgba(255,255,255,.9),13vw 43vh 0 1px rgba(255,255,255,.9),9vw 44vh 0 0px rgba(255,255,255,.9),30vw 45vh 0 0px rgba(255,255,255,.9),75vw 45vh 0 1px rgba(255,255,255,.9),8vw 22vh 0 0px rgba(255,255,255,.9),73vw 16vh 0 0.5px rgba(255,255,255,.9),55vw 17vh 0 0px rgba(255,255,255,.9),75vw 27vh 0 0px rgba(255,255,255,.9),15vw 45vh 0 0px rgba(255,255,255,.9),49vw 14vh 0 0px rgba(255,255,255,.9),74vw 11vh 0 0px rgba(255,255,255,.9),65vw 42vh 0 1px rgba(255,255,255,.9),42vw 37vh 0 1px rgba(255,255,255,.9),48vw 27vh 0 0px rgba(255,255,255,.9),25vw 23vh 0 0px rgba(255,255,255,.9),75vw 27vh 0 1px rgba(255,255,255,.9);animation:starTw 4.5s ease-in-out infinite}
.scene::after{content:"";position:absolute;left:0;top:0;width:1px;height:1px;border-radius:50%;pointer-events:none;z-index:0;
  background:transparent;opacity:calc(var(--stars,0) * .8);transition:opacity 2s;
  box-shadow:45vw 36vh 0 0.5px rgba(220,230,255,.85),79vw 12vh 0 0px rgba(220,230,255,.85),67vw 34vh 0 0px rgba(220,230,255,.85),98vw 29vh 0 0px rgba(220,230,255,.85),64vw 34vh 0 0px rgba(220,230,255,.85),87vw 12vh 0 0.5px rgba(220,230,255,.85),45vw 30vh 0 1px rgba(220,230,255,.85),76vw 37vh 0 0px rgba(220,230,255,.85),13vw 25vh 0 1px rgba(220,230,255,.85),91vw 12vh 0 0px rgba(220,230,255,.85),95vw 27vh 0 1px rgba(220,230,255,.85),38vw 32vh 0 0.5px rgba(220,230,255,.85),4vw 37vh 0 0.5px rgba(220,230,255,.85),23vw 15vh 0 1px rgba(220,230,255,.85),9vw 21vh 0 0.5px rgba(220,230,255,.85),18vw 23vh 0 1px rgba(220,230,255,.85),52vw 39vh 0 0px rgba(220,230,255,.85),23vw 36vh 0 1px rgba(220,230,255,.85),72vw 25vh 0 0px rgba(220,230,255,.85),57vw 43vh 0 0.5px rgba(220,230,255,.85),92vw 34vh 0 0.5px rgba(220,230,255,.85),89vw 32vh 0 0px rgba(220,230,255,.85),21vw 13vh 0 0px rgba(220,230,255,.85),21vw 22vh 0 0px rgba(220,230,255,.85),3vw 39vh 0 0px rgba(220,230,255,.85),35vw 26vh 0 0px rgba(220,230,255,.85);animation:starTw 6.5s ease-in-out -2s infinite}
@keyframes starTw{0%,100%{filter:brightness(1)}50%{filter:brightness(.45)}}
@media (prefers-reduced-motion:reduce){.scene::before,.scene::after{animation:none}}

/* ---------- chat: ⋮ menu (like WhatsApp) ---------- */
.cdots{margin-left:auto;width:38px;height:38px;border:0;border-radius:50%;background:transparent;color:inherit;font-size:18px;display:grid;place-items:center;cursor:pointer}
.cdots:active{background:rgba(120,130,160,.18)}
.appview .cmenu{position:absolute;top:58px;right:12px;z-index:30;min-width:200px;padding:6px;border-radius:16px;background:#fff;color:#1b1f33;box-shadow:0 12px 34px rgba(10,16,40,.28);border:1px solid rgba(20,26,52,.08);animation:cmIn .14s ease-out;transform-origin:top right}
html[data-theme="dark"] .appview .cmenu{background:#232a45;color:#f1f3fa;border-color:rgba(255,255,255,.12)}
.cmenu .cmi{display:flex;align-items:center;gap:10px;width:100%;border:0;background:none;color:inherit;text-align:left;padding:11px 12px;border-radius:10px;font:600 14px 'Plus Jakarta Sans',system-ui,sans-serif;cursor:pointer}
.cmenu .cmi:active,.cmenu .cmi:hover{background:rgba(120,130,160,.16)}
.cmenu .cmi.red{color:#d93a3a}.cmenu .cmic{width:22px;text-align:center}
.cmenu .cmsep{display:block;height:1px;margin:4px 6px;background:rgba(120,130,160,.25)}
@keyframes cmIn{from{opacity:0;transform:scale(.92)}to{opacity:1;transform:none}}

/* ---------- voice notes: the part already played turns blue, the rest stays grey ---------- */
.vnw i{background:#9aa1b5;opacity:.8;transition:background .15s}
.vnw em{display:none}
.th .vnw i.pl,.msg.th .vnw i.pl{background:#2f6fdb;opacity:1}
.me .vnw i{background:rgba(255,255,255,.55);opacity:1}.me .vnw i.pl{background:#fff}
html[data-theme="dark"] .th .vnw i{background:#6f789a}html[data-theme="dark"] .th .vnw i.pl{background:#5b8cff}

/* ---------- visiting a friend: see-through overlay over the real 3D room; the normal HUD is hidden ---------- */
body.visiting #v2top,body.visiting #v2act,body.visiting #v2nav,body.visiting #v2rail,body.visiting #v2strip,body.visiting #v2event,body.visiting #v2radio,body.visiting .doorbtn{display:none!important}
#visit.live{background:transparent!important;pointer-events:none}
#visit.live .pill,#visit.live button{pointer-events:auto}
#visit.live .vtools{position:absolute;right:14px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:10px}
#visit.live .vt{width:48px;height:48px;border-radius:50%;padding:0;font-size:20px;display:grid;place-items:center}

#visit .vnote.burg{background:#5a1118!important;color:#ffd7d9!important}

/* ---------- walk mode: bottom bar hidden, joystick shown, eye turns into an X ---------- */
body.walkmode #v2nav,body.walkmode #v2rail,body.walkmode #v2strip,body.walkmode #v2radio,body.walkmode #v2event,body.walkmode #v2act .cb:not(#v2eye),body.walkmode #v2act .pl{display:none!important}
body.walkmode #v2act{left:auto!important;right:16px!important;bottom:calc(18px + var(--sab,0px))!important}
/* eye (first person) view keeps the bottom bars, so the joystick sits just above them */
body.fpmode #v2joy{bottom:calc(92px + var(--sab,0px))}
body.walkmode #v2act #v2eye{width:46px;height:46px;background:rgba(190,40,50,.92)}
body.walkmode #v2act #v2eye svg{width:20px;height:20px}
#v2joy{position:absolute;left:16px;bottom:calc(14px + var(--sab,0px));z-index:30;touch-action:none;user-select:none;-webkit-user-select:none}
#v2joy .jb{position:relative;width:98px;height:98px;border-radius:50%;background:rgba(20,26,52,.38);border:2px solid rgba(255,255,255,.35);backdrop-filter:blur(4px);touch-action:none;display:grid;place-items:center}
#v2joy .jk{width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.88);box-shadow:0 4px 14px rgba(0,0,0,.35);transition:transform .06s}

/* ---------- upstairs / downstairs ---------- */
#buyfloor{position:absolute;left:50%;top:calc(64px + var(--sat,0px));transform:translateX(-50%);z-index:36;border:0;border-radius:999px;padding:9px 16px;font:700 13px Outfit,system-ui,sans-serif;background:rgba(20,26,52,.82);color:#fff;box-shadow:0 4px 14px rgba(0,0,0,.3);cursor:pointer}
#v2rail #v2floor{font-size:18px}

.jwork.jout{background:transparent!important;border:2px solid currentColor;color:var(--mut,#6b7186);margin-top:8px}
.jmine small{display:block;margin-top:6px}

/* ---------- construction progress ---------- */
.builds{margin:0 0 14px;padding:12px 14px;border-radius:18px;background:var(--m-chip2,#f3f4f9);color:var(--ink)}
.builds h4{margin:0 0 8px;font:800 14px Outfit,system-ui,sans-serif}
.build{padding:10px 0;border-top:1px solid var(--m-line,rgba(20,26,52,.12))}.build:first-of-type{border-top:0}
.build .bh{display:flex;flex-direction:column;gap:2px}.build .bh b{font-size:14px}.build .bh span{font-size:12px;color:var(--mut)}
.build .bbar{height:7px;border-radius:99px;background:rgba(120,130,160,.25);margin:8px 0;overflow:hidden}.build .bbar u{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#f59e0b,#fbbf24);transition:width .8s}
.build.ready .bbar u{background:linear-gradient(90deg,#22b573,#3ddc84)}
.build .bf{display:flex;align-items:center;justify-content:space-between;gap:10px}.build .bf small{color:var(--mut);font-size:12px}

/* ---------- place card: workplace, visiting a home... (placepanel.js). Phone and desktop. ---------- */
.plc{position:fixed;left:50%;bottom:calc(10px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);width:min(680px,calc(100vw - 16px));z-index:7100;display:flex;flex-direction:column;gap:8px;pointer-events:none;font-family:'DM Sans','Plus Jakarta Sans',system-ui,sans-serif}
.plc>*{pointer-events:auto}
.plc-log{display:flex;flex-direction:column;gap:4px;align-items:flex-start;pointer-events:none;max-height:120px;overflow:hidden}
.plc-msg{background:rgba(255,255,255,.94);color:#1b1f33;border-radius:14px;padding:6px 11px;font-size:13px;box-shadow:0 4px 14px rgba(0,0,0,.18);max-width:100%;transition:opacity .5s;overflow-wrap:anywhere}
.plc-msg b{font-weight:800;margin-right:4px}.plc-msg.me{background:rgba(20,26,52,.92);color:#fff;align-self:flex-end}.plc-msg.out{opacity:0}
.plc-card{background:rgba(255,255,255,.97);color:#1b1f33;border-radius:26px;padding:8px 14px 14px;box-shadow:0 14px 40px rgba(0,0,0,.32);position:relative;max-height:min(62vh,520px);overflow:auto;scrollbar-width:none}
.plc-card::-webkit-scrollbar{display:none}
html[data-theme="dark"] .plc-card{background:rgba(24,28,46,.97);color:#f1f3fa}
.plc-grab{display:block;width:54px;height:5px;border-radius:9px;border:0;background:rgba(120,130,160,.45);margin:2px auto 8px;padding:0;cursor:pointer}
.plc-head{display:flex;align-items:center;gap:12px}
.plc-ic{width:46px;height:46px;flex:none;border-radius:14px;display:grid;place-items:center;font-size:24px;background:#e9ecf8}html[data-theme="dark"] .plc-ic{background:rgba(255,255,255,.1)}
.plc-ti{flex:1;min-width:0}.plc-ti b{display:block;font:800 19px Outfit,system-ui,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.plc-ti small{display:block;font-size:13px;color:var(--mut,#5a6279);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.plc-b{width:40px;height:40px;flex:none;border-radius:50%;border:1px solid rgba(120,130,160,.35);background:transparent;color:inherit;font-size:18px;cursor:pointer}
.plc-acts{display:flex;gap:0;margin-top:12px;border-radius:999px;overflow:hidden}.plc-acts:empty{display:none}
.plc-a{flex:1;border:0;padding:13px 12px;font:800 15px Outfit,system-ui,sans-serif;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;white-space:nowrap}
.plc-a.pri{background:#15171d;color:#fff}.plc-a.gh{background:#15171d;color:#fff;border-left:1px solid rgba(255,255,255,.25);flex:0 0 auto}
.plc-a:disabled{opacity:.55;cursor:default}.plc-a i{font-style:normal}
.plc-body{margin-top:12px}.plc.folded .plc-body{display:none}
.plc-say{display:flex;align-items:center;gap:8px;background:#eef0f6;border-radius:999px;padding:5px 6px 5px 16px}html[data-theme="dark"] .plc-say{background:rgba(255,255,255,.09)}
.plc-say input{flex:1;min-width:0;border:0;background:transparent;color:inherit;font-weight:600;font-size:15px;font-family:inherit;outline:0;padding:9px 0}.plc-say input::placeholder{color:var(--mut,#7b8299)}
.plc-say kbd{font-weight:700;font-size:11px;font-family:inherit;border:1px solid rgba(120,130,160,.45);border-radius:7px;padding:3px 7px;color:var(--mut,#5a6279)}
.plc-say button{width:44px;height:44px;border-radius:50%;border:0;background:#e1e4ee;color:#1b1f33;display:grid;place-items:center;cursor:pointer}
.plc-emo{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:10px}
.plc-emo button{border:0;border-radius:999px;background:#eef0f6;color:inherit;padding:9px 4px;display:flex;flex-direction:column;align-items:center;gap:2px;font-weight:700;font-size:11px;font-family:inherit;cursor:pointer}
html[data-theme="dark"] .plc-emo button,html[data-theme="dark"] .plc-spots button{background:rgba(255,255,255,.09)}
.plc-emo i{font-style:normal;font-size:20px;line-height:1}
.plc-seat{width:100%;margin-top:10px;border:0;border-radius:999px;background:#eef0f6;color:inherit;padding:13px;font:800 15px Outfit,system-ui,sans-serif;cursor:pointer}html[data-theme="dark"] .plc-seat{background:rgba(255,255,255,.09)}
.plc-sh{display:flex;justify-content:space-between;align-items:baseline;margin:14px 2px 8px}.plc-sh b{font:800 14px Outfit,system-ui,sans-serif}.plc-sh small{font-size:12px;color:var(--mut,#5a6279)}
.plc-spots{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}.plc-spots::-webkit-scrollbar{display:none}
.plc-spots button{flex:none;border:0;border-radius:999px;background:#eef0f6;color:inherit;padding:10px 14px;font-weight:700;font-size:13px;font-family:inherit;cursor:pointer;white-space:nowrap}.plc-spots em{font-style:normal;margin-left:7px;background:rgba(120,130,160,.3);border-radius:99px;padding:1px 7px;font-size:12px}
.plc-menu{position:absolute;right:20px;bottom:62px;background:#fff;color:#1b1f33;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.3);padding:6px;min-width:170px}.plc-menu[hidden]{display:none}
html[data-theme="dark"] .plc-menu{background:#232a45;color:#f1f3fa}
.plc-menu button{display:block;width:100%;text-align:left;border:0;background:none;color:inherit;padding:10px 12px;border-radius:9px;font-weight:700;font-size:14px;font-family:inherit;cursor:pointer}.plc-menu button:hover{background:rgba(120,130,160,.16)}
@media (max-width:520px){
  .plc{width:calc(100vw - 12px);bottom:calc(6px + env(safe-area-inset-bottom,0px))}
  .plc-card{border-radius:22px;padding:6px 12px 12px;max-height:58vh}
  .plc-ti b{font-size:17px}.plc-ic{width:42px;height:42px;font-size:22px}
  .plc-a{padding:12px 8px;font-size:14px}.plc-say kbd{display:none}
  .plc-emo{grid-template-columns:repeat(3,1fr)}
}
@media (max-height:520px){.plc-card{max-height:70vh}.plc-emo{grid-template-columns:repeat(6,1fr)}}

/* ---------- outside (street) mode: the home HUD steps aside so it never overlaps the street controls ---------- */
body.inworld #v2act,body.inworld #v2rail,body.inworld #v2strip,body.inworld #v2radio,body.inworld #v2event,body.inworld #v2joy,body.inworld #v2floor,body.inworld #dkRail{display:none!important}
body.v2m.inworld #wChips,body.v2m.inworld #wGoal,body.v2m.inworld #wRc{top:calc(68px + var(--sat,0px))}
body.v2m.inworld #wJoy{bottom:calc(88px + var(--sab,0px))}
body.v2m.inworld #wSteer{bottom:calc(92px + var(--sab,0px))}
body.v2m.inworld #wRight{bottom:calc(88px + var(--sab,0px))}
body.v2m.inworld #wBot{bottom:calc(84px + var(--sab,0px))}
body.v2m.inworld #wUse{bottom:calc(172px + var(--sab,0px))}
body.v2m.inworld #wHelp{display:none}

/* ---------- arrow-button movement (Settings -> Movement controls) ---------- */
.dpad{display:grid;grid-template-columns:repeat(3,54px);grid-template-rows:repeat(2,54px);gap:6px;touch-action:none;user-select:none;-webkit-user-select:none}
.dpad button{border:2px solid rgba(255,255,255,.35);border-radius:16px;background:rgba(20,26,52,.5);color:#fff;font-size:20px;display:grid;place-items:center;padding:0;touch-action:none;backdrop-filter:blur(4px)}
.dpad button.on{background:rgba(255,255,255,.75);color:#15171d}
.dpad [data-d=u]{grid-column:2;grid-row:1}.dpad [data-d=l]{grid-column:1;grid-row:2}.dpad [data-d=d]{grid-column:2;grid-row:2}.dpad [data-d=r]{grid-column:3;grid-row:2}
body.v2m.inworld #wPad{bottom:calc(88px + var(--sab,0px))}
#v2joy .dpad{margin:0}
body.v2m.inworld #wBot{left:auto;right:12px}

/* ---------- commute cutscene (commute.js) ---------- */
#cmt{position:fixed;inset:0;z-index:9500;background:#000;transition:opacity .3s}#cmt.out{opacity:0}
#cmt canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
#cmt .cmt-t{position:absolute;left:0;right:0;top:calc(14% + env(safe-area-inset-top,0px));text-align:center;color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.55);padding:0 16px}
#cmt .cmt-t b{display:block;font:800 26px Outfit,system-ui,sans-serif}#cmt .cmt-t small{display:block;margin-top:6px;font:600 14px 'DM Sans',system-ui,sans-serif;opacity:.92}
#cmt .cmt-bar{position:absolute;left:8%;right:8%;bottom:calc(5% + env(safe-area-inset-bottom,0px));height:6px;border-radius:9px;background:rgba(255,255,255,.28);overflow:hidden}
#cmt .cmt-bar u{display:block;height:100%;width:0;border-radius:9px;background:#fff}
#cmt .cmt-skip{position:absolute;right:16px;top:calc(12px + env(safe-area-inset-top,0px));border:0;border-radius:99px;padding:9px 16px;background:rgba(0,0,0,.45);color:#fff;font:700 14px 'DM Sans',system-ui,sans-serif;cursor:pointer}
