:root {
  --paper: #faf9f6;
  --paper-warm: #fff8ef;
  --ink: #2d2926;
  --sakura: #ffb7c5;
  --cyan: #00a6b8;
  --mint: #9dffe5;
  --gold: #ffe6a8;
  --matcha: #2b4c3e;
  --violet: #6b4fa3;
  --rose: #be4b78;
  --line: rgba(45, 41, 38, 0.1);
  --mono: "Space Mono", "Consolas", monospace;
  --body: "Lexend", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
}

.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(45, 41, 38, 0.12);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(45, 41, 38, 0.07);
  font: 700 10px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}

.back-btn:hover {
  transform: translateY(-1px);
  background: var(--ink);
  color: var(--sakura);
}

.gengo-room {
  --pointer-x: 0;
  --pointer-y: 0;
  position: relative;
  isolation: isolate;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  border: 1px solid rgba(45, 41, 38, 0.12);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 183, 197, 0.16), transparent 34%),
    radial-gradient(rgba(45, 41, 38, 0.18) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 38px 38px, auto;
}

.gengo-room::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.026) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.012), rgba(0, 255, 255, 0.01), rgba(0, 0, 255, 0.012));
  background-size: 100% 4px, 3px 100%;
  mix-blend-mode: multiply;
}

.frame {
  position: absolute;
  inset: 26px;
  z-index: 2;
  border: 1px solid rgba(45, 41, 38, 0.07);
  border-radius: 18px;
  pointer-events: none;
}

.meta-label,
.brand-credit {
  position: absolute;
  z-index: 12;
  color: rgba(45, 41, 38, 0.43);
  font: 700 clamp(8px, 1.1vw, 13px)/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.meta-label.top {
  top: 34px;
  left: 46px;
}

.meta-label.bottom {
  right: 48px;
  bottom: 34px;
}

.brand-credit {
  left: 46px;
  bottom: 34px;
  max-width: min(56vw, 620px);
  opacity: 0.58;
}

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

.bg-dots {
  opacity: 0.24;
  background-image:
    radial-gradient(rgba(45, 41, 38, 0.34) 1px, transparent 1px),
    radial-gradient(rgba(0, 166, 184, 0.3) 1px, transparent 1px);
  background-size: 46px 46px, 92px 92px;
  background-position: 0 0, 24px 18px;
  transform: translate(
    calc(var(--pointer-x) * -10px),
    calc(var(--pointer-y) * -8px)
  );
  transition: transform 120ms ease-out;
}

.bg-depth {
  opacity: 0.9;
  mix-blend-mode: multiply;
}

.bg-special,
.bg-special-two,
.bg-special-three {
  position: absolute;
  pointer-events: none;
  z-index: 3;
}

.repulsion-field {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  transform: translate(
    calc(var(--pointer-x) * 8px),
    calc(var(--pointer-y) * 7px)
  );
  transition: transform 120ms ease-out;
}

.field-dot {
  position: absolute;
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 999px;
  opacity: var(--dot-opacity);
  background: var(--dot-color);
  box-shadow: 0 0 14px var(--dot-glow);
  transform:
    translate(
      calc(var(--pointer-x) * var(--push-x)),
      calc(var(--pointer-y) * var(--push-y))
    )
    scale(var(--dot-scale));
  animation: dot-breathe var(--dot-cycle) ease-in-out infinite;
  animation-delay: var(--dot-delay);
}

.motif-strip {
  position: absolute;
  z-index: 7;
  pointer-events: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: min(54vw, 620px);
}

.motif-strip.top-right {
  top: 76px;
  right: 68px;
  justify-content: flex-end;
}

.motif-strip.bottom-left {
  left: 64px;
  bottom: 76px;
}

.motif {
  padding: 7px 10px;
  border: 1px solid rgba(0, 166, 184, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: rgba(45, 41, 38, 0.55);
  box-shadow: 0 8px 24px rgba(0, 166, 184, 0.08);
  font: 700 clamp(8px, 1vw, 12px)/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  animation: motif-drift 6.2s ease-in-out infinite;
}

.motif:nth-child(2) {
  animation-delay: -1.1s;
}

.motif:nth-child(3) {
  animation-delay: -2.2s;
}

.mega-glyph {
  position: absolute;
  right: clamp(24px, 6vw, 118px);
  top: clamp(62px, 8vw, 130px);
  z-index: 1;
  color: rgba(45, 41, 38, 0.04);
  font: 900 clamp(210px, 35vw, 590px)/0.82 "Noto Serif JP", Georgia, serif;
  pointer-events: none;
  transform: translate(
    calc(var(--pointer-x) * 14px),
    calc(var(--pointer-y) * 8px)
  );
  transition: transform 140ms ease-out;
}

.scene-content {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  padding: clamp(40px, 7vw, 112px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(12px, 2vw, 24px);
}

.gengo-room[data-layout="right"] .scene-content {
  align-items: flex-end;
  text-align: right;
}

.gengo-room[data-layout="right"] .room-title {
  width: min(46vw, 720px);
}

.gengo-room[data-layout="right"] .poem-card {
  width: min(44vw, 580px);
  min-height: 138px;
}

.gengo-room[data-layout="center"] .scene-content {
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  padding-top: clamp(78px, 10vw, 150px);
}

.gengo-room[data-layout="low"] .scene-content {
  justify-content: flex-end;
  padding-bottom: clamp(76px, 9vw, 138px);
}

.kicker {
  width: fit-content;
  padding: 8px 13px;
  border: 1px solid rgba(0, 166, 184, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--cyan);
  box-shadow: 0 10px 34px rgba(0, 166, 184, 0.08);
  font: 800 clamp(9px, 1.1vw, 14px)/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.room-title {
  width: min(60vw, 840px);
  margin: 0;
  color: var(--ink);
  font: 900 clamp(40px, 7vw, 112px)/0.94 var(--display);
  letter-spacing: 0;
  text-wrap: balance;
}

.gengo-room[data-layout="right"] .room-title,
.gengo-room[data-layout="right"] .poem-card,
.gengo-room[data-layout="right"] .signal-pill {
  margin-left: auto;
}

.gengo-room[data-layout="center"] .room-title {
  width: min(82vw, 1040px);
  font-size: clamp(40px, 6.2vw, 88px);
}

.gengo-room[data-layout="center"] .poem-card {
  width: min(62vw, 760px);
}

.poem-card {
  position: relative;
  overflow: hidden;
  width: min(48vw, 620px);
  margin: 0;
  padding: clamp(17px, 2.1vw, 28px) clamp(18px, 2.4vw, 30px);
  border: 1px solid rgba(0, 166, 184, 0.24);
  border-radius: 20px;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.9), transparent 30%),
    linear-gradient(135deg, rgba(255, 183, 197, 0.52), rgba(157, 255, 229, 0.38) 48%, rgba(255, 230, 168, 0.48));
  box-shadow:
    0 14px 38px rgba(0, 166, 184, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.poem-card::before,
.poem-card::after {
  content: "";
  position: absolute;
  inset: -35%;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.82) 43%, transparent 45% 100%),
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(0, 166, 184, 0.78) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(255, 230, 168, 0.94) 0 1px, transparent 2px);
  background-size: 100% 100%, 92px 74px, 67px 58px, 112px 91px;
  mix-blend-mode: screen;
  opacity: 0.44;
  animation: spark-drift 6.4s ease-in-out infinite;
}

.poem-card::after {
  opacity: 0.31;
  transform: rotate(180deg);
  animation-duration: 8s;
  animation-delay: -1.4s;
}

.poem {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: rgba(45, 41, 38, 0.8);
  font: 400 clamp(16px, 2vw, 28px)/1.36 var(--body);
  overflow-wrap: break-word;
}

.signal-pill {
  width: fit-content;
  max-width: min(60vw, 740px);
  padding: 9px 14px;
  border: 1px solid rgba(0, 166, 184, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--cyan);
  box-shadow: 0 8px 26px rgba(0, 166, 184, 0.08);
  font: 800 clamp(9px, 1.1vw, 13px)/1.35 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mascot-cluster {
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
}

.mascot-stage {
  --stage-left: 75%;
  --stage-top: 56%;
  --stage-size: clamp(220px, 22vw, 370px);
  --stage-scale: 1;
  --frame-x: 0px;
  --frame-y: 0px;
  position: absolute;
  left: var(--stage-left);
  top: var(--stage-top);
  width: var(--stage-size);
  aspect-ratio: 1 / 1;
  overflow: visible;
  transform: translate(-50%, -50%) scale(var(--stage-scale));
  transform-origin: 50% 88%;
  filter:
    drop-shadow(0 20px 18px rgba(45, 41, 38, 0.2))
    drop-shadow(0 0 18px var(--mascot-glow, rgba(157, 255, 229, 0.38)));
}

.mascot-stage::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 5%;
  height: 14px;
  border: 2px solid rgba(45, 41, 38, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 20px rgba(45, 41, 38, 0.08);
  transform: translateY(50%);
}

.mascot-aura {
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  opacity: 0.72;
  background:
    radial-gradient(circle, var(--mascot-glow, rgba(157, 255, 229, 0.44)), transparent 58%),
    conic-gradient(from 30deg, transparent 0 24deg, rgba(255, 230, 168, 0.62) 25deg 29deg, transparent 30deg 126deg, rgba(157, 255, 229, 0.52) 127deg 131deg, transparent 132deg 360deg);
  filter: blur(1px);
  animation: aura-breathe 3.4s ease-in-out infinite;
}

.mascot-sprite {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: var(--sprite-url);
  background-size: 300% 300%;
  background-position: 0% 0%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  transform: translate(var(--frame-x), var(--frame-y));
  will-change: transform, background-position;
}

.mascot-name {
  position: absolute;
  left: 50%;
  bottom: -24px;
  z-index: 3;
  transform: translateX(-50%);
  padding: 7px 10px;
  border: 1px solid rgba(45, 41, 38, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(45, 41, 38, 0.72);
  box-shadow: 0 10px 22px rgba(45, 41, 38, 0.08);
  font: 800 10px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.line-thread {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  border-top: 1px dotted rgba(0, 166, 184, 0.35);
  width: min(44vw, 580px);
  height: min(18vw, 220px);
  border-radius: 50%;
  transform:
    translate(
      calc(var(--pointer-x) * -12px),
      calc(var(--pointer-y) * 9px)
    )
    rotate(-10deg);
  animation: line-thread-drift 5.8s ease-in-out infinite;
}

.line-thread.one {
  right: 13%;
  top: 22%;
}

.line-thread.two {
  right: 6%;
  bottom: 16%;
  transform: rotate(8deg);
  animation-delay: -1.7s;
}

/* Theme: Tsuki Signal Sprint */
.theme-tsuki-signal {
  background:
    radial-gradient(circle at 73% 52%, rgba(157, 255, 229, 0.36), transparent 27%),
    radial-gradient(circle at 27% 28%, rgba(255, 230, 168, 0.42), transparent 22%),
    radial-gradient(rgba(45, 41, 38, 0.17) 1px, transparent 1px),
    #fbfaf7;
  background-size: auto, auto, 38px 38px, auto;
}

.theme-tsuki-signal .bg-special {
  right: 7%;
  top: 50%;
  width: min(56vw, 660px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 28%, rgba(157, 255, 229, 0.66) 28.4% 29%, transparent 29.6%),
    radial-gradient(circle, transparent 0 48%, rgba(255, 230, 168, 0.54) 48.4% 49%, transparent 49.6%),
    radial-gradient(circle, transparent 0 66%, rgba(0, 166, 184, 0.2) 66.3% 67%, transparent 67.7%);
  filter: drop-shadow(0 22px 42px rgba(0, 166, 184, 0.15));
  animation: orbit-breathe 5.6s ease-in-out infinite;
}

.theme-tsuki-signal .bg-special-two {
  right: 12%;
  top: 18%;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 16deg, rgba(0, 166, 184, 0.52) 17deg 20deg, transparent 21deg 140deg, rgba(255, 183, 197, 0.58) 141deg 145deg, transparent 146deg 300deg, rgba(255, 230, 168, 0.8) 301deg 305deg, transparent 306deg);
  mask: radial-gradient(circle, transparent 0 51%, #000 52% 54%, transparent 55%);
  animation: slow-spin 9s linear infinite;
}

/* Theme: Selene Moon Cache */
.theme-selene-cache {
  background:
    radial-gradient(circle at 21% 24%, rgba(255, 230, 168, 0.54), transparent 18%),
    radial-gradient(circle at 72% 52%, rgba(107, 79, 163, 0.18), transparent 35%),
    radial-gradient(rgba(45, 41, 38, 0.15) 1px, transparent 1px),
    #fbfaf7;
  background-size: auto, auto, 42px 42px, auto;
}

.theme-selene-cache .bg-special {
  left: 7%;
  top: 13%;
  width: min(36vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 32%, rgba(255, 255, 255, 0.94), rgba(255, 230, 168, 0.48) 38%, rgba(107, 79, 163, 0.12) 62%, transparent 67%);
  box-shadow:
    0 0 72px rgba(255, 230, 168, 0.32),
    inset -20px -24px 0 rgba(107, 79, 163, 0.08);
  animation: moon-float 7.2s ease-in-out infinite;
}

.theme-selene-cache .bg-special-two {
  right: -7%;
  top: 5%;
  width: min(72vw, 920px);
  aspect-ratio: 1.28;
  opacity: 0.76;
  background:
    repeating-radial-gradient(ellipse at 58% 47%, transparent 0 24px, rgba(107, 79, 163, 0.15) 25px 27px, transparent 28px 58px),
    repeating-radial-gradient(ellipse at 36% 62%, transparent 0 32px, rgba(0, 166, 184, 0.1) 33px 35px, transparent 36px 70px);
  transform: rotate(-9deg);
  animation: topo-shift 8.5s ease-in-out infinite;
}

/* Theme: Marina Snap Harbor */
.theme-marina-harbor {
  background:
    radial-gradient(circle at 78% 42%, rgba(255, 183, 197, 0.42), transparent 28%),
    radial-gradient(circle at 18% 78%, rgba(157, 255, 229, 0.34), transparent 28%),
    radial-gradient(rgba(45, 41, 38, 0.15) 1px, transparent 1px),
    #fff8f3;
  background-size: auto, auto, 40px 40px, auto;
}

.theme-marina-harbor .bg-special {
  left: -8%;
  bottom: -22%;
  width: 118vw;
  height: 52vh;
  opacity: 0.78;
  background:
    repeating-radial-gradient(ellipse at 50% 100%, rgba(0, 166, 184, 0.22) 0 2px, transparent 3px 38px),
    linear-gradient(0deg, rgba(157, 255, 229, 0.38), transparent);
  animation: wave-propagate 5.5s ease-in-out infinite;
}

.theme-marina-harbor .bg-special-two {
  right: 10%;
  top: 14%;
  width: min(44vw, 500px);
  height: min(28vw, 320px);
  border: 1px solid rgba(190, 75, 120, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 183, 197, 0.22)),
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.88), transparent 24%);
  box-shadow: 18px 18px 0 rgba(0, 166, 184, 0.08);
  transform: rotate(4deg);
  animation: photo-hover 6.4s ease-in-out infinite;
}

/* Theme: Tsuki Tea Orbit */
.theme-tsuki-tea {
  background:
    radial-gradient(circle at 70% 48%, rgba(157, 255, 229, 0.28), transparent 32%),
    radial-gradient(circle at 28% 73%, rgba(43, 76, 62, 0.1), transparent 28%),
    radial-gradient(rgba(45, 41, 38, 0.13) 1px, transparent 1px),
    #fbfaf1;
  background-size: auto, auto, 44px 44px, auto;
}

.theme-tsuki-tea .bg-special {
  right: 10%;
  bottom: 8%;
  width: min(46vw, 580px);
  height: min(55vh, 520px);
  opacity: 0.8;
  background:
    radial-gradient(ellipse at 50% 76%, rgba(43, 76, 62, 0.12) 0 18%, transparent 19%),
    repeating-radial-gradient(ellipse at 50% 78%, transparent 0 32px, rgba(43, 76, 62, 0.15) 33px 35px, transparent 36px 68px);
  animation: tea-steam 6.2s ease-in-out infinite;
}

.theme-tsuki-tea .bg-special-two {
  right: 26%;
  top: 12%;
  width: min(24vw, 310px);
  height: min(48vh, 500px);
  border-radius: 999px;
  border-left: 2px solid rgba(0, 166, 184, 0.16);
  border-right: 1px solid rgba(255, 183, 197, 0.24);
  transform: rotate(16deg);
  animation: steam-arc 4.8s ease-in-out infinite;
}

/* Theme: Selene Shadow Topology */
.theme-selene-topology {
  background:
    radial-gradient(circle at 77% 24%, rgba(255, 230, 168, 0.42), transparent 22%),
    radial-gradient(circle at 28% 54%, rgba(107, 79, 163, 0.16), transparent 32%),
    radial-gradient(rgba(45, 41, 38, 0.14) 1px, transparent 1px),
    #fbfaf7;
  background-size: auto, auto, 36px 36px, auto;
}

.theme-selene-topology .bg-special {
  left: -10%;
  top: 0;
  width: 78vw;
  height: 100vh;
  opacity: 0.86;
  background:
    repeating-radial-gradient(ellipse at 54% 48%, transparent 0 20px, rgba(107, 79, 163, 0.16) 21px 23px, transparent 24px 48px),
    repeating-radial-gradient(ellipse at 28% 72%, transparent 0 28px, rgba(0, 166, 184, 0.11) 29px 31px, transparent 32px 62px);
  transform: rotate(5deg);
  animation: topo-morph 7s ease-in-out infinite;
}

.theme-selene-topology .bg-special-two {
  right: 9%;
  top: 18%;
  width: min(36vw, 470px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 52%, rgba(255, 230, 168, 0.72) 53% 54%, transparent 55%),
    conic-gradient(from 80deg, transparent 0 28deg, rgba(107, 79, 163, 0.52) 29deg 32deg, transparent 33deg 188deg, rgba(0, 166, 184, 0.4) 189deg 192deg, transparent 193deg);
  animation: slow-spin 13s linear infinite reverse;
}

/* Theme: Marina Conbini Current */
.theme-marina-conbini {
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 230, 168, 0.44), transparent 24%),
    radial-gradient(circle at 70% 65%, rgba(255, 183, 197, 0.42), transparent 34%),
    linear-gradient(115deg, rgba(0, 166, 184, 0.08) 0 13%, transparent 13% 100%),
    radial-gradient(rgba(45, 41, 38, 0.14) 1px, transparent 1px),
    #fffaf5;
  background-size: auto, auto, auto, 40px 40px, auto;
}

.theme-marina-conbini .bg-special {
  left: 4%;
  top: 8%;
  width: min(33vw, 410px);
  height: 82vh;
  opacity: 0.7;
  background:
    repeating-linear-gradient(0deg, rgba(45, 41, 38, 0.08) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 183, 197, 0.18));
  border: 1px solid rgba(45, 41, 38, 0.08);
  border-radius: 20px;
  transform: rotate(-4deg);
  animation: receipt-drift 6.5s ease-in-out infinite;
}

.theme-marina-conbini .bg-special-two {
  right: -8%;
  bottom: -22%;
  width: 72vw;
  height: 50vh;
  background:
    repeating-radial-gradient(ellipse at 50% 100%, rgba(0, 166, 184, 0.22) 0 2px, transparent 3px 34px),
    linear-gradient(0deg, rgba(157, 255, 229, 0.24), transparent);
  animation: wave-propagate 5.8s ease-in-out infinite;
}

/* Theme: Trio Learning Loop */
.theme-trio-loop {
  background:
    radial-gradient(circle at 24% 28%, rgba(157, 255, 229, 0.32), transparent 24%),
    radial-gradient(circle at 76% 30%, rgba(107, 79, 163, 0.14), transparent 25%),
    radial-gradient(circle at 66% 76%, rgba(255, 183, 197, 0.36), transparent 28%),
    radial-gradient(rgba(45, 41, 38, 0.13) 1px, transparent 1px),
    #fbfaf7;
  background-size: auto, auto, auto, 38px 38px, auto;
}

.theme-trio-loop .bg-special {
  left: 8%;
  right: 8%;
  top: 40%;
  height: min(22vh, 210px);
  opacity: 0.88;
  background:
    linear-gradient(90deg, transparent, rgba(157, 255, 229, 0.52), transparent),
    linear-gradient(90deg, transparent, rgba(107, 79, 163, 0.26), transparent),
    linear-gradient(90deg, transparent, rgba(255, 183, 197, 0.54), transparent);
  background-size: 100% 2px, 100% 2px, 100% 2px;
  background-position: 0 24%, 0 50%, 0 76%;
  background-repeat: no-repeat;
  animation: braid-flow 4.8s ease-in-out infinite;
}

.theme-trio-loop .bg-special-two {
  left: 12%;
  right: 12%;
  bottom: 12%;
  height: 36vh;
  border-radius: 50%;
  border-top: 1px dotted rgba(0, 166, 184, 0.34);
  border-bottom: 1px dotted rgba(190, 75, 120, 0.26);
  animation: line-thread-drift 6.4s ease-in-out infinite;
}

/* Theme: Orbit Proof */
.theme-orbit-proof {
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 230, 168, 0.52), transparent 21%),
    radial-gradient(circle at 24% 68%, rgba(157, 255, 229, 0.3), transparent 28%),
    radial-gradient(rgba(45, 41, 38, 0.14) 1px, transparent 1px),
    #fbfaf7;
  background-size: auto, auto, 40px 40px, auto;
}

.theme-orbit-proof .bg-special {
  right: 3%;
  top: 10%;
  width: min(64vw, 780px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 32%, rgba(255, 230, 168, 0.44) 32.4% 33%, transparent 33.6%),
    radial-gradient(circle, transparent 0 53%, rgba(107, 79, 163, 0.2) 53.3% 54%, transparent 54.7%),
    radial-gradient(circle, transparent 0 72%, rgba(0, 166, 184, 0.16) 72.4% 73%, transparent 73.8%);
  animation: orbit-breathe 6s ease-in-out infinite;
}

.theme-orbit-proof .bg-special-two {
  left: 6%;
  top: 16%;
  width: min(38vw, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 10deg, rgba(157, 255, 229, 0.3), transparent 32%, rgba(107, 79, 163, 0.22), transparent 72%, rgba(255, 230, 168, 0.34));
  mask: radial-gradient(circle, transparent 0 58%, #000 59% 61%, transparent 62%);
  animation: slow-spin 11s linear infinite;
}

/* Theme: Moon Harbor */
.theme-moon-harbor {
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 230, 168, 0.5), transparent 20%),
    radial-gradient(circle at 22% 64%, rgba(0, 166, 184, 0.2), transparent 30%),
    radial-gradient(circle at 60% 72%, rgba(255, 183, 197, 0.3), transparent 30%),
    radial-gradient(rgba(45, 41, 38, 0.14) 1px, transparent 1px),
    #fbfaf7;
  background-size: auto, auto, auto, 38px 38px, auto;
}

.theme-moon-harbor .bg-special {
  left: -12%;
  bottom: -24%;
  width: 124vw;
  height: 58vh;
  opacity: 0.8;
  background:
    repeating-radial-gradient(ellipse at 52% 100%, rgba(0, 166, 184, 0.2) 0 2px, transparent 3px 36px),
    linear-gradient(0deg, rgba(107, 79, 163, 0.1), transparent);
  animation: wave-propagate 6.2s ease-in-out infinite;
}

.theme-moon-harbor .bg-special-two {
  right: 12%;
  top: 11%;
  width: min(36vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.92), rgba(255, 230, 168, 0.46) 42%, transparent 68%);
  box-shadow: 0 0 76px rgba(255, 230, 168, 0.28);
  animation: moon-float 7.4s ease-in-out infinite;
}

/* Theme: Spark Tide */
.theme-spark-tide {
  background:
    radial-gradient(circle at 23% 25%, rgba(157, 255, 229, 0.38), transparent 24%),
    radial-gradient(circle at 76% 66%, rgba(255, 183, 197, 0.42), transparent 31%),
    radial-gradient(circle at 58% 22%, rgba(255, 230, 168, 0.38), transparent 21%),
    radial-gradient(rgba(45, 41, 38, 0.15) 1px, transparent 1px),
    #fffaf3;
  background-size: auto, auto, auto, 38px 38px, auto;
}

.theme-spark-tide .bg-special {
  left: 12%;
  top: 16%;
  width: min(66vw, 780px);
  height: 32vh;
  opacity: 0.86;
  background:
    radial-gradient(circle at 8% 50%, rgba(255, 230, 168, 0.86) 0 7px, transparent 8px),
    linear-gradient(100deg, rgba(255, 230, 168, 0.7), rgba(157, 255, 229, 0.3) 46%, transparent 72%);
  clip-path: polygon(0 41%, 54% 22%, 100% 0, 67% 50%, 100% 100%, 50% 72%, 0 59%);
  animation: comet-drift 5.2s ease-in-out infinite;
}

.theme-spark-tide .bg-special-two {
  right: -10%;
  bottom: -20%;
  width: 78vw;
  height: 52vh;
  background:
    repeating-radial-gradient(ellipse at 50% 100%, rgba(0, 166, 184, 0.2) 0 2px, transparent 3px 32px),
    linear-gradient(0deg, rgba(255, 183, 197, 0.22), transparent);
  animation: wave-propagate 5.5s ease-in-out infinite;
}

@keyframes spark-drift {
  0%, 100% { transform: translate3d(-6%, -3%, 0) rotate(0deg); }
  48% { transform: translate3d(7%, 4%, 0) rotate(2deg); }
  70% { transform: translate3d(2%, -1%, 0) rotate(-1deg); }
}

@keyframes dot-breathe {
  0%, 100% { opacity: calc(var(--dot-opacity) * 0.62); }
  50% { opacity: var(--dot-opacity); }
}

@keyframes motif-drift {
  0%, 100% { transform: translateY(0); }
  48% { transform: translateY(-8px); }
}

@keyframes aura-breathe {
  0%, 100% { transform: scale(0.96); opacity: 0.56; }
  50% { transform: scale(1.05); opacity: 0.82; }
}

@keyframes orbit-breathe {
  0%, 100% { transform: translateY(-50%) scale(0.97) rotate(0deg); }
  50% { transform: translateY(-50%) scale(1.03) rotate(2deg); }
}

@keyframes slow-spin {
  to { transform: rotate(360deg); }
}

@keyframes moon-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(12px, -12px, 0) scale(1.03); }
}

@keyframes topo-shift {
  0%, 100% { transform: rotate(-9deg) translate3d(0, 0, 0); }
  50% { transform: rotate(-5deg) translate3d(14px, -10px, 0); }
}

@keyframes wave-propagate {
  0%, 100% { transform: translate3d(0, 0, 0) scaleY(1); }
  50% { transform: translate3d(18px, -10px, 0) scaleY(1.06); }
}

@keyframes photo-hover {
  0%, 100% { transform: rotate(4deg) translate3d(0, 0, 0); }
  50% { transform: rotate(2deg) translate3d(-8px, 10px, 0); }
}

@keyframes tea-steam {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.74; }
  50% { transform: translate3d(-8px, -16px, 0) scale(1.04); opacity: 0.92; }
}

@keyframes steam-arc {
  0%, 100% { transform: rotate(16deg) translateY(0); opacity: 0.46; }
  50% { transform: rotate(9deg) translateY(-18px); opacity: 0.82; }
}

@keyframes topo-morph {
  0%, 100% { transform: rotate(5deg) translate3d(0, 0, 0) scale(1); }
  50% { transform: rotate(2deg) translate3d(18px, -12px, 0) scale(1.03); }
}

@keyframes receipt-drift {
  0%, 100% { transform: rotate(-4deg) translate3d(0, 0, 0); }
  50% { transform: rotate(-2deg) translate3d(6px, -12px, 0); }
}

@keyframes braid-flow {
  0%, 100% { transform: translateX(-2%) skewY(-1deg); opacity: 0.78; }
  50% { transform: translateX(2%) skewY(1deg); opacity: 1; }
}

@keyframes line-thread-drift {
  0%, 100% { opacity: 0.38; }
  50% { opacity: 0.78; }
}

@keyframes comet-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-3deg); opacity: 0.72; }
  50% { transform: translate3d(24px, 10px, 0) rotate(1deg); opacity: 0.96; }
}

@media (max-width: 920px) {
  .meta-label.bottom,
  .brand-credit {
    display: none;
  }

  .meta-label.top {
    max-width: calc(100vw - 120px);
  }

  .scene-content,
  .gengo-room[data-layout="center"] .scene-content {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    padding: 84px 26px 28px;
  }

  .room-title,
  .gengo-room[data-layout="center"] .room-title {
    width: min(92vw, 760px);
    font-size: clamp(38px, 12vw, 76px);
  }

  .poem-card {
    width: min(92vw, 620px);
  }

  .signal-pill {
    max-width: 92vw;
  }

  .mascot-stage {
    opacity: 0.92;
    --stage-left: 74% !important;
    --stage-top: 74% !important;
    --stage-size: clamp(150px, 42vw, 230px) !important;
  }

  .mascot-stage:nth-child(2) {
    --stage-left: 52% !important;
    --stage-top: 79% !important;
  }

  .mascot-stage:nth-child(3) {
    --stage-left: 30% !important;
    --stage-top: 76% !important;
  }

  .mega-glyph {
    right: -20px;
    top: 38%;
    font-size: clamp(160px, 48vw, 300px);
  }
}
