:root {
  --ink: #12110f;
  --coal: #201c17;
  --paper: #e4b74f;
  --paper-bright: #f2cf76;
  --rust: #8d4a1f;
  --bone: #f2e2b8;
  --danger: #c33a1c;
  --line: clamp(2px, 0.18vw, 4px);
  --pad: clamp(22px, 3vw, 58px);
  --mx: 0;
  --my: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  background: var(--ink);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ink);
  font-family: "Trebuchet MS", Arial, sans-serif;
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

::selection {
  color: var(--paper-bright);
  background: var(--ink);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--paper-bright);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 10px var(--pad);
  color: var(--bone);
  background: rgba(18, 17, 15, 0.94);
  border-bottom: 2px solid rgba(242, 207, 118, 0.42);
  backdrop-filter: blur(8px);
}

.brand-mark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--paper-bright);
  font: 900 12px/0.88 "Arial Black", Impact, sans-serif;
  letter-spacing: 0.04em;
  text-decoration: none;
  transform: rotate(-1deg);
}

.brand-mark img {
  width: 42px;
  height: 42px;
  border: 2px solid var(--paper-bright);
  border-radius: 50%;
}

.main-nav,
.quick-links {
  display: flex;
  align-items: center;
}

.main-nav {
  justify-content: center;
  gap: clamp(16px, 3vw, 52px);
}

.quick-links {
  justify-content: flex-end;
  gap: 8px;
}

.nav-section,
.icon-link,
.sound-toggle {
  padding: 7px 4px;
  color: rgba(242, 226, 184, 0.64);
  background: none;
  border: 0;
  font: 800 11px/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.12em;
  text-decoration: none;
  cursor: pointer;
}

.nav-section {
  position: relative;
}

.nav-section::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: var(--paper-bright);
  transform: scaleX(0) rotate(-1deg);
  transition: transform 180ms ease;
}

.nav-section:hover,
.nav-section.is-active,
.icon-link:hover,
.sound-toggle:hover {
  color: var(--paper-bright);
}

.nav-section.is-active::after,
.nav-section:hover::after {
  transform: scaleX(1) rotate(-1deg);
}

.icon-link,
.sound-toggle {
  border: 1px solid rgba(242, 207, 118, 0.36);
  padding: 9px 10px;
}

.page {
  position: relative;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  scroll-snap-align: start;
  isolation: isolate;
}

.scene-bg {
  position: absolute;
  z-index: -4;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.95) contrast(1.06);
  transform: scale(1.025) translate(calc(var(--mx) * -8px), calc(var(--my) * -5px));
  transition: transform 120ms linear;
}

.paper-noise {
  position: absolute;
  z-index: 10;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    repeating-linear-gradient(17deg, rgba(15, 13, 10, 0.12) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(93deg, transparent 0 4px, rgba(255, 238, 188, 0.08) 4px 5px);
  mix-blend-mode: multiply;
  animation: noise-shift 420ms steps(2) infinite;
}

.page-inner {
  position: relative;
  z-index: 2;
  width: min(1920px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(100px, 10vh, 128px) var(--pad) clamp(64px, 7vh, 88px);
}

.hero-page::after,
.game-page::after {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(223, 166, 45, 0.1), transparent 52%, rgba(18, 17, 15, 0.12));
  pointer-events: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(430px, 1.05fr) minmax(390px, 0.8fr) minmax(250px, 0.48fr);
  gap: clamp(18px, 2vw, 42px);
  align-items: center;
}

.hero-copy {
  align-self: center;
  max-width: 760px;
}

.eyebrow {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 0 clamp(12px, 2vh, 24px);
  font: 900 clamp(10px, 0.72vw, 14px)/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.18em;
}

.eyebrow span {
  display: inline-block;
  padding: 6px 9px;
  color: var(--paper-bright);
  background: var(--ink);
  transform: rotate(-1.2deg);
}

.hero-title {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  font: 900 clamp(74px, 8.7vw, 168px)/0.7 "Arial Black", Impact, sans-serif;
  letter-spacing: -0.085em;
  text-transform: uppercase;
  filter: drop-shadow(6px 7px 0 rgba(102, 48, 16, 0.35));
  transform: rotate(-1.1deg);
}

.hero-title span {
  display: block;
  text-shadow:
    2px 2px 0 var(--paper-bright),
    -2px 2px 0 var(--paper-bright),
    3px -2px 0 var(--paper-bright);
  animation: title-twitch 7s steps(1) infinite;
}

.hero-title .title-offset {
  margin-left: clamp(20px, 2.8vw, 54px);
  color: var(--paper-bright);
  -webkit-text-stroke: clamp(2px, 0.24vw, 5px) var(--ink);
  text-shadow: 7px 8px 0 var(--ink);
  animation-delay: -3s;
}

.hero-subtitle {
  margin: clamp(20px, 2.6vh, 30px) 0 14px;
  font: 900 clamp(20px, 1.55vw, 30px)/0.95 "Arial Black", Impact, sans-serif;
  letter-spacing: 0.02em;
}

.hero-intro {
  max-width: 660px;
  margin: 0;
  padding-left: 16px;
  border-left: var(--line) solid var(--ink);
  font: 700 clamp(13px, 0.92vw, 18px)/1.35 "Trebuchet MS", sans-serif;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(18px, 3vh, 34px);
}

.rough-button {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  padding: 13px 18px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: var(--ink);
  background: var(--bone);
  border: var(--line) solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  font: 900 clamp(11px, 0.76vw, 14px)/1 "Arial Black", Impact, sans-serif;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transform: rotate(-0.5deg);
  transition: transform 100ms ease, box-shadow 100ms ease, background 100ms ease;
}

.rough-button:hover,
.rough-button:focus-visible {
  background: var(--paper-bright);
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(3px, 3px) rotate(0.6deg);
}

.rough-button--dark {
  color: var(--paper-bright);
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--rust);
}

.rough-button--dark:hover {
  color: var(--ink);
  background: var(--bone);
}

.rough-button--yellow {
  background: var(--paper-bright);
}

.ca-button {
  min-width: 170px;
}

.ca-label {
  opacity: 0.55;
}

.copy-hint {
  font: 800 8px/1 "Trebuchet MS", sans-serif;
  opacity: 0.55;
  writing-mode: vertical-rl;
}

.specimen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 700px;
  margin: clamp(20px, 3.4vh, 42px) 0 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.specimen-grid div {
  padding: 12px 10px;
  border-right: 1px dashed rgba(18, 17, 15, 0.72);
}

.specimen-grid div:last-child {
  border: 0;
}

.specimen-grid dt {
  margin-bottom: 4px;
  font: 900 9px/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.16em;
  opacity: 0.65;
}

.specimen-grid dd {
  margin: 0;
  font: 900 clamp(11px, 0.75vw, 14px)/1.1 "Trebuchet MS", sans-serif;
}

.hero-character-wrap {
  position: relative;
  align-self: end;
  min-height: min(78vh, 820px);
  transform: translate(calc(var(--mx) * 8px), calc(var(--my) * 4px));
  transition: transform 140ms linear;
}

.character-button {
  position: absolute;
  right: -2%;
  bottom: 0;
  left: -7%;
  display: block;
  width: 109%;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.woofus {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  filter: drop-shadow(8px 10px 0 rgba(38, 24, 10, 0.4));
}

.hero-woofus {
  width: 100%;
  transform-origin: 52% 90%;
  animation: woofus-idle 3.4s ease-in-out infinite;
}

.character-button:hover .hero-woofus {
  animation-duration: 1.1s;
}

.character-button.is-barking .hero-woofus {
  animation: woofus-bark 420ms steps(2);
}

.character-shadow {
  position: absolute;
  z-index: -1;
  right: 10%;
  bottom: 0;
  left: 10%;
  height: 9%;
  background: rgba(18, 17, 15, 0.4);
  border-radius: 50%;
  filter: blur(5px);
  transform: rotate(-2deg);
}

.speech-bubble {
  position: absolute;
  z-index: 5;
  top: 4%;
  right: -3%;
  width: clamp(150px, 12vw, 230px);
  padding: 12px 14px;
  color: var(--bone);
  background: var(--ink);
  border: 2px solid var(--bone);
  box-shadow: 4px 4px 0 var(--rust);
  font: 900 clamp(10px, 0.72vw, 14px)/1.25 "Trebuchet MS", sans-serif;
  transform: rotate(2deg);
  transition: transform 160ms ease;
}

.speech-bubble::after {
  position: absolute;
  bottom: -14px;
  left: 22px;
  width: 0;
  height: 0;
  border-top: 14px solid var(--ink);
  border-right: 18px solid transparent;
  content: "";
}

.speech-bubble.pop {
  transform: rotate(-2deg) scale(1.08);
}

.poke-note {
  position: absolute;
  z-index: 6;
  right: 2%;
  bottom: 3%;
  margin: 0;
  padding: 5px 8px;
  color: var(--paper-bright);
  background: var(--ink);
  font: 900 9px/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.12em;
  transform: rotate(-3deg);
}

.chain-label {
  position: absolute;
  left: 0;
  bottom: 16%;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  font: 900 9px/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.1em;
  transform: rotate(82deg);
}

.lore-card {
  align-self: center;
  padding: clamp(18px, 1.8vw, 32px);
  background: rgba(239, 205, 125, 0.88);
  border: var(--line) solid var(--ink);
  box-shadow: 8px 8px 0 rgba(18, 17, 15, 0.9);
  transform: rotate(1.4deg);
}

.stamp {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 7px;
  color: var(--paper-bright);
  background: var(--rust);
  font: 900 9px/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.14em;
  transform: rotate(-2deg);
}

.lore-card h2 {
  margin: 0 0 18px;
  font: 900 clamp(22px, 1.75vw, 34px)/0.92 "Arial Black", Impact, sans-serif;
}

.lore-card p {
  font: 700 clamp(12px, 0.78vw, 15px)/1.35 "Trebuchet MS", sans-serif;
}

.lore-card .lore-motto {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 2px dashed var(--ink);
  font: 900 clamp(12px, 0.85vw, 16px)/1.1 "Arial Black", Impact, sans-serif;
}

.crawl {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  color: var(--paper-bright);
  background: var(--ink);
  border-top: 2px solid var(--paper-bright);
  font: 900 clamp(12px, 0.9vw, 17px)/1 "Arial Black", Impact, sans-serif;
  letter-spacing: 0.08em;
}

.crawl-track {
  display: flex;
  width: max-content;
  padding: 10px 0;
  animation: crawl 24s linear infinite;
}

.sun-pulse {
  position: absolute;
  z-index: -1;
  top: 8%;
  left: 5%;
  width: 9vw;
  min-width: 90px;
  aspect-ratio: 1;
  border: 2px solid rgba(18, 17, 15, 0.35);
  border-radius: 50%;
  animation: sun-ring 4s ease-out infinite;
}

.game-page {
  color: var(--bone);
  background: var(--coal);
}

.game-page::after {
  background: rgba(18, 17, 15, 0.14);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.24fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(16px, 2vw, 36px);
  padding-bottom: clamp(70px, 8vh, 96px);
}

.game-heading {
  display: flex;
  grid-column: 1 / -1;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.game-heading h2 {
  margin: 0;
  color: var(--paper-bright);
  font: 900 clamp(52px, 5.3vw, 102px)/0.74 "Arial Black", Impact, sans-serif;
  letter-spacing: -0.065em;
  text-shadow: 5px 5px 0 var(--rust);
  transform: rotate(-0.7deg);
}

.game-heading h2 i {
  color: var(--bone);
  font-style: normal;
}

.game-deck {
  max-width: 430px;
  margin: 0 0 4px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(242, 226, 184, 0.92);
  border: 2px solid var(--ink);
  font: 800 clamp(11px, 0.8vw, 15px)/1.25 "Trebuchet MS", sans-serif;
  transform: rotate(1deg);
}

.game-console {
  min-width: 0;
  align-self: stretch;
  color: var(--ink);
  background: rgba(242, 226, 184, 0.88);
  border: var(--line) solid var(--ink);
  box-shadow: 10px 10px 0 rgba(18, 17, 15, 0.7);
}

.scorebar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 62px;
  background: var(--ink);
  border-bottom: var(--line) solid var(--ink);
}

.scorebar > div {
  display: flex;
  padding: 8px 14px;
  flex-direction: column;
  justify-content: center;
  color: var(--bone);
  border-right: 1px dashed rgba(242, 226, 184, 0.28);
}

.scorebar > div:last-child {
  border: 0;
}

.scorebar span {
  font: 900 8px/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.16em;
  opacity: 0.58;
}

.scorebar strong {
  margin-top: 3px;
  color: var(--paper-bright);
  font: 900 clamp(18px, 1.35vw, 26px)/1 "Arial Black", Impact, sans-serif;
}

.scorebar b {
  font: inherit;
}

.game-arena {
  position: relative;
  height: clamp(360px, 53vh, 590px);
  overflow: hidden;
  background:
    linear-gradient(rgba(228, 183, 79, 0.06), rgba(228, 183, 79, 0.3)),
    url("assets/game-bg.jpg") center / cover;
  outline: none;
  cursor: crosshair;
  touch-action: none;
}

.game-arena:focus-visible {
  box-shadow: inset 0 0 0 4px var(--paper-bright);
}

.game-arena::after {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 25%;
  content: "";
  background: linear-gradient(transparent, rgba(75, 39, 12, 0.18));
  pointer-events: none;
}

.object-layer {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.falling-object {
  position: absolute;
  top: 0;
  display: grid;
  width: clamp(42px, 3.2vw, 62px);
  aspect-ratio: 1;
  place-items: center;
  background: rgba(242, 226, 184, 0.84);
  border: 3px solid var(--ink);
  border-radius: 47% 53% 42% 58%;
  box-shadow: 4px 4px 0 rgba(18, 17, 15, 0.46);
  font-size: clamp(24px, 2vw, 40px);
  will-change: transform;
}

.falling-object.is-danger {
  background: rgba(195, 58, 28, 0.86);
}

.player {
  position: absolute;
  z-index: 6;
  bottom: 4%;
  left: 50%;
  width: clamp(92px, 8.5vw, 164px);
  pointer-events: none;
  transform: translateX(-50%);
  will-change: left, transform;
}

.player img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(5px 7px 0 rgba(18, 17, 15, 0.48));
  transform-origin: center bottom;
  animation: game-idle 820ms steps(2) infinite;
}

.player.run-left img {
  transform: rotate(-7deg) scaleX(0.97);
}

.player.run-right img {
  transform: rotate(7deg) scaleX(0.97);
}

.player.hit img {
  animation: hit 320ms steps(2);
  filter: sepia(1) saturate(4) hue-rotate(320deg) drop-shadow(5px 7px 0 rgba(18, 17, 15, 0.48));
}

.player.catch img {
  animation: catch 300ms ease;
}

.ground-chain {
  position: absolute;
  z-index: 5;
  right: 4%;
  bottom: 1.5%;
  left: 4%;
  overflow: hidden;
  color: rgba(18, 17, 15, 0.7);
  font-size: clamp(22px, 2.5vw, 48px);
  letter-spacing: -0.24em;
  white-space: nowrap;
  transform: scaleY(0.55) rotate(-1deg);
  transform-origin: bottom;
}

.game-overlay {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: flex;
  padding: 24px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  background: rgba(18, 17, 15, 0.78);
  backdrop-filter: blur(3px);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.game-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.overlay-kicker {
  margin: 0 0 10px;
  color: var(--paper-bright);
  font: 900 11px/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.18em;
}

.game-overlay h3 {
  margin: 0;
  color: var(--bone);
  font: 900 clamp(34px, 3.5vw, 68px)/0.87 "Arial Black", Impact, sans-serif;
  text-shadow: 4px 4px 0 var(--rust);
  transform: rotate(-1deg);
}

.game-overlay p:not(.overlay-kicker) {
  max-width: 590px;
  margin: 16px auto 22px;
  color: var(--bone);
  font: 700 clamp(12px, 0.86vw, 16px)/1.35 "Trebuchet MS", sans-serif;
}

.game-flash {
  position: absolute;
  z-index: 15;
  top: 16%;
  left: 50%;
  padding: 8px 12px;
  color: var(--paper-bright);
  background: var(--ink);
  border: 2px solid var(--paper-bright);
  font: 900 clamp(11px, 0.9vw, 17px)/1 "Arial Black", Impact, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px) rotate(-2deg);
}

.game-flash.show {
  animation: flash-message 700ms ease;
}

.game-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 48px;
  color: var(--bone);
  background: var(--ink);
}

.game-controls button {
  align-self: stretch;
  min-width: 120px;
  color: var(--paper-bright);
  background: var(--coal);
  border: 0;
  border-right: 1px solid rgba(242, 226, 184, 0.26);
  border-left: 1px solid rgba(242, 226, 184, 0.26);
  font: 900 11px/1 "Arial Black", Impact, sans-serif;
  cursor: pointer;
  touch-action: none;
}

.game-controls button:active,
.game-controls button.is-held {
  color: var(--ink);
  background: var(--paper-bright);
}

.game-controls p {
  margin: 0;
  text-align: center;
  font: 800 9px/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.12em;
  opacity: 0.62;
}

.game-notes {
  align-self: start;
  padding: clamp(16px, 1.6vw, 28px);
  color: var(--ink);
  background: rgba(242, 226, 184, 0.92);
  border: var(--line) solid var(--ink);
  box-shadow: 8px 8px 0 rgba(18, 17, 15, 0.7);
  transform: rotate(0.6deg);
}

.game-notes ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.game-notes li {
  display: grid;
  grid-template-columns: 42px 1fr;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(18, 17, 15, 0.58);
}

.game-notes li > span {
  grid-row: 1 / 3;
  font-size: 28px;
}

.game-notes li strong {
  align-self: end;
  font: 900 13px/1 "Arial Black", Impact, sans-serif;
}

.game-notes li small {
  align-self: start;
  margin-top: 3px;
  font: 800 9px/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

.field-note {
  margin: 20px 0;
  font: 800 clamp(12px, 0.78vw, 15px)/1.35 Georgia, serif;
  font-style: italic;
}

.bottom-links {
  display: grid;
  gap: 6px;
}

.bottom-links a,
.bottom-links button {
  padding: 9px 10px;
  color: var(--paper-bright);
  background: var(--ink);
  border: 0;
  font: 900 9px/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.1em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.bottom-links a:hover,
.bottom-links button:hover {
  color: var(--ink);
  background: var(--paper-bright);
}

.site-footer {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 44px;
  padding: 10px var(--pad);
  align-items: center;
  justify-content: space-between;
  color: rgba(242, 226, 184, 0.7);
  background: var(--ink);
  border-top: 1px solid rgba(242, 226, 184, 0.24);
  font: 800 8px/1 "Trebuchet MS", sans-serif;
  letter-spacing: 0.12em;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--paper-bright);
  text-decoration: none;
}

.page-rail {
  position: fixed;
  z-index: 40;
  top: 50%;
  right: 16px;
  display: flex;
  align-items: center;
  flex-direction: column;
  transform: translateY(-50%);
}

.rail-dot {
  width: 9px;
  height: 9px;
  background: rgba(242, 226, 184, 0.38);
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition: transform 160ms ease, background 160ms ease;
}

.rail-dot.is-active {
  background: var(--paper-bright);
  transform: scale(1.55);
}

.rail-line {
  width: 1px;
  height: 42px;
  background: rgba(242, 226, 184, 0.35);
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  max-width: calc(100vw - 48px);
  padding: 14px 18px;
  color: var(--paper-bright);
  background: var(--ink);
  border: 2px solid var(--paper-bright);
  box-shadow: 5px 5px 0 var(--rust);
  font: 900 12px/1 "Arial Black", Impact, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) rotate(-1deg);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) rotate(-1deg);
}

.ink-speck {
  position: fixed;
  z-index: 90;
  width: 7px;
  height: 3px;
  background: var(--ink);
  border-radius: 50%;
  opacity: 0.7;
  pointer-events: none;
  animation: speck-out 520ms ease-out forwards;
}

.noscript {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  padding: 12px;
  color: var(--paper-bright);
  background: var(--ink);
}

@keyframes woofus-idle {
  0%, 100% { transform: translateY(0) rotate(-0.5deg) scaleX(1); }
  48% { transform: translateY(4px) rotate(0.6deg) scaleX(1.012) scaleY(0.992); }
  52% { transform: translateY(3px) rotate(0.3deg) scaleX(1.008) scaleY(0.995); }
}

@keyframes woofus-bark {
  0% { transform: translate(0) rotate(0); }
  25% { transform: translate(-7px, -8px) rotate(-3deg) scale(1.02); }
  50% { transform: translate(8px, 1px) rotate(3deg) scale(0.99); }
  75% { transform: translate(-4px, -4px) rotate(-2deg); }
  100% { transform: translate(0) rotate(0); }
}

@keyframes game-idle {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(2px) scaleY(0.985); }
}

@keyframes hit {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-9px) rotate(-8deg); }
  50% { transform: translateX(8px) rotate(7deg); }
  75% { transform: translateX(-5px) rotate(-4deg); }
}

@keyframes catch {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-14px) scale(1.06, 0.95); }
}

@keyframes crawl {
  to { transform: translateX(-50%); }
}

@keyframes title-twitch {
  0%, 88%, 100% { transform: translate(0); }
  89% { transform: translate(3px, -1px) skewX(-1deg); }
  90% { transform: translate(-2px, 1px); }
  91% { transform: translate(0); }
}

@keyframes noise-shift {
  0% { transform: translate(0); }
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px, 1px); }
}

@keyframes sun-ring {
  0% { opacity: 0.5; transform: scale(0.7); }
  80%, 100% { opacity: 0; transform: scale(1.5); }
}

@keyframes flash-message {
  0% { opacity: 0; transform: translate(-50%, 8px) rotate(-2deg) scale(0.8); }
  18%, 72% { opacity: 1; transform: translate(-50%, 0) rotate(1deg) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -16px) rotate(-2deg) scale(0.92); }
}

@keyframes speck-out {
  to { opacity: 0; transform: translateY(14px) rotate(60deg) scale(0.2); }
}

@media (max-width: 1180px) {
  .hero-layout {
    grid-template-columns: minmax(360px, 1fr) minmax(340px, 0.8fr);
  }

  .lore-card {
    position: absolute;
    right: var(--pad);
    bottom: 84px;
    width: min(310px, 26vw);
  }

  .lore-card p:not(.lore-motto) {
    display: none;
  }

  .lore-card h2 {
    font-size: 20px;
  }

  .game-layout {
    grid-template-columns: 1fr 220px;
  }
}

@media (max-width: 860px) {
  html {
    scroll-snap-type: none;
  }

  .topbar {
    grid-template-columns: auto 1fr;
    min-height: 62px;
  }

  .main-nav {
    display: none;
  }

  .quick-links {
    gap: 4px;
  }

  .quick-links .icon-link {
    font-size: 9px;
  }

  .sound-toggle {
    display: none;
  }

  .page {
    min-height: auto;
    overflow: clip;
  }

  .page-inner {
    min-height: auto;
    padding-top: 92px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .hero-title {
    font-size: clamp(64px, 19vw, 116px);
  }

  .hero-copy {
    z-index: 4;
  }

  .hero-character-wrap {
    min-height: 650px;
    margin-top: -70px;
  }

  .character-button {
    right: 4%;
    left: 18%;
    width: 78%;
  }

  .speech-bubble {
    top: 20%;
    right: 5%;
  }

  .lore-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    margin: -24px 8px 76px;
  }

  .lore-card p:not(.lore-motto) {
    display: block;
  }

  .game-layout {
    display: block;
    padding-bottom: 86px;
  }

  .game-heading {
    display: block;
    margin-bottom: 20px;
  }

  .game-deck {
    margin-top: 20px;
  }

  .game-console {
    margin-bottom: 20px;
  }

  .game-notes {
    transform: none;
  }

  .game-notes ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .game-notes li {
    grid-template-columns: 34px 1fr;
  }

  .bottom-links {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer p:last-child {
    display: none;
  }
}

@media (max-width: 560px) {
  :root {
    --pad: 16px;
  }

  .brand-mark span {
    display: none;
  }

  .quick-links .icon-link {
    padding: 8px 6px;
  }

  .hero-title {
    font-size: 18vw;
  }

  .hero-title .title-offset {
    margin-left: 12px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .specimen-grid {
    grid-template-columns: 1fr;
  }

  .specimen-grid div {
    display: flex;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px dashed rgba(18, 17, 15, 0.5);
  }

  .hero-character-wrap {
    min-height: 500px;
  }

  .character-button {
    right: 0;
    left: 3%;
    width: 94%;
  }

  .speech-bubble {
    top: 12%;
  }

  .game-heading h2 {
    font-size: 15vw;
  }

  .scorebar {
    grid-template-columns: repeat(3, 1fr);
  }

  .scorebar .tension-readout {
    display: none;
  }

  .game-arena {
    height: 480px;
  }

  .game-controls p {
    display: none;
  }

  .game-controls {
    grid-template-columns: 1fr 1fr;
  }

  .game-controls button {
    min-height: 54px;
  }

  .game-notes ul,
  .bottom-links {
    grid-template-columns: 1fr;
  }

  .site-footer {
    justify-content: center;
  }

  .site-footer p {
    display: none;
  }

  .page-rail {
    display: none;
  }
}

@media (max-height: 760px) and (min-width: 861px) {
  .topbar {
    min-height: 58px;
  }

  .page-inner {
    padding-top: 76px;
    padding-bottom: 54px;
  }

  .hero-character-wrap {
    min-height: 650px;
  }

  .hero-intro {
    font-size: 13px;
  }

  .specimen-grid {
    margin-top: 18px;
  }

  .game-arena {
    height: calc(100vh - 280px);
    min-height: 330px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .scene-bg,
  .hero-character-wrap {
    transform: none;
  }
}
