/* The recovered windows belong to the story, independent of each rebuilt world. */
.bbm-story-window {
  --story-paper: #d1d0c8;
  --story-ink: #15151b;
  --story-navy: #090b75;
  box-sizing: border-box;
  color-scheme: light;
  color: var(--story-ink);
  background: var(--story-paper);
  border: 3px solid;
  border-color: #fff #3b3b40 #3b3b40 #fff;
  border-radius: 0;
  box-shadow: 3px 3px 0 #000;
  font: 13px/1.5 Tahoma, Arial, sans-serif;
  letter-spacing: 0;
  text-shadow: none;
  text-align: left;
  isolation: isolate;
}
.bbm-story-window *, .bbm-story-window *::before, .bbm-story-window *::after { box-sizing: border-box; }
.bbm-story-window [hidden] { display: none !important; }
.bbm-story-report {
  position: fixed;
  z-index: 42;
  left: 32px;
  bottom: 100px;
  width: 410px;
  max-width: calc(100vw - 64px);
  max-height: calc(100svh - 210px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #787780 #d1d0c8;
  animation: bbm-story-arrive .18s ease-out;
}
.portal.has-open-index .bbm-story-report, .portal.has-focused-star .bbm-story-report { visibility: hidden; }
.bbm-story-titlebar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 2px 4px 2px 8px;
  background: var(--story-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.bbm-story-body { padding: 19px 20px 17px; }
.bbm-story-window h2 { margin: 8px 0 12px; color: inherit; font: 700 25px/1.12 Tahoma, Arial, sans-serif; letter-spacing: -.7px; }
.bbm-story-window h3 { margin: 0 0 12px; color: inherit; font: 700 23px/1.15 Georgia, serif; }
.bbm-story-window p { margin: 0 0 12px; }
.bbm-story-window .bbm-story-meta { margin-bottom: 11px; color: #4a4956; font: 700 9px/1.5 "Courier New", monospace; letter-spacing: .7px; }
.bbm-story-text { color: #22222a; font-size: 13px; line-height: 1.55; }
.bbm-story-window button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 6px 11px;
  border: 2px solid;
  border-color: #fff #47474b #47474b #fff;
  border-radius: 0;
  box-shadow: 1px 1px 0 #000;
  color: var(--story-ink);
  background: #d1d0c8;
  font: 700 12px/1.25 Tahoma, Arial, sans-serif;
  letter-spacing: 0;
  cursor: pointer;
}
.bbm-story-window button:hover { background: #e6e5df; }
.bbm-story-window button:active { border-color: #47474b #fff #fff #47474b; }
.bbm-story-window button:focus-visible, .bbm-story-window summary:focus-visible { outline: 2px dotted var(--story-navy); outline-offset: 3px; }
.bbm-story-window .bbm-story-close { min-height: 28px; min-width: 28px; padding: 0; color: #111; font: 22px/1 Arial, sans-serif; }
.bbm-story-window .bbm-story-primary { outline: 1px solid #111; outline-offset: 2px; }
.bbm-story-fragment {
  margin: 17px 0 15px;
  padding: 10px 12px 11px;
  background: #ecebe5;
  border: 2px solid;
  border-color: #73737a #fff #fff #73737a;
}
.bbm-story-fragment > span { display: block; margin-bottom: 4px; color: #585762; font: 10px/1.4 "Courier New", monospace; text-transform: uppercase; letter-spacing: 1px; }
.bbm-story-fragment > strong { display: block; color: #090b75; font: 700 19px/1.3 "Courier New", monospace; overflow-wrap: anywhere; }
.bbm-story-window .bbm-story-hook { margin: 13px 0 20px; padding-left: 11px; border-left: 2px solid #090b75; font: italic 14px/1.45 Georgia, serif; }
.bbm-story-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bbm-story-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin-top: 15px; padding-top: 9px; border-top: 1px solid #97969d; }
.bbm-story-footer > span { color: #5e5c68; font: 9px/1.4 "Courier New", monospace; }
.bbm-story-window .bbm-story-link { min-height: 32px; padding: 4px 0; border: 0; box-shadow: none; background: transparent; color: #090b75; font: 11px/1.3 Tahoma, Arial, sans-serif; text-decoration: underline; text-underline-offset: 3px; }
.bbm-story-window .bbm-story-link:hover { color: #3539a5; }
.bbm-story-ritual {
  left: 50%;
  bottom: auto;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 650px;
  max-width: calc(100vw - 64px);
  max-height: calc(100svh - 130px);
  animation: none;
}
.bbm-story-ritual .bbm-story-body { padding: 16px 22px 17px; }
.bbm-story-window .bbm-story-ritual-heading { margin: 0 0 5px; text-align: center; color: #111; font: 700 35px/.98 Georgia, "Times New Roman", serif; letter-spacing: -1.5px; }
.bbm-story-window .bbm-story-operation { margin: 0 0 12px; color: #504e5b; text-align: center; font: 9px/1.45 "Courier New", monospace; }
.bbm-story-engraving { padding: 4px; border: 1px solid #7a756b; background: #e7dfc7; color: #29251c; }
.bbm-story-woodcut { display: block; width: 100%; height: auto; }
.bbm-story-window .bbm-story-ritual-preface { margin: 12px 0 11px; text-align: center; color: #292630; font: italic 14px/1.4 Georgia, serif; }
.bbm-story-stations { list-style: none; margin: 0 0 15px; padding: 0; border-top: 1px solid #99979f; }
.bbm-story-stations > li { border-bottom: 1px solid #aaa8af; }
.bbm-story-stations button { width: 100%; min-height: 33px; justify-content: flex-start; gap: 8px; padding: 5px 3px; border: 0; box-shadow: none; background: transparent; text-align: left; font-size: 12px; }
.bbm-story-stations button:hover { background: #e0dfd9; }
.bbm-story-check { display: inline-grid; place-content: center; flex: 0 0 17px; width: 17px; height: 17px; border: 1px solid #373440; background: #ecebe3; color: #090b75; font: 700 14px/1 "Courier New", monospace; }
.bbm-story-stations small { margin-left: auto; color: #686471; font: 8px/1.4 "Courier New", monospace; letter-spacing: .8px; }
.bbm-story-stations p { margin: 0 0 10px; padding-left: 28px; color: #4a4551; font: italic 12px/1.45 Georgia, serif; }
.bbm-story-window .bbm-story-speak { display: flex; width: min(280px, 100%); margin: 3px auto 0; min-height: 44px; }
.bbm-story-revelation { padding-top: 5px; }
.bbm-story-revelation:focus { outline: none; }
.bbm-story-ritual-early-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; }
.bbm-story-ritual:has(.bbm-story-revelation:not([hidden])) .bbm-story-ritual-early-footer { display: none; }
.bbm-story-journal {
  width: 600px;
  max-width: calc(100vw - 40px);
  max-height: calc(100svh - 54px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.bbm-story-journal::backdrop { background: #060711c9; }
.bbm-story-word-square { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 18px 0 12px; border: 2px solid #171623; background: #e9e6da; }
.bbm-story-word-square > div { min-height: 66px; padding: 7px 6px; border: 1px solid #aaa493; }
.bbm-story-word-square small { display: block; color: #77716b; font: 8px/1.2 "Courier New", monospace; }
.bbm-story-word-square strong { display: grid; place-items: center; min-height: 37px; color: #090b75; font: 700 14px/1.2 "Courier New", monospace; overflow-wrap: anywhere; text-align: center; }
.bbm-story-word-square .is-unrecovered { background: repeating-linear-gradient(135deg, #ccc9bd 0 1px, #ddd9cf 1px 5px); }
.bbm-story-word-square .is-unrecovered strong { color: #8c8790; font-size: 20px; }
.bbm-story-recovered-sentence { padding-bottom: 15px; border-bottom: 1px solid #96919d; color: #090b75; font: 700 15px/1.5 "Courier New", monospace; }
.bbm-story-journal-records { margin: 14px 0 20px; }
.bbm-story-journal-records details { padding: 11px 0; border-bottom: 1px solid #aaa7ae; }
.bbm-story-journal-records summary { color: #262330; font: 700 14px/1.45 Georgia, serif; cursor: pointer; }
.bbm-story-journal-records details[open] summary { margin-bottom: 11px; }
.bbm-story-journal-records .bbm-story-journal-word { color: #090b75; font: 10px/1.5 "Courier New", monospace; letter-spacing: .8px; }
.bbm-story-ending .bbm-story-fragment > strong { font-size: 16px; }
.bbm-story-revisit { margin: 0 12px 12px 0; }
@media (min-width: 601px) and (max-height: 760px) {
  .bbm-story-ritual .bbm-story-engraving { max-width: 450px; margin-inline: auto; }
  .bbm-story-ritual .bbm-story-stations button { min-height: 29px; padding-block: 3px; }
}
/* Project remixes deliberately apply broad !important typography. Keep the
   recovered windows readable without inheriting a world's palette or fonts. */
body[data-page-remix] .bbm-story-window { background: var(--story-paper) !important; color: var(--story-ink) !important; }
body[data-page-remix] .bbm-story-window :is(p, li, label, h2, h3, h4, a) { color: var(--story-text-color, var(--story-ink)) !important; font-family: var(--story-text-font, Tahoma, Arial, sans-serif) !important; }
.bbm-story-meta { --story-text-color: #4a4956; --story-text-font: "Courier New", monospace; }
.bbm-story-text { --story-text-color: #22222a; }
.bbm-story-hook { --story-text-font: Georgia, serif; }
.bbm-story-ritual-heading, .bbm-story-revelation h3 { --story-text-font: Georgia, "Times New Roman", serif; }
.bbm-story-operation { --story-text-color: #504e5b; --story-text-font: "Courier New", monospace; }
.bbm-story-ritual-preface { --story-text-font: Georgia, serif; }
.bbm-story-stations p { --story-text-color: #4a4551; --story-text-font: Georgia, serif; }
.bbm-story-recovered-sentence, .bbm-story-journal-word { --story-text-color: #090b75; --story-text-font: "Courier New", monospace; }
@keyframes bbm-story-arrive { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 600px) {
  .bbm-story-report { left: 12px; bottom: 168px; width: calc(100vw - 24px); max-width: none; max-height: min(50svh, calc(100svh - 240px)); }
  .bbm-story-body { padding: 14px 14px 13px; }
  .bbm-story-window h2 { font-size: 23px; }
  .bbm-story-window button { min-height: 44px; }
  .bbm-story-window .bbm-story-close { min-height: 32px; min-width: 32px; }
  .bbm-story-titlebar { font-size: 10px; }
  .bbm-story-ritual { left: 12px; top: auto; bottom: 168px; transform: none; max-height: calc(100svh - 240px); }
  .bbm-story-ritual .bbm-story-body { padding: 13px 12px; }
  .bbm-story-window .bbm-story-ritual-heading { font-size: 27px; letter-spacing: -1px; }
  .bbm-story-window .bbm-story-operation { font-size: 8px; }
  .bbm-story-stations button { min-height: 38px; font-size: 11px; }
  .bbm-story-stations small { font-size: 7px; letter-spacing: .3px; }
  .bbm-story-window .bbm-story-link { min-height: 36px; }
  .bbm-story-journal { width: calc(100vw - 24px); max-width: none; max-height: calc(100svh - 30px); }
  .bbm-story-word-square > div { min-height: 57px; padding: 5px 3px; }
  .bbm-story-word-square strong { min-height: 31px; font-size: 11px; }
  .bbm-story-word-square { margin-top: 14px; }
  .bbm-story-footer > span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bbm-story-report { animation: none; } }

.bbm-story-engraving img { display: block; width: 100%; height: auto; }
