*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* No pull-to-refresh or scroll chaining from the page: on a phone a refresh wipes the case in progress. */
html, body { overscroll-behavior: none; overscroll-behavior-y: none; }
/* While a dialog or the phone clue drawer is open the document does not scroll (scroll-guard.js pins body). */
html.wd-locked, html.wd-locked body { overflow: hidden; }
body {
  margin: 0; min-height: 100dvh; color: var(--ink); font: 16px/1.5 var(--font-sans);
  /* Noir desk: dark wood, a lamp glow from the top left. */
  background:
    radial-gradient(ellipse at 15% -10%, rgba(255, 214, 140, .22), transparent 55%),
    var(--grain),
    repeating-linear-gradient(92deg, rgba(255, 255, 255, .015) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, var(--desk-2), var(--desk));
  background-attachment: fixed;
}
a { color: var(--teal); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--ink-soft); }
.btn {
  min-height: 44px; padding: 0 16px; border-radius: 8px; border: 2px solid var(--ink);
  background: var(--chalk); font: 600 15px/1 var(--font-sans); cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .16s var(--ease);
}
.btn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--blood); color: var(--chalk); border-color: var(--ink); text-transform: uppercase; letter-spacing: .06em; }
.btn.primary:not(:disabled) { animation: ready-pulse 1.8s ease-in-out 1; }
.btn.gold { background: var(--gold); }
@keyframes ready-pulse { 0%, 100% { box-shadow: 3px 3px 0 var(--ink); } 50% { box-shadow: 3px 3px 0 var(--ink), 0 0 0 6px rgba(200, 29, 37, .25); } }
.icon-btn {
  min-width: 38px; min-height: 38px; padding: 0 8px; border-radius: 8px; border: 1.5px solid rgba(250, 246, 238, .3); background: rgba(250, 246, 238, .06);
  font: 600 16px/36px var(--font-sans); color: var(--chalk); text-decoration: none; cursor: pointer; text-align: center;
}
.icon-btn[aria-pressed='false'] { opacity: .6; }
.case-title { font: 700 24px/1.15 var(--font-display); margin: 0 0 6px; letter-spacing: -.01em; }
.stamp-text { font: 600 18px/1.3 var(--font-serif); text-align: center; margin-top: 30vh; color: var(--manila); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
