/* Player (/) and evidence tag (/tag) — clean white lab style */
:root {
  --ink: #111;
  --muted: #777;
  --line: #e6e6e6;
  --accent: #b3121b;
  --bg: #fff;
  --soft: #f5f5f5;
}
body {
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
}
.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
  gap: 20px;
  text-align: center;
}
.title {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.big-btn {
  width: min(100%, 360px);
  min-height: 88px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--bg);
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.big-btn:active { background: var(--soft); transform: scale(0.99); }
.big-btn.primary { background: var(--ink); color: #fff; }
.big-btn.primary:active { background: #333; }
.big-btn:disabled { opacity: 0.45; }
.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  font-size: 15px;
  padding: 12px;
}
.status-line {
  min-height: 1.4em;
  font-size: 15px;
  color: var(--muted);
}
.status-line.pending::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s infinite;
  vertical-align: middle;
}
@keyframes pulse { 50% { opacity: 0.2; } }

/* ---- sheets / overlays ---- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  padding: 24px 22px calc(env(safe-area-inset-bottom, 0px) + 22px);
  text-align: left;
  animation: up 0.25s ease-out;
}
.overlay.center { align-items: center; padding: 20px; }
.overlay.center .sheet { border-radius: 22px; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: 0.06em; }
.sheet ol, .sheet ul { padding-left: 22px; margin: 0 0 20px; }
.sheet li { margin: 10px 0; font-size: 17px; }
.sheet .actions { display: flex; gap: 12px; margin-top: 20px; }
.sheet .actions .big-btn { min-height: 60px; font-size: 17px; flex: 1; }

/* ---- clue / evidence card ---- */
.card-label {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.card-text {
  font-size: 21px;
  line-height: 1.45;
  white-space: pre-line;
  margin: 0 0 8px;
}
.card-time { font-size: 13px; color: var(--muted); }
.history { list-style: none; padding: 0 !important; }
.history li { border-top: 1px solid var(--line); padding-top: 10px; }
.history .card-time { display: block; }

.evidence {
  width: min(100%, 440px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 22px;
  text-align: left;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}
.evidence h1 { margin: 0 0 14px; font-size: 26px; }
.evidence img { width: 100%; border-radius: 10px; margin-bottom: 14px; display: block; }
.stamp {
  display: inline-block;
  margin-top: 16px;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 700;
  transform: rotate(-3deg);
}

/* ---- fake phone call ---- */
.call {
  position: fixed;
  inset: 0;
  z-index: 200;
  color: #fff;
  background: linear-gradient(180deg, #2b2f36 0%, #111317 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 70px) 24px calc(env(safe-area-inset-bottom, 0px) + 60px);
  text-align: center;
}
.call-top { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #6b7078;
  display: grid;
  place-items: center;
  font-size: 44px;
  font-weight: 300;
  margin-bottom: 8px;
}
.caller { font-size: 34px; font-weight: 400; margin: 0; }
.call-sub { font-size: 17px; color: #c7c9cc; }
.call-actions { display: flex; justify-content: space-around; width: 100%; max-width: 340px; }
.call-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
}
.call-btn .circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.call-btn svg { width: 34px; height: 34px; fill: #fff; }
.call-btn.accept .circle { background: #30d158; animation: ring-bob 1.4s infinite; }
.call-btn.decline .circle { background: #ff3b30; }
.call-btn.decline svg { transform: rotate(135deg); }
@keyframes ring-bob { 0%, 60%, 100% { transform: none; } 10%, 30%, 50% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } }
.call.ended .call-sub { color: #ff6b61; }
.call-grid {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 22px 28px;
  opacity: 0.85;
}
.call-grid span {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 11px;
}

/* Live captions during a call (like iPhone Live Voicemail transcripts). */
.call-captions {
  width: min(100%, 340px);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  text-align: left;
}
.call-captions p { margin: 0; font-size: 17px; line-height: 1.35; color: rgba(255, 255, 255, 0.45); }
.call-captions p.now { color: #fff; font-weight: 600; }

/* ---- tag lock (blood type) ---- */
.lock-prompt { font-weight: 700; letter-spacing: 0.04em; }
.lock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0 6px;
}
.lock-btn {
  min-height: 60px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
}
.lock-btn:active { background: var(--ink); color: #fff; }
.lock-feedback { min-height: 1.4em; margin: 10px 0 0; font-weight: 700; letter-spacing: 0.04em; }
.lock-feedback.bad { color: var(--accent); animation: shake 0.35s; }
.lock-ok { color: #0a7a33; font-weight: 700; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---- case file card (home, after the revive) ---- */
.case-file {
  width: min(100%, 360px);
  border: 2px solid var(--accent);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
}
.case-file p { margin: 0; font-size: 17px; line-height: 1.4; }

/* ---- self-serve hints ---- */
.lock-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.lock-pick-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 92px;
  padding: 10px 6px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  min-width: 0;
}
.lock-pick-btn:active { background: var(--soft); }
.lock-pick-btn .sym { font-size: 32px; line-height: 1.1; }
.lock-pick-btn .name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.lock-pick-btn .used { position: absolute; top: 6px; right: 8px; font-size: 11px; color: var(--accent); font-weight: 700; }
.hint-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.hint-head .sym { font-size: 40px; line-height: 1; }
.hint-head h2 { margin: 0 !important; overflow-wrap: anywhere; min-width: 0; }
.sheet .hint-list { list-style: none; padding: 0; margin: 0; }
.hint-list li { border-top: 1px solid var(--line); padding-top: 10px; }
.hint-list li:not(.new) .card-text { color: var(--muted); font-size: 17px; }

/* ---- memory restoration tag ---- */
.mem-letter {
  font: 800 120px/1 ui-monospace, Menlo, monospace;
  text-align: center;
  color: var(--accent);
  margin: 6px 0 12px;
}
.mem-letters { display: flex; justify-content: center; gap: 8px; margin: 8px 0; }
.mem-letters span {
  flex: 0 1 44px;
  min-width: 0;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  font: 800 26px ui-monospace, Menlo, monospace;
  color: var(--muted);
}
.mem-letters span.on { border-color: var(--ink); color: var(--ink); }
.mem-bad { color: var(--accent); animation: shake 0.35s 2; }
.mem-done { text-align: center; margin-top: 12px; }
