:root {
  --cream: #fff5dc;
  --ink: #233026;
  --muted: #667468;
  --panel: rgba(255, 248, 226, 0.86);
  --gold: #e5b654;
  --brown: #7b552b;
  --soft-font: "Avenir Next", Avenir, "Nunito", "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #e6c293;
  color: var(--ink);
  font-family: var(--soft-font);
}

body {
  overflow: hidden;
}

button {
  font: inherit;
}

.memory-game {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 5%, rgba(255, 250, 223, 0.88), transparent 34%),
    radial-gradient(circle at 76% 14%, rgba(225, 174, 105, 0.38), transparent 34%),
    linear-gradient(180deg, #f1d7ad 0%, #d4a976 100%);
}

.glass-panel {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(78, 47, 18, 0.16);
  backdrop-filter: blur(14px);
}

.map-view {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
  padding: 0;
  transition: opacity 280ms ease;
}

.memory-game.is-scene-mode .map-view {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: block;
  min-height: 0;
  padding: 0;
  pointer-events: auto;
}

.memory-game.is-scene-mode .map-header,
.memory-game.is-scene-mode .tooltip,
.memory-game.is-scene-mode .toast {
  display: none;
}

.map-header {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  width: min(640px, calc(100% - 28px));
  margin: 0;
  padding: 6px 11px;
  border-radius: 999px;
  transform: translateX(-50%);
  pointer-events: none;
}

.map-header .hint-text {
  display: none;
}

.map-header .eyebrow {
  display: none;
}

.eyebrow,
.scene-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(0.82rem, 1.05vw, 1rem);
  font-weight: 900;
}

h2 {
  font-family: var(--soft-font);
  font-size: clamp(1.8rem, 4vw, 3.35rem);
  font-weight: 900;
}

.hint-text {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.72rem, 0.85vw, 0.84rem);
  font-weight: 850;
  text-align: right;
}

.map-stage {
  position: relative;
  place-self: stretch;
  aspect-ratio: 1672 / 941;
  width: 100vw;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  transition:
    width 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 420ms ease,
    border-radius 420ms ease;
}

.memory-game.is-scene-mode .map-stage {
  width: min(250px, 29vw);
  height: auto;
  max-height: none;
  border: 2px solid rgba(255, 248, 224, 0.92);
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  cursor: pointer;
}

.memory-game.is-scene-mode .map-character,
.memory-game.is-scene-mode .map-glow,
.memory-game.is-scene-mode .route-layer {
  display: none;
}

.map-image,
.scene-background {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.route-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#road-line,
#route-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#road-line {
  stroke: rgba(255, 239, 190, 0.08);
  stroke-width: 5;
  stroke-dasharray: 2 16;
  filter: none;
}

#route-line {
  stroke: rgba(255, 226, 154, 0.42);
  stroke-width: 7;
  filter: drop-shadow(0 0 5px rgba(255, 204, 86, 0.32));
}

.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  border: 0;
  border-radius: 28px;
  background: transparent;
  cursor: pointer;
  transform: translateZ(0);
}

.hotspot:focus {
  outline: none;
}

.hotspot:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255, 248, 224, 0.82);
}

.hotspot::after {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 229, 144, 0.36), transparent 68%);
  transition: opacity 180ms ease;
}

.hotspot:is(:hover, :focus-visible).is-active::after,
.hotspot.is-completed::after {
  opacity: 1;
}

.hotspot.is-locked {
  cursor: not-allowed;
}

.map-glow {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(44px, 5vw, 84px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 235, 160, 0.62), rgba(255, 206, 83, 0.18) 42%, transparent 72%);
  filter: blur(1px);
  pointer-events: none;
  transform: translate(-50%, -55%);
  animation: pulseGlow 2.4s ease-in-out infinite;
}

.map-character {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 4;
  width: clamp(30px, 3.2vw, 56px);
  filter: drop-shadow(0 10px 10px rgba(42, 28, 12, 0.3));
  pointer-events: none;
  transform: translate(-50%, -100%) scaleX(var(--face, 1));
  transform-origin: 50% 100%;
}

.map-character.is-walking {
  animation: walkingBounce 360ms ease-in-out infinite;
}

.map-character img {
  display: block;
  width: 100%;
}

.tooltip,
.toast {
  position: absolute;
  z-index: 8;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 248, 224, 0.9);
  box-shadow: 0 14px 30px rgba(78, 47, 18, 0.18);
  color: var(--ink);
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.tooltip {
  left: var(--x);
  top: var(--y);
  padding: 9px 13px;
  transform: translate(-50%, -155%);
}

.toast {
  left: 50%;
  bottom: 28px;
  max-width: min(560px, calc(100% - 32px));
  padding: 12px 16px;
  text-align: center;
  transform: translateX(-50%);
}

.scene-view {
  position: fixed;
  inset: 0;
  z-index: 8;
  min-height: 100vh;
  overflow: hidden;
  background: #18231d;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.025);
  transition:
    opacity 360ms ease,
    transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scene-view.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.scene-background {
  position: absolute;
  inset: 0;
  filter: saturate(1.05) brightness(0.94);
  transition:
    inset 420ms cubic-bezier(0.2, 0.8, 0.2, 1),
    border-radius 420ms ease,
    box-shadow 420ms ease;
}

.scene-view.has-gallery .scene-background {
  inset: 0 24vw 0 0;
  width: calc(100% - 24vw);
  height: 100%;
  border-radius: 0 22px 22px 0;
  box-shadow: 24px 0 52px rgba(0, 0, 0, 0.2);
}

.scene-view.has-bottom-gallery .scene-background {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.scene-view::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 16, 12, 0.04), rgba(10, 16, 12, 0.16)),
    radial-gradient(circle at 50% 44%, transparent 0, rgba(26, 18, 10, 0.16) 100%);
  pointer-events: none;
}

.mini-map {
  display: none;
}

.mini-map img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-panel {
  position: absolute;
  z-index: 7;
  overflow: hidden;
  border: 2px solid rgba(255, 248, 224, 0.88);
  border-radius: 18px;
  background: rgba(22, 32, 24, 0.62);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.video-panel[data-placement="top-right"] {
  top: 22px;
  right: calc(24vw + 22px);
  width: min(430px, 31vw);
}

.video-panel[data-placement="center"] {
  left: 50%;
  bottom: 34px;
  width: min(560px, 44vw);
  transform: translateX(-50%);
}

.video-panel video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #172119;
}

.video-panel p {
  display: none;
}

.video-skip {
  display: block;
  width: calc(100% - 20px);
  margin: 10px;
  border: 1px solid rgba(255, 248, 224, 0.48);
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff7df;
  background: rgba(255, 248, 224, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
  font-weight: 900;
  backdrop-filter: blur(8px);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.video-skip:hover {
  background: rgba(255, 248, 224, 0.22);
  transform: translateY(-1px);
}

.photo-gallery {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: none;
  width: 24vw;
  overflow: hidden;
  padding: 18px 18px 140px;
  pointer-events: auto;
}

.scene-view.has-gallery .photo-gallery {
  display: block;
}

.scene-view.has-bottom-gallery.is-gallery-step .photo-gallery {
  left: 50%;
  right: auto;
  top: auto;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(980px, calc(100vw - 360px));
  height: 176px;
  padding: 0;
  overflow: visible;
  transform: translateX(-50%);
}

.photo-strip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: max-content;
  animation: photoRibbon 42s linear infinite;
}

.photo-gallery:hover .photo-strip {
  animation-play-state: paused;
}

.photo-strip img {
  position: relative;
  z-index: 1;
  width: min(150px, calc(12vw - 24px));
  aspect-ratio: 4 / 3;
  border: 2px solid rgba(255, 247, 221, 0.88);
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
  transform: translateX(var(--offset, 0)) rotate(var(--tilt, -1deg));
  transition:
    box-shadow 180ms ease,
    transform 180ms ease,
    width 180ms ease;
}

.photo-strip img:nth-child(2n) {
  align-self: flex-end;
  --offset: -4px;
  --tilt: 1.5deg;
}

.photo-strip img:nth-child(3n) {
  --offset: 10px;
  --tilt: -2deg;
}

.photo-strip img:hover {
  z-index: 10;
  width: min(300px, calc(22vw - 18px));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.38);
  transform: translateX(-34px) rotate(0deg);
}

.film-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.2vw, 18px);
  width: 100%;
  height: 100%;
  padding: 12px 18px;
  border: 2px solid rgba(255, 248, 224, 0.72);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(255, 242, 199, 0.92), rgba(255, 252, 232, 0.78), rgba(255, 242, 199, 0.92));
  box-shadow:
    0 20px 44px rgba(34, 23, 12, 0.28),
    inset 0 0 0 1px rgba(123, 85, 43, 0.08);
  backdrop-filter: blur(10px) saturate(1.08);
}

.film-photo {
  flex: 0 0 auto;
  width: clamp(92px, 8vw, 140px);
  height: clamp(72px, 6.2vw, 106px);
  border: 2px solid rgba(255, 250, 229, 0.92);
  border-radius: 14px;
  object-fit: cover;
  opacity: 0.68;
  box-shadow: 0 12px 24px rgba(42, 28, 12, 0.22);
  transform: scale(0.92) rotate(var(--tilt, 0deg));
  transition:
    opacity 260ms ease,
    width 260ms ease,
    height 260ms ease,
    transform 260ms ease,
    box-shadow 260ms ease;
}

.film-photo.is-near {
  width: clamp(116px, 9.4vw, 164px);
  height: clamp(86px, 7vw, 122px);
  opacity: 0.88;
}

.film-photo.is-active {
  width: clamp(152px, 12vw, 218px);
  height: clamp(106px, 8vw, 146px);
  opacity: 1;
  box-shadow: 0 18px 34px rgba(42, 28, 12, 0.32);
  transform: scale(1.04) rotate(0deg);
}

.film-photo:hover {
  z-index: 2;
  opacity: 1;
  transform: scale(1.1) rotate(0deg);
}

.scene-characters {
  display: none;
}

.scene-character {
  width: min(22vw, 215px);
  max-height: 58vh;
  object-fit: contain;
  opacity: 0.72;
  filter: drop-shadow(0 20px 18px rgba(0, 0, 0, 0.32));
  transform-origin: 50% 100%;
  transition: opacity 180ms ease, transform 180ms ease;
}

.scene-gizo {
  transform: scaleX(-1);
}

.scene-character.is-speaking {
  opacity: 1;
  transform: translateY(-8px) scale(1.04);
}

.scene-gizo.is-speaking {
  transform: translateY(-8px) scaleX(-1) scale(1.04);
}

.dialogue-panel {
  position: absolute;
  left: var(--bubble-x, 50%);
  top: var(--bubble-y, 50%);
  z-index: 6;
  width: min(330px, 34vw);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transform: translate(-50%, calc(-100% - 18px));
  transition:
    left 220ms ease,
    top 220ms ease,
    transform 220ms ease;
}

.dialogue-panel[data-speaker="caner"] {
  transform: translate(-50%, calc(-100% - 14px));
}

.dialogue-panel[data-speaker="gizo"] {
  transform: translate(-50%, calc(-100% - 16px));
}

.speech-row {
  position: relative;
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  padding: 16px 18px;
  background: rgba(255, 249, 224, 0.68);
  box-shadow:
    0 18px 36px rgba(24, 20, 12, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(13px) saturate(1.12);
}

.speech-row::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 24px;
  height: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 249, 224, 0.7);
  backdrop-filter: blur(13px) saturate(1.12);
  transform: translateX(-50%) rotate(45deg);
}

.speech-row strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brown);
}

.dialogue-panel:not(.is-narration):not(.is-navigation):not(.is-video) .speech-row strong {
  display: none;
}

.speech-row p,
.question-card p {
  margin: 0;
  font-size: clamp(0.92rem, 1.2vw, 1.08rem);
  line-height: 1.45;
}

.question-card {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 12;
  width: min(620px, calc(100% - 32px));
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 246, 214, 0.92);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.18);
  transform: translateX(-50%);
}

.navigation-card {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 12;
  display: flex;
  justify-content: center;
  gap: 12px;
  width: min(620px, calc(100% - 32px));
  transform: translateX(-50%);
}

.navigation-card button {
  border: 1px solid rgba(119, 83, 38, 0.22);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--ink);
  background: rgba(255, 248, 224, 0.94);
  box-shadow: 0 14px 30px rgba(48, 31, 13, 0.18);
  cursor: pointer;
  font-weight: 900;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}

.navigation-card button:hover {
  box-shadow: 0 18px 34px rgba(48, 31, 13, 0.24);
  transform: translateY(-2px) scale(1.02);
}

.answer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.answer-list button,
.dialogue-next {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fff8e3;
  background: linear-gradient(180deg, #d9a84b, #946227);
  box-shadow: 0 8px 18px rgba(99, 60, 21, 0.18);
  font-weight: 850;
}

.answer-list button {
  min-height: 48px;
  padding: 11px 14px;
  color: var(--ink);
  border: 1px solid rgba(123, 85, 43, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 251, 230, 0.96), rgba(232, 194, 120, 0.9));
  box-shadow:
    0 10px 20px rgba(99, 60, 21, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
  font-weight: 950;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}

.answer-list button:hover {
  box-shadow: 0 16px 26px rgba(99, 60, 21, 0.18);
  transform: translateY(-1px);
}

.answer-list button:disabled {
  cursor: default;
  opacity: 0.86;
}

.answer-list button.is-right {
  background: linear-gradient(180deg, #95bd65, #557e3c);
  color: #fff8e3;
}

.answer-list button.is-wrong {
  background: linear-gradient(180deg, #c9826e, #924c3c);
  color: #fff8e3;
}

.answer-feedback {
  min-height: 1.4em;
  margin-top: 12px !important;
  color: var(--brown);
  font-weight: 900;
}

.dialogue-next {
  display: none;
  margin: 14px 0 0 auto;
  padding: 11px 18px;
}

.dialogue-panel > .scene-kicker,
.dialogue-panel > h2 {
  display: none;
}

.dialogue-panel.is-narration,
.dialogue-panel.is-question {
  left: 50%;
  top: auto;
  bottom: 28px;
  width: min(900px, calc(100vw - 72px));
  max-width: calc(100vw - 72px);
  transform: translateX(-50%);
}

.dialogue-panel.is-photo-gallery {
  display: none;
}

.scene-view.has-gallery .dialogue-panel.is-narration,
.scene-view.has-gallery .dialogue-panel.is-question {
  left: 38vw;
  width: min(840px, calc(76vw - 64px));
}

.dialogue-panel.is-narration .speech-row,
.dialogue-panel.is-question .question-card {
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  padding: 18px 24px;
  background:
    linear-gradient(90deg, rgba(255, 242, 199, 0.94), rgba(255, 252, 232, 0.9), rgba(255, 242, 199, 0.94));
  box-shadow:
    0 20px 46px rgba(48, 31, 13, 0.23),
    inset 0 0 0 1px rgba(123, 85, 43, 0.1);
  backdrop-filter: blur(8px);
}

.dialogue-panel.is-narration .speech-row::after {
  display: none;
}

.dialogue-panel.is-narration .speech-row strong {
  display: none;
}

.dialogue-panel.is-narration .speech-row p {
  max-height: 19vh;
  overflow: auto;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.58;
  text-align: center;
}

.dialogue-panel.is-question .speech-row {
  display: none;
}

.dialogue-panel.is-question .question-card {
  position: static;
  left: auto;
  bottom: auto;
  z-index: auto;
  width: 100%;
  margin: 0;
  padding: 18px 26px 20px;
  transform: none;
}

.dialogue-panel.is-question .question-card p {
  color: rgba(47, 41, 29, 0.94);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.25vw, 1.24rem);
  font-weight: 950;
  line-height: 1.35;
  text-align: center;
}

.dialogue-panel.is-question .question-card p::before,
.dialogue-panel.is-question .question-card p::after {
  color: rgba(204, 147, 76, 0.72);
  font-family: var(--soft-font);
  font-size: 0.9em;
  font-weight: 900;
}

.dialogue-panel.is-question .question-card p::before {
  content: "✦  ";
}

.dialogue-panel.is-question .question-card p::after {
  content: "  ✦";
}

.dialogue-panel.is-question .answer-list {
  gap: 9px 14px;
  margin-top: 14px;
}

.dialogue-panel.is-question .answer-list button {
  min-height: 40px;
  border-color: rgba(188, 139, 76, 0.32);
  border-radius: 999px;
  padding: 9px 14px;
  background:
    linear-gradient(180deg, rgba(255, 253, 240, 0.95), rgba(255, 234, 188, 0.72));
  box-shadow:
    0 7px 14px rgba(99, 60, 21, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.82rem, 0.95vw, 0.98rem);
  font-weight: 800;
}

.dialogue-panel.is-question .dialogue-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  margin: 12px auto 0;
  padding: 9px 22px;
  color: #fff8e3;
  background: linear-gradient(180deg, #b8893e, #7c5328);
  box-shadow:
    0 12px 22px rgba(85, 48, 14, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-family: var(--soft-font);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.dialogue-panel.is-question .dialogue-next[hidden] {
  display: none;
}

.dialogue-panel.is-question.is-bubble-question {
  left: var(--bubble-x, 50%);
  top: var(--bubble-y, 36%);
  bottom: auto;
  width: min(420px, 33vw);
  max-width: min(420px, 33vw);
  transform: translate(-50%, calc(-100% - 18px));
}

.scene-view.has-gallery .dialogue-panel.is-question.is-bubble-question,
.scene-view.has-bottom-gallery .dialogue-panel.is-question.is-bubble-question {
  left: var(--bubble-x, 50%);
  width: min(420px, 33vw);
}

.dialogue-panel.is-question.is-bubble-question .question-card {
  position: relative;
  border-radius: 24px;
  padding: 15px 17px 16px;
  background: rgba(255, 249, 224, 0.72);
  box-shadow:
    0 18px 36px rgba(24, 20, 12, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(13px) saturate(1.12);
}

.dialogue-panel.is-question.is-bubble-question .question-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 24px;
  height: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 249, 224, 0.72);
  backdrop-filter: blur(13px) saturate(1.12);
  transform: translateX(-50%) rotate(45deg);
}

.dialogue-panel.is-question.is-bubble-question .question-card p {
  font-family: var(--soft-font);
  font-size: clamp(0.88rem, 1vw, 1rem);
  font-weight: 850;
  text-align: left;
}

.dialogue-panel.is-question.is-bubble-question .question-card p::before,
.dialogue-panel.is-question.is-bubble-question .question-card p::after {
  display: none;
  content: "";
}

.dialogue-panel.is-question.is-bubble-question .answer-list {
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 10px;
}

.dialogue-panel.is-question.is-bubble-question .answer-list button {
  min-height: 34px;
  padding: 7px 12px;
  font-family: var(--soft-font);
  font-size: 0.84rem;
}

.dialogue-panel.is-question.is-bubble-question .answer-feedback {
  white-space: pre-line;
  font-size: 0.9rem;
  line-height: 1.42;
}

.dialogue-panel.is-navigation {
  left: 50%;
  top: auto;
  bottom: 28px;
  width: min(820px, calc(100vw - 72px));
  transform: translateX(-50%);
}

.scene-view.has-gallery .dialogue-panel.is-navigation {
  left: 38vw;
  width: min(820px, calc(76vw - 64px));
}

.dialogue-panel.is-navigation .speech-row {
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 22px;
  padding: 18px 24px;
  background:
    linear-gradient(90deg, rgba(255, 242, 199, 0.94), rgba(255, 252, 232, 0.9), rgba(255, 242, 199, 0.94));
  box-shadow:
    0 20px 46px rgba(48, 31, 13, 0.23),
    inset 0 0 0 1px rgba(123, 85, 43, 0.1);
  backdrop-filter: blur(8px);
}

.dialogue-panel.is-navigation .speech-row::after {
  display: none;
}

.dialogue-panel.is-navigation .speech-row strong,
.dialogue-panel.is-navigation .speech-row p {
  text-align: center;
}

.dialogue-panel.is-navigation .navigation-card {
  position: static;
  width: 100%;
  margin-top: 12px;
  transform: none;
}

.dialogue-panel.is-video {
  display: none;
}

@keyframes photoRibbon {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-50%);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.55;
    transform: translate(-50%, -55%) scale(0.92);
  }

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

@keyframes walkingBounce {
  0%,
  100% {
    margin-top: 0;
  }

  50% {
    margin-top: -5px;
  }
}

@media (max-width: 760px) {
  .map-view {
    gap: 0;
    padding: 0;
  }

  .map-header {
    bottom: 10px;
    align-items: center;
    flex-direction: row;
    border-radius: 999px;
  }

  .hint-text {
    text-align: left;
  }

  .map-stage {
    width: 100%;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  .dialogue-panel {
    width: min(300px, calc(100% - 28px));
  }

  .dialogue-panel.is-narration,
  .dialogue-panel.is-question,
  .dialogue-panel.is-navigation,
  .scene-view.has-gallery .dialogue-panel.is-narration,
  .scene-view.has-gallery .dialogue-panel.is-question,
  .scene-view.has-gallery .dialogue-panel.is-navigation {
    left: 50%;
    bottom: 14px;
    width: calc(100% - 28px);
    max-width: calc(100% - 28px);
  }

  .dialogue-panel.is-narration .speech-row p {
    max-height: 22vh;
    font-size: 0.96rem;
  }

  .memory-game.is-scene-mode .map-view {
    right: 10px;
    bottom: 10px;
  }

  .memory-game.is-scene-mode .map-stage {
    width: 160px;
    height: auto;
  }

  .answer-list {
    grid-template-columns: 1fr;
  }

  .scene-characters {
    padding-inline: 16px;
  }

  .scene-character {
    width: 35vw;
  }

  .mini-map {
    width: 160px;
  }

  .video-panel[data-placement="top-right"],
  .video-panel[data-placement="center"] {
    right: 10px;
    bottom: 96px;
    left: auto;
    top: auto;
    width: min(300px, calc(100% - 20px));
    transform: none;
  }

  .navigation-card {
    bottom: 14px;
    flex-direction: column;
    gap: 8px;
  }

  .scene-view.has-gallery .scene-background {
    inset: 0;
    width: 100%;
    border-radius: 0;
  }

  .photo-gallery {
    top: auto;
    right: 10px;
    bottom: 96px;
    left: 10px;
    width: auto;
    height: 78px;
    padding: 0;
  }

  .photo-strip {
    flex-direction: row;
    gap: 8px;
    animation: none;
    overflow-x: auto;
  }

  .photo-strip img {
    width: 76px;
    min-width: 76px;
  }

  .photo-strip img:hover {
    width: 130px;
    transform: translateY(-18px) rotate(0deg);
  }
}


/* ========== YENİ: Alt konumlu soru (bubble değil) ========== */
.dialogue-panel.is-question.is-bottom-question {
  left: 50%;
  top: auto;
  bottom: 28px;
  width: min(900px, calc(100vw - 72px));
  max-width: calc(100vw - 72px);
  transform: translateX(-50%);
}

.scene-view.has-gallery .dialogue-panel.is-question.is-bottom-question {
  left: 38vw;
  width: min(840px, calc(76vw - 64px));
}

.dialogue-panel.is-question.is-bottom-question .question-card {
  position: static;
  left: auto;
  bottom: auto;
  z-index: auto;
  width: 100%;
  margin: 0;
  padding: 18px 26px 20px;
  transform: none;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  background: linear-gradient(90deg, rgba(255, 242, 199, 0.94), rgba(255, 252, 232, 0.9), rgba(255, 242, 199, 0.94));
  box-shadow: 0 20px 46px rgba(48, 31, 13, 0.23), inset 0 0 0 1px rgba(123, 85, 43, 0.1);
  backdrop-filter: blur(8px);
}

.dialogue-panel.is-question.is-bottom-question .speech-row {
  display: none;
}

/* Soru gelince fotoğraf galerisini silikleştir */
.photo-gallery.is-dimmed-for-question {
  opacity: 0.18;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.photo-gallery {
  transition: opacity 320ms ease;
}

/* Kilitli mekan göstergesi */
.hotspot.is-locked::before {
  content: "🔒";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(16px, 2vw, 28px);
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.hotspot.is-locked {
  opacity: 0.65;
}

/* Tamamlanan mekan parlak göster */
.hotspot.is-completed::after {
  opacity: 1;
  background: radial-gradient(circle, rgba(144, 238, 144, 0.4), transparent 68%);
}

@media (max-width: 760px) {
  .dialogue-panel.is-question.is-bottom-question {
    left: 50%;
    bottom: 14px;
    width: calc(100% - 28px);
    max-width: calc(100% - 28px);
  }
}
