:root {
  --ink: #e9eef3;
  --muted: #8e9aa6;
  --faint: #5f6d79;
  --bg: #071019;
  --panel: #0e1924;
  --panel-2: #142231;
  --line: rgba(255, 255, 255, 0.09);
  --blue: #77aecd;
  --blue-bright: #9dd6f4;
  --amber: #d6a756;
  --red: #da6d68;
  --green: #63b793;
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
  --radius: 28px;
  --text-scale: 1;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); color-scheme: dark; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(rgba(255,255,255,.017) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.017) 1px, transparent 1px),
    radial-gradient(circle at 30% 20%, #12293a 0, #071019 42%, #050a0f 100%);
  background-size: 54px 54px, 54px 54px, auto;
  font-size: calc(16px * var(--text-scale));
}
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 3px;
}
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.ambient { position: fixed; border-radius: 999px; filter: blur(90px); opacity: .16; pointer-events: none; }
.ambient-a { width: 360px; height: 360px; left: -120px; top: 8vh; background: #2b789d; }
.ambient-b { width: 300px; height: 300px; right: -120px; bottom: 7vh; background: #8b5c2a; }

.stage-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(250px, 390px) minmax(360px, 430px);
  justify-content: center;
  align-items: center;
  gap: clamp(42px, 8vw, 120px);
  padding: 30px clamp(24px, 5vw, 80px);
}
.case-note { max-width: 390px; align-self: center; }
.eyebrow { color: var(--blue); font-size: .72rem; letter-spacing: .28em; font-weight: 750; margin: 0 0 18px; }
.case-note h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(4.6rem, 9vw, 8.2rem); line-height: .76; letter-spacing: -.08em; font-weight: 500; color: #dfe7ed; }
.case-note h1 span { color: transparent; -webkit-text-stroke: 1px var(--blue); text-shadow: 0 0 36px rgba(119,174,205,.18); }
.case-line { margin: 32px 0 28px; font-family: Georgia, "Songti SC", serif; font-size: 1.18rem; line-height: 1.75; color: #b8c2ca; }
.case-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.case-meta span { border: 1px solid var(--line); color: var(--muted); padding: 7px 10px; border-radius: 999px; font-size: .76rem; }
.save-note { margin-top: 30px; color: var(--faint); font-size: .73rem; line-height: 1.65; max-width: 300px; }

.phone { position: relative; width: min(100%, 414px); height: min(852px, calc(100vh - 36px)); min-height: 680px; border: 1px solid rgba(255,255,255,.16); border-radius: 46px; padding: 10px; background: #020507; box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.05); overflow: hidden; }
.phone::before { content: ""; position: absolute; top: 16px; left: 50%; width: 94px; height: 24px; transform: translateX(-50%); border-radius: 20px; background: #030608; z-index: 15; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.phone-bezel { position: absolute; inset: 10px; border-radius: 37px; pointer-events: none; box-shadow: inset 0 0 32px rgba(0,0,0,.46); z-index: 11; }
.status-bar { position: absolute; top: 10px; left: 10px; right: 10px; height: 48px; z-index: 12; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; font-size: .68rem; letter-spacing: .04em; color: #c8d2db; pointer-events: none; }
.status-case { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8493a0; }
.screen { position: absolute; inset: 10px 10px 74px; padding-top: 48px; overflow: hidden auto; border-radius: 37px 37px 18px 18px; background: #0a121b; scrollbar-width: thin; scrollbar-color: #344b5e transparent; }
.dock { position: absolute; bottom: 10px; left: 10px; right: 10px; height: 66px; z-index: 13; display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 18px 18px 37px 37px; border-top: 1px solid var(--line); background: rgba(9,17,25,.94); backdrop-filter: blur(12px); }
.dock button { position: relative; border: 0; background: transparent; display: grid; place-content: center; gap: 2px; color: #9ba7b0; cursor: pointer; }
.dock button:hover { color: var(--blue-bright); }
.dock button span { font-size: 1.05rem; }
.dock small { font-size: .58rem; letter-spacing: .08em; }
.badge { position: absolute; top: 8px; right: 30%; min-width: 18px; height: 18px; display: grid; place-content: center; padding: 0 5px; border-radius: 999px; background: var(--red); color: white; font-size: .58rem; }

.boot, .privacy, .lock-screen, .end-screen { min-height: 100%; padding: 24px; display: flex; flex-direction: column; }
.boot { justify-content: center; align-items: center; text-align: center; background: radial-gradient(circle at 50% 45%, #112636 0, #071019 56%); }
.boot-mark { width: 82px; height: 82px; display: grid; place-content: center; border-radius: 50%; border: 1px solid var(--blue); color: var(--blue-bright); font: 2.4rem Georgia, serif; box-shadow: 0 0 54px rgba(119,174,205,.12); }
.boot h2 { font-family: Georgia, "Songti SC", serif; font-weight: 500; letter-spacing: .14em; margin: 24px 0 8px; }
.boot p { max-width: 270px; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.boot-progress { width: 210px; height: 2px; margin: 24px 0; background: #253441; overflow: hidden; }
.boot-progress i { display: block; height: 100%; width: 68%; background: var(--blue); animation: scan 2s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateX(-95%); } to { transform: translateX(125%); } }

.privacy { justify-content: center; background: linear-gradient(#0d1822, #09121a); }
.privacy .stamp { color: var(--amber); letter-spacing: .18em; font-size: .66rem; font-weight: 800; }
.privacy h2 { font-family: Georgia, "Songti SC", serif; font-size: 1.55rem; font-weight: 500; line-height: 1.35; }
.privacy p, .privacy li { color: #aeb9c2; font-size: .8rem; line-height: 1.7; }
.privacy ul { padding-left: 18px; margin: 12px 0 24px; }
.primary, .secondary, .danger, .choice-btn, .evidence-toggle, .hint-btn, .app-card, .entry-card, .option-card, .ending-card, .text-button {
  border: 0; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.primary { padding: 13px 16px; border-radius: 12px; color: #061019; background: var(--blue-bright); font-weight: 800; }
.primary:hover, .choice-btn:hover, .option-card:hover, .ending-card:hover { transform: translateY(-1px); }
.secondary { padding: 11px 14px; border: 1px solid var(--line); background: #142330; border-radius: 11px; }
.danger { padding: 11px 14px; border: 1px solid rgba(218,109,104,.42); color: #f0a8a4; background: rgba(218,109,104,.09); border-radius: 11px; }
.text-button { padding: 7px; background: transparent; color: var(--blue-bright); }

.lock-screen { justify-content: space-between; background: radial-gradient(circle at 50% 18%, rgba(62,111,141,.42), transparent 36%), linear-gradient(#0b1721, #081019); }
.lock-time { text-align: center; padding-top: 48px; }
.lock-time strong { display: block; font: 4.2rem/1 Georgia, serif; letter-spacing: -.06em; }
.lock-time span { color: #a8b5be; font-size: .76rem; }
.notifications { display: grid; gap: 9px; margin: auto 0 24px; }
.notification { padding: 13px 14px; border-radius: 15px; background: rgba(230,239,244,.09); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(12px); }
.notification header { display: flex; justify-content: space-between; gap: 10px; font-size: .68rem; color: #9ba8b2; }
.notification p { margin: 7px 0 0; font-size: .8rem; line-height: 1.55; }
.passcode { text-align: center; }
.passcode label { display: block; color: var(--muted); font-size: .72rem; margin-bottom: 8px; }
.passcode-row { display: flex; gap: 8px; }
.passcode input { min-width: 0; flex: 1; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(3,8,12,.66); color: white; text-align: center; letter-spacing: .42em; font-weight: 800; }
.passcode .error { min-height: 20px; margin: 7px 0 0; color: #e99792; font-size: .68rem; }

.app-home { min-height: 100%; padding: 26px 18px 36px; background: radial-gradient(circle at 70% 0, rgba(64,108,136,.3), transparent 35%), #0a131c; }
.home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.home-head .date { color: var(--muted); font-size: .65rem; letter-spacing: .08em; }
.home-head h2 { margin: 4px 0 0; font-family: Georgia, "Songti SC", serif; font-weight: 500; font-size: 1.45rem; }
.case-clock { padding: 7px 9px; border: 1px solid rgba(218,109,104,.28); border-radius: 10px; color: #e28a85; font: .78rem Georgia, serif; }
.objective-card { padding: 14px; margin-bottom: 18px; border-left: 3px solid var(--blue); background: linear-gradient(90deg, rgba(119,174,205,.11), rgba(119,174,205,.02)); border-radius: 4px 12px 12px 4px; }
.objective-card small { color: var(--blue); letter-spacing: .13em; font-size: .59rem; font-weight: 800; }
.objective-card p { margin: 7px 0 0; color: #c8d0d6; font-size: .76rem; line-height: 1.55; }
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.app-card { position: relative; padding: 4px; background: transparent; text-align: center; }
.app-icon { width: 58px; height: 58px; margin: 0 auto 6px; display: grid; place-content: center; border-radius: 18px; background: color-mix(in srgb, var(--app-color) 76%, #121a22); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 8px 18px rgba(0,0,0,.2); color: white; font-size: 1.45rem; }
.app-card span:last-child { font-size: .68rem; color: #c5ced5; }
.app-dot { position: absolute; top: 0; right: 17px; width: 9px; height: 9px; background: var(--red); border-radius: 50%; box-shadow: 0 0 0 2px #0a131c; }
.home-footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--faint); font-size: .6rem; }

.view { min-height: 100%; background: #0b141d; }
.view-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); background: rgba(11,20,29,.94); backdrop-filter: blur(12px); }
.view-header button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: #142331; color: #b7c2cb; cursor: pointer; }
.view-title { min-width: 0; flex: 1; }
.view-title h2 { margin: 0; font-size: .92rem; }
.view-title p { margin: 3px 0 0; color: var(--muted); font-size: .58rem; }
.view-content { padding: 14px 14px 34px; }
.entry-list { display: grid; gap: 9px; }
.entry-card { width: 100%; padding: 13px; display: grid; grid-template-columns: 44px 1fr auto; gap: 11px; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: #101d28; text-align: left; }
.entry-card:hover { background: #142432; border-color: rgba(119,174,205,.3); }
.entry-symbol { width: 42px; height: 42px; display: grid; place-content: center; border-radius: 12px; background: #192a38; color: var(--blue-bright); font: 1rem Georgia, serif; }
.entry-thumbnail { width: 64px; height: 52px; display: block; object-fit: cover; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: #071019; }
.entry-card.has-thumbnail { grid-template-columns: 64px 1fr auto; padding: 9px; }
.entry-copy { min-width: 0; }
.entry-copy strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .78rem; }
.entry-copy small { display: block; margin-top: 4px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .59rem; }
.entry-badge { color: var(--amber); font-size: .55rem; }
.empty-state { padding: 52px 22px; text-align: center; color: var(--muted); font-size: .75rem; line-height: 1.7; }

.detail { padding: 18px 16px 42px; }
.detail-kicker { color: var(--amber); font-size: .6rem; letter-spacing: .12em; font-weight: 800; }
.detail h2 { margin: 8px 0 6px; font: 1.34rem/1.3 Georgia, "Songti SC", serif; font-weight: 500; }
.detail-meta { color: var(--muted); font-size: .64rem; }
.detail-body { margin-top: 18px; }
.detail-body p { margin: 0 0 12px; color: #d2d9de; font-size: .78rem; line-height: 1.72; }
.detail-quote { margin: 16px 0; padding: 12px 13px; border-left: 3px solid var(--blue); border-radius: 4px 10px 10px 4px; background: rgba(119,174,205,.1); color: #c9d9e3; font-size: .76rem; line-height: 1.65; }
.visual { width: 100%; height: 254px; margin: 16px 0; padding: 0; display: grid; place-content: center; position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: linear-gradient(145deg, #172936, #0b131b 68%); }
.visual::before, .visual::after { content: ""; position: absolute; }
.visual span { position: relative; z-index: 2; padding: 8px 10px; color: #dbe5eb; background: rgba(2,8,12,.66); border: 1px solid rgba(255,255,255,.11); border-radius: 8px; font: .7rem Georgia, serif; letter-spacing: .08em; }
.visual-photo { display: block; cursor: zoom-in; text-align: left; }
.visual-photo::before, .visual-photo::after { display: none; }
.visual-photo img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .28s ease; }
.visual-photo:hover img { transform: scale(1.025); }
.image-lightbox { margin: 0; }
.image-lightbox img { width: 100%; max-height: 68vh; display: block; object-fit: contain; border-radius: 12px; background: #05090d; }
.image-lightbox figcaption { margin-top: 12px; color: #b9c4cc; font-size: .72rem; line-height: 1.6; }
.visual-transcript { margin: -4px 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #0d1821; }
.visual-transcript summary { padding: 10px 12px; color: var(--muted); cursor: pointer; font-size: .68rem; }
.visual-transcript:not([open]) .detail-body { display: none; }
.visual-transcript .detail-body { margin: 0; padding: 0 12px 2px; }
.visual-tower::before { width: 86px; height: 134px; bottom: -8px; background: #1c2b33; clip-path: polygon(20% 0,80% 0,80% 20%,100% 20%,100% 100%,0 100%,0 20%,20% 20%); box-shadow: 0 0 30px #071018; }
.visual-control::before { width: 160px; height: 116px; border: 7px solid #273744; background: #10171d; box-shadow: inset 0 0 0 1px #65717b; }
.visual-control::after { width: 52px; height: 8px; background: #7b8791; transform: rotate(-35deg); }
.visual-yellow::before, .visual-family::before { width: 78px; height: 112px; background: #b99340; clip-path: polygon(26% 0,74% 0,100% 28%,84% 100%,16% 100%,0 28%); }
.visual-yellow::after, .visual-family::after { width: 20px; height: 13px; border-radius: 50%; background: #5f91b1; top: 76px; left: calc(50% - 10px); }
.visual-clock::before, .visual-fire::before { width: 110px; height: 110px; border: 8px solid #455663; border-radius: 50%; box-shadow: inset 0 0 0 1px #9aabb6; }
.visual-fire::after { width: 150px; height: 76px; bottom: -18px; background: radial-gradient(ellipse at center, #cc6d3e, #7a271e 55%, transparent 70%); filter: blur(8px); }
.visual-route::before { width: 190px; height: 120px; background: repeating-linear-gradient(90deg, transparent 0 34px, rgba(255,255,255,.08) 35px), repeating-linear-gradient(0deg, transparent 0 28px, rgba(255,255,255,.08) 29px); }
.visual-route::after { width: 160px; height: 4px; background: var(--blue); transform: rotate(-28deg); box-shadow: 38px 20px 0 -1px var(--blue); }
.transcript { margin: 16px 0; padding: 12px; border-radius: 12px; background: #0a1118; border: 1px solid var(--line); }
.wave { height: 32px; display: flex; align-items: center; gap: 3px; margin-bottom: 12px; }
.wave i { width: 3px; height: 45%; background: var(--blue); opacity: .7; animation: wave 1.2s ease-in-out infinite alternate; }
.wave i:nth-child(3n) { height: 88%; animation-delay: -.3s; }
.wave i:nth-child(4n) { height: 66%; animation-delay: -.8s; }
@keyframes wave { to { transform: scaleY(.38); opacity: .35; } }
.transcript p { color: #bed0dc; font-size: .7rem; margin: 0 0 8px; line-height: 1.55; }
.evidence-box { margin-top: 20px; padding: 13px; border: 1px solid rgba(214,167,86,.32); border-radius: 12px; background: rgba(214,167,86,.07); }
.evidence-box strong { display: block; color: #e4c284; font-size: .7rem; }
.evidence-box p { margin: 6px 0 10px; color: #c6cdd2; font-size: .7rem; line-height: 1.55; }
.evidence-toggle { width: 100%; padding: 11px; border-radius: 10px; background: #d0a552; color: #0d1115; font-weight: 850; font-size: .72rem; }
.evidence-toggle.collected { color: #b9d9cc; background: rgba(99,183,147,.14); border: 1px solid rgba(99,183,147,.3); cursor: default; }

.archive-head { padding: 16px; border-bottom: 1px solid var(--line); }
.archive-head h2 { margin: 0; font: 1.25rem Georgia, "Songti SC", serif; }
.archive-head p { color: var(--muted); font-size: .66rem; line-height: 1.55; }
.progress-track { height: 4px; margin-top: 12px; border-radius: 99px; background: #24333e; overflow: hidden; }
.progress-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--amber)); }
.evidence-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0 18px; }
.evidence-chip { padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #0e1922; color: var(--muted); font-size: .59rem; line-height: 1.4; }
.evidence-chip strong { color: var(--amber); margin-right: 4px; }
.deduction-list { display: grid; gap: 10px; }
.deduction-card { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #101d28; }
.deduction-card.solved { border-color: rgba(99,183,147,.3); background: rgba(99,183,147,.06); }
.deduction-card.locked { opacity: .58; }
.deduction-card header { display: flex; justify-content: space-between; gap: 10px; }
.deduction-card h3 { margin: 0; font-size: .76rem; }
.deduction-card p { margin: 8px 0 0; color: var(--muted); font-size: .65rem; line-height: 1.55; }
.deduction-card button { margin-top: 10px; width: 100%; padding: 10px; border: 0; border-radius: 9px; background: #24445a; color: #dceaf2; cursor: pointer; }

.puzzle p { color: #cbd3d8; font-size: .76rem; line-height: 1.6; }
.required-evidence { margin: 10px 0; padding: 10px; border-radius: 10px; background: #0a131a; color: var(--muted); font-size: .62rem; line-height: 1.6; }
.required-evidence .have { color: #abd8c4; }
.option-list { display: grid; gap: 8px; margin: 13px 0; }
.option-card { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #142431; text-align: left; color: #d3dbe0; font-size: .7rem; line-height: 1.45; }
.option-card.selected { border-color: var(--blue); background: rgba(119,174,205,.15); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.form-row label, .triple-select label { color: var(--muted); font-size: .62rem; }
.form-row input, .triple-select select { width: 100%; margin-top: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #0c151d; color: white; }
.triple-select { display: grid; gap: 10px; margin: 12px 0; }
.puzzle-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.hint-btn { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--amber); }
.feedback { min-height: 24px; margin-top: 10px; color: #e39792; font-size: .66rem; line-height: 1.5; }
.hint-box { margin-top: 10px; padding: 10px; border-left: 2px solid var(--amber); background: rgba(214,167,86,.07); color: #d7c399; font-size: .65rem; line-height: 1.55; }

.chat-screen { min-height: 100%; padding: 14px 12px 36px; background: linear-gradient(#0a131c, #0d1821); }
.chat-day { text-align: center; color: var(--muted); font-size: .58rem; margin-bottom: 14px; }
.bubble { max-width: 86%; margin: 0 0 8px; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: #192a38; color: #d3dce2; font-size: .71rem; line-height: 1.55; }
.bubble.player { margin-left: auto; border-radius: 14px 14px 4px 14px; background: #315f77; color: white; }
.chat-choices { display: grid; gap: 8px; margin-top: 18px; }
.choice-btn { padding: 11px; border: 1px solid rgba(119,174,205,.26); border-radius: 11px; background: #10212d; text-align: left; color: #dce6ec; font-size: .68rem; line-height: 1.45; }
.chat-warning { margin: 10px 0; color: #e48d87; font-size: .62rem; text-align: center; }

.ending-select { padding: 18px 14px 34px; }
.ending-select h2 { margin: 0 0 5px; font: 1.28rem Georgia, "Songti SC", serif; }
.ending-select > p { color: var(--muted); font-size: .7rem; line-height: 1.6; }
.ending-list { display: grid; gap: 10px; margin-top: 16px; }
.ending-card { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #111f2b; text-align: left; }
.ending-card small { color: var(--amber); font-size: .56rem; letter-spacing: .12em; }
.ending-card h3 { margin: 6px 0; font: 1rem Georgia, "Songti SC", serif; }
.ending-card p { margin: 0; color: var(--muted); font-size: .65rem; line-height: 1.5; }
.ending-card.recommended { border-color: rgba(119,174,205,.4); background: linear-gradient(135deg, rgba(119,174,205,.13), #111f2b); }
.end-screen { gap: 16px; padding: 26px 18px 36px; background: radial-gradient(circle at 50% 0, rgba(119,174,205,.13), transparent 30%), #09121a; }
.end-kicker { color: var(--amber); font-size: .6rem; letter-spacing: .16em; }
.end-screen h2 { margin: 0; font: 2.1rem Georgia, "Songti SC", serif; font-weight: 500; }
.end-action { color: var(--blue-bright); font-size: .74rem; }
.end-result { display: grid; gap: 10px; }
.end-result p { margin: 0; color: #c8d1d7; font-size: .72rem; line-height: 1.7; }
.end-final { padding: 13px; border-left: 3px solid var(--blue); background: rgba(119,174,205,.08); color: #d6e4ec; font-family: Georgia, "Songti SC", serif; font-size: .78rem; line-height: 1.7; }
.achievement { padding: 12px; border: 1px solid rgba(214,167,86,.25); border-radius: 11px; color: #e1c790; background: rgba(214,167,86,.05); font-size: .67rem; }
.end-actions { display: grid; gap: 8px; }

.settings { display: grid; gap: 14px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #101d28; }
.setting-row label { font-size: .7rem; }
.setting-row small { display: block; margin-top: 4px; color: var(--muted); font-size: .56rem; }
.setting-row select { padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #0b151d; }
.switch { appearance: none; width: 42px; height: 23px; position: relative; border-radius: 99px; background: #35434e; cursor: pointer; }
.switch::after { content: ""; position: absolute; width: 17px; height: 17px; top: 3px; left: 3px; border-radius: 50%; background: white; transition: transform .16s; }
.switch:checked { background: var(--blue); }
.switch:checked::after { transform: translateX(19px); }

.modal-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(1,5,8,.78); backdrop-filter: blur(10px); }
.modal { width: min(440px, 100%); max-height: min(760px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 20px; background: #0d1822; box-shadow: var(--shadow); }
.modal > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal h2 { margin: 0; font-size: .9rem; }
.modal header button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: #172735; color: #c4cdd3; cursor: pointer; font-size: 1.2rem; }
.modal-body { padding: 16px; overflow: auto; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 80; max-width: min(360px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: #142532; color: #dbe5eb; box-shadow: 0 12px 34px rgba(0,0,0,.35); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .22s ease; font-size: .68rem; line-height: 1.5; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

body.high-contrast { --ink: #fff; --muted: #c9d1d8; --line: rgba(255,255,255,.24); --blue: #9bdcff; --blue-bright: #caf0ff; }
body.high-contrast .phone { border-color: rgba(255,255,255,.4); }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* App-native surfaces */
.header-more { width: auto !important; padding: 0 4px; border: 0 !important; background: transparent !important; color: inherit !important; letter-spacing: .1em; }
.contact-avatar { width: 48px; height: 48px; display: block; flex: 0 0 auto; border-radius: 8px; object-fit: cover; background: #d9dde0; }
.avatar-fallback { display: grid; place-items: center; background: #60717f; color: white; font-weight: 700; }

.messages-view { color: #151515; background: #ededed; }
.messages-view .view-header { border-color: #d5d5d5; background: rgba(237,237,237,.96); }
.messages-view .view-header > button { background: transparent; color: #111; font-size: 1.45rem; }
.messages-view .view-title h2 { color: #111; }
.messages-view .view-title p { color: #737373; }
.messages-view .view-content { padding: 0 0 30px; }
.message-search { margin: 8px 12px; padding: 7px 10px; border-radius: 6px; background: white; color: #9a9a9a; text-align: center; font-size: .7rem; }
.wechat-list { border-top: 1px solid #d8d8d8; background: #f7f7f7; }
.wechat-thread { width: 100%; min-height: 68px; padding: 9px 12px; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 11px; border: 0; background: transparent; color: #111; text-align: left; cursor: pointer; }
.wechat-thread + .wechat-thread { border-top: 1px solid #dfdfdf; }
.avatar-wrap { position: relative; }
.thread-unread { position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border: 2px solid #f7f7f7; border-radius: 50%; background: #f04b46; }
.thread-copy { min-width: 0; display: grid; gap: 5px; }
.thread-copy strong { overflow: hidden; color: #151515; font-size: .82rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.thread-copy small { overflow: hidden; color: #8b8b8b; font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.thread-time { align-self: start; padding-top: 4px; color: #a0a0a0; font-size: .56rem; }
.chat-profile-strip { padding: 10px 12px 5px; }
.chat-profile-strip > button { width: 100%; padding: 9px 10px; display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; border: 0; border-radius: 10px; background: rgba(255,255,255,.64); color: #171717; text-align: left; cursor: pointer; }
.chat-profile-strip .strip-avatar { width: 44px; height: 44px; }
.chat-profile-strip span { display: grid; gap: 3px; }
.chat-profile-strip strong { font-size: .75rem; font-weight: 600; }
.chat-profile-strip small { color: #808080; font-size: .57rem; }
.chat-profile-strip i { color: #aaa; font-style: normal; }
.wechat-chat { padding: 7px 12px 18px; }
.wechat-chat .chat-day { margin: 6px 0 18px; color: #969696; }
.wechat-message { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 13px; }
.wechat-message.player { justify-content: flex-end; }
.wechat-message > div { max-width: 76%; display: grid; gap: 4px; }
.wechat-message.player > div { justify-items: end; }
.chat-avatar-button { flex: 0 0 auto; padding: 0; border: 0; background: transparent; cursor: pointer; }
.contact-avatar.chat-avatar { width: 36px; height: 36px; border-radius: 6px; }
.wechat-bubble { position: relative; display: block; padding: 9px 11px; border-radius: 5px; background: white; color: #151515; font-size: .72rem; line-height: 1.55; box-shadow: 0 1px 1px rgba(0,0,0,.05); }
.wechat-message.player .wechat-bubble { background: #95ec69; }
.wechat-message small { color: #9a9a9a; font-size: .52rem; }
.wechat-system { max-width: 82%; margin: 8px auto 14px; color: #8e8e8e; font-size: .58rem; line-height: 1.5; text-align: center; }
.messages-view .evidence-box, .notes-view .evidence-box, .browser-view .evidence-box { margin-inline: 12px; border-color: #dbc178; background: #fff8df; }
.messages-view .evidence-box strong, .notes-view .evidence-box strong, .browser-view .evidence-box strong { color: #8a6417; }
.messages-view .evidence-box p, .notes-view .evidence-box p, .browser-view .evidence-box p { color: #5e5337; }
.contact-profile { padding: 8px 4px 4px; text-align: center; }
.contact-profile .profile-avatar { width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 18px; }
.contact-profile h3 { margin: 0; font-size: 1.15rem; }
.contact-profile > p { margin: 6px 0 18px; color: #a9b5bd; font-size: .72rem; }
.contact-facts { display: grid; gap: 0; border-block: 1px solid var(--line); text-align: left; }
.contact-facts span { padding: 12px 4px; color: #c6d0d7; font-size: .68rem; line-height: 1.5; }
.contact-facts span + span { border-top: 1px solid var(--line); }
.contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.contact-actions button { padding: 11px; border: 0; border-radius: 10px; background: #172735; color: #8997a1; }

.gallery-view .view-content { padding: 6px 6px 30px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.photo-tile { position: relative; aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; background: #111; cursor: pointer; }
.photo-tile img { width: 100%; height: 100%; display: block; object-fit: cover; }
.photo-unread { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.gallery-detail { padding: 8px; }
.gallery-observation { padding: 6px; }
.observation-instruction { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 5px 10px; color: #8c9aa5; font-size: .6rem; }
.observation-instruction strong { color: #c3d9e6; font-weight: 600; }
.observation-frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 12px; background: #04080b; box-shadow: 0 12px 34px rgba(0,0,0,.3); }
.observation-frame > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.photo-hotspot { position: absolute; left: var(--x); top: var(--y); width: 42px; height: 42px; padding: 0; transform: translate(-50%,-50%); border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.photo-hotspot::before { content: ""; position: absolute; inset: 13px; border: 1px solid rgba(255,255,255,.88); border-radius: 50%; background: rgba(255,255,255,.2); box-shadow: 0 0 0 5px rgba(126,196,231,.08), 0 0 14px rgba(176,220,242,.55); animation: clue-pulse 1.8s ease-in-out infinite; }
.photo-hotspot span { position: absolute; left: 50%; bottom: 36px; width: max-content; max-width: 140px; padding: 6px 8px; transform: translateX(-50%) translateY(4px); border: 1px solid rgba(255,255,255,.24); border-radius: 7px; background: rgba(4,10,14,.9); color: white; opacity: 0; pointer-events: none; font-size: .6rem; line-height: 1.3; white-space: nowrap; }
.photo-hotspot.found::before { inset: 10px; border-color: #9fdbf8; background: rgba(81,158,201,.55); animation: none; }
.photo-hotspot.found span { transform: translateX(-50%) translateY(0); opacity: 1; }
@keyframes clue-pulse { 0%,100% { opacity: .42; transform: scale(.84); } 50% { opacity: 1; transform: scale(1.12); } }
.observation-status { min-height: 34px; margin: 10px 5px 8px; color: #bcc8cf; font-size: .65rem; line-height: 1.55; }
.gallery-observation .visual-transcript { margin: 0 5px 12px; }

.notes-view { color: #1d1d1f; background: #f4f4f7; }
.notes-view .view-header { border-color: #dedee3; background: rgba(244,244,247,.96); }
.notes-view .view-header > button { background: transparent; color: #d99a00; font-size: 1.45rem; }
.notes-view .view-title h2 { color: #111; font-size: 1.2rem; }
.notes-view .view-title p { color: #777; }
.notes-view .view-content { padding: 10px 14px 62px; }
.notes-search { padding: 8px 11px; border-radius: 10px; background: #e4e4e9; color: #85858a; font-size: .68rem; }
.notes-section h3 { margin: 18px 3px 7px; color: #77777d; font-size: .64rem; font-weight: 600; }
.note-row { width: 100%; padding: 11px 12px; display: grid; gap: 4px; border: 0; border-radius: 11px; background: white; color: #1d1d1f; text-align: left; cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.note-row + .note-row { margin-top: 7px; }
.note-row strong { font-size: .76rem; }
.note-row span { overflow: hidden; color: #4f4f54; font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.note-row small { color: #9b9ba0; font-size: .56rem; }
.notes-toolbar { position: sticky; bottom: -62px; margin: 24px -14px -62px; padding: 12px 16px 16px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #dedee3; background: rgba(249,249,251,.96); color: #8c8c91; font-size: .58rem; }
.notes-toolbar button { border: 0; background: transparent; color: #d99a00; font-size: 1.1rem; }
.note-detail-view .view-content { padding-top: 0; background: #fffef8; }
.iphone-note { min-height: 100%; padding: 10px 3px 30px; }
.note-actions { display: flex; justify-content: space-between; color: #d99a00; font-size: .66rem; }
.iphone-note h2 { margin: 22px 0 4px; color: #161616; font-size: 1.18rem; line-height: 1.35; }
.iphone-note time { color: #9c9c9c; font-size: .58rem; }
.note-paper { margin-top: 18px; }
.note-paper p { margin: 0 0 14px; color: #242424; font-size: .77rem; line-height: 1.72; }

.browser-view { color: #1b1b1f; background: #f2f2f7; }
.browser-view .view-header { border-color: #d8d8dd; background: rgba(246,246,249,.96); }
.browser-view .view-header > button { background: transparent; color: #2475d0; font-size: 1.45rem; }
.browser-view .view-title h2 { color: #18181b; }
.browser-view .view-title p { color: #79797e; }
.browser-view .view-content { padding: 0 10px 62px; }
.browser-address { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 9px 0; background: rgba(242,242,247,.96); }
.browser-address > span, .browser-address > button { padding: 0; border: 0; background: transparent; color: #2475d0; font-size: .62rem; }
.browser-address > div { padding: 7px 10px; border-radius: 10px; background: #dfdfe5; color: #55555b; text-align: center; font-size: .62rem; }
.browser-address i { font-style: normal; font-size: .55rem; }
.browser-query { margin: 8px 2px 12px; color: #808087; font-size: .62rem; }
.browser-results { display: grid; gap: 9px; }
.browser-result { width: 100%; padding: 13px; display: grid; gap: 5px; border: 0; border-radius: 13px; background: white; color: #151519; text-align: left; cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.browser-result small { color: #77777e; font-size: .54rem; }
.browser-result strong { color: #1d63b5; font: .85rem Georgia, "Songti SC", serif; }
.browser-result span { display: -webkit-box; overflow: hidden; color: #515157; font-size: .62rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.browser-toolbar { position: sticky; bottom: -62px; margin: 18px -10px -62px; padding: 12px 22px 16px; display: flex; justify-content: space-between; border-top: 1px solid #d5d5db; background: rgba(248,248,250,.96); color: #2475d0; font-size: 1rem; }
.browser-detail-view .view-content { padding-inline: 0; }
.browser-detail-view .browser-toolbar { margin-inline: 0; }
.browser-address-detail { padding-inline: 10px; }
.browser-page { padding: 22px 14px 10px; background: white; }
.browser-domain { margin: 0 0 7px; color: #6d6d72; font-size: .58rem; }
.browser-page h2 { margin: 0; color: #17171a; font: 1.25rem/1.35 Georgia, "Songti SC", serif; }
.browser-page-meta { color: #85858a; font-size: .59rem; }
.browser-page .visual { margin-top: 16px; border-radius: 8px; }
.browser-page .visual-transcript { margin-top: 10px; border-color: #dedee3; background: #f6f6f8; }
.browser-page .visual-transcript summary { color: #66666c; }
.browser-page .detail-body p { color: #333338; }

@media (max-width: 900px) {
  body { background: #050a0f; }
  .ambient, .case-note { display: none; }
  .stage-shell { display: block; min-height: 100vh; padding: 0; }
  .phone { width: 100%; height: 100vh; min-height: 620px; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
  .phone::before { top: 7px; }
  .phone-bezel { display: none; }
  .status-bar { top: 0; left: 0; right: 0; }
  .screen { inset: 0 0 64px; border-radius: 0; }
  .dock { bottom: 0; left: 0; right: 0; height: 64px; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-height: 730px) and (min-width: 901px) {
  .phone { height: calc(100vh - 20px); min-height: 620px; }
  .stage-shell { padding-top: 10px; padding-bottom: 10px; }
  .case-note h1 { font-size: 5rem; }
}
