/* Compact UI. One content flow, one navigation model in both orientations.
   The named layer contains the structural overrides needed by legacy desktop scenes. */
html:not(.bplus) .bplus-only{display:none!important}
.bubble,.chapter-content,.scene-content{display:contents}
.icon{stroke-width:1.7}
.wordmark b[lang=en]{font:600 20px/1.15 Bricolage,sans-serif;letter-spacing:-.015em}
.wordmark small{display:flex;align-items:center;gap:8px;font:12px/1.5 Noto,sans-serif;letter-spacing:.04em;margin-top:7px;color:#c9d0cc}
.wordmark small em{font:600 12px/1 Noto,sans-serif;font-style:normal;color:var(--gold);border:1px solid var(--gold);border-radius:20px;padding:3px 7px}
.arrow{display:inline-flex;align-items:center;justify-content:center;flex:none;color:var(--gold)}
.arrow .icon{width:18px;height:18px}
.disclosure-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none}
.disclosure-summary::-webkit-details-marker{display:none}
.disclosure-summary::marker{content:''}
.disclosure-summary>.icon{flex:none}
details[open]>.disclosure-summary>.icon{transform:rotate(180deg)}
.map-link{display:inline-flex;align-items:center;gap:8px;min-height:44px}
#maruHelpList:empty{display:none}
.maru-help-list{display:flex;flex-direction:column;gap:8px;margin-top:16px}
.maru-help-list button{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:12px;border-radius:12px;background:#ffffff0d;border:1px solid #ffffff20;text-align:left;font-size:15px;line-height:1.6}
.maru-help-label{font-size:13px;color:#c9d3c9}
.sheet-handle{display:none}
/* Keep movement controls together and secondary actions visually separate. */
body:not([data-scene=room]) .room-caption{display:none!important}
body[data-scene=room] #roomButton{display:none}
.icon-control{display:inline-grid;place-items:center;flex:none;width:48px;min-width:48px;min-height:48px;padding:0;border-radius:50%;color:var(--gold)}
.icon-control .icon{width:20px;height:20px}
.icon-control[aria-pressed=true]{background:#e8c89120;box-shadow:inset 0 0 0 1px #e8c89166}
.guide-actions{display:flex;align-items:center;gap:16px}
.guide-playback,.tree-view-controls,.room-view-controls{display:flex;align-items:center;gap:4px;flex:none}
.guide-playback,.tree-view-controls{padding:3px;border:1px solid var(--line);border-radius:30px;background:#ffffff05}
#guideControls .guide-arrow{display:grid;place-items:center;width:48px;min-width:48px;min-height:48px;padding:0;border-radius:50%}
#guideControls #guideSkip{padding:0 0 0 20px;border-left:1px solid var(--line);white-space:nowrap}
.tree-controls{gap:12px;flex-wrap:wrap}
.tree-view-controls>button,.room-view-controls>button{display:grid;place-items:center;min-width:44px;min-height:44px;margin:0;padding:0;border:0;border-radius:50%;color:var(--gold)}
.tree-controls>[data-note]{border:0;padding:0 4px;margin:0}
.room-view-controls #roomReset{margin-left:8px;border-left:1px solid var(--line);border-radius:0;padding-left:8px;min-width:52px}
.story-navigation{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:28px}
.story-nav{display:flex;align-items:center;gap:4px;padding:3px;border:1px solid var(--line2);border-radius:30px;background:#ffffff05}
.story-tools{display:flex;align-items:center;gap:8px;margin-left:auto;padding-left:12px;border-left:1px solid var(--line2)}
.story-start .story-nav{width:100%;padding:0;border:0;background:none}
.story-start .story-nav .solid-button{flex:1}
.story-start .story-tools{border:0;padding:0}
.chapter-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px;font-size:13px;color:var(--muted)}
.chapter-heading button{min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:24px;color:var(--gold)}
#donutButton{display:grid;place-items:center;position:relative;width:48px;height:48px;border-radius:50%;color:var(--gold)}
#donutButton svg{width:26px;height:26px}
#donutCount{position:absolute;top:4px;right:2px;min-width:18px;height:18px;border-radius:9px;background:var(--gold);color:var(--ink);font:700 11px/18px Noto,sans-serif}
#donutCount[data-zero]{display:none}

/* Menu remains a complete, scrollable dialog even when a desktop breakpoint is crossed. */
dialog#quickMenu{position:fixed;inset:16px;margin:auto;width:min(560px,calc(100% - 32px));height:max-content;max-height:calc(var(--vvh,100dvh) - 32px);padding:0;border:1px solid #526157;border-radius:24px;background:#142332;color:#f6efe3;overflow:hidden}
dialog#quickMenu[open]{display:flex;flex-direction:column}
#quickMenu::backdrop{background:#07121bb3;backdrop-filter:blur(4px)}
#quickMenu .qm-head{flex:none;display:flex;align-items:center;gap:12px;padding:14px 16px 12px 24px;border-bottom:1px solid #ffffff1c}
#quickMenu .qm-head h2{flex:1;margin:0;font-size:20px}
#quickMenu .qm-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 20px 24px;scroll-padding:16px}
.qm-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}
.qm-tile{position:relative;display:flex;align-items:center;gap:10px;min-height:60px;padding:12px;border:1px solid #ffffff20;border-radius:14px;background:#203447;text-align:left;font-size:15px;color:#f6efe3}
.qm-tile svg{flex:none;width:22px;height:22px;color:#e8c891}
.qm-badge{margin-left:auto;font-size:12px;color:#e8c891}
.qm-label{margin:24px 0 8px;font-size:13px;color:#e8c891;letter-spacing:.06em}
.qm-row{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:12px 0;border-top:1px solid #ffffff1c;text-align:left;color:#f6efe3;font-size:16px;line-height:1.5}
.qm-row>span:first-child{flex:1;min-width:0}
.qm-row small{display:block;margin-top:3px;font-size:13px;color:#c4cfce;line-height:1.6}
.qm-row svg{flex:none;width:20px;height:20px;color:#e8c891}
.qm-scenes summary{cursor:pointer;list-style:none}
.qm-scenes summary::-webkit-details-marker{display:none}
.qm-scenes[open] summary svg{transform:rotate(180deg)}
.qm-scene-list{display:flex;flex-direction:column;padding:0 0 12px}
.qm-scene-list button{display:flex;align-items:center;gap:12px;min-height:48px;padding:10px 12px;text-align:left;font-size:15px;border-radius:10px}
.qm-scene-list button[aria-current=step]{background:#e8c89118;color:#e8c891}
.qm-scene-list small{font:13px Bricolage,sans-serif;color:#e8c891}
.qm-switch{display:flex;flex:none;width:48px;height:28px;border-radius:20px;padding:3px;background:#526474}
.qm-switch i{width:22px;height:22px;border-radius:50%;background:#f6efe3}
[aria-checked=true]>.qm-switch{background:#9b7843;justify-content:flex-end}

dialog#roomNotice{width:min(380px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:24px;border:0;border-radius:22px;background:#f2eddf;color:#233730}
#roomNotice::backdrop{background:#07121b99}
#roomNotice .rn-kicker{font-size:12px;color:#7d6033;letter-spacing:.1em;margin-bottom:10px}
#roomNotice h2{font-size:21px;line-height:1.6;margin-bottom:12px}
#roomNotice p{font-size:16px;line-height:1.8;margin-bottom:20px}
#roomNotice .solid-button{width:100%;background:#7d6033!important;color:#fbf7ec!important}
dialog#notes{--muted:#56655e}

@layer mobile {
  html.bplus{--top:calc(76px + env(safe-area-inset-top,0px));--tab:calc(66px + env(safe-area-inset-bottom,0px));--bubble:#182c3b;--line2:#eadbb52b;scroll-padding-top:calc(var(--top) + 16px)!important;scroll-padding-bottom:calc(var(--tab) + 24px)!important}
  html.bplus,html.bplus body{overflow-x:clip!important}
  html.bplus body{font-size:16px!important;line-height:1.75!important}
  html.bplus :is(#conversationThread,.conversation-bar,#topicsButton,#memoButton,.presence-label,.maru-touch-hint,.room-caption,#guideControls,#storyScroll){display:none!important}
  html.bplus :is(.masthead,body.scroll-story .masthead){position:fixed!important;inset:0 0 auto!important;z-index:20!important;height:auto!important;min-height:calc(76px + env(safe-area-inset-top,0px))!important;padding:env(safe-area-inset-top,0px) max(12px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px))!important;gap:8px!important;background:#101f2beF!important;border-bottom:1px solid #ffffff12!important;backdrop-filter:blur(16px)!important}
  html.bplus .wordmark{min-width:0!important;flex:1 1 auto!important;padding:12px 0!important}
  html.bplus .wordmark b[lang=en]{display:block!important;font-size:clamp(13px,3.7vw,17px)!important;line-height:1.4!important;letter-spacing:-.02em!important;white-space:normal!important}
  html.bplus .wordmark small{font-size:11px!important;margin-top:4px!important;gap:6px!important;letter-spacing:0!important;flex-wrap:wrap!important}
  html.bplus .wordmark small em{font-size:10px!important}
  html.bplus .top-actions{flex:none!important;gap:0!important}
  html.bplus #donutButton{padding:0!important;min-width:48px!important}
  html.bplus .chapter-heading>span{padding:6px 10px!important;border-radius:10px!important;background:#10212be8!important;color:#e8c891!important;line-height:1.6!important}
  html.bplus .chapter-heading button{background:#142b38ed!important}
  html.bplus #room{position:fixed!important;inset:0!important;clip-path:none!important;opacity:1!important;filter:saturate(.75)!important}
  html.bplus .atmosphere{opacity:1!important;background:linear-gradient(180deg,#10202b44 0,#10202bd9 320px,#10202b 620px)!important;transition:none!important}
  html.bplus body[data-tree] .atmosphere{background:linear-gradient(180deg,#10202bd9,#10202b 360px)!important}
  html.bplus :is(.stage,body.scroll-story .stage){display:block!important;position:relative!important;inset:auto!important;width:100%!important;max-width:640px!important;min-height:100svh!important;height:auto!important;margin:0 auto!important;padding:calc(var(--top) + 20px) 16px calc(var(--tab) + 32px)!important;overflow:visible!important;touch-action:auto!important;pointer-events:auto!important}
  html.bplus .presence{position:absolute!important;top:calc(var(--top) + 24px)!important;left:12px!important;right:auto!important;width:56px!important;height:56px!important;margin:0!important;transform:none!important;transition:none!important;z-index:4!important}
  html.bplus .maru-space{width:56px!important;height:56px!important;margin:0!important;transition:none!important}
  html.bplus .maru-shadow{display:none!important}
  html.bplus #maruTouch{left:0!important;top:0!important;width:100%!important;height:100%!important;min-width:44px!important;min-height:44px!important;touch-action:pan-y pinch-zoom!important}
  html.bplus :is(#maru,#treeCanvas,#roomCanvas){touch-action:pan-y pinch-zoom!important}
  html.bplus .nod-label{font-size:13px!important;bottom:-14px!important}
  html.bplus :is(.turn,body.scroll-story .turn){position:static!important;display:block!important;width:100%!important;max-width:none!important;min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important;margin:0!important;padding:0!important;transform:none!important;background:none!important;border:0!important;box-shadow:none!important}
  html.bplus #turnContent{transform:none!important;opacity:1!important;will-change:auto!important}
  html.bplus .bubble{display:block!important;position:relative!important;margin:0 0 14px 56px!important;padding:10px 12px!important;border:1px solid var(--line2)!important;border-radius:18px 18px 18px 5px!important;background:var(--bubble)!important;box-shadow:0 12px 36px #04111a22!important;min-height:0!important}
  html.bplus .turn-meta{margin:0 0 4px!important;gap:0!important}
  html.bplus .turn-meta .fine{display:none!important}
  html.bplus .eyebrow{font-size:11px!important;line-height:1.5!important;letter-spacing:.06em!important}
  html.bplus #line{font-size:1rem!important;line-height:1.5!important;letter-spacing:0!important;overflow-wrap:anywhere!important}
  html.bplus #line br{display:none!important}
  html.bplus .chapter-heading{margin-bottom:16px!important}
  html.bplus :is(.chapter-content,.scene-content){display:block!important;position:relative!important}
  html.bplus :is(.chapter-content,.scene-content)>.presence{top:4px!important;left:-4px!important}
  html.bplus .story-navigation{margin-top:16px!important}

  /* Every photo-backed scene uses spare viewport height above its content. */
  html.bplus body:not(.scroll-story):not([data-tree]):not([data-scene=room]) #turnContent::before{content:"";display:block;flex:none;min-height:clamp(64px,18svh,180px)}
  html.bplus body:not([data-tree]):not([data-scene=room]) .stage{min-height:100dvh!important;padding-bottom:calc(var(--tab) + 16px)!important}
  html.bplus body:not([data-tree]):not([data-scene=room]) #turnContent{display:flex!important;flex-direction:column!important;min-height:calc(100dvh - var(--top) - var(--tab) - 36px)!important}
  html.bplus body.scroll-story:not([data-tree]) .chapter-heading{flex:none!important;margin-bottom:clamp(40px,12svh,112px)!important}
  html.bplus body:not([data-tree]):not([data-scene=room]) :is(.chapter-content,.scene-content){flex:none!important;margin-top:auto!important;isolation:isolate!important}
  html.bplus body:not([data-tree]):not([data-scene=room]) :is(.chapter-content,.scene-content)::before{content:"";position:absolute;inset:-24px -16px -16px;z-index:-1;pointer-events:none;background:linear-gradient(180deg,#10202b00,#10202bea 110px,#10202bf5)}
  html.bplus body:not([data-tree]):not([data-scene=room]) .atmosphere{background:linear-gradient(180deg,#10202b26 0%,#10202b40 45%,#10202bb3 75%,#10202bee 100%)!important}

  html.bplus #line:focus{outline:none!important}
  html.bplus #line .purpose-prompt{font-size:inherit!important;white-space:normal!important}
  html.bplus :is(#line,.line-sub,#noteTitle) .wg{display:inline!important}
  /* Lines still break only between word groups (after ，．, around 「」, between words), never inside a word:
     a zero-width break after each group, keep-all inside it (2026-11-12, found in Safari and Chrome on phones). */
  html.bplus :is(#line,.line-sub,#noteTitle){word-break:keep-all!important;overflow-wrap:anywhere!important}
  html.bplus :is(#line,.line-sub,#noteTitle) :is(.wg,.purpose-prompt)::after{content:'\200b'}
  html.bplus .compare-buttons button{word-break:keep-all;overflow-wrap:anywhere}
  html.bplus :is(.line-sub,.tree-comment){display:block!important;max-width:none!important;max-height:none!important;overflow:visible!important;-webkit-line-clamp:unset!important;font-size:16px!important;line-height:1.75!important;margin:0 0 16px!important;color:#e0e6df!important}
  html.bplus .term-gloss{display:block!important;font-size:14px!important;line-height:1.8!important;margin-top:12px!important;color:#bfcfc7!important}
  html.bplus :is(.your-line,.privacy-line){font-size:14px!important;line-height:1.8!important}
  html.bplus .your-line{margin:0 0 12px!important}
  html.bplus .maru-tap-hint{margin-top:12px!important;padding-top:10px!important;border-top:1px solid var(--line2)!important;font-size:13px!important;line-height:1.7!important;color:var(--gold)!important}
  html.bplus .guide-person{margin:20px 0!important;gap:14px!important}
  html.bplus .guide-person img{width:64px!important;height:64px!important}
  html.bplus .guide-person b{font-size:16px!important}
  html.bplus .guide-person span{font-size:13px!important}
  html.bplus :is(.choices,.story-choices,.portal-choices){display:flex!important;flex-direction:column!important;gap:8px!important;max-width:none!important;margin:16px 0 0!important}
  html.bplus :is(.choice,.portal){width:100%!important;min-height:52px!important;margin:0!important;padding:12px 14px!important;gap:10px!important;border:1px solid #e8d8b126!important;border-radius:16px!important;background:#1d3342!important;font-size:15px!important;line-height:1.6!important;translate:none!important;text-align:left!important}
  html.bplus .choice.primary{border-color:#dfbf7e88!important;background:#2b3e46!important}
  html.bplus .choice.primary .choice-label:after{display:none!important}
  html.bplus :is(.portal b,.route-choice b){font-size:15px!important}
  html.bplus :is(.portal small,.route-choice small){font-size:13px!important}
  html.bplus .route-thumb{width:56px!important;height:48px!important;flex:none!important}
  html.bplus .text-button{min-height:44px!important;font-size:15px!important;padding:8px 0!important}
  html.bplus :is(.solid-button,.outline-button){min-height:48px!important;padding:10px 16px!important;font-size:15px!important;line-height:1.5!important;border-radius:14px!important}
  html.bplus .turn-tools{gap:6px 16px!important;margin:16px 0!important;flex-wrap:wrap!important}
  html.bplus .story-nav{display:flex!important;position:static!important;margin:0!important}
  html.bplus .icon-control{min-width:48px!important;min-height:48px!important;padding:0!important;border-radius:50%!important}
  html.bplus .story-nav .icon-control{border:0!important}
  html.bplus .story-tools .text-button{font-size:14px!important}
  html.bplus .landscape{position:relative!important;inset:auto!important;display:flex!important;flex-direction:column!important;width:100%!important;height:auto!important;min-height:0!important;margin:0 0 18px!important;padding:0!important;transform:none!important;opacity:1!important;border:1px solid var(--line2)!important;border-radius:18px!important;background:#142b35cc!important;overflow:hidden!important}
  html.bplus .landscape[hidden]{display:none!important}
  html.bplus .tree-viewport{height:260px!important;min-height:0!important;flex:none!important;width:100%!important;margin:0!important}
  html.bplus body[data-tree=guide] .tree-viewport{height:220px!important}
  html.bplus #treeCanvas{height:100%!important;width:100%!important;clip-path:none!important;pointer-events:auto!important}
  html.bplus body.scroll-story #treeCanvas{pointer-events:none!important}
  html.bplus #treeLabels{position:static!important;inset:auto!important;display:flex!important;flex-wrap:wrap!important;align-items:stretch!important;justify-content:center!important;gap:6px!important;padding:6px 8px 10px!important;min-height:0!important;opacity:1!important;pointer-events:auto!important;transform:none!important}
  html.bplus #treeLabels:empty{display:none!important}
  html.bplus .tree-label{position:static!important;inset:auto!important;transform:none!important;min-height:44px!important;max-width:100%!important;padding:8px 10px!important;white-space:normal!important;overflow-wrap:anywhere!important;font-size:14px!important;line-height:1.6!important;border-radius:14px!important}
  html.bplus .tree-label .rest{display:inline!important}
  html.bplus #treeLeaders{display:none!important}
  html.bplus .landscape-overline{display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:6px!important;padding:8px!important;font-size:12px!important}
  html.bplus body[data-tree=guide] :is(.landscape-overline,.landscape-foot){display:none!important}
  html.bplus .canopy-tabs{display:flex!important;flex-wrap:wrap!important;gap:4px!important}
  html.bplus .canopy-tab{min-height:44px!important;min-width:44px!important;font-size:13px!important;padding:0 10px!important}
  html.bplus .landscape-foot{display:flex!important;flex-wrap:wrap!important;gap:6px!important;padding:8px!important;border-top:1px solid var(--line2)!important}
  html.bplus .landscape-foot p{font-size:12px!important;line-height:1.6!important;max-width:none!important}
  html.bplus .tree-controls{gap:12px!important;margin-left:auto!important}
  html.bplus .tree-controls button{min-width:44px!important;min-height:44px!important;font-size:13px!important;padding:6px!important}
  html.bplus .canopy-contexts{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;gap:8px!important;margin:16px 0 0!important}
  html.bplus .canopy-contexts .pill{min-height:48px!important;font-size:15px!important;padding:10px 16px!important;white-space:normal!important}
  html.bplus .canopy-context-note{font-size:15px!important;line-height:1.8!important;margin-top:12px!important}
  html.bplus .canopy-qlist summary{min-height:48px!important;font-size:16px!important}
  html.bplus .tree-related button{min-height:44px!important;font-size:14px!important}
  html.bplus #tabBar{position:fixed!important;inset:auto 0 0!important;z-index:22!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;min-height:calc(66px + env(safe-area-inset-bottom,0px))!important;padding:6px max(8px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(8px,env(safe-area-inset-left,0px))!important;background:#10212bf5!important;border-top:1px solid #e8d8b126!important;backdrop-filter:blur(16px)!important}
  html.bplus #tabBar button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;min-height:58px!important;padding:4px!important;color:#c5d0cb!important;font-size:12px!important;line-height:1.4!important;border-radius:12px!important}
  html.bplus #tabBar button[aria-current=page]{color:#efce91!important;background:#e8c8910c!important}
  html.bplus #tabBar svg{width:22px!important;height:22px!important}
  html.bplus #toast{bottom:calc(var(--tab) + 12px)!important;font-size:14px!important}

  /* Sheets have a fixed header and a flexible scrolling body; no minimum height. */
  html.bplus :is(dialog#notes,dialog#quickMenu){position:fixed!important;inset:auto 0 var(--kb,0px)!important;margin:0 auto!important;width:min(600px,100%)!important;max-width:100%!important;min-height:0!important;max-height:calc(var(--vvh,100dvh) - 12px - env(safe-area-inset-top,0px))!important;padding:0!important;border:1px solid #ffffff24!important;border-radius:24px 24px 0 0!important;overflow:hidden!important}
  html.bplus :is(dialog#notes,dialog#quickMenu)[open]{display:flex!important;flex-direction:column!important}
  html.bplus dialog#quickMenu{background:#142332!important;color:#f6efe3!important}
  html.bplus dialog#notes{background:#f2eddf!important;color:#233730!important}
  html.bplus :is(.note-head,.qm-head){flex:none!important;min-height:64px!important;padding:10px 16px 10px 20px!important}
  html.bplus .close-button{width:44px!important;height:44px!important;flex:none!important}
  html.bplus :is(.note-scroll,.qm-scroll){flex:1!important;min-height:0!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain!important;padding:8px 20px 24px!important;scroll-padding:16px!important}
  html.bplus :is(.qm-scroll,.note-scroll){padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))!important}
  html.bplus .note-scroll h2{font-size:25px!important;line-height:1.6!important;margin-bottom:20px!important}
  html.bplus .note-scroll h3{font-size:19px!important;line-height:1.7!important}
  html.bplus :is(.note-scroll p,.note-scroll li,.faq summary,.faq p){font-size:16px!important;line-height:1.85!important}
  html.bplus :is(.note-scroll .small,.note-scroll p.small,.note-scroll small){font-size:13px!important;line-height:1.7!important}
  html.bplus .note-scroll .choice{background:#2337300c!important;color:#233730!important;border-color:#23373033!important}
  html.bplus .note-scroll .arrow{color:#7d6033!important}
  html.bplus .question-form{display:flex!important;flex-wrap:wrap!important;gap:10px!important;position:static!important;background:transparent!important;margin:16px 0!important}
  html.bplus .question-form input{flex:1 1 180px!important;min-width:0!important;min-height:52px!important;font-size:16px!important;padding:12px 16px!important;border-radius:12px!important}
  html.bplus .question-suggestions{display:flex!important;flex-direction:column!important;gap:8px!important}
  html.bplus .question-suggestions button{min-height:48px!important;padding:12px 16px!important;font-size:15px!important;line-height:1.6!important;text-align:left!important;border-radius:12px!important}
  html.bplus :is(.note-scroll textarea,.note-scroll input){font-size:16px!important}
  html.bplus :is(.faq summary,.topic-list button,.study-list button,.history-list button,.slot-list button){min-height:48px!important}
  html.bplus :is(.topic-list strong,.study-list strong){font-size:16px!important}
  html.bplus :is(.topic-list span,.study-list span){font-size:13px!important}
  html.bplus .memo-list li button{width:44px!important;height:44px!important}
  html.bplus .portrait{float:none!important;width:100%!important;max-width:320px!important;margin:0 0 20px!important}
  html.bplus #maruHelp{position:fixed!important;inset:var(--maru-help-y,12px) auto auto var(--maru-help-x,12px)!important;max-height:var(--maru-help-height,calc(var(--vvh,100dvh) - 24px))!important;width:min(380px,calc(100% - 24px))!important;max-width:100%!important;margin:0!important;padding:16px 18px!important;border-radius:20px!important;overflow:auto!important}
  html.bplus #maruHelpList{display:none!important}
  html.bplus #maruHelp h2{font-size:18px!important;margin-bottom:6px!important}
  html.bplus #maruHelp p{font-size:14px!important;line-height:1.65!important}
  html.bplus .maru-help-actions{margin-top:12px!important}
  html.bplus .maru-help-actions button{font-size:14px!important;min-height:48px!important;padding:8px 0!important}
  html.bplus #maruHelpClose{width:44px!important;height:44px!important}
  html.bplus .compare-buttons{flex-wrap:wrap!important}
  html.bplus .compare-buttons button{font-size:14px!important;min-height:48px!important;padding:12px!important}
  html.bplus .reply-buttons{grid-template-columns:1fr!important}
  html.bplus .reply-buttons button{font-size:16px!important}
  html.bplus :is(.spoken-phrase,.reply-example,.reply-output){font-size:18px!important;line-height:1.9!important}
  html.bplus .experiment-status{font-size:15px!important;line-height:1.8!important}
  html.bplus .visit-inline span:not(.visit-day){font-size:15px!important}

  /* Room: leave the panorama open, with a small caption and a right-hand area rail. */
  html.bplus body[data-scene=room] .stage{display:flex!important;flex-direction:column!important;justify-content:flex-end!important;max-width:none!important;min-height:100dvh!important;padding:calc(var(--top) + 64px) 12px calc(var(--tab) + 12px)!important;pointer-events:none!important}
  html.bplus body[data-scene=room] .masthead{background:linear-gradient(#10202bea,#10202b99)!important;backdrop-filter:blur(8px)!important}
  html.bplus body[data-scene=room] .turn{flex:none!important;max-height:min(40dvh,calc(100dvh - var(--top) - var(--tab) - 84px))!important;overflow-y:auto!important;overscroll-behavior:contain!important;padding:10px 12px!important;background:#132b38ed!important;border:1px solid var(--line2)!important;border-radius:18px!important;pointer-events:auto!important;scroll-padding:12px!important}
  html.bplus body[data-scene=room] .bubble{margin:0 0 6px 48px!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
  html.bplus body[data-scene=room] .eyebrow{font-size:10px!important}
  html.bplus body[data-scene=room] #line{font-size:14px!important;line-height:1.5!important}
  html.bplus body[data-scene=room] .line-sub{font-size:12px!important;line-height:1.65!important;margin:0!important}
  html.bplus body[data-scene=room] .presence{top:0!important;left:0!important;width:44px!important;height:44px!important}
  html.bplus body[data-scene=room] .maru-space{width:44px!important;height:44px!important}
  html.bplus body[data-scene=room] .atmosphere{background:linear-gradient(180deg,#10202b14,#10202b00 55%,#10202b66 100%)!important;pointer-events:none!important}
  html.bplus body[data-scene=room] #roomCanvas{touch-action:pinch-zoom!important}
  html.bplus :is(#roomPins,.place-buttons){display:none!important}
  html.bplus #placeRail{position:fixed!important;z-index:5!important;inset:calc(var(--top) + 12px) 12px calc(var(--tab) + var(--room-card-height,170px) + 24px) auto!important;width:52px!important;display:flex!important;flex-direction:column!important;justify-content:safe center!important;gap:4px!important;margin:0!important;padding:0!important;overflow-y:auto!important;scrollbar-width:none!important;pointer-events:auto!important}
  html.bplus #placeRail button{display:flex!important;flex:none!important;align-items:center!important;justify-content:center!important;flex-direction:column!important;gap:2px!important;min-height:44px!important;width:52px!important;padding:4px!important;border-radius:16px!important;border:1px solid #e8d8b138!important;background:#142b38e8!important;color:#edf0e6!important;font-size:10px!important;line-height:1.2!important}
  html.bplus #placeRail button[aria-pressed=true]{background:#e8c891!important;color:#162b35!important;border-color:#e8c891!important}
  html.bplus #placeRail svg{width:18px!important;height:18px!important}
  html.bplus #placeRail b{font-weight:400!important}
  html.bplus body:not([data-scene=room]) #placeRail{display:none!important}
  html.bplus .room-navigation{position:fixed!important;z-index:5!important;inset:calc(var(--top) + 8px) auto auto 12px!important;display:flex!important;align-items:center!important;gap:4px!important;max-width:calc(100% - 88px)!important;transform:none!important;margin:0!important;padding:3px 6px!important;border-radius:26px!important;background:#142b38e8!important;pointer-events:auto!important}
  html.bplus .room-navigation[hidden]{display:none!important}
  html.bplus .room-navigation button{min-width:44px!important;min-height:44px!important;font-size:12px!important}
  html.bplus #roomHelp{font-size:11px!important}
  html.bplus body[data-scene=room] .turn-tools{margin:2px 0 0!important}
  html.bplus body[data-scene=room] .turn-tools .text-button{font-size:12px!important;min-height:44px!important;padding:4px 0!important}
  @media (orientation:landscape) and (max-height:600px){
    html.bplus body[data-scene=room] .turn{width:min(420px,calc(100% - 72px))!important;align-self:flex-start!important;max-height:calc(100dvh - var(--top) - var(--tab) - 80px)!important}
    html.bplus body[data-scene=room] #placeRail{bottom:calc(var(--tab) + 12px)!important}
  }
  html.bplus :is(button,a,input,textarea,summary){scroll-margin-top:calc(var(--top) + 16px)!important;scroll-margin-bottom:calc(var(--tab) + 20px)!important}
  html.bplus :is(#notes,#quickMenu,#maruHelp) :is(button,a,input,textarea,summary){scroll-margin:8px 0!important}
  @media (max-height:500px){html.bplus .masthead{min-height:calc(64px + env(safe-area-inset-top,0px))!important}html.bplus .tree-viewport,html.bplus body[data-tree=guide] .tree-viewport{height:200px!important}}

  /* Introduction: Lumi belongs to the caption; the welcome has its own hierarchy. */
  html.bplus{--intro-header:56px;--intro-nav:74px;--intro-tree:clamp(200px,min(40svh,calc(100dvh - var(--top) - var(--intro-header) - var(--tab) - var(--intro-nav) - 32px)),400px)}
  html.bplus :is(#introHeader,#introDock)[hidden]{display:none!important}
  html.bplus #introHeader{position:fixed!important;inset:var(--top) 0 auto!important;z-index:19!important;width:min(640px,100%)!important;height:var(--intro-header)!important;margin:0 auto!important;padding:0 16px!important;background:linear-gradient(#10202bf2,#10202b9c 70%,#10202b00)!important;pointer-events:none!important}
  html.bplus #introHeader .chapter-heading{height:100%!important;margin:0!important;gap:16px!important}
  html.bplus #introHeader .chapter-heading>*{pointer-events:auto!important;flex:none!important}
  html.bplus #introDock{position:fixed!important;inset:auto 0 var(--tab)!important;z-index:21!important;min-height:74px!important;padding:8px max(16px,env(safe-area-inset-right,0px)) 8px max(16px,env(safe-area-inset-left,0px))!important;border-top:1px solid var(--line2)!important;background:#10212bf5!important;backdrop-filter:blur(16px)!important}
  html.bplus #introDock .story-navigation{flex-wrap:nowrap!important;width:100%!important;max-width:608px!important;min-height:56px!important;margin:0 auto!important;gap:12px!important}
  html.bplus #introDock .story-start .story-nav{flex:1!important;width:auto!important;max-width:340px!important}
  html.bplus #introDock .story-tools{flex:none!important;white-space:nowrap!important}
  html.bplus body.scroll-story[data-scene=hello] .stage{min-height:100dvh!important;padding-top:calc(var(--top) + var(--intro-header) + 12px)!important;padding-bottom:calc(var(--tab) + var(--intro-nav) + 20px)!important}
  html.bplus body.scroll-story[data-scene=hello] #turnContent{display:flex!important;flex-direction:column!important;min-height:calc(100dvh - var(--top) - var(--intro-header) - var(--tab) - var(--intro-nav) - 32px)!important}
  html.bplus body.scroll-story .chapter-content{flex:none!important}
  html.bplus body.scroll-story[data-tree] .chapter-content{margin-top:0!important}
  html.bplus .intro-narration{position:relative!important;margin:0 0 16px!important;padding:12px!important;border:1px solid var(--line2)!important;border-radius:18px!important;background:#182c3bf2!important}
  html.bplus .intro-narration>.presence{position:absolute!important;inset:8px auto auto 4px!important;width:88px!important;height:88px!important;margin:0!important;transform:none!important}
  html.bplus .intro-narration .maru-space{width:100%!important;height:100%!important}
  html.bplus body.scroll-story .intro-narration .bubble{min-height:76px!important;margin:0 0 8px 80px!important;padding:4px 0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:none!important}
  html.bplus body.scroll-story .intro-narration .line-sub{margin-bottom:0!important}
  html.bplus body.scroll-story[data-pose=arrival] .chapter-content{margin-top:0!important}
  html.bplus body.scroll-story[data-pose=arrival] .chapter-content::before{display:none!important}
  html.bplus body.scroll-story[data-pose=arrival] .intro-narration{padding:0!important;border:0!important;background:none!important}
  html.bplus body.scroll-story[data-pose=arrival] .intro-narration>.presence{--welcome-maru:clamp(144px,calc(100svh - var(--top) - var(--intro-header) - var(--tab) - var(--intro-nav) - 250px),260px);position:relative!important;inset:auto!important;width:var(--welcome-maru)!important;height:var(--welcome-maru)!important;margin:0 auto 8px!important}
  html.bplus body.scroll-story[data-pose=arrival] .intro-narration .bubble{min-height:0!important;margin:0 0 12px!important;padding:10px 12px!important;border:1px solid var(--line2)!important;border-radius:18px!important;background:var(--bubble)!important;text-align:center!important}
  html.bplus body.scroll-story[data-pose=arrival] .turn-meta{justify-content:center!important}
  html.bplus body.scroll-story .line-sub{font-size:14px!important;line-height:1.75!important}
  html.bplus body.scroll-story .term-gloss{font-size:12px!important;line-height:1.7!important}
  html.bplus body.scroll-story .tree-viewport{height:var(--intro-tree)!important}
  html.bplus body.scroll-story #treeLabels .tree-label{font-size:12px!important;padding:8px!important}
  html.bplus:has(body.scroll-story){scroll-padding-top:calc(var(--top) + var(--intro-header) + 12px)!important;scroll-padding-bottom:calc(var(--tab) + var(--intro-nav) + 20px)!important}
  html.bplus body.scroll-story #turnContent :is(button,a,input,textarea,summary){scroll-margin-top:calc(var(--top) + var(--intro-header) + 12px)!important;scroll-margin-bottom:calc(var(--tab) + var(--intro-nav) + 20px)!important}
  @media (max-height:500px){html.bplus{--intro-header:48px}}
  @media (orientation:landscape) and (max-height:500px){
    html.bplus{--intro-header:0px;--intro-tree:clamp(140px,calc(100dvh - var(--top) - var(--tab) - var(--intro-nav) - 24px),260px)}
    html.bplus #introHeader{inset:calc(var(--top) + 8px) auto auto 8px!important;width:104px!important;height:auto!important;padding:0 8px!important;border-radius:16px!important;background:#10202bd9!important}
    html.bplus #introHeader .chapter-heading{flex-direction:column!important;gap:4px!important;padding:8px 0!important}
    html.bplus body.scroll-story[data-scene=hello] .stage{max-width:none!important;padding-left:124px!important}
  }
  @media (prefers-reduced-motion:reduce){html.bplus *,html.bplus *:before,html.bplus *:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
}
