:root {
  --page-bg: #ebebeb;
  --panel: rgba(255, 255, 255, 0.72);
  --ink: #262626;
  --shadow: rgba(18, 18, 18, 0.12);
  --scene-shadow: rgba(0, 0, 0, 0.3);
}

@font-face {
  font-family: "RoundedFixedsys";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/DungGeunMo.woff") format("woff");
  font-weight: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--page-bg);
}

.game-shell {
  width: min(860px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.top-leave-bar,
.game-card {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.game-card {
  margin-top: 10px;
  padding: 0;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid rgba(38, 38, 38, 0.08);
  box-shadow: 0 16px 34px var(--shadow);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.top-leave-bar {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.leave-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.leave-link img {
  width: 18px;
  height: 18px;
  display: block;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 18px 22px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(38, 38, 38, 0.08);
  border-radius: 0;
  box-shadow: none;
  font-family: "RoundedFixedsys", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

#positionText {
  margin: 0;
  font-size: clamp(0.72rem, 1.8vw, 1.2rem);
  min-width: 0;
  flex: 1;
}

.arena-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
}

.arena {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4134 / 2126;
  min-height: 420px;
  border-radius: 0 0 24px 24px;
  border: 0;
  background: #000;
  box-shadow: none;
  outline: none;
  font-family: "RoundedFixedsys", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.arena:focus-visible {
  box-shadow:
    0 24px 50px var(--scene-shadow),
    0 0 0 5px rgba(0, 0, 0, 0.1);
}

.scene-stack,
.foreground-stack {
  position: absolute;
  inset: 0;
  height: 100%;
  transform: translateY(0);
  transition: transform 1.15s cubic-bezier(0.22, 0.9, 0.2, 1);
}

.scene-stack {
  z-index: 0;
}

.foreground-stack {
  z-index: 3;
  pointer-events: none;
}

.arena.is-transitioning-to-two .scene-stack,
.arena.is-transitioning-to-two .foreground-stack,
.arena.is-scene-two .scene-stack,
.arena.is-scene-two .foreground-stack {
  transform: translateY(-100%);
}

.arena.is-transitioning-to-three .scene-stack,
.arena.is-transitioning-to-three .foreground-stack,
.arena.is-scene-three .scene-stack,
.arena.is-scene-three .foreground-stack {
  transform: translateY(-200%);
}

.arena.is-transitioning-to-four .scene-stack,
.arena.is-transitioning-to-four .foreground-stack,
.arena.is-scene-four .scene-stack,
.arena.is-scene-four .foreground-stack {
  transform: translateY(-300%);
}

.arena.is-transitioning-to-five .scene-stack,
.arena.is-transitioning-to-five .foreground-stack,
.arena.is-scene-five .scene-stack,
.arena.is-scene-five .foreground-stack {
  transform: translateY(-400%);
}

.scene-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-panel-one {
  top: 0;
}

.scene-panel-two {
  top: 100%;
}

.scene-panel-three {
  top: 200%;
}

.scene-panel-four {
  top: 300%;
}

.scene-panel-five {
  top: 400%;
}

.scene-target-glow {
  position: absolute;
  z-index: 2;
  width: clamp(54px, 7vw, 96px);
  height: clamp(18px, 2.6vw, 30px);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse at center, rgba(255, 246, 200, 0.8) 0 18%, rgba(255, 225, 144, 0.36) 30%, rgba(23, 17, 11, 0.74) 60%, rgba(0, 0, 0, 0.95) 82%);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(255, 228, 146, 0.24);
}

.scene-target-glow::before,
.scene-target-glow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.scene-target-glow::before {
  width: 132%;
  height: 170%;
  border-radius: 50%;
  border: 1px solid rgba(255, 239, 182, 0.24);
  animation: target-ring-pulse 1.8s ease-out infinite;
}

.scene-target-glow::after {
  width: 58%;
  height: 38%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 248, 209, 0.86), rgba(255, 230, 150, 0.06) 75%, transparent 100%);
  box-shadow: 0 0 20px rgba(255, 238, 170, 0.34);
  animation: target-core-twinkle 1.5s ease-in-out infinite;
}

/* Scene 1-4 goal point positions: edit left/top values directly */
.scene-target-glow--one {
  left: 67%;
  top: 92%;
}

.scene-target-glow--two {
  left: 13.5%;
  top: 91%;
}

.scene-target-glow--three {
  left: 90%;
  top: 58%;
}

.scene-target-glow--four {
  left: 92%;
  top: 57.5%;
}

.arena:not(.is-scene-two):not(.is-scene-three):not(.is-scene-four):not(.is-scene-five) .scene-target-glow--one,
.arena.is-scene-two .scene-target-glow--two,
.arena.is-scene-three .scene-target-glow--three,
.arena.is-scene-four .scene-target-glow--four {
  opacity: 1;
  animation: target-glimmer 1.7s ease-in-out infinite;
}

.scene-caption {
  position: absolute;
  left: 4.8%;
  top: 4.8%;
  z-index: 1;
  max-width: min(42ch, 62%);
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(5px);
  pointer-events: none;
}

.scene-caption-one {
  left: auto;
  right: 4.8%;
}

.scene-caption-text {
  margin: 0;
  color: #fff;
  font-size: clamp(1rem, 1.9vw, 1.36rem);
  line-height: 1.7;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  min-height: 3.4em;
}

.scene-caption-text.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 1em;
  margin-left: 0.18em;
  vertical-align: -0.12em;
  background: currentColor;
  animation: caption-caret 0.8s step-end infinite;
}

.scene-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
}

.scene-panel-two .scene-art {
  width: 100%;
  height: 100%;
}

.scene-wind-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  will-change: transform;
}

.scene2-trees {
  transform-origin: 78% 57%;
  animation: tree-breeze 7.4s ease-in-out infinite;
}

.scene2-grass {
  transform-origin: 12% 95%;
  animation: grass-breeze 5.8s ease-in-out infinite;
}

.scene2-flowers {
  transform-origin: 80% 95%;
  animation: flower-breeze 6.2s ease-in-out 0.7s infinite;
}

.scene3-flowers {
  transform-origin: 11% 28%;
  animation: leaf-breeze 5s ease-in-out 0.25s infinite;
}

.scene3-water {
  transform-origin: 50% 84%;
  animation: river-flow 6.8s ease-in-out infinite;
}

.scene-foreground-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.scene5-foreground {
  z-index: 1;
}

.scene5-decor,
.scene5-object-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.scene5-paths {
  opacity: 0;
}

.scene5-object-layer {
  opacity: 0;
  transform: scale(0.08);
  transform-origin: center center;
}

.scene5-hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.scene5-hotspot {
  position: absolute;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  outline: none;
}

.scene5-hotspot::before,
.scene5-hotspot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
}

.scene5-hotspot::before {
  width: 74%;
  height: 74%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 247, 196, 0.42), transparent 70%);
  filter: blur(3px);
}

.scene5-hotspot::after {
  width: 108%;
  height: 108%;
  border-radius: 999px;
}

.arena.is-scene-five .scene5-hotspot {
  pointer-events: auto;
}

.arena.is-scene-five .scene5-hotspot::before,
.arena.is-scene-five .scene5-hotspot::after {
  opacity: 1;
  animation: target-glimmer 1.7s ease-in-out infinite;
}

.scene5-hotspot:focus-visible {
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.96),
    0 0 0 6px rgba(0, 0, 0, 0.18);
}

.scene5-hotspot--binoculars {
  left: 55.88%;
  top: 26.76%;
  width: 6.77%;
  height: 13.5%;
}

.scene5-hotspot--compass {
  left: 69.26%;
  top: 10.16%;
  width: 6.51%;
  height: 13.12%;
}

.scene5-hotspot--candle-match {
  left: 84.86%;
  top: 18.81%;
  width: 11.08%;
  height: 14.49%;
}

.scene5-hotspot--flashlight {
  left: 54.74%;
  top: 58.09%;
  width: 8.23%;
  height: 10.3%;
}

.scene5-hotspot--tent {
  left: 80.7%;
  top: 59.5%;
  width: 17.63%;
  height: 19.14%;
}

.scene5-hotspot--map {
  left: 60.52%;
  top: 74.84%;
  width: 15.12%;
  height: 12.14%;
}

.scene5-object-layer--binoculars {
  transform-origin: 59.32% 33.53%;
}

.scene5-object-layer--compass {
  transform-origin: 72.47% 16.73%;
}

.scene5-object-layer--candle {
  transform-origin: 86.29% 26.48%;
}

.scene5-object-layer--matchbox {
  transform-origin: 92.58% 26.35%;
}

.scene5-object-layer--flashlight {
  transform-origin: 58.39% 64.39%;
}

.scene5-object-layer--tent {
  transform-origin: 88.93% 71.38%;
}

.scene5-object-layer--map {
  transform-origin: 69.36% 83.76%;
}

.arena.is-scene-five .scene5-paths {
  animation: scene5-decor-fade 480ms 0.18s ease forwards;
}

.arena.is-scene-five .scene5-object-layer--binoculars,
.arena.is-scene-five .scene5-hotspot--binoculars {
  animation: backpack-item-pop 620ms 0.2s cubic-bezier(0.18, 1.25, 0.36, 1) forwards;
}

.arena.is-scene-five .scene5-object-layer--compass,
.arena.is-scene-five .scene5-hotspot--compass {
  animation: backpack-item-pop 620ms 0.34s cubic-bezier(0.18, 1.25, 0.36, 1) forwards;
}

.arena.is-scene-five .scene5-object-layer--candle,
.arena.is-scene-five .scene5-hotspot--candle-match {
  animation: backpack-item-pop 620ms 0.5s cubic-bezier(0.18, 1.25, 0.36, 1) forwards;
}

.arena.is-scene-five .scene5-object-layer--matchbox {
  animation: backpack-item-pop 620ms 0.58s cubic-bezier(0.18, 1.25, 0.36, 1) forwards;
}

.arena.is-scene-five .scene5-object-layer--flashlight,
.arena.is-scene-five .scene5-hotspot--flashlight {
  animation: backpack-item-pop 620ms 0.72s cubic-bezier(0.18, 1.25, 0.36, 1) forwards;
}

.arena.is-scene-five .scene5-object-layer--tent,
.arena.is-scene-five .scene5-hotspot--tent {
  animation: backpack-item-pop 620ms 0.88s cubic-bezier(0.18, 1.25, 0.36, 1) forwards;
}

.arena.is-scene-five .scene5-object-layer--map,
.arena.is-scene-five .scene5-hotspot--map {
  animation: backpack-item-pop 620ms 1.02s cubic-bezier(0.18, 1.25, 0.36, 1) forwards;
}

.idle-guide {
  position: absolute;
  left: 50%;
  bottom: 10%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fff;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 280ms ease, transform 280ms ease;
}

.idle-guide.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.idle-guide.is-left .idle-guide-arrow {
  animation-name: idle-arrow-bob-left;
}

.idle-guide-arrow {
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  animation: idle-arrow-bob-right 1.35s ease-in-out infinite;
}

.idle-guide-text {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  letter-spacing: 0.06em;
  font-family: "RoundedFixedsys", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

.scene-door {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: 5.9% 16.8%;
  animation: door-wobble 4.2s ease-in-out infinite;
  pointer-events: none;
  will-change: transform;
}

.moon-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.moon-sparkle {
  position: absolute;
  width: clamp(42px, 6vw, 92px);
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 0 12%, rgba(255, 255, 255, 0.18) 28%, transparent 68%);
  mix-blend-mode: screen;
  opacity: 0.16;
  transform: translate(-50%, -50%) scale(0.84);
  animation: moon-twinkle 4.4s ease-in-out infinite;
}

.sparkle-one {
  left: 7.2%;
  top: 37%;
}

.sparkle-two {
  left: 25.8%;
  top: 31%;
  animation-delay: 0.7s;
}

.sparkle-three {
  left: 48.8%;
  top: 28%;
  animation-delay: 1.4s;
}

.sparkle-four {
  left: 72.2%;
  top: 31%;
  animation-delay: 0.35s;
}

.sparkle-five {
  left: 91.8%;
  top: 37%;
  animation-delay: 1.05s;
}

@keyframes door-wobble {
  0%,
  100% {
    transform: rotate(0deg);
  }

  18% {
    transform: rotate(-0.7deg) translateX(-2px);
  }

  36% {
    transform: rotate(0.4deg) translateX(1px);
  }

  52% {
    transform: rotate(-0.95deg) translateX(-2px);
  }

  72% {
    transform: rotate(0.48deg) translateX(2px);
  }

  88% {
    transform: rotate(-0.26deg);
  }
}

@keyframes tree-breeze {
  0%,
  100% {
    transform: translateX(0);
  }

  24% {
    transform: translateX(-1px);
  }

  48% {
    transform: translateX(1px);
  }

  76% {
    transform: translateX(-1px);
  }
}

@keyframes grass-breeze {
  0%,
  100% {
    transform: translateX(0);
  }

  30% {
    transform: translateX(1.5px);
  }

  62% {
    transform: translateX(-1px);
  }
}

@keyframes flower-breeze {
  0%,
  100% {
    transform: translateX(0);
  }

  34% {
    transform: translateX(1px);
  }

  68% {
    transform: translateX(-1px);
  }
}

@keyframes leaf-breeze {
  0%,
  100% {
    transform: translateX(0) skewX(0deg);
  }

  22% {
    transform: translateX(-2px) skewX(-0.46deg);
  }

  52% {
    transform: translateX(2px) skewX(0.38deg);
  }

  78% {
    transform: translateX(-2px) skewX(-0.28deg);
  }
}

@keyframes river-flow {
  0%,
  100% {
    opacity: 0.92;
    transform: translateX(0) translateY(0) scaleX(1);
  }

  28% {
    opacity: 1;
    transform: translateX(-12px) translateY(2px) scaleX(1.01);
  }

  56% {
    opacity: 0.96;
    transform: translateX(9px) translateY(-2px) scaleX(0.996);
  }

  78% {
    opacity: 1;
    transform: translateX(-5px) translateY(1px) scaleX(1.006);
  }
}

@keyframes moon-twinkle {
  0%,
  100% {
    opacity: 0.1;
    transform: translate(-50%, -50%) scale(0.78);
    filter: blur(4px);
  }

  38% {
    opacity: 0.34;
    transform: translate(-50%, -50%) scale(1.08);
    filter: blur(7px);
  }

  62% {
    opacity: 0.22;
    transform: translate(-50%, -50%) scale(0.94);
    filter: blur(5px);
  }
}

@keyframes scene5-decor-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes backpack-item-pop {
  0% {
    opacity: 0;
    transform: scale(0.08);
  }

  62% {
    opacity: 1;
    transform: scale(1.08);
  }

  82% {
    opacity: 1;
    transform: scale(0.97);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes caption-caret {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes target-glimmer {
  0%,
  100% {
    transform: scale(0.96);
    filter: brightness(0.95);
  }

  50% {
    transform: scale(1.08);
    filter: brightness(1.18);
  }
}

@keyframes target-ring-pulse {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.72);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.26);
  }
}

@keyframes target-core-twinkle {
  0%,
  100% {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(0.82);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.18);
  }
}

@keyframes idle-arrow-bob-right {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }

  50% {
    transform: translateX(12px) translateY(-2px);
  }
}

@keyframes idle-arrow-bob-left {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }

  50% {
    transform: translateX(-12px) translateY(-2px);
  }
}

.item-modal[hidden] {
  display: none;
}

.item-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.item-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.32);
  backdrop-filter: blur(8px);
}

.item-modal-card {
  position: relative;
  width: min(680px, calc(100vw - 32px));
  margin: min(8vh, 48px) auto;
  padding: 28px 28px 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(38, 38, 38, 0.08);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.18);
}

.item-modal-close {
  position: absolute;
  right: 18px;
  top: 18px;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  color: #fff;
  background: rgba(29, 29, 29, 0.92);
  cursor: pointer;
}

.item-modal-kicker {
  margin: 0 0 8px;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
}

.item-modal-title {
  margin: 0 0 16px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.1;
}

.item-modal-media {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
  min-height: 168px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 22px;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.85), rgba(238, 238, 238, 0.95));
  border: 1px solid rgba(38, 38, 38, 0.05);
}

.item-modal-media img {
  display: block;
  max-width: min(150px, 100%);
  max-height: 150px;
  width: auto;
  height: auto;
}

.item-modal-body {
  font-size: 1.02rem;
  line-height: 1.8;
  white-space: pre-line;
}

.item-modal-body p {
  margin: 0;
}

.character {
  position: absolute;
  z-index: 2;
  width: clamp(44px, 5vw, 78px);
  height: auto;
  transform-origin: center bottom;
  transition: transform 80ms linear, opacity 220ms ease;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.24));
}

.arena.is-transitioning .character {
  opacity: 0;
}

.arena.is-scene-five .character {
  opacity: 0;
  pointer-events: none;
}

.character-sprite {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.status-bar button {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  color: #fff;
  background: linear-gradient(180deg, #3b3b3b, #1f1f1f);
  cursor: pointer;
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.16);
}

.status-bar button:hover {
  filter: brightness(1.04);
}

.status-bar button:active {
  transform: translateY(1px);
}

/* ── Media section (사진 + 유튜브) ── */
.media-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.book-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 10px;
  background: #ddd;
}

.yt-panel {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  background: #111;
  overflow: hidden;
}

.yt-panel-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
}

.yt-panel-media iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-panel-title {
  margin: 8px 10px 3px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.yt-panel-channel {
  margin: 0 10px 10px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Work note ── */
.work-note-card {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff8cf;
  border: 1px solid rgba(38, 38, 38, 0.08);
}

.work-note-kicker {
  margin: 0 0 10px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.68;
}

.work-note-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(38, 38, 38, 0.82);
}

.work-note-card p + p {
  margin-top: 10px;
}

/* ── Order button ── */
.order-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
  border-radius: 14px;
  padding: 16px 20px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: #111;
  cursor: pointer;
  text-decoration: none;
}

.order-cta:hover { filter: brightness(1.08); }
.order-cta:active { transform: translateY(1px); }

/* ── Touch controls ── */
.touch-controls {
  display: flex;
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  padding: 0 14px;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  z-index: 10;
}

.touch-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  transition: background 120ms ease, transform 80ms ease;
}

.touch-btn svg {
  pointer-events: none;
}

.touch-btn:active {
  background: rgba(255, 255, 255, 0.32);
  transform: scale(0.91);
}

.touch-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.idle-guide {
  bottom: 72px;
}

.arena.is-scene-five .touch-controls {
  display: none;
}

/* ── Mobile layout ── */
@media (max-width: 560px) {
  .game-shell {
    width: 100vw;
    padding: 10px 10px 24px;
  }

  .top-leave-bar,
  .game-card,
  .media-section,
  .work-note-card,
  .order-cta {
    width: 100%;
  }

  .status-bar {
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
  }

  .status-bar button {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  #positionText {
    font-size: 0.78rem;
  }

  .arena {
    min-height: unset;
  }

  .scene-caption {
    left: 4%;
    top: 4%;
    max-width: 84%;
    padding: 10px 13px;
  }

  .scene-caption-text {
    font-size: 0.5rem;
    min-height: auto;
    line-height: 1.6;
  }

  .scene-caption-one {
    left: auto;
    right: 4%;
  }

  .media-section {
    gap: 6px;
  }

  .book-grid {
    gap: 6px;
  }

  .character {
    width: clamp(22px, 6%, 34px);
  }

  .item-modal-card {
    width: calc(100vw - 16px);
    margin: 6px auto;
    padding: 14px 13px 13px;
    max-height: calc(100vh - 12px);
    overflow-y: auto;
    border-radius: 16px;
  }

  .item-modal-close {
    right: 12px;
    top: 12px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .item-modal-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .item-modal-media {
    min-height: 80px;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .item-modal-media img {
    max-width: min(50px, 100%);
    max-height: 50px;
  }

  .item-modal-body {
    font-size: 0.86rem;
    line-height: 1.7;
  }
}
