@font-face{font-family:'DotGothic16';src:url(../fonts/dotgothic16-latin-400-normal.woff2) format('woff2');font-weight:100 900;font-display:swap}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;font:13px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:#1d2230}
#desk{position:fixed;inset:0 0 44px 0;background:radial-gradient(circle at 20% 20%,#3a4f8f 0,#1b2347 45%,#0d1022 100%)}
#icons{position:fixed;inset:0 0 44px 0}
.icon{position:absolute;touch-action:none;width:84px;height:84px;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;cursor:pointer;user-select:none;text-align:center;font-size:12px;text-shadow:0 1px 2px #000}
.icon:hover{background:rgba(255,255,255,.12)}
.icon b{font-size:30px;line-height:38px;font-weight:400}
#taskbar{position:fixed;left:0;right:0;bottom:0;height:44px;background:rgba(14,17,32,.92);backdrop-filter:blur(8px);display:flex;align-items:center;gap:6px;padding:0 8px;color:#e8ebf5;z-index:100000;border-top:1px solid #2a3157}
#tbapps{display:flex;gap:4px;flex:1;min-width:0;overflow-x:auto}
.tb{background:#262d52;border:0;color:#e8ebf5;padding:6px 10px;border-radius:6px;cursor:pointer;white-space:nowrap;font-size:12px}
.tb.on{background:#4a5aa8}
#money{font-weight:700;color:#7dffa8;font-variant-numeric:tabular-nums}
#money.neg{color:#ff7d7d}
#clock{font-variant-numeric:tabular-nums;font-size:12px;text-align:right;min-width:130px}
#busy{font-size:12px;color:#ffd27d;white-space:nowrap;flex-shrink:0}
.spd{background:#262d52;border:0;color:#cfd5ee;padding:4px 7px;border-radius:5px;cursor:pointer;font-size:11px}
.spd.on{background:#7dffa8;color:#0d1022;font-weight:700}
.win{position:fixed;background:#f5f6fa;border-radius:10px;box-shadow:0 18px 50px rgba(0,0,0,.5);display:flex;flex-direction:column;overflow:hidden;min-width:300px;min-height:200px;max-width:100vw;max-height:calc(100vh - 44px)}
.rz{position:absolute;z-index:5}.rz.n{top:0;left:10px;right:10px;height:6px;cursor:ns-resize}.rz.s{bottom:0;left:10px;right:10px;height:6px;cursor:ns-resize}.rz.e{right:0;top:10px;bottom:10px;width:6px;cursor:ew-resize}.rz.w{left:0;top:10px;bottom:10px;width:6px;cursor:ew-resize}.rz.ne,.rz.nw,.rz.se,.rz.sw{width:12px;height:12px}.rz.ne{right:0;top:0;cursor:nesw-resize}.rz.nw{left:0;top:0;cursor:nwse-resize}.rz.se{right:0;bottom:0;cursor:nwse-resize}.rz.sw{left:0;bottom:0;cursor:nesw-resize}
#startpop,#calpop{position:fixed;bottom:50px;background:#151b38;color:#e8ebf5;border:1px solid #2f3866;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.6);z-index:150000;display:none}
#startpop{left:8px;width:380px;padding:14px}#calpop{right:8px;width:330px;padding:14px}
.sp-apps{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:10px 0;max-height:300px;overflow:auto}.sp-app{text-align:center;padding:8px 4px;border-radius:8px;cursor:pointer;font-size:11px}.sp-app:hover{background:#262d52}.sp-app b{display:block;font-size:24px;font-weight:400}
.sp-row{display:flex;gap:6px;flex-wrap:wrap;border-top:1px solid #2f3866;padding-top:10px}.sp-row button{background:#262d52;border:0;color:#e8ebf5;padding:6px 10px;border-radius:6px;cursor:pointer;font-size:12px}.sp-row button:hover{background:#3a4680}
.cal-h{display:flex;justify-content:space-between;align-items:center;margin:8px 0}.cal-h button{background:#262d52;border:0;color:#fff;width:28px;height:26px;border-radius:6px;cursor:pointer}
.cal-g{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;text-align:center}.cal-g .dh{font-size:10px;color:#8b93b8;padding:2px}.cal-g .dc{padding:6px 0;border-radius:6px;cursor:pointer;font-size:12px;position:relative}.cal-g .dc:hover{background:#262d52}.cal-g .dc.past{color:#6b7392}.cal-g .dc.today{background:#7dffa8;color:#0d1022;font-weight:700}.cal-g .dc.sel{outline:2px solid #7d9bff}.cal-g .dc i{position:absolute;bottom:2px;left:50%;width:4px;height:4px;margin-left:-2px;border-radius:2px;background:#ffd27d}
.cal-ev{margin-top:10px;font-size:12px;max-height:150px;overflow:auto}.cal-ev div{padding:3px 0;border-bottom:1px solid #2a3157}
#clock{cursor:pointer;padding:2px 6px;border-radius:6px}#clock:hover{background:#262d52}
.icon.drag{opacity:.85;background:rgba(255,255,255,.18)}

.wt{background:#e3e6f0;padding:7px 10px;display:flex;justify-content:space-between;align-items:center;cursor:move;user-select:none;font-weight:600}
.win.focus .wt{background:#d3d9f0}
.wb button{border:0;background:#cdd2e3;width:24px;height:22px;border-radius:5px;margin-left:4px;cursor:pointer;font-weight:700}
.wb button:hover{background:#b8bfd9}
.wb button.x:hover{background:#ff6b6b;color:#fff}
.wbody{flex:1;overflow:auto;padding:12px}
h3{margin:4px 0 8px;font-size:15px}
h4{margin:12px 0 6px;font-size:13px}
.tabs{display:flex;gap:4px;margin-bottom:10px;flex-wrap:wrap}
.tab{border:1px solid #cdd2e3;background:#fff;padding:5px 10px;border-radius:6px;cursor:pointer}
.tab.on{background:#3a4f8f;color:#fff;border-color:#3a4f8f}
.tab.sm{padding:2px 8px;font-size:11px}
button.b{border:0;background:#3a4f8f;color:#fff;padding:5px 10px;border-radius:6px;cursor:pointer;font-size:12px}
button.b:hover{filter:brightness(1.15)}
button.b.g{background:#1f9d55}button.b.r{background:#c53b3b}button.b.s{background:#8a92ad}
button.b:disabled{opacity:.45;cursor:not-allowed}
input,select{border:1px solid #c5cbe0;border-radius:6px;padding:4px 6px;font:inherit;background:#fff}
input[type=number]{width:84px}
.bubbles{display:flex;flex-direction:column;gap:6px}.bub{max-width:75%;background:#e6e9f4;padding:8px 11px;border-radius:14px 14px 14px 4px;align-self:flex-start;white-space:pre-wrap}.bub.me{background:#3a7bff;color:#fff;align-self:flex-end;border-radius:14px 14px 4px 14px}.bt{font-size:10px;opacity:.6;margin-top:2px}
.igrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}.ic{margin:0;display:flex;flex-direction:column}.ic-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.ic-i{font-size:30px}
.card{background:#fff;border:1px solid #e0e3ee;border-radius:8px;padding:10px;margin-bottom:8px}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin-bottom:10px}
.stat{background:#fff;border:1px solid #e0e3ee;border-radius:8px;padding:7px 8px}
.stat small{color:#6b7392;display:block;font-size:11px}
.stat b{font-size:15px}
table{width:100%;border-collapse:collapse;background:#fff}
th,td{text-align:left;padding:5px 6px;border-bottom:1px solid #eceef5;vertical-align:top}
th{background:#eef0f7;font-weight:600;font-size:12px;position:sticky;top:0;z-index:1}
td.n,th.n{text-align:right;font-variant-numeric:tabular-nums}
.muted{color:#6b7392}.small{font-size:11px}
.up{color:#1f9d55}.dn{color:#c53b3b}
.pill{display:inline-block;padding:1px 7px;border-radius:10px;font-size:11px;background:#eef0f7}
.pill.g{background:#d6f5e2;color:#136b39}.pill.r{background:#fde0e0;color:#9b2323}.pill.y{background:#fff1cc;color:#7a5600}
.bar{height:7px;background:#e3e6f0;border-radius:4px;overflow:hidden}
.bar i{display:block;height:100%;background:#3a4f8f}
.split{display:flex;gap:10px;min-height:100%}
.split>.l{width:210px;flex-shrink:0;overflow:auto;max-height:calc(100vh - 220px)}
.split>.r{flex:1;min-width:0}
.li{padding:6px 8px;border-radius:6px;cursor:pointer;border-bottom:1px solid #eceef5}
.li:hover{background:#e9ecf6}.li.on{background:#d3d9f0}.li.unread{font-weight:700}
#toasts{position:fixed;right:12px;bottom:56px;display:flex;flex-direction:column;gap:6px;z-index:200000;pointer-events:none}
.toast{background:#141a33;color:#fff;padding:9px 13px;border-radius:8px;box-shadow:0 6px 20px rgba(0,0,0,.4);max-width:320px;animation:tin .25s;border-left:4px solid #7dffa8}
@keyframes tin{from{transform:translateX(30px);opacity:0}}
#overlay{position:fixed;inset:0;background:rgba(7,9,20,.88);display:flex;align-items:center;justify-content:center;z-index:300000;color:#fff}
#overlay .box{background:#1b2347;padding:28px;border-radius:14px;max-width:460px;width:92%;box-shadow:0 20px 60px #000}
#overlay h1{margin:0 0 6px;font-size:28px}
#overlay input{width:100%;padding:9px;margin:10px 0;font-size:15px}
#overlay p{color:#c5cbe8}
.badge{background:#ff4d4d;color:#fff;border-radius:9px;padding:0 6px;font-size:10px;margin-left:4px}
canvas{max-width:100%;display:block}
.note{background:#fffbe6;border:1px solid #f0e2a8;border-radius:8px;padding:8px;margin-bottom:8px;font-size:12px}
.note.r{background:#fde0e0;border-color:#f3b5b5}
.acct{display:flex;gap:14px;flex-wrap:wrap;background:#fff;border:1px solid #e0e3ee;border-radius:8px;padding:8px 10px;margin-bottom:8px;align-items:center}
.acct div small{display:block;color:#6b7392;font-size:11px}
.acct div b{font-variant-numeric:tabular-nums}
.itm{background:#f1fbf5}.otm{background:#fff}
.cashc{width:190px;background:#000;color:#fff;border-radius:18px;padding:12px 14px;align-self:flex-start;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.cashc.me{align-self:flex-end}
.cashc .cl{font-size:13px;font-weight:600;opacity:.9}.cashc .cap{margin-right:3px}
.cashc .ca{font-size:30px;font-weight:700;margin:6px 0 2px;letter-spacing:-.5px}
.cashc .cs{font-size:12px;opacity:.65}
#ctx{position:fixed;z-index:400000;background:rgba(28,32,52,.97);color:#e8ebf5;border:1px solid #39416b;border-radius:9px;padding:5px;min-width:190px;box-shadow:0 14px 40px rgba(0,0,0,.5);display:none;font-size:13px}
#ctx div{padding:6px 12px;border-radius:5px;cursor:pointer}#ctx div:hover{background:#3a4f8f}#ctx hr{border:0;border-top:1px solid #39416b;margin:4px 0}#ctx div.dis{opacity:.4;pointer-events:none}
.icon.sel{background:rgba(120,160,255,.28);outline:1px solid rgba(160,190,255,.7)}
#marq{position:fixed;border:1px solid #8fb0ff;background:rgba(125,162,255,.18);z-index:9;pointer-events:none}
#writem{position:fixed;inset:0;background:rgba(7,9,20,.6);display:none;align-items:center;justify-content:center;z-index:350000}#writem .wm{background:#f5f6fa;border-radius:12px;padding:16px;width:min(560px,92vw);box-shadow:0 20px 60px #000;display:flex;flex-direction:column;gap:10px}#writem textarea{width:100%;height:170px;border:1px solid #c5cbe0;border-radius:8px;padding:10px;font:13px system-ui;resize:vertical}

.wbody.hassplit{display:flex;flex-direction:column;overflow:hidden}.wbody.hassplit>*{flex-shrink:0}.wbody.hassplit>.split{flex:1 1 auto;min-height:0}.wbody.hassplit>.split>.l,.wbody.hassplit>.split>.r{overflow:auto;max-height:none;min-height:0}

.slot{display:flex;gap:12px;align-items:center;background:#24305c;border-radius:10px;padding:10px;margin-bottom:8px}.slot canvas{image-rendering:pixelated;background:#303d73;border-radius:8px}
#overlay .box.cc{max-width:900px;width:96%;max-height:94vh;overflow:auto}.cc input{width:auto;flex:1;margin:0}.ccprev{width:200px;height:296px;background:linear-gradient(#3b4b8a,#26305e);border-radius:12px;display:flex;align-items:center;justify-content:center}.ccprev canvas{image-rendering:pixelated}
.ccgrid{display:grid;grid-template-columns:110px 1fr;gap:8px 10px;margin-top:12px;align-items:center}.ccl{color:#9aa3c7;font-size:12px}.cc select{padding:3px}
.chip{display:inline-block;padding:4px 10px;border-radius:999px;background:#2c3a70;margin:0 4px 4px 0;cursor:pointer;font-size:12px}.chip.on{background:#3b5bdb;color:#fff}
body.inroom #desk,body.inroom #icons,body.inroom #wins,body.inroom #taskbar,body.inroom #startpop,body.inroom #calpop{display:none!important}
#room3d{position:fixed;inset:0;display:none;z-index:1;background:#000}body.inroom #room3d{display:block}
#roomhud{position:fixed;left:16px;top:14px;color:#fff;font:600 14px system-ui;text-shadow:0 1px 3px #000;z-index:5;pointer-events:none;display:none}body.inroom #roomhud{display:block}
#roomprompt{position:fixed;left:50%;bottom:16%;transform:translateX(-50%);background:rgba(10,14,30,.72);color:#fff;padding:8px 16px;border-radius:10px;font:600 14px system-ui;display:none;z-index:6;pointer-events:none;border:1px solid rgba(255,255,255,.15)}
#roomxh{position:fixed;left:50%;top:50%;width:6px;height:6px;margin:-3px 0 0 -3px;border-radius:50%;background:rgba(255,255,255,.75);z-index:6;pointer-events:none;display:none}body.inroom #roomxh{display:block}
#roomhelp{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);color:#fff;background:rgba(10,14,30,.65);padding:14px 22px;border-radius:12px;font:14px system-ui;z-index:7;text-align:center;display:none}
body.title #taskbar,body.title #icons,body.title #wins{display:none!important}
body:not(.inroom) #roomprompt,body:not(.inroom) #roomhelp{display:none!important}

/* ---- pixel art style ---- */
*{font-family:'DotGothic16',system-ui,sans-serif!important;border-radius:0!important;letter-spacing:.02em}
canvas,img{image-rendering:pixelated;image-rendering:crisp-edges}
#wcv{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated}
#roomhud{background:#10131f;border:2px solid #f1f3f5;box-shadow:3px 3px 0 #000;padding:5px 9px;font-size:15px!important;text-shadow:none}
#roomprompt{background:#10131f!important;border:2px solid #f1f3f5!important;box-shadow:3px 3px 0 #000;font-size:16px!important;bottom:12%!important}
#roomhelp{top:auto!important;bottom:22px;transform:translateX(-50%)!important;background:#10131f!important;border:2px solid #f1f3f5;box-shadow:3px 3px 0 #000;font-size:14px!important;padding:6px 12px!important}
.win,.tb,button,input,select,textarea{box-shadow:none}
.win{border:2px solid #10131f!important;box-shadow:4px 4px 0 rgba(0,0,0,.45)!important}

/* phone */
#phone{position:fixed;right:28px;bottom:26px;z-index:30;transform:translateY(calc(100% + 60px));opacity:0;pointer-events:none;transition:transform .42s cubic-bezier(.2,.85,.25,1),opacity .3s}#phone.on{transform:translateY(0);opacity:.93;pointer-events:auto}body:not(.inroom) #phone{display:none}
.ph-frame{width:330px;height:650px;max-height:calc(100vh - 52px);background:#0e0f13;border-radius:50px;padding:11px;box-shadow:0 18px 50px rgba(0,0,0,.6),inset 0 0 0 2px #2c2f38;display:flex;flex-direction:column;position:relative}
.ph-notch{position:absolute;left:50%;top:18px;width:86px;height:22px;margin-left:-43px;background:#000;border-radius:12px;z-index:2}
.ph-top{display:flex;justify-content:space-between;padding:8px 22px 6px;color:#f1f3f5;font-size:12px;background:#f4f6fb;color:#1b1e2a;border-radius:32px 32px 0 0}
#ph-body{flex:1;overflow:hidden;background:#f4f6fb;display:flex;flex-direction:column}
.ph-bar{height:22px;background:#f4f6fb;border-radius:0 0 32px 32px;position:relative;cursor:pointer}.ph-bar:after{content:'';position:absolute;left:50%;top:8px;width:110px;height:5px;margin-left:-55px;border-radius:3px;background:#1b1e2a}
.ph-wall{flex:1;background:linear-gradient(170deg,#3b5bdb 0%,#7048e8 55%,#e8590c 130%);color:#fff;padding:26px 14px 10px;display:flex;flex-direction:column}
.ph-time{font-size:46px;text-align:center;line-height:1}.ph-date{text-align:center;opacity:.85;margin-bottom:20px}
.ph-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px 6px}
.ph-icon{background:none;border:0;color:#fff;display:flex;flex-direction:column;align-items:center;gap:4px;cursor:pointer;font:inherit}
.ph-ic{width:52px;height:52px;border-radius:14px;background:rgba(255,255,255,.92);display:flex;align-items:center;justify-content:center;font-size:26px;position:relative;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.ph-ic i{position:absolute;right:-5px;top:-5px;background:#e03131;color:#fff;font:600 11px system-ui;font-style:normal;border-radius:9px;padding:1px 5px}
.ph-lb{font-size:11px;text-shadow:0 1px 2px rgba(0,0,0,.5)}.ph-model{margin-top:auto;text-align:center;font-size:11px;opacity:.6}
.ph-head{display:flex;align-items:center;gap:8px;padding:6px 10px;border-bottom:1px solid #e0e3ee;background:#fff}
.ph-back{border:0;background:none;font-size:26px;line-height:1;cursor:pointer;color:#3b5bdb;padding:0 6px}
.ph-app{flex:1;overflow:auto;padding:10px;font-size:12px}.ph-app table{font-size:11px;width:100%}.ph-app .grid{grid-template-columns:1fr 1fr!important}.ph-app input{max-width:100%}.ph-app .row{flex-wrap:wrap}
.ph-app .split,.ph-app .hassplit{display:block!important}

.ph-screen{flex:1;display:flex;flex-direction:column;border-radius:40px;overflow:hidden;position:relative;min-height:0}
.ph-app.list .split>.r,.ph-app.detail .split>.l{display:none!important}.ph-app .split>.l,.ph-app .split>.r{width:auto!important;border:0!important;max-height:none!important}
.ph-app .bubbles{max-height:none}
.st-acts{display:flex;flex-direction:column;gap:4px;align-items:stretch}.st-acts .btn,.st-acts button{margin:0}
.igrid .card[data-act=stview]{min-width:0}
#escmenu{position:fixed;inset:0;background:rgba(8,10,20,.6);backdrop-filter:blur(3px);z-index:200000;display:none;align-items:center;justify-content:center}#escmenu.on{display:flex}
.esc-box{background:#f4f6fb;border-radius:16px;padding:26px 30px;width:300px;display:flex;flex-direction:column;gap:10px;box-shadow:0 20px 60px rgba(0,0,0,.5);text-align:center}.esc-box h2{margin:0 0 6px}
.esc-b{font:inherit;font-size:15px;padding:11px;border-radius:10px;border:1px solid #c5cbe0;background:#fff;cursor:pointer}.esc-b:hover{background:#3b5bdb;color:#fff;border-color:#3b5bdb}
#talkbar{position:fixed;left:50%;bottom:64px;transform:translateX(-50%);z-index:60;display:none}
#talkbar.on{display:block}
#talkbar input{width:min(520px,80vw);padding:9px 14px;border-radius:10px;border:1px solid #4dabf7;background:rgba(15,17,22,.92);color:#f1f3f5;font:14px DotGothic16,monospace;outline:none;box-shadow:0 6px 24px rgba(0,0,0,.45)}
.ct-list{display:flex;flex-direction:column;gap:6px}
.ct-row{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:10px;background:rgba(255,255,255,.04)}
.ct-av{width:30px;height:30px;border-radius:50%;background:#364fc7;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;flex:none}
.ct-main{flex:1;min-width:0}
.ct-main b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ct-bar{height:4px;border-radius:2px;background:rgba(255,255,255,.12);margin:4px 0 2px;overflow:hidden}
.ct-bar i{display:block;height:100%}
.msg-tabs{display:flex;gap:4px;margin-bottom:8px}
.msg-tabs button{flex:1;padding:5px 0;border-radius:8px;border:1px solid rgba(255,255,255,.12);background:transparent;color:inherit;font:inherit;cursor:pointer}
.msg-tabs button.on{background:#364fc7;border-color:#364fc7;color:#fff}
