#intro-case { color:#f1e4c8; display:grid; gap:12px; padding:8px 0 14px; }
#intro-case[hidden] { display:none; }
.intro-title-mast { display:grid; justify-items:center; gap:5px; color:#b7a78e; font:11px/1.4 var(--f-mono); letter-spacing:.2em; text-align:center; }
.intro-title-wordmark { color:#e8ddc9; font:800 clamp(39px,11vw,58px)/1.06 var(--f-display); letter-spacing:.12em; text-shadow:0 3px 18px #000b; }
.intro-title-wordmark span { padding-inline:.08em; background:#08090b; color:transparent; box-shadow:0 0 0 1px #32302b; }
.intro-title-mast i { width:1px; height:18px; background:linear-gradient(#9e8061,transparent); }
.intro-top { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12px; color:#ccbaa0; }
.intro-top button { min-height:44px; padding:8px; text-decoration:underline; font-size:12px; color:#d6c7ae; }
#intro-case h1 { margin:0; font:800 clamp(23px,6.5vw,30px)/1.4 var(--f-display); }
#intro-case figure { position:relative; margin:0; border:1px solid #796246; background:#17110c; }
.intro-image { display:block; width:100%; height:auto; object-fit:contain; }
.intro-envelope { filter:drop-shadow(0 12px 12px #0008); }
.intro-time { position:absolute; bottom:8px; left:8px; padding:4px 8px; background:#080906e8; color:#eee3c9; font:700 12px var(--f-mono); }
.intro-caption { margin:0; font-size:16px; line-height:1.65; }
.intro-compare { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.intro-compare button { min-height:44px; background:#262018; border:1px solid #9b8260; color:#e7d8bc; font-size:13px; }
.intro-compare button[aria-pressed='true'] { background:#ded0b4; color:#302316; }
.intro-receipt { display:flex; align-items:center; gap:12px; color:#cbbba0; font-size:12px; }
.intro-receipt img { width:78px; height:52px; object-fit:contain; }
.intro-fiction { color:#b7a78d; font-size:12px; }
.intro-note { min-height:210px; padding:26px 28px; color:#302218; background:#dbc9a6 url('intro/witness-note.webp') center/100% 100%; display:grid; align-content:center; gap:10px; }
.intro-note p { margin:0; font-size:16px; line-height:1.6; }.intro-note span { font-size:12px; }
.intro-redaction { padding:10px; min-height:48px; border:1px solid #17110b; background:#17110b; color:#f6e7ca; text-align:left; font-weight:800; }
.intro-redaction[aria-expanded='true'] { background:#eee0be; color:#352415; border-color:#8b7254; }
.intro-sender { text-align:right; font-weight:800; }
body.intro-active .lite-pane[data-lpane='open'] > :is(.lite-event,.lite-bar,.lite-last,.lite-join) { display:none; }
body.intro-active .lite-footer .lite-pull[data-mode='intro'] { background:linear-gradient(#992f23,#601910); color:#fff0d2; text-shadow:none; min-height:60px; padding:12px; border:solid transparent; border-width:9px 12px; border-image:url('button-red.png') 25 35 stretch; }
body.intro-active main { padding-bottom:calc(154px + env(safe-area-inset-bottom,0px)); }
.intro-archive { display:grid; gap:14px; }.intro-archive summary { cursor:pointer; min-height:44px; padding:10px 0; color:#f1dfbd; font-weight:700; }
.intro-archive .intro-image { margin:8px 0; }
.intro-archive-link { min-height:44px; padding:10px; border:1px solid #9c8461; color:#e9d8b7; background:#241a10; }
#lite-rescue { margin:4px 0; }#lite-rescue img { display:block; width:100%; height:auto; }
@media(max-height:700px) { #intro-case { gap:7px; padding-top:0; } #intro-case h1 { font-size:22px; } #intro-case figure .intro-image { max-height:140px; width:100%; object-fit:contain; } .intro-caption { font-size:14px; line-height:1.5; } .intro-receipt,.intro-fiction { display:none; } .intro-note { min-height:165px; padding:16px; } .intro-note p { font-size:14px; } }
@media(prefers-reduced-motion:reduce) { #intro-case * { animation:none!important; transition:none!important; } }


/* Disclose navigation only when the player has something to review.
   The first image and a single action are the entire opening interface. */
.lite-tabs[hidden], .lite-tabs button[hidden] { display:none!important; }
.lite-tabs:has([data-ltab="notes"][hidden]) { grid-template-columns:repeat(2,minmax(0,1fr)); }
body.lite:has(.lite-tabs[hidden]) main { padding-bottom:calc(98px + env(safe-area-inset-bottom,0px)); }
body.lite:has(.lite-tabs[hidden]) .lite-footer { border:0; box-shadow:none; background:none; backdrop-filter:none; }
body.intro-active header.top { display:block!important; position:absolute; left:0; right:0; top:0; z-index:15; background:none; border:0; box-shadow:none; pointer-events:none; }
body.intro-active header.top .top-in { min-height:44px; justify-content:flex-end; background:none; border:0; padding:3px 12px; }
body.intro-active header.top .logo, body.intro-active header.top #wallet, body.intro-active header.top #incursion-status { display:none!important; }
body.intro-active header.top #game-menu { flex:0 0 auto; justify-self:start; width:auto; min-width:88px; height:44px; min-height:44px; display:flex; align-items:center; justify-content:center; gap:7px; padding:8px 10px; color:#eee2cc; opacity:1; background:#181711df; border:1px solid #89795f; border-radius:3px; pointer-events:auto; }
body.intro-active header.top #game-menu .menu-label { display:inline!important; font:700 13px/1.3 var(--f-body); }
body.intro-active #intro-case .intro-top { justify-content:flex-start; }
body.intro-active main { padding-top:12px; padding-bottom:calc(90px + env(safe-area-inset-bottom,0px)); }
body.intro-active #intro-case { gap:10px; padding:0 4px; }
body.intro-active #intro-case .intro-top { min-height:28px; justify-content:flex-end; }
body.intro-active #intro-case .intro-top button { min-height:28px; padding:2px 5px; color:#857c71; text-decoration:none; font-size:11px; }
body.intro-active #intro-case h1 { font-size:clamp(21px,6vw,28px); font-weight:600; letter-spacing:.06em; color:#e5dccb; }
body.intro-active #intro-case figure { border-color:#302a24; background:#0b0a08; box-shadow:0 26px 52px #000b; overflow:hidden; }
body.intro-active #intro-case figure::after { content:""; position:absolute; inset:0; border:1px solid #ffffff09; box-shadow:inset 0 0 45px 7px #0007; pointer-events:none; }
body.intro-active #intro-case .intro-image { max-height:min(58dvh,560px); width:100%; object-fit:contain; }
body.intro-active #intro-case .intro-caption { color:#bbafa1; font-size:14px; line-height:1.7; }
body.intro-active #intro-case[data-step="2"] h1 { color:#cdb9ae; }
body.intro-active #intro-case[data-step="2"] figure { border-color:#554137; }
body.intro-active .lite-footer { background:none; border:0; box-shadow:none; backdrop-filter:none; padding:0; }
body.intro-active .lite-footer .lite-tabs { display:none!important; }
body.intro-active .lite-footer .lite-pull[data-mode="intro"] { min-height:58px; background:#a99775; color:#18140f; border:1px solid #b6a17d; border-radius:4px; font:700 17px var(--f-body); text-shadow:none; box-shadow:0 8px 24px #0009; }
@media(max-height:700px) {
  body.intro-active #intro-case .intro-top { min-height:24px; }
  body.intro-active #intro-case .intro-image { max-height:42dvh; }
  body.intro-active #intro-case .intro-caption { font-size:13px; }
  body.intro-active #intro-case { gap:6px; }
}
@media(prefers-reduced-motion:reduce) {
  body.intro-active #intro-case figure::after { animation:none!important; }
}

body.lite.intro-quiet #intro-case *,body.lite.intro-quiet #intro-case *::before,body.lite.intro-quiet #intro-case *::after,body.lite.intro-quiet .lite-event *,body.lite.intro-quiet .lite-event *::after{animation:none!important;transition:none!important;}

/* Sparse introduction: the envelope is an object, not an information panel. */
body.intro-active #intro-case[data-step="0"] { padding-top:26px; gap:10px; }
/* Give the title scene a deliberate stage above the fixed opening action.
   Keep the envelope centered in the available reading area on tall and short phones. */
body.intro-active #intro-case[data-step="0"] {
  min-height:calc(100dvh - 162px - env(safe-area-inset-bottom,0px));
  align-content:center;
}
body.intro-active #intro-case[data-step="0"] .intro-title-mast { gap:5px; }
body.intro-active #intro-case[data-step="0"] > h1 { color:#c8b99f; font-size:clamp(15px,4.4vw,19px); font-weight:500; letter-spacing:.08em; }
body.intro-active #intro-case[data-step="0"] figure { border:0; background:transparent; box-shadow:none; }
body.intro-active #intro-case[data-step="0"] figure::after { box-shadow:none; border:0; }
body.intro-active #intro-case[data-step="0"] .intro-envelope { max-height:min(38dvh,340px); object-fit:contain; filter:drop-shadow(0 20px 24px #000c) saturate(.73); }
body.intro-active #intro-case[data-step="2"] .intro-time { color:#e0d7c7; }
body.intro-active .lite-footer .lite-pull[data-mode="intro"] { color:#eee0cd; background:#51241f; border-color:#855449; font-weight:600; }
body.intro-active .lite-footer .lite-pull[data-mode="intro"]:focus-visible { outline:2px solid #ebd6b0; outline-offset:3px; }

/* The optional settings page must not be covered by introduction chrome. */
body.intro-active:has([data-view="menu"]:not([hidden])) header.top,
body.intro-active:has([data-view="menu"]:not([hidden])) .lite-footer { display:none!important; }
body.intro-active:has([data-view="menu"]:not([hidden])) main { padding-top:18px; padding-bottom:28px; }

/* Menu pages provide their own back control; the introductory menu icon must not cover it. */
body.intro-active:has([data-view="menu"]:not([hidden])) header.top {display:none!important;}

/* Fade the photographed desk into the dark lower half, without losing the envelope. */
body.intro-active main { background:radial-gradient(ellipse 125% 65% at 50% 0%,#241810 0%,#15120f 52%,#111318 100%); }
body.intro-active #intro-case[data-step="0"] .intro-envelope {
  -webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 78%,transparent 100%);
  mask-image:linear-gradient(to bottom,#000 0%,#000 78%,transparent 100%);
}
/* Keep routine unread indicators from competing with the opening action.
   The menu remains available, and the badge returns as soon as the intro ends. */
body.intro-active header.top #game-menu #menu-dot { display:none!important; }

/* Make every new document heading clear of the fixed-height introductory menu. */
body.intro-active #intro-case,body.intro-active #intro-case[data-step="0"]{padding-top:50px}
@media(max-height:700px){body.intro-active #intro-case,body.intro-active #intro-case[data-step="0"]{padding-top:42px}body.intro-active #intro-case[data-step="0"]{min-height:calc(100dvh - 142px - env(safe-area-inset-bottom,0px))}body.intro-active #intro-case .intro-image{max-height:30dvh}body.intro-active #intro-case[data-step="0"] .intro-title-wordmark{font-size:38px}body.intro-active #intro-case[data-step="0"] .intro-title-mast i{height:10px}}
@media(max-height:700px) and (orientation:landscape){body.intro-active #intro-case[data-step="0"]{padding-top:36px;gap:8px}}
