:root {
  --ink: #161414;
  --paper: #fffaf0;
  --sky: #6ed7ff;
  --sky-deep: #1ba6d9;
  --tomato: #ff4d3d;
  --lemon: #ffe156;
  --grass: #4fc36b;
  --blue: #2667ff;
  --pink: #ff6fb1;
  --mood: 42%;
  --shadow: 0 18px 0 rgba(22, 20, 20, 0.16);
  --border: 3px solid var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 225, 86, 0.95) 0 6rem, transparent 6.2rem),
    radial-gradient(circle at 84% 10%, rgba(255, 111, 177, 0.75) 0 5rem, transparent 5.2rem),
    linear-gradient(180deg, var(--sky) 0%, #b8efff 42%, #fff4cf 100%);
  color: var(--ink);
  font-family:
    "Arial Rounded MT Bold",
    "Trebuchet MS",
    system-ui,
    sans-serif;
  overflow-x: hidden;
}

body.chaos-reality {
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 77, 61, 0.95) 0 6rem, transparent 6.2rem),
    radial-gradient(circle at 88% 8%, rgba(79, 195, 107, 0.9) 0 5.5rem, transparent 5.7rem),
    linear-gradient(160deg, #8fe8ff 0%, #ffe156 48%, #ff6fb1 100%);
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.sky-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(22, 20, 20, 0.15) 1px, transparent 1px),
    linear-gradient(rgba(22, 20, 20, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.cursor-dot {
  position: fixed;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--lemon);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 30;
  opacity: 0;
  transition: opacity 160ms ease;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  width: min(1120px, calc(100% - 28px));
  margin: 14px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px;
  border: var(--border);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.9);
  box-shadow: 0 8px 0 rgba(22, 20, 20, 0.13);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 900;
  letter-spacing: 0;
}

.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--tomato);
  color: var(--paper);
  transform: rotate(-8deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.icon-button {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.92rem;
  font-weight: 850;
}

.nav-links a:hover,
.icon-button:hover {
  border-color: var(--ink);
  background: var(--lemon);
}

.icon-button {
  width: 42px;
  padding: 0;
  background: var(--grass);
  border-color: var(--ink);
  cursor: pointer;
}

.hero {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100svh - 88px);
  margin: 26px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(24px, 5vw, 54px) 0 78px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 14px;
  height: 20px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 28px);
  border-radius: 999px;
  opacity: 0.32;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 790px;
  font-size: clamp(3.2rem, 10vw, 8.8rem);
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: lowercase;
  text-wrap: balance;
  text-shadow: 5px 5px 0 var(--lemon), 9px 9px 0 rgba(22, 20, 20, 0.14);
}

h1.title-pop {
  animation: title-pop 520ms ease;
}

.hero-copy > p:not(.motto) {
  max-width: 620px;
  margin-top: 28px;
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  line-height: 1.45;
  font-weight: 750;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border: var(--border);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 7px 0 rgba(22, 20, 20, 0.18);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.chaos-card:hover,
.quote-note:hover,
.lever:hover,
.tiny-desk:hover {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 12px 0 rgba(22, 20, 20, 0.16);
}

.button:active,
.chaos-card:active,
.quote-note:active,
.lever:active,
.tiny-desk:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(22, 20, 20, 0.18);
}

.primary {
  background: var(--tomato);
  color: #fff;
}

.secondary {
  background: var(--paper);
}

.small {
  min-height: 42px;
  padding: 0 14px;
  background: var(--lemon);
}

.chaos-button {
  background: var(--blue);
  color: white;
}

.motto {
  display: inline-block;
  max-width: 560px;
  margin-top: 26px;
  padding: 14px 16px;
  border: var(--border);
  border-radius: 8px;
  background: var(--grass);
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 7px 7px 0 rgba(22, 20, 20, 0.14);
  transform: rotate(-1deg);
}

.hero-stage {
  position: relative;
  min-height: 580px;
}

.path-line {
  position: absolute;
  inset: 9% 6% 5%;
  border: 5px dashed rgba(22, 20, 20, 0.5);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(18deg);
  animation: wobble 5s ease-in-out infinite;
}

.sticker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: min(210px, 45vw);
  padding: 16px;
  border: var(--border);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(var(--r));
  animation: floaty 4.8s ease-in-out infinite;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.sticker.dragging {
  z-index: 8;
  cursor: grabbing;
  animation: none;
  box-shadow: 0 22px 0 rgba(22, 20, 20, 0.18);
}

.sticker:nth-of-type(3) {
  animation-delay: -1.2s;
}

.sticker:nth-of-type(4) {
  animation-delay: -2s;
}

.sticker-icon {
  display: block;
  font-size: 3rem;
  line-height: 1;
}

.sticker strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
  line-height: 1;
}

.sticker small {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 800;
}

.alarm {
  background: var(--lemon);
}

.coffee {
  background: #fff;
}

.banana {
  background: var(--grass);
}

.rocket {
  background: var(--tomato);
  color: #fff;
}

.tiny-desk {
  position: absolute;
  right: 4%;
  bottom: 6%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: var(--border);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--blue);
  color: white;
  font-size: 0.95rem;
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(22, 20, 20, 0.2);
  cursor: pointer;
}

.tiny-desk span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  color: var(--ink);
}

.ticker {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-block: var(--border);
  background: var(--ink);
  color: var(--paper);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 34px;
  padding: 16px 0;
  animation: ticker 24s linear infinite;
}

.ticker span {
  font-weight: 900;
  white-space: nowrap;
}

.section {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(64px, 8vw, 104px) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.7fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: lowercase;
}

.section-heading p,
.machine-top p,
.footer p {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.45;
  font-weight: 780;
}

.copyright {
  margin-top: 12px;
  font-size: 0.98rem;
}

.copyright a {
  color: var(--lemon);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.chaos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.chaos-card {
  min-height: 190px;
  padding: 18px;
  border: var(--border);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 0 rgba(22, 20, 20, 0.16);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.chaos-card.active {
  background: var(--lemon);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--tomato);
  color: white;
  font-size: 1.8rem;
}

.chaos-card strong,
.quote-note {
  display: block;
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  line-height: 1.12;
  font-weight: 950;
}

.chaos-card small {
  display: block;
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 750;
}

.carousel-result {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 118px;
  margin-top: 18px;
  padding: 18px;
  border: var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 0 rgba(22, 20, 20, 0.13);
}

.carousel-result span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 2.4rem;
}

.carousel-result p {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.25;
  font-weight: 900;
}

.lab {
  width: min(1120px, calc(100% - 32px));
}

.lab-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(300px, 1.3fr) minmax(240px, 0.85fr);
  gap: 16px;
}

.lab-panel {
  min-height: 260px;
  padding: 18px;
  border: var(--border);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 12px 0 rgba(22, 20, 20, 0.16);
}

.panel-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-weight: 950;
}

.panel-topline span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--lemon);
}

.range-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-weight: 950;
}

.range-label output {
  font-size: 2rem;
}

#moodRange {
  width: 100%;
  margin: 24px 0 18px;
  accent-color: var(--tomato);
}

.mood-meter {
  height: 34px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
}

.mood-meter span {
  display: block;
  width: var(--mood);
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--grass) 0 18px, var(--lemon) 18px 36px);
  transition: width 180ms ease;
}

.oracle-panel {
  background: var(--lemon);
}

.oracle-reels {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.oracle-reels span {
  display: block;
  min-height: 54px;
  padding: 12px 14px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 950;
  box-shadow: 0 6px 0 rgba(22, 20, 20, 0.12);
}

.oracle-reels.spin span {
  animation: reel-bump 420ms ease;
}

.murphy-panel {
  background: var(--tomato);
  color: white;
}

.murphy-panel .panel-topline span,
.murphy-panel .button {
  color: var(--ink);
}

.murphy-panel p {
  min-height: 94px;
  margin-bottom: 18px;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.18;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.playground {
  width: min(1180px, calc(100% - 32px));
}

.playground-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 1.15fr) minmax(260px, 0.82fr);
  gap: 16px;
  align-items: stretch;
}

.play-card {
  border: var(--border);
  border-radius: 8px;
  padding: 18px;
  background: var(--paper);
  box-shadow: 0 12px 0 rgba(22, 20, 20, 0.16);
}

.wheel-panel {
  grid-row: span 2;
  background: #8fe8ff;
}

.wheel-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 310px;
  margin-bottom: 16px;
}

.wheel-pointer {
  position: absolute;
  top: 3px;
  z-index: 2;
  width: 42px;
  height: 58px;
  border: var(--border);
  border-radius: 50% 50% 50% 0;
  background: var(--ink);
  transform: rotate(-45deg);
}

.wheel-pointer::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: var(--lemon);
}

.decision-wheel {
  position: relative;
  width: min(290px, 72vw);
  aspect-ratio: 1;
  border: 5px solid var(--ink);
  border-radius: 50%;
  background: conic-gradient(
    var(--tomato) 0 45deg,
    var(--lemon) 45deg 90deg,
    var(--grass) 90deg 135deg,
    #8fe8ff 135deg 180deg,
    var(--tomato) 180deg 225deg,
    var(--lemon) 225deg 270deg,
    var(--grass) 270deg 315deg,
    #8fe8ff 315deg 360deg
  );
  box-shadow: 0 14px 0 rgba(22, 20, 20, 0.15);
  transition: transform 2.2s cubic-bezier(0.12, 0.8, 0.18, 1);
}

.decision-wheel::after {
  content: "das leben";
  position: absolute;
  inset: 31%;
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 1.15rem;
  font-weight: 950;
  text-align: center;
}

.decision-wheel span {
  position: absolute;
  width: 86px;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.decision-wheel span:nth-child(1) {
  top: 18%;
  left: 51%;
}

.decision-wheel span:nth-child(2) {
  top: 51%;
  left: 61%;
}

.decision-wheel span:nth-child(3) {
  top: 70%;
  left: 30%;
}

.decision-wheel span:nth-child(4) {
  top: 36%;
  left: 8%;
}

.wheel-result,
.bingo-status,
.dice-panel p,
.reality-panel p,
.rain-panel p {
  margin-top: 14px;
  font-weight: 950;
  line-height: 1.25;
}

.bingo-panel {
  background: var(--lemon);
}

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.bingo-tile {
  min-height: 72px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 8px;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.05;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(22, 20, 20, 0.14);
}

.bingo-tile.active {
  background: var(--blue);
  color: white;
  transform: rotate(-1deg);
}

.dice-panel {
  background: var(--grass);
}

.dice-row {
  display: flex;
  gap: 12px;
  margin: 8px 0 16px;
}

.die {
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  border: var(--border);
  border-radius: 18px;
  background: var(--lemon);
  font-size: 3.4rem;
  font-weight: 950;
  box-shadow: 0 12px 0 rgba(22, 20, 20, 0.16);
}

.red-die {
  background: var(--tomato);
  color: white;
}

.die.rolling {
  animation: dice-roll 520ms ease;
}

.reality-panel {
  background: #101010;
  color: white;
}

.reality-panel .panel-topline span {
  color: var(--ink);
}

.reality-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 72px;
  border: var(--border);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tomato) 0 50%, var(--grass) 50% 100%);
  color: var(--ink);
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 950;
  cursor: pointer;
}

.reality-switch i {
  display: block;
  width: 58px;
  height: 58px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: white;
  box-shadow: 0 6px 0 rgba(22, 20, 20, 0.18);
  transition: transform 220ms ease;
}

.reality-switch[aria-pressed="true"] i {
  transform: translateX(14px) rotate(24deg);
}

.rain-panel {
  background: var(--pink);
}

.excuse-note {
  position: fixed;
  z-index: 54;
  width: min(190px, 54vw);
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--lemon);
  color: var(--ink);
  pointer-events: none;
  font-weight: 950;
  line-height: 1.1;
  box-shadow: 0 9px 0 rgba(22, 20, 20, 0.14);
  animation: excuse-fall 2600ms ease-in forwards;
}

.plan {
  width: 100%;
  max-width: none;
  background:
    linear-gradient(135deg, rgba(255, 77, 61, 0.16) 25%, transparent 25%) 0 0 / 42px 42px,
    var(--grass);
  border-block: var(--border);
}

.machine {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.machine-top,
.machine-body {
  border: var(--border);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.machine-top {
  padding: clamp(22px, 4vw, 34px);
}

.machine-body {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.display {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 190px;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: #101010;
  color: var(--paper);
}

.display span {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--tomato);
  font-size: 2.2rem;
}

.display p {
  font-size: clamp(1.25rem, 2.3vw, 2rem);
  line-height: 1.18;
  font-weight: 950;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.lever {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border: var(--border);
  border-radius: 8px;
  padding: 0 16px 0 10px;
  background: var(--tomato);
  color: white;
  font-weight: 950;
  box-shadow: 0 8px 0 rgba(22, 20, 20, 0.18);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.lever-knob {
  width: 34px;
  height: 34px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--lemon);
}

.lever.pulled .lever-knob {
  animation: knob 380ms ease;
}

.quote-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.quote-note {
  min-height: 210px;
  border: var(--border);
  border-radius: 8px;
  padding: 18px;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 0 rgba(22, 20, 20, 0.15);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.quote-note:nth-child(odd) {
  transform: rotate(-1.5deg);
}

.quote-note:nth-child(even) {
  transform: rotate(1.3deg);
}

.quote-note.yellow {
  background: var(--lemon);
}

.quote-note.green {
  background: var(--grass);
}

.quote-note.red {
  background: var(--tomato);
  color: white;
}

.quote-note.blue {
  background: #8fe8ff;
}

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(28px, 5vw, 46px) max(18px, calc((100vw - 1120px) / 2));
  border-top: var(--border);
  background: var(--ink);
  color: var(--paper);
}

.footer h2 {
  max-width: 760px;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
}

.footer .button {
  color: var(--ink);
  flex: 0 0 auto;
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 60;
}

.confetti {
  position: fixed;
  top: -20px;
  width: 12px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 2px;
  pointer-events: none;
  z-index: 40;
  animation: fall 1200ms ease-in forwards;
}

.life-pop {
  position: fixed;
  z-index: 55;
  pointer-events: none;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--lemon);
  color: var(--ink);
  font-weight: 950;
  box-shadow: 0 8px 0 rgba(22, 20, 20, 0.15);
  animation: pop-away 1100ms ease-out forwards;
}

@keyframes floaty {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

@keyframes wobble {
  0%,
  100% {
    transform: rotate(18deg) scale(1);
  }
  50% {
    transform: rotate(10deg) scale(1.03);
  }
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes fall {
  to {
    transform: translateY(108vh) rotate(540deg);
    opacity: 0.2;
  }
}

@keyframes confetti-pop {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.7) rotate(0deg);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(90px) scale(1) rotate(22deg);
  }
}

@keyframes knob {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(12px) rotate(18deg);
  }
}

@keyframes reel-bump {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  35% {
    transform: translateY(-8px) rotate(-1deg);
  }
  70% {
    transform: translateY(5px) rotate(1deg);
  }
}

@keyframes pop-away {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.65) rotate(-8deg);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -120px) scale(1.05) rotate(12deg);
  }
}

@keyframes title-pop {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  45% {
    transform: scale(1.04) rotate(-1deg);
  }
  70% {
    transform: scale(0.98) rotate(1deg);
  }
}

@keyframes dice-roll {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  35% {
    transform: rotate(-16deg) scale(1.08);
  }
  70% {
    transform: rotate(18deg) scale(0.96);
  }
}

@keyframes excuse-fall {
  0% {
    opacity: 0;
    transform: translateY(-80px) rotate(-8deg);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(110vh) rotate(18deg);
  }
}

body.world-wobble .hero-copy,
body.world-wobble .hero-stage,
body.world-wobble .section,
body.world-wobble .ticker {
  animation: world-wobble 520ms ease-in-out 2;
}

@keyframes world-wobble {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-8px) rotate(-0.6deg);
  }
  75% {
    transform: translateX(8px) rotate(0.6deg);
  }
}

@media (max-width: 900px) {
  .topbar {
    top: 8px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 36px;
  }

  .hero-stage {
    min-height: 500px;
  }

  .section-heading,
  .machine {
    grid-template-columns: 1fr;
  }

  .chaos-grid,
  .lab-grid,
  .playground-grid,
  .quote-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oracle-panel,
  .wheel-panel,
  .bingo-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .topbar {
    position: relative;
    top: auto;
    width: calc(100% - 16px);
  }

  .brand span:last-child {
    max-width: 210px;
  }

  .hero {
    width: calc(100% - 22px);
  }

  h1 {
    font-size: clamp(3rem, 17vw, 5.8rem);
  }

  .hero-copy > p:not(.motto) {
    margin-top: 20px;
  }

  .button {
    width: 100%;
  }

  .hero-stage {
    min-height: 610px;
  }

  .sticker {
    width: min(178px, 58vw);
  }

  .coffee {
    --x: 42% !important;
    --y: 10% !important;
  }

  .banana {
    --x: 2% !important;
    --y: 42% !important;
  }

  .rocket {
    --x: 38% !important;
    --y: 58% !important;
  }

  .tiny-desk {
    right: 0;
    bottom: 0;
  }

  .chaos-grid,
  .lab-grid,
  .playground-grid,
  .quote-wall {
    grid-template-columns: 1fr;
  }

  .oracle-panel,
  .wheel-panel,
  .bingo-panel {
    grid-column: auto;
  }

  .bingo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .die {
    width: 76px;
    font-size: 2.8rem;
  }

  .carousel-result,
  .display {
    grid-template-columns: 1fr;
  }

  .display span {
    width: 58px;
    height: 58px;
  }

  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .murphy-panel p {
    min-height: auto;
    font-size: 1.14rem;
  }
}

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

  .confetti {
    animation: confetti-pop 900ms ease-out forwards !important;
  }

  .life-pop,
  .die.rolling,
  .excuse-note,
  .oracle-reels.spin span,
  h1.title-pop,
  body.world-wobble .hero-copy,
  body.world-wobble .hero-stage,
  body.world-wobble .section,
  body.world-wobble .ticker {
    animation-duration: 0.001ms !important;
  }
}
