/* Title */
#title { background: var(--bg); }
.title-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 40px 24px 36px; gap: 14px; overflow-y: auto; }
.kicker { color: var(--subtle); font-size: 0.8125rem; letter-spacing: .08em; text-transform: uppercase; }
#title h1 { font-size: clamp(38px, 11vw, 48px); line-height: 1; letter-spacing: -.03em; font-weight: 700; }
.logline { color: var(--muted); font-size: 1.0625rem; line-height: 1.45; }
.rules { color: var(--muted); font-size: 0.875rem; display: grid; gap: 6px; }
.rules li { padding-left: 14px; position: relative; }
.rules li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 1px; background: var(--subtle); }
.notes { color: var(--subtle); font-size: 0.75rem; }
.notice { color: var(--warn); font-size: 0.875rem; }
.error { color: var(--danger); font-size: 0.875rem; }
#access { display: grid; gap: 10px; margin-top: 6px; }
#access label { color: var(--muted); font-size: 0.875rem; }
#access input[type="text"] { padding: 13px 14px; font-size: 1.0625rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); width: 100%; }
#access input:focus-visible, .primary:focus-visible, .secondary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.adult { display: flex; gap: 10px; align-items: flex-start; line-height: 1.35; }
.adult input { width: 22px; height: 22px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--accent); }
.title-actions { display: flex; gap: 10px; margin-top: 8px; }
.primary { background: var(--accent); color: #0b0d12; font-weight: 700; padding: 13px 22px; border-radius: 14px; }
.primary:disabled { opacity: .5; cursor: default; }
.secondary { border: 1px solid var(--line); color: var(--muted); padding: 13px 18px; border-radius: 14px; }
/* Tabs */
#tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: var(--surface); padding-bottom: var(--safe-bottom); position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; }
#tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.6875rem; color: var(--subtle); padding: 8px 0 6px; position: relative; }
#tabs button.active { color: var(--text); }
#tabs .icon { font-size: 1.125rem; line-height: 1; }
#tabs .dot { position: absolute; top: 8px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.screen.tabbed { bottom: calc(52px + var(--safe-bottom)); }
/* Sheets, toasts */
#sheet-backdrop { position: absolute; inset: 0; background: #0009; z-index: 20; }
#sheet, #picker { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface-2); border-radius: 18px 18px 0 0; padding: 10px 10px calc(14px + var(--safe-bottom)); z-index: 21; display: grid; gap: 4px; max-height: 70%; overflow-y: auto; }
#sheet button, #picker button { width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px; font-size: 1rem; }
#sheet button:hover, #picker button:hover { background: var(--surface); }
#toast { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); background: var(--surface-2); color: var(--text); padding: 10px 16px; border-radius: 999px; font-size: 0.875rem; z-index: 30; box-shadow: 0 8px 30px #000a; }
#banner { position: absolute; top: 8px; left: 10px; right: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; z-index: 25; display: flex; gap: 10px; align-items: center; cursor: pointer; box-shadow: 0 10px 30px #000b; }
#banner .who { font-weight: 600; font-size: 0.875rem; }
#banner .what { color: var(--muted); font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#clock-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
#clock-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width var(--t-slow) var(--ease); }
#clock-bar[data-late] i { background: var(--warn); }
/* Lock screen */
#lock { background: var(--bg); }
.lock-wall { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 10%, #2a2326 0%, #0c0d12 55%, #050507 100%); }
.lock-wall[style] { background-size: cover; background-position: center; filter: brightness(.45); }
.lock-body { position: relative; display: flex; flex-direction: column; height: 100%; padding: 26px 14px 20px; gap: 6px; }
#lock .date { text-align: center; color: #e8e6e1cc; font-size: 0.9375rem; font-weight: 500; }
#lock .time { text-align: center; font-size: 4.5rem; font-weight: 300; letter-spacing: -.04em; line-height: 1; color: #f2f0eb; margin-bottom: 10px; }
#notifications { flex: 1; display: flex; width: 100%; flex-direction: column; gap: 8px; overflow-y: auto; }
.notification { display: flex; gap: 10px; align-items: flex-start; background: #ffffff1c; backdrop-filter: blur(14px); border-radius: 16px; padding: 10px 12px; animation: drop var(--t-slow) var(--ease); }
.notification.still { animation: none; }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.lock-wall { background-size: cover; background-position: center; }
.avatar { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #3a3f52; color: #fff; font-size: 0.8125rem; font-weight: 700; }
.notification .text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.notification .who { font-size: 0.8125rem; font-weight: 600; }
.notification .head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.notification .head .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification .when { flex: none; font-size: 0.75rem; color: #e8e6e199; font-variant-numeric: tabular-nums; }
.notification .what { font-size: 0.875rem; color: #e8e6e1; white-space: pre-line; }
.photo-note { font-size: 0.75rem; color: var(--muted); }
.lock-actions { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; }
.ghost { color: var(--muted); padding: 10px 14px; }
/* Stories & Files */
.empty { color: var(--subtle); padding: 30px 20px; text-align: center; }
.rings { display: flex; gap: 14px; padding: 10px 14px; overflow-x: auto; }
.ring { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; }
.ring .avatar { width: 56px; height: 56px; font-size: 1.0625rem; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--line); }
.ring.new .avatar { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.ring-name { font-size: 0.75rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 4px 0 70px; }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-who { position: absolute; left: 6px; bottom: 6px; font-size: 0.6875rem; color: #fff; text-shadow: 0 1px 2px #000; }
#tabs button.badge .icon::after { content: ""; position: absolute; top: 6px; right: calc(50% - 14px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.file-list { display: grid; gap: 10px; padding: 10px 14px 70px; }
.file { background: var(--surface); border-radius: var(--radius-card); padding: 12px; display: grid; gap: 8px; }
.file-head { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; }
.file-title { font-weight: 600; } .file-meta { grid-column: 2; font-size: 0.75rem; color: var(--subtle); }
.doc { width: 100%; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.doc img { width: 100%; display: block; }
.file-caption { font-size: 0.875rem; color: var(--muted); }
.share { justify-self: end; color: var(--accent); font-weight: 600; padding: 8px 12px; }
.voice { display: grid; gap: 6px; }
.v-row { display: flex; align-items: center; gap: 10px; }
.voice .play { width: 40px; height: 40px; min-width: 40px; border-radius: 50%; background: var(--accent); color: #0b0d12; font-size: 0.875rem; }
.waveform { flex: 1; display: flex; align-items: center; gap: 2px; height: 36px; }
.waveform i { flex: 1; height: 40%; background: var(--line); border-radius: 2px; }
.waveform i.played { background: var(--accent); }
.elapsed { font-size: 0.75rem; color: var(--subtle); min-width: 72px; text-align: right; }
.transcript { font-size: 0.875rem; color: var(--muted); font-style: italic; }
.voice-error { font-size: 0.8125rem; color: var(--danger); }
/* Viewer */
#viewer { position: absolute; inset: 0; background: #000; z-index: 40; display: flex; flex-direction: column; }
.viewer-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-top)) 12px 8px; color: #ddd; font-size: 0.8125rem; }
.v-who { font-weight: 600; } .stamp { color: #999; flex: 1; }
.v-close { font-size: 1.75rem; color: #ddd; }
.stage { flex: 1; display: grid; place-items: center; overflow: hidden; }
.stage img { max-width: 100%; max-height: 100%; transition: transform var(--t-fast) var(--ease); }
.v-caption { color: #ccc; font-size: 0.875rem; padding: 8px 14px; text-align: center; }
.v-nav { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 4px 0 calc(16px + var(--safe-bottom)); color: #888; font-size: 0.8125rem; }
.v-nav button { color: #ddd; font-size: 1.75rem; }
.v-nav button:disabled { opacity: .3; }
/* Case */
#case .scroll { padding: 0 14px 90px; display: grid; gap: 18px; align-content: start; }
.clock-note { font-size: 0.8125rem; color: var(--subtle); padding-top: 8px; }
.clock-note.late { color: var(--warn); }
#case h3 { font-size: 0.9375rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.lane { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 6px; margin: 4px 0; }
.lane-name { font-size: 0.8125rem; color: var(--muted); }
.track { position: relative; height: 44px; background: var(--surface); border-radius: 8px; overflow: hidden; }
.block { position: absolute; top: 4px; bottom: 4px; min-width: 44px; padding: 2px 6px; border-radius: 6px; background: var(--mine); display: grid; align-content: center; text-align: left; overflow: hidden; }
.block .place { font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.block .by { font-size: 0.625rem; color: var(--muted); white-space: nowrap; }
.block[data-withdrawn="true"] { background: var(--surface-2); color: var(--subtle); text-decoration: line-through; }
.block.clashed { outline: 1.5px solid var(--danger); }
.axis { display: flex; justify-content: space-between; font-size: 0.6875rem; color: var(--subtle); padding: 2px 0 0 58px; }
.clash { display: block; width: 100%; text-align: left; font-size: 0.8125rem; color: var(--danger); background: #ff6b6b14; border: 1px solid #ff6b6b44; border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.card { display: grid; width: 100%; text-align: left; background: var(--surface); border-radius: var(--radius-card); padding: 10px 12px; margin-bottom: 6px; }
.card-title { font-weight: 600; } .card-src { font-size: 0.75rem; color: var(--subtle); }
.cta { display: grid; }
.accuse { background: var(--surface); border-radius: 14px; padding: 12px; display: grid; gap: 10px; }
.accuse-head { display: flex; align-items: center; gap: 10px; } .accuse-head h3 { flex: 1; margin: 0; color: var(--text); }
.attempts { font-size: 0.75rem; color: var(--subtle); }
.q { font-size: 0.9375rem; }
.choices { display: grid; gap: 6px; }
.choice { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid transparent; }
.choice.on { border-color: var(--accent); }
.choice .avatar { width: 32px; height: 32px; font-size: 0.75rem; }
.accuse-actions, .accuse-nav, .accuse-foot { display: flex; gap: 8px; justify-content: flex-end; }
.result { color: var(--warn); font-size: 0.875rem; }
/* Debrief */
.debrief-body { padding: 24px 20px 40px; display: grid; gap: 12px; align-content: start; }
#debrief h1 { font-size: 2.5rem; line-height: 1; letter-spacing: -.03em; }
.ending-text { color: var(--muted); font-size: 1.0625rem; line-height: 1.45; }
.culprit { font-size: 0.9375rem; color: var(--muted); } .culprit strong { color: var(--text); }
#debrief h2 { font-size: 0.8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); margin-top: 14px; }
.timeline { display: grid; gap: 8px; }
.timeline li { display: grid; grid-template-columns: 76px 1fr; gap: 10px; font-size: 0.875rem; }
.timeline li[data-found="false"] { opacity: .45; }
.tl-time { color: var(--subtle); font-variant-numeric: tabular-nums; }
.secrets { display: grid; gap: 6px; font-size: 0.875rem; color: var(--muted); } .secrets strong { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border-radius: var(--radius-card); padding: 10px; display: grid; }
.stat .value { font-size: 1.375rem; font-weight: 700; } .stat .label { font-size: 0.6875rem; color: var(--subtle); }
.standings { display: grid; gap: 6px; }
.standing { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--muted); }
.dots-row { display: inline-flex; gap: 5px; } .dots-row i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); } .dots-row i.on { background: var(--accent); }
.debrief-actions { display: flex; gap: 10px; margin-top: 16px; }
/* Menu and panels */
.panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface-2); border-radius: 18px 18px 0 0; padding: 12px 10px calc(14px + var(--safe-bottom)); z-index: 22; display: grid; gap: 4px; max-height: 80%; overflow-y: auto; }
.panel p { padding: 6px 12px; font-size: 0.9375rem; line-height: 1.45; }
.panel-title { color: var(--muted); font-size: 0.8125rem; letter-spacing: .06em; text-transform: uppercase; }
.menu-row { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border-radius: 12px; font-size: 1rem; }
.menu-row:hover { background: var(--surface); }
.menu-row .switch { color: var(--subtle); font-size: 0.875rem; }
.menu-row[aria-checked="true"] .switch { color: var(--accent); }
.seg { display: inline-flex; gap: 4px; }
.seg button { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 0.8125rem; min-width: 40px; min-height: 36px; }
.seg button.on { border-color: var(--accent); color: var(--accent); }
.panel .cancel { color: var(--muted); text-align: center; padding: 12px; }
#banner .text { display: grid; gap: 1px; min-width: 0; }
#banner .who, #banner .what { display: block; }
