:root {
  --noir-bg: #1a1410;
  --noir-bg-deep: #0f0b08;
  --noir-paper: #d4c5a0;
  --noir-paper-dim: #a89878;
  --noir-blood: #8b1a1a;
  --noir-blood-dim: #6b1414;
  --noir-gold: #c9a961;
  --noir-shadow: rgba(0, 0, 0, 0.6);
  --font-mono: 'Special Elite', 'Courier Prime', 'Courier New', monospace;
  --font-serif: 'Crimson Text', 'Georgia', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background: var(--noir-bg);
  color: var(--noir-paper);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  position: relative;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(139, 26, 26, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(201, 169, 97, 0.04) 0%, transparent 50%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  background-size: auto, auto, 200px 200px;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
}

main {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

h1, h2, h3 {
  font-family: var(--font-mono);
  font-weight: normal;
  letter-spacing: 0.02em;
}

a {
  color: var(--noir-gold);
  text-decoration: none;
}

button {
  font-family: var(--font-mono);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: var(--font-mono);
  font-size: 16px;
  background: transparent;
  border: none;
  color: var(--noir-paper);
}

input:focus,
button:focus,
a:focus {
  outline: 2px solid var(--noir-gold);
  outline-offset: 4px;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--noir-gold);
  outline-offset: 4px;
}

input:focus:not(:focus-visible),
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

.washi-tape {
  position: absolute;
  width: 120px;
  height: 28px;
  background: rgba(201, 169, 97, 0.35);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 3;
}

.washi-tape::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 6px, rgba(0,0,0,0.08) 6px 8px);
}

.washi-tape.tl { top: -8px; left: -20px; transform: rotate(-32deg); }
.washi-tape.tr { top: -8px; right: -20px; transform: rotate(28deg); }
.washi-tape.bl { bottom: -8px; left: -20px; transform: rotate(28deg); }
.washi-tape.br { bottom: -8px; right: -20px; transform: rotate(-32deg); }

.coffee-stain {
  position: fixed;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(80, 40, 10, 0.18) 0%, rgba(80, 40, 10, 0.08) 50%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.stamp {
  display: inline-block;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border: 3px double currentColor;
  padding: 0.5rem 1rem;
  transform: rotate(-4deg);
  opacity: 0.85;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

@keyframes reveal-pop {
  0% { opacity: 0; transform: scale(0.3) rotate(-15deg); }
  60% { opacity: 1; transform: scale(1.1) rotate(3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
