:root {
  --orange-strong: #ff6a00;
  --orange-soft: #ff8518;
  --orange-rim: #ff8c1c;
  --cream: #ffe8b5;
  --cream-deep: #f7dfaa;
  --cream-shadow: rgba(226, 192, 126, 0.55);
  --tan-glow: rgba(220, 194, 137, 0.58);
  --marker-red: #f62300;
  --marker-blue: #1d5fe3;
  --marker-green: #69ff00;
  --marker-cyan: #24d8e5;
  --marker-gold: #ffba2a;
  --marker-black: #080808;
  --marker-grey: #d7d7db;
  --slate-paint: #959595;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f25a00 0 3%, transparent 3%),
    linear-gradient(90deg, rgba(255, 174, 73, 0.3), rgba(255, 119, 0, 0.05) 30%, rgba(255, 174, 73, 0.22) 100%),
    var(--orange-strong);
}

.page-frame {
  background:
    linear-gradient(180deg, rgba(255, 147, 21, 0.95), rgba(255, 106, 0, 0.92)),
    var(--orange-strong);
}

.art-stage {
  position: relative;
  box-shadow: inset 0 0 0 14px rgba(255, 176, 89, 0.55);
}

.sunset-band {
  position: absolute;
  inset: 0 0 auto;
  height: 74px;
  background:
    linear-gradient(180deg, #f65600 0 35%, #ff7c14 35% 100%);
  z-index: 0;
}

.paint-swirl {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 242, 212, 0.46);
  filter: blur(1px);
}

.paint-swirl-a {
  width: min(92vw, 1180px);
  height: min(92vw, 1180px);
  left: 2%;
  top: 5%;
}

.paint-swirl-b {
  width: min(75vw, 980px);
  height: min(75vw, 980px);
  left: 11%;
  top: 5.5%;
  background: rgba(255, 245, 220, 0.55);
}

.paint-swirl-c {
  width: min(61vw, 820px);
  height: min(61vw, 820px);
  right: 8%;
  top: 9%;
  background: rgba(255, 240, 208, 0.5);
}

.logo-badge {
  display: block;
  position: relative;
  width: 9rem;
  height: 9rem;
  margin-left: -1.75rem;
  transform: rotate(-7deg);
}

.logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10rem;
  padding: 0.8rem 1.5rem;
  background: var(--slate-paint);
  color: #060606;
  font-family: "Chewy", cursive;
  font-size: clamp(1.5rem, 2.1vw, 3.2rem);
  line-height: 1;
  text-decoration: none;
  border-radius: 0.3rem;
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.08);
  clip-path: polygon(2% 4%, 98% 0%, 100% 88%, 3% 100%);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.nav-tab:hover {
  transform: translateY(-2px) rotate(-1.5deg);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.08);
}

.nav-tab-active {
  background: #b7b7b7;
}

.hero-figure {
  position: relative;
  width: min(100%, 28rem);
  margin: 0;
}

.hero-gibble {
  display: block;
  width: 100%;
  max-height: min(62vh, 42rem);
  height: auto;
  object-fit: contain;
  transform: rotate(-10deg);
  transform-origin: center bottom;
  filter: drop-shadow(0 14px 0 rgba(164, 53, 0, 0.18));
}

.mini-gibble {
  position: relative;
  width: 8.75rem;
  margin: 0;
}

.mini-gibble-top-right {
  margin-right: -3rem;
  margin-top: -6.0rem;
}

.mini-gibble-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: translate(0.2rem, -0.15rem) rotate(18deg);
  transform-origin: center center;
}

.merch-stage {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    url("./images/tiled-bg.png");
  background-size: auto, 139px 150px;
  background-repeat: repeat;
  background-position: top left;
}

.merch-main {
  min-height: calc(100vh - 10.5rem);
  padding: 0.2rem 1.5rem 2.75rem;
}

.merch-grid {
  display: grid;
  gap: 1.75rem;
  justify-items: center;
  transform: translateY(-5rem);
}

.merch-row {
  display: grid;
  gap: 1.75rem;
  justify-content: center;
}

.merch-row-top {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.merch-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(30vw, 22.5rem);
  height: min(30vw, 22.5rem);
  flex: 0 0 auto;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.97);
  border: 5px solid rgba(255, 162, 74, 0.55);
  border-radius: 1rem;
  box-shadow:
    0 10px 0 rgba(225, 115, 28, 0.18),
    inset 0 0 0 8px rgba(255, 255, 255, 0.5);
}

.merch-item-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.videos-stage {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    url("./images/videos.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.games-stage {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    url("./images/games.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.doors-stage {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    url("./images/doors_start.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.doors-stage-game {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    url("./images/purple.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.doors-stage-win {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    url("./images/win.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.doors-main {
  min-height: calc(100vh - 10.5rem);
  position: relative;
}

.doors-screen {
  min-height: inherit;
}

.doors-screen-start {
  position: relative;
}

.doors-start-button {
  position: absolute;
  left: 1.2rem;
  bottom: 1rem;
  min-width: 10rem;
  font-size: clamp(1.2rem, 1.8vw, 2rem);
}

.doors-screen-game {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 1.5rem 2rem;
}

.doors-status {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
}

.doors-level {
  font-family: "Short Stack", cursive;
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.72);
}

.doors-question {
  padding: 0.8rem 1.2rem;
  background: rgba(255, 249, 237, 0.92);
  border: 4px solid rgba(255, 159, 56, 0.58);
  border-radius: 1.3rem;
  box-shadow: 0 10px 0 rgba(208, 119, 24, 0.16);
  font-family: "Chewy", cursive;
  font-size: clamp(2rem, 4vw, 3.6rem);
  text-align: center;
}

.doors-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: end;
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;
}

.door-card {
  position: relative;
  width: 100%;
  min-height: 23rem;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: transform 120ms ease;
  --door-fill: #8c46db;
  --door-stroke: #5a168d;
  --door-knob: #45404a;
}

.door-card:hover {
  transform: translateY(-4px);
}

.door-illustration {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 18px 0 rgba(0, 0, 0, 0.15));
}

.door-main {
  fill: var(--door-fill);
  stroke: var(--door-stroke);
  stroke-width: 8;
  stroke-linejoin: round;
}

.door-shadow {
  fill: color-mix(in srgb, var(--door-fill) 72%, black);
  opacity: 0.95;
}

.door-knob-shadow {
  fill: rgba(17, 12, 24, 0.55);
}

.door-knob {
  fill: var(--door-knob);
}

.door-answer {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  padding: 0.9rem 1rem;
  background: rgba(255, 253, 246, 0.94);
  border-radius: 1.2rem;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.1);
  font-family: "Chewy", cursive;
  font-size: clamp(2rem, 4vw, 3.4rem);
  text-align: center;
}

.door-red {
  --door-fill: #ef4040;
  --door-stroke: #8f1414;
}

.door-blue {
  --door-fill: #32b6ff;
  --door-stroke: #1269b6;
}

.door-green {
  --door-fill: #67d74f;
  --door-stroke: #2b7f1a;
}

.door-yellow {
  --door-fill: #f3c72d;
  --door-stroke: #a77408;
}

.door-purple {
  --door-fill: #7f24da;
  --door-stroke: #4c167f;
}

.door-orange {
  --door-fill: #f68b24;
  --door-stroke: #b94f00;
}

.doors-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#doors-win.doors-overlay {
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 1rem 1.2rem;
}

.doors-message-panel {
  width: min(100%, 28rem);
  padding: 1.5rem 1.3rem;
  background: rgba(255, 249, 237, 0.95);
  border: 5px solid rgba(255, 151, 48, 0.6);
  border-radius: 1.5rem;
  box-shadow: 0 12px 0 rgba(211, 108, 20, 0.22);
  text-align: center;
}

.doors-message-title {
  margin: 0;
  font-family: "Chewy", cursive;
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  color: var(--marker-red);
}

.doors-message-copy {
  margin: 0.7rem 0 1.2rem;
  font-family: "Short Stack", cursive;
  font-size: 1.1rem;
}

.doors-message-button {
  min-width: 10rem;
}

.doors-win-button {
  min-width: 9rem;
  font-size: clamp(1.2rem, 1.8vw, 2rem);
}

.games-main {
  min-height: calc(100vh - 10.5rem);
  padding: 0;
  position: relative;
}

.games-grid {
  display: grid;
  gap: 1.75rem;
  justify-items: center;
  padding: 1.3rem 1.4rem 5.8rem;
}

.games-row {
  display: grid;
  gap: 1.75rem;
  justify-content: center;
}

.games-row-top {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.games-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(26vw, 15rem);
  height: min(26vw, 15rem);
  padding: 1rem;
  border: 5px solid rgba(255, 162, 74, 0.55);
  border-radius: 1rem;
  box-shadow:
    0 10px 0 rgba(225, 115, 28, 0.18),
    inset 0 0 0 8px rgba(255, 255, 255, 0.18);
  font-family: "Chewy", cursive;
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
  color: #111;
  text-transform: lowercase;
}

.games-box-door {
  background: #fffbef;
  text-transform: none;
}

.games-box-sun {
  background: #ffd44a;
}

.games-box-sky {
  background: #74dbff;
}

.games-box-lime {
  background: #8cff70;
}

.games-box-pink {
  background: #ff98c6;
}

.dev-trigger {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  min-width: 13.5rem;
  font-size: clamp(1.2rem, 1.8vw, 2rem);
  z-index: 15;
}

.games-secret {
  min-height: calc(100vh - 10.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.games-success {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 10.5rem);
  padding: 0;
}

.phone-shell {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 10.5rem);
  padding: 0.75rem 0.75rem 0.9rem;
  background: linear-gradient(180deg, #12151a, #2a2f35);
  border-radius: 0;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.08),
    0 18px 32px rgba(0, 0, 0, 0.24);
}

.phone-speaker {
  width: 4.8rem;
  height: 0.45rem;
  margin: 0 auto 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.phone-screen {
  min-height: calc(100vh - 13rem);
  border-radius: 1.45rem;
  overflow: hidden;
  background: #f6f7fb;
  border: 4px solid rgba(0, 0, 0, 0.16);
}

.chat-app {
  position: relative;
  min-height: calc(100vh - 13.5rem);
  display: grid;
  grid-template-rows: auto 1fr;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.35), transparent 30%),
    linear-gradient(180deg, #e7ecf3, #d8dee9);
}

.chat-app-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding: 1rem;
  background: linear-gradient(180deg, #2286e7, #145fbe);
  color: #fff;
}

.chat-app-avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffdb5c, #ff8b1f);
  box-shadow: inset 0 -0.2rem 0 rgba(0, 0, 0, 0.12);
}

.chat-app-title {
  font-family: "Chewy", cursive;
  font-size: 1.35rem;
  line-height: 1;
}

.chat-app-subtitle {
  margin-top: 0.2rem;
  font-family: "Short Stack", cursive;
  font-size: 0.78rem;
  opacity: 0.9;
}

.chat-app-secret {
  display: flex;
  flex: 1 1 13rem;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-left: auto;
}

.friend-letter {
  min-width: 1.55rem;
  padding: 0.05rem 0.15rem;
  border: none;
  background: transparent;
  font-family: "Chewy", cursive;
  font-size: 1.4rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.38);
  cursor: pointer;
  transform: rotate(-3deg);
  transition:
    transform 120ms ease,
    filter 120ms ease,
    opacity 120ms ease;
}

.friend-letter:nth-child(even) {
  transform: rotate(3deg);
}

.friend-letter:hover,
.friend-letter:focus-visible {
  transform: translateY(-1px) scale(1.08);
  filter: brightness(1.08);
  outline: none;
}

.friend-letter-active {
  opacity: 0.42;
  transform: translateY(1px) scale(0.96);
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 0.9rem 1.2rem;
  overflow: auto;
}

.friend-modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 5;
}

.friend-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(58, 0, 0, 0.22), rgba(0, 0, 0, 0.72)),
    rgba(0, 0, 0, 0.58);
}

.friend-modal-panel {
  position: relative;
  width: min(100%, 23rem);
  padding: 1.2rem 1.1rem 1rem;
  border: 3px solid #000;
  border-radius: 0.8rem;
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.98), rgba(232, 226, 218, 0.98));
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.24),
    0 18px 35px rgba(0, 0, 0, 0.48);
}

.friend-modal-label {
  display: block;
  margin-bottom: 0.8rem;
}

.friend-password-display {
  display: block;
  padding: 0.9rem 0.95rem 1rem;
  overflow: hidden;
  border: 2px solid #1d1d1d;
  border-radius: 0.55rem;
  background:
    linear-gradient(180deg, rgba(18, 18, 18, 0.96), rgba(10, 10, 10, 0.98)),
    #0a0a0a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 18px rgba(0, 0, 0, 0.35);
}

.glitch-text {
  position: relative;
  display: inline-grid;
  color: #e8e6e0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-rendering: geometricPrecision;
  isolation: isolate;
  filter: contrast(1.03);
  animation:
    glitch-jitter 320ms steps(2, end) infinite,
    glitch-brightness 5.3s steps(2, end) infinite;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  white-space: pre;
}

.glitch-text::before {
  z-index: 1;
  color: rgba(255, 68, 103, 0.9);
  animation: glitch-red-offset 3.7s steps(2, end) infinite;
}

.glitch-text::after {
  z-index: 1;
  color: rgba(90, 224, 255, 0.88);
  animation: glitch-cyan-offset 5.3s steps(2, end) infinite;
}

.glitch-main,
.glitch-layer,
.glitch-ghost {
  grid-area: 1 / 1;
  white-space: pre;
}

.glitch-main {
  position: relative;
  z-index: 3;
  color: #e8e6e0;
}

.glitch-ghost {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: rgba(232, 230, 224, 0.15);
  transform-origin: center;
  animation: glitch-ghost-pulse 7.1s steps(2, end) infinite;
}

.glitch-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  color: #e8e6e0;
  pointer-events: none;
}

.glitch-slice {
  opacity: 0;
  text-shadow:
    -2px 0 rgba(255, 68, 103, 0.55),
    2px 0 rgba(90, 224, 255, 0.55);
}

.glitch-slice-a {
  clip-path: inset(0 0 68% 0);
  animation: glitch-slice-a 3.7s steps(2, end) infinite;
}

.glitch-slice-b {
  clip-path: inset(34% 0 32% 0);
  animation: glitch-slice-b 5.3s steps(2, end) infinite;
}

.glitch-slice-c {
  clip-path: inset(72% 0 0 0);
  animation: glitch-slice-c 7.1s steps(2, end) infinite;
}

.glitch-char {
  display: inline-block;
  min-width: 0.42ch;
  transform-origin: center;
}

.glitch-char-live {
  color: #f3f0ea;
  text-shadow:
    -1px 0 rgba(255, 68, 103, 0.95),
    1px 0 rgba(90, 224, 255, 0.95);
}

.glitch-char-subbed {
  transform: translateY(-1px);
}

.glitch-char-flip-x {
  transform: scaleX(-1);
}

.glitch-char-flip-y {
  transform: scaleY(-1);
}

.glitch-text-spike {
  opacity: 0.62;
  filter: brightness(1.3) contrast(1.5);
}

.glitch-text-spike .glitch-main {
  text-shadow:
    -4px 0 rgba(255, 68, 103, 0.82),
    4px 0 rgba(90, 224, 255, 0.82);
}

.glitch-text-spike::before {
  transform: translate(-8px, 0);
}

.glitch-text-spike::after {
  transform: translate(8px, 0);
}

.friend-password-input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 3px solid #151515;
  border-radius: 0.65rem;
  background: #fff;
  font-family: "Short Stack", cursive;
  font-size: 1rem;
  color: #111;
}

.friend-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.95rem;
}

.friend-modal-button {
  min-width: 6rem;
  padding: 0.55rem 0.8rem;
  border: 3px solid #111;
  border-radius: 0.7rem;
  font-family: "Chewy", cursive;
  font-size: 1.15rem;
  cursor: pointer;
}

.friend-modal-button-enter {
  background: #ffa63d;
  color: #111;
}

.friend-modal-button-cancel {
  background: #e7eefb;
  color: #111;
}

.chat-row {
  display: flex;
}

.chat-row.incoming {
  justify-content: flex-start;
}

.chat-row.outgoing {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 82%;
  padding: 0.72rem 0.85rem;
  border-radius: 1.2rem;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.08);
}

.chat-bubble.incoming {
  background: #ffffff;
  border-bottom-left-radius: 0.35rem;
}

.chat-bubble.outgoing {
  background: #b6ff76;
  border-bottom-right-radius: 0.35rem;
}

.chat-meta {
  margin-bottom: 0.35rem;
  font-family: "Short Stack", cursive;
  font-size: 0.7rem;
  color: rgba(0, 0, 0, 0.56);
}

.chat-text {
  font-family: "Short Stack", cursive;
  font-size: 0.96rem;
  line-height: 1.4;
  color: #141414;
}

.typing-bubble {
  min-width: 5.4rem;
}

.typing-dots {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.typing-dots span {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  animation: typing-pop 1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.phone-button {
  width: 3.4rem;
  height: 0.34rem;
  margin: 0.9rem auto 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

@keyframes typing-pop {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  40% {
    transform: translateY(-0.18rem);
    opacity: 1;
  }
}

@keyframes glitch-jitter {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  18% {
    transform: translate(-1px, 1px) rotate(-0.35deg);
  }

  37% {
    transform: translate(1px, 0) rotate(0.2deg);
  }

  58% {
    transform: translate(0, -1px) rotate(0deg);
  }

  79% {
    transform: translate(1px, 1px) rotate(0.45deg);
  }

  100% {
    transform: translate(0, 0) rotate(-0.2deg);
  }
}

@keyframes glitch-brightness {
  0%,
  96%,
  100% {
    opacity: 1;
    filter: brightness(1) contrast(1.03);
  }

  97% {
    opacity: 0.6;
    filter: brightness(1.3) contrast(1.5);
  }

  98% {
    opacity: 0.88;
    filter: brightness(1.18) contrast(1.28);
  }
}

@keyframes glitch-red-offset {
  0%,
  100% {
    transform: translate(-2px, 0);
    opacity: 0.88;
  }

  24% {
    transform: translate(-1px, 0);
  }

  52% {
    transform: translate(-3px, 0);
  }

  96% {
    transform: translate(-7px, 1px);
    opacity: 1;
  }

  97.5% {
    transform: translate(-4px, -1px);
  }

  99% {
    transform: translate(-2px, 0);
  }
}

@keyframes glitch-cyan-offset {
  0%,
  100% {
    transform: translate(2px, 0);
    opacity: 0.86;
  }

  19% {
    transform: translate(1px, 0);
  }

  61% {
    transform: translate(3px, 0);
  }

  97% {
    transform: translate(8px, -1px);
    opacity: 1;
  }

  98% {
    transform: translate(5px, 1px);
  }

  99% {
    transform: translate(2px, 0);
  }
}

@keyframes glitch-ghost-pulse {
  0%,
  93%,
  100% {
    opacity: 0;
    transform: scale(1.5) rotate(0deg);
  }

  94% {
    opacity: 0.12;
    transform: scale(1.7) rotate(-1deg) translateX(-2px);
  }

  95% {
    opacity: 0.18;
    transform: scale(1.92) rotate(1deg) translateX(4px);
  }

  96% {
    opacity: 0;
    transform: scale(1.55) rotate(0deg);
  }
}

@keyframes glitch-slice-a {
  0%,
  95%,
  100% {
    opacity: 0;
    transform: translateX(0);
  }

  96% {
    opacity: 0.95;
    transform: translateX(-12px);
  }

  97% {
    opacity: 0.95;
    transform: translateX(7px);
  }

  98% {
    opacity: 0;
    transform: translateX(0);
  }
}

@keyframes glitch-slice-b {
  0%,
  96.5%,
  100% {
    opacity: 0;
    transform: translateX(0);
  }

  97% {
    opacity: 0.92;
    transform: translateX(14px);
  }

  98% {
    opacity: 0.92;
    transform: translateX(-8px);
  }

  99% {
    opacity: 0;
    transform: translateX(0);
  }
}

@keyframes glitch-slice-c {
  0%,
  97%,
  100% {
    opacity: 0;
    transform: translateX(0);
  }

  97.4% {
    opacity: 0.9;
    transform: translateX(-6px);
  }

  98.2% {
    opacity: 0.95;
    transform: translateX(11px);
  }

  99% {
    opacity: 0;
    transform: translateX(0);
  }
}

.videos-main {
  min-height: calc(100vh - 10.5rem);
  padding: 0.45rem 1.5rem 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.episode-player {
  width: min(100%, 48rem);
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  align-items: center;
  gap: 1rem;
}

.episode-arrow {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 140ms ease, opacity 140ms ease;
}

.episode-player > .episode-arrow:last-child {
  margin-left: -0.6rem;
}

.episode-arrow:hover {
  transform: scale(1.06);
}

.episode-arrow-triangle {
  display: block;
  width: 0;
  height: 0;
  border-top: 1.4rem solid transparent;
  border-bottom: 1.4rem solid transparent;
}

.episode-arrow-left {
  border-right: 2.2rem solid rgba(255, 255, 255, 0.96);
}

.episode-arrow-right {
  border-left: 2.2rem solid rgba(255, 255, 255, 0.96);
}

.episode-arrow-disabled {
  opacity: 0.28;
  pointer-events: none;
}

.player-shell {
  width: 100%;
  max-width: 39rem;
  margin-top: 0.2rem;
  background: #c3c7cb;
  border-top: 3px solid #f4f6f8;
  border-left: 3px solid #f4f6f8;
  border-right: 3px solid #63676b;
  border-bottom: 3px solid #63676b;
  box-shadow: 10px 10px 0 rgba(53, 55, 57, 0.16);
}

.player-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.1rem;
  padding: 0.3rem 0.35rem 0.3rem 0.55rem;
  background: linear-gradient(90deg, #020881, #0b3eb2);
  color: #ffffff;
}

.player-titletext {
  font-family: "Short Stack", cursive;
  font-size: 0.95rem;
  line-height: 1;
}

.player-controls {
  display: flex;
  gap: 0.22rem;
}

.player-control {
  width: 1.25rem;
  height: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #c3c7cb;
  color: #111;
  border-top: 2px solid #f4f6f8;
  border-left: 2px solid #f4f6f8;
  border-right: 2px solid #63676b;
  border-bottom: 2px solid #63676b;
  font-family: monospace;
  font-size: 0.8rem;
  line-height: 1;
}

.player-body {
  padding: 0.7rem;
  background: #c3c7cb;
}

.player-screen {
  aspect-ratio: 4 / 3;
  width: 100%;
  background: #ffffff;
  border-top: 3px solid #63676b;
  border-left: 3px solid #63676b;
  border-right: 3px solid #f4f6f8;
  border-bottom: 3px solid #f4f6f8;
}

.player-video {
  display: block;
  object-fit: contain;
}

.player-error-screen {
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(32, 32, 32, 0.18), transparent 45%),
    linear-gradient(180deg, #030303, #0a0a0a);
}

.player-error-glitch {
  position: relative;
  display: inline-grid;
  max-width: min(90%, 26rem);
  color: #ffffff;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.08em;
  text-align: center;
  text-rendering: geometricPrecision;
  isolation: isolate;
  filter: contrast(1.04);
  animation:
    glitch-jitter 340ms steps(2, end) infinite,
    glitch-brightness 5.3s steps(2, end) infinite;
}

.player-error-glitch::before,
.player-error-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  white-space: pre-wrap;
}

.player-error-glitch::before {
  z-index: 1;
  color: rgba(255, 62, 98, 0.88);
  animation: glitch-red-offset 3.7s steps(2, end) infinite;
}

.player-error-glitch::after {
  z-index: 1;
  color: rgba(84, 214, 255, 0.86);
  animation: glitch-cyan-offset 5.3s steps(2, end) infinite;
}

.player-error-main,
.player-error-layer,
.player-error-ghost {
  grid-area: 1 / 1;
  white-space: pre-wrap;
}

.player-error-main {
  position: relative;
  z-index: 3;
  color: #ffffff;
}

.player-error-ghost {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: rgba(255, 255, 255, 0.16);
  transform-origin: center;
  animation: glitch-ghost-pulse 7.1s steps(2, end) infinite;
}

.player-error-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  color: #ffffff;
  pointer-events: none;
}

.player-error-slice {
  opacity: 0;
  text-shadow:
    -2px 0 rgba(255, 62, 98, 0.55),
    2px 0 rgba(84, 214, 255, 0.55);
}

.player-error-slice-a {
  clip-path: inset(0 0 68% 0);
  animation: glitch-slice-a 3.7s steps(2, end) infinite;
}

.player-error-slice-b {
  clip-path: inset(34% 0 32% 0);
  animation: glitch-slice-b 5.3s steps(2, end) infinite;
}

.player-error-slice-c {
  clip-path: inset(72% 0 0 0);
  animation: glitch-slice-c 7.1s steps(2, end) infinite;
}

.player-error-char {
  display: inline-block;
  min-width: 0.35ch;
  transform-origin: center;
}

.player-error-char-live {
  color: #ffffff;
  text-shadow:
    -1px 0 rgba(255, 62, 98, 0.95),
    1px 0 rgba(84, 214, 255, 0.95);
}

.player-error-char-subbed {
  transform: translateY(-1px);
}

.player-error-char-flip-x {
  transform: scaleX(-1);
}

.player-error-char-flip-y {
  transform: scaleY(-1);
}

.player-error-glitch-spike {
  opacity: 0.72;
  filter: brightness(1.34) contrast(1.58);
}

.player-error-glitch-spike .player-error-main {
  text-shadow:
    -4px 0 rgba(255, 62, 98, 0.82),
    4px 0 rgba(84, 214, 255, 0.82);
}

@media (max-width: 1024px) {
  .paint-swirl-a {
    left: -10%;
    top: 9%;
    width: 1100px;
    height: 1100px;
  }

  .paint-swirl-b {
    left: 3%;
    top: 11%;
    width: 900px;
    height: 900px;
  }

  .paint-swirl-c {
    right: -10%;
    top: 20%;
    width: 700px;
    height: 700px;
  }
}

@media (max-width: 768px) {
  .logo-badge {
    width: 7rem;
    height: 7rem;
  }

  .nav-tab {
    min-width: auto;
    font-size: 1.8rem;
    padding: 0.65rem 1rem;
  }

  .sunset-band {
    height: 88px;
  }

  .hero-figure {
    width: min(100%, 20rem);
    margin-top: 0.25rem;
  }

  .merch-main {
    min-height: calc(100vh - 11rem);
    padding: 0.15rem 1rem 2rem;
  }

  .games-main {
    min-height: calc(100vh - 11rem);
    padding: 0;
  }

  .doors-main {
    min-height: calc(100vh - 11rem);
  }

  .doors-screen-game {
    gap: 1.2rem;
    padding: 0.7rem 1rem 1.3rem;
  }

  .doors-row {
    gap: 1rem;
  }

  .door-card {
    min-height: 18rem;
  }

  .games-grid {
    gap: 1rem;
    padding: 1rem 1rem 5rem;
  }

  .games-row {
    gap: 1rem;
  }

  .games-box {
    width: min(27vw, 10.75rem);
    height: min(27vw, 10.75rem);
  }

  .games-success {
    min-height: calc(100vh - 11rem);
    padding: 0;
  }

  .dev-trigger {
    right: 0.75rem;
    bottom: 0.75rem;
    min-width: 11.5rem;
  }

  .merch-row-top,
  .merch-row-bottom {
    gap: 1rem;
  }

  .merch-box {
    width: min(28vw, 11rem);
    height: min(28vw, 11rem);
  }

  .videos-main {
    padding: 0.3rem 1rem 1rem;
  }

  .episode-player {
    width: min(100%, 42rem);
    grid-template-columns: 2.6rem minmax(0, 1fr) 2.6rem;
    gap: 0.7rem;
  }

  .player-shell {
    max-width: 34.5rem;
    margin-top: 0.15rem;
  }
}

@media (max-width: 640px) {
  .merch-row-top,
  .merch-row-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .merch-box {
    width: min(40vw, 9rem);
    height: min(40vw, 9rem);
  }

  .videos-main {
    padding: 0.25rem 0.55rem 0.85rem;
  }

  .episode-player {
    width: 100%;
    grid-template-columns: 2.2rem minmax(0, 1fr) 2.2rem;
    gap: 0.35rem;
  }

  .chat-app-secret {
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
  }

  .friend-letter {
    font-size: 1.2rem;
  }

  .friend-modal-actions {
    justify-content: space-between;
  }

  .doors-start-button {
    left: 0.8rem;
    bottom: 0.8rem;
    min-width: 8.5rem;
  }

  .doors-row {
    grid-template-columns: 1fr;
    max-width: 18rem;
  }

  .door-card {
    min-height: 13rem;
  }

  .door-card::after {
    width: 1rem;
    height: 1rem;
  }

  .games-row-top,
  .games-row-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .games-box {
    width: min(40vw, 8.8rem);
    height: min(40vw, 8.8rem);
    font-size: 1.25rem;
  }

  .phone-shell {
    min-height: calc(100vh - 11rem);
    padding: 0.55rem 0.55rem 0.7rem;
  }

  .phone-screen {
    min-height: calc(100vh - 12.6rem);
  }

  .chat-app {
    min-height: calc(100vh - 13rem);
  }

  .chat-app {
    min-height: 26rem;
  }

  .episode-arrow {
    width: 2.2rem;
    height: 2.2rem;
  }

  .episode-player > .episode-arrow:last-child {
    margin-left: -0.35rem;
  }

  .episode-arrow-triangle {
    border-top-width: 1rem;
    border-bottom-width: 1rem;
  }

  .episode-arrow-left {
    border-right-width: 1.55rem;
  }

  .episode-arrow-right {
    border-left-width: 1.55rem;
  }

  .player-titletext {
    font-size: 0.78rem;
  }

  .player-control {
    width: 1.05rem;
    height: 1rem;
    font-size: 0.68rem;
  }
}
