/* Map is the single world surface. Room context is a dismissible drawer. */
#beta-map-host{flex:1;min-height:0;display:flex;order:0}#br-live{order:2}#beta-stage{position:relative}
#beta-room-host{position:absolute;z-index:16;left:8px;right:8px;top:106px;max-height:calc(100% - 116px);height:auto;flex:none;border:1px solid #7c9582;border-radius:10px;box-shadow:0 14px 35px #00131cc9;overflow:auto;background:#172c34}
#br-room{flex:none;overflow:visible}#br-context{border-top:0}.br-room-actions{padding:8px 10px}#br-description{order:2}.br-portrait{width:35px;height:43px;border-radius:0}#br-roster{max-height:80px}.br-entity{min-height:55px}#br-roster.expanded{max-height:210px}#br-selection{flex-shrink:0}
#bm-room{font:600 20px/1.2 system-ui!important;border:0!important;background:none!important;margin:3px 0!important;padding:0!important;letter-spacing:0!important;box-shadow:none!important}#bm-room::after,#bm-room::before{display:none!important}.bm-heading{padding:10px 14px;background:#183138}.bm-heading>div{min-width:0}#bm-zone{font-size:9px;letter-spacing:1.5px}#bm-status{font-size:8px}
.bm-toolbar{padding:5px 9px;gap:5px;flex-wrap:wrap;border-bottom:1px solid #52685a}.bm-toolbar button,.bm-toolbar summary{font-size:10px;min-height:34px;padding:7px 9px}#br-drawer-toggle{margin-right:auto;color:#ffe2a4;border-color:#9a9865;background:#3a5148}#br-drawer-toggle[aria-expanded=true]{background:#806636;color:#fff4d6}
#bm-viewport{background:#2e5547;box-shadow:inset 0 0 30px #08232e33;min-height:100px}#bm-canvas{image-rendering:auto;filter:none!important;max-width:none}.bm-footer{font-size:10px;min-height:25px;padding:5px 10px}.bm-footer span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#br-feed{white-space:pre-wrap;font:12px/1.5 ui-monospace,monospace;height:76px}#br-live{min-height:0}#br-live.expanded #br-feed{height:220px}.br-event.combat{color:#f4d0a0}.br-event span{white-space:pre-wrap}#br-feed-title{white-space:nowrap}#beta-sheet{z-index:19}#beta-chat-bubbles{top:110px}
#beta-room-preview-btn{display:none!important}#beta-preview-btn{font-size:13px!important}.br-room-actions button[hidden]{display:none!important}
@media(max-width:768px){#beta-navigation>button,#beta-character-menu>summary{font-size:11px;padding:8px 12px}.bm-heading{padding:8px 11px}#bm-room{font-size:17px!important}#bm-status{font-size:6px;padding:4px}.bm-toolbar{padding:5px;gap:3px}.bm-toolbar button,.bm-toolbar summary{min-height:34px;font-size:9px;padding:6px}#bm-center{font-size:0;padding:6px 10px}#bm-center::after{content:'◎';font-size:16px}#bm-expand{font-size:0;padding:6px 10px}#bm-expand::after{content:'⛶';font-size:16px}.bm-modes button{padding:6px}#br-drawer-toggle{font-size:10px;min-width:88px}#beta-room-host{top:101px;max-height:calc(100% - 110px)}#br-feed{height:62px;font-size:11px}.br-feed-heading{padding:3px 8px}#br-live.expanded #br-feed{height:175px}body.beta-in-combat #br-feed{height:105px}.bm-footer{font-size:8px;min-height:24px}#beta-chat-bubbles{top:103px}#br-roster{max-height:66px}.br-portrait{width:31px;height:38px}}
@media(max-height:560px){.bm-heading{padding:4px 10px}#bm-zone{display:none}.bm-toolbar{padding:3px 5px}.bm-toolbar button,.bm-toolbar summary{min-height:28px}#br-feed{height:35px}.br-feed-heading{padding:2px 8px}#br-live .br-feed-heading button{min-height:22px}#beta-room-host{top:72px;max-height:calc(100% - 80px)}body.beta-in-combat #br-feed{height:50px}.bm-footer{display:none!important}}

/* Activity appears once above the world. The right rail is channels only. */
#br-live{order:-1}#beta-activity{display:none!important}#beta-chat{flex:1;min-height:0}#beta-side{gap:0}#beta-room-host{top:210px;max-height:calc(100% - 220px)}#beta-chat-bubbles{top:215px}
@media(min-width:769px){#beta-side{width:300px;max-width:29%}.beta-client #game-area{gap:10px}#br-feed{height:85px}}
@media(max-width:768px){#beta-room-host{top:198px;max-height:calc(100% - 205px)}#beta-chat-bubbles{top:195px}.beta-mobile-chat #beta-side{display:flex;width:31%;min-width:104px;max-width:155px}.beta-mobile-chat #game-area{gap:4px}.beta-mobile-chat #beta-stage{min-width:0;flex:1}.beta-mobile-chat #beta-side #beta-chat{display:flex}.beta-mobile-chat #beta-side #beta-chat>header{flex-wrap:wrap;padding:6px;gap:4px}.beta-mobile-chat #beta-side #beta-chat h2{font-size:10px}.beta-mobile-chat #beta-side #beta-chat button{font-size:8px;min-height:28px;padding:4px}.beta-mobile-chat #beta-side #channel-tabs{flex-wrap:wrap}.beta-mobile-chat #beta-side #channel-log{font-size:10px;line-height:1.5;padding:6px;overflow-wrap:anywhere}.beta-mobile-chat #bm-status{display:none}.beta-mobile-chat .bm-toolbar{gap:2px}.beta-mobile-chat #bm-room{font-size:14px!important}.beta-mobile-chat #br-effects{display:none}.beta-mobile-chat .br-feed-heading{gap:3px}.beta-mobile-chat #br-full-log{font-size:0}.beta-mobile-chat #br-full-log::after{content:'Log';font-size:9px}.beta-mobile-chat #br-drawer-toggle{min-width:85px}.beta-mobile-chat #beta-room-host{top:223px;max-height:calc(100% - 230px)}}
@media(max-height:560px){#beta-room-host,.beta-mobile-chat #beta-room-host{top:135px;max-height:calc(100% - 140px)}#beta-chat-bubbles{top:140px}}

#beta-map-panel{position:relative}#beta-room-host{order:initial}#bm-transition{background:#785e32;color:#fff2cc;border-color:#b8a066}#bm-viewport{overflow-anchor:none}

#bm-combat-map{display:none;min-height:36px;padding:7px 12px;border:1px solid #9a9865;background:#3a5148;color:#ffe2a4;border-radius:6px;font-size:11px;white-space:nowrap}
@media(max-width:768px){
 body.beta-in-combat #br-live{flex:1;min-height:130px;overflow:hidden}
 body.beta-in-combat #br-feed,body.beta-in-combat #br-live.expanded #br-feed{flex:1;height:auto!important;max-height:none;min-height:0;font-size:12px;line-height:1.65}
 body.beta-in-combat #br-feed-size{display:none}
 body.beta-in-combat #beta-map-host{flex:0 0 auto;min-height:0}
 body.beta-in-combat #beta-map-panel{flex:0 0 auto;width:100%}
 body.beta-in-combat #bm-viewport,body.beta-in-combat .bm-toolbar,body.beta-in-combat .bm-footer,body.beta-in-combat #beta-room-host{display:none!important}
 body.beta-in-combat #bm-combat-map{display:block}
 body.beta-in-combat #bm-status{display:none}
 body.beta-in-combat.beta-combat-map-visible #beta-map-host{flex:1;min-height:170px;max-height:48%}
 body.beta-in-combat.beta-combat-map-visible #beta-map-panel{flex:1}
 body.beta-in-combat.beta-combat-map-visible #bm-viewport{display:block!important}
 body.beta-in-combat.beta-combat-map-visible .bm-toolbar{display:flex!important}
 body.beta-in-combat #beta-chat-bubbles{top:8px}
}

/* Crisp controls independent of mobile font glyph coverage. */
@media(max-width:768px){#bm-expand::after{content:'';display:block;width:13px;height:13px;background:linear-gradient(currentColor,currentColor) left top/5px 2px,linear-gradient(currentColor,currentColor) left top/2px 5px,linear-gradient(currentColor,currentColor) right top/5px 2px,linear-gradient(currentColor,currentColor) right top/2px 5px,linear-gradient(currentColor,currentColor) left bottom/5px 2px,linear-gradient(currentColor,currentColor) left bottom/2px 5px,linear-gradient(currentColor,currentColor) right bottom/5px 2px,linear-gradient(currentColor,currentColor) right bottom/2px 5px;background-repeat:no-repeat}}
/* Everyday command views retain the full game readout. */
.bp-heading {display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:16px}.bp-heading p {flex:1 1 240px;margin:0;color:#a9c3c5}
.bp-tabs {display:flex;gap:6px;flex-wrap:wrap;padding-bottom:14px;border-bottom:1px solid #344d59}.bp-tabs button[aria-pressed=true] {background:#405848;border-color:#9daf70;color:#f4e6b7}
.bp-search {width:100%;box-sizing:border-box;margin:12px 0;padding:13px;background:#101f2b;border:1px solid #506b75;border-radius:9px;color:#edf4ed;font:inherit;min-height:44px}
.bp-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:12px}.bp-item,.bp-skill,.bp-group {padding:16px;background:linear-gradient(145deg,#213943,#172b36);border:1px solid #365361;border-radius:12px;min-width:0;overflow-wrap:anywhere}.bp-item h3,.bp-skill h3 {margin:7px 0 12px;font-size:1.05rem;color:#f3e5b8}.bp-item small,.bp-skill small {color:#a0bcc1}.bp-item button,.bp-skill button {margin:8px 8px 0 0}.bp-count {display:block;color:#adc5bc}.bp-group {margin:12px 0}.bp-group h3 {margin:0 0 10px;color:#dfd4a7}.bp-group p {margin:8px 0;white-space:pre-wrap;line-height:1.6}.bp-skill progress {display:block;width:100%;height:6px;accent-color:#80b693}
.bp-original {margin:18px 0;color:#acc4c8}.bp-original summary {cursor:pointer;padding:10px 0}.bp-original pre {white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;background:#0c1a25;border-radius:8px;line-height:1.5;font-size:12px}.bp-update {color:#a2c0b8;font-size:.85rem}.bp-error {color:#ffc69e;background:#4d332c;padding:12px;border-radius:8px}
.bp-dialog {box-sizing:border-box;color:#e5edeb;background:#122631;border:1px solid #6a8577;border-radius:16px;width:min(600px,calc(100% - 24px));max-height:calc(var(--beta-height,700px) - 40px);padding:20px;overflow:auto;box-shadow:0 20px 90px #0009}.bp-dialog::backdrop {background:#051018bb;backdrop-filter:blur(3px)}.bp-dialog header {display:flex;justify-content:space-between;align-items:center;gap:12px}.bp-dialog header small {color:#abc893;letter-spacing:.15em}.bp-dialog h2 {margin:6px 0 14px;font-size:1.4rem;overflow-wrap:anywhere}.bp-dialog header button {align-self:flex-start;font-size:1.4rem;min-width:44px}.bp-dialog button,#beta-sheet-body button {min-height:44px;border-radius:8px}.bp-dialog footer {margin-top:16px}.bp-dialog label {display:flex;flex-direction:column;gap:8px;color:#b8cbca;flex:1 1 100%}.bp-dialog input {box-sizing:border-box;width:100%;padding:12px;border:1px solid #527078;border-radius:8px;background:#0d1f2a;color:#f3f5eb;font:inherit}
.bp-scan-visual {position:relative;min-height:140px;display:flex;align-items:center;gap:22px;background:radial-gradient(ellipse at 20% 50%,#57795466,transparent 65%),repeating-linear-gradient(0deg,transparent 0 5px,#86c6810b 5px 6px);border-block:1px solid #517664;overflow:hidden;padding:12px}.bp-scan-visual canvas {width:80px;height:100px;object-fit:contain}.bp-scan-visual p {color:#c4e4ac;letter-spacing:.04em}.bp-scan-beam {display:none;position:absolute;left:0;right:0;height:2px;background:#b4f7ac;box-shadow:0 0 14px #9defa5}.scanning .bp-scan-beam {display:block;animation:bp-scan 1.1s ease-in-out 2 forwards}.bp-metrics {display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}.bp-metrics div {background:#223e40;border:1px solid #4c6c59;border-radius:9px;padding:14px}.bp-metrics dt {color:#acc2ac;font-size:.85rem}.bp-metrics dd {margin:8px 0 0;color:#dcffc6;font-size:1.3rem;font-variant-numeric:tabular-nums}.bp-dialog #bp-scan-actions {display:flex;gap:8px;flex-wrap:wrap}.bp-travel-choice {display:flex;flex-direction:column;gap:6px;text-align:left;padding:16px;width:100%;margin:8px 0}.bp-travel-choice strong {color:#ecdfae}.bp-travel-choice small {color:#abc3c3;line-height:1.4}.bp-travel-choice:disabled {opacity:.45}.bp-dialog form {display:flex;align-items:end;gap:10px;margin-top:16px}
@keyframes bp-scan {0%{top:0;opacity:0}25%{opacity:1}90%{opacity:1}100%{top:100%;opacity:0}}
@media(prefers-reduced-motion:reduce){.scanning .bp-scan-beam {animation:none;display:none}}
@media(max-width:768px){.bp-dialog {padding:14px}.bp-grid {grid-template-columns:1fr}.bp-item,.bp-skill,.bp-group {padding:13px}.bp-heading button {flex:1}.bm-toolbar {gap:4px}.bm-toolbar button,.bm-toolbar summary {padding-inline:9px}#bp-travel-button {order:3}}
.bp-status-values {display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:8px;margin:0}.bp-status-values div {padding:10px;background:#0e212a80;border-radius:7px}.bp-status-values dt {font-size:.8rem;color:#a3bdc0}.bp-status-values dd {margin:7px 0 0;color:#e1eab6;font-variant-numeric:tabular-nums}.bp-condition {color:#ffd18c;border-left:3px solid #d39858;padding-left:10px}
body.beta-client .bp-dialog>header,body.beta-client .bp-dialog>footer{display:flex!important;position:relative;background:none;box-shadow:none;height:auto;min-height:0;margin:0;border:0;border-image:none;text-align:left;overflow:visible}body.beta-client .bp-dialog>header::after,body.beta-client .bp-dialog>footer::after{display:none!important}body.beta-client .bp-dialog>footer{margin-top:16px}
#beta-map-panel {isolation:isolate}
body.beta-client .bp-dialog button,body.beta-client #beta-sheet-body .bp-heading button,body.beta-client #beta-sheet-body .bp-tabs button,body.beta-client #beta-sheet-body .bp-grid button,body.beta-client #beta-sheet-body>.bp-update~button {background:#294550;border:1px solid #56717b;color:#eee5c7;padding:10px 13px;font:inherit;font-size:12px;cursor:pointer}body.beta-client #beta-sheet-body .bp-tabs button[aria-pressed=true]{background:#425b48;border-color:#9aae71;color:#ffebae}body.beta-client .bp-dialog button:focus-visible,body.beta-client #beta-sheet-body button:focus-visible{outline:2px solid #edc479;outline-offset:2px}body.beta-client .bp-dialog button:disabled{cursor:default;opacity:.45}
@media(max-width:768px){#bm-center::after{content:'Fit';font-size:10px}}#beta-sheet-body .bp-skill button:disabled{opacity:.45;cursor:default}
