/* fonts served by the app itself (coordinator 16/11/2569: WebKit drew the numbers thin from the Google Fonts files): static weights
   only — Manrope 700 for numbers, Sarabun 500 and 700 for words; Thai and Latin subsets from Google Fonts (OFL, see fonts/OFL-*.txt) */
@font-face{font-family:'Manrope';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/manrope-700-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+2215}
@font-face{font-family:'Sarabun';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/sarabun-500-thai.woff2) format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'Sarabun';font-style:normal;font-weight:500;font-display:swap;src:url(/fonts/sarabun-500-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+2215}
@font-face{font-family:'Sarabun';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/sarabun-700-thai.woff2) format('woff2');unicode-range:U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'Sarabun';font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/sarabun-700-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+2215}
/* from board2d/index-v10.html (the look the owner accepted) */

/* Domus language (house-plan/iot/web/domus: shared/domus.css + E/e.css, day theme): warm beige ground, frosted panes with a
   white keyline and top light, dark brown ink, ONE accent = amber. Lit / selected / my turn = thin amber ring + amber glow.
   Domus capsules and circles are translated to rectangles with corners ≤ 8 px (owner rule for this game). */
:root{
  --g-bg1:#f3ebdf; --g-bg2:#ddd1c1;
  --ink:#3a2a1f; --ink2:#8a786a; --faint:rgba(58,42,31,.42); --rule:rgba(58,42,31,.14);
  --pane:linear-gradient(165deg,rgba(255,252,247,.72) 0%,rgba(250,244,236,.52) 55%,rgba(244,236,226,.46) 100%);
  --edge:rgba(255,255,255,.78); --top:rgba(255,255,255,.95);
  --sh:0 30px 60px -30px rgba(70,48,28,.42),0 12px 28px -14px rgba(70,48,28,.20);
  --card:linear-gradient(180deg,rgba(255,255,255,.56) 0%,rgba(255,255,255,.22) 100%);
  --card-edge:rgba(255,255,255,.7); --card-sh:0 12px 28px -16px rgba(70,48,28,.30);
  --key:rgba(255,255,255,.9);
  --oak:linear-gradient(150deg,#e3c193 0%,#d2a46e 55%,#c48f58 100%); --oak-off:linear-gradient(150deg,#f1e4cf 0%,#e4cfae 100%);
  --acc:#f3b45a; --acc2:#e0923e; --accGlow:rgba(243,163,60,.46);
  --glow:0 0 0 1.5px var(--acc),0 0 18px 2px var(--accGlow);
  --dk:#3a2a1f; --dk2:#4a3628; --dkInk:#f6ead8; --dkSub:#bfa88f;
  --ok:#557a4c; --no:#a9533f;
  --health:#7b4a93; --ai:#3f6597; --music:#b0812c; --edu:#4b7b55; --food:#b04a3a; --farm:#86603f;
  --gutL:max(16px, env(safe-area-inset-left)); --gutR:max(16px, env(safe-area-inset-right));
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--g-bg2);overflow:hidden}
body{font-family:'Manrope','Sarabun',system-ui,sans-serif;color:var(--ink);font-size:15px;font-weight:500;line-height:1.5;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
#app{position:fixed;inset:0;overflow:hidden;background:linear-gradient(180deg,var(--g-bg1),var(--g-bg2))}
svg.i{width:22px;height:22px;flex:none;display:block;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
svg.i .dsh{stroke-dasharray:2.5 2.5}
button{font:inherit;color:inherit;cursor:pointer}
.mny,.n{font-variant-numeric:tabular-nums;font-weight:600}
/* keys: white key (Domus .pw / .sq); primary = dark solid (Domus .solid); pressed = lit amber */
.ib{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:48px;min-height:48px;padding:0 10px;border-radius:8px;border:0;background:var(--key);color:var(--ink);font-weight:600;font-size:16px;box-shadow:inset 0 1px 0 #fff,0 6px 16px -8px rgba(70,48,28,.45);transition:transform .1s,box-shadow .15s}
.ib:active,.ib.lit{transform:translateY(1px);box-shadow:var(--glow),inset 0 1px 0 #fff}
.ib.sq{width:48px;padding:0}
.ib.pri{background:var(--dk);color:var(--dkInk);box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 3px 0 #1f160f,0 8px 18px -8px rgba(40,25,10,.4)}
.ib.pri:active{box-shadow:var(--glow),0 1px 0 #1f160f}
.ib.ok{background:var(--ok);color:#f6f1e4;box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 3px 0 #33502d}
.ib.no{background:var(--no);color:#fbefe6;box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 3px 0 #6e3023}
.ib.ok:active,.ib.no:active{box-shadow:var(--glow)}
.ib[disabled]{opacity:.38;pointer-events:none}
.ib.pulse{animation:pls 1.2s ease-in-out infinite}
@keyframes pls{0%,100%{box-shadow:0 0 0 1.5px var(--acc),0 0 6px 0 var(--accGlow)}50%{box-shadow:0 0 0 1.5px var(--acc),0 0 20px 4px var(--accGlow)}}

/* line emblem (icon only, never a name) + portrait window */
.bdg2{display:inline-flex;align-items:center;justify-content:center;flex:none;border-radius:5px;color:#fff;background:var(--c);box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 2px 6px -2px rgba(40,25,10,.4)}
.bdg2 svg{width:70%;height:70%;stroke-width:2.3}
.face{display:inline-block;flex:none;border-radius:6px;background-color:#cdbba2;background-repeat:no-repeat;box-shadow:inset 0 0 0 1px rgba(255,255,255,.6),0 4px 10px -6px rgba(40,25,10,.5)}

/* top bar: one frosted pane */
#top{position:absolute;left:0;right:0;top:0;z-index:5;padding:calc(4px + env(safe-area-inset-top)) var(--gutR) 4px var(--gutL);background:var(--pane);box-shadow:inset 0 -1px 0 var(--edge),0 10px 24px -16px rgba(70,48,28,.35);-webkit-backdrop-filter:blur(26px) saturate(1.35);backdrop-filter:blur(26px) saturate(1.35)}
.bar{display:flex;align-items:center;gap:4px;min-height:48px}
.cnt svg{width:18px;height:18px}
.bar .ib.sq{width:44px;min-width:44px;min-height:44px}
.cnt{display:flex;align-items:center;gap:3px;white-space:nowrap;flex:none;color:var(--ink2);font-size:15px;font-variant-numeric:tabular-nums}
.cnt b{font-size:20px;font-weight:600;color:var(--ink);display:inline-block;line-height:1.1}
.room{white-space:nowrap;font-size:14px;color:var(--ink2);font-variant-numeric:tabular-nums}
.demo{display:inline-flex;align-items:center;gap:4px;font-size:14px;color:var(--dkInk);background:var(--dk);border-radius:6px;padding:0 6px;line-height:26px;white-space:nowrap}
.demo::before{content:"";width:6px;height:6px;border-radius:2px;background:var(--acc);box-shadow:0 0 8px var(--acc)}
.sp{flex:1}
#ticker{display:flex;align-items:center;height:34px;overflow:hidden;border-top:1px solid var(--rule)}
#tk{display:flex;align-items:center;gap:6px;white-space:nowrap;min-width:0;animation:tin .3s ease-out}
@keyframes tin{from{transform:translateY(70%);opacity:0}to{transform:none;opacity:1}}
.tn{display:inline-flex;align-items:center;gap:5px;font-weight:600;font-size:15px}
.tn .face{border-radius:5px}
.ti{color:var(--ink2);display:inline-flex;align-items:center;gap:3px}
.ti .tw{font-size:14px;font-weight:600;color:var(--ink)}
.ti.g .tw{color:var(--acc2)} .ti.no .tw{color:var(--no)} .ti svg{width:20px;height:20px}
.ti.g{color:var(--acc2)} .ti.ok{color:var(--ok)} .ti.no{color:var(--no)}
.tv{font-weight:600;font-size:15px;font-variant-numeric:tabular-nums}
.tsep{width:1px;height:16px;background:var(--rule)}

/* board */
#stage{position:absolute;inset:0;z-index:1;touch-action:none}
#board{position:absolute;left:50%;top:0;display:block;overflow:visible;transition:transform .3s ease-out}
#board text{font-family:'Manrope','Sarabun',sans-serif;font-weight:600}
.hot{cursor:pointer}

/* my area: frosted pane */
#sheet{position:absolute;left:0;right:0;bottom:0;margin:0 auto;max-width:520px;z-index:6;padding:0 var(--gutR) 0 var(--gutL)}
#sheetIn{background:var(--pane);border-radius:8px 8px 0 0;padding:6px 8px calc(8px + env(safe-area-inset-bottom));box-shadow:inset 0 0 0 1px var(--edge),inset 0 1px 0 var(--top),var(--sh);-webkit-backdrop-filter:blur(26px) saturate(1.35);backdrop-filter:blur(26px) saturate(1.35)}
.row1{display:flex;align-items:center;gap:6px;min-height:52px}
.row1 .me{display:flex;align-items:center;gap:8px;flex:1;min-width:0;min-height:48px;cursor:pointer;padding-left:2px}
.row1 .ln{display:flex}
.row1 .money{display:flex;align-items:center;gap:4px;font-size:24px;font-variant-numeric:tabular-nums;font-weight:600}
.row1 .money svg{color:var(--acc2)}
.row1 .cards{display:flex;align-items:center;gap:2px;color:var(--ink2);font-size:16px}
.row1 .cards b{color:var(--ink);font-size:18px;font-weight:600}
#more{overflow:hidden;max-height:0;transition:max-height .3s ease-out}
#sheet.open #more{max-height:calc(35vh - 66px);overflow-y:auto}
.sec{border-top:1px solid var(--rule);margin-top:6px;padding-top:4px}
.dh{display:flex;align-items:center;gap:8px;min-height:40px}
.dh .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;font-size:15px;color:var(--ink2)}
.dh .nm b{color:var(--ink);font-weight:600}
.dh .tot{font-size:24px;font-weight:600;font-variant-numeric:tabular-nums}
.prow{display:flex;align-items:center;gap:6px;min-height:52px;border-bottom:1px solid var(--rule)}
.prow:last-child{border-bottom:none}
.who{display:flex;align-items:center;gap:5px;flex:1;min-width:0}
.who .nm{font-weight:600;white-space:nowrap}
.val{min-width:32px;text-align:center;font-size:22px;font-weight:600;font-variant-numeric:tabular-nums}
.prow .ib{min-width:46px;min-height:46px}
.prow .ib.sq{width:46px}
.stt{display:inline-flex;align-items:center;gap:2px}
.stt svg{width:18px;height:18px}
.stt.ok{color:var(--ok)} .stt.no{color:var(--no)} .stt.ask{color:var(--acc2)} .stt.offer{color:var(--ink2)}
.stt b{font-size:15px;font-weight:600}
.keep{display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:4px 2px 0;color:var(--ink2)}
.keep b{font-size:22px;color:var(--ink);font-variant-numeric:tabular-nums}
.offerbox{display:flex;align-items:center;gap:10px;min-height:56px}
.offerbox .big{font-size:34px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.2}
/* cards in hand: one frame family — light oak ground, white keyline inset 3 px; playable = amber glow on the edge */
.hand{display:flex;gap:6px;margin-top:6px}
.card{position:relative;flex:1;min-width:0;min-height:58px;border:0;border-radius:8px;background:var(--oak-off);
  display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:5px 6px;color:var(--ink);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.75),inset 0 0 0 3px rgba(255,250,240,.0),inset 0 0 0 4px rgba(255,255,255,.55),0 6px 14px -8px rgba(70,48,28,.45);transition:transform .1s,box-shadow .15s}
.card:active{transform:translateY(1px)}
.card .bdg{width:30px;height:30px;display:flex;align-items:center;justify-content:center}
.card .bdg svg{width:100%;height:100%}
svg.il{display:block;flex:none}
.ti svg.il{width:24px;height:24px}
.lg svg.il{width:28px;height:28px}
.card .cn{font-size:14px;font-weight:700;line-height:1.3;white-space:nowrap}
.card .tg{position:absolute;left:38px;top:7px}
.card.lock{opacity:.5}
.card .lk{position:absolute;right:4px;top:5px;color:var(--ink2)}
.card .lk svg{width:16px;height:16px}
.card.hot{animation:pls 1.2s ease-in-out infinite}
.slip{display:grid;grid-template-columns:1fr auto auto;grid-template-areas:"t m o" "l m o";align-items:center;gap:0 8px;min-height:58px;padding:4px 0;border-bottom:1px solid var(--rule)}
.slip .t{grid-area:t;font-size:15px;white-space:nowrap;overflow:hidden}
.slip .l{grid-area:l;display:flex;align-items:center;gap:4px}
.slip .l svg{width:20px;height:20px}
.slip .f{display:inline-flex;align-items:center;gap:2px;color:var(--no);font-weight:700;margin-left:6px}
.slip .f svg{width:16px;height:16px}
.slip .m{grid-area:m;font-size:26px;font-weight:600;font-variant-numeric:tabular-nums}
.slip .o{grid-area:o}
.res{display:flex;justify-content:space-between;align-items:center;font-size:16px;min-height:44px;border-bottom:1px solid var(--rule)}
.res .w{display:flex;gap:8px;align-items:center;font-weight:600}
.res .w .hd{color:var(--acc2);font-size:14px} .res .w .pt{color:var(--ink2);font-size:14px}
.res b{font-variant-numeric:tabular-nums;font-size:20px;font-weight:600}

/* overlays */
#tip{position:absolute;z-index:20;pointer-events:none;background:var(--dk);color:var(--dkInk);font-size:15px;font-weight:600;padding:3px 10px;border-radius:6px;white-space:nowrap;opacity:0;transform:translate(-50%,-100%);transition:opacity .12s;box-shadow:0 8px 18px -8px rgba(40,25,10,.5)}
#tip.on{opacity:1}
#legend{position:absolute;inset:0;z-index:15;background:rgba(58,42,31,.32);display:none;align-items:flex-end;justify-content:center}
#legend.on{display:flex}
#legIn{width:100%;max-width:560px;max-height:84vh;overflow:auto;background:#f7f0e6;border-radius:8px 8px 0 0;box-shadow:inset 0 0 0 1px var(--edge),var(--sh);padding:10px var(--gutR) calc(14px + env(safe-area-inset-bottom)) var(--gutL)}
#legIn h2{font-size:18px;margin:0;font-weight:700}
#legIn h3{font-size:14px;color:var(--ink2);margin:10px 0 2px;font-weight:500}
.lg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 10px}
.lg div{display:flex;align-items:center;gap:8px;font-size:15px;min-height:36px;line-height:1.4;padding:3px 0}
.lg svg{width:22px;height:22px;flex:none}
.lg .bdg2{width:26px;height:26px}
#cardView,#charView{position:absolute;inset:0;z-index:16;background:rgba(58,42,31,.38);display:none;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:16px var(--gutR) 16px var(--gutL)}
#cardView.on,#charView.on{display:flex}
#cardView canvas{width:min(78vw,300px);height:auto;border-radius:8px;box-shadow:0 0 0 1px rgba(255,255,255,.8),0 0 22px 2px rgba(243,163,60,.35),0 20px 40px -18px rgba(40,25,10,.55)}
#cardView .row{display:flex;gap:10px}
/* the character card on press-and-hold: portrait in a frosted frame, name plate under it */
#charView{z-index:17}
.cvc{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:8px;border-radius:8px;background:#f7f0e6;box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 4px #f7f0e6,inset 0 0 0 5px rgba(58,42,31,.14),0 0 22px 2px rgba(243,163,60,.32),0 24px 48px -20px rgba(40,25,10,.6)}
.cvc img{display:block;width:var(--cw);height:auto;border-radius:6px;box-shadow:inset 0 0 0 1px #fff}
.cvc .cvp{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 4px;font-size:15px;color:var(--ink2)}
.cvc .cvp b{font-size:20px;font-weight:700;color:var(--ink);margin-right:auto}
.cvc .cvp .bdg2{width:26px;height:26px}
.cvc .cvp .nb{display:inline-flex;align-items:center;gap:3px}
.cvc .cvp .nb svg{width:20px;height:20px}
.cvc .cvp .nb b{font-size:17px;margin:0}
/* turn prompt over the table + confirm pairs: Domus scene tiles */
#turnP{position:absolute;left:50%;top:50%;z-index:7;display:flex;gap:12px;transform:translate(-50%,-50%);opacity:0;pointer-events:none;transition:opacity .2s ease-out, transform .2s ease-out}
#turnP.on{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
#turnP:not(.on){transform:translate(-50%,-50%) scale(.92)}
.tb{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:104px;min-height:92px;border-radius:8px;border:0;background:#f7f0e6;color:var(--ink);font-weight:600;font-size:15px;line-height:1.3;box-shadow:inset 0 0 0 1px #fff,inset 0 1px 0 #fff,0 0 0 1px rgba(58,42,31,.08),0 20px 40px -14px rgba(40,25,10,.6);transition:transform .1s,box-shadow .15s;box-sizing:border-box}
.tb svg{width:34px;height:34px;color:var(--ink2)}
.tb:active{transform:translateY(1px);box-shadow:var(--glow),inset 0 0 0 1px #fff}
.tb.gold{background:var(--dk);color:var(--dkInk);box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 3px 0 #1f160f,0 14px 28px -12px rgba(40,25,10,.55)}
.tb.gold svg{color:var(--acc)}
.tb.gold:active{box-shadow:var(--glow),0 1px 0 #1f160f}
.tb.back{width:64px}
.tb.lit{background:#fffaf2;box-shadow:0 0 0 1.6px var(--acc),0 0 22px 4px var(--accGlow),0 20px 40px -14px rgba(40,25,10,.6)}
.tb.lit svg{color:var(--acc2)}
.card.lit{box-shadow:0 0 0 1.6px var(--acc),0 0 16px 3px var(--accGlow),inset 0 0 0 1px #fff}
.hsel{display:flex;align-items:center;gap:8px;min-height:52px;margin-top:6px}
.hsel .nm{font-weight:700;font-size:15px}
.tb[disabled]{opacity:.4;pointer-events:none}
.cfm{display:flex;align-items:center;gap:8px;min-height:56px}
.cfm .ib{min-height:52px}
.cfm .lbl{font-size:15px}
/* offer step: partners as small frosted tiles (Domus device tiles) */
.seatsRow{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:8px;align-items:stretch;padding:8px 0 4px}
.kr{display:flex;align-items:center;gap:8px;min-height:50px}
.kr .kp{display:flex;align-items:center;gap:4px;font-size:24px;font-weight:600;color:var(--ink)}
.kr .kp .lw{font-size:15px;color:var(--ink2);font-weight:500}
.kr .kp svg{width:20px;height:20px;color:var(--ink2)}
.seat2{display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 4px;border-radius:8px;color:var(--ink);
  background:radial-gradient(90% 55% at 50% 28%,rgba(255,255,255,.62),rgba(255,255,255,0) 70%),linear-gradient(180deg,rgba(255,255,255,.5),rgba(255,255,255,.16));box-shadow:inset 0 0 0 1px var(--card-edge),inset 0 1px 0 var(--top),0 12px 22px -16px rgba(70,48,28,.45)}
.seat2 .hd{display:flex;align-items:center;gap:5px;font-weight:600;font-size:15px;white-space:nowrap}
.seat2 .cs{display:flex;align-items:flex-end;gap:4px;font-size:24px;font-weight:600;font-variant-numeric:tabular-nums;min-height:30px}
.seat2 .pm{display:flex;gap:6px;flex-wrap:nowrap}
.seat2 .ib{min-width:44px;min-height:44px}
.seat2 .ib.sq{width:44px}
.seat2 .ib.p5{width:auto;padding:0 8px}
.freeSeat{display:flex;align-items:center;gap:10px;min-height:50px}
.mny{white-space:nowrap}
.cu{font-family:'Sarabun',sans-serif;font-size:max(14px,.6em);font-weight:500;color:inherit;opacity:.8}
/* plot card, die, settings */
#plotCard{position:absolute;left:0;right:0;bottom:0;margin:0 auto;max-width:520px;z-index:8;padding:0 var(--gutR) calc(10px + env(safe-area-inset-bottom)) var(--gutL);transform:translateY(110%);transition:transform .22s ease-out;pointer-events:none}
#plotCard.on{transform:none;pointer-events:auto}
@media (min-width:900px){#plotCard{left:24px;right:auto;bottom:auto;top:110px;margin:0;width:300px;padding:0;transform:translateX(-120%)}#plotCard.on{transform:none}#plotCard .seats{flex-wrap:wrap}}
.pc{background:#f7f0e6;color:var(--ink);border-radius:8px;box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 4px #f7f0e6,inset 0 0 0 5px rgba(58,42,31,.12),0 0 18px 1px rgba(243,163,60,.22),var(--sh);padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.pc .hd{display:flex;align-items:center;gap:8px}
.pc .id{font-weight:600;font-size:15px;background:var(--dk);color:var(--dkInk);border-radius:6px;padding:0 8px}
.pc .mult{font-weight:600;font-size:28px;line-height:1.1}
.pc .sum{margin-left:auto;font-size:18px;white-space:nowrap;color:var(--ink2)}
.pc .sum b{color:var(--ink);font-size:26px;font-weight:600}
.pc .seats{display:flex;gap:6px}
.pc .sd{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 2px;border-radius:8px;background:var(--card);box-shadow:inset 0 0 0 1px var(--card-edge)}
.pc .sd.me{box-shadow:var(--glow),inset 0 0 0 1px #fff}
.pc .sd.off{opacity:.38}
.pc .sd .e{position:relative;display:flex}
.pc .sd .tick{position:absolute;right:-8px;top:-8px;width:18px;height:18px;border-radius:5px;background:var(--ok);color:#fff;display:flex;align-items:center;justify-content:center}
.pc .sd .tick svg{width:12px;height:12px;stroke-width:3}
.pc .sd .nm{display:flex;align-items:center;gap:3px;font-size:14px;font-weight:600;white-space:nowrap;max-width:100%;overflow:hidden}
.pc .sd .nm svg{width:16px;height:16px;color:var(--ink2)}
.pc .tks{display:flex;gap:10px;align-items:center}
.pc .tk2{display:flex;align-items:center;gap:4px;font-weight:600;font-size:17px;padding:2px 10px;border-radius:6px;background:var(--key);box-shadow:inset 0 0 0 1px rgba(58,42,31,.08)}
.pc .tk2 svg{width:18px;height:18px;color:var(--ink2)}
.pc .bar{display:flex;justify-content:space-between;gap:10px;margin-top:2px}
.pc .bar .tb{min-height:56px;flex-direction:row;width:auto;padding:0 18px;font-size:16px}
.pc .bar .tb svg{width:24px;height:24px}
.pc .bar .tb.back{width:64px;padding:0}
.pc .empty{display:flex;align-items:center;gap:8px;color:var(--ink2);min-height:40px}
#dieO{position:absolute;inset:0;z-index:13;display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:0;transition:opacity .15s}
#dieO.on{opacity:1}
#settings{position:absolute;inset:0;z-index:15;background:rgba(58,42,31,.32);display:none;align-items:flex-end;justify-content:center}
#settings.on{display:flex}
#setIn{width:100%;max-width:520px;background:#f7f0e6;color:var(--ink);border-radius:8px 8px 0 0;box-shadow:inset 0 0 0 1px #fff,var(--sh);padding:12px var(--gutR) calc(14px + env(safe-area-inset-bottom)) var(--gutL);display:flex;flex-direction:column;gap:10px}
#setIn h2{margin:0;font-size:18px;display:flex;align-items:center;gap:8px}
#setIn h3{margin:4px 0 0;font-size:15px;font-weight:500;color:var(--ink2)}
.opts{display:flex;gap:10px}
.optT{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px;border-radius:8px;border:0;background:var(--card);box-shadow:inset 0 0 0 1px var(--card-edge),0 10px 20px -14px rgba(70,48,28,.45);color:var(--ink);font-weight:600;font-size:15px;min-height:120px}
.optT.on{box-shadow:var(--glow),inset 0 0 0 1px #fff;background:#fffaf2}
.optT svg.ill{width:96px;height:72px}
.modeI{display:inline-flex;align-items:center;color:var(--acc2)}
.modeI svg{width:18px;height:18px}
#handRow .hand{margin-top:2px}
.card .nx{position:absolute;left:5px;top:2px;font-size:14px;font-weight:700;color:var(--ink)}
#handRow .card{min-height:66px;align-items:center;justify-content:center;gap:1px;padding:4px 2px}
#handRow .card .bdg{width:32px;height:30px}
#handRow .card .bdg svg{width:32px;height:30px}
#handRow .card .cn{font-size:14px;line-height:1.25;max-width:100%;overflow:hidden}
#ticker .own{display:inline-flex;align-items:center;gap:4px;flex:none;margin-right:8px;background:var(--dk);color:var(--dkInk);border-radius:6px;padding:0 8px 0 6px;font-size:15px;font-weight:600;line-height:28px;white-space:nowrap}
#ticker .own svg{width:18px;height:18px;color:var(--acc)}
.row1 .money svg.coin{width:26px;height:26px}

/* r7 15/11: owner "when a pop-up shows (draw / choose), blur what is behind". Board + side UI blur while a choice or a full card is open. */
#stage{transition:filter .2s ease-out}
#app:has(#turnP.on) #stage{filter:blur(7px) saturate(.9)}
#top,#sheet{transition:filter .2s ease-out}
#app:has(#turnP.on) :is(#top,#sheet){filter:blur(6px) saturate(.9)}
#app:has(#plotCard.on.pick) #top{filter:blur(6px) saturate(.9)}   /* dice: the card asks yes/draw; the landed plot stays sharp */
#legend,#settings,#cardView,#charView{-webkit-backdrop-filter:blur(9px);backdrop-filter:blur(9px)}
@media (prefers-reduced-motion:reduce){#stage{transition:none}}

/* v8: keys are Blender renders; border-image stretches the middle and keeps the corners (8 px) */
.ib,.tb,.card{border:0;background:none;border-image-source:var(--kS);border-image-slice:28 fill;border-image-width:14px;border-image-repeat:stretch;box-shadow:0 8px 14px -9px rgba(40,25,10,.5)}
.ib.pri,.tb.gold,.ib.ok{border-image-source:var(--kP);color:var(--dkInk);box-shadow:0 8px 14px -9px rgba(40,25,10,.55)}
.ib.ok{color:#a6dd9f} .ib.no{color:var(--no)}
.ib:active,.tb:active,.card:active,.ib.lit,.tb.lit,.card.lit{border-image-source:var(--kSp)}
.ib.pri:active,.tb.gold:active,.ib.ok:active,.ib.pri.lit,.ib.ok.lit{border-image-source:var(--kPp)}
.ib.lit,.tb.lit,.card.lit{box-shadow:0 0 0 1.6px var(--acc),0 0 20px 4px var(--accGlow)}
.ib[disabled],.tb[disabled]{border-image-source:var(--kD);opacity:1;color:#6f6253}
.tb[disabled] svg,.tb.gold[disabled] svg{color:#6f6253}
.tb.back{border-image-source:var(--kS)}
.card{background:none}
.card .bdg img,.hsel img.em{display:block;width:100%;height:100%;object-fit:contain}
img.em{display:block;flex:none;object-fit:contain}
img.coin{display:block;flex:none;object-fit:contain}
.ti img.em{width:26px;height:26px}
.lg img.em{width:30px;height:30px}
#cardView{gap:10px}
#cardView canvas{width:min(78vw,240px);border-radius:8px;box-shadow:0 14px 30px -14px rgba(40,25,10,.5)}
.tc3{position:relative;flex:none;filter:drop-shadow(0 0 18px rgba(243,163,60,.28))}
.tc3 img{position:absolute;display:block;max-width:none}
.tc3 .pl{position:absolute;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;color:#2a1a05;white-space:nowrap}
.tc3 .ln{position:absolute;right:8%;top:6%}
.cvf{position:relative}
.cvc .cvf img{position:absolute;display:block;max-width:none;box-shadow:none;border-radius:0}
.cvc .cvf .pt{object-fit:cover;object-position:50% 22%;border-radius:4px}
.cvf .pn{position:absolute;display:flex;align-items:center;justify-content:center;font-size:19px;font-weight:700;color:#2a1a05;white-space:nowrap}

/* v9 deal-count chip: from deal 10 the faces that end the game */
@media (max-width:420px){.room{display:none}}   /* v9: the deal-count chip needs the room code's place on phones */
.cnt .lb{font-size:14px;color:var(--ink2);margin-right:2px}
#endChip span{margin-left:3px}
#endChip{display:inline-flex;align-items:center;gap:2px;margin-left:4px;font-size:14px;color:var(--ink2)}
#endChip svg{width:16px;height:16px}
#endChip.hot{color:#fff6e6;background:var(--no);border-radius:5px;padding:0 5px;box-shadow:0 0 10px 1px rgba(169,83,63,.45)}
/* die overlay: the faces that end the game now */
#dieO{flex-direction:column;gap:10px}
#dieO.endroll{background:rgba(58,42,31,.22);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
.endf .ew{font-size:15px;font-weight:700;color:var(--no);align-self:center;margin-left:2px}
.endf{display:flex;gap:6px;padding:6px 8px;border-radius:8px;background:#f7f0e6;box-shadow:0 10px 24px -12px rgba(40,25,10,.6)}
.endf svg{width:30px;height:30px;opacity:.35}
.endf svg.end{opacity:1;filter:drop-shadow(0 0 6px rgba(208,101,76,.8))}
/* end screen */
#endView{position:absolute;inset:0;z-index:18;display:none;align-items:center;justify-content:center;background:rgba(58,42,31,.32);-webkit-backdrop-filter:blur(9px);backdrop-filter:blur(9px);padding:16px var(--gutR) 16px var(--gutL)}
#endView.on{display:flex}
.endc{width:100%;max-width:420px;background:#f7f0e6;border-radius:8px;box-shadow:inset 0 0 0 1px #fff,var(--sh);padding:14px}
.endc h2{margin:0 0 8px;font-size:20px;display:flex;align-items:center;gap:8px}
.endc h2 svg{width:24px;height:24px;color:var(--acc2)}
.er{display:flex;align-items:center;gap:10px;min-height:56px;padding:4px 8px;border-radius:8px;font-size:16px}
.er + .er{margin-top:4px}
.er.win{background:#fff6e6;box-shadow:0 0 0 1.6px var(--acc),0 0 20px 4px var(--accGlow)}
.er .m{font-size:22px;font-weight:600}
.er .wn{display:inline-flex;color:#fff6e6;background:var(--acc2);border-radius:5px;padding:0 6px;font-size:15px} .er .wn svg{width:22px;height:22px}
/* deal table view */
#dealView{position:absolute;left:0;right:0;z-index:4;display:none;pointer-events:none;margin:0 auto;max-width:560px}
#dealView.on{display:block}
.dealOn #stage{filter:blur(7px) saturate(.85)}
#app:has(#turnP.on) #dealView{filter:blur(6px) saturate(.9)}
.dtab{position:absolute;border-radius:8px;background:linear-gradient(160deg,#4a3628,#2e2118);color:var(--dkInk);box-shadow:inset 0 0 0 1px rgba(224,180,90,.55),inset 0 0 0 4px #3a2a1f,inset 0 0 0 5px rgba(224,180,90,.25),0 30px 50px -24px rgba(40,26,14,.7);padding:12px 12px 10px;display:flex;flex-direction:column;align-items:center;gap:4px}
.dtab .tl{display:flex;align-items:center;gap:6px;width:100%;font-size:15px}
.dtab .tl .id{background:var(--dkInk);color:var(--dk);border-radius:4px;padding:0 6px;font-weight:700}
.dtab .tl .sp{flex:1}
.dtab .pips{display:flex;gap:3px}.dtab .pips i{width:8px;height:12px;border-radius:2px;background:#5a4434}.dtab .pips i.on{background:var(--acc)}
.dtab .clk{min-width:34px;height:26px;border-radius:5px;background:#1f160f;color:var(--dkInk);display:inline-flex;align-items:center;justify-content:center;gap:2px;font-size:15px;font-weight:700;padding:0 4px}
.dtab .clk.last{background:var(--acc);color:var(--dk);box-shadow:0 0 12px 2px var(--accGlow)}
.dtab .clk svg{width:14px;height:14px}
.dtab .rnd{font-size:14px;color:var(--dkSub)}
.dtab .stp{display:flex;align-items:center;gap:6px;margin-top:6px;min-height:28px}
.dtab .stp i{width:8px;height:8px;border-radius:2px;border:1.5px solid var(--dkSub)}
.dtab .stp i.done{background:var(--acc);border-color:var(--acc)}
.dtab .stp .cur{display:inline-flex;align-items:center;gap:4px;padding:1px 8px;border-radius:6px;background:#fff6e6;color:var(--dk);font-size:14px;box-shadow:0 0 0 1.5px var(--acc),0 0 12px 2px var(--accGlow)}
.dtab .stp .cur svg{width:16px;height:16px}
.dtab .kp .lw{font-size:14px;color:var(--dkSub);font-weight:500}
.dvcnt svg{width:14px;height:14px;margin-right:2px}
.dtab .tot{font-size:34px;font-weight:600;line-height:1.15;margin-top:2px}
.dtab .eq{font-size:14px;color:var(--dkSub)}
.dtab .need{display:flex;gap:7px;margin-top:4px}
.dtab .need .nb{position:relative}
.dtab .need .nb i{position:absolute;right:-4px;bottom:-4px;width:12px;height:12px;border-radius:3px;border:1.5px solid #2e2118;background:#8a786a}
.dtab .need .nb i.ok{background:#8fc27f}.dtab .need .nb i.ask{background:var(--acc)}.dtab .need .nb i.no{background:#d0654c}.dtab .need .nb i.head{background:var(--acc2)}
.dtab .kp{margin-top:auto;display:flex;align-items:center;gap:6px;font-size:22px;font-weight:600;color:var(--acc)}
.dtab .kp svg{width:20px;height:20px;color:var(--dkSub)}
.dseat{position:absolute;width:78px;display:flex;flex-direction:column;align-items:center;gap:2px;transition:opacity .2s}
.dseat .fr{position:relative}
.dseat .fr img{position:absolute;display:block;max-width:none}
.dseat .fr .pt{object-fit:cover;object-position:50% 22%;border-radius:3px}
.dseat .fr .st{position:absolute;display:flex;align-items:center;justify-content:center;gap:2px;color:#2a1a05;font-size:14px;font-weight:700}
.dseat .fr .st svg{width:16px;height:16px}
.dseat .fr .st.ok{color:#2f6a2a}.dseat .fr .st.ask{color:#8a4f10}.dseat .fr .st.no{color:#8c2e1f}
.dseat .nm{font-size:14px;font-weight:600;white-space:nowrap;line-height:1.4;background:rgba(247,240,230,.88);border-radius:4px;padding:0 5px}
.dseat .amt{font-size:15px;font-weight:600;background:var(--dk);color:var(--dkInk);border-radius:5px;padding:0 6px;line-height:24px}
.dseat.head .fr{filter:drop-shadow(0 0 7px rgba(243,163,60,.9))}
.dseat.out{opacity:.62}
.dseat.out .fr{filter:grayscale(.5)}
.dseat.me .nm{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.dvw{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.denv{position:absolute;width:34px;height:24px;margin:-12px 0 0 -17px;border-radius:4px;background:linear-gradient(180deg,#fffaf0,#efe0c6);border:1px solid rgba(58,42,31,.25);box-shadow:0 6px 10px -5px rgba(70,48,28,.6)}
.denv::before{content:"";position:absolute;left:0;right:0;top:0;height:13px;clip-path:polygon(0 0,100% 0,50% 100%);background:rgba(58,42,31,.16)}
.denv::after{content:"";position:absolute;left:12px;top:8px;width:10px;height:9px;border-radius:2px;background:var(--acc2)}
.dvcard{position:absolute;width:58px;filter:drop-shadow(0 10px 14px rgba(40,26,14,.5))}
.dvcard img{display:block;width:100%}
.dvcard .by{position:absolute;left:-8px;top:-8px}
.dvcnt{position:absolute;min-width:30px;height:28px;border-radius:5px;background:var(--no);color:#fff;display:flex;align-items:center;justify-content:center;font-size:17px;font-weight:700;box-shadow:0 0 12px 2px rgba(208,101,76,.5)}
/* pull a character: eligible plaques are tapped on the board */
.pc .pu{display:flex;align-items:center;gap:8px;min-height:48px}
.pc .pu .x3{font-size:20px;font-weight:600}
