#tombstory-launch { position:fixed; right:20px; bottom:192px; z-index:45; display:grid; gap:4px; padding:15px 24px; border:1px solid #dfd4b7; border-radius:16px; background:#fcf6e8f5; color:#263c34; box-shadow:0 6px 24px #17231830; text-align:left; cursor:pointer; font:600 24px/1.2 system-ui,sans-serif; }
#tombstory-launch span:last-child { font-weight:400; color:#697467; }
#tombstory-launch:hover { background:#fffbee; transform:translateY(-2px); }
#tombstory-launch[hidden], #tombstory-story[hidden] { display:none; }
body.tombstory-open { background:#faf5e9; }
body.tombstory-open #app { height:calc(100% - var(--tombstory-footer-height, 210px)); }
body.tombstory-open .hud, body.tombstory-open #jy-prompt, body.tombstory-open #jy-verse, body.tombstory-open #jy-panel, body.tombstory-open #minigame-panel, body.tombstory-open #mg-prompt, body.tombstory-open #mg-chip, body.tombstory-open #mg-verse, body.tombstory-open #sw-verse, body.tombstory-open #sw-prompt { visibility:hidden !important; }
body.tombstory-open canvas { cursor:default; }
#tombstory-story { position:fixed; inset:0; z-index:70; pointer-events:none; font-family:system-ui,sans-serif; color:#253c34; }
.tombstory-header { position:absolute; inset:0 0 auto; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:26px 32px 40px; background:linear-gradient(#f6f0e9e6, #f6f0e980 60%, transparent); }
.tombstory-header h1 { margin:0 0 5px; font:500 clamp(30px,3vw,44px)/1.1 Georgia,serif; letter-spacing:-.035em; }
.tombstory-header a { pointer-events:auto; color:#40584c; font-size:24px; text-decoration:none; display:inline-flex; align-items:center; min-height:44px; gap:8px; }
.tombstory-header a:hover { text-decoration:underline; }
#tombstory-story button { pointer-events:auto; cursor:pointer; min-height:48px; border-radius:10px; font:600 24px/1.15 system-ui,sans-serif; padding:13px 22px; border:1px solid #b7c0b2; background:#fffaf0; color:#294439; }
#tombstory-story button:disabled { cursor:default; opacity:.64; }
#tombstory-story button:hover:not(:disabled) { filter:brightness(.96); }
#tombstory-story button:focus-visible, #tombstory-story a:focus-visible, #tombstory-launch:focus-visible { outline:3px solid #ad8235; outline-offset:4px; }
.tombstory-footer { position:absolute; inset:auto 0 0; box-sizing:border-box; display:flex; align-items:center; gap:40px; padding:23px max(32px, calc((100vw - 1320px) / 2)); background:#faf5e9; border-top:1px solid #c6b794; box-shadow:0 -12px 45px #3025130c; }
.tombstory-copy { flex:1; max-width:880px; }
#tombstory-step { margin:0 0 8px; color:#7a6a43; font:500 24px/1.2 system-ui,sans-serif; }
#tombstory-heading { font:500 32px/1.2 Georgia,serif; margin:0 0 8px; letter-spacing:-.025em; }
#tombstory-text { font:400 24px/1.4 system-ui,sans-serif; margin:0; color:#46564b; }
.tombstory-actions { min-width:228px; display:flex; flex-direction:column; gap:10px; }
#tombstory-next { color:#fff9e9 !important; background:#315545 !important; border-color:#315545 !important; }
#tombstory-pause[hidden] { display:none; }
@media(max-width:1050px) {
  .tombstory-footer { gap:24px; padding:20px 26px; }
  .tombstory-actions { min-width:210px; }
}
@media(max-width:650px) {
  #tombstory-launch { right:12px; bottom:calc(324px + env(safe-area-inset-bottom)); padding:12px 16px; font-size:18px; border-radius:12px; }
  .tombstory-header { padding:18px 16px 34px; gap:8px; }
  .tombstory-header h1 { font-size:28px; }
  .tombstory-header a { font-size:15px; gap:5px; flex-wrap:wrap; line-height:1.2; }
  #tombstory-story #tombstory-close { font-size:15px; min-width:94px; padding:10px 12px; max-width:100px; }
  .tombstory-footer { flex-direction:column; align-items:stretch; gap:15px; padding:17px 20px calc(18px + env(safe-area-inset-bottom)); }
  #tombstory-step { font-size:15px; margin-bottom:6px; }
  #tombstory-heading { font-size:27px; margin-bottom:7px; }
  #tombstory-text { font-size:18px; line-height:1.4; }
  .tombstory-actions { flex-direction:row; min-width:0; gap:10px; }
  #tombstory-story button { font-size:18px; padding:12px 15px; }
  #tombstory-next { flex:1; }
}
@media(max-height:550px) and (min-width:651px) {
  .tombstory-header { padding:12px 20px 20px; }
  .tombstory-header h1 { font-size:28px; }
  .tombstory-header a { font-size:16px; }
  #tombstory-story button { font-size:18px; min-height:44px; padding:10px 16px; }
  .tombstory-footer { padding:10px 20px; gap:20px; }
  #tombstory-step { font-size:15px; margin-bottom:3px; }
  #tombstory-heading { font-size:25px; margin-bottom:4px; }
  #tombstory-text { font-size:17px; line-height:1.3; }
  .tombstory-actions { min-width:195px; gap:7px; }
}
@media(prefers-reduced-motion:reduce) { #tombstory-launch:hover { transform:none; } }

/* Integration: this story shares the forest with the three Bible visit buttons
   (.tomb-entry, .room-entry, .gethsemane-entry). Stack above them, and keep only one UI at a time. */
body.tombstory-open .tomb-entry, body.tombstory-open .room-entry, body.tombstory-open .gethsemane-entry { display:none !important; }
body.tomb-visit #tombstory-launch, body.room-visit #tombstory-launch, body.gethsemane-visit #tombstory-launch { display:none !important; }
