/* Colour tokens: white theme by default, black theme from the system or the toggle. */
:root {
  --bg: #ffffff; --bg2: #fff7f4; --raise: #ffffff; --ink: #1e1a1b; --mute: #6b6264; --line: #f0e4e1; --edge: #1e1a1b;
  --coral: #ef7878; --coral-dk: #d94a4a; --peach: #ffb38a; --glow: #ffe3d3; --blush: #fff1ec; --pink: #fbd5d0; --go: #7cb84a;
  --shadow: 0 1px 2px rgba(120, 40, 40, .06), 0 12px 32px -12px rgba(170, 60, 60, .22);
  --fox: #ef7878; --fox-ink: #1e1a1b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg2: #0f0b0b; --raise: #171213; --ink: #f6eeec; --mute: #a89c9d; --line: #2a2122; --edge: #f6eeec;
    --glow: #3a1d1b; --blush: #1c1312; --pink: #4a2626; --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 40px -16px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg2: #0f0b0b; --raise: #171213; --ink: #f6eeec; --mute: #a89c9d; --line: #2a2122; --edge: #f6eeec;
  --glow: #3a1d1b; --blush: #1c1312; --pink: #4a2626; --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 40px -16px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
body { background: var(--bg); color: var(--ink); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* Fox */
.fox { width: 100%; height: auto; overflow: visible; }
.fox-head { transform-origin: 80px 142px; animation: fox-tilt 6s ease-in-out infinite; }
.fox-eyes ellipse { transform-box: fill-box; transform-origin: center; animation: fox-blink 4.2s infinite; }
.fox-ear-r { transform-origin: 100px 58px; animation: fox-ear 5s ease-in-out infinite; }
.fox-ear-l { transform-origin: 60px 58px; animation: fox-ear 5s ease-in-out 2.6s infinite reverse; }
.fox-line { color: var(--coral); animation: fox-scan 2.8s cubic-bezier(.45, 0, .55, 1) infinite; opacity: .9; }
.fox-dots circle { color: var(--ink); opacity: 0; animation: fox-dot 2.8s ease-out infinite; }
.fox-dots circle:nth-child(2n) { animation-delay: .25s; }
.fox-dots circle:nth-child(3n) { animation-delay: .5s; }
.fox-frame { color: var(--ink); }
@keyframes fox-tilt { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-4deg); } 60% { transform: rotate(3deg); } }
@keyframes fox-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes fox-ear { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(9deg); } 90% { transform: rotate(-3deg); } }
@keyframes fox-scan { 0% { transform: translateY(0); } 50% { transform: translateY(108px); } 100% { transform: translateY(0); } }
@keyframes fox-dot { 0%, 30% { opacity: 0; } 45% { opacity: 1; } 80% { opacity: .8; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .fox *, .fox-line, .fox-dots circle { animation: none !important; }
  .fox-dots circle { opacity: .8; }
  .fox-line { display: none; }
}
