/* =====================================================
   LETTER GAMES
   ===================================================== */

.game-overlay { z-index: 20; }
.game-card {
  position: relative;
  background: var(--paper);
  border-top: 6px solid var(--seal);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 34px 22px 26px;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
  animation: slideUp 0.5s ease;
}
.game-title { font-size: 1.9rem; color: var(--seal); line-height: 1.3; }
.game-sub { opacity: 0.75; font-style: italic; margin: 6px 0 16px; }

.game-btn {
  display: inline-block;
  margin: 14px 6px 0;
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: var(--seal);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}
.game-btn.secondary { background: #ffd2a3; color: var(--ink); }

/* ---------- 1. Counting octopuses ---------- */
.night-scene {
  position: relative;
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #1d1b4a 0%, #3b2f6b 55%, #6a4c8c 100%);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.moon {
  position: absolute;
  top: 18px; right: 28px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #fff1c9;
  box-shadow: 0 0 30px 8px rgba(255, 241, 201, 0.4);
}
.star {
  position: absolute;
  color: #fff6d8;
  font-size: 0.7rem;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.grass {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 26%;
  background: linear-gradient(180deg, #3e6b4a, #2c4f37);
}
.fence {
  position: absolute;
  left: 50%; bottom: 20%;
  transform: translateX(-50%);
  width: 70px; height: 54px;
  background:
    linear-gradient(#a36b3c, #a36b3c) 0 12px / 100% 7px no-repeat,
    linear-gradient(#a36b3c, #a36b3c) 0 32px / 100% 7px no-repeat,
    linear-gradient(90deg, #8a5630 0 9px, transparent 9px 30px, #8a5630 30px 39px, transparent 39px 61px, #8a5630 61px 70px);
  border-radius: 3px 3px 0 0;
}
.jumper {
  position: absolute;
  width: 54px;
  bottom: 20%;
  left: -15%;
  animation: hop 1.4s ease-in-out forwards;
}
.jumper svg { width: 100%; height: auto; display: block; }
@keyframes hop {
  0%   { left: -15%; bottom: 20%; }
  50%  { left: 44%;  bottom: 52%; }
  100% { left: 110%; bottom: 20%; }
}
.counter {
  margin-top: 14px;
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--seal);
}

/* ---------- 2. Find the octopus ---------- */
.find-grid {
  display: grid;
  gap: 8px;
  max-width: 380px;
  margin: 0 auto;
}
.find-cell {
  aspect-ratio: 1;
  border: none;
  border-radius: 12px;
  background: #ffe3c4;
  font-size: clamp(1.2rem, 6vw, 2rem);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.find-cell svg { width: 70%; height: auto; }
.find-cell.shake { animation: shake 0.4s ease; background: #ffd0c4; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.find-cell.found { animation: found 0.6s ease forwards; background: #ffb46e; }
@keyframes found {
  50% { transform: scale(1.25); }
  100% { transform: scale(1.1); }
}

/* Brighton Pier at sunset */
.brighton {
  position: relative;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 12px;
}
.brighton > * { position: absolute; }
.b-sky { inset: 0; background: linear-gradient(180deg, #e8577a 0%, #f97a45 35%, #ffb35c 58%); }
.b-sun {
  left: 18%; top: 44%;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #ff8a3c;
  box-shadow: 0 0 40px 16px rgba(255, 140, 60, 0.55);
}
.b-sea { left: 0; right: 0; top: 56%; bottom: 0; background: linear-gradient(180deg, #e8663a, #c9787c); }
.b-pier { right: 0; top: 30%; width: 82%; height: 34%; }
.b-beach {
  left: -5%; right: -5%; bottom: 0;
  height: 26%;
  background: radial-gradient(circle at 20% 30%, #a98a7a 2px, transparent 3px) 0 0 / 14px 12px,
              linear-gradient(180deg, #c99a80, #a77c68);  /* Brighton pebbles */
  border-radius: 50% 50% 0 0 / 20px 20px 0 0;
}
.b-sign { right: 8%; bottom: 14%; text-align: center; filter: brightness(0.8); }
.b-sign .board {
  background: #c98a4b; border: 3px solid #8b5a2b; border-radius: 6px;
  padding: 2px 10px; color: #fff6e8; font-size: 0.85rem; transform: rotate(3deg);
  font-family: "Segoe Script", "Bradley Hand", "Snell Roundhand", cursive;
}
.b-sign .post { width: 6px; height: 24px; background: #8b5a2b; margin: 0 auto; }
.b-couple { left: 34%; bottom: 8%; display: flex; align-items: flex-end; }
.b-goose { width: 60px; margin-right: -14px; transform: rotate(6deg); transform-origin: bottom; }
.b-octo  { width: 66px; transform: rotate(-6deg); transform-origin: bottom; }
.b-goose svg, .b-octo svg { width: 100%; height: auto; display: block; overflow: visible; }
.b-octo .hug-arm { opacity: 1; stroke-dashoffset: 0; }
.b-hearts {
  left: 38%; bottom: 46%;
  color: #ffe0c2;
  font-size: 1.1rem;
  letter-spacing: 6px;
  animation: floatUp 2.5s ease-in-out infinite;
}
@keyframes floatUp { 0%, 100% { transform: translateY(0); opacity: 0.6; } 50% { transform: translateY(-10px); opacity: 1; } }

/* ---------- 3. Incoming call ---------- */
.phone {
  background: linear-gradient(180deg, #3a2a2a 0%, #1f1717 100%);
  color: #fff;
  border-radius: 28px;
  padding: 30px 20px 26px;
  max-width: 320px;
  margin: 0 auto;
}
.caller-avatar {
  width: 110px; height: 110px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #ffcf9c;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.caller-avatar svg { width: 80%; height: auto; margin-top: 18px; }
.phone.ringing .caller-avatar { animation: ringPulse 1.2s ease-out infinite; }
@keyframes ringPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 180, 110, 0.7); }
  100% { box-shadow: 0 0 0 26px rgba(255, 180, 110, 0); }
}
.caller-name { font-size: 1.8rem; }
.call-type { opacity: 0.7; margin-top: 4px; }
.call-msg { min-height: 2.6em; margin: 16px 0 6px; color: #ffcf9c; font-size: 1.05rem; }
.call-msg.pop { animation: pop 0.4s ease; }
@keyframes pop { 0% { transform: scale(0.7); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.call-buttons { display: flex; justify-content: space-around; margin-top: 10px; }
.call-btn {
  border: none;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.call-btn span {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}
.call-btn.decline span { background: #ff3b30; }
.call-btn.accept span  { background: #34c759; }
.phone.ringing .call-btn.accept span { animation: wiggle 1s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

/* ---------- 4. Photo swipe ---------- */
.photo-pile {
  position: relative;
  height: 340px;
  max-width: 300px;
  margin: 0 auto;
}
.pile-bottom {
  position: absolute;
  inset: 30px 10px;
  border: 2px dashed #ffb46e;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--seal);
  font-size: 1.2rem;
}
.photo-card {
  position: absolute;
  inset: 10px 0;
  background: #fff;
  padding: 10px 10px 34px;   /* polaroid look */
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(90, 45, 12, 0.25);
  transform: rotate(var(--tilt));
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; display: block; pointer-events: none; }
.photo-card.placeholder {
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  background: linear-gradient(160deg, #ffe0bf, #ffb46e);
  border: 10px solid #fff;
  border-bottom-width: 34px;
  padding: 0;
}

/* ---------- 5. Tentacle massage ---------- */
.massage-scene {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.massage-scene > svg { width: 100%; height: auto; display: block; touch-action: none; cursor: grab; overflow: hidden; }
.massage-scene .eye-comfy { display: none; }
.massage-scene > svg.relaxed .eye-sore { display: none; }
.massage-scene > svg.relaxed .eye-comfy { display: inline; }
.ahh {
  position: absolute;
  top: 38%;
  color: var(--seal);
  font-style: italic;
  font-weight: bold;
  pointer-events: none;
  animation: ahhFloat 1.6s ease-out forwards;
}
@keyframes ahhFloat {
  0%   { opacity: 0; transform: translateY(0); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-50px); }
}
.comfy-bar {
  height: 18px;
  margin: 16px auto 8px;
  max-width: 360px;
  border-radius: 999px;
  background: #ffe3c4;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(90, 45, 12, 0.2);
}
.comfy-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffb46e, #ff7a3c, #e8590c);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.comfy-label { font-weight: bold; color: var(--seal); }

/* ---------- 6. Misty walk ---------- */
.mist-walk {
  --fog: 1;
  --gloom: 1;
  position: relative;
  height: 360px;
  border-radius: 12px;
  overflow: hidden;
  background: #9aa3ab;
}
.dv-scene { position: absolute; inset: -4%; transition: transform 0.75s ease; }
.dv-scene svg { width: 100%; height: 100%; display: block; }
.gloom {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #5f6772, #8d949c);
  opacity: calc(var(--gloom) * 0.8);
  transition: opacity 1s ease;
}
.fog {
  position: absolute; inset: -20%;
  opacity: var(--fog);
  transition: opacity 1s ease;
  pointer-events: none;
}
.fog1 {
  background: radial-gradient(ellipse at 30% 40%, rgba(236, 239, 243, 0.97), rgba(205, 211, 219, 0.93) 65%);
  animation: drift 9s ease-in-out infinite alternate;
}
.fog2 {
  background: radial-gradient(ellipse at 70% 60%, rgba(225, 229, 235, 0.8), rgba(190, 197, 206, 0.6) 70%);
  animation: drift 12s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translateX(-6%); }
  to   { transform: translateX(6%); }
}
.rain { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.mist-walk.raining .rain { opacity: 1; }
.drop {
  position: absolute;
  top: -10%;
  width: 2px; height: 18px;
  background: rgba(255, 255, 255, 0.55);
  transform: rotate(12deg);
  animation: fall 0.7s linear infinite;
}
@keyframes fall { to { top: 110%; margin-left: -30px; } }

.fp-view {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 100%;
  z-index: 5;
  transition: opacity 0.8s ease;
}
.mist-walk.stepping .fp-view { animation: walkBob 0.75s ease; }
@keyframes walkBob {
  30% { transform: translateY(8px) rotate(-1deg); }
  60% { transform: translateY(-4px) rotate(1deg); }
}

.walk-caption {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  max-width: 85%;
  background: rgba(255, 250, 243, 0.93);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 14px;
  z-index: 9;
  text-align: center;
}
.walk-caption.pop { animation: pop 0.4s ease; }

.kiss-octo {
  position: absolute;
  left: 50%; bottom: -10%;
  width: 46%;
  transform: translateX(-50%) scale(0.5);
  opacity: 0;
  z-index: 7;
  transition: all 1s ease;
}
.kiss-octo svg { width: 100%; height: auto; display: block; }
.mist-walk.turn .fp-view { opacity: 0; }
.mist-walk.turn .kiss-octo { opacity: 1; bottom: 6%; transform: translateX(-50%) scale(1); }
.mist-walk.kiss .kiss-octo { transform-origin: 50% 55%; transform: translateX(-50%) scale(2.3); transition: all 0.9s ease-in; }
.kiss-lips {
  position: absolute;
  left: 50%; top: 62%;
  font-size: 5rem;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  z-index: 8;
}
.mist-walk.kiss .kiss-lips { animation: kissPop 1.4s ease 0.7s forwards; }
@keyframes kissPop {
  0%   { transform: translate(-50%, -50%) scale(0);   opacity: 0; }
  40%  { transform: translate(-50%, -50%) scale(1.35); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}
.mist-walk.kiss::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(255, 150, 175, 0.55), transparent 70%);
  z-index: 7;
  animation: flash 1.4s ease 0.7s both;
}
@keyframes flash { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0.5; } }

.walk-controls { display: flex; justify-content: center; gap: 16px; margin-top: 14px; }
.walk-btn {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: none;
  background: #ffd2a3;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(90, 45, 12, 0.18);
}
.walk-btn:active { transform: scale(0.92); }

/* ---------- "Miss me": how much + toy box ---------- */
.miss-form { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 8px; }
.miss-input {
  width: 130px;
  padding: 12px;
  font-size: 1.6rem;
  text-align: center;
  border: 2px solid #ffc48a;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}
.miss-form .game-btn { margin: 0; }
.miss-reply { margin-top: 16px; font-size: 1.15rem; color: var(--seal); min-height: 1.5em; }

.toy-box {
  position: relative;
  height: 330px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.04) 0 2px, transparent 2px 22px),
    linear-gradient(180deg, #e3b07a, #c98f55);
  border: 10px solid #b37a42;
  box-shadow: inset 0 8px 18px rgba(80, 40, 10, 0.35);
  touch-action: none;
}
.box-item {
  position: absolute;
  font-size: clamp(2.4rem, 11vw, 3.3rem);
  line-height: 1;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  filter: drop-shadow(0 3px 3px rgba(60, 30, 5, 0.35));
  transition: opacity 0.3s, scale 0.3s;
}
.box-item.dragging { cursor: grabbing; scale: 1.15; }
.box-item.tossed { opacity: 0; scale: 0.4; }
.box-octo {
  position: absolute;
  width: 62px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 1;
}
.box-octo svg { width: 100%; height: auto; display: block; }
.box-octo.found { animation: found 0.8s ease forwards; z-index: 999; }

/* ---------- 7. Do Not Disturb ---------- */
.dnd-room {
  position: relative;
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.dnd-room > * { position: absolute; }
.dnd-wall { inset: 0; background: linear-gradient(180deg, #f6c9a4 0%, #ffe0c2 100%); }
.dnd-window {
  left: 8%; top: 10%;
  width: 22%; height: 26%;
  background: linear-gradient(180deg, #2f2b5c, #6a4c8c);
  border: 6px solid #fff3e6;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(90, 45, 12, 0.2);
}
.dnd-moon {
  position: absolute;
  right: 18%; top: 18%;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff1c9;
  box-shadow: 0 0 12px 4px rgba(255, 241, 201, 0.4);
}
.dnd-lamp {
  left: 38%; top: 0;
  width: 4px; height: 16%;
  background: #8b5a2b;
}
.dnd-lamp::after {
  content: "";
  position: absolute;
  left: -16px; bottom: -14px;
  width: 36px; height: 18px;
  background: #ffcf86;
  border-radius: 18px 18px 4px 4px;
  box-shadow: 0 10px 40px 18px rgba(255, 207, 134, 0.45);
}
.dnd-floor {
  left: 0; right: 0; bottom: 0;
  height: 28%;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 2px, transparent 2px 46px),
    linear-gradient(180deg, #d9a273, #c58a5c);
}
.dnd-goose {
  left: 2%; bottom: 10%;
  width: 56%;
  height: auto;
}
.dnd-blanket { opacity: 0; transition: opacity 0.8s ease; }
.dnd-goose.blanketed .dnd-blanket { opacity: 1; }
.dnd-collected {
  left: 4%; bottom: 3%;
  display: flex;
  gap: 4px;
  font-size: 1.6rem;
}
.dnd-kept { animation: pop 0.4s ease; }

.dnd-door {
  right: 6%; bottom: calc(28% + 6px);
  width: 28%; height: 60%;
  background: linear-gradient(90deg, #b9783f, #c98a4b);
  border: 4px solid #8b5a2b;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  z-index: 3;
}
.dnd-panel {
  position: absolute;
  left: 14%; right: 14%;
  border: 3px solid rgba(110, 60, 20, 0.35);
  border-radius: 4px;
}
.dnd-panel.top { top: 8%; height: 34%; }
.dnd-panel.bottom { top: 52%; height: 38%; }
.dnd-handle {
  position: absolute;
  left: 10%; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #f2c14e;
}
.dnd-sign {
  position: absolute;
  left: -6%; top: 54%;
  background: #fffaf3;
  color: var(--seal);
  font-size: 0.68rem;
  font-weight: bold;
  line-height: 1.15;
  padding: 4px 6px;
  border-radius: 4px;
  transform: rotate(-8deg);
  transform-origin: top left;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  transition: transform 0.6s ease;
}
.dnd-sign.flipped { animation: signFlip 0.8s ease; transform: rotate(4deg); }
@keyframes signFlip { 0% { transform: rotateY(0); } 50% { transform: rotateY(90deg); } 100% { transform: rotateY(0) rotate(4deg); } }

/* the gap under the door, with light from the hallway */
.dnd-gap {
  right: 6%; bottom: 28%;
  width: 28%; height: 6px;
  background: linear-gradient(90deg, #ffd27a, #fff1c9, #ffd27a);
  box-shadow: 0 0 14px 4px rgba(255, 210, 122, 0.5);
  z-index: 2;
}

.dnd-tentacle {
  right: 20%; bottom: calc(28% - 4px);
  width: 0; height: 12px;
  background: #dc2a20;
  border-radius: 999px;
  z-index: 2;
}
.dnd-tentacle.poke { animation: poke 1.6s ease-in-out; }
@keyframes poke {
  0%   { width: 0; }
  45%  { width: 26%; }
  65%  { width: 26%; }
  100% { width: 0; }
}

.dnd-item {
  right: 14%; bottom: calc(28% - 14px);
  border: none;
  background: none;
  padding: 0;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: right 0.9s ease, transform 0.3s ease, opacity 0.4s ease;
}
.dnd-item.in { right: 40%; }
.dnd-item.ready { animation: glow 1.4s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 180, 80, 0)); transform: scale(1); }
  50%      { filter: drop-shadow(0 0 10px rgba(255, 180, 80, 0.9)); transform: scale(1.08); }
}
.dnd-item.taken { opacity: 0; transform: scale(0.4) translate(-80px, -40px); }
.dnd-item.is-blanket {
  width: 46px; height: 30px;
  border-radius: 5px;
  background:
    repeating-linear-gradient(90deg, rgba(232, 89, 12, 0.5) 0 5px, transparent 5px 14px),
    repeating-linear-gradient(0deg, rgba(255, 197, 138, 0.8) 0 5px, transparent 5px 14px),
    #ff9a3c;
  box-shadow: 0 3px 0 #e8590c;
}

.dnd-note {
  top: 12px; left: 50%;
  transform: translateX(-50%);
  max-width: 80%;
  background: rgba(255, 250, 243, 0.92);
  color: var(--ink);
  font-style: italic;
  padding: 5px 12px;
  border-radius: 12px;
  text-align: center;
  opacity: 0;
  z-index: 5;
}
.dnd-note.show { animation: noteFade 3s ease forwards; }
@keyframes noteFade { 0% { opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0.0; } }

.dnd-message {
  left: 8%; right: 8%; top: 34%;
  background: rgba(255, 250, 243, 0.96);
  color: var(--seal);
  font-size: 1.15rem;
  padding: 14px 16px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(90, 45, 12, 0.2);
  z-index: 6;
  animation: pop 0.6s ease;
}

/* massage: tentacle tips you can grab */
.massage-scene .tip { fill: #e2401c; stroke: #fff3e6; stroke-width: 2; }
.massage-scene .tip.held { fill: #ff7a3c; stroke: #ffffff; stroke-width: 3; }

/* ---------- 8. Bedtime ---------- */
.tired-scene {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.tired-scene > svg { width: 100%; height: auto; display: block; touch-action: none; cursor: grab; }
.tg-blanket { opacity: 0; transition: opacity 1s ease 0.3s; }
.tired-scene.snuggled .tg-blanket { opacity: 1; }
.tired-scene.snuggled .tg-goose { transition: transform 0.8s ease; }
.tired-scene.snuggled > svg { cursor: default; }
.tired-caption {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  max-width: 85%;
  background: rgba(255, 250, 243, 0.93);
  color: var(--ink);
  padding: 5px 14px;
  border-radius: 14px;
  text-align: center;
  font-style: italic;
}
.tired-caption:empty { display: none; }
.tired-caption.pop { animation: pop 0.4s ease; }
.zzz {
  position: absolute;
  top: 40%;
  color: #fff8ef;
  font-weight: bold;
  font-size: 1.3rem;
  text-shadow: 0 1px 4px rgba(90, 45, 12, 0.4);
  opacity: 0;
  animation: zzz 2.4s ease-in-out infinite;
}
@keyframes zzz {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.7); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translate(18px, -50px) scale(1.2); }
}

/* bedtime: quick soft "cut" before the zoom */
.tired-scene.blink > svg { animation: blink 0.7s ease; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }
.tg-arm { transition: opacity 0.4s ease; }

/* ---------- 9. Food wheel ---------- */
.wheel-wrap {
  position: relative;
  width: min(320px, 100%);
  margin: 0 auto;
}
.wheel {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 4.2s cubic-bezier(0.15, 0.7, 0.2, 1);
  filter: drop-shadow(0 6px 12px rgba(90, 45, 12, 0.25));
}
.wheel text { font-family: "PingFang SC", "Microsoft YaHei", Georgia, sans-serif; }
.wheel-pointer {
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border: 14px solid transparent;
  border-top: 24px solid #5a2d0c;
  border-bottom: 0;
  z-index: 2;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}
.wheel-result { min-height: 3.6em; margin-top: 14px; }
.wheel-result small { display: block; opacity: 0.7; font-style: italic; }
.wheel-result strong { display: block; font-size: 1.6rem; color: var(--seal); margin-top: 2px; animation: pop 0.4s ease; }
.wheel-buttons .game-btn { margin-top: 8px; }

/* ---------- 10. deliverweee ---------- */
.drink-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.drink-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 2px solid #ffd2a3;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.drink-btn.picked { border-color: var(--seal); background: #fff1e0; }
.drink-icon { font-size: 1.6rem; }
.drink-note {
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border: 2px solid #ffd2a3;
  border-radius: 999px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.game-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.delivery-map {
  position: relative;
  height: 130px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 20% 30%, #cfe9c4 0 18px, transparent 19px),
    radial-gradient(circle at 70% 75%, #cfe9c4 0 22px, transparent 23px),
    #f3e6d3;
  overflow: hidden;
}
.road {
  position: absolute;
  left: 4%; right: 4%; top: 62%;
  height: 16px;
  background: #b9a48c;
  border-radius: 8px;
  background-image: repeating-linear-gradient(90deg, transparent 0 14px, #fff8ef 14px 24px);
  background-size: 100% 2px;
  background-repeat: repeat-x;
  background-position: 0 7px;
  background-color: #b9a48c;
}
.shop, .home { position: absolute; top: 34%; font-size: 1.8rem; }
.shop { left: 3%; }
.home { right: 3%; }
.rider {
  position: absolute;
  left: 6%; top: 8%;
  width: 70px;
  transition: left 2.2s ease-in-out;
  animation: ride 0.5s ease-in-out infinite;
}
.rider.arrived { animation: hop2 0.6s ease 3; }
@keyframes ride { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes hop2 { 50% { transform: translateY(-10px); } }
.rider-octo { position: relative; width: 52px; margin-left: 10px; z-index: 2; }
.rider-octo svg { width: 100%; height: auto; display: block; }
.rider-helmet {
  position: absolute;
  left: 13px; top: -4px;
  width: 46px; height: 22px;
  background: #ff7a00;
  border-radius: 24px 24px 4px 4px;
  border-bottom: 4px solid #e8590c;
  z-index: 3;
}
.rider-box {
  position: absolute;
  left: -14px; top: 8px;
  width: 30px; height: 28px;
  background: #ff9a3c;
  border: 2px solid #e8590c;
  border-radius: 5px;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.rider-scooter { position: absolute; left: 8px; bottom: -26px; font-size: 2.2rem; transform: scaleX(-1); z-index: 1; }
.delivery-steps {
  list-style: none;
  text-align: left;
  margin: 14px auto 0;
  max-width: 320px;
}
.delivery-steps li {
  padding: 6px 0 6px 30px;
  position: relative;
  opacity: 0.4;
  transition: opacity 0.4s ease;
}
.delivery-steps li::before {
  content: "";
  position: absolute;
  left: 6px; top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #ffb46e;
  transform: translateY(-50%);
}
.delivery-steps li.done { opacity: 1; }
.delivery-steps li.done::before { background: var(--seal); border-color: var(--seal); }

/* ---------- 11. Bonk the octopus ---------- */
.weapon-picker { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; }
.weapon-btn {
  min-width: 46px; height: 46px;
  border-radius: 12px;
  border: 2px solid #ffd2a3;
  background: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 8px;
}
.weapon-btn.pat { font-size: 1rem; font-family: inherit; color: var(--ink); }
.weapon-btn.picked { border-color: var(--seal); background: #fff1e0; }
.bonk-arena {
  position: relative;
  height: 330px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffe0c2 0%, #ffd2a3 70%, #e9b98a 70%, #d9a273 100%);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.bonk-octo {
  position: absolute;
  left: 50%; top: 22%;
  width: 46%;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
}
.bonk-octo svg { width: 100%; height: auto; display: block; }
.bonk-octo.ouch { animation: ouch 0.45s ease; }
@keyframes ouch {
  0%   { transform: translateX(-50%) scale(1, 1); }
  25%  { transform: translateX(-52%) scale(1.15, 0.8) rotate(-4deg); }
  55%  { transform: translateX(-48%) scale(0.92, 1.1) rotate(3deg); }
  100% { transform: translateX(-50%) scale(1, 1); }
}
.bonk-octo.happy { animation: happy 0.7s ease; }
@keyframes happy {
  30% { transform: translateX(-50%) translateY(-10px) scale(1.05); }
  60% { transform: translateX(-50%) translateY(0) scale(1); }
}
.bonk-plaster { position: absolute; font-size: 1.5rem; pointer-events: none; }
.bonk-bubble {
  position: absolute;
  top: 6%; left: 50%;
  transform: translateX(-50%);
  background: #fffaf3;
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 14px;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(90, 45, 12, 0.18);
  z-index: 4;
}
.bonk-bubble.pop { animation: pop 0.3s ease; }
.bonk-count { position: absolute; right: 10px; bottom: 8px; font-weight: bold; color: var(--seal); z-index: 4; }
.bonk-wing { position: absolute; left: -10px; bottom: -10px; width: 34%; z-index: 3; pointer-events: none; }
.bonk-wing svg { width: 100%; height: auto; display: block; }
.bonk-held {
  position: absolute;
  left: 18%; bottom: 22%;
  font-size: 2.6rem;
  transform: rotate(-20deg);
  z-index: 3;
  pointer-events: none;
}
.bonk-swing {
  position: absolute;
  font-size: 3rem;
  transform: translate(-50%, -50%) rotate(-60deg);
  animation: swing 0.35s ease-out forwards;
  z-index: 5;
  pointer-events: none;
}
@keyframes swing {
  0%   { transform: translate(-30%, -90%) rotate(-70deg); opacity: 1; }
  60%  { transform: translate(-50%, -50%) rotate(20deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(10deg); opacity: 0; }
}
.bonk-pow {
  position: absolute;
  font-size: 2rem;
  transform: translate(-50%, -50%) scale(0.4);
  animation: powPop 0.5s ease-out forwards;
  z-index: 6;
  pointer-events: none;
}
@keyframes powPop {
  40%  { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
.bonk-pat {
  position: absolute;
  left: 50%; top: 18%;
  font-size: 3rem;
  transform: translateX(-50%);
  animation: pat 0.8s ease forwards;
  z-index: 5;
  pointer-events: none;
}
@keyframes pat {
  0%, 50%, 100% { transform: translateX(-50%) translateY(0); }
  25%, 75%      { transform: translateX(-50%) translateY(10px); }
}
.bonk-heart {
  position: absolute;
  top: 30%;
  color: #ff5e3a;
  font-size: 1.4rem;
  opacity: 0;
  animation: ahhFloat 1.5s ease-out forwards;
  pointer-events: none;
}

/* ---------- 12. Calm down (worried / anxious) ---------- */
.game-btn.small { font-size: 0.85rem; padding: 8px 16px; }

/* stage 1: worry bubbles */
.worry-sea {
  position: relative;
  height: 270px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffd9b8 0%, #ffe9d4 45%, #8fd0e2 46%, #5db8d4 100%);
}
.worry-octo {
  position: absolute;
  left: 50%; bottom: -8px;
  width: 30%;
  transform: translateX(-50%);
}
.worry-octo svg { width: 100%; height: auto; display: block; }
.worry-octo.blow { animation: blow 0.6s ease; }
@keyframes blow {
  30% { transform: translateX(-50%) scale(1.12, 0.92); }
  60% { transform: translateX(-50%) scale(0.95, 1.06); }
}
.worry-hint {
  position: absolute;
  left: 0; right: 0; bottom: 6px;
  text-align: right;
  padding-right: 10px;
  font-size: 0.8rem;
  font-style: italic;
  color: #fff8ef;
  text-shadow: 0 1px 3px rgba(0, 60, 90, 0.5);
}
.worry-bubble {
  position: absolute;
  max-width: 46%;
  padding: 10px 14px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(255, 230, 210, 0.75) 60%, rgba(255, 190, 150, 0.55));
  box-shadow: 0 4px 14px rgba(90, 45, 12, 0.15), inset -4px -4px 10px rgba(255, 160, 110, 0.25);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  animation: floaty 3s ease-in-out infinite;
  word-break: break-word;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.worry-bubble.away { animation: floatAway 1.4s ease-in forwards; pointer-events: none; }
@keyframes floatAway {
  0%   { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translate(40px, -260px) scale(0.6); opacity: 0; }
}
.worry-form { display: flex; gap: 8px; margin-top: 12px; }
.worry-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 2px solid #ffd2a3;
  border-radius: 999px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.worry-form .game-btn { margin: 0; }

/* stage 2: untangle */
.untangle-scene { position: relative; border-radius: 12px; overflow: hidden; user-select: none; -webkit-user-select: none; }
.untangle-scene > svg { width: 100%; height: auto; display: block; touch-action: none; }
.ut-knot { transform-origin: 150px 175px; transition: opacity 0.5s ease, transform 0.5s ease; }
.ut-tip { fill: #e2401c; stroke: #fff3e6; stroke-width: 2; pointer-events: none; animation: tipPulse 1.4s ease-in-out infinite; }
.ut-tip.held { fill: #ff7a3c; animation: none; }
@keyframes tipPulse { 50% { stroke-width: 5; } }
.untangle-scene path.relaxed { transition: d 0.6s ease; }
.ut-bubble {
  position: absolute;
  top: 8px; right: 8px;
  max-width: 55%;
  background: #fffaf3;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 0.9rem;
  box-shadow: 0 3px 8px rgba(90, 45, 12, 0.15);
}
.ut-bubble.pop { animation: pop 0.35s ease; }
.untangle-scene.free > svg { animation: happy2 0.8s ease; }
@keyframes happy2 { 40% { transform: translateY(-6px); } }

/* stage 3: 5-4-3-2-1 */
.ground-prompt { margin-bottom: 10px; min-height: 2.6em; }
.ground-prompt strong { display: block; font-size: 1.2rem; color: var(--seal); }
.ground-dots { letter-spacing: 4px; color: var(--seal); }
.ground-beach {
  position: relative;
  height: 330px;
  border-radius: 12px;
  overflow: hidden;
}
.ground-beach > div { position: absolute; left: 0; right: 0; }
.gb-sky { top: 0; height: 32%; background: linear-gradient(180deg, #ffd0a8, #ffe9cf); }
.gb-sea { top: 32%; height: 20%; background: linear-gradient(180deg, #5db8d4, #8fd0e2); }
.gb-sand { top: 52%; bottom: 0; background: linear-gradient(180deg, #f8dcae, #efc283); border-radius: 50% 50% 0 0 / 18px 18px 0 0; box-shadow: 0 -5px 0 rgba(255,255,255,0.7); }
.gb-thing {
  position: absolute;
  border: none;
  background: none;
  font-size: clamp(1.6rem, 7vw, 2.1rem);
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.gb-thing:active { transform: scale(0.9); }
.gb-thing.got { background: rgba(255, 255, 255, 0.75); box-shadow: 0 0 0 3px var(--seal); animation: pop 0.35s ease; }
.ground-beach.done .gb-thing { animation: floaty 3s ease-in-out infinite; }
.ground-note { min-height: 1.6em; margin-top: 10px; font-style: italic; opacity: 0.85; }
.untangle-scene.free .ut-bubble { top: auto; bottom: 10px; right: 50%; transform: translateX(50%); max-width: 80%; text-align: center; }
