.bw-open-btn { color: #a8d7ed; border-color: rgba(96,165,250,.3); background: rgba(96,165,250,.08); }
.bw-open-btn svg { width: 16px; height: 16px; display: block; }
body.bw-mode .page, body.bw-mode .saved-pill { display: none; }
.bw-screen {
  --bw-ink: #e7eff2; --bw-muted: #97a9b1; --bw-border: rgba(162,191,200,.13);
  position: fixed; inset: 0; top: var(--app-viewport-top, 0px); bottom: auto;
  height: var(--app-viewport-height, 100vh); z-index: 45; color: var(--bw-ink);
  background: #0c1316; display: flex; flex-direction: column; overflow: clip;
  font-family: var(--font-body, 'Outfit', sans-serif);
}
.bw-screen[hidden], .bw-screen [hidden], .bw-menu[hidden] { display: none; }
.bw-dialog [hidden], .bw-dialog:not([open]) { display: none; }
.bw-screen svg, .bw-dialog svg, .bw-menu svg { width: 18px; height: 18px; flex-shrink: 0; }
.bw-screen button, .bw-dialog button, .bw-menu button { font: inherit; letter-spacing: 0; }
.bw-screen h1, .bw-screen h2, .bw-screen h3, .bw-dialog h2, .bw-dialog h3 { letter-spacing: 0; }
.bw-icon-btn { width: 40px; height: 40px; display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; border: 1px solid rgba(156,190,202,.16); background: rgba(255,255,255,.025); color: #a9c2cd; border-radius: 6px; }
.bw-icon-btn:hover { border-color: #5b8898; background: rgba(112,195,219,.08); color: #d2f0f6; }
.bw-online { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #93c2ac; margin-left: auto; white-space: nowrap; }
.bw-online::before { content: ''; width: 6px; height: 6px; background: #6ec7a0; border-radius: 50%; }
.bw-screen select, .bw-dialog input, .bw-dialog select, .bw-dialog textarea { min-width: 0; border: 1px solid rgba(156,190,202,.2); color: #d5e6ed; background: #101f26; border-radius: 6px; padding: 10px 11px; font: inherit; font-size: 13px; }
.bw-screen select option, .bw-dialog select option { background: #101f26; color: #e7eff2; }
.bw-screen input:focus, .bw-screen textarea:focus, .bw-screen select:focus, .bw-dialog input:focus, .bw-dialog textarea:focus, .bw-dialog select:focus { outline: 2px solid rgba(99,175,206,.4); outline-offset: 2px; }
.bw-profile-button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; color: #d4e3e9; padding: 10px 8px; border-top: 1px solid var(--bw-border); font-size: 13px; }
.bw-profile-button small { color: #7f9aa6; font-size: 11px; margin-top: 3px; }
.bw-avatar { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 6px; background: #203940; color: #a7d9d2; border: 1px solid #31555c; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.bw-text-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #9dc9d9; padding: 7px 0; font-size: 12px; white-space: nowrap; }
.bw-text-btn:hover { color: #d1f0f5; }
.bw-story { padding: 18px; border-radius: 8px; border: 1px solid #263941; background: rgba(23,37,44,.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color 250ms, background 250ms; min-width: 0; }
.bw-story:hover { border-color: #446f84; background: rgba(29,49,59,.74); }
.bw-story-top { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.bw-story-top > svg { color: #79b1ca; }
.bw-story-top > span { color: #99b5c0; font-size: 11px; }
.bw-bookmark { margin-left: auto; border: 0; width: 30px; height: 30px; background: transparent; color: #8099a5; }
.bw-bookmark[aria-pressed="true"] { color: #e9bf78; }
.bw-bookmark[aria-pressed="true"] svg { fill: rgba(233,191,120,.17); }
.bw-story h3 { font-size: 15px; line-height: 1.6; font-weight: 500; overflow-wrap: anywhere; }
.bw-story-person { color: #a1bac5; font-size: 12px; margin: 9px 0; }
.bw-story-summary { color: #91a4b0; font-size: 12px; line-height: 1.8; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.bw-story-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-top: 16px; padding-top: 10px; border-top: 1px solid #273a43; }
.bw-story-foot > span { color: #738e9d; font-size: 10px; }
.bw-library-filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 4px 0 14px; }
.bw-search { display: flex; align-items: center; gap: 9px; border: 1px solid #2d434f; background: rgba(16,29,36,.9); border-radius: 6px; padding: 0 11px; min-width: 170px; flex: 1; }
.bw-search svg { color: #88a7b7; width: 16px; }
.bw-search input { min-width: 0; width: 100%; padding: 11px 0; font: inherit; font-size: 13px; color: #dce9f0; }
.bw-search input:focus { outline: 0; }
.bw-search:focus-within { border-color: #6599ad; }
.bw-filter-btn { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 9px; border: 1px solid #2c414c; border-radius: 6px; color: #99b5c3; font-size: 12px; }
.bw-filter-btn[aria-pressed="true"] { border-color: #7d653f; color: #e9bf78; background: rgba(217,163,68,.08); }
.bw-source-note { color: #7f99a4; font-size: 11px; line-height: 1.8; margin: 12px 0 20px; }
.bw-story-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.bw-empty { grid-column: 1/-1; padding: 40px 16px; text-align: center; border: 1px dashed #2b424e; border-radius: 6px; color: #8ba5b2; font-size: 13px; line-height: 1.8; }
.bw-member-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.bw-member { border: 1px solid #293e48; background: rgba(23,38,45,.55); border-radius: 8px; padding: 18px; min-width: 0; }
.bw-member-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bw-member-head h3 { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.bw-member-head small { color: #87a2ae; font-size: 11px; }
.bw-member p { color: #90a9b5; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.bw-member-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.bw-member-tags span { font-size: 10px; color: #9bb5c2; padding: 4px 6px; border-radius: 4px; border: 1px solid #2b4854; }
.bw-chat { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--bw-border); background: #101a1f; }
.bw-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 20px 9px; }
.bw-chat-head h2 { font-size: 17px; font-weight: 500; }
.bw-chat-head .bw-icon-btn { display: none; }
.bw-chat-scope { margin: 0 20px; font-size: 10px; color: #718d99; }
.bw-chat-status { min-height: 32px; padding: 10px 20px; color: #77b3a6; font-size: 10px; }
.bw-chat-status.error { color: #eda8ab; }
.bw-messages { overflow-y: auto; flex: 1; min-height: 0; padding: 8px 16px 18px; overscroll-behavior: contain; scroll-behavior: smooth; }
.bw-message { padding: 12px 0; border-bottom: 1px solid rgba(122,161,180,.08); }
.bw-message-head { display: flex; gap: 8px; align-items: center; color: #b7d0dd; font-size: 12px; }
.bw-message-head strong { font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.bw-message-head time { color: #688593; font-size: 10px; margin-left: auto; flex-shrink: 0; }
.bw-message-head button { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #728e9d; }
.bw-message-head button:hover { background: rgba(255,255,255,.05); color: #b4d3e2; }
.bw-message p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 12px; color: #a4bbc7; margin-top: 6px; }
.bw-message.mine { border-left: 2px solid #477d83; padding-left: 10px; }
.bw-message.removed p { font-style: italic; color: #667f8c; }
.bw-message .bw-text-btn { font-size: 10px; }
.bw-compose { border-top: 1px solid #243842; padding: 16px; background: #111e25; }
.bw-compose textarea { display: block; width: 100%; color: #d6e8f0; font: inherit; font-size: 13px; line-height: 1.7; resize: vertical; min-height: 66px; max-height: 160px; padding: 10px; border: 1px solid #2b4754; border-radius: 6px; background: #0c171c; }
.bw-compose textarea:disabled { opacity: .65; }
.bw-compose-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.bw-compose-foot > span { font-size: 10px; color: #688b9e; margin-left: auto; }
.bw-send { display: inline-flex; justify-content: center; align-items: center; width: 38px; height: 36px; border: 1px solid #2c6d73; border-radius: 6px; background: #205257; color: #d5f3ea; }
.bw-send:disabled { background: #172d35; border-color: #27434f; color: #617e8b; cursor: not-allowed; }
.bw-edit-banner { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #a5d0d6; margin-bottom: 10px; }
.bw-edit-banner button { color: #e2b97c; }
.bw-new-messages { margin: 8px 16px; padding: 8px; font-size: 11px; color: #c0e6e5; background: #1c4b50; border-radius: 4px; }
.bw-error { font-size: 12px; color: #f3a2ab; margin: 10px 0; line-height: 1.6; }
.bw-dialog { width: min(520px,calc(100% - 32px)); max-height: calc(var(--app-viewport-height,100vh) - 32px); margin: auto; padding: 26px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #3d5f6b; border-radius: 10px; color: #e1ecf2; background: rgba(16,30,38,.98); box-shadow: 0 24px 80px rgba(0,0,0,.6); font-family: 'Outfit',sans-serif; }
.bw-dialog::backdrop { background: rgba(5,11,16,.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bw-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bw-dialog h2 { font-size: 22px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.bw-dialog label { display: block; font-size: 12px; color: #b6cbd5; margin: 16px 0; }
.bw-dialog label > span { font-size: 10px; color: #7f97a6; }
.bw-dialog input, .bw-dialog textarea, .bw-dialog select { display: block; width: 100%; margin-top: 8px; }
.bw-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bw-primary-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; width: 100%; border: 1px solid #477d84; border-radius: 6px; background: #244f55; color: #d3f3eb; font-size: 13px; }
.bw-primary-btn:hover { background: #30666a; }
.bw-primary-btn:disabled { opacity: .5; cursor: wait; }
.bw-leave { display: block; margin: 18px auto 0; color: #b69196; font-size: 12px; padding: 8px; }
.bw-story-dialog { width: min(650px,calc(100% - 32px)); }
.bw-story-reader-meta { color: #9dbaca; font-size: 13px; line-height: 1.7; margin: 16px 0; }
.bw-story-reader-summary { font-size: 15px; line-height: 2; white-space: pre-wrap; overflow-wrap: anywhere; color: #bed0da; }
.bw-takeaway { margin: 24px 0; padding: 14px 0 14px 16px; border-left: 2px solid #6ba59d; color: #b5dccf; font-size: 14px; line-height: 1.9; }
.bw-story-reader-links { display: flex; flex-wrap: wrap; gap: 16px; margin: 22px 0; }
.bw-story-reader-links a { display: inline-flex; align-items: center; gap: 7px; color: #a1c9dd; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.bw-menu { position: fixed; z-index: 110; width: 164px; padding: 6px; border: 1px solid #3a5c6c; border-radius: 6px; background: #13252e; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.bw-menu button { display: flex; gap: 8px; align-items: center; padding: 10px; width: 100%; border-radius: 4px; color: #b7d2de; font-size: 12px; text-align: left; }
.bw-menu button:hover { background: #203a46; }
.bw-menu button[data-action="remove"] { color: #e4a3ab; }


/* Same full-bleed, infinite canvas model as the Marketing workspace. */
.bw-screen { background: #071211; overflow: clip; }
.bw-header { position:absolute; top:0; left:0; right:0; z-index:5; display:flex; align-items:center; gap:14px; padding:14px 20px; background:linear-gradient(180deg,rgba(6,16,15,.98),rgba(6,16,15,.66),transparent); pointer-events:none; }
.bw-header > * { pointer-events:auto; }
.bw-back { order:0; display:flex; align-items:center; gap:6px; min-height:40px; padding:8px 12px; color:#9cc7bc; background:rgba(6,20,18,.86); border:1px solid #31594f; border-radius:6px; font-size:12px !important; }
.bw-heading { order:1; min-width:0; }
.bw-heading h1 { font-family:var(--font-display); font-size:20px; font-weight:600; line-height:1.3; color:#def1eb; }
.bw-heading > span { font-family:var(--font-script); font-size:17px; color:#78c5ac; line-height:1.2; }
.bw-world-nav { order:2; display:flex; align-items:center; gap:4px; margin-left:12px; padding:3px; background:rgba(6,20,18,.94); border:1px solid #26483d; border-radius:7px; min-width:0; backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
.bw-world-nav select { width:174px; min-width:0; border:0; padding:7px; background:transparent; color:#c4e1d6; }
.bw-tabs { display:flex; align-items:center; gap:4px; padding-left:4px; border-left:1px solid #2a4036; }
.bw-tabs button { display:flex; align-items:center; justify-content:center; width:36px; height:36px; color:#96b7ad; border-radius:5px; }
.bw-tabs button:hover,.bw-tabs button[aria-pressed="true"] { color:#cbebde; background:rgba(80,148,121,.15); }
.bw-online { order:3; margin-left:auto; color:#a0c6b2; }
.bw-profile-button { order:4; width:40px; height:40px; padding:0; justify-content:center; border:0; }
.bw-profile-button > div { display:none; }
.bw-header > #bwChatToggle { order:5; }
.bw-canvas-main,.bw-world-view,.bw-map-viewport { position:absolute; inset:0; overflow:clip; }
.bw-map-viewport { touch-action:none; cursor:grab; background-image:linear-gradient(rgba(95,136,115,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(95,136,115,.055) 1px,transparent 1px); background-size:40px 40px; }
.bw-map-viewport:active { cursor:grabbing; }
.bw-map-world { position:absolute; left:0; top:0; width:6000px; height:3300px; transform-origin:0 0; }
.bw-map-world > img { position:absolute; left:-200px; top:-220px; width:6300px; height:3100px; opacity:.64; pointer-events:none; user-select:none; }
.bw-routes { position:absolute; inset:0; width:6000px !important; height:3300px !important; pointer-events:none; }
.bw-routes path { fill:none; stroke-width:3; opacity:.62; stroke-dasharray:7 8; filter:drop-shadow(0 0 5px rgba(108,208,165,.36)); }
.bw-node { position:absolute; border:1px solid color-mix(in srgb,var(--pin-color) 44%,transparent); border-radius:8px; background:linear-gradient(140deg,color-mix(in srgb,var(--pin-color) 12%,rgba(7,23,19,.96)),rgba(7,21,19,.94)); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); box-shadow:0 12px 30px rgba(0,0,0,.34),0 0 18px color-mix(in srgb,var(--pin-color) 9%,transparent),inset 0 1px 0 rgba(255,255,255,.05); }
.bw-node:hover { border-color:color-mix(in srgb,var(--pin-color) 70%,transparent); }
.bw-district { width:280px; min-height:220px; padding:20px; }
.bw-district.selected { border-color:var(--pin-color); box-shadow:0 12px 40px rgba(0,0,0,.4),0 0 24px color-mix(in srgb,var(--pin-color) 15%,transparent); }
.bw-district-head { display:flex; align-items:center; gap:8px; margin-bottom:10px; color:var(--pin-color); }
.bw-district-head .bw-eyebrow { color:var(--pin-color); }
.bw-district h2 { font-family:var(--font-display); font-size:20px; font-weight:600; line-height:1.4; color:#e3efe8; }
.bw-district-copy { font-size:12px; line-height:1.7; color:#a0b7aa; margin:8px 0; min-height:40px; }
.bw-pin-count { color:#89a392; font-size:11px; }
.bw-world-members { display:flex; gap:4px; margin-top:10px; }
.bw-world-members:empty { display:none; }
.bw-world-members .bw-avatar { width:26px; height:26px; font-size:10px; border-color:color-mix(in srgb,var(--pin-color) 25%,transparent); color:var(--pin-color); background:rgba(13,29,21,.8); }
.bw-node-actions { display:flex; gap:6px; margin-top:14px; border-top:1px solid rgba(143,187,152,.13); padding-top:10px; }
.bw-node-actions .bw-icon-btn { width:34px; height:32px; color:#a6c5b2; background:rgba(8,20,15,.5); border-color:rgba(133,177,145,.18); }
.bw-world-story { width:320px; height:250px; padding:18px; overflow:hidden; }
.bw-world-story h3 { font-size:15px; line-height:1.5; min-height:45px; max-height:68px; overflow:hidden; }
.bw-world-story .bw-story-summary { -webkit-line-clamp:2; }
.bw-world-story .bw-story-foot { position:absolute; bottom:12px; left:18px; right:18px; }
.bw-world-member { width:250px; height:160px; padding:16px; overflow:hidden; }
.bw-world-member h3 { font-size:15px; font-weight:500; }
.bw-world-member small { color:#a2b8a9; font-size:11px; }
.bw-world-member p { color:#8eaa96; font-size:12px; line-height:1.6; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.bw-world-member .bw-text-btn { position:absolute; left:16px; bottom:10px; }
.bw-map-controls { position:absolute; right:18px; bottom:max(18px,env(safe-area-inset-bottom)); z-index:5; display:flex; gap:4px; align-items:center; padding:4px; border:1px solid #2b4a3c; border-radius:6px; background:rgba(6,20,15,.94); backdrop-filter:blur(12px); }
.bw-map-controls span { min-width:42px; text-align:center; color:#9db7a8; font-size:11px; }
.bw-overview { position:absolute; left:18px; bottom:max(18px,env(safe-area-inset-bottom)); z-index:4; border:1px solid #2a4c3b; background:rgba(6,20,15,.92); border-radius:6px; padding:8px; }
.bw-overview > span { display:block; font-size:9px; color:#8cb49c; margin-bottom:4px; }
.bw-overview canvas { display:block; width:180px; height:105px; cursor:pointer; }
.bw-map-caption { position:absolute; bottom:max(20px,env(safe-area-inset-bottom)); left:238px; font-size:10px; color:#789888; pointer-events:none; }
.bw-panel { position:absolute; z-index:7; top:calc(var(--bw-header-height,76px) + 12px); right:18px; bottom:max(18px,env(safe-area-inset-bottom)); width:min(680px,calc(100% - 36px)); padding:20px; overflow-y:auto; overscroll-behavior:contain; border:1px solid #365849; border-radius:8px; background:rgba(9,27,22,.97); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); box-shadow:0 20px 60px rgba(0,0,0,.5); }
.bw-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; position:sticky; top:-20px; padding:8px 0; z-index:2; background:#091b16; }
.bw-panel-head h2 { font-family:var(--font-display); font-size:20px; font-weight:600; }
.bw-library-meta { display:flex; justify-content:space-between; gap:8px; align-items:center; margin:12px 0 18px; }
.bw-library-meta .bw-source-note { margin:0; }
.bw-library-meta > span { color:#86a395; font-size:11px; white-space:nowrap; }
.bw-chat { position:absolute; z-index:8; right:18px; top:calc(var(--bw-header-height,76px) + 12px); bottom:max(18px,env(safe-area-inset-bottom)); width:360px; border:1px solid #365849; border-radius:8px; background:rgba(8,26,22,.97); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); box-shadow:0 20px 60px rgba(0,0,0,.5); overflow:hidden; }
.bw-chat-head .bw-icon-btn { display:inline-flex; }
.bw-chat-head { padding:18px 18px 10px; }
#bwCategoryRoom { margin:0 16px 10px; width:calc(100% - 32px); }
.bw-chat-scope { margin:0 18px; }
.bw-compose { background:rgba(10,30,24,.95); }
.bw-compose textarea { background:#091d18; border-color:#2d5243; }
.bw-send { border-color:#376c50; background:#285840; }
.bw-dialog { background:rgba(11,31,25,.98); border-color:#3b6a52; }
.bw-dialog input,.bw-dialog textarea,.bw-dialog select { background:#10261e; border-color:#345d47; }
.bw-dialog::backdrop { background:rgba(3,13,9,.72); }
.bw-menu { background:#132b21; border-color:#3b624b; }
.bw-short .bw-chat { overflow-y:auto; overscroll-behavior:contain; }
.bw-short .bw-chat-head { position:sticky; top:0; z-index:2; background:#081a16; flex-shrink:0; }
.bw-short .bw-chat > select,.bw-short .bw-chat-scope,.bw-short .bw-chat-status,.bw-short .bw-compose { flex-shrink:0; }
.bw-short .bw-messages { flex:none; max-height:240px; min-height:120px; }
@media (pointer:coarse) {
  .bw-screen input,.bw-screen textarea,.bw-screen select,.bw-dialog input,.bw-dialog select,.bw-dialog textarea { font-size:16px; }
  .bw-icon-btn,.bw-send,.bw-tabs button,.bw-message-head button { min-width:44px; min-height:44px; }
}
@media (max-width:1100px) {
  .bw-header { flex-wrap:wrap; gap:10px; }
  .bw-online { display:none; }
}
@media (max-width:760px) {
  .bw-header { display:grid; grid-template-columns:44px minmax(0,1fr) 44px 44px; gap:8px; padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left)); background:rgba(6,19,14,.95); }
  .bw-back { padding:8px; justify-content:center; height:44px; width:44px; }
  .bw-back span { display:none; }
  .bw-heading h1 { font-size:16px; }
  .bw-heading > span { font-size:14px; }
  .bw-world-nav { grid-row:2; grid-column:1/-1; margin:0; width:100%; }
  .bw-world-nav select { flex:1; width:0; font-size:16px; min-height:44px; text-overflow:ellipsis; }
  .bw-tabs { padding-left:0; gap:0; }
  .bw-tabs button { width:44px; height:44px; }
  .bw-profile-button { height:44px; width:44px; }
  .bw-profile-button .bw-avatar { width:38px; height:38px; }
  .bw-icon-btn,.bw-bookmark,.bw-message-head button,.bw-send { width:44px; min-width:44px; height:44px; }
  .bw-node-actions .bw-icon-btn { width:36px; min-width:36px; height:36px; }
  .bw-world-story { padding:16px; }
  .bw-world-story .bw-story-top { margin-bottom:8px; }
  .bw-world-story .bw-story-summary { -webkit-line-clamp:2; }
  .bw-panel,.bw-chat { top:calc(var(--bw-header-height,126px) + 10px); left:max(10px,env(safe-area-inset-left)); right:max(10px,env(safe-area-inset-right)); bottom:max(10px,env(safe-area-inset-bottom)); width:auto; }
  .bw-panel { padding:16px; }
  .bw-panel-head { top:-16px; }
  .bw-story-grid,.bw-member-grid { grid-template-columns:1fr; }
  .bw-library-filters { gap:8px; }
  .bw-search { flex-basis:100%; }
  .bw-library-filters select { flex:1; width:110px; }
  .bw-screen input,.bw-screen textarea,.bw-screen select,.bw-dialog input,.bw-dialog select,.bw-dialog textarea { font-size:16px; }
  .bw-chat-head { padding:12px 14px 8px; }
  .bw-chat-status { padding:8px 18px; }
  .bw-compose { padding:10px 12px; }
  .bw-map-controls { right:max(12px,env(safe-area-inset-right)); bottom:max(12px,env(safe-area-inset-bottom)); gap:2px; }
  .bw-map-controls span { min-width:34px; }
  .bw-overview { left:max(12px,env(safe-area-inset-left)); bottom:max(12px,env(safe-area-inset-bottom)); padding:5px; }
  .bw-overview canvas { width:110px; height:65px; }
  .bw-map-caption { bottom:max(80px,env(safe-area-inset-bottom)); left:146px; right:14px; text-align:right; font-size:9px; }
  .bw-dialog { width:calc(100% - 24px); padding:20px; top:calc(var(--app-viewport-top,0px) + 12px); bottom:auto; margin:0 auto; }
  .bw-form-row { grid-template-columns:1fr; gap:0; }
  .bw-primary-btn,.bw-filter-btn { min-height:44px; }
  .bw-menu button { min-height:44px; }
}
@media (max-width:380px) {
  .bw-heading h1 { font-size:14px; }
  .bw-heading > span { font-size:12px; }
  .bw-overview canvas { width:88px; height:54px; }
  .bw-map-caption { left:125px; }
}
@media (prefers-reduced-motion:reduce) { .bw-screen *, .bw-dialog *, .bw-menu * { transition:none !important; scroll-behavior:auto; } }
