/* ANSEM RUN V39 — professional, compact dashboard; no changes to the canvas. */
#ansem-dashboard-v39,#ansem-dashboard-v39 *{box-sizing:border-box}
#ansem-dashboard-v39{font:12px/1.45 system-ui,-apple-system,'Segoe UI',sans-serif;color:#f3eaff}
#ansem-dashboard-v39 [hidden]{display:none!important}
#v39-open{position:fixed;top:max(101px,calc(env(safe-area-inset-top) + 101px));right:max(8px,env(safe-area-inset-right));z-index:2147483646;min-height:41px;min-width:126px;padding:10px 11px;border:1px solid #75608c;border-radius:10px;background:#1b1327;color:#ead7ff;font:600 10px system-ui;letter-spacing:.055em;cursor:pointer;touch-action:manipulation}
#v39-open:hover{border-color:#b599dd}
#v39-overlay{position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;padding:max(12px,env(safe-area-inset-top)) max(9px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left));background:rgba(5,4,9,.92);overflow:auto;touch-action:auto}
#v39-dialog{width:min(100%,535px);max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;border:1px solid #4d3d61;border-radius:19px;padding:22px 20px 17px;background:linear-gradient(158deg,#21162e,#110d1a 54%,#0d0a13);box-shadow:0 26px 85px #000b}
#v39-dialog .v39-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
#v39-dialog .v39-kicker{color:#b8a2d0;letter-spacing:.17em;font-size:9px;font-weight:550}
#v39-dialog h2{margin:4px 0 4px;font-size:29px;font-weight:590;letter-spacing:-.055em;line-height:1.2;color:#f4eaff}
#v39-dialog .v39-title-stop{color:#be95e8}
#v39-player-state{font-size:10px;letter-spacing:.08em;color:#c9b6db;margin:0}
#v39-close{appearance:none;border:1px solid #675277;border-radius:10px;background:#30223d;color:#f6e9ff;cursor:pointer;font-size:24px;width:40px;height:40px;flex:none;touch-action:manipulation}
#v39-dialog .v39-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:18px 0 12px}
#v39-dialog .v39-stat{min-width:0;background:#241930;border:1px solid #463753;border-radius:13px;padding:12px 10px 11px}
#v39-dialog .v39-stat small,#v39-dialog .v39-split small{display:block;font-size:9px;letter-spacing:.055em;color:#b4a0c4}
#v39-dialog .v39-stat strong{display:block;color:#f5e9ff;font-weight:575;font-size:25px;letter-spacing:-.035em;margin-top:8px;font-variant-numeric:tabular-nums;white-space:nowrap}
#v39-dialog .v39-wallet-box{border:1px solid #4e405e;border-radius:13px;background:#17121f;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px}
#v39-dialog .v39-wallet-box>div:first-child{min-width:0}
#v39-dialog .v39-wallet-box span{display:block;color:#aa92bd;letter-spacing:.1em;font-size:9px}
#v39-dialog .v39-wallet-box strong{display:block;color:#ede0fd;font-size:12px;font-weight:550;letter-spacing:.03em;margin:4px 0;overflow-wrap:anywhere}
#v39-dialog .v39-wallet-box small{display:block;color:#a9bfb2;font-size:9px;line-height:1.4}
#v39-dialog .v39-split{display:grid;grid-template-columns:1fr 1fr;gap:6px;flex-shrink:0}
#v39-dialog .v39-split>div{border-left:1px solid #3e334b;padding-left:9px}
#v39-dialog .v39-split b{font-size:17px;font-weight:570;display:block;color:#ead8ff;font-variant-numeric:tabular-nums}
#v39-dialog .v39-scope{color:#ac9ebc;margin:9px 2px 18px;font-size:10px;line-height:1.5}
#v39-dialog .v39-section-header{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-bottom:10px}
#v39-dialog .v39-section-header h3{margin:0;font-size:12px;font-weight:600;letter-spacing:.1em;color:#e8dafa}
#v39-dialog .v39-section-header>span{font-size:9px;letter-spacing:.07em;color:#9787a6}
#v39-level-rows{display:grid;grid-template-columns:1fr;gap:1px;border:1px solid #33283c;border-radius:11px;overflow:hidden}
#v39-dialog .v39-row{display:grid;grid-template-columns:1fr 110px 100px;align-items:center;gap:8px;padding:9px 11px;background:#19131f;min-height:36px}
#v39-dialog .v39-row:nth-child(even){background:#1e1727}
#v39-dialog .v39-level{color:#e4d8ef;font-weight:540;letter-spacing:.05em;font-size:10px}
#v39-dialog .v39-gem-count{text-align:right;color:#d0bde3;font-size:10px;white-space:nowrap;font-variant-numeric:tabular-nums}
#v39-dialog .v39-status{text-align:right;font-size:9px;color:#91859e;white-space:nowrap}
#v39-dialog .v39-status.complete{color:#a3e1bb}
#v39-dialog .v39-note{font-size:10px;color:#b5a4c7;line-height:1.55;margin:13px 1px 0}
#v39-dialog .v39-disclaimer{font-size:10px;line-height:1.6;color:#9889a5;border-top:1px solid #382d43;margin:13px 0 0;padding-top:12px}
#ansem-dashboard-v39 button:focus-visible{outline:2px solid #e9c8ff;outline-offset:2px}
@media(max-width:400px){#v39-dialog{padding:16px 12px}#v39-dialog h2{font-size:25px}#v39-dialog .v39-stat{padding:11px 8px}#v39-dialog .v39-stat strong{font-size:22px}#v39-dialog .v39-row{grid-template-columns:1fr 85px 88px;gap:5px;padding:8px 7px}#v39-dialog .v39-wallet-box{align-items:stretch;flex-direction:column}#v39-dialog .v39-split>div:first-child{border-left:0;padding-left:0}}
@media(max-height:600px){#v39-overlay{align-items:flex-start}#v39-dialog{max-height:none}}
@media(prefers-reduced-motion:reduce){#ansem-dashboard-v39 *{transition:none!important}}

/* V39.1: visible account entry on every layout, including Level gameplay. */
#v39-open{top:max(101px,calc(env(safe-area-inset-top) + 101px))!important;bottom:auto!important;right:max(10px,env(safe-area-inset-right))!important;min-height:44px;min-width:133px;max-width:148px;border-color:#ba96e4;background:linear-gradient(155deg,#322045,#190f2b);box-shadow:0 8px 26px #000a;z-index:2147483645!important;font-size:10px}
body.ansem-profile-playing #v39-open{top:max(67px,calc(env(safe-area-inset-top) + 67px))!important}
#v39-overlay{z-index:2147483647}
#v39-dialog .v39-quick-actions{display:flex;gap:9px;margin:13px 0 18px}
#v39-dialog .v39-quick-actions button{cursor:pointer;flex:1;min-width:0;min-height:44px;border-radius:11px;padding:9px 6px;border:1px solid #8c6caf;background:#35204e;color:#f7ebff;font-size:11px;font-weight:650;touch-action:manipulation}
#v39-dialog .v39-quick-actions button:last-child{background:#67428e;border-color:#c5a0ee}
#v39-dialog .v39-quick-actions button:focus-visible{outline:2px solid white;outline-offset:2px}
@media(max-width:400px){#v39-dialog .v39-quick-actions{flex-direction:column}#v39-open{right:8px!important;min-width:115px;font-size:9px}}

/* V40.2: profile stays clear of the two-row mobile HUD. */
body.ansem-profile-playing #v39-open{top:max(86px,calc(env(safe-area-inset-top) + 86px))!important}
@media(max-width:440px){body.ansem-profile-playing #v39-open{top:max(106px,calc(env(safe-area-inset-top) + 106px))!important}}
