:root {
  --ink: #121611;
  --paper: #f2ebd8;
  --cream: #fff8df;
  --acid: #d9ff36;
  --orange: #ff5b23;
  --teal: #176e71;
  --mud: #5a4027;
  --white: #fffdf4;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #172b1d;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
}

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

button {
  font: inherit;
}

.moving-landscape {
  position: fixed;
  z-index: -3;
  inset: -5vh -8vw;
  background: #71afbf url("images/walking-hills.webp") center center / cover no-repeat;
  transform: scale(1.08);
  animation: countryside-drift 24s ease-in-out infinite alternate;
  will-change: transform;
}

.colour-wash {
  position: fixed;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(circle at 50% 14%, transparent 0 25%, rgba(11, 20, 12, .15) 65%, rgba(8, 13, 9, .62) 100%),
    linear-gradient(180deg, rgba(227, 255, 163, .08), rgba(12, 25, 16, .54));
  pointer-events: none;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100svh;
  margin-inline: auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(26px, env(safe-area-inset-bottom));
}

.brand-header {
  display: grid;
  grid-template-columns: minmax(88px, 128px) 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.brand-lockup {
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 100%;
  max-height: 100px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, .38));
}

.brand-fallback {
  color: var(--acid);
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(2.1rem, 9vw, 3.2rem);
  line-height: .73;
  letter-spacing: -.07em;
  text-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-3deg);
}

.brand-fallback span {
  color: var(--white);
  font-size: .55em;
  letter-spacing: .08em;
}

.app-title-wrap {
  min-width: 0;
  color: var(--white);
  text-align: right;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
}

.eyebrow,
.asterisk {
  margin: 0;
  font-size: clamp(.7rem, 2.5vw, .82rem);
  font-weight: 900;
  letter-spacing: .1em;
}

.app-title-wrap h1 {
  margin: 3px 0 1px;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(2.05rem, 9.5vw, 4.15rem);
  font-weight: 900;
  line-height: .76;
  letter-spacing: -.045em;
}

.app-title-wrap h1 span {
  color: var(--acid);
  font-size: .67em;
  letter-spacing: .01em;
}

.asterisk {
  opacity: .75;
  font-weight: 700;
  letter-spacing: 0;
}

.relief-machine {
  position: relative;
  overflow: hidden;
  padding: 15px 12px 17px;
  border: 4px solid var(--ink);
  background:
    linear-gradient(rgba(242, 235, 216, .93), rgba(242, 235, 216, .93)),
    repeating-linear-gradient(7deg, transparent 0 9px, rgba(18, 22, 17, .06) 10px 11px);
  box-shadow: 8px 9px 0 rgba(18, 22, 17, .86), 0 18px 55px rgba(0, 0, 0, .32);
  clip-path: polygon(.7% 1.2%, 99.4% 0, 100% 98.7%, 1.2% 100%, 0 55%);
}

.instruction {
  position: relative;
  z-index: 2;
  width: max-content;
  max-width: 94%;
  margin: 0 auto 7px;
  padding: 5px 12px 4px;
  background: var(--ink);
  color: var(--acid);
  font-size: clamp(.74rem, 3vw, .9rem);
  font-weight: 900;
  letter-spacing: .07em;
  text-align: center;
  transform: rotate(-1deg);
}

.selector-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 3px;
}

.character-window {
  position: relative;
  height: clamp(310px, 51vh, 510px);
  min-height: 310px;
  isolation: isolate;
  overflow: hidden;
  touch-action: pan-y;
}

.sunburst {
  position: absolute;
  z-index: -1;
  inset: 4% 2% 2%;
  opacity: .78;
  background: repeating-conic-gradient(from 2deg at 50% 53%, rgba(217, 255, 54, .6) 0 8deg, transparent 8deg 18deg);
  border-radius: 50%;
  animation: sunburst-turn 55s linear infinite;
}

.character-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(5px 8px 0 rgba(18, 22, 17, .22));
  transform-origin: 50% 92%;
  user-select: none;
  -webkit-user-drag: none;
}

.character-image.enter-from-right {
  animation: enter-right .42s cubic-bezier(.2, .8, .2, 1);
}

.character-image.enter-from-left {
  animation: enter-left .42s cubic-bezier(.2, .8, .2, 1);
}

.character-image.is-meowing {
  animation: meow-shake .55s cubic-bezier(.36, .07, .19, .97);
}

.sound-lines {
  position: absolute;
  z-index: 4;
  top: 16%;
  right: 8%;
  display: none;
  align-items: center;
  gap: 4px;
  height: 54px;
  transform: rotate(-12deg);
}

.sound-lines.active {
  display: flex;
}

.sound-lines i {
  display: block;
  width: 7px;
  height: 20px;
  border: 3px solid var(--ink);
  background: var(--orange);
  animation: sound-jump .38s ease-in-out infinite alternate;
}

.sound-lines i:nth-child(2) { height: 35px; animation-delay: -.1s; }
.sound-lines i:nth-child(3) { height: 48px; animation-delay: -.2s; }
.sound-lines i:nth-child(4) { height: 28px; animation-delay: -.3s; }

.nav-button {
  position: relative;
  z-index: 5;
  display: grid;
  width: 42px;
  height: 64px;
  padding: 0;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--acid);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.nav-button span {
  display: block;
  margin-top: -8px;
  font-family: Georgia, serif;
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
}

.nav-button:hover {
  background: var(--orange);
}

.nav-button:active {
  transform: translate(3px, 3px) rotate(-2deg);
  box-shadow: 1px 1px 0 var(--ink);
}

.nav-next {
  transform: rotate(2deg);
}

.nav-previous {
  transform: rotate(-2deg);
}

.identity {
  position: relative;
  z-index: 3;
  margin-top: -8px;
  text-align: center;
}

.cat-number {
  margin: 0 0 -2px;
  color: var(--teal);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .18em;
}

.identity h2 {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  color: var(--ink);
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(3.8rem, 18vw, 7rem);
  line-height: .82;
  letter-spacing: -.045em;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 var(--acid), 6px 6px 0 rgba(18, 22, 17, .16);
  transform: skew(-5deg) rotate(-1deg);
}

.cat-title {
  display: inline-block;
  margin: 7px 0 12px;
  padding: 3px 8px;
  background: var(--orange);
  color: var(--white);
  font-size: clamp(.75rem, 3vw, .92rem);
  font-weight: 900;
  letter-spacing: .12em;
  transform: rotate(1deg);
}

.meow-button {
  position: relative;
  display: grid;
  width: min(100%, 430px);
  min-height: 94px;
  margin: 0 auto;
  padding: 8px 72px 9px 22px;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: 0;
  background: var(--acid);
  color: var(--ink);
  box-shadow: 7px 8px 0 var(--ink);
  cursor: pointer;
  transform: rotate(-.7deg);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.meow-button::before {
  position: absolute;
  inset: 5px;
  border: 2px dashed rgba(18, 22, 17, .55);
  content: "";
  pointer-events: none;
}

.meow-button:hover {
  filter: brightness(1.08) saturate(1.05);
  transform: rotate(.5deg) scale(1.015);
}

.meow-button:active,
.meow-button.pressed {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(5px, 6px) rotate(.7deg);
}

.button-small,
.button-big {
  position: relative;
  z-index: 1;
  display: block;
  font-weight: 900;
}

.button-small {
  margin-bottom: -5px;
  font-size: .75rem;
  letter-spacing: .2em;
}

.button-big {
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(3.2rem, 14vw, 5.2rem);
  line-height: .88;
  letter-spacing: .025em;
}

.paw {
  position: absolute;
  z-index: 1;
  right: 18px;
  font-size: 3.1rem;
  transform: rotate(17deg);
}

.status-message {
  min-height: 1.2em;
  margin: 14px 5px 4px;
  font-size: clamp(.78rem, 3vw, .9rem);
  font-weight: 900;
  letter-spacing: .04em;
  text-align: center;
}

.member-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  min-height: 15px;
  margin-top: 6px;
}

.member-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.member-dot.active {
  background: var(--orange);
}

.support-footer {
  margin: 23px 4px 0;
  padding: 14px 15px 15px;
  border-left: 4px solid var(--acid);
  background: rgba(12, 20, 13, .87);
  color: var(--white);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, .28);
  font-size: .93rem;
  line-height: 1.42;
}

.support-footer p {
  margin: 0;
}

.support-footer strong {
  color: var(--acid);
}

.whatsapp-link {
  display: inline-block;
  margin-top: 11px;
  color: var(--acid);
  font-weight: 900;
  letter-spacing: .035em;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.whatsapp-link[aria-disabled="true"] {
  opacity: .48;
  cursor: not-allowed;
}

:focus-visible {
  outline: 4px solid var(--white);
  outline-offset: 4px;
}

@keyframes countryside-drift {
  from { transform: scale(1.08) translate3d(-1.4%, -.5%, 0); }
  to { transform: scale(1.13) translate3d(1.4%, .65%, 0); }
}

@keyframes sunburst-turn {
  to { transform: rotate(360deg); }
}

@keyframes enter-right {
  from { opacity: 0; transform: translateX(30%) rotate(4deg); }
}

@keyframes enter-left {
  from { opacity: 0; transform: translateX(-30%) rotate(-4deg); }
}

@keyframes meow-shake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  18% { transform: translate(-5px, 0) rotate(-2deg) scale(1.02); }
  36% { transform: translate(6px, -3px) rotate(2deg) scale(1.03); }
  54% { transform: translate(-4px, 1px) rotate(-1deg) scale(1.03); }
  72% { transform: translate(4px, -2px) rotate(1deg) scale(1.02); }
}

@keyframes sound-jump {
  to { transform: scaleY(.55); }
}

@media (min-width: 700px) {
  .app-shell {
    padding-top: 28px;
    padding-bottom: 38px;
  }

  .brand-header {
    grid-template-columns: 150px 1fr;
    margin-inline: 22px;
  }

  .relief-machine {
    padding-inline: 24px;
  }

  .selector-row {
    grid-template-columns: 58px minmax(0, 1fr) 58px;
    gap: 8px;
  }

  .nav-button {
    width: 54px;
    height: 76px;
  }
}

@media (max-width: 430px) {
  .brand-header {
    grid-template-columns: 92px 1fr;
  }

  .character-window {
    height: min(46vh, 405px);
  }

  .relief-machine {
    box-shadow: 5px 6px 0 rgba(18, 22, 17, .86), 0 15px 40px rgba(0, 0, 0, .3);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .moving-landscape {
    transform: scale(1.08);
  }
}
