/* BF5 Mystery Adventures — storybook overlay. No changes to any puzzle scene. */
.story-journal-overlay{
  position:fixed;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;
  padding:clamp(10px,3vw,34px);background:rgba(3,5,9,.88);
  backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px);
}
.story-journal-overlay[hidden]{display:none!important}
.story-journal-book{
  width:min(970px,100%);max-height:min(91dvh,950px);display:flex;flex-direction:column;
  border:1px solid #b18a56;border-radius:16px;overflow:hidden;
  box-shadow:0 35px 110px #000d,0 0 0 4px #362b22,0 0 0 5px #98774c5c;
  background:#201c1a;color:#f6e9cf;
}
.story-journal-head{
  display:flex;align-items:start;justify-content:space-between;gap:15px;
  background:radial-gradient(circle at 8% 15%,#51412c80,transparent 50%),linear-gradient(115deg,#302923,#15191c);
  padding:22px clamp(22px,4vw,40px) 16px;border-bottom:1px solid #a48755;
}
.story-journal-case{
  font:700 10px/1.5 Inter,system-ui,sans-serif;letter-spacing:.24em;color:#d9b88b;
}
.story-journal-head h2{
  font:500 clamp(29px,4.2vw,44px)/1.12 Georgia,serif;color:#f3d5a1;
  margin:6px 0 4px;
}
.story-journal-head p{font:italic 14px/1.4 Georgia,serif;color:#d4bfa1;margin:0}
.story-journal-close{
  flex-shrink:0;display:grid;place-items:center;width:41px;height:41px;
  border:1px solid #90734e;border-radius:10px;background:#181b1d;color:#f1d5a9;
  cursor:pointer;font:500 17px system-ui,sans-serif;
}
.story-journal-close:hover,.story-journal-close:focus-visible{
  background:#544333;outline:2px solid #dbb878;outline-offset:2px;
}
.story-journal-tabs{
  display:flex;align-items:center;gap:7px;overflow-x:auto;padding:11px clamp(15px,3vw,40px);
  border-bottom:1px solid #67523b;background:#211e1d;scrollbar-color:#9b7748 #292323;
}
.story-journal-tabs button{
  white-space:nowrap;flex:0 0 auto;background:#292728;color:#d8cbb6;
  border:1px solid #675642;border-radius:8px;padding:9px 13px;cursor:pointer;
  font:600 12px/1.15 Inter,system-ui,sans-serif;transition:background .15s ease;
}
.story-journal-tabs button:hover{background:#43382f}
.story-journal-tabs button[aria-pressed="true"]{
  background:#b58c51;color:#161a1b;border-color:#e2c38a;
}
.story-journal-tabs button:focus-visible{outline:2px solid #e4b877;outline-offset:2px}
.story-journal-pages{
  flex:1;min-height:170px;overflow:auto;
  background:radial-gradient(ellipse at 4% 5%,#fff9e6 0%,transparent 46%),
    radial-gradient(ellipse at 100% 88%,#cab58d66 0%,transparent 54%),
    linear-gradient(90deg,#c7b38c 0%,#eee1c5 4%,#efe3ca 96%,#c4a97c 100%);
  box-shadow:inset 0 16px 35px #6a4e2c24;
  color:#332b25;padding:clamp(20px,4vw,46px) clamp(21px,6vw,72px) 48px;
  scroll-behavior:smooth;scrollbar-color:#93774d #e5d6b9;
}
.story-journal-pages:focus-visible{outline:3px solid #8e6531;outline-offset:-5px}
.story-journal-preface{
  font:700 11px/1.7 Inter,system-ui,sans-serif;letter-spacing:.22em;color:#825e35;text-align:center;
  padding-bottom:19px;border-bottom:1px solid #ac906b;
}
.story-journal-preface p{
  font:italic 14px/1.6 Georgia,serif;letter-spacing:0;color:#765f47;margin:6px 0 0;
}
.story-journal-chapter{padding:29px 0 38px;border-bottom:1px solid #ad9374}
.story-journal-number{
  display:flex;gap:20px;align-items:baseline;justify-content:space-between;flex-wrap:wrap;
  font:700 11px/1.5 Inter,system-ui,sans-serif;letter-spacing:.18em;color:#956638;
}
.story-journal-status{font-size:10px;letter-spacing:.08em;color:#776650}
.story-journal-chapter h3{
  font:500 clamp(28px,4vw,40px)/1.2 Georgia,serif;color:#372a23;
  margin:9px 0 2px;
}
.story-journal-subtitle{font:italic 17px/1.5 Georgia,serif;color:#876b4d!important;margin:0 0 27px}
.story-journal-prose{
  font:400 clamp(16px,1.8vw,18px)/1.85 Georgia,serif;
  color:#382f29;margin:0 0 18px;max-width:75ch;text-wrap:pretty;
}
.story-journal-lead::first-letter{
  float:left;font:500 3.15em/.82 Georgia,serif;color:#8e653b;
  margin:7px 8px 0 0;
}
.story-journal-evidence{
  margin:27px 0 22px;border:1px solid #bda481;border-radius:7px;
  background:#ddd0b45c;padding:12px 16px;
}
.story-journal-evidence summary{
  cursor:pointer;font:700 12px/1.5 Inter,system-ui,sans-serif;letter-spacing:.05em;color:#60492e;
}
.story-journal-evidence summary:focus-visible{outline:2px solid #906635;outline-offset:3px}
.story-journal-clue{
  display:flex;flex-direction:column;gap:4px;padding:11px 0;
  border-bottom:1px solid #b8a4838f;font:14px/1.45 Inter,system-ui,sans-serif;
}
.story-journal-clue:last-child{border-bottom:0}
.story-journal-clue strong{color:#493525}
.story-journal-clue span{color:#675641}
.story-journal-empty{font:italic 14px/1.5 Georgia,serif;color:#705b40}
.story-journal-question{
  padding:13px 18px;border-left:3px solid #946c38;
  background:#d3bb9259;border-radius:0 8px 8px 0;
}
.story-journal-question span{
  font:700 10px/1.4 Inter,system-ui,sans-serif;letter-spacing:.16em;color:#74502e;
}
.story-journal-question p{font:italic 17px/1.55 Georgia,serif;color:#4b3829;margin:7px 0 1px}
.story-journal-end{
  text-align:center;padding:26px 0 9px;font:italic 15px/1.5 Georgia,serif;color:#745f43;
}
.story-journal-foot{
  display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;
  padding:13px clamp(22px,4vw,40px);border-top:1px solid #94734b;
  background:#1d1e20;color:#d3b993;font:11px/1.5 Inter,system-ui,sans-serif;
}
.story-journal-privacy{color:#ab9e89}
@media(max-width:680px){
  .story-journal-overlay{padding:7px}
  .story-journal-book{max-height:97dvh;border-radius:9px}
  .story-journal-head{padding:17px 18px 12px}
  .story-journal-tabs{padding:9px 12px}
  .story-journal-pages{padding:20px 23px 30px}
  .story-journal-chapter{padding:23px 0 28px}
  .story-journal-prose{line-height:1.72}
  .story-journal-foot{padding:10px 14px}
}
@media(prefers-reduced-motion:reduce){
  .story-journal-tabs button{transition:none}
  .story-journal-pages{scroll-behavior:auto}
}
