:root {
  --ink: #0A0812;
  --cream: #FFF7E8;
  --panel-bg: #061224;
  --panel-dots: #0B1E3D;
  --accent-color: #FF6B5B;
  --bubble-bg: #FFF7E8;
  --text-color: #0A0812;
}

/* Chapter Palettes */
.palette-act-1 {
  --panel-bg: #2b1d0c;
  --panel-dots: #5c4033;
  --accent-color: #f2a65a;
  --bubble-bg: #fefae0;
  --scene-color-1: #774f38;
  --scene-color-2: #f2a65a;
  --char-color-1: #fefae0;
  --char-color-2: #e07a5f;
}
.palette-act-2 {
  --panel-bg: #1e0f0a;
  --panel-dots: #4a2010;
  --accent-color: #c6a776;
  --bubble-bg: #ffe8e0;
  --scene-color-1: #594236;
  --scene-color-2: #8c6c4f;
  --char-color-1: #f4f1de;
  --char-color-2: #e07a5f;
}
.palette-act-3 {
  --panel-bg: #1a0e03;
  --panel-dots: #3d1c08;
  --accent-color: #FF4500;
  --bubble-bg: #fff3e6;
  --scene-color-1: #3d1200;
  --scene-color-2: #ff6b5b;
  --char-color-1: #fefae0;
  --char-color-2: #e07a5f;
}
.palette-act-4 {
  --panel-bg: #061224;
  --panel-dots: #0d2340;
  --accent-color: #5a3e2b;
  --bubble-bg: #e0fbfc;
  --scene-color-1: #3b2a1a;
  --scene-color-2: #8d6e63;
  --char-color-1: #d7ccc8;
  --char-color-2: #bcaaa4;
}
.palette-act-5 {
  --panel-bg: #2b1220;
  --panel-dots: #4a1f35;
  --accent-color: #4a4e69;
  --bubble-bg: #f8f3ff;
  --scene-color-1: #061224;
  --scene-color-2: #4a4e69;
  --char-color-1: #f2e9e4;
  --char-color-2: #9a8c98;
}
.palette-act-6 {
  --panel-bg: #0d1b2a;
  --panel-dots: #1b4965;
  --accent-color: #4a6b3c;
  --bubble-bg: #fff9e5;
  --scene-color-1: #2d4a2c;
  --scene-color-2: #6a994e;
  --char-color-1: #f2e8cf;
  --char-color-2: #a3b18a;
}
.palette-act-7 {
  --panel-bg: #ff914d;
  --panel-dots: #ffde7d;
  --accent-color: #ffde7d;
  --bubble-bg: #fff9e5;
  --scene-color-1: #ff914d;
  --scene-color-2: #ffde7d;
  --char-color-1: #fefae0;
  --char-color-2: #e07a5f;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  font-family: "Nunito", "Nunito Local", sans-serif;
  color: var(--cream);
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--ink);
}
#halftoneOverlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, #fff 15%, #000 85%);
  background-size: 8px 8px;
  mix-blend-mode: multiply;
  opacity: 0.18;
  pointer-events: none;
  z-index: 50;
}
#bgGradient {
  position: absolute;
  inset: 0;
  transition: background 1.1s ease;
  z-index: 0;
}
#particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  pointer-events: auto;
  gap: 10px;
}
#chapterSelect {
  font-family: "Press Start 2P", "Press Start 2P Local", monospace;
  font-size: 10px;
  text-transform: uppercase;
  background-color: var(--accent-color);
  color: var(--ink);
  border: 4px solid var(--ink);
  padding: 10px 16px;
  box-shadow: 4px 4px 0px var(--ink);
  cursor: pointer;
  transition: background-color 0.5s;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
}
#dots {
  display: flex;
  gap: 8px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: 0.3s;
}
.dot.on {
  background: var(--accent-color);
  transform: scale(1.3);
  border: 1px solid var(--ink);
}

#stageWrap {
  position: absolute;
  top: 90px;
  left: 0;
  right: 0;
  bottom: 24vh;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
#stage {
  position: relative;
  width: min(94vw, 760px);
  height: 100%;
  perspective: 1200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comic-frame {
  width: 100%;
  height: 100%;
  background: var(--panel-bg);
  border: 6px solid var(--ink);
  box-shadow: 12px 12px 0px var(--ink);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background-image: radial-gradient(var(--panel-dots) 20%, transparent 20%),
    radial-gradient(var(--panel-dots) 20%, transparent 20%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  transition: background 0.5s ease-in-out;
}

#graphicContainer {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#svgLayer {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: opacity 0.5s;
}
#svgLayer svg {
  width: 85%;
  height: auto;
  max-height: 85%;
  filter: drop-shadow(6px 6px 0px var(--ink));
}

.content-overlay {
  position: relative;
  z-index: 4;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.char-container {
  width: 120px;
  height: 120px;
  filter: drop-shadow(4px 4px 0px var(--ink));
  animation: floatChar 3s ease-in-out infinite alternate;
  position: absolute;
  bottom: 20px;
  left: 20px;
}
@keyframes floatChar {
  0% {
    transform: translateY(0px) rotate(-1deg);
  }
  100% {
    transform: translateY(-5px) rotate(2deg);
  }
}

.caption {
  background-color: #ffd84d;
  background-image: radial-gradient(rgba(0, 0, 0, 0.1) 15%, transparent 15%);
  background-size: 6px 6px;
  color: var(--ink);
  font-family: "Press Start 2P", "Press Start 2P Local", monospace;
  font-size: clamp(11px, 2vw, 14px);
  line-height: 1.6;
  padding: 14px 18px;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0px var(--ink);
  width: 90%;
  text-align: center;
  margin-top: 10px;
  overflow-wrap: break-word;
  word-break: break-word;
}
.caption.caption-left {
  width: 50%;
  align-self: flex-start;
  text-align: left;
}
.caption.caption-center {
  width: 70%;
  align-self: center;
}
.caption.caption-right {
  width: 90%;
  align-self: flex-end;
  text-align: right;
}

.bubble-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  padding: 0 20px;
}
.bubble-wrap.align-left {
  align-items: flex-start;
}
.bubble-wrap.align-center {
  align-items: center;
}
.bubble-wrap.align-right {
  align-items: flex-end;
}

.bubble {
  position: relative;
  background-color: var(--bubble-bg);
  color: var(--text-color);
  padding: 18px 22px;
  border: 4px solid var(--ink);
  font-family: "Baloo 2", "Baloo 2 Local", sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 3vw, 26px);
  line-height: 1.35;
  width: 100%;
  border-radius: 16px;
  box-shadow: 6px 6px 0px var(--ink);
  text-align: center;
  transition: background-color 0.5s, color 0.5s;
  overflow-wrap: break-word;
  word-break: break-word;
}
.bubble.bubble-left {
  width: 50%;
  text-align: left;
}
.bubble.bubble-center {
  width: 70%;
}
.bubble.bubble-right {
  width: 90%;
  text-align: right;
}
.bubble::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 25%;
  border-width: 20px 15px 0;
  border-style: solid;
  border-color: var(--ink) transparent;
  display: block;
  width: 0;
}
.bubble::before {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 25%;
  border-width: 16px 11px 0;
  border-style: solid;
  border-color: inherit;
  display: block;
  width: 0;
  z-index: 1;
  margin-left: 4px;
}
.bubble.god {
  background-color: #ffd84d;
  color: #0a0812;
  font-family: "Bangers", "Bangers Local", cursive;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: 0.05em;
  border-radius: 4px;
  border: 5px dashed var(--ink);
}
.bubble.god::after,
.bubble.god::before {
  left: 50%;
  transform: translateX(-50%);
}
.bubble.god::before {
  border-top-color: #ffd84d;
  margin-left: 0;
}

.sfx {
  font-family: "Bangers", "Bangers Local", cursive;
  font-size: clamp(60px, 11vw, 100px);
  color: #ffd84d;
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 6px 6px 0 #ff6b5b;
  transform: rotate(-6deg);
  line-height: 1;
  position: absolute;
  top: 35%;
  z-index: 4;
  pointer-events: none;
}

.ch {
  display: inline-block;
  will-change: transform, opacity;
}
.fly-char {
  display: inline-block;
  will-change: transform, opacity;
}
.fx-fade .word {
  opacity: 0;
  transform: translateY(10px);
  animation: chFade 0.4s ease both;
}
@keyframes chFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fx-type .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(4px);
  animation: chType 0.2s ease both;
}
@keyframes chType {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fx-bounce .word {
  display: inline-block;
  opacity: 0;
  transform: scale(0.3) translateY(20px);
  animation: wordBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes wordBounce {
  from {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.fx-shake .line-inner {
  display: inline-block;
  animation: shakeIt 0.4s ease-in-out infinite;
}
@keyframes shakeIt {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-3px, 2px);
  }
  40% {
    transform: translate(3px, -2px);
  }
  60% {
    transform: translate(-2px, 1px);
  }
  80% {
    transform: translate(2px, -1px);
  }
}
.fx-glitch .word {
  display: inline-block;
  opacity: 0;
  animation: glitchIn 0.3s steps(2) both;
}
@keyframes glitchIn {
  0% {
    opacity: 0;
    transform: translate(-4px, 2px) skewX(-10deg);
    clip-path: inset(20% 0 60% 0);
  }
  25% {
    opacity: 1;
    transform: translate(3px, -1px) skewX(5deg);
    clip-path: inset(50% 0 10% 0);
  }
  50% {
    opacity: 0.8;
    transform: translate(-2px, 1px) skewX(-3deg);
    clip-path: inset(10% 0 70% 0);
  }
  75% {
    opacity: 1;
    transform: translate(1px, -2px) skewX(2deg);
    clip-path: inset(40% 0 20% 0);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) skewX(0);
    clip-path: inset(0 0 0 0);
  }
}
.fx-wave .word {
  display: inline-block;
  opacity: 0;
  transform: scale(0.3) rotate(-15deg);
  animation: wordWave 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes wordWave {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-15deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.15) rotate(3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}
.fx-neon .word {
  display: inline-block;
  opacity: 0;
  animation: neonIn 0.6s ease both;
}
@keyframes neonIn {
  0% {
    opacity: 0;
    text-shadow: 0 0 0 transparent;
  }
  50% {
    opacity: 0.6;
    text-shadow: 0 0 8px var(--accent-color), 0 0 16px var(--accent-color);
  }
  100% {
    opacity: 1;
    text-shadow: 0 0 4px var(--accent-color);
  }
}
.fx-slide-left .word {
  display: inline-block;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideLeft 0.4s ease both;
}
@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.fx-slide-right .word {
  display: inline-block;
  opacity: 0;
  transform: translateX(20px);
  animation: slideRight 0.4s ease both;
}
@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#choices {
  position: absolute;
  left: 4vw;
  bottom: 11.5vh;
  z-index: 15;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: min(45vw, 420px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
#choices.show {
  opacity: 1;
  pointer-events: auto;
}
.choiceBtn {
  font-family: "Press Start 2P", "Press Start 2P Local", monospace;
  font-size: 11px;
  background: #4ecdc4;
  border: 4px solid var(--ink);
  color: var(--ink);
  padding: 14px 22px;
  cursor: pointer;
  transition: all 0.1s;
  box-shadow: 0 6px 0 var(--ink);
  text-align: center;
}
.choiceBtn:hover {
  box-shadow: 0 4px 0 var(--ink);
  transform: translateY(2px);
}
.choiceBtn:active {
  box-shadow: 0 0px 0 var(--ink);
  transform: translateY(6px);
}

#delayNote {
  position: absolute;
  right: 4vw;
  bottom: 20px;
  z-index: 15;
  font-family: "Press Start 2P", "Press Start 2P Local", monospace;
  font-size: clamp(10px, 1.8vw, 13px);
  color: var(--ink);
  background-color: #ffd84d;
  background-image: radial-gradient(rgba(0, 0, 0, 0.1) 15%, transparent 15%);
  background-size: 6px 6px;
  padding: 16px 24px;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0px var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  text-align: center;
  width: min(40vw, 360px);
  line-height: 1.6;
}
#delayNote.show {
  opacity: 1;
  pointer-events: auto;
}

#navHints {
  position: absolute;
  bottom: 2.4vh;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 3vw, 22px);
  font-family: "Space Mono", "Space Mono Local", monospace;
  font-size: clamp(8.5px, 2.6vw, 11px);
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

#nextBtn {
  position: absolute;
  bottom: 6.2vh;
  right: 4vw;
  z-index: 25;
  font-family: "Baloo 2", "Baloo 2 Local", sans-serif;
  font-weight: 900;
  font-size: 16px;
  background: #ff6b5b;
  color: var(--ink);
  border: 3px solid var(--ink);
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 4px 4px 0px var(--ink);
  opacity: 0;
  transform: translateY(20px);
  transition: 0.4s;
  pointer-events: none;
}
#nextBtn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#nextBtn:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px var(--ink);
}

#nextLineBtn {
  position: absolute;
  bottom: 6.2vh;
  right: 4vw;
  z-index: 25;
  font-family: "Baloo 2", "Baloo 2 Local", sans-serif;
  font-weight: 900;
  font-size: 14px;
  background: #4ecdc4;
  color: var(--ink);
  border: 3px solid var(--ink);
  padding: 10px 20px;
  cursor: pointer;
  box-shadow: 4px 4px 0px var(--ink);
  opacity: 0;
  transform: translateY(20px);
  transition: 0.4s;
  pointer-events: none;
}
#nextLineBtn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#nextLineBtn:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0px var(--ink);
}

#portal {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 50%,
    transparent 0%,
    transparent 150%,
    #000 150%
  );
}
#portal.falling {
  animation: fallIn 0.75s cubic-bezier(0.7, 0, 0.9, 0.4) forwards;
}
@keyframes fallIn {
  0% {
    background: radial-gradient(
      circle at 50% 50%,
      transparent 0%,
      transparent 150%,
      #000 150%
    );
  }
  100% {
    background: radial-gradient(
      circle at 50% 50%,
      transparent 0%,
      transparent 0%,
      #000 0%
    );
  }
}
#portal.rising {
  animation: riseOut 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
@keyframes riseOut {
  0% {
    background: radial-gradient(
      circle at 50% 50%,
      transparent 0%,
      transparent 0%,
      #000 0%
    );
  }
  100% {
    background: radial-gradient(
      circle at 50% 50%,
      transparent 0%,
      transparent 150%,
      #000 150%
    );
  }
}

.popIn {
  animation: popInAnim 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes popInAnim {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.popOut {
  animation: popOutAnim 0.4s ease both;
}
@keyframes popOutAnim {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.98) translateY(-10px);
  }
}

#startScreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(160deg, #2b1d0c, #5c4033 60%, #8b5a2b);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  transition: opacity 0.5s;
}
#startScreen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#startScreen .comic-cover {
  width: min(90vw, 440px);
  background: #2b1d0c;
  padding: 30px;
  border: 6px solid var(--ink);
  box-shadow: 12px 12px 0px var(--ink);
  background-image: radial-gradient(#5c4033 15%, transparent 15%);
  background-size: 12px 12px;
}
#startScreen .issue {
  font-family: "Space Mono", "Space Mono Local", Tahoma, sans-serif;
  font-size: 12px;
  color: var(--ink);
  background: #ffd84d;
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 14px;
  font-weight: 700;
  border: 2px solid var(--ink);
}
#startScreen h1 {
  font-family: "Bangers", "Bangers Local", Tahoma, sans-serif;
  font-size: clamp(54px, 14vw, 90px);
  margin: 0;
  color: #ffd84d;
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  line-height: 1;
  text-shadow: 6px 6px 0 #ff6b5b;
}
#startScreen .subtitle {
  font-family: "Baloo 2", "Baloo 2 Local", Tahoma, sans-serif;
  font-size: 24px;
  color: var(--cream);
  margin: 4px 0 16px;
  font-weight: 800;
  text-shadow: 2px 2px 0px var(--ink);
}
.bigicon {
  font-size: 72px;
  margin-bottom: 10px;
  animation: popInAnim 0.8s 0.2s both;
}
#startScreen p {
  font-family: "Press Start 2P", "Press Start 2P Local", Tahoma, sans-serif;
  font-size: 10px;
  max-width: 460px;
  color: var(--cream);
  opacity: 0.9;
  margin: 18px 0 26px;
  line-height: 2;

  font-weight: 700;
}
#startBtn {
  font-family: "Press Start 2P", "Press Start 2P Local", Tahoma, sans-serif;
  font-size: 16px;
  background: #ff6b5b;
  color: var(--ink);
  border: 4px solid var(--ink);
  padding: 16px 30px;
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--ink);
  transition: all 0.1s;

  font-weight: 700;
}
#startBtn:hover {
  box-shadow: 4px 4px 0 var(--ink);
  transform: translateY(2px);}/* =========================================================================
   HEARING VERTICAL SLICE — Chapter 5: The Still, Small Voice
   ========================================================================= */
.hearing-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 40%, rgba(13, 27, 42, 0.35), rgba(3, 11, 24, 0.85));
  color: #f2e9e4;
  font-family: "Inter", "Helvetica Neue", sans-serif;
}
.hearing-overlay[aria-hidden="true"] { display: none; }
.hearing-panel {
  width: min(560px, 96%);
  max-height: 96%;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(15, 24, 44, 0.92), rgba(7, 16, 32, 0.96));
  border: 3px solid #6c5b7b;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), inset 0 0 24px rgba(255, 217, 130, 0.04);
  padding: 22px 22px 18px;
  border-radius: 6px;
  text-align: center;
}
.hearing-kicker {
  font-family: "Bangers", "Bangers Local", cursive;
  letter-spacing: 0.18em;
  font-size: 16px;
  color: #ffd84d;
  text-shadow: 2px 2px 0 var(--ink);
}
.hearing-title {
  font-family: "Bangers", "Bangers Local", cursive;
  font-size: clamp(22px, 4vw, 30px);
  margin: 4px 0 6px;
  color: #fff7e8;
  letter-spacing: 0.04em;
}
.hearing-prompt {
  font-size: 14px;
  line-height: 1.55;
  color: #d6c8d8;
  margin: 0 0 16px;
}
.hearing-meters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}
.hearing-meter {
  flex: 1 1 130px;
  max-width: 170px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #4a4e69;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hearing-meter-label {
  display: block;
  margin-bottom: 4px;
  color: #b3a1c7;
}
.hearing-meter-track {
  position: relative;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.hearing-meter-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  background: linear-gradient(90deg, #ff6b5b, #ffd84d);
  transition: width 120ms ease-out, opacity 120ms ease-out;
}
.hearing-meter-fill.faith { background: linear-gradient(90deg, #4ECDC4, #B98CFF); }
.hearing-meter-fill.despair { background: linear-gradient(90deg, #ff6b5b, #FF4500); }
.hearing-stage {
  position: relative;
  height: 110px;
  margin: 6px auto 12px;
  border-radius: 4px;
  background: radial-gradient(circle at 50% 60%, #1a1530 0%, #050816 80%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.hearing-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--noise, 1);
  transition: opacity 180ms linear, filter 180ms linear;
}
.hearing-layer b {
  position: absolute;
  font-family: "Bangers", "Bangers Local", cursive;
  letter-spacing: .12em;
  text-shadow: 2px 2px 0 #050816;
}
.hearing-layer.wind { background: repeating-linear-gradient(-8deg, transparent 0 14px, rgba(203,220,230,.45) 15px 18px, transparent 19px 27px); animation: hearing-wind 1.1s linear infinite; }
.hearing-layer.wind b { left: 5%; top: 12%; color: #d9edf2; transform: rotate(-8deg); }
.hearing-layer.quake { border: calc(7px * var(--noise, 1)) double rgba(181,143,99,.8); animation: hearing-quake .16s steps(2) infinite; }
.hearing-layer.quake b { right: 4%; bottom: 8%; color: #deb887; transform: rotate(5deg); }
.hearing-layer.fire { background: radial-gradient(ellipse at 50% 110%, rgba(255,54,20,.8), rgba(255,190,40,.35) 28%, transparent 58%); }
.hearing-layer.fire b { left: 40%; bottom: 4%; color: #ffd84d; }
.hearing-layer.fire i { position:absolute; bottom:-12px; width:30px; height:70px; border-radius:55% 45% 45% 55%; background:#ff5b2d; transform:rotate(35deg); animation:hearing-flame .45s ease-in-out infinite alternate; }
.hearing-layer.fire i:nth-of-type(1){left:24%}.hearing-layer.fire i:nth-of-type(2){left:52%;animation-delay:-.2s}.hearing-layer.fire i:nth-of-type(3){left:72%;animation-delay:-.35s}
.hearing-layer.threat b { right: 7%; top: 15%; color: #ff6b5b; font-size: 20px; transform: rotate(5deg); }
.hearing-layer.despair { background:linear-gradient(90deg,rgba(2,5,13,.75),transparent 55%); }
.hearing-layer.despair b { left: 7%; bottom: 15%; color:#b98cff; font-size:17px; transform:rotate(-5deg); }
@keyframes hearing-wind { to { background-position: 90px 0; } }
@keyframes hearing-quake { 50% { transform: translate(3px,-2px) rotate(.4deg); } }
@keyframes hearing-flame { to { height:48px; transform:rotate(18deg) scaleX(.75); } }
@media (prefers-reduced-motion: reduce) { .hearing-layer { animation:none!important; } }
.hearing-whisper span {
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  white-space:nowrap; color:#fff7e8; font-family:"Bangers", "Bangers Local",cursive; letter-spacing:.12em;
}
.hearing-whisper {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%) scale(0.6);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 247, 232, 0.95), rgba(255, 217, 130, 0) 70%);
  opacity: 0;
  transition: opacity 240ms ease-out, transform 240ms ease-out;
}
.hearing-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.hearing-tuner { position:relative; width:min(330px,88vw); height:150px; border:3px solid #090812; border-radius:5px; cursor:crosshair; touch-action:none; background:linear-gradient(90deg,rgba(255,70,35,.24),transparent 48%,rgba(78,205,196,.2)),linear-gradient(0deg,rgba(185,140,255,.22),transparent 48%,rgba(255,216,77,.13)); box-shadow:4px 4px 0 #090812,inset 0 0 28px rgba(0,0,0,.5); }
.hearing-tuner:focus-visible { outline:3px solid #fff; outline-offset:4px; }
.hearing-tuner::before,.hearing-tuner::after { content:""; position:absolute; background:rgba(255,255,255,.12); }
.hearing-tuner::before { left:50%; top:0; bottom:0; width:1px; }.hearing-tuner::after { top:50%; left:0; right:0; height:1px; }
.hearing-axis { position:absolute; z-index:2; font:11px "Space Mono", "Space Mono Local",monospace; color:#d6c8d8; pointer-events:none; }
.hearing-axis.spectacle{left:6px;top:50%;transform:translateY(-50%) rotate(-90deg)}.hearing-axis.stillness{right:6px;top:50%;transform:translateY(-50%) rotate(90deg)}.hearing-axis.fear{left:50%;bottom:4px;transform:translateX(-50%)}.hearing-axis.faith{left:50%;top:4px;transform:translateX(-50%)}
.hearing-target { position:absolute; left:50%; top:50%; width:42px; height:42px; transform:translate(-50%,-50%); border:2px dashed rgba(255,247,232,.45); border-radius:50%; }
.hearing-cursor { position:absolute; left:20%; top:78%; width:24px; height:24px; transform:translate(-50%,-50%); border:3px solid #090812; border-radius:50%; background:#ffd84d; box-shadow:0 0 0 3px #fff7e8,3px 3px 0 #090812; transition:left 80ms linear,top 80ms linear; }
.hearing-axis-inputs { width:min(330px,88vw); display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.hearing-axis-inputs label { font:10px "Space Mono", "Space Mono Local",monospace; color:#d6c8d8; }
.hearing-axis-inputs input { width:100%; accent-color:#ffd84d; }
.hearing-status {
  font-size: 13px;
  color: #d6c8d8;
  min-height: 18px;
  margin: 8px 0 4px;
}
.hearing-status.clear { color: #b9f2d8; }
.hearing-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.hearing-btn {
  font-family: "Bangers", "Bangers Local", cursive;
  font-size: 14px;
  letter-spacing: 0.08em;
  background: #4ECDC4;
  color: var(--ink);
  border: 3px solid var(--ink);
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
}
.hearing-btn:hover { box-shadow: 2px 2px 0 var(--ink); transform: translate(2px, 2px); }
.hearing-btn.ghost {
  background: transparent;
  color: #d6c8d8;
  box-shadow: 4px 4px 0 #4a4e69;
}
.hearing-help {
  font-size: 12px;
  color: #b3a1c7;
  margin-top: 8px;
  line-height: 1.4;
}
@media (max-width: 480px) {
  .hearing-panel { padding: 16px 14px 14px; }
  .hearing-stage { height:90px; }
  .hearing-tuner { height:128px; }
}
@media (max-height: 850px) {
  .hearing-overlay { padding: 10px; }
  .hearing-panel { padding: 10px 14px 9px; }
  .hearing-title { font-size: 23px; margin: 1px 0 2px; }
  .hearing-prompt { line-height: 1.3; margin-bottom: 6px; }
  .hearing-meters { margin-bottom: 5px; }
  .hearing-meter { padding: 3px 6px; }
  .hearing-stage { height: 70px; margin: 3px auto 5px; }
  .hearing-tuner { height: 88px; }
  .hearing-axis-inputs { gap: 6px; }
  .hearing-status { margin: 3px 0 1px; }
  .hearing-help { margin: 4px 0 0; line-height: 1.2; }
}

/* ── Comic-cover pulse + follow.js cursor effect ─── */
#startScreen .comic-cover {
  animation: comicCoverPulse 3.2s ease-in-out infinite;
  transform-origin: center center;
  will-change: transform, box-shadow;
  transition: box-shadow .2s ease;
}
#startScreen .comic-cover:hover {
  animation: comicCoverPulseHover 1.6s ease-in-out infinite;
  box-shadow: 14px 14px 0px var(--ink), 0 0 0 4px rgba(255,210,80,.5);
}
@keyframes comicCoverPulse {
  0%, 100% { transform: scale(1); box-shadow: 12px 12px 0px var(--ink); }
  50%      { transform: scale(1.018); box-shadow: 14px 14px 0px var(--ink), 0 0 24px rgba(255,210,80,.35); }
}
@keyframes comicCoverPulseHover {
  0%, 100% { transform: scale(1.03); box-shadow: 16px 16px 0px var(--ink), 0 0 32px rgba(255,210,80,.55); }
  50%      { transform: scale(1.05); box-shadow: 18px 18px 0px var(--ink), 0 0 44px rgba(255,210,80,.7); }
}
/* follow.js target elements — subtle accent dots that drift toward the cursor */
[data-follow] {
  position: fixed;
  pointer-events: none;
  z-index: 99;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,80,.9), rgba(255,210,80,0) 70%);
  box-shadow: 0 0 12px rgba(255,210,80,.6);
  transition: transform .08s linear;
  will-change: transform;
}

/* Shared layered scene sizing: keep every artwork SVG aligned to the panel. */
#graphicContainer { isolation: isolate; }
#graphicContainer > #svgLayer.svg-behind,
#graphicContainer > #midLayer.svg-middle,
#graphicContainer > #fgLayer.svg-front {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; overflow: hidden; pointer-events: none;
}
#graphicContainer > #svgLayer.svg-behind { z-index: 0; }
#graphicContainer > #midLayer.svg-middle { z-index: 1; }
#graphicContainer > canvas.three-canvas { z-index: 2; }
#graphicContainer > #fgLayer.svg-front { z-index: 3; }
#graphicContainer > #svgLayer.svg-behind svg,
#graphicContainer > #midLayer.svg-middle svg,
#graphicContainer > #fgLayer.svg-front svg {
  display: block; width: 100%; height: 100%; max-width: none; max-height: none;
}
