:root {
  --blue: #176cc7;
  --blue-dark: #0f4f96;
  --blue-deep: #0c3e78;
  --ink: #173b63;
  --soft: #eef7ff;
  --line: #c8ddef;
  --gold: #ffd95a;
  --green: #58d78f;
}

* { box-sizing: border-box; }
html, body { width: 100%; margin: 0; min-height: 100%; overflow-x: hidden; background: #bfe5f7; color: var(--ink); font-family: "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button { font: inherit; }

.app-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12px;
}

.story-frame {
  position: relative;
  width: min(1180px, 100%);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,.9);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(31, 79, 118, .28);
}

.story-header {
  position: relative;
  z-index: 30;
  flex: 0 0 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 10px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
}

.story-heading { min-width: 0; flex: 1; }

.header-back {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid rgba(255,255,255,.65);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.14);
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
}
.header-back:disabled { opacity: .32; cursor: default; }

.story-heading h1 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.progress-dots { display: flex; gap: 6px; }
.progress-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
}
.progress-dot.is-done { background: var(--green); }
.progress-dot.is-current { background: #fff; transform: scale(1.12); }

.header-sound,
.bubble-listen {
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(74,158,244,.75);
  cursor: pointer;
}
.header-sound { width: 46px; height: 46px; font-size: 20px; }
.bubble-listen {
  float: right;
  width: 38px;
  height: 38px;
  margin: -4px -5px 4px 8px;
  font-size: 18px;
}

.scene-viewport {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #ddd;
}

.scene-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: opacity .32s ease, transform .6s ease, filter .35s ease, object-position .55s ease;
}
.scene-image.is-changing { opacity: .08; transform: scale(1.025); }

.scene-dimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(17, 33, 54, 0);
  transition: background .3s ease;
}
.scene-dimmer.is-on { background: rgba(17,33,54,.16); }

.story-controls {
  position: relative;
  z-index: 32;
  left: auto;
  right: auto;
  bottom: auto;
  flex: 0 0 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 12px;
  background: rgba(250,253,255,.97);
  border-top: 1px solid #d7e6f2;
}

.control-button {
  min-height: 38px;
  border: 2px solid #c9dcef;
  border-radius: 999px;
  padding: 0 18px;
  color: #183e68;
  background: #fff;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(25,91,145,.06);
}
.control-button--tr { border-color: #1978de; color: #1978de; }
.dialogue-bubble {
  position: absolute;
  z-index: 20;
  left: 4%;
  bottom: 5%;
  width: min(44%, 520px);
  min-height: 0;
  padding: 18px 22px 16px;
  border: 3px solid #173f6d;
  border-radius: 26px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 14px 35px rgba(0,0,0,.18);
  animation: bubbleIn .32s ease both;
}
.dialogue-bubble::after {
  content: "";
  position: absolute;
  left: 25%;
  bottom: -15px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-right: 3px solid #173f6d;
  border-bottom: 3px solid #173f6d;
  transform: rotate(45deg);
}
.bubble-head {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.speaker-initial {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}
.dialogue-english {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.18;
  font-weight: 800;
  color: #183a61;
}
.dialogue-turkish {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px dashed #a9c2d7;
  font-size: clamp(13px, 1.1vw, 16px);
  color: #4a6079;
}

.story-frame.scene-4 .dialogue-bubble {
  left: 3%;
  top: auto;
  bottom: 4%;
  width: min(34%, 410px);
  padding: 14px 16px 13px;
}
.story-frame.scene-4 .dialogue-bubble::after { left: 28%; }
.story-frame.scene-4 .dialogue-english { font-size: clamp(20px, 2vw, 26px); }
.story-frame.scene-4 .dialogue-turkish { margin-top: 7px; padding-top: 7px; font-size: 15px; }
.story-frame.scene-4 .mission-bubble { padding: 9px 12px; border-radius: 15px; }
.story-frame.scene-4 .mission-bubble strong { font-size: 16px; }
.story-frame.scene-4 .mission-bubble span { font-size: 14px; }

.mission-bubble {
  position: absolute;
  z-index: 18;
  padding: 12px 16px;
  border: 2px solid #f1c94b;
  border-radius: 18px;
  color: #3f3212;
  background: rgba(255,247,190,.96);
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
  animation: popIn .25s ease both;
}
.mission-bubble strong { display: block; font-size: 18px; }
.mission-bubble span { display: block; margin-top: 4px; color: #6a5c32; }

.hotspot,
.theme-hotspot {
  position: absolute;
  z-index: 16;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.hotspot.is-active,
.theme-hotspot.is-active {
  outline: 4px solid rgba(255,214,75,.95);
  box-shadow: 0 0 0 10px rgba(255,214,75,.22), 0 0 35px 15px rgba(255,214,75,.62);
  animation: pulse 1.15s ease-in-out infinite;
}

.story-frame.scene-2 .hotspot--phone { border-radius: 24%; }
.story-frame.scene-4 .hotspot--planner { border-radius: 18px; }
.story-frame.scene-5 .hotspot--cupboard { border-radius: 16px; }

.phone-waves {
  position: absolute;
  z-index: 19;
  width: clamp(46px, 5vw, 64px);
  height: clamp(30px, 3.5vw, 44px);
  pointer-events: none;
  transform: translate(-50%, -100%);
}

.phone-waves span {
  position: absolute;
  left: 50%;
  bottom: 0;
  border: 4px solid #ffd64b;
  border-bottom: 0;
  border-radius: 999px 999px 0 0;
  filter: drop-shadow(0 0 7px rgba(255,214,75,.95));
  transform: translateX(-50%);
  transform-origin: center bottom;
  animation: phoneWaveUp 1.05s ease-out infinite;
}
.phone-waves span:nth-child(1) { width: 18px; height: 9px; animation-delay: 0s; }
.phone-waves span:nth-child(2) { width: 34px; height: 17px; animation-delay: .12s; }
.phone-waves span:nth-child(3) { width: 52px; height: 26px; animation-delay: .24s; }

@keyframes phoneWaveUp {
  0% { opacity: .15; transform: translateX(-50%) scale(.72); }
  45% { opacity: 1; }
  100% { opacity: .35; transform: translateX(-50%) scale(1.08); }
}

.object-arrow {
  position: absolute;
  z-index: 17;
  color: #fff;
  font-size: 54px;
  line-height: 1;
  text-shadow: 0 3px 0 #176cc7, 0 0 12px rgba(0,0,0,.3);
  animation: arrowBounce 1s ease-in-out infinite;
}
.object-arrow--door { left: 48%; top: 8%; transform: translateX(-50%); }

.hotspot--door { left: 39%; top: 16%; width: 20%; height: 48%; }
.hotspot--phone { left: 65%; top: 68%; width: 14%; height: 18%; }
.hotspot--clock { left: 77%; top: 10%; width: 14%; height: 22%; border-radius: 50%; }
.hotspot--planner { left: 42%; top: 67%; width: 22%; height: 20%; }
.hotspot--planner-line { left: 66%; top: 17%; width: 27%; height: 10%; }
.hotspot--cupboard { left: 61%; top: 10%; width: 21%; height: 62%; }

.theme-hotspot {
  width: 30%;
  height: 22%;
  border-radius: 20px;
}
.theme-hotspot span {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(13,59,108,.88);
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.theme-hotspot--starry { left: 53%; top: 16%; }
.theme-hotspot--flower { left: 53%; top: 42%; }

.glass-message-panel {
  position: absolute;
  z-index: 24;
  top: 8%;
  right: 4%;
  width: min(46%, 540px);
  max-height: 82%;
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 28px;
  background: rgba(238,246,255,.34);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  box-shadow: 0 24px 55px rgba(16,40,75,.3), inset 0 0 0 1px rgba(255,255,255,.28);
  animation: glassIn .38s cubic-bezier(.2,.8,.2,1) both;
}
.glass-message-panel.is-closing { animation: glassOut .5s ease forwards; }
.glass-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #4e2d91; }
.glass-header small { display: block; color: #5e6d82; }
.glass-avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#eb9cc2,#9655d1); font-weight: 900; border: 3px solid rgba(255,255,255,.85); }
.chat-stream { display: grid; gap: 10px; }
.chat-message {
  max-width: 86%;
  padding: 13px 15px;
  border-radius: 20px;
  box-shadow: 0 8px 18px rgba(17,37,66,.1);
  animation: messageIn .3s ease both;
}
.chat-message p { margin: 4px 0 0; line-height: 1.4; font-size: 18px; font-weight: 700; }
.chat-message strong { color: #51358f; }
.chat-message--incoming { justify-self: start; background: rgba(255,255,255,.96); border-bottom-left-radius: 5px; }
.chat-message--outgoing { justify-self: end; color: #fff; background: linear-gradient(135deg,#245184,#173a68); border-bottom-right-radius: 5px; }
.chat-message--outgoing strong { color: #fff; }
.inline-translation { display: block; margin-top: 8px; padding-top: 7px; border-top: 1px dashed rgba(87,101,122,.3); line-height: 1.35; }
.reply-choices { display: grid; gap: 10px; margin-top: 14px; }
.reply-choices > .reply-prompt {
  position: relative;
  justify-self: start;
  display: grid;
  grid-template-columns: 32px auto;
  align-items: center;
  column-gap: 8px;
  margin: 0 0 2px;
  padding: 8px 14px 8px 10px;
  border: 2px solid #efc43d;
  border-radius: 14px;
  color: #4e3a05;
  background: linear-gradient(135deg, #fff8c9, #ffe78a);
  box-shadow: 0 7px 18px rgba(124,91,5,.2);
}
.reply-prompt strong { font-size: 17px; line-height: 1.2; }
.reply-prompt .inline-translation {
  grid-column: 2;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  color: #705a1a;
  font-size: 12.5px;
  font-weight: 800;
}
.reply-prompt__icon {
  grid-row: 1 / 3;
  font-size: 23px;
  line-height: 1;
  animation: replyPromptPoint 1s ease-in-out infinite;
}
.reply-prompt.is-attention { animation: replyPromptAttention 1.2s ease-in-out 3; }
.reply-choice {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 13px 15px;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg,#2a588d,#173b69);
  text-align: left;
  cursor: pointer;
  font-weight: 800;
}
.reply-choice:hover { transform: translateY(-2px); }
.reply-choice:disabled { opacity: .45; cursor: default; transform: none; }
.reply-choice .inline-translation { color: #e2ecf7; }

@keyframes replyPromptAttention {
  0%, 100% { box-shadow: 0 7px 18px rgba(124,91,5,.2); transform: scale(1); }
  50% { box-shadow: 0 0 0 6px rgba(255,215,73,.28), 0 9px 24px rgba(124,91,5,.3); transform: scale(1.035); }
}
@keyframes replyPromptPoint {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}

.intro-choices {
  position: absolute;
  z-index: 25;
  right: 3.5%;
  bottom: 4%;
  width: min(43%, 500px);
  display: grid;
  gap: 10px;
}
.intro-choices button {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 13px 16px;
  border: 3px solid #fff;
  border-radius: 18px;
  background: rgba(17, 68, 118, .96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
  color: #fff;
  cursor: pointer;
  text-align: left;
}
.intro-choices button:hover { background: #1f9d68; transform: translateY(-2px); }
.intro-choices small {
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, .45);
  color: #e4f1fb;
}

.hotspot.is-queued {
  outline-color: #85f1b2;
  box-shadow: 0 0 0 10px rgba(31, 157, 104, .25), 0 0 35px 15px rgba(133, 241, 178, .7);
}

.start-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 40, 67, .58);
  backdrop-filter: blur(5px);
}
.start-overlay.is-hidden { display: none; }
.start-panel {
  width: min(560px, 94%);
  padding: 28px;
  border: 4px solid #fff;
  border-radius: 28px;
  background: #fff9e9;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  text-align: center;
}
.start-panel span {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  background: #e7f2ff;
  color: #1555aa;
  font-size: 12px;
  font-weight: 900;
}
.start-panel h2 { margin: 11px 0 7px; font-size: clamp(28px, 5vw, 42px); }
.start-panel p { margin: 0 0 18px; color: #4d657e; }
.start-panel button {
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2575d8, #1555aa);
  box-shadow: 0 9px 20px rgba(37, 117, 216, .3);
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
}
.typing-indicator { display: flex; gap: 5px; width: max-content; margin-top: 12px; padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,.9); }
.typing-indicator i { width: 7px; height: 7px; border-radius: 50%; background: #6f75a0; animation: typing 1s ease-in-out infinite; }
.typing-indicator i:nth-child(2) { animation-delay: .15s; }
.typing-indicator i:nth-child(3) { animation-delay: .3s; }

.planner-check-toast {
  position: absolute;
  z-index: 22;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 18px;
  color: #174d31;
  background: rgba(232,255,241,.96);
  border: 2px solid #64c98c;
  box-shadow: 0 12px 28px rgba(0,0,0,.16);
  animation: popIn .28s ease both;
}
.planner-check-toast > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #44b879; font-size: 22px; font-weight: 900; }
.planner-check-toast small { display: block; color: #4e6d5d; }

@keyframes bubbleIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes arrowBounce { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,10px); } }
@keyframes glassIn { from { opacity: 0; transform: translate(45px,16px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes glassOut { to { opacity: 0; transform: translate(38%,50%) scale(.12); filter: blur(5px); } }
@keyframes messageIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

@media (max-width: 760px) {
  .app-shell { display: block; padding: 0; }
  .story-frame { width: 100vw; max-width: none; height: 100svh; min-height: 0; border: 0; border-radius: 0; }
  .story-header { flex-basis: 57px; height: 57px; padding: 7px 10px; }
  .header-back { flex-basis: 32px; width: 32px; height: 32px; font-size: 19px; }
  .story-heading h1 { font-size: 16px; }
  .story-progress { flex: 0 0 auto; gap: 5px; }
  .story-progress strong { display: none; }
  .progress-dots { gap: 2px; }
  .progress-dot { width: 7px; height: 7px; }
  .header-sound { display: none; }
  .scene-viewport { inset: auto; flex: 1 1 auto; min-height: 0; aspect-ratio: auto; }
  .scene-image { object-position: center center; }
  .story-controls { flex-basis: 58px; height: 58px; gap: 10px; padding: 8px 12px; }
  .control-button { min-height: 0; padding: 8px 13px; font-size: 13px; }
  .dialogue-bubble,
  .story-frame.scene-4 .dialogue-bubble {
    left: 4%;
    right: 4%;
    top: auto;
    bottom: 3%;
    width: auto;
    min-height: 0;
    padding: 13px 14px 12px;
    border-radius: 22px;
  }
  .story-frame.scene-4 .dialogue-bubble { top: 3%; bottom: auto; }
  .story-frame.scene-4 .dialogue-bubble {
    left: 4%;
    right: auto;
    top: auto;
    bottom: 3%;
    width: min(72%, 280px);
    padding: 11px 12px 10px;
  }
  .story-frame.scene-4 .dialogue-english { font-size: 17px; }
  .story-frame.scene-4 .dialogue-turkish { font-size: 12px; }
  .dialogue-bubble::after { left: 25%; bottom: -15px; width: 24px; height: 24px; }
  .bubble-listen { width: 35px; height: 35px; }
  .speaker-initial { width: 26px; height: 26px; }
  .dialogue-english { margin: 0; font-size: 18px; line-height: 1.18; }
  .dialogue-turkish { margin-top: 7px; padding-top: 7px; font-size: 13px; }
  .mission-bubble { max-width: 72%; padding: 10px 12px; }
  .mission-bubble strong { font-size: 15px; }
  .object-arrow--door { top: 8%; left: 50%; }
  .hotspot--door { left: 34%; top: 13%; width: 31%; height: 43%; }
  .hotspot--phone { left: 68%; top: 69%; width: 22%; height: 16%; }
  .hotspot--clock { left: 79%; top: 9%; width: 18%; height: 17%; }
  .hotspot--planner { left: 38%; top: 65%; width: 33%; height: 19%; }
  .hotspot--planner-line { left: 52%; top: 56%; width: 31%; height: 7%; }
  .hotspot--cupboard { left: 57%; top: 7%; width: 29%; height: 48%; }
  .theme-hotspot { width: 33%; height: 17%; }
  .theme-hotspot--starry { left: 53%; top: 15%; }
  .theme-hotspot--flower { left: 53%; top: 32%; }
  .glass-message-panel {
    top: 5%;
    left: 4%;
    right: 4%;
    width: auto;
    max-height: 75%;
    padding: 13px;
    border-radius: 24px;
  }
  .chat-message { max-width: 92%; }
  .chat-message p { font-size: 16px; }
  .reply-choices > .reply-prompt { padding: 8px 12px 8px 9px; }
  .reply-prompt strong { font-size: 16px; }
  .reply-prompt .inline-translation { font-size: 12.5px; }
  .reply-choice { font-size: 15px; }
  .intro-choices {
    left: 4%;
    right: 4%;
    bottom: 3%;
    width: auto;
  }
  .intro-choices button { padding: 11px 13px; font-size: 14px; }
  .start-panel { padding: 24px 19px; }
}

/* ---------------------------------------------------------
   V2 SENKRON VE KOORDİNAT DÜZELTMELERİ
   --------------------------------------------------------- */

/* Author CSS display kuralları hidden niteliğini ezmesin. */
[hidden] { display: none !important; }

/* Resmin içine yanlışlıkla gömülmüş eski konuşma kutularını,
   canlı HTML konuşma kutusu tamamen örter. */
.story-frame.scene-5 .dialogue-bubble,
.story-frame.scene-6 .dialogue-bubble {
  left: 2.1%;
  bottom: -2px;
  width: min(64%, 755px);
  min-height: 202px;
  padding: 18px 22px 18px;
  background: #fff;
}

.story-frame.scene-1 .dialogue-bubble {
  left: 4%;
  right: auto;
  bottom: 5%;
  width: min(410px, 44%);
  min-height: 0;
  padding: 17px 18px 15px;
  border-radius: 28px;
}

.story-frame.scene-1 .dialogue-bubble::after {
  left: 25%;
  bottom: -15px;
}

.story-frame.scene-5 .dialogue-bubble::after,
.story-frame.scene-6 .dialogue-bubble::after {
  bottom: -21px;
}

.story-frame.scene-1 .dialogue-english {
  font-size: clamp(17px, 2.2vw, 25px);
  line-height: 1.18;
}

.story-frame.scene-1 .dialogue-turkish {
  font-size: clamp(13px, 1.5vw, 16px);
}

/* Her görselde nesneler farklı yerde. Genel yüzde yerine
   sahneye özel koordinat kullanılır. */
.story-frame.scene-1 .hotspot--door {
  left: 41.2%;
  top: 13.5%;
  width: 19.2%;
  height: 51%;
}
.story-frame.scene-1 .object-arrow--door {
  left: 50.5%;
  top: 5.5%;
}

.story-frame.scene-2 .hotspot--phone,
.story-frame.scene-3 .hotspot--phone {
  left: 66.1%;
  top: 76.5%;
  width: 12.4%;
  height: 18.5%;
}

.story-frame.scene-4 .hotspot--clock {
  left: 69.6%;
  top: 3.5%;
  width: 12.7%;
  height: 24%;
}
.story-frame.scene-4 .hotspot--planner {
  left: 42.8%;
  top: 75.5%;
  width: 21.5%;
  height: 20%;
}

/* Açık defterde gerçek Choose a theme satırı */
.story-frame.scene-5 .hotspot--planner-line {
  left: 61.2%;
  top: 1.7%;
  width: 27.8%;
  height: 11.8%;
  border-radius: 14px;
}

/* Defterden sonra oda görseline dönüldüğünde dolabın gerçek yeri */
.story-frame.scene-5 .hotspot--cupboard {
  left: 55.2%;
  top: 3.8%;
  width: 13.5%;
  height: 63%;
}

/* Açık dolaptaki gerçek kutular */
.story-frame.scene-6 .theme-hotspot--starry {
  left: 47.3%;
  top: 5.5%;
  width: 32.2%;
  height: 32%;
}
.story-frame.scene-6 .theme-hotspot--flower {
  left: 47.4%;
  top: 43.2%;
  width: 32.1%;
  height: 35%;
}

/* Görev balonu hotspot'un üstünü kapatmasın. */
.story-frame.scene-5 .mission-bubble {
  right: 2.8% !important;
  top: 27% !important;
  max-width: 280px;
}
.story-frame.scene-6 .mission-bubble {
  left: 2.8% !important;
  top: 38% !important;
  max-width: 260px;
}

@media (max-width: 760px) {
  .story-frame.scene-6 .scene-image { object-position: 70% center; }

  .story-frame.scene-5 .dialogue-bubble,
  .story-frame.scene-6 .dialogue-bubble {
    left: 4%;
    right: 4%;
    bottom: 0;
    width: auto;
    min-height: 180px;
  }

  .story-frame.scene-1 .dialogue-bubble {
    left: 4%;
    right: auto;
    bottom: 4%;
    width: min(89%, 410px);
    min-height: 0;
    padding: 13px 14px 12px;
    border-radius: 22px;
  }

  .story-frame.scene-1 .dialogue-bubble::after {
    left: 25%;
    bottom: -15px;
  }

  .story-frame.scene-1 .dialogue-english { font-size: 18px; }
  .story-frame.scene-1 .dialogue-turkish { font-size: 13px; }

  .story-frame.scene-2 .hotspot--phone,
  .story-frame.scene-3 .hotspot--phone {
    left: 70%;
    top: 67%;
    width: 22%;
    height: 16%;
  }

  .story-frame.scene-4 .hotspot--clock {
    left: 79.5%;
    top: 7.5%;
    width: 18%;
    height: 18%;
  }
  .story-frame.scene-4 .hotspot--planner {
    left: 39%;
    top: 67%;
    width: 34%;
    height: 18%;
  }

  .story-frame.scene-5 .hotspot--planner-line {
    left: 51.5%;
    top: 58.5%;
    width: 29%;
    height: 6.5%;
  }
  .story-frame.scene-5 .hotspot--cupboard {
    left: 58%;
    top: 6%;
    width: 24%;
    height: 49%;
  }

  .story-frame.scene-6 .theme-hotspot--starry {
    left: 54%;
    top: 13.8%;
    width: 31%;
    height: 18%;
  }
  .story-frame.scene-6 .theme-hotspot--flower {
    left: 54%;
    top: 32.8%;
    width: 31%;
    height: 20%;
  }

  .story-frame.scene-5 .mission-bubble,
  .story-frame.scene-6 .mission-bubble {
    top: auto !important;
    left: auto !important;
    right: 4% !important;
    bottom: 30% !important;
    max-width: 58%;
  }
}

/* Tablet: kart tüm ekranı kullanır ve etkileşim hedefleri kadrajda kalır. */
@media (min-width: 761px) and (max-width: 1024px) {
  html, body { width: 100%; height: 100%; overflow: hidden; }
  body { min-height: 100svh; }
  .app-shell { display: block; padding: 0; }
  .story-frame {
    width: 100vw;
    max-width: none;
    height: 100svh;
    border: 0;
    border-radius: 0;
  }
  .scene-viewport {
    flex: 1 1 auto;
    min-height: 0;
    aspect-ratio: auto;
  }
}

@media (min-width: 761px) and (max-width: 1024px) and (orientation: portrait) {
  .story-frame.scene-6 .scene-image { object-position: 70% center; }

  .story-frame.scene-2 .scene-image { object-position: 28% center; }
  .story-frame.scene-2.is-phone-focus .scene-image { object-position: 70% center; }
  .story-frame.scene-2.is-phone-focus .scene-image { transition: none; }
  .story-frame.scene-2 .hotspot--phone {
    left: 62%;
    top: 78%;
    width: 26%;
    height: 17%;
  }
  .story-frame.scene-2 .mission-bubble {
    left: 4% !important;
    right: auto !important;
    bottom: 29% !important;
    max-width: 42%;
  }
  .story-frame.scene-4 .scene-image { object-position: 75% center; }
  .story-frame.scene-4.is-planner-focus .scene-image { object-position: 50% center; transition: none; }
  .story-frame.scene-4.is-planner-focus .mission-bubble {
    left: auto !important;
    right: 4% !important;
    top: 55% !important;
    bottom: auto !important;
    max-width: 48%;
  }
  .story-frame.scene-5 .scene-image { object-position: right center; }
  .story-frame.scene-5.is-cupboard-focus .scene-image { object-position: 55% center; transition: none; }
  .story-frame.scene-5.is-cupboard-focus .mission-bubble {
    left: 4% !important;
    right: auto !important;
    top: 3% !important;
    bottom: auto !important;
    max-width: 45%;
  }
  .story-frame.scene-5 .hotspot--planner-line {
    left: 5%;
    top: 21.5%;
    width: 75%;
    height: 11%;
  }
}

/* Aynı sahnedeki kısa ikinci replik, karakterin yüzünü kapatmadan üstte görünür. */
.dialogue-bubble.is-top {
  left: auto;
  right: 4%;
  top: 35%;
  bottom: auto;
  width: min(36%, 430px);
  min-height: 0;
}

@media (max-width: 760px) {
  .dialogue-bubble.is-top {
    left: auto;
    right: 4%;
    top: 26%;
    bottom: auto;
    width: min(55%, 215px);
    min-height: 0;
  }
}

/* Yeni temiz scene5.webp görselinin ölçüleri. */
.story-frame.scene-5 .dialogue-bubble {
  left: 3%;
  right: auto;
  top: auto;
  bottom: 4%;
  width: min(30%, 340px);
  min-height: 0;
  padding: 13px 15px 12px;
}
.story-frame.scene-5 .dialogue-bubble::after { bottom: -15px; }
.story-frame.scene-5 .dialogue-english { font-size: clamp(18px, 1.7vw, 22px); }
.story-frame.scene-5 .dialogue-turkish { margin-top: 6px; padding-top: 6px; font-size: 14px; }
.story-frame.scene-5 .hotspot--planner-line {
  left: 66.5%;
  top: 21.5%;
  width: 26.5%;
  height: 11%;
}
.story-frame.scene-5 .mission-bubble {
  left: auto !important;
  right: 4% !important;
  top: 3% !important;
  bottom: auto !important;
  max-width: 250px;
  padding: 9px 12px;
}

@media (max-width: 760px) {
  .story-frame.scene-5 .scene-image { object-position: right center; }
  .story-frame.scene-5 .dialogue-bubble {
    left: 4%;
    right: auto;
    bottom: 3%;
    width: min(76%, 285px);
    min-height: 0;
  }
  .story-frame.scene-5 .hotspot--planner-line {
    left: 1%;
    top: 21.5%;
    width: 75%;
    height: 11%;
  }
  .story-frame.scene-5 .mission-bubble {
    right: 4% !important;
    top: 3% !important;
    bottom: auto !important;
    max-width: 58%;
  }

  .story-frame.scene-2 .scene-image { object-position: 28% center; }
  .story-frame.scene-2.is-phone-focus .scene-image { object-position: 70% center; transition: none; }
  .story-frame.scene-2 .hotspot--phone {
    left: 60%;
    top: 77.5%;
    width: 30%;
    height: 17.5%;
  }
  .story-frame.scene-2 .mission-bubble {
    left: 4% !important;
    right: auto !important;
    bottom: 29% !important;
    max-width: 58%;
  }
  .story-frame.scene-4 .scene-image { object-position: 75% center; transition: none; }
  .story-frame.scene-4.is-planner-focus .scene-image { object-position: 50% center; transition: none; }
  .story-frame.scene-4.is-planner-focus .mission-bubble {
    left: auto !important;
    right: 4% !important;
    top: 55% !important;
    bottom: auto !important;
    max-width: 58%;
  }
  .story-frame.scene-5.is-cupboard-focus .scene-image { object-position: 55% center; transition: none; }
  .story-frame.scene-5.is-cupboard-focus .mission-bubble {
    left: 4% !important;
    right: auto !important;
    top: 3% !important;
    bottom: auto !important;
    max-width: 58%;
  }
}

@media (min-width: 761px) and (max-width: 1024px) and (orientation: portrait) {
  .story-frame.scene-5 .scene-image { object-position: right center; }
  .story-frame.scene-5 .hotspot--planner-line {
    left: 22%;
    top: 21.5%;
    width: 60%;
    height: 11%;
  }
}

/* Sahne 6'daki kisa replik, tema kutularini kapatmadan metne oturur. */
.story-frame.scene-6 .dialogue-bubble {
  left: 2.8%;
  right: auto;
  bottom: 4%;
  width: min(36%, 430px);
  min-height: 0;
  padding: 14px 16px 13px;
}
.story-frame.scene-6 .dialogue-bubble::after { bottom: -15px; }
.story-frame.scene-6 .dialogue-english { font-size: clamp(18px, 1.8vw, 24px); }
.story-frame.scene-6 .dialogue-turkish {
  margin-top: 7px;
  padding-top: 7px;
  font-size: 14px;
}

@media (max-width: 760px) {
  .story-frame.scene-6 .dialogue-bubble {
    left: 4%;
    right: auto;
    bottom: 3%;
    width: min(78%, 300px);
    min-height: 0;
  }
}

/* Sahne 7: telefon uzerinden misafir secimi. */
.story-frame.scene-7 .dialogue-bubble {
  left: 2.8%;
  right: auto;
  bottom: 4%;
  width: min(34%, 400px);
  min-height: 0;
  padding: 14px 16px 13px;
}

.guest-panel {
  position: absolute;
  z-index: 24;
  top: 7%;
  right: 4%;
  width: min(48%, 530px);
  padding: 17px;
  border: 2px solid rgba(255,255,255,.82);
  border-radius: 26px;
  background: rgba(245,249,255,.94);
  box-shadow: 0 20px 48px rgba(20,48,78,.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: glassIn .32s ease both;
}
.guest-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #173f6d;
}
.guest-panel__header > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff2bd;
  font-size: 22px;
}
.guest-panel__header strong { display: block; font-size: 22px; }
.guest-panel__header small { display: block; margin-top: 2px; color: #61758c; }
.guest-panel__prompt { margin: 12px 0; color: #304f70; font-weight: 800; }
.guest-panel__prompt small { display: block; margin-top: 4px; color: #667b92; font-weight: 600; }
.guest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.guest-choice {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 3px solid transparent;
  border-radius: 18px;
  color: #173f6d;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 6px 15px rgba(27,72,112,.1);
}
.guest-choice img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
}
.guest-choice > span {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 28px;
  height: 28px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #22a968;
}
.guest-choice.is-selected { border-color: #22a968; background: #effff6; transform: translateY(-2px); }
.guest-choice.is-selected > span { display: grid; }
.guest-feedback { min-height: 22px; margin: 11px 0 8px; color: #5a6d80; font-weight: 800; }
.guest-feedback.is-error { color: #b23a3a; }
.guest-feedback.is-success { color: #168454; }
.guest-confirm {
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #2479d4, #1555aa);
  cursor: pointer;
  font-weight: 900;
}
.guest-confirm small { display: block; margin-top: 3px; color: #dcecff; }
.guest-confirm:disabled { opacity: .42; cursor: default; }
.guest-panel.is-complete { border-color: #55c98a; box-shadow: 0 20px 48px rgba(20,90,56,.25); }

@media (max-width: 760px) {
  .story-header { gap: 6px; padding-right: 8px; padding-left: 8px; }
  .story-heading { padding-right: 58px; }
  .story-progress { position: absolute; z-index: 2; top: 50%; right: 8px; width: 50px; justify-content: flex-end; transform: translateY(-50%); }
  .story-progress strong { display: block; color: #fff; font-size: 12px; }
  .progress-dots { display: none; }
  .header-sound { display: none; }
  .story-frame.scene-7 .scene-image { object-position: 34% center; }
  .story-frame.scene-7 .dialogue-bubble {
    left: 4%;
    bottom: 3%;
    width: min(76%, 285px);
  }
  .guest-panel {
    top: 4%;
    left: 4%;
    right: 4%;
    width: auto;
    padding: 12px;
    border-radius: 20px;
  }
  .guest-panel__header > span { width: 34px; height: 34px; font-size: 18px; }
  .guest-panel__header strong { font-size: 18px; }
  .guest-panel__prompt { margin: 8px 0; font-size: 13px; }
  .guest-grid { min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .guest-choice { min-width: 0; gap: 4px; padding: 5px; border-width: 2px; border-radius: 13px; }
  .guest-choice img { border-radius: 9px; }
  .guest-feedback { min-height: 18px; margin: 7px 0 5px; font-size: 12px; }
  .guest-confirm { padding: 8px 10px; font-size: 13px; }
}

/* Sahne 8: dogru davet cumlesini secip Lena ve Nil'e gonderme. */
.invitation-panel {
  position: absolute;
  z-index: 24;
  top: 6%;
  right: 4%;
  width: min(50%, 560px);
  padding: 17px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(248,252,255,.68), rgba(224,239,252,.58));
  box-shadow: 0 24px 55px rgba(16,40,75,.3), inset 0 0 0 1px rgba(255,255,255,.3);
  backdrop-filter: blur(22px) saturate(1.05) brightness(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.05) brightness(1.08);
  animation: glassIn .32s ease both;
}
.invitation-panel__header { display: flex; align-items: center; gap: 10px; color: #173f6d; }
.invitation-panel__header > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(229,241,255,.82);
  font-size: 22px;
}
.invitation-panel__header strong { display: block; font-size: 22px; }
.invitation-panel__header small { display: block; margin-top: 2px; color: #385675; font-weight: 700; }
.invitation-recipients { display: flex; gap: 9px; margin: 11px 0; }
.invitation-recipients span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  color: #173f6d;
  background: rgba(255,255,255,.82);
  box-shadow: 0 4px 11px rgba(27,72,112,.1);
  font-weight: 900;
}
.invitation-recipients img { width: 30px; height: 30px; object-fit: cover; object-position: top; border-radius: 50%; }
.invitation-prompt { margin: 10px 0; color: #173f6d; font-weight: 900; }
.invitation-prompt small { display: block; margin-top: 3px; color: #385675; font-weight: 700; }
.invitation-choices { display: grid; gap: 9px; }
.invitation-choice {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 11px 13px;
  border: 2px solid #c8ddef;
  border-radius: 16px;
  color: #173f6d;
  background: rgba(255,255,255,.92);
  text-align: left;
  cursor: pointer;
}
.invitation-choice small { color: #3f5d7c; font-weight: 700; }
.invitation-choice:hover { border-color: #438bd2; transform: translateY(-1px); }
.invitation-choice.is-selected { border-color: #22a968; background: rgba(239,255,246,.9); box-shadow: 0 0 0 4px rgba(34,169,104,.12); }
.invitation-choice.is-wrong { border-color: #d95b5b; background: rgba(255,241,241,.9); animation: messageIn .25s ease both; }
.invitation-preview {
  display: grid;
  gap: 7px;
  padding: 15px;
  border: 2px solid #b7d6ee;
  border-radius: 16px;
  color: #173f6d;
  background: rgba(255,255,255,.92);
  box-shadow: 0 7px 18px rgba(27,72,112,.08);
}
.invitation-preview strong { font-size: 17px; line-height: 1.35; }
.invitation-preview small { padding-top: 7px; border-top: 1px dashed #b8c9d8; color: #3f5d7c; font-weight: 700; }
.invitation-feedback { min-height: 35px; margin: 9px 0 7px; color: #234b73; font-weight: 900; }
.invitation-feedback small { display: block; margin-top: 2px; color: #385675; font-weight: 700; }
.invitation-feedback.is-error { color: #b23a3a; }
.invitation-feedback.is-success { color: #168454; }
.invitation-send {
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #2479d4, #1555aa);
  cursor: pointer;
  font-weight: 900;
}
.invitation-send small { display: block; margin-top: 3px; color: #dcecff; }
.invitation-send:disabled {
  opacity: 1;
  color: rgba(255,255,255,.96);
  background: rgba(42,87,137,.64);
  cursor: default;
}
.invitation-send:disabled small { color: rgba(255,255,255,.84); }
.invitation-replies { display: grid; gap: 6px; margin-top: 10px; }
.invitation-reply {
  padding: 8px 11px;
  border-radius: 13px;
  color: #174d31;
  background: #e9fff2;
  border: 1px solid #74d39a;
  font-weight: 800;
  animation: messageIn .28s ease both;
}
.invitation-reply small { display: block; margin-top: 2px; color: #46705a; }
.invitation-panel.is-complete { border-color: #55c98a; }
.story-frame.scene-8 .dialogue-bubble {
  left: 2.8%;
  right: auto;
  bottom: 4%;
  width: min(34%, 400px);
  min-height: 0;
  padding: 14px 16px 13px;
}

@media (max-width: 760px) {
  .story-frame.scene-8 .scene-image { object-position: 34% center; }
  .story-frame.scene-8 .dialogue-bubble { left: 4%; bottom: 3%; width: min(76%, 285px); }
  .invitation-panel {
    top: 3%;
    left: 4%;
    right: 4%;
    width: auto;
    max-height: 94%;
    overflow: auto;
    padding: 12px;
    border-radius: 20px;
  }
  .invitation-panel__header > span { width: 34px; height: 34px; font-size: 18px; }
  .invitation-panel__header strong { font-size: 19px; line-height: 1.2; }
  .invitation-panel__header small { font-size: 13px; line-height: 1.3; }
  .invitation-recipients { margin: 7px 0; }
  .invitation-prompt { margin: 7px 0; font-size: 14px; line-height: 1.3; }
  .invitation-prompt small { font-size: 12.5px; line-height: 1.35; }
  .invitation-choices { gap: 6px; }
  .invitation-choice { padding: 8px 10px; border-radius: 13px; font-size: 14px; line-height: 1.35; }
  .invitation-choice small { font-size: 12.5px; line-height: 1.35; }
  .invitation-preview { padding: 10px; border-radius: 13px; }
  .invitation-preview strong { font-size: 16px; line-height: 1.4; }
  .invitation-preview small { font-size: 14px; line-height: 1.4; }
  .invitation-feedback { min-height: 34px; margin: 7px 0 6px; font-size: 14px; line-height: 1.35; }
  .invitation-feedback small { font-size: 12.5px; line-height: 1.35; }
  .invitation-send { padding: 9px 10px; font-size: 15px; line-height: 1.25; }
  .invitation-send small { font-size: 13px; line-height: 1.3; }
  .invitation-replies { margin-top: 7px; }
  .invitation-reply { padding: 8px 10px; font-size: 14.5px; line-height: 1.35; }
  .invitation-reply small { margin-top: 3px; font-size: 13px; line-height: 1.35; }
}

/* Sahne 9: secilen temaya gore odayi ortaya cikarma. */
.story-frame.scene-9 .scene-image { transition: opacity .32s ease, transform .75s ease, filter .75s ease; }
.story-frame.scene-9.is-decoration-hidden .scene-image {
  filter: blur(9px) brightness(.58) saturate(.75);
  transform: scale(1.035);
}
.decoration-panel {
  position: absolute;
  z-index: 25;
  top: 7%;
  right: 4%;
  width: min(39%, 430px);
  padding: 17px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(248,252,255,.72), rgba(224,239,252,.62));
  box-shadow: 0 22px 50px rgba(16,40,75,.3), inset 0 0 0 1px rgba(255,255,255,.3);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
  animation: glassIn .32s ease both;
}
.decoration-panel__header { display: flex; align-items: center; gap: 10px; color: #173f6d; }
.decoration-panel__header > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,244,194,.9);
  font-size: 22px;
}
.decoration-panel__header strong { display: block; font-size: 22px; }
.decoration-panel__header small { display: block; margin-top: 2px; color: #385675; font-weight: 700; }
.decoration-panel p { margin: 13px 0; color: #234b73; }
.decoration-panel p strong { display: block; line-height: 1.35; }
.decoration-panel p small { display: block; margin-top: 4px; color: #385675; font-weight: 700; }
.decoration-button {
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, #2479d4, #1555aa);
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(21,85,170,.24);
}
.decoration-button small { display: block; margin-top: 3px; color: #dcecff; }
.decoration-button:disabled { opacity: .55; cursor: default; }
.decoration-toast {
  position: absolute;
  z-index: 25;
  top: 5%;
  right: 4%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border: 2px solid #64c98c;
  border-radius: 17px;
  color: #174d31;
  background: rgba(232,255,241,.94);
  box-shadow: 0 12px 28px rgba(0,0,0,.16);
  animation: popIn .28s ease both;
}
.decoration-toast > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #44b879; font-weight: 900; }
.decoration-toast small { display: block; margin-top: 2px; color: #416b54; }
.story-frame.scene-9 .dialogue-bubble {
  left: 2.8%;
  right: auto;
  bottom: 4%;
  width: min(34%, 400px);
  min-height: 0;
  padding: 14px 16px 13px;
}

@media (max-width: 760px) {
  .story-frame.scene-9 .scene-image { object-position: 34% center; }
  .story-frame.scene-9 .dialogue-bubble { left: 4%; bottom: 3%; width: min(76%, 285px); }
  .decoration-panel {
    top: 5%;
    left: 4%;
    right: 4%;
    width: auto;
    padding: 13px;
    border-radius: 20px;
  }
  .decoration-panel__header > span { width: 34px; height: 34px; font-size: 18px; }
  .decoration-panel__header strong { font-size: 18px; }
  .decoration-panel p { margin: 9px 0; font-size: 13px; }
  .decoration-button { padding: 9px 11px; font-size: 13px; }
  .decoration-toast { top: 4%; right: 4%; padding: 8px 11px; font-size: 13px; }
}

/* Sahne 10: mumlari tepsiden pastaya yerlestirme. */
.hotspot--candles {
  border-radius: 16px;
}
.hotspot--candles span {
  position: absolute;
  left: 50%;
  bottom: -34px;
  transform: translateX(-50%);
  padding: 6px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(13,59,108,.9);
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
  font-weight: 900;
  white-space: nowrap;
}
.cake-candles-overlay {
  position: absolute;
  z-index: 18;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}
.cake-candles-overlay i {
  position: relative;
  width: 9px;
  height: 40px;
  border-radius: 4px 4px 2px 2px;
  background: repeating-linear-gradient(-35deg, #ff6e83 0 6px, #fff 6px 10px);
  box-shadow: 0 2px 5px rgba(0,0,0,.18);
  transform: translateY(90px) scale(.7);
  opacity: 0;
  animation: candlePlace .48s cubic-bezier(.2,.8,.2,1) forwards;
}
.cake-candles-overlay i:nth-child(2) { background: repeating-linear-gradient(-35deg, #ffcc42 0 6px, #fff 6px 10px); animation-delay: .08s; }
.cake-candles-overlay i:nth-child(3) { background: repeating-linear-gradient(-35deg, #4ea6ef 0 6px, #fff 6px 10px); animation-delay: .16s; }
.cake-candles-overlay i:nth-child(4) { background: repeating-linear-gradient(-35deg, #7f73df 0 6px, #fff 6px 10px); animation-delay: .24s; }
.cake-candles-overlay i:nth-child(5) { background: repeating-linear-gradient(-35deg, #52bd83 0 6px, #fff 6px 10px); animation-delay: .32s; }
.cake-candles-overlay i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -15px;
  width: 10px;
  height: 15px;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 50% 65%, #fff6a8 0 20%, #ffd24d 35%, #ff8b2a 72%);
  filter: drop-shadow(0 0 6px rgba(255,194,58,.9));
  transform: translateX(-50%);
  animation: flameFlicker .75s ease-in-out infinite alternate;
}
@keyframes candlePlace { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes flameFlicker { from { transform: translateX(-50%) rotate(-3deg) scale(.92); } to { transform: translateX(-50%) rotate(3deg) scale(1.05); } }

.cake-panel {
  position: absolute;
  z-index: 24;
  top: 6%;
  right: 4%;
  width: min(37%, 410px);
  padding: 16px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 23px;
  color: #173f6d;
  background: linear-gradient(145deg, rgba(248,252,255,.72), rgba(224,239,252,.62));
  box-shadow: 0 22px 50px rgba(16,40,75,.28), inset 0 0 0 1px rgba(255,255,255,.3);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
  animation: glassIn .32s ease both;
}
.cake-panel__header { display: flex; align-items: center; gap: 10px; }
.cake-panel__header > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,234,240,.9); font-size: 21px; }
.cake-panel__header strong { display: block; font-size: 21px; }
.cake-panel__header small { display: block; margin-top: 2px; color: #385675; font-weight: 700; }
.cake-panel p { margin: 12px 0 0; font-weight: 900; }
.cake-panel p small { display: block; margin-top: 4px; color: #385675; font-weight: 700; }
.cake-toast {
  position: absolute;
  z-index: 25;
  top: 5%;
  right: 4%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border: 2px solid #64c98c;
  border-radius: 17px;
  color: #174d31;
  background: rgba(232,255,241,.95);
  box-shadow: 0 12px 28px rgba(0,0,0,.16);
  animation: popIn .28s ease both;
}
.cake-toast > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #44b879; font-weight: 900; }
.cake-toast small { display: block; margin-top: 2px; color: #416b54; }
.story-frame.scene-10 .dialogue-bubble { left: 2.8%; right: auto; bottom: 4%; width: min(34%, 400px); min-height: 0; padding: 14px 16px 13px; }

@media (max-width: 760px) {
  .story-frame.scene-10 .scene-image { object-position: 43% center; }
  .story-frame.scene-10 .dialogue-bubble { left: 4%; bottom: 3%; width: min(76%, 285px); }
  .cake-panel { top: 4%; left: 4%; right: 4%; width: auto; padding: 12px; border-radius: 19px; }
  .cake-panel__header > span { width: 34px; height: 34px; font-size: 18px; }
  .cake-panel__header strong { font-size: 18px; }
  .cake-panel p { margin-top: 8px; font-size: 13px; }
  .hotspot--candles span { bottom: -28px; padding: 5px 9px; font-size: 12px; }
  .cake-toast { top: 4%; right: 4%; padding: 8px 11px; font-size: 13px; }
}

/* Sahne 11: Lena ve Nil'in saklanma yerlerini sirayla kontrol etme. */
.story-frame.scene-11 .scene-image { transition: opacity .32s ease, transform .6s ease, filter .35s ease, object-position .65s ease; }
.hiding-hotspot { border-radius: 28px; }
.hiding-hotspot span {
  position: absolute;
  left: 50%;
  bottom: -31px;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(13,59,108,.92);
  box-shadow: 0 4px 10px rgba(0,0,0,.22);
  font-weight: 900;
  white-space: nowrap;
}
.hiding-panel {
  position: absolute;
  z-index: 24;
  right: 4%;
  bottom: 5%;
  width: min(38%, 420px);
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 22px;
  color: #173f6d;
  background: linear-gradient(145deg, rgba(248,252,255,.72), rgba(224,239,252,.62));
  box-shadow: 0 20px 46px rgba(16,40,75,.28), inset 0 0 0 1px rgba(255,255,255,.3);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
  animation: glassIn .32s ease both;
}
.hiding-panel__header { display: flex; align-items: center; gap: 10px; }
.hiding-panel__header > span { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; background: rgba(240,232,255,.92); font-size: 20px; }
.hiding-panel__header strong { display: block; font-size: 20px; }
.hiding-panel__header small { display: block; margin-top: 2px; color: #385675; font-weight: 700; }
.hiding-panel p { margin: 10px 0 0; }
.hiding-panel p strong { display: block; }
.hiding-panel p small { display: block; margin-top: 3px; color: #385675; font-weight: 700; }
.hiding-toast {
  position: absolute;
  z-index: 25;
  right: 4%;
  bottom: 5%;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
  padding: 11px 15px;
  border: 2px solid #64c98c;
  border-radius: 17px;
  color: #174d31;
  background: rgba(232,255,241,.95);
  box-shadow: 0 12px 28px rgba(0,0,0,.16);
  animation: popIn .28s ease both;
}
.hiding-toast > span { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: #44b879; font-weight: 900; }
.hiding-toast small { display: block; margin-top: 2px; color: #416b54; }
.story-frame.scene-11 .dialogue-bubble { left: 2.8%; right: auto; bottom: 4%; width: min(34%, 400px); min-height: 0; padding: 14px 16px 13px; }

@media (max-width: 760px) {
  .story-frame.scene-11 .scene-image { object-position: 43% center; }
  .story-frame.scene-11.is-nil-focus .scene-image { object-position: 88% center; }
  .story-frame.scene-11 .dialogue-bubble { left: 4%; bottom: 3%; width: min(76%, 285px); }
  .hiding-panel { left: 4%; right: 4%; bottom: 4%; width: auto; padding: 11px 12px; border-radius: 19px; }
  .hiding-panel__header > span { width: 33px; height: 33px; font-size: 17px; }
  .hiding-panel__header strong { font-size: 17px; }
  .hiding-panel p { margin-top: 7px; font-size: 13px; }
  .hiding-hotspot span { bottom: -27px; padding: 5px 9px; font-size: 12px; }
  .hiding-toast { left: 4%; right: 4%; bottom: 4%; max-width: none; padding: 9px 11px; font-size: 13px; }
}

/* Sahne 12: Ece'ye sürpriz ve konfeti finali. */
.story-frame.scene-12 .scene-image { transition: opacity .32s ease, transform .7s ease, filter .4s ease, object-position .65s ease; }
.story-frame.scene-12.is-finalized .scene-image { transform: scale(1.018); filter: saturate(1.08) brightness(1.03); }
.story-frame.scene-12 .dialogue-bubble {
  z-index: 30;
  left: 50%;
  right: auto;
  bottom: 6%;
  width: min(560px, 82%);
  translate: -50% 0;
  border-color: #d63b78;
  background: rgba(255,255,255,.97);
  box-shadow: 0 0 0 7px rgba(255,216,75,.28), 0 20px 55px rgba(49,24,80,.38);
}
.story-frame.scene-12 .dialogue-bubble::after {
  left: 50%;
  border-color: #d63b78;
}
.story-frame.scene-12 .speaker-initial {
  background: linear-gradient(135deg, #e83d79, #7a4ee8);
}
.story-frame.scene-12 .dialogue-english {
  color: #7d2760;
  font-size: clamp(23px, 3vw, 34px);
  text-align: center;
}
.story-frame.scene-12 .dialogue-turkish {
  font-size: 16px;
  text-align: center;
}
.surprise-hotspot { border-radius: 42% 42% 32% 32%; }
.surprise-hotspot span {
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  padding: 7px 13px;
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #e83d79, #7a4ee8);
  box-shadow: 0 7px 18px rgba(77,32,112,.3);
  font-weight: 900;
  white-space: nowrap;
}
.confetti-layer {
  position: absolute;
  z-index: 29;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.confetti-layer i {
  position: absolute;
  left: var(--start-x);
  top: 62%;
  width: 9px;
  height: 16px;
  border-radius: 2px;
  background: var(--color);
  box-shadow: 0 1px 2px rgba(0,0,0,.14);
  opacity: 0;
  animation: confettiBurst var(--duration) cubic-bezier(.18,.72,.28,1) var(--delay) forwards;
}
.confetti-layer i.is-round { width: 11px; height: 11px; border-radius: 50%; }
.final-panel {
  position: absolute;
  z-index: 28;
  left: 50%;
  bottom: 5%;
  width: min(520px, 88%);
  padding: 19px 22px 18px;
  transform: translateX(-50%);
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 26px;
  color: #153e6b;
  text-align: center;
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(239,247,255,.78));
  box-shadow: 0 22px 60px rgba(18,48,89,.34), inset 0 0 0 1px rgba(255,255,255,.5);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  animation: finalPanelIn .52s cubic-bezier(.2,.8,.25,1) both;
}
.final-panel__kicker { display: block; color: #a14b16; font-size: 14px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.final-panel h2 { margin: 8px 0 6px; color: #0f4f96; font-size: clamp(29px, 4vw, 44px); line-height: 1.05; letter-spacing: .025em; }
.final-panel p { margin: 4px 0 7px; color: #46627d; font-weight: 800; }
.final-panel > small { display: block; margin-top: 2px; color: #365776; font-weight: 800; }
.final-panel__actions { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.final-panel__actions button,
.final-panel__actions a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #176cc7;
  box-shadow: 0 7px 18px rgba(23,108,199,.22);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.final-panel__actions a { color: #164879; background: rgba(220,238,255,.95); }

@keyframes confettiBurst {
  0% { opacity: 0; transform: translate(0,0) scale(.25) rotate(0); }
  9% { opacity: 1; }
  45% { opacity: 1; transform: translate(var(--burst-x),var(--burst-y)) scale(1) rotate(var(--turn)); }
  100% { opacity: 0; transform: translate(var(--end-x),var(--end-y)) scale(.9) rotate(var(--end-turn)); }
}
@keyframes finalPanelIn {
  from { opacity: 0; transform: translate(-50%,28px) scale(.88); }
  to { opacity: 1; transform: translate(-50%,0) scale(1); }
}

@media (max-width: 760px) {
  .story-frame.scene-12 .scene-image { object-position: 72% center; }
  .story-frame.scene-12 .mission-bubble { left: 4% !important; right: auto !important; bottom: 4% !important; max-width: 58%; }
  .story-frame.scene-12 .dialogue-bubble {
    left: 4%;
    right: 4%;
    bottom: 4%;
    width: auto;
    translate: none;
  }
  .story-frame.scene-12 .dialogue-english { font-size: 23px; }
  .story-frame.scene-12 .dialogue-turkish { font-size: 14px; }
  .surprise-hotspot span { bottom: 1px; padding: 5px 9px; font-size: 12px; }
  .final-panel { bottom: 3%; width: 92%; padding: 15px 14px 14px; border-radius: 22px; }
  .final-panel h2 { font-size: 27px; overflow-wrap: anywhere; }
  .final-panel p { margin: 3px 0 5px; font-size: 14px; }
  .final-panel__actions { margin-top: 11px; }
  .final-panel__actions button,
  .final-panel__actions a { min-height: 38px; padding: 8px 12px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .reply-prompt.is-attention,
  .reply-prompt__icon { animation: none !important; }
  .confetti-layer i { animation-duration: .01ms !important; }
  .story-frame.scene-12.is-finalized .scene-image { transform: none; }
}

/* Mobil defter sahnesi: sol seçim yuvarlağı ve sarı vurgu kesilmesin. */
@media (max-width: 760px) {
  .story-frame.scene-5:not(.is-cupboard-focus) .scene-image {
    object-position: 98% center;
  }

  .story-frame.scene-5:not(.is-cupboard-focus) .hotspot--planner-line {
    left: 5%;
    top: 21.5%;
    width: 75%;
    height: 11%;
  }
}
