:root {
  --game-purple: #68429e;
  --game-purple-dark: #43245f;
  --game-pink: #f28ab9;
  --game-yellow: #ffd968;
  --game-blue: #8fd9ee;
  --game-cream: #fffaf3;
  --game-card: rgba(255, 255, 255, .94);
  --game-shadow: 0 18px 45px rgba(62, 33, 91, .16);
}

.game-page {
  min-height: 100vh;
  color: #3f2b53;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 220, 239, .9), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(201, 239, 255, .85), transparent 28rem),
    linear-gradient(180deg, #f7eaff 0, #fff8ec 42rem, #fffaf5 100%);
  font-family: "Nunito", system-ui, sans-serif;
  overflow-x: hidden;
}

.game-page::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  background-image:
    radial-gradient(circle, #fff 0 2px, transparent 3px),
    radial-gradient(circle, #f5c95e 0 1.5px, transparent 2.5px);
  background-position: 18px 24px, 72px 88px;
  background-size: 112px 112px, 147px 147px;
}

.game-page button { cursor: pointer; }
.game-page button:disabled { cursor: not-allowed; opacity: .55; }
.game-page h1, .game-page h2, .game-page strong { font-family: "Baloo 2", system-ui, sans-serif; }
.game-page h1, .game-page h2, .game-page p { margin-top: 0; }

.game-topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 9px max(18px, env(safe-area-inset-left)) 9px max(18px, env(safe-area-inset-right));
  color: #fff;
  background: rgba(83, 47, 119, .94);
  box-shadow: 0 8px 25px rgba(58, 27, 83, .18);
  backdrop-filter: blur(16px);
}

.game-back, .game-brand { color: inherit; text-decoration: none; }
.game-back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font-weight: 900; }
.game-back > span:first-child { font-size: 2rem; line-height: .7; }
.game-brand { display: inline-flex; align-items: center; gap: 9px; font: 800 1.25rem "Baloo 2", sans-serif; }
.game-brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 50%; background: #fff; box-shadow: 0 3px 12px rgba(33, 12, 48, .2); }
.game-top-stat { justify-self: end; min-width: 76px; min-height: 44px; border: 2px solid rgba(255,255,255,.45); border-radius: 999px; color: #fff; background: rgba(255,255,255,.13); font-weight: 900; }
.game-top-stat span { font-size: 1.05rem; }.game-top-stat small { margin-left: 2px; }

.game-main { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 95px; }

.game-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 30px;
  margin-bottom: 25px;
  padding: 0 10px;
}
.game-kicker { margin-bottom: 4px; color: #8a569e; font-size: .78rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.game-welcome h1 { margin-bottom: 8px; font-size: clamp(2.35rem, 5vw, 4.25rem); line-height: .95; letter-spacing: -.035em; }
.game-welcome h1 em { color: #a7539a; font-style: normal; }
.game-welcome > div > p:last-child { max-width: 700px; margin: 0; color: #6d5d79; font-size: 1.02rem; font-weight: 700; }
.game-total { min-width: 180px; padding: 15px 20px; border: 3px solid #fff; border-radius: 24px; text-align: center; background: linear-gradient(145deg, #fff8cf, #ffd8e9); box-shadow: var(--game-shadow); }
.game-total-star { display: block; color: #d59824; font-size: 1.5rem; line-height: 1; }
.game-total strong { display: block; color: #653d83; font-size: 1.35rem; }.game-total small { color: #795c84; font-weight: 800; }

.pet-dock {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  align-items: center;
  gap: 21px;
  margin-bottom: 27px;
  padding: 16px 20px;
  border: 3px solid #fff;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,238,247,.94));
  box-shadow: var(--game-shadow);
}
.pet-portrait-wrap { position: relative; width: 108px; aspect-ratio: 1; overflow: visible; border: 4px solid #fff; border-radius: 25px; background: #f9eafb; box-shadow: 0 10px 24px rgba(91, 53, 113, .16); }
.pet-portrait-wrap img { width: 100%; height: 100%; display: block; border-radius: 21px; object-fit: cover; }
.pet-stage-badge { position: absolute; right: -8px; bottom: -9px; max-width: 120px; padding: 5px 9px; border: 2px solid #fff; border-radius: 999px; color: #fff; background: #8054aa; font-size: .68rem; font-weight: 900; white-space: nowrap; }
.pet-dock-copy h2 { margin: 1px 0 3px; font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1; }
.pet-dock-copy > p:not(.game-kicker):not(.pet-next) { margin-bottom: 8px; color: #71617d; font-weight: 700; }
.pet-progress-row { display: grid; grid-template-columns: minmax(100px, 1fr) auto; align-items: center; gap: 12px; max-width: 570px; }
.pet-progress { height: 16px; overflow: hidden; border-radius: 999px; background: #eadbed; box-shadow: inset 0 2px 5px rgba(74, 42, 90, .12); }
.pet-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f386b8, #ffd260, #75cee5, #a177cf); transition: width .45s ease; }
.pet-progress-row strong { color: #70458e; font-size: 1rem; white-space: nowrap; }
.pet-next { margin: 3px 0 0; color: #8c6a91; font-size: .78rem; font-weight: 800; }
.pet-dock-actions { display: flex; flex-direction: column; gap: 9px; min-width: 190px; }

.game-button { min-height: 50px; border: 0; border-radius: 17px; padding: 10px 18px; font-weight: 900; transition: transform .18s, box-shadow .18s; }
.game-button:hover:not(:disabled) { transform: translateY(-2px); }
.game-button-primary { color: #fff; background: linear-gradient(135deg, #9a60c7, #d764a8); box-shadow: 0 9px 22px rgba(129, 67, 152, .25), inset 0 0 0 2px rgba(255,255,255,.2); }
.game-button-soft { color: #68467d; background: #f4eafa; box-shadow: inset 0 0 0 2px #e6d3ef; }

.game-view { scroll-margin-top: 90px; }
.game-view[hidden] { display: none !important; }
.game-section-heading { margin: 0 10px 13px; }
.game-section-heading h2, .collection-heading h2 { margin-bottom: 2px; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.game-section-heading > p:last-child, .collection-heading p { margin-bottom: 0; color: #74647e; font-weight: 700; }

.place-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.place-button { min-height: 105px; display: grid; grid-template-columns: 67px 1fr; grid-template-rows: 1fr 1fr; grid-template-areas: "icon title" "icon sub"; align-items: center; gap: 0 12px; border: 3px solid #fff; border-radius: 24px; padding: 11px 16px; color: #5d466d; text-align: left; background: rgba(255,255,255,.74); box-shadow: 0 8px 22px rgba(76, 43, 94, .1); }
.place-button img { grid-area: icon; width: 67px; height: 67px; border-radius: 17px; object-fit: cover; background: #fff; }
.place-button span { grid-area: title; align-self: end; font: 800 1.25rem "Baloo 2", sans-serif; }
.place-button small { grid-area: sub; align-self: start; color: #89768f; font-weight: 800; }
.place-button[aria-pressed="true"] { border-color: #ffdc75; background: linear-gradient(145deg, #fff9cf, #ffe2ef); box-shadow: 0 10px 25px rgba(137, 77, 142, .16), 0 0 0 3px rgba(255,210,94,.22); transform: translateY(-2px); }

.quest-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.quest-flow li { min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 12px; border: 2px solid rgba(255,255,255,.92); border-radius: 18px; color: #745083; background: rgba(255,255,255,.68); box-shadow: 0 6px 17px rgba(76,43,94,.08); }
.quest-flow span, .mission-finish-hint span { flex: 0 0 auto; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #9a60c7, #d764a8); font-size: .82rem; font-weight: 900; }
.quest-flow strong { font-size: .82rem; }

.quest-stage { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(330px, .78fr); align-items: start; gap: 22px; }
.quest-comic { position: relative; margin: 0; padding: 14px; border: 4px solid #fff; border-radius: 34px; background: linear-gradient(135deg, #ffe8f4, #e5f8ff); box-shadow: var(--game-shadow); }
.quest-comic > img { width: 100%; height: auto; max-height: 78vh; display: block; margin: 0 auto; border-radius: 23px; object-fit: contain; background: #fffaf4; }
.comic-ribbon { position: absolute; z-index: 2; top: 23px; left: 23px; padding: 7px 12px; border: 2px solid rgba(255,255,255,.95); border-radius: 999px; color: #67407d; background: rgba(255,255,255,.93); box-shadow: 0 4px 12px rgba(63, 31, 79, .12); font-size: .72rem; font-weight: 900; }
.comic-zoom { position: absolute; z-index: 2; right: 23px; bottom: 23px; min-height: 42px; border: 2px solid #fff; border-radius: 999px; padding: 7px 13px; color: #fff; background: rgba(75, 43, 94, .84); font-weight: 900; }

.mission-card { position: sticky; top: 89px; padding: 25px; border: 3px solid #fff; border-radius: 30px; background: var(--game-card); box-shadow: var(--game-shadow); }
.mission-step { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #9461a4; font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.mission-step span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #8d5ab3; font-size: .85rem; }
.mission-card > h2 { margin-bottom: 15px; font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.08; }
.mission-help { margin:0 0 13px; padding:10px 12px; border:1px solid #e8c9d9; border-radius:15px; color:#704d7d; background:#fff2f8; }
.mission-help summary { cursor:pointer; font-size:.82rem; font-weight:900; }
.mission-help p { margin:8px 0 0; color:#704d7d; font-size:.86rem; font-weight:750; line-height:1.4; }
.mission-reward { display: grid; grid-template-columns: 55px 1fr; align-items: center; gap: 10px; margin-bottom: 17px; padding: 9px 11px; border: 2px dashed #e8c970; border-radius: 17px; background: #fffbed; }
.mission-reward img { width: 55px; height: 55px; border-radius: 14px; object-fit: cover; background: #fff; }
.mission-reward p { margin: 0; }.mission-reward strong, .mission-reward span { display: block; }.mission-reward strong { color: #6f4b7f; font-size: .85rem; }.mission-reward span { color: #8b778c; font-size: .78rem; font-weight: 800; }
.mission-reaction { margin: 0 0 15px; padding: 11px 12px; border: 1px solid #ded0e7; border-radius: 17px; background: #fbf6fe; }
.mission-reaction-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 9px; color: #6f4b7f; font-size: .82rem; font-weight: 900; }
.mission-reaction-title span { color: #9881a2; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.mission-reaction-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mission-reaction-button { min-height: 44px; padding: 8px 11px; font-size: .82rem; }
.mission-reaction-button[aria-pressed="true"] { color: #fff; background: linear-gradient(135deg, #8d5ab3, #d764a8); box-shadow: 0 8px 18px rgba(129, 67, 152, .22), inset 0 0 0 2px rgba(255,255,255,.24); transform: translateY(-1px); }
.mission-finish-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; color: #765184; font-size: .78rem; font-weight: 900; }
.mission-actions { display: grid; gap: 9px; }
.complete-button { min-height: 61px; font-size: 1.05rem; }
.quest-complete-dock { display: none; }

.quest-progress-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr); gap: 15px 30px; align-items: center; margin-top: 23px; padding: 24px; border: 3px solid #fff; border-radius: 29px; background: rgba(255,255,255,.85); box-shadow: var(--game-shadow); }
.quest-progress-card h2 { margin: 0; font-size: 1.45rem; }
.quest-progress-meter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 11px; }
.quest-progress-track { height: 18px; overflow: hidden; border-radius: 999px; background: #eadfed; }
.quest-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f489bd, #ffd66d, #75d1e7, #9b6bcb); }
.quest-progress-meter strong { color: #72508a; white-space: nowrap; }
.milestone-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.milestone { min-height: 42px; display: grid; place-items: center; border-radius: 13px; color: #9b88a2; background: #f0e8f2; font-size: .75rem; font-weight: 900; }
.milestone.unlocked { color: #69417d; background: linear-gradient(135deg, #fff1a8, #ffcfe6); box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }

.collection-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 8px 19px; }
.collection-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.daily-care-card { display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-bottom: 16px; padding: 16px 20px; border: 3px solid #fff; border-radius: 26px; background: linear-gradient(135deg, #fff8d7, #ffe5f1); box-shadow: var(--game-shadow); }
.daily-care-card > img { width: 78px; height: 78px; border-radius: 20px; object-fit: cover; background: #fff; }
.daily-care-card strong { display: block; color: #6d4682; font-size: 1.25rem; }.daily-care-card p { margin: 1px 0 0; color: #7c6a83; font-size: .87rem; font-weight: 700; }
.daily-slots { display: flex; gap: 8px; }
.daily-slot { width: 54px; height: 54px; overflow: hidden; border: 3px dashed #caa9d5; border-radius: 16px; background: rgba(255,255,255,.55); }
.daily-slot img { width: 100%; height: 100%; display: block; object-fit: cover; }
.collection-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.collection-summary span { padding: 14px; border: 3px solid #fff; border-radius: 20px; text-align: center; background: rgba(255,255,255,.82); box-shadow: 0 7px 20px rgba(76, 43, 94, .08); }
.collection-summary strong, .collection-summary small { display: block; }.collection-summary strong { color: #6c4584; font-size: 1.45rem; }.collection-summary small { color: #806f86; font-weight: 800; }

.nursery-grid-new { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.nursery-card-new { min-width: 0; overflow: hidden; border: 3px solid #fff; border-radius: 22px; padding: 8px; color: #60466e; text-align: left; background: rgba(255,255,255,.82); box-shadow: 0 8px 20px rgba(71, 39, 87, .1); }
.nursery-card-new > span:first-child { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 15px; background: #f3e9f4; }
.nursery-card-new img { width: 100%; height: 100%; display: block; object-fit: cover; filter: grayscale(1) brightness(.62); }
.nursery-card-new.known img { filter: none; }
.nursery-card-new.rare { border-color: #d8a4e9; }
.nursery-card-new.mythical { border-color: #91d8ef; background: linear-gradient(145deg,#f5fcff,#f8efff); }
.nursery-card-new.legendary { border-color: #ffd777; background: linear-gradient(130deg,#fff9cf,#ffe8f7,#e2f8ff); box-shadow: 0 0 0 3px rgba(255,197,87,.18), 0 12px 28px rgba(184,80,174,.18); }
.nursery-card-new.active { border-color: #ffcf57; box-shadow: 0 0 0 3px rgba(255,204,76,.26), 0 10px 25px rgba(91, 50, 113, .17); }
.nursery-card-new.grown { background: linear-gradient(145deg, #fff9d2, #ffe5f2); }
.nursery-card-new strong, .nursery-card-new small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nursery-card-new strong { margin: 7px 3px 0; font-size: .78rem; }.nursery-card-new small { margin: 1px 3px 2px; color: #8d7c92; font-size: .66rem; font-weight: 800; }
.nursery-card-new.locked { cursor: default; }.nursery-card-new.locked strong { color: #988b9c; }
.nursery-card-new .card-status { position: absolute; right: 6px; top: 6px; padding: 3px 7px; border-radius: 999px; color: #fff; background: rgba(89,54,108,.84); font-size: .56rem; font-weight: 900; }
.grownup-tools { margin-top: 18px; border: 3px solid #fff; border-radius: 22px; padding: 14px 18px; background: rgba(255,255,255,.75); }
.grownup-tools summary { cursor: pointer; color: #6c4a7f; font-weight: 900; }.grownup-tools p { margin: 9px 0; color: #7a6b80; font-size: .86rem; }.grownup-tools > div { display: flex; flex-wrap: wrap; gap: 9px; }

.game-bottom-nav { display: none; }

.reward-dialog, .code-dialog, .comic-dialog { border: 0; border-radius: 30px; color: #443050; background: #fffaf5; box-shadow: 0 28px 80px rgba(45, 19, 65, .38); }
.reward-dialog::backdrop, .code-dialog::backdrop, .comic-dialog::backdrop { background: rgba(46, 23, 61, .7); backdrop-filter: blur(5px); }
.reward-dialog { width: min(430px, calc(100% - 28px)); padding: 29px; text-align: center; }
.reward-dialog img { width: min(220px, 62vw); aspect-ratio: 1; border: 4px solid #fff; border-radius: 28px; object-fit: cover; background: #f6eaf7; box-shadow: 0 12px 28px rgba(72, 37, 92, .18); }
.reward-dialog h2 { margin: 5px 0; font-size: 2rem; }.reward-dialog p:not(.game-kicker) { color: #76657c; font-weight: 700; }.reward-stars { color: #e7b63d; font-size: 1.3rem; }
.code-dialog { width: min(520px, calc(100% - 28px)); padding: 28px; }
.code-dialog h2 { margin-bottom: 5px; }.code-dialog p { color: #77657e; font-weight: 700; }
.code-dialog textarea { width: 100%; resize: vertical; border: 3px solid #e8d7ed; border-radius: 16px; padding: 12px; color: #543b63; background: #fff; font: 700 .82rem/1.4 ui-monospace, monospace; }
.dialog-x { position: absolute; top: 11px; right: 12px; width: 42px; height: 42px; border: 0; border-radius: 50%; color: #644478; background: #f1e5f5; font-size: 1.55rem; font-weight: 900; }
.comic-dialog { width: min(720px, calc(100% - 20px)); max-height: calc(100vh - 20px); padding: 12px; }
.comic-dialog img { width: 100%; max-height: calc(100vh - 44px); display: block; object-fit: contain; border-radius: 20px; background: #fff; }

.game-toast { position: fixed; z-index: 100; left: 50%; bottom: max(25px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 28px); padding: 12px 18px; border: 3px solid #fff; border-radius: 999px; color: #fff; background: #67428a; box-shadow: 0 13px 35px rgba(47,22,65,.3); opacity: 0; pointer-events: none; transform: translate(-50%, 22px); transition: .25s ease; }
.game-toast.show { opacity: 1; transform: translate(-50%, 0); }.game-toast span { color: #ffe582; }.game-toast strong { font-family: "Nunito", sans-serif; white-space: nowrap; }
.game-confetti { position: fixed; z-index: 90; inset: 0; pointer-events: none; overflow: hidden; }
.confetti-piece { position: absolute; top: -20px; width: 11px; height: 17px; border-radius: 4px; animation: gameConfetti 1.7s ease-in forwards; }
@keyframes gameConfetti { to { transform: translate(var(--drift), 105vh) rotate(540deg); opacity: .1; } }

@media (max-width: 900px) {
  .game-main { width: min(100% - 24px, 760px); padding-top: 28px; }
  .pet-dock { grid-template-columns: 96px minmax(0, 1fr); }.pet-portrait-wrap { width: 91px; }.pet-dock-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .quest-stage { grid-template-columns: 1fr; }.mission-card { position: static; }
  .quest-comic > img { max-height: none; }
  .nursery-grid-new { grid-template-columns: repeat(5, minmax(0,1fr)); }
}

@media (max-width: 650px) {
  .game-topbar { min-height: 62px; padding-top: max(7px, env(safe-area-inset-top)); grid-template-columns: 66px 1fr 66px; }
  .game-back > span:last-child { display: none; }.game-back > span:first-child { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.12); }
  .game-brand { justify-self: center; font-size: 1rem; white-space: nowrap; }.game-brand img { width: 36px; height: 36px; }.game-top-stat { min-width: 62px; min-height: 41px; padding: 4px 7px; }
  .game-main { width: min(100% - 18px, 560px); padding: 24px 0 calc(174px + env(safe-area-inset-bottom)); }
  .game-welcome { grid-template-columns: 1fr; gap: 13px; margin-bottom: 18px; padding: 0 7px; }.game-welcome h1 { font-size: clamp(2.15rem, 11vw, 3.25rem); }.game-welcome > div > p:last-child { font-size: .9rem; }.game-total { min-width: 0; display: grid; grid-template-columns: auto auto 1fr; align-items: center; justify-content: start; gap: 8px; padding: 11px 15px; text-align: left; }.game-total-star { display: inline; }.game-total strong { font-size: 1.12rem; }.game-total small { font-size: .76rem; }
  .pet-dock { grid-template-columns: 80px minmax(0, 1fr); gap: 12px; margin-bottom: 20px; padding: 12px; border-radius: 24px; }.pet-portrait-wrap { width: 77px; }.pet-dock-copy h2 { font-size: 1.35rem; }.pet-dock-copy > p:not(.game-kicker):not(.pet-next) { display: none; }.pet-progress-row { gap: 7px; }.pet-progress { height: 13px; }.pet-progress-row strong { font-size: .78rem; }.pet-next { font-size: .68rem; }.pet-dock-actions { gap: 7px; }.pet-dock-actions .game-button { min-height: 47px; padding-inline: 9px; font-size: .78rem; }
  .game-section-heading { margin-inline: 7px; }.game-section-heading h2, .collection-heading h2 { font-size: 1.75rem; }
  .place-picker { gap: 7px; }.place-button { min-height: 100px; display: flex; flex-direction: column; justify-content: center; gap: 2px; border-radius: 20px; padding: 8px 5px; text-align: center; }.place-button img { width: 51px; height: 51px; border-radius: 14px; }.place-button span { font-size: 1rem; line-height: 1; }.place-button small { font-size: .65rem; }
  .quest-flow { gap: 5px; margin-bottom: 12px; }.quest-flow li { min-height: 68px; flex-direction: column; gap: 3px; padding: 7px 3px; text-align: center; }.quest-flow span { width: 25px; height: 25px; font-size: .72rem; }.quest-flow strong { font-size: .68rem; line-height: 1.1; }
  .quest-stage { gap: 12px; }.quest-comic { padding: 9px; border-radius: 25px; }.quest-comic > img { border-radius: 18px; }.comic-ribbon { top: 15px; left: 15px; padding: 5px 8px; font-size: .6rem; }.comic-zoom { right: 15px; bottom: 15px; min-height: 39px; font-size: .72rem; }
  .mission-card { padding: 19px 16px; border-radius: 25px; }.mission-card > h2 { font-size: 1.55rem; }.mission-reaction-buttons { grid-template-columns: 1fr; }.complete-button { min-height: 58px; }
  .quest-progress-card { grid-template-columns: 1fr; gap: 12px; padding: 17px; border-radius: 24px; }.milestone-row { grid-column: 1; gap: 5px; }.milestone { min-height: 36px; font-size: .65rem; }
  .collection-heading { align-items: stretch; flex-direction: column; margin-inline: 6px; }.collection-heading-actions { display: grid; grid-template-columns: 1fr; } .collection-heading .game-button { width: 100%; }
  .daily-care-card { grid-template-columns: 58px 1fr; padding: 12px; border-radius: 22px; }.daily-care-card > img { width: 58px; height: 58px; }.daily-care-card strong { font-size: 1rem; }.daily-care-card p { font-size: .72rem; }.daily-slots { grid-column: 1 / -1; justify-content: center; }.daily-slot { width: 58px; height: 58px; }
  .collection-summary { gap: 6px; }.collection-summary span { padding: 10px 4px; border-radius: 16px; }.collection-summary strong { font-size: 1.2rem; }.collection-summary small { font-size: .66rem; }
  .nursery-grid-new { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }.nursery-card-new { border-radius: 17px; padding: 6px; }.nursery-card-new > span:first-child { border-radius: 12px; }.nursery-card-new strong { font-size: .68rem; }.nursery-card-new small { font-size: .59rem; }
  .game-bottom-nav { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: 1fr 1fr; padding: 7px max(12px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border-top: 2px solid rgba(255,255,255,.7); background: rgba(255,250,246,.94); box-shadow: 0 -9px 30px rgba(59,31,78,.14); backdrop-filter: blur(15px); }
  .quest-complete-dock { position: fixed; z-index: 62; left: 50%; bottom: calc(73px + env(safe-area-inset-bottom)); width: min(calc(100% - 18px), 560px); display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; padding: 8px; border: 2px solid rgba(255,255,255,.9); border-radius: 22px; color: #704980; background: rgba(255,250,246,.96); box-shadow: 0 -6px 25px rgba(65,32,82,.2); backdrop-filter: blur(15px); transform: translateX(-50%); }
  .quest-complete-dock[hidden] { display: none !important; }
  .quest-complete-dock > span { padding-left: 7px; font-size: .7rem; font-weight: 900; white-space: nowrap; }
  .quest-complete-dock .complete-button { min-height: 56px; padding: 8px 11px; font-size: .88rem; }
  .game-bottom-nav button { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 17px; color: #826f88; background: transparent; font-size: .72rem; font-weight: 900; }.game-bottom-nav img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }.game-bottom-nav button.active { color: #673f80; background: linear-gradient(135deg, #fff3b8, #ffdbea); }
  .game-toast { bottom: calc(154px + env(safe-area-inset-bottom)); }
}

@media (max-width: 370px) {
  .game-brand span { display: none; }.game-topbar { grid-template-columns: 1fr auto 1fr; }
  .pet-dock-actions { grid-template-columns: 1fr; }
  .quest-complete-dock { grid-template-columns: 1fr; }.quest-complete-dock > span { display: none; }
  .place-button img { width: 45px; height: 45px; }.place-button small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .game-page *, .game-page *::before, .game-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Farm navigation and variable quest rewards. */
.game-button { display:inline-flex; align-items:center; justify-content:center; text-align:center; text-decoration:none; }
.mission-reward { grid-template-columns:55px minmax(0,1fr) auto; }
.mission-reward-badge { min-width:54px; padding:9px 8px; border:2px solid #fff; border-radius:15px; color:#fff; background:linear-gradient(135deg,#dd8d2f,#e95f9d); box-shadow:0 6px 15px rgba(175,99,45,.2); font-size:.92rem; text-align:center; }
@media (max-width:900px){.pet-dock-actions{grid-template-columns:repeat(3,1fr)}}
@media (max-width:650px){.game-bottom-nav{grid-template-columns:repeat(3,1fr)}.game-bottom-nav button,.game-bottom-nav a{min-height:56px;display:flex;align-items:center;justify-content:center;gap:5px;border:0;border-radius:17px;color:#826f88;background:transparent;font-size:.68rem;font-weight:900;text-decoration:none}.game-bottom-nav button.active,.game-bottom-nav a.active{color:#673f80;background:linear-gradient(135deg,#fff3b8,#ffdbea)}.game-bottom-nav img{width:36px;height:36px}.pet-dock-actions{grid-template-columns:1fr 1fr}.pet-dock-actions .game-button:first-child{grid-column:1/-1}.mission-reward{grid-template-columns:48px minmax(0,1fr) auto}.mission-reward img{width:48px;height:48px}.mission-reward-badge{min-width:48px;padding-inline:6px}}
@media (max-width:370px){.pet-dock-actions{grid-template-columns:1fr}.pet-dock-actions .game-button:first-child{grid-column:auto}.game-bottom-nav button,.game-bottom-nav a{flex-direction:column;gap:0}.game-bottom-nav img{width:32px;height:32px}}

/* Structured mission metadata and adult eligibility controls. */
.mission-hook { margin:0 0 8px; color:#8b5b91; font-size:.9rem; font-weight:800; }
.mission-objective { margin:0 0 13px; color:#574461; font-size:1rem; font-weight:800; line-height:1.45; }
.mission-setup { margin:10px 0 13px; padding:10px 12px; border-radius:13px; color:#5e5265; background:#f4f0ff; font-size:.85rem; line-height:1.4; }
.mission-setup strong { color:#68467d; }
.mission-steps { display:grid; gap:7px; margin:12px 0; padding-left:1.45rem; color:#574461; }
.mission-steps li { padding-left:4px; line-height:1.35; }
.mission-completion { margin:12px 0; padding:10px 12px; border-left:4px solid #e69a43; border-radius:10px; color:#654663; background:#fff7df; font-size:.82rem; font-weight:850; }
.mission-extra { margin:0 0 13px; padding:9px 11px; border:1px dashed #cda8dd; border-radius:13px; color:#68467d; background:#fbf6fd; }
.mission-extra summary { cursor:pointer; font-size:.78rem; font-weight:900; }
.mission-extra p { margin:7px 0 0; font-size:.8rem; line-height:1.35; }
.mission-settings > small { flex:1 1 100%; color:#7a6783; line-height:1.35; }
.mission-settings { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; margin:14px 0; padding:14px; border:2px solid #eadcef; border-radius:18px; }
.mission-settings legend { padding:0 7px; color:#68467d; font-weight:900; }
.mission-settings label { display:flex; align-items:center; gap:7px; color:#6f5c79; font-weight:800; }
.mission-settings select { min-height:42px; padding:6px 32px 6px 10px; border:2px solid #dfcde9; border-radius:12px; color:#523763; background:#fff; font:inherit; font-weight:900; }
.mission-settings-summary { padding:10px 12px; border-radius:14px; color:#68467d !important; background:#f8f0fb; font-size:.82rem; }
@media (max-width:650px){.mission-settings{align-items:stretch}.mission-settings label{justify-content:space-between;flex:1 1 130px}}

.mission-interaction { margin:0 0 13px; padding:12px 13px; border:1px solid #9fd9ca; border-radius:15px; color:#285f59; background:linear-gradient(135deg,#effbf6,#f7fffc); }
.mission-interaction h3 { margin:0; font-size:.86rem; font-weight:950; }
.mission-interaction p { margin:8px 0 0; font-size:.82rem; line-height:1.4; font-weight:750; }
.mission-interaction .mission-solo { padding-top:8px; border-top:1px dashed #afdacf; color:#496c68; }
