:root {
  color-scheme: light;
  --ink: #26233f;
  --muted: #746f8c;
  --purple: #6658d3;
  --purple-deep: #4f42b5;
  --purple-soft: #edeafe;
  --yellow: #ffc95c;
  --green: #49b979;
  --green-soft: #e1f7e9;
  --coral: #f37a75;
  --canvas: #f7f7fc;
  --card: #ffffff;
  --line: #e9e7f2;
  --shadow: 0 18px 50px rgba(62, 49, 122, 0.12);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 4%, rgba(223, 213, 255, 0.65), transparent 25rem),
    linear-gradient(180deg, #fafaff 0%, var(--canvas) 56%, #f4f8fb 100%);
}

button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(102, 88, 211, 0.35); outline-offset: 2px; }

.app-shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 54px; }

.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; font-weight: 800; text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--purple), #8d7dea); box-shadow: 0 8px 16px rgba(102, 88, 211, 0.24); }
.parent-entry, .secondary-button, .primary-button, .text-button, .task-action, .reward-action, .review-action, .icon-button { border: 0; transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.parent-entry { min-height: 44px; padding: 10px 14px; border-radius: 12px; background: #fff; color: var(--purple-deep); box-shadow: 0 6px 18px rgba(47, 35, 99, 0.08); font-weight: 750; }
.parent-entry:hover, .secondary-button:hover, .primary-button:hover, .task-action:hover, .reward-action:hover, .review-action:hover { transform: translateY(-2px); }
.parent-entry span { margin-left: 3px; }

.hero-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr); gap: 30px; min-height: 320px; padding: 34px 38px; overflow: hidden; border-radius: 30px; color: #fff; background: linear-gradient(118deg, #5f50c7 0%, #7867db 52%, #a491ee 100%); box-shadow: 0 22px 44px rgba(92, 72, 183, 0.22); }
.hero-card::after { content: ""; position: absolute; inset: auto -100px -170px auto; width: 410px; height: 410px; border-radius: 50%; background: rgba(255,255,255,0.08); }
.hero-copy { position: relative; z-index: 2; align-self: center; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: inherit; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.76; }
.hero-card h1, .parent-header h1 { max-width: 540px; margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.18; letter-spacing: -0.045em; }
.hero-description { max-width: 440px; margin: 16px 0 24px; color: rgba(255,255,255,0.86); font-size: 15px; line-height: 1.8; }
.hero-metrics { display: flex; flex-wrap: wrap; gap: 10px; }
.metric-pill { display: flex; align-items: center; gap: 7px; min-width: 121px; padding: 10px 13px; border: 1px solid rgba(255,255,255,0.16); border-radius: 15px; background: rgba(38, 29, 99, 0.23); backdrop-filter: blur(8px); }
.metric-pill span { font-size: 18px; }
.metric-pill strong { font-size: 18px; }
.metric-pill small { color: rgba(255,255,255,0.72); font-size: 11px; }
.metric-pill--sun span { color: var(--yellow); }
.metric-pill--streak span { color: #ffb78e; }

.island-scene { position: relative; min-height: 254px; overflow: hidden; border: 1px solid rgba(255,255,255,0.2); border-radius: 24px; background: linear-gradient(180deg, #9281e7 0%, #a9ddf1 58%, #72c7a0 59%, #60ae86 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18); }
.cloud { position: absolute; width: 70px; height: 20px; border-radius: 30px; background: rgba(255,255,255,0.62); filter: blur(1px); }
.cloud::before, .cloud::after { content: ""; position: absolute; bottom: 5px; width: 30px; height: 30px; border-radius: 50%; background: inherit; }
.cloud::before { left: 14px; } .cloud::after { left: 33px; width: 36px; height: 36px; }
.cloud--one { top: 38px; left: 25px; transform: scale(0.62); }
.cloud--two { top: 72px; right: 26px; transform: scale(0.48); opacity: 0.8; }
.moon { position: absolute; top: 22px; right: 42px; color: #fff9c8; font-size: 25px; text-shadow: 0 0 18px rgba(255,255,255,0.9); }
.island-glow { position: absolute; right: 5%; bottom: 22%; width: 160px; height: 46px; border-radius: 50%; background: rgba(255, 236, 161, 0.25); filter: blur(18px); }
.island-ground { position: absolute; right: 8%; bottom: 25px; width: 280px; height: 138px; border-radius: 48% 52% 42% 58% / 38% 50% 50% 62%; background: linear-gradient(155deg, #91d97d 0%, #60bf70 45%, #3d9d64 100%); box-shadow: inset 0 -15px 0 rgba(36, 121, 78, 0.16), 0 16px 20px rgba(40, 88, 113, 0.22); transform: rotate(-2deg); }
.island-path { position: absolute; top: 50px; left: 56px; width: 160px; height: 28px; border: 8px solid #f4d99c; border-right-color: transparent; border-bottom-color: transparent; border-radius: 50%; transform: rotate(14deg); opacity: 0.8; }
.island-tree { position: absolute; color: #267c55; font-size: 39px; text-shadow: 0 6px 0 #4eaf6b; }
.tree--one { left: 26px; top: 51px; } .tree--two { right: 34px; top: 34px; font-size: 30px; }
.island-building { position: absolute; display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px 13px 9px 9px; color: #fff; font-size: 25px; box-shadow: 0 7px 0 rgba(31, 109, 74, 0.2); }
.building--home { top: 48px; left: 111px; background: #f58b7a; }
.building--garden { right: 45px; bottom: 27px; background: #ffc95c; }
.building--tower { top: 27px; right: 84px; background: #796ad7; opacity: 0.2; }
.building--lighthouse { bottom: 52px; left: 41px; background: #fff0aa; color: #d76f5e; opacity: 0.15; }
.island-scene.stage-0 .building--home, .island-scene.stage-0 .building--garden { opacity: 0.18; }
.island-scene.stage-1 .building--garden { opacity: 0.18; }
.island-scene.stage-2 .building--tower { opacity: 1; }
.island-scene.stage-3 .building--lighthouse, .island-scene.stage-4 .building--lighthouse { opacity: 1; }
.island-caption { position: absolute; left: 20px; bottom: 18px; z-index: 2; display: grid; gap: 3px; max-width: 180px; }
.island-caption span { color: #fff; font-size: 16px; font-weight: 850; text-shadow: 0 2px 6px rgba(35,72,88,0.2); }
.island-caption small { color: rgba(255,255,255,0.8); font-size: 11px; line-height: 1.5; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr); gap: 20px; margin-top: 20px; }
.side-column { display: grid; gap: 20px; align-content: start; }
.panel { padding: 25px; border: 1px solid rgba(225, 222, 241, 0.9); border-radius: 24px; background: rgba(255,255,255,0.88); box-shadow: 0 12px 30px rgba(54, 40, 108, 0.06); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; color: var(--ink); font-size: 20px; letter-spacing: -0.03em; }
.section-kicker { color: var(--purple); opacity: 1; }
.section-heading--compact h2 { font-size: 17px; }
.progress-ring { display: grid; width: 60px; height: 60px; place-items: center; border-radius: 50%; color: var(--purple-deep); background: conic-gradient(var(--purple) 0deg, var(--purple-soft) 0deg); position: relative; transition: background 300ms ease; }
.progress-ring::after { content: ""; position: absolute; width: 48px; height: 48px; border-radius: 50%; background: #fff; }
.progress-ring span { position: relative; z-index: 1; font-size: 12px; font-weight: 850; }
.task-list, .reward-list, .review-list, .activity-list, .settings-list { display: grid; gap: 10px; }
.task-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: #fff; transition: border 180ms ease, background 180ms ease, transform 180ms ease; }
.task-card:hover { transform: translateX(2px); border-color: #d8d1fb; }
.task-card.is-pending { border-color: #f2d28a; background: #fffaf0; }
.task-card.is-approved { border-color: #bde9c9; background: #f4fff7; }
.task-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; background: var(--purple-soft); font-size: 23px; }
.task-card.is-pending .task-icon { background: #fff0c9; }
.task-card.is-approved .task-icon { background: var(--green-soft); }
.task-name { margin: 0; font-size: 15px; font-weight: 800; }
.task-status { display: inline-block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.task-card.is-approved .task-status { color: #318153; }
.task-card.is-pending .task-status { color: #9d7118; }
.task-points { color: #a16e0c; font-size: 12px; font-weight: 850; white-space: nowrap; }
.task-action, .reward-action, .review-action { min-height: 44px; padding: 8px 10px; border-radius: 10px; color: #fff; background: var(--purple); font-size: 12px; font-weight: 800; white-space: nowrap; }
.task-action[disabled], .reward-action[disabled] { cursor: not-allowed; opacity: 0.56; transform: none; }
.task-card.is-pending .task-action { color: #8e6716; background: #ffecbc; }
.task-card.is-approved .task-action { color: #267248; background: #d7f3df; }
.helper-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.week-day { display: grid; min-height: 64px; place-items: center; gap: 4px; padding: 7px 2px; border-radius: 14px; background: #f5f4fb; color: var(--muted); }
.week-day strong { color: inherit; font-size: 11px; }
.week-day span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #e2dfef; color: transparent; font-size: 12px; }
.week-day.is-complete { color: #267b50; background: #effbf3; }
.week-day.is-complete span { color: #fff; background: var(--green); }
.week-day.is-partial { color: #946f18; background: #fff9eb; }
.week-day.is-partial span { color: #b78b22; background: #ffe9af; }
.week-day.is-failed { color: #a33d4c; background: #fff1f2; }
.week-day.is-failed span { color: #c03d4a; background: #ffd9dd; }
.week-day.is-today { box-shadow: inset 0 0 0 2px #c6beff; }

.reward-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.reward-item:last-child { border-bottom: 0; padding-bottom: 0; }
.reward-title { margin: 0; font-size: 14px; font-weight: 750; line-height: 1.4; }
.reward-cost { margin: 4px 0 0; color: #a16e0c; font-size: 12px; font-weight: 850; }
.reward-action { padding: 8px 9px; background: #f2b743; }
.gentle-tip { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 17px 21px; border-radius: 18px; color: #5f5a76; background: #eeecfa; }
.gentle-tip span { color: var(--purple); font-size: 22px; }
.gentle-tip p { margin: 0; font-size: 13px; line-height: 1.65; }

.hidden { display: none !important; }
.parent-view { padding-top: 6px; }
.parent-header { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 28px 0 26px; }
.parent-header .eyebrow { color: var(--purple); opacity: 1; }
.parent-header h1 { color: var(--ink); font-size: clamp(28px, 4vw, 42px); }
.parent-header p:not(.eyebrow) { max-width: 570px; margin: 13px 0 0; color: var(--muted); line-height: 1.7; }
.secondary-button { min-height: 44px; padding: 10px 14px; border: 1px solid #dcd8ed; border-radius: 11px; color: var(--purple-deep); background: #fff; font-weight: 750; }
.primary-button { width: 100%; min-height: 46px; padding: 12px 15px; border-radius: 12px; color: #fff; background: var(--purple); font-weight: 800; box-shadow: 0 7px 15px rgba(102, 88, 211, 0.18); }
.parent-quick-nav { display: flex; gap: 8px; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.parent-quick-nav::-webkit-scrollbar { display: none; }
.parent-quick-nav a { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 12px; color: var(--purple-deep); background: #fff; box-shadow: 0 6px 18px rgba(54, 40, 108, 0.07); text-decoration: none; font-size: 13px; font-weight: 800; }
.parent-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.parent-stat { padding: 17px; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(54, 40, 108, 0.06); }
.parent-stat span { display: block; color: var(--muted); font-size: 12px; }
.parent-stat strong { display: block; margin-top: 5px; color: var(--ink); font-size: 27px; letter-spacing: -0.04em; }
.parent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.parent-panel { min-height: 240px; }
.parent-panel--profile { grid-column: 1 / -1; }
.review-card, .activity-item, .setting-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 14px; background: #f8f7fc; }
.review-card p, .activity-item p, .setting-item p { margin: 0; font-size: 14px; font-weight: 750; }
.review-card small, .activity-item small, .setting-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.review-actions { display: flex; gap: 7px; }
.review-action { background: var(--green); }
.review-action--reject { color: #a14b52; background: #ffe4e5; }
.activity-symbol { display: grid; width: 32px; height: 32px; place-items: center; flex: 0 0 auto; border-radius: 11px; background: var(--purple-soft); }
.activity-item { justify-content: flex-start; }
.activity-item.is-spend .activity-symbol { background: #fff0cf; }
.empty-state { padding: 25px 12px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.7; }
.stack-form { display: grid; gap: 12px; }
.stack-form label { display: grid; gap: 6px; color: #57516e; font-size: 12px; font-weight: 750; }
.stack-form input { width: 100%; min-height: 46px; padding: 10px 11px; border: 1px solid #ddd9ec; border-radius: 10px; color: var(--ink); background: #fff; }
.form-row { display: grid; grid-template-columns: 0.6fr 1fr; gap: 10px; }
.settings-list { margin-top: 14px; }
.setting-item { padding: 10px 12px; }
.setting-item p { font-size: 13px; }
.delete-button { border: 0; border-radius: 9px; color: #a34c54; background: #ffe6e7; padding: 6px 8px; font-size: 12px; font-weight: 800; }
.data-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.text-button { padding: 0; color: var(--purple-deep); background: transparent; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.text-button--danger { color: #ad555c; }

.modal-layer { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(31, 25, 62, 0.44); backdrop-filter: blur(7px); }
.pin-card { position: relative; width: min(100%, 390px); padding: 30px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.pin-card h2 { margin: 0; font-size: 25px; letter-spacing: -0.04em; }
.pin-card p:not(.section-kicker):not(.form-message) { margin: 10px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.pin-card input { width: 100%; padding: 13px; border: 1px solid #d8d3ea; border-radius: 12px; letter-spacing: 0.3em; text-align: center; }
.form-message { min-height: 20px; margin: 7px 0; color: #bb5258; font-size: 12px; }
.icon-button { position: absolute; top: 14px; right: 14px; display: grid; width: 44px; height: 44px; place-items: center; border-radius: 10px; color: #69627f; background: #f2f0f8; font-size: 20px; }
.toast { position: fixed; z-index: 30; bottom: 24px; left: 50%; max-width: min(92vw, 480px); padding: 12px 15px; border-radius: 13px; color: #fff; background: #302b51; box-shadow: 0 10px 30px rgba(26, 20, 57, 0.26); font-size: 13px; line-height: 1.55; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity 180ms ease, transform 180ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .hero-card, .dashboard-grid, .parent-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 28px; }
  .island-scene { min-height: 228px; }
  .side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .parent-header { align-items: start; flex-direction: column; }
  .parent-panel--profile { grid-column: auto; }
}

@media (max-width: 590px) {
  .app-shell { width: min(100% - 20px, 1160px); padding-top: 12px; }
  .topbar { margin-bottom: 14px; }
  .brand { font-size: 15px; }
  .parent-entry { min-height: 44px; padding: 9px 10px; font-size: 12px; }
  .hero-card { gap: 20px; min-height: 0; padding: 24px 20px 20px; border-radius: 24px; }
  .hero-card h1 { font-size: 31px; }
  .island-scene { min-height: 208px; }
  .island-ground { right: 2%; transform: scale(0.86) rotate(-2deg); transform-origin: bottom right; }
  .dashboard-grid, .side-column { gap: 14px; }
  .side-column { grid-template-columns: 1fr; }
  .panel { padding: 19px; border-radius: 20px; }
  .section-heading h2 { font-size: 18px; }
  .task-card { grid-template-columns: auto minmax(0, 1fr); }
  .task-points { grid-column: 2; }
  .task-action { grid-column: 1 / -1; width: 100%; }
  .parent-metrics { gap: 8px; }
  .parent-stat { padding: 12px; }
  .parent-stat strong { font-size: 22px; }
  .parent-stat span { font-size: 11px; }
  .parent-header { padding-top: 12px; }
  .parent-quick-nav { position: sticky; top: 63px; z-index: 8; margin: 0 -2px 14px; padding: 6px 2px; background: rgba(247,247,252,0.93); backdrop-filter: blur(12px); }
  .parent-quick-nav a { min-height: 44px; padding: 0 15px; }
  .review-card, .setting-item { align-items: flex-start; flex-direction: column; }
  .review-actions { width: 100%; }
  .review-action { flex: 1; }
}
/* First-use quest experience */
.hero-card--quest { overflow: hidden; }
.child-identity { display: flex; align-items: center; gap: 10px; }
.child-avatar { display: grid; width: 38px; height: 38px; place-items: center; overflow: hidden; border: 2px solid rgba(255,255,255,.58); border-radius: 50%; color: #fff; background: rgba(255,255,255,.22); background-size: cover; background-position: center; font-size: 15px; font-weight: 900; }
.child-avatar.has-photo { color: transparent; }
.quest-scene { --pet-position: 42%; --monster-position: 12%; position: relative; overflow: hidden; min-height: 258px; border: 1px solid rgba(255,255,255,.36); border-radius: 24px; background: linear-gradient(180deg,#97b4f7 0%,#b1d8f4 43%,#78c78d 44%,#56ae77 100%); isolation: isolate; }
.quest-scene::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(120deg,transparent 0 42%,rgba(255,255,255,.16) 42% 57%,transparent 57%); content: ""; }
.quest-hills { position: absolute; border-radius: 50% 50% 0 0; background: #7ccd7d; }
.quest-hills--far { right: -12%; bottom: 31%; width: 82%; height: 35%; opacity: .84; }
.quest-hills--near { right: -7%; bottom: 0; width: 112%; height: 38%; background: #4f9f70; }
.safe-home { position: absolute; top: 30%; right: 7%; display: grid; width: 48px; height: 48px; place-items: center; border-radius: 16px 16px 12px 12px; color: #7059de; background: #fff6b7; box-shadow: 0 8px 0 #e9c96f,0 14px 26px rgba(48,62,113,.2); font-size: 24px; transform: rotate(-3deg); }
.safe-home::before { position: absolute; top: -16px; width: 0; height: 0; border-right: 28px solid transparent; border-bottom: 23px solid #ef7b85; border-left: 28px solid transparent; content: ""; }
.chase-track { position: absolute; right: 10%; bottom: 31%; left: 9%; display: flex; justify-content: space-between; align-items: center; height: 13px; padding: 0 5px; border-radius: 999px; background: rgba(255,241,190,.6); transform: rotate(-3deg); }
.chase-track span { width: 8px; height: 8px; border: 2px solid rgba(116,90,202,.7); border-radius: 50%; background: #fff3b5; }
.pet-runner { position: absolute; z-index: 3; bottom: 26%; left: var(--pet-position); width: 48px; height: 42px; transform: translateX(-50%); transition: left .45s ease; }
.pet-face { position: absolute; top: 7px; left: 8px; width: 31px; height: 29px; border-radius: 48% 48% 45% 45%; background: #f8aa55; box-shadow: inset 0 -5px 0 rgba(204,106,61,.16); }
.pet-face i { position: absolute; top: 12px; width: 5px; height: 7px; border-radius: 50%; background: #42395c; }
.pet-face i:first-child { left: 8px; }.pet-face i:nth-child(2) { right: 8px; }.pet-face b { position: absolute; bottom: 6px; left: 13px; width: 6px; height: 4px; border-radius: 0 0 6px 6px; background: #493b54; }
.pet-ear { position: absolute; top: 0; width: 15px; height: 21px; border-radius: 70% 20% 70% 20%; background: #f4905e; }.pet-ear--left { left: 7px; transform: rotate(-32deg); }.pet-ear--right { right: 5px; transform: scaleX(-1) rotate(-32deg); }
.pet-tail { position: absolute; right: -10px; bottom: 6px; width: 20px; height: 14px; border-radius: 8px 16px 16px 8px; background: #f6b559; transform: rotate(-25deg); }.pet-tail::after { position: absolute; right: -3px; bottom: 0; width: 9px; height: 9px; border-radius: 50%; background: #fff6d4; content: ""; }
.pet-bunny .pet-face,.pet-runner--bunny .pet-face { background: #9fdfb4; }.pet-bunny .pet-ear,.pet-runner--bunny .pet-ear { top: -8px; height: 28px; border-radius: 70% 70% 20% 20%; background: #9fdfb4; }.pet-bunny .pet-tail,.pet-runner--bunny .pet-tail { border-radius: 50%; background: #f8f9e8; }.pet-pup .pet-face,.pet-runner--pup .pet-face { background: #83c6f2; }.pet-pup .pet-ear,.pet-runner--pup .pet-ear { width: 14px; height: 19px; border-radius: 8px 8px 13px 13px; background: #6099df; }.pet-pup .pet-tail,.pet-runner--pup .pet-tail { background: #83c6f2; }.pet-cat .pet-face,.pet-runner--cat .pet-face { background: #c8a3ee; }.pet-cat .pet-ear,.pet-runner--cat .pet-ear { background: #b485e3; }.pet-cat .pet-tail,.pet-runner--cat .pet-tail { background: #c8a3ee; }
.chase-monster { position: absolute; z-index: 2; bottom: 25%; left: var(--monster-position); width: 47px; height: 39px; border-radius: 45% 52% 36% 44%; background: #7450bb; box-shadow: inset 0 -8px 0 rgba(56,38,111,.15),0 6px 0 rgba(65,49,117,.18); transform: translateX(-50%) rotate(-7deg); transition: left .45s ease; }.chase-monster::before,.chase-monster::after { position: absolute; top: -8px; width: 13px; height: 15px; border-radius: 70% 25% 70% 25%; background: #6f4bb1; content: ""; }.chase-monster::before { left: 5px; transform: rotate(-24deg); }.chase-monster::after { right: 5px; transform: scaleX(-1) rotate(-24deg); }.monster-eye { position: absolute; top: 13px; width: 8px; height: 10px; border-radius: 50%; background: #fff; }.monster-eye::after { position: absolute; top: 3px; left: 3px; width: 3px; height: 4px; border-radius: 50%; background: #37285d; content: ""; }.monster-eye--one { left: 11px; }.monster-eye--two { right: 10px; }.monster-mouth { position: absolute; bottom: 7px; left: 16px; width: 14px; height: 6px; border-radius: 0 0 10px 10px; background: #4e347c; }
.quest-distance { position: absolute; top: 14px; right: 14px; z-index: 4; padding: 8px 10px; border-radius: 12px; color: #fff; background: rgba(62,47,116,.35); backdrop-filter: blur(7px); font-size: 11px; }.quest-distance span,.quest-distance strong { display: block; }.quest-distance strong { margin-top: 2px; font-size: 14px; }.quest-scene .island-caption { z-index: 4; }
.setup-layer { z-index: 40; overflow-y: auto; align-items: start; padding: 22px 14px; }.setup-card { width: min(100%,560px); margin: auto; padding: clamp(22px,5vw,34px); border-radius: 28px; color: var(--ink); background: #fff; box-shadow: var(--shadow); }.setup-head h2 { margin: 6px 0 0; font-size: clamp(25px,6vw,33px); letter-spacing: -.045em; }.setup-head p:not(.section-kicker) { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }.setup-dots { display: flex; gap: 7px; margin: 20px 0; }.setup-dots span { width: 31px; height: 6px; border-radius: 999px; background: #e8e4f5; }.setup-dots .is-active { background: var(--purple); }.setup-step { min-height: 235px; }.setup-label { display: grid; gap: 8px; color: #4e4765; font-size: 13px; font-weight: 800; }.setup-label input { width: 100%; min-height: 52px; padding: 13px 15px; border: 2px solid #dfdaf0; border-radius: 15px; color: var(--ink); font-size: 16px; outline: none; }.setup-label input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(102,88,211,.12); }.photo-picker { display: flex; align-items: center; gap: 13px; margin-top: 16px; padding: 12px; border: 1px dashed #cfc6ef; border-radius: 17px; color: #554d70; cursor: pointer; }.photo-picker strong,.photo-picker small { display: block; }.photo-picker strong { font-size: 13px; }.photo-picker small { margin-top: 4px; color: var(--muted); font-size: 11px; }.setup-photo-preview { display: grid; width: 54px; height: 54px; place-items: center; overflow: hidden; flex: 0 0 auto; border-radius: 17px; color: #fff; background: linear-gradient(135deg,#8a78ec,#f08b9c); background-size: cover; background-position: center; font-size: 27px; }.setup-photo-preview.has-photo { color: transparent; }.setup-choice-title { margin: 0 0 13px; color: #4c4562; font-size: 14px; font-weight: 800; }.pet-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }.pet-choice,.starter-task { min-height: 132px; padding: 12px; border: 2px solid #ece8f7; border-radius: 18px; color: #504962; background: #fff; text-align: left; transition: transform .18s ease,border .18s ease,box-shadow .18s ease; }.pet-choice:hover,.starter-task:hover,.pet-choice.is-selected,.starter-task.is-selected { border-color: #9283ec; box-shadow: 0 9px 18px rgba(99,82,183,.12); transform: translateY(-2px); }.pet-choice strong,.pet-choice small,.starter-task strong,.starter-task small { display: block; }.pet-choice strong,.starter-task strong { margin-top: 7px; font-size: 14px; }.pet-choice small,.starter-task small { margin-top: 3px; color: var(--muted); font-size: 11px; }.pet-card-art { position: relative; display: block; width: 55px; height: 48px; border-radius: 23px 23px 20px 20px; background: #f8aa55; }.pet-card-art::before,.pet-card-art::after { position: absolute; top: -11px; width: 17px; height: 23px; border-radius: 70% 20% 70% 20%; background: inherit; content: ""; }.pet-card-art::before { left: 6px; transform: rotate(-30deg); }.pet-card-art::after { right: 6px; transform: scaleX(-1) rotate(-30deg); }.pet-card-art--bunny { background: #9fdfb4; }.pet-card-art--bunny::before,.pet-card-art--bunny::after { top: -21px; height: 34px; border-radius: 70% 70% 20% 20%; }.pet-card-art--pup { background: #83c6f2; }.pet-card-art--pup::before,.pet-card-art--pup::after { border-radius: 8px 8px 13px 13px; background: #6099df; }.pet-card-art--cat { background: #c8a3ee; }.pet-card-art--cat::before,.pet-card-art--cat::after { background: #b485e3; }.starter-task-grid { display: grid; gap: 10px; }.starter-task { display: grid; grid-template-columns: 46px 1fr; column-gap: 12px; min-height: 74px; align-items: center; }.starter-task > span { grid-row: 1 / span 2; display: grid; width: 46px; height: 46px; place-items: center; border-radius: 15px; background: #f0edff; font-size: 23px; }.starter-task strong { margin: 0; }.starter-task small { margin: 0; }.setup-note { margin: 12px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }.setup-actions { display: grid; grid-template-columns: .58fr 1fr; gap: 10px; margin-top: 18px; }.setup-actions .primary-button,.setup-actions .secondary-button { width: 100%; }
.task-card { box-shadow: 0 8px 18px rgba(55,43,111,.04); }.task-icon { background: linear-gradient(135deg,#eeeaff,#ded7ff); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }.task-card:nth-child(3n+2) .task-icon { background: linear-gradient(135deg,#e4f7e6,#bdebd0); }.task-card:nth-child(3n) .task-icon { background: linear-gradient(135deg,#fff1c9,#ffd98a); }.reward-item { padding: 14px 0; }.reward-action { border-radius: 12px; box-shadow: 0 6px 13px rgba(217,151,35,.18); }
@media (max-width:590px) { .quest-scene { min-height: 236px; }.safe-home { right: 5%; transform: scale(.83) rotate(-3deg); }.chase-track { right: 7%; left: 6%; }.setup-layer { padding: 10px; }.setup-card { border-radius: 24px; }.setup-step { min-height: 250px; }.setup-actions { grid-template-columns: 1fr; }.setup-actions .secondary-button.hidden { display: none; }.pet-choice-grid { gap: 9px; }.pet-choice { min-height: 122px; }.hero-card h1 { max-width: 530px; } }
.pet-runner { width: 86px; height: 86px; bottom: 20%; }
.pet-runner img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 5px rgba(38,71,91,.2)); animation: pet-run 1.35s ease-in-out infinite; }
.pet-card-art { display: grid; width: 100%; height: 70px; place-items: center; overflow: hidden; border-radius: 15px; background: linear-gradient(145deg,#f6f2ff,#e8f8ff); }
.pet-card-art::before,.pet-card-art::after { display: none; }
.pet-card-art img { width: 86px; height: 76px; object-fit: contain; filter: drop-shadow(0 7px 5px rgba(71,53,119,.15)); transform: translateY(4px); transition: transform .18s ease; }
.pet-choice:hover .pet-card-art img,.pet-choice.is-selected .pet-card-art img { transform: translateY(0) scale(1.05); }
@keyframes pet-run { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
.setup-actions.is-first-step { grid-template-columns: 1fr; }

.setup-card, .setup-label input, .photo-picker, .setup-actions { box-sizing: border-box; }

.setup-card { width: min(560px, calc(100vw - 20px)); max-width: calc(100vw - 20px); }
.setup-step, .setup-label, .setup-actions { min-width: 0; width: 100%; }
.setup-actions.is-first-step .primary-button { grid-column: 1 / -1; min-width: 0; max-width: 100%; }
.setup-form-message { min-height: 20px; margin: 7px 2px 0; color: #bd3f54; font-size: 13px; font-weight: 700; }
.setup-label input.is-invalid { border-color: #d9556d; box-shadow: 0 0 0 4px rgba(217,85,109,.12); }
@media (max-width: 590px) { .setup-card { padding: 22px; } }
@media (max-width: 590px) {
  .setup-card { width: calc(100vw - 20px) !important; max-width: calc(100vw - 20px) !important; margin: 0 auto; }
  .setup-card *, .setup-card input, .setup-card button { max-width: 100%; }
}
.starter-task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.starter-task { min-height: 116px; grid-template-columns: 1fr; grid-template-rows: 43px auto auto; row-gap: 3px; padding: 12px; }
.starter-task > span { grid-row: auto; width: 42px; height: 42px; border-radius: 14px; font-size: 21px; }
.starter-task strong { margin-top: 2px; font-size: 13px; line-height: 1.3; }
.starter-task small { margin-top: 0; font-size: 11px; }
@media (max-width: 360px) { .starter-task { min-height: 108px; padding: 10px; }.starter-task strong { font-size: 12px; } }
.starter-task { position: relative; border-color: #ded7f3; }
.starter-task.is-selected { border: 3px solid #654ce0; color: #2f255c; background: linear-gradient(145deg, #fbfaff 0%, #eeeaff 100%); box-shadow: 0 0 0 3px rgba(101,76,224,.20), 0 12px 22px rgba(83,61,186,.20); transform: translateY(-2px); }
.starter-task.is-selected::after { position: absolute; top: 9px; right: 9px; padding: 3px 7px; border-radius: 999px; color: #fff; background: #654ce0; box-shadow: 0 3px 7px rgba(80,55,182,.24); content: "✓ 已选"; font-size: 10px; font-weight: 800; line-height: 1.25; }
.starter-task.is-selected > span { color: #3f2bb4; background: #ded6ff; box-shadow: inset 0 0 0 1px rgba(101,76,224,.20); }
.starter-task.is-selected strong { color: #322768; font-weight: 900; }
.starter-task.is-selected small { color: #594ca2; font-weight: 700; }
.starter-task:focus-visible { outline: 3px solid #2f9b87; outline-offset: 3px; }
/* Chase level: monster, pet, and safe house remain visibly separated. */
.quest-scene { --pet-position: 32%; --monster-position: 14%; min-height: 286px; border: 2px solid rgba(255,255,255,.52); background: linear-gradient(180deg,#7db4f3 0%,#b7e1f9 43%,#8cd97b 44%,#4da46c 100%); box-shadow: inset 0 -26px 0 rgba(34,112,76,.14); }
.quest-scene::before { position: absolute; z-index: 0; inset: 0; background: linear-gradient(90deg,rgba(255,255,255,.08) 1px,transparent 1px),linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px); background-size: 28px 28px; content: ""; opacity: .55; }
.quest-scene::after { z-index: 0; background: linear-gradient(120deg,transparent 0 38%,rgba(255,255,255,.15) 38% 52%,transparent 52%); }
.quest-hills { z-index: 1; }.quest-hills--far { bottom: 34%; }.quest-hills--near { bottom: 0; height: 42%; }
.danger-banner { position: absolute; top: 13px; left: 13px; z-index: 7; display: flex; align-items: center; gap: 6px; padding: 6px 9px 6px 6px; border: 1px solid rgba(255,255,255,.34); border-radius: 999px; color: #fff; background: rgba(77,47,134,.55); box-shadow: 0 5px 12px rgba(55,44,113,.16); font-size: 11px; backdrop-filter: blur(5px); }
.danger-banner span { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; color: #713553; background: #ffe6a4; font-size: 13px; font-weight: 900; }.danger-banner strong { font-size: 11px; }
.quest-scene.chase-safe .danger-banner { background: rgba(35,123,94,.60); }.quest-scene.chase-safe .danger-banner span { color: #226c59; background: #c9f3ce; }
.safe-home { top: auto; right: 6%; bottom: 40%; z-index: 5; width: 58px; height: 54px; border-radius: 17px 17px 13px 13px; font-size: 28px; transform: rotate(-2deg); }.safe-home::before { top: -19px; border-right-width: 33px; border-bottom-width: 26px; border-left-width: 33px; }.safe-home small { position: absolute; top: -45px; left: 50%; width: 82px; padding: 4px 5px; border-radius: 999px; color: #fff; background: rgba(62,83,143,.55); font-size: 10px; font-weight: 900; text-align: center; text-shadow: 0 2px 4px rgba(37,77,81,.28); transform: translateX(-50%) rotate(2deg); }.safe-home span { position: relative; z-index: 1; }
.chase-track { z-index: 2; right: 8%; bottom: 29%; left: 7%; display: grid; grid-template-columns: repeat(8,1fr); gap: 5px; height: 30px; padding: 5px 9px; border: 2px solid rgba(77,97,130,.20); border-radius: 999px; background: rgba(255,240,181,.72); box-shadow: inset 0 2px 0 rgba(255,255,255,.54),0 7px 0 rgba(52,126,78,.14); transform: none; }
.chase-track span { width: auto; height: 18px; border: 2px solid rgba(99,81,164,.36); border-radius: 7px; background: rgba(255,255,255,.70); box-shadow: none; }.chase-track span.is-safe { border-color: #7b56d6; background: #dcd2ff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }.chase-track span.is-pet { border-color: #f5ae39; background: #ffe49a; box-shadow: 0 0 0 3px rgba(255,223,124,.45); }
.chase-monster { z-index: 4; bottom: 12%; left: var(--monster-position); width: 108px; height: 108px; border-radius: 0; background: transparent; box-shadow: none; transform: translateX(-50%); transition: left .5s ease; }.chase-monster::before,.chase-monster::after { display: none; }.chase-monster img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 9px 5px rgba(49,35,102,.24)); }
.pet-runner { z-index: 5; bottom: 13%; left: var(--pet-position); width: 98px; height: 98px; transition: left .5s ease; }.pet-runner img { filter: drop-shadow(0 9px 5px rgba(26,75,83,.25)); }
.quest-distance { top: 13px; right: 13px; z-index: 7; padding: 7px 10px; border: 1px solid rgba(255,255,255,.35); background: rgba(42,87,121,.43); }.quest-distance strong { font-size: 16px; }
.quest-scene .island-caption { z-index: 7; right: 12px; bottom: 13px; left: 13px; max-width: 250px; padding: 8px 10px; border-radius: 12px; background: rgba(33,91,73,.30); backdrop-filter: blur(4px); }.quest-scene .island-caption span { font-size: 14px; }.quest-scene .island-caption small { color: rgba(255,255,255,.92); }
@media (max-width:590px) { .quest-scene { min-height: 258px; }.safe-home { right: 5%; bottom: 42%; transform: scale(.78) rotate(-2deg); transform-origin: right center; }.chase-track { right: 5%; left: 5%; bottom: 29%; gap: 3px; padding: 5px 7px; }.chase-monster { width: 84px; height: 84px; bottom: 14%; }.pet-runner { width: 80px; height: 80px; bottom: 14%; }.quest-scene .island-caption { max-width: 190px; }.danger-banner { max-width: 170px; }.quest-distance { padding: 6px 8px; } }
/* Main chase level: a clear 8-cell race from monster gate to the safe treehouse. */
.quest-scene { --pet-position: 27.6%; --monster-position: 10%; min-height: 316px; border: 2px solid rgba(255,255,255,.58); background: linear-gradient(180deg,#8fc6ff 0%,#c7ecff 42%,#a9df88 43%,#55ac71 100%); box-shadow: inset 0 -32px 0 rgba(25,104,68,.16); }
.quest-scene::before { background: radial-gradient(circle at 15% 20%,rgba(255,255,255,.52) 0 2px,transparent 3px),radial-gradient(circle at 72% 18%,rgba(255,255,255,.45) 0 2px,transparent 3px); background-size: 42px 42px,57px 57px; opacity: .72; }.quest-scene::after { background: linear-gradient(112deg,transparent 0 40%,rgba(255,255,255,.22) 40% 48%,transparent 48%); }
.quest-hills { z-index: 1; }.quest-hills--far { right: -4%; bottom: 39%; width: 92%; height: 31%; background: #82cf7e; }.quest-hills--near { right: -12%; bottom: 0; width: 122%; height: 42%; background: #45976a; }
.monster-gate { position: absolute; bottom: 16%; left: -23px; z-index: 2; width: 82px; height: 128px; border: 8px solid #5a3d8d; border-bottom: 0; border-radius: 52px 52px 0 0; background: radial-gradient(ellipse at 54% 52%,#36234d 0 26%,#1f1934 62%); box-shadow: inset 0 0 0 5px rgba(156,113,217,.28),0 12px 0 rgba(42,29,78,.20); }.monster-gate::after { position: absolute; right: -38px; bottom: 0; width: 49px; height: 18px; border-radius: 50%; background: rgba(53,35,94,.22); content: ""; }.monster-gate span { position: absolute; top: -20px; left: 7px; width: 92px; color: #fff2c4; font-size: 9px; font-weight: 900; text-shadow: 0 2px 4px rgba(44,28,81,.35); transform: rotate(-7deg); }
.danger-banner { top: 14px; left: 15px; z-index: 8; background: rgba(82,45,140,.64); }.safe-home { right: 5%; bottom: 35%; z-index: 6; width: 76px; height: 73px; border: 5px solid #7f4f41; border-radius: 32px 32px 18px 18px; color: #fff5b3; background: linear-gradient(90deg,#b67551 0 14%,#e8bb74 14% 28%,#bd7854 28% 42%,#e8bb74 42% 56%,#bd7854 56% 70%,#e8bb74 70% 84%,#b67551 84%); box-shadow: 0 9px 0 #9a6049,0 14px 23px rgba(41,84,70,.25); transform: none; }.safe-home::before { top: -35px; left: -15px; width: 96px; height: 55px; border: 0; border-radius: 50% 50% 45% 45%; background: #4fa961; box-shadow: -19px 16px 0 #62bb68,23px 13px 0 #429456,0 -8px 0 #8bd674; content: ""; }.safe-home::after { position: absolute; bottom: 0; left: 50%; width: 25px; height: 31px; border: 4px solid #7f4f41; border-bottom: 0; border-radius: 14px 14px 0 0; background: #6b4b65; content: ""; transform: translateX(-50%); }.safe-home small { top: -64px; bottom: auto; z-index: 2; width: 92px; padding: 4px 6px; color: #fff; background: rgba(42,113,81,.75); font-size: 10px; transform: translateX(-50%); }.safe-home span { position: absolute; z-index: 3; top: 8px; left: 50%; color: #fff5a5; font-size: 18px; transform: translateX(-50%); }
.chase-track { right: 8%; bottom: 26%; left: 8%; z-index: 3; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 7px; height: 43px; padding: 6px 10px; border: 3px solid rgba(83,77,123,.30); border-radius: 18px; background: rgba(255,235,168,.82); box-shadow: inset 0 2px 0 rgba(255,255,255,.62),0 8px 0 rgba(47,127,77,.20); }
.chase-track span { position: relative; height: 27px; border: 3px solid #b7a0dd; border-radius: 9px; background: #f9f6ff; box-shadow: inset 0 -3px 0 rgba(131,108,185,.10); }.chase-track span.is-safe { border-color: #7b5ad9; background: linear-gradient(145deg,#f6edff,#d9ccff); box-shadow: inset 0 0 0 2px rgba(255,255,255,.72),0 2px 0 rgba(102,78,179,.14); }.chase-track span.is-safe::after { position: absolute; top: 4px; left: 50%; color: #6d4dd0; content: "✦"; font-size: 12px; transform: translateX(-50%); }.chase-track span.is-pet { border-color: #f2a83a; background: #ffdfa0; box-shadow: 0 0 0 4px rgba(255,216,109,.48),inset 0 0 0 2px rgba(255,255,255,.72); }
.chase-monster { bottom: 12%; left: var(--monster-position); z-index: 5; width: 104px; height: 104px; transform: translateX(-50%); }.chase-monster img { filter: drop-shadow(0 9px 4px rgba(49,34,93,.25)); }
.pet-runner { bottom: 14%; left: var(--pet-position); z-index: 6; width: 98px; height: 98px; }.pet-runner img { object-fit: contain; filter: drop-shadow(0 9px 4px rgba(22,75,65,.24)); animation: pet-run .95s ease-in-out infinite; }
.quest-distance { top: 14px; right: 15px; z-index: 8; padding: 8px 10px; border-radius: 13px; color: #fff; background: rgba(49,85,122,.50); }.quest-distance strong { color: #fff6bd; font-size: 18px; }
.quest-scene .island-caption { right: 15px; bottom: 13px; left: 15px; z-index: 8; max-width: 275px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.22); background: rgba(29,87,65,.44); }.quest-scene .island-caption span { color: #fff; font-size: 15px; }.quest-scene .island-caption small { color: #e6fff1; font-size: 11px; }
.quest-scene.chase-safe .monster-gate { filter: saturate(.55); opacity: .65; }.quest-scene.chase-safe .chase-monster { opacity: .68; transform: translateX(-50%) scale(.82); }.quest-scene.chase-safe .safe-home { box-shadow: 0 0 0 6px rgba(255,238,132,.25),0 9px 0 #9a6049,0 14px 23px rgba(41,84,70,.25); }
@media (max-width:590px) { .quest-scene { min-height: 274px; }.monster-gate { bottom: 15%; left: -31px; transform: scale(.76); transform-origin: bottom left; }.safe-home { right: 3%; bottom: 37%; transform: scale(.78); transform-origin: right bottom; }.chase-track { right: 5%; bottom: 25%; left: 5%; gap: 3px; height: 35px; padding: 4px 7px; border-radius: 15px; }.chase-track span { height: 21px; border-width: 2px; border-radius: 7px; }.chase-track span.is-safe::after { top: 3px; font-size: 10px; }.chase-monster { bottom: 11%; width: 78px; height: 78px; }.pet-runner { bottom: 12%; width: 76px; height: 76px; }.quest-scene .island-caption { right: 9px; bottom: 9px; left: 9px; max-width: 200px; }.danger-banner { left: 9px; }.quest-distance { right: 9px; } }
.quest-game-column { position: relative; z-index: 2; display: grid; gap: 10px; min-width: 0; align-content: center; }
.quest-supply { padding: 10px; border: 1px solid rgba(255,255,255,.55); border-radius: 17px; color: #382d66; background: rgba(255,255,255,.94); box-shadow: 0 10px 20px rgba(43,31,100,.16); }
.quest-supply-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }.quest-supply-heading .section-kicker { margin: 0 0 2px; color: #765fd3; font-size: 9px; opacity: 1; }.quest-supply-heading strong { display: block; font-size: 12px; }.quest-supply-heading > small { color: #7b7094; font-size: 9px; text-align: right; }
.quest-supply-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }.quest-supply-item { display: grid; grid-template-columns: 28px 1fr; grid-template-areas: "icon copy" "cost cost"; gap: 3px 6px; min-width: 0; padding: 7px; border: 2px solid #ded6f3; border-radius: 13px; color: #45386d; background: #fff; text-align: left; transition: transform .18s ease,border-color .18s ease,box-shadow .18s ease; }.quest-supply-item:not(:disabled):hover { border-color: #765bdd; box-shadow: 0 5px 11px rgba(90,67,184,.16); transform: translateY(-2px); }.quest-supply-item:disabled { cursor: default; }.quest-supply-icon { grid-area: icon; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 10px; background: #f0edff; font-size: 16px; }.quest-supply-copy { grid-area: copy; min-width: 0; }.quest-supply-copy strong,.quest-supply-copy small { display: block; }.quest-supply-copy strong { overflow: hidden; font-size: 11px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }.quest-supply-copy small { margin-top: 2px; color: #7b7094; font-size: 9px; line-height: 1.25; }.quest-supply-cost { grid-area: cost; color: #6a52c9; font-size: 10px; font-weight: 900; }.quest-supply-item.is-used { border-color: #70bc88; background: #effaf0; }.quest-supply-item.is-used .quest-supply-cost { color: #31905b; }.quest-supply-item.is-locked { opacity: .58; background: #f7f5fb; }.quest-supply-item:focus-visible { outline: 3px solid #2f9b87; outline-offset: 2px; }
.quest-scene.has-shield .pet-runner::after { position: absolute; z-index: -1; inset: 8px; border: 3px solid rgba(154,238,255,.95); border-radius: 50%; background: rgba(130,218,255,.22); box-shadow: 0 0 0 5px rgba(139,229,255,.20),0 0 18px rgba(174,239,255,.72); content: ""; }.quest-scene.has-sprint .pet-runner::before { position: absolute; top: 50%; right: 78%; width: 32px; height: 16px; border-top: 3px solid rgba(255,239,138,.88); border-bottom: 3px solid rgba(255,239,138,.65); content: ""; transform: skewX(-25deg); }.quest-scene.monster-stunned .chase-monster { filter: saturate(.68); }.quest-scene.monster-stunned .chase-monster::after { position: absolute; top: -4px; right: 6px; color: #fff3a2; content: "✦"; font-size: 24px; font-weight: 900; text-shadow: 0 2px 5px rgba(65,43,122,.38); }
@media (max-width:820px) { .quest-game-column { order: 2; }.quest-supply { max-width: none; } }
@media (max-width:590px) { .quest-supply { padding: 9px; }.quest-supply-heading > small { display: none; }.quest-supply-list { gap: 5px; }.quest-supply-item { grid-template-columns: 24px 1fr; gap: 3px 4px; padding: 6px; border-radius: 11px; }.quest-supply-icon { width: 24px; height: 24px; font-size: 14px; }.quest-supply-copy strong { font-size: 10px; }.quest-supply-copy small { font-size: 8px; }.quest-supply-cost { font-size: 9px; } }
.quest-game-column { display: block; }
/* 今日专注与补给区：让主任务保持在页面核心位置。 */
.challenge-control { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 13px; margin-top: 17px; }
.challenge-start { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.42); border-radius: 14px; color: #453287; background: #fff6bf; box-shadow: 0 7px 14px rgba(39,26,113,.16); font-size: 13px; font-weight: 900; transition: transform .18s ease,box-shadow .18s ease; }
.challenge-start:hover:not(:disabled) { box-shadow: 0 10px 18px rgba(39,26,113,.24); transform: translateY(-2px); }
.challenge-start:disabled { cursor: default; color: #fff; background: rgba(55,42,127,.44); box-shadow: none; }
.challenge-control p { max-width: 290px; margin: 0; color: rgba(255,255,255,.88); font-size: 11px; font-weight: 650; line-height: 1.5; }
.quest-supply--game { margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid #e8e4f1; color: #382d66; }
.quest-supply--game .quest-supply-heading { align-items: end; margin-bottom: 10px; }.quest-supply--game .quest-supply-heading .section-kicker { margin-bottom: 3px; font-size: 10px; }.quest-supply--game .quest-supply-heading strong { display: block; color: #34275f; font-size: 14px; }.quest-supply--game .quest-supply-heading > small { max-width: 220px; color: #746a90; font-size: 11px; line-height: 1.45; text-align: right; }
.quest-supply--game .quest-supply-list { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }.quest-supply--game .quest-supply-item { min-height: 74px; padding: 8px; border-color: #ded6f3; background: #faf9ff; }.quest-supply--game .quest-supply-icon { width: 30px; height: 30px; font-size: 17px; }.quest-supply--game .quest-supply-copy strong { font-size: 12px; }.quest-supply--game .quest-supply-copy small { font-size: 10px; }.quest-supply--game .quest-supply-cost { font-size: 11px; }
.quest-scene.chase-timing .danger-banner { background: rgba(150,76,88,.84); box-shadow: 0 0 0 3px rgba(255,230,166,.22); animation: timer-alert 1.3s ease-in-out infinite; }
.quest-scene.chase-timing .chase-monster { filter: saturate(1.2) brightness(1.06); }.quest-scene.timer-pressure-2 .chase-monster,.quest-scene.timer-pressure-3 .chase-monster { animation: monster-creep .8s ease-in-out infinite; }
@keyframes timer-alert { 50% { transform: translateY(-2px); } }
@keyframes monster-creep { 50% { transform: translateX(-50%) rotate(-4deg) translateY(-3px); } }
@media (max-width:590px) { .challenge-control { display: grid; grid-template-columns: 1fr; align-items: stretch; }.challenge-start { width: 100%; }.challenge-control p { max-width: none; }.quest-supply--game .quest-supply-heading { display: grid; gap: 4px; }.quest-supply--game .quest-supply-heading > small { max-width: none; text-align: left; }.quest-supply--game .quest-supply-list { grid-template-columns: 1fr; }.quest-supply--game .quest-supply-item { grid-template-columns: 30px 1fr auto; grid-template-areas: "icon copy cost"; min-height: 58px; align-items: center; }.quest-supply--game .quest-supply-cost { white-space: nowrap; } }
.quest-track-guide { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 3px 8px; color: rgba(255,255,255,.96); font-size: 12px; font-weight: 800; line-height: 1.3; }
.track-rule { display: inline-flex; min-height: 28px; box-sizing: border-box; flex: 0 0 auto; align-items: center; padding: 5px 8px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(51,69,136,.24); }
.track-status { display: flex; min-width: 0; min-height: 28px; box-sizing: border-box; align-items: center; justify-content: flex-end; color: #fff7c2; text-align: right; text-shadow: 0 1px 3px rgba(45,27,91,.34); }
.quest-track-story { display: grid; gap: 2px; margin: 8px 5px 0; color: rgba(255,255,255,.96); line-height: 1.4; }
.quest-track-story strong { font-size: 14px; }.quest-track-story small { color: rgba(255,255,255,.82); font-size: 11px; }
.quest-scene .danger-banner,.quest-scene .quest-distance,.quest-scene .island-caption { display: none; }
.quest-scene { min-height: 300px; }
.quest-scene .chase-track { right: 8%; bottom: 17%; left: 7%; z-index: 3; }
.quest-scene .chase-monster { bottom: 20%; z-index: 4; }
.quest-scene .pet-runner { bottom: 21%; z-index: 5; }
.quest-scene .safe-home { bottom: 43%; }
@media (max-width:590px) { .quest-track-guide { align-items: center; padding-bottom: 7px; font-size: 11px; }.track-status { max-width: 58%; line-height: 1.35; }.quest-scene { min-height: 245px; }.quest-scene .safe-home { right: 5%; bottom: 44%; }.quest-scene .chase-track { right: 5%; bottom: 17%; left: 5%; height: 27px; padding: 4px 7px; }.quest-scene .chase-track span { height: 17px; }.quest-scene .chase-monster { bottom: 19%; width: 68px; height: 68px; }.quest-scene .pet-runner { bottom: 20%; width: 68px; height: 68px; }.quest-track-story { margin-top: 7px; }.quest-track-story strong { font-size: 13px; } }
.setting-actions { display: flex; gap: 7px; align-items: center; }
.edit-button, .save-button, .cancel-button { min-height: 32px; padding: 6px 9px; border-radius: 9px; font-size: 12px; font-weight: 800; }
.edit-button { color: #4d3a9a; background: #ece8ff; }
.save-button { color: #fff; background: var(--purple); }
.cancel-button { color: #635d75; background: #eceaf3; }
.setting-edit-form { display: grid; gap: 10px; padding: 13px; border: 1px solid #d9d2f8; border-radius: 14px; background: #faf9ff; }
.setting-edit-note { margin: 0; color: #746c88; font-size: 11px; font-weight: 700; }
.setting-edit-fields { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 9px; }
.setting-edit-fields label { display: grid; gap: 5px; color: #57516e; font-size: 11px; font-weight: 750; }
.setting-edit-fields input { width: 100%; min-height: 40px; padding: 8px 9px; border: 1px solid #d8d3eb; border-radius: 9px; color: var(--ink); background: #fff; font-size: 13px; }
.setting-edit-form .setting-actions { justify-content: flex-end; }
@media (max-width:590px) { .setting-actions { width: 100%; }.setting-actions button { flex: 1; }.setting-edit-fields { grid-template-columns: 1fr; }.setting-edit-form .setting-actions { justify-content: stretch; } }
.challenge-card { position: relative; width: min(100%, 410px); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 30px; border-radius: 24px; color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.challenge-card h2 { margin: 6px 0 0; font-size: 27px; letter-spacing: -0.04em; }
.challenge-card p:not(.section-kicker):not(.form-message) { margin: 10px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.challenge-time-label { display: grid; gap: 7px; color: #57516e; font-size: 13px; font-weight: 800; }
.challenge-time-label input { width: 100%; min-height: 52px; padding: 12px 13px; border: 2px solid #d9d2ef; border-radius: 13px; color: var(--ink); background: #fff; font-size: 18px; font-weight: 800; outline: none; }
.challenge-time-label input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(102,88,211,.12); }
.challenge-modal-actions { display: grid; grid-template-columns: .72fr 1fr; gap: 10px; margin-top: 16px; }
.challenge-modal-actions .primary-button, .challenge-modal-actions .secondary-button { width: 100%; }
.quest-supply--game { margin: 0; padding: 11px; border-color: rgba(255,255,255,.62); background: rgba(255,255,255,.96); }
.quest-supply--game .quest-supply-heading { margin-bottom: 8px; }.quest-supply--game .quest-supply-heading strong { color: #34275f; font-size: 12px; }.quest-supply--game .quest-supply-heading > small { max-width: 180px; font-size: 9px; line-height: 1.45; }
.quest-supply--game .quest-supply-list { gap: 7px; }.quest-supply--game .quest-supply-item { min-height: 67px; background: #fff; }.quest-supply--game .quest-supply-copy strong { font-size: 11px; }.quest-supply--game .quest-supply-copy small { font-size: 9px; }
@media (max-width:590px) { .challenge-card { width: min(100%, calc(100vw - 20px)); padding: 25px 20px; }.challenge-modal-actions { grid-template-columns: 1fr; }.quest-supply--game .quest-supply-heading > small { display: block; }.quest-supply--game .quest-supply-list { grid-template-columns: 1fr; }.quest-supply--game .quest-supply-item { grid-template-columns: 30px 1fr auto; grid-template-areas: "icon copy cost"; min-height: 58px; align-items: center; }.quest-supply--game .quest-supply-cost { white-space: nowrap; } }
.editor-section-hidden { display: none !important; }
.hero-card--quest.is-hero-copy-hidden { grid-template-columns: minmax(0, 1fr); }

.editor-text-hidden { display: none !important; }
.child-switcher { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; color: #5d537b; font-size: 12px; font-weight: 800; }
.child-switcher > div { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.child-switcher > div::-webkit-scrollbar { display: none; }
.child-switch-button { min-height: 34px; padding: 6px 11px; border: 1px solid #ddd6f0; border-radius: 999px; color: #5a4c83; background: #fff; font-size: 12px; font-weight: 850; white-space: nowrap; }
.child-switch-button.is-active { border-color: #7459d7; color: #fff; background: #7459d7; box-shadow: 0 5px 12px rgba(90,67,184,.22); }
.child-setting-item.is-active { border: 1px solid #cfc3f8; background: #f4f0ff; }
.stack-form select { width: 100%; min-height: 46px; padding: 10px 11px; border: 1px solid #ddd9ec; border-radius: 10px; color: var(--ink); background: #fff; }
@media (max-width:590px) { .child-switcher { align-items: flex-start; flex-direction: column; gap: 5px; }.child-switcher > div { max-width: 100%; } }
/* Last five minutes: visible urgency without covering the chase track. */
.quest-scene .chase-monster { width: 132px; height: 132px; bottom: 15%; }
.quest-scene.is-critical { border-color: #ffbd57; box-shadow: inset 0 0 0 4px rgba(255,102,76,.40), inset 0 -26px 0 rgba(34,112,76,.14), 0 0 0 3px rgba(255,211,104,.24); animation: critical-scene-pulse 1.15s ease-in-out infinite; }
.quest-scene.is-critical .chase-track { border-color: #ff805b; box-shadow: inset 0 2px 0 rgba(255,255,255,.64), 0 0 0 3px rgba(255,202,113,.46), 0 7px 0 rgba(52,126,78,.14); }
.quest-scene.is-critical .chase-track span.is-pet { border-color: #f0714f; background: #fff1b0; box-shadow: 0 0 0 4px rgba(255,144,85,.42), 0 0 18px rgba(255,227,129,.82); }
.quest-scene.is-critical .chase-monster { filter: saturate(1.3) contrast(1.05) drop-shadow(0 0 11px rgba(125,45,82,.42)); animation: critical-monster-lunge .72s ease-in-out infinite; }
.quest-scene.is-critical .pet-runner { filter: drop-shadow(0 0 11px rgba(255,243,158,.68)); animation: critical-pet-sprint .68s ease-in-out infinite; }
.quest-track-guide.is-critical .track-status { color: #fff0ae; text-shadow: 0 0 8px rgba(170,41,46,.82), 0 1px 3px rgba(45,27,91,.46); animation: critical-copy-flash 1.05s ease-in-out infinite; }
@keyframes critical-scene-pulse { 50% { box-shadow: inset 0 0 0 5px rgba(255,83,70,.64), inset 0 -26px 0 rgba(34,112,76,.14), 0 0 0 5px rgba(255,211,104,.38); } }
@keyframes critical-monster-lunge { 50% { transform: translateX(-47%) scale(1.045) rotate(-2deg); } }
@keyframes critical-pet-sprint { 50% { transform: translateX(-50%) translateY(-5px) rotate(2deg); } }
@keyframes critical-copy-flash { 50% { opacity: .56; } }
@media (max-width:590px) {
  .quest-scene .chase-monster { width: 112px; height: 112px; bottom: 13%; }
  .quest-scene .pet-runner { width: 68px; height: 68px; bottom: 20%; }
}
@media (prefers-reduced-motion: reduce) {
  .quest-scene.is-critical, .quest-scene.is-critical .chase-monster, .quest-scene.is-critical .pet-runner, .quest-track-guide.is-critical .track-status { animation: none; }
}
/* Keep both characters fully visible throughout the chase. */
.quest-scene .chase-monster, .quest-scene .pet-runner { will-change: left, transform; }
.challenge-finish { position: absolute; z-index: 12; inset: 10px; display: none; place-items: center; align-content: center; gap: 4px; padding: 12px; border: 1px solid rgba(255,255,255,.80); border-radius: 18px; color: #fff; background: linear-gradient(145deg,rgba(100,59,137,.95),rgba(68,51,114,.93)); box-shadow: 0 12px 28px rgba(45,27,91,.33); text-align: center; }
.challenge-finish strong { font-size: 18px; line-height: 1.25; text-shadow: 0 2px 0 rgba(52,32,90,.36); }
.challenge-finish small { max-width: 230px; color: rgba(255,255,255,.88); font-size: 11px; line-height: 1.45; }
.finish-scene-art { position: relative; display: flex; width: min(255px,88%); height: 137px; align-items: end; justify-content: center; gap: 2px; }
.finish-pet, .finish-monster { position: relative; display: grid; place-items: center; }
.finish-pet { z-index: 2; width: 90px; height: 90px; margin-bottom: 10px; }
.finish-pet img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 7px 5px rgba(31,21,65,.28)); }
.finish-pet::before, .finish-pet::after { position: absolute; z-index: 3; top: 39px; width: 9px; height: 15px; border-radius: 60% 60% 72% 72%; background: #75d7ff; box-shadow: 0 2px 0 rgba(39,125,184,.34); content: ""; transform: rotate(14deg); }
.finish-pet::before { left: 35px; }.finish-pet::after { left: 50px; transform: rotate(-14deg); }
.finish-monster { z-index: 1; width: 130px; height: 130px; }
.finish-monster img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 6px rgba(25,15,58,.35)); animation: finish-monster-laugh .8s ease-in-out infinite; }
.finish-monster::after { position: absolute; z-index: -1; bottom: 35px; left: -26px; width: 54px; height: 26px; border: 8px solid #7651bd; border-right: 0; border-radius: 20px 0 0 20px; background: #7651bd; box-shadow: inset 0 -5px 0 rgba(48,32,97,.24); content: ""; transform: rotate(-13deg); }
.finish-catch-mark { position: absolute; z-index: 4; bottom: 22px; left: 46px; width: 76px; height: 50px; border: 3px dashed #ffe98e; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,229,128,.16); transform: rotate(-13deg); animation: finish-catch-pulse 1.1s ease-in-out infinite; }
.finish-laugh { position: absolute; z-index: 3; top: 2px; left: 2px; padding: 4px 7px; border-radius: 999px; color: #67344a; background: #ffe7a1; box-shadow: 0 4px 0 rgba(101,60,112,.20); font-size: 12px; font-weight: 900; transform: rotate(-9deg); animation: finish-laugh-bubble .8s ease-in-out infinite; }
.quest-scene.is-failed { border-color: #9e79d5; background: linear-gradient(180deg,#9e83d7 0%,#b6a5e4 43%,#7ab77a 44%,#4f9a71 100%); }
.quest-scene.is-failed .cloud, .quest-scene.is-failed .quest-hills, .quest-scene.is-failed .safe-home { opacity: .42; }
.quest-scene.is-failed .chase-track, .quest-scene.is-failed > .chase-monster, .quest-scene.is-failed > .pet-runner, .quest-scene.is-failed .monster-gate { visibility: hidden; opacity: 0; }
.quest-scene.is-failed .challenge-finish { display: grid; }
@keyframes finish-monster-laugh { 50% { transform: translateY(-5px) rotate(-3deg) scale(1.03); } }
@keyframes finish-catch-pulse { 50% { transform: rotate(-13deg) scale(1.08); opacity: .62; } }
@keyframes finish-laugh-bubble { 50% { transform: translateY(-4px) rotate(-4deg); } }
@media (max-width:590px) {
  .challenge-finish { inset: 8px; padding: 9px; }.finish-scene-art { width: min(228px,92%); height: 120px; }.finish-monster { width: 112px; height: 112px; }.finish-pet { width: 78px; height: 78px; margin-bottom: 8px; }.finish-pet::before, .finish-pet::after { top: 32px; }.finish-pet::before { left: 29px; }.finish-pet::after { left: 44px; }.finish-catch-mark { bottom: 18px; left: 39px; width: 67px; height: 44px; }.challenge-finish strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .finish-monster img, .finish-catch-mark, .finish-laugh { animation: none; }
}
.finish-scene-art { width: min(266px,92%); height: 142px; flex-direction: row-reverse; gap: 10px; }
.finish-cage { position: relative; z-index: 3; display: grid; width: 114px; height: 112px; place-items: end center; overflow: visible; margin-bottom: 5px; padding: 4px 5px 7px; border: 5px solid #f7d77d; border-radius: 15px 15px 11px 11px; background: linear-gradient(180deg,rgba(75,53,104,.34),rgba(34,30,67,.48)); box-shadow: inset 0 0 0 2px rgba(255,250,193,.42),0 8px 0 rgba(73,53,103,.26),0 12px 18px rgba(33,22,68,.26); }
.finish-cage::before { position: absolute; z-index: 5; top: -19px; left: 50%; width: 84px; height: 27px; border: 5px solid #f7d77d; border-bottom: 0; border-radius: 42px 42px 0 0; background: rgba(89,62,123,.72); box-shadow: inset 0 3px 0 rgba(255,249,185,.26); content: ""; transform: translateX(-50%); }
.finish-cage::after { position: absolute; z-index: 5; right: -4px; bottom: -11px; left: -4px; height: 14px; border: 4px solid #f7d77d; border-radius: 7px; background: #bd8c5e; box-shadow: inset 0 3px 0 rgba(255,239,177,.44); content: ""; }
.finish-cage-bars { position: absolute; z-index: 4; inset: 4px 5px 7px; display: grid; grid-template-columns: repeat(4,1fr); pointer-events: none; }
.finish-cage-bars span { border-left: 5px solid rgba(255,232,138,.92); box-shadow: 2px 0 0 rgba(99,62,119,.32); }.finish-cage-bars span:last-child { border-right: 5px solid rgba(255,232,138,.92); }
.finish-cage-lock { position: absolute; z-index: 7; top: -8px; right: 8px; display: grid; width: 25px; height: 25px; place-items: center; border: 2px solid #fff2a4; border-radius: 50%; background: #6d4eaf; box-shadow: 0 3px 0 rgba(53,34,93,.26); font-size: 13px; }
.finish-cage .finish-pet { z-index: 2; width: 84px; height: 84px; margin: 0 0 3px; }
.finish-cage .finish-pet::before, .finish-cage .finish-pet::after { z-index: 3; top: 34px; }.finish-cage .finish-pet::before { left: 31px; }.finish-cage .finish-pet::after { left: 47px; }
.finish-monster { z-index: 2; width: 126px; height: 126px; margin-bottom: 0; }.finish-monster::after { display: none; }.finish-monster img { animation: finish-monster-watch 1.25s ease-in-out infinite; }.finish-laugh { top: 10px; left: 0; }
@keyframes finish-monster-watch { 50% { transform: translateY(-3px) rotate(-2deg); } }
@media (max-width:590px) {
  .finish-scene-art { width: min(235px,94%); height: 121px; gap: 5px; }.finish-cage { width: 101px; height: 97px; margin-bottom: 4px; padding: 3px 4px 6px; border-width: 4px; }.finish-cage::before { top: -16px; width: 72px; height: 22px; border-width: 4px; }.finish-cage::after { right: -3px; bottom: -9px; left: -3px; height: 11px; border-width: 3px; }.finish-cage-bars { inset: 3px 4px 6px; }.finish-cage-bars span { border-left-width: 4px; }.finish-cage-bars span:last-child { border-right-width: 4px; }.finish-cage-lock { top: -8px; right: 6px; width: 22px; height: 22px; font-size: 11px; }.finish-cage .finish-pet { width: 72px; height: 72px; margin-bottom: 2px; }.finish-cage .finish-pet::before, .finish-cage .finish-pet::after { top: 29px; }.finish-cage .finish-pet::before { left: 26px; }.finish-cage .finish-pet::after { left: 40px; }.finish-monster { width: 109px; height: 109px; }.finish-laugh { top: 6px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .finish-monster img { animation: none; }
}

.parent-view { padding-top: 18px; }
.parent-header.parent-hero { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 24px; margin: 0 0 16px; padding: clamp(22px,4vw,36px); overflow: hidden; border: 1px solid rgba(255,255,255,.28); border-radius: 28px; color: #fff; background: linear-gradient(135deg,#5945bc 0%,#7864dc 58%,#a38af2 100%); box-shadow: 0 18px 34px rgba(75,52,166,.22); }
.parent-header.parent-hero::after { position: absolute; content: ""; inset: auto -10% -55% auto; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none; }
.parent-header.parent-hero .eyebrow, .parent-header.parent-hero h1, .parent-header.parent-hero p:not(.eyebrow) { position: relative; z-index: 1; color: #fff; }
.parent-header.parent-hero .eyebrow { display: inline-flex; align-items: center; gap: 7px; margin: 0; opacity: .88; }.parent-header.parent-hero .eyebrow::before { width: 9px; height: 9px; border-radius: 50%; background: #ffe789; box-shadow: 0 0 0 5px rgba(255,231,137,.16); content: ""; }
.parent-header.parent-hero h1 { margin: 8px 0 0; font-size: clamp(28px,4vw,40px); letter-spacing: -.055em; }.parent-header.parent-hero p:not(.eyebrow) { max-width: 560px; margin-top: 12px; color: rgba(255,255,255,.86); font-size: 14px; line-height: 1.65; }
.parent-return-button { position: relative; z-index: 1; display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; padding: 11px 15px; border: 0; color: #4d3b9a; background: #fff8c9; box-shadow: 0 8px 18px rgba(40,25,103,.20); white-space: nowrap; }
.parent-quick-nav { gap: 9px; margin: 0 0 18px; padding: 2px; }.parent-quick-nav a { min-height: 48px; gap: 7px; padding: 0 15px; border: 1px solid #e4def5; border-radius: 14px; color: #493778; box-shadow: 0 7px 18px rgba(54,40,108,.08); }.parent-quick-nav a > span:first-child { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 8px; background: #f0ebff; font-size: 14px; }
.parent-metrics { gap: 12px; margin-bottom: 18px; }.parent-stat { min-height: 104px; padding: 17px; border: 1px solid #e9e4f5; border-radius: 18px; box-shadow: 0 9px 24px rgba(54,40,108,.07); }.parent-stat strong { font-size: 29px; }
.parent-grid--management { align-items: start; gap: 18px; }.parent-panel { min-height: 0; padding: clamp(17px,3vw,23px); border: 1px solid #e9e4f5; border-radius: 22px; box-shadow: 0 11px 28px rgba(54,40,108,.07); }.parent-panel--family { border-color: #d8cef7; background: linear-gradient(145deg,#fff 0%,#fbf9ff 72%,#f2edff 100%); }.parent-panel--family .section-heading { padding-bottom: 13px; border-bottom: 1px solid #e8e0fa; }.parent-panel--family .section-kicker { color: #6350bd; }
#parent-children { grid-column: span 1; } #parent-settings { grid-column: span 1; }.parent-panel--profile { grid-column: span 1; }
.parent-section-icon { display: inline-grid; width: 25px; height: 25px; margin-right: 6px; place-items: center; border-radius: 8px; background: #efe9ff; font-size: 14px; vertical-align: middle; }.section-kicker:has(.parent-section-icon) { display: flex; align-items: center; }
.parent-view .primary-button, .parent-view .secondary-button, .parent-view .review-action, .parent-view .edit-button, .parent-view .delete-button, .parent-view .save-button, .parent-view .cancel-button { min-height: 46px; border-radius: 12px; font-size: 13px; font-weight: 850; }.parent-view .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }.parent-view .edit-button { border: 1px solid #d8cef7; background: #f0ecff; }.parent-view .delete-button { padding: 8px 11px; }.review-actions, .setting-actions { gap: 8px; }.review-actions button, .setting-actions button { flex: 1; }
.stack-form { gap: 14px; }.stack-form label { gap: 7px; font-size: 13px; }.stack-form input, .stack-form select, .setting-edit-fields input { min-height: 50px; border: 1.5px solid #d8d2ed; border-radius: 13px; font-size: 16px; }.stack-form input:focus, .stack-form select:focus, .number-stepper input:focus, .setting-edit-fields input:focus { border-color: #7159d4; outline: 3px solid rgba(113,89,212,.16); }
.number-field { display: grid; gap: 7px; }.number-stepper { display: grid; grid-template-columns: 50px minmax(0,1fr) 50px; gap: 8px; align-items: stretch; width: 100%; }.number-stepper input { min-width: 0; min-height: 50px; margin: 0; padding: 8px; border: 1.5px solid #d8d2ed; border-radius: 13px; color: #392d69; background: #fff; font-size: 18px; font-weight: 850; text-align: center; appearance: textfield; -moz-appearance: textfield; }.number-stepper input::-webkit-outer-spin-button, .number-stepper input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }.number-step-button { display: grid; min-width: 50px; min-height: 50px; place-items: center; border: 1.5px solid #d8cef7; border-radius: 13px; color: #563fb0; background: #f1ecff; box-shadow: 0 4px 0 rgba(103,78,190,.13); font-size: 28px; font-weight: 800; line-height: 1; }.number-step-button:active { box-shadow: none; transform: translateY(3px); }
.setting-edit-form { padding: 15px; border-radius: 16px; }.setting-edit-fields { grid-template-columns: minmax(0,1fr) minmax(170px,.65fr); gap: 12px; }.setting-edit-fields .number-stepper { grid-template-columns: 42px minmax(0,1fr) 42px; }.setting-edit-fields .number-stepper input, .setting-edit-fields .number-step-button { min-height: 44px; }.setting-edit-fields .number-step-button { min-width: 42px; font-size: 24px; }
.child-edit-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }.setting-edit-fields select { min-height: 50px; border: 1.5px solid #d8d2ed; border-radius: 13px; background: #fff; font-size: 16px; }.setting-edit-fields select:focus { border-color: #7159d4; outline: 3px solid rgba(113,89,212,.16); }
.data-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }.text-button { min-height: 46px; padding: 10px; border: 1px solid #e2daf6; border-radius: 12px; background: #f8f6ff; text-align: center; text-decoration: none; }.text-button--danger { border-color: #f4d5d8; background: #fff4f4; }
.modal-layer { padding: max(14px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom)); }.pin-card, .challenge-card { width: min(100%,440px); padding: clamp(22px,5vw,32px); border-radius: 24px; }.challenge-time-label { display: grid; gap: 8px; }.challenge-modal-actions { gap: 10px; }.challenge-modal-actions .primary-button, .challenge-modal-actions .secondary-button { min-height: 52px; }
.setup-card .primary-button, .setup-card .secondary-button, .setup-card button:not(.icon-button) { min-height: 50px; border-radius: 14px; }
@media (max-width:820px) { .parent-header.parent-hero { grid-template-columns: 1fr; align-items: start; gap: 18px; }.parent-return-button { width: 100%; }.parent-grid--management { grid-template-columns: 1fr; }.parent-panel--profile, #parent-children, #parent-settings { grid-column: auto; } }
@media (max-width:590px) { .parent-view { padding-top: 10px; }.parent-header.parent-hero { margin-inline: -2px; padding: 23px 20px; border-radius: 23px; }.parent-header.parent-hero h1 { font-size: 29px; }.parent-header.parent-hero p:not(.eyebrow) { font-size: 13px; }.parent-quick-nav { margin-right: -8px; padding-right: 8px; }.parent-quick-nav a { min-height: 46px; padding: 0 12px; font-size: 12px; }.parent-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }.parent-stat { min-height: 88px; padding: 12px 10px; border-radius: 15px; }.parent-stat span { font-size: 11px; }.parent-stat strong { font-size: 24px; }.parent-panel { padding: 17px 14px; border-radius: 19px; }.parent-panel .section-heading h2 { font-size: 19px; }.parent-view .review-card, .parent-view .activity-item, .parent-view .setting-item { padding: 12px; border-radius: 14px; }.parent-view .review-card, .parent-view .setting-item { align-items: stretch; flex-direction: column; }.parent-view .review-actions, .parent-view .setting-actions { width: 100%; }.parent-view .review-actions button, .parent-view .setting-actions button { min-height: 44px; }.data-actions { grid-template-columns: 1fr; }.setting-edit-fields { grid-template-columns: 1fr; }.number-stepper { grid-template-columns: 52px minmax(0,1fr) 52px; }.number-stepper input, .number-step-button { min-height: 52px; }.number-step-button { min-width: 52px; }.pin-card, .challenge-card { max-height: calc(100dvh - 28px); overflow-y: auto; }.challenge-modal-actions { grid-template-columns: 1fr; } }
@media (min-width:821px) and (max-width:1100px) { .parent-header.parent-hero { padding: 30px; }.parent-grid--management { gap: 16px; }.parent-panel { padding: 19px; }.parent-view .review-card, .parent-view .setting-item { align-items: stretch; flex-direction: column; }.parent-view .review-actions, .parent-view .setting-actions { width: 100%; } }

/* Star beacon finish line and pet-aligned current cell. */
.quest-scene .pet-foot-marker {
  position: absolute;
  z-index: 4;
  bottom: calc(21% - 1px);
  left: var(--pet-position);
  width: 30px;
  height: 20px;
  border: 3px solid #f2a83a;
  border-radius: 8px;
  background: linear-gradient(145deg,#fff6bd,#ffdc83);
  box-shadow: 0 0 0 4px rgba(255,216,109,.42),inset 0 0 0 2px rgba(255,255,255,.72);
  transform: translateX(-50%);
  transition: left .5s ease;
  pointer-events: none;
}
.quest-scene.is-critical .pet-foot-marker {
  border-color: #f0714f;
  box-shadow: 0 0 0 4px rgba(255,144,85,.42),0 0 18px rgba(255,227,129,.82),inset 0 0 0 2px rgba(255,255,255,.72);
}
.quest-scene.is-failed .pet-foot-marker { visibility: hidden; opacity: 0; }
.quest-scene .safe-home {
  right: 5.8%;
  bottom: 25%;
  z-index: 6;
  width: 28px;
  height: 108px;
  border: 3px solid #51448f;
  border-radius: 14px 14px 7px 7px;
  color: #fff7b0;
  background: linear-gradient(90deg,#514491 0 18%,#8977df 18% 43%,#c5b9ff 43% 57%,#8977df 57% 82%,#514491 82%);
  box-shadow: 0 8px 0 #3f3979,0 13px 22px rgba(42,61,117,.24),0 0 17px rgba(255,235,126,.35);
  transform: none;
}
.quest-scene .safe-home::before {
  top: -22px;
  left: 50%;
  width: 29px;
  height: 29px;
  border: 2px solid #fff4a8;
  border-radius: 50%;
  background: radial-gradient(circle,#fffbd5 0 21%,#ffd66d 23% 43%,rgba(255,215,109,.18) 45% 100%);
  box-shadow: 0 0 0 5px rgba(255,231,126,.16),0 0 21px rgba(255,232,126,.84);
  content: "";
  transform: translateX(-50%);
}
.quest-scene .safe-home::after {
  bottom: 10px;
  left: 50%;
  width: 5px;
  height: 70px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(#f8f0b2,#7765ca 44%,#4e428d 100%);
  box-shadow: -8px 20px 0 -2px rgba(255,255,255,.32),8px 40px 0 -2px rgba(255,255,255,.22);
  content: "";
  transform: translateX(-50%);
}
.quest-scene .safe-home span {
  top: -20px;
  left: 50%;
  z-index: 3;
  color: #fffef0;
  font-size: 18px;
  text-shadow: 0 0 8px rgba(255,232,115,.92);
  transform: translateX(-50%);
}
.quest-scene .safe-home small {
  top: -48px;
  width: 76px;
  padding: 4px 5px;
  color: #fff;
  background: rgba(65,76,147,.78);
  transform: translateX(-50%);
}
.quest-scene.chase-safe .safe-home { box-shadow: 0 0 0 5px rgba(255,238,132,.24),0 8px 0 #3f3979,0 13px 22px rgba(42,61,117,.24),0 0 20px rgba(255,235,126,.55); }
@media (max-width:590px) {
  .quest-scene .pet-foot-marker { bottom: calc(20% - 1px); width: 26px; height: 17px; border-width: 2px; border-radius: 7px; }
  .quest-scene .safe-home { right: 4%; bottom: 24%; width: 25px; height: 94px; border-width: 2px; }
  .quest-scene .safe-home::before { top: -20px; width: 26px; height: 26px; }
  .quest-scene .safe-home::after { bottom: 9px; height: 59px; }
  .quest-scene .safe-home small { top: -45px; }
}

/* Island lighthouse finish line and uniform race cells. */
.quest-scene .pet-foot-marker { display: none !important; }
.quest-scene .chase-track span,
.quest-scene .chase-track span.is-safe { border-color: #b7a0dd; background: #f9f6ff; box-shadow: inset 0 -3px 0 rgba(131,108,185,.10); }
.quest-scene .chase-track span.is-safe::after { content: none; }
.quest-scene .safe-home { right: 5.8%; bottom: 25%; z-index: 6; width: 31px; height: 106px; border: 3px solid #b8c7da; border-radius: 10px 10px 6px 6px; color: #fff8ad; background: repeating-linear-gradient(180deg,#ffffff 0 16px,#dceafb 16px 30px); box-shadow: 0 8px 0 #a7bed4,0 13px 22px rgba(42,61,117,.22); transform: none; }
.quest-scene .safe-home::before { top: -22px; left: 50%; width: 43px; height: 18px; border: 3px solid #92abc5; border-bottom: 0; border-radius: 24px 24px 0 0; background: #f8fbff; box-shadow: 0 -4px 0 rgba(255,235,126,.33); content: ""; transform: translateX(-50%); }
.quest-scene .safe-home::after { right: -16px; bottom: 17px; left: auto; width: 20px; height: 28px; border: 4px solid #91a8c4; border-left: 0; border-radius: 0 18px 18px 0; background: rgba(255,255,255,.32); box-shadow: none; content: ""; transform: none; }
.quest-scene .safe-home span { top: -18px; left: 50%; z-index: 3; color: #fff4a8; font-size: 17px; text-shadow: 0 0 8px rgba(255,232,115,.95); transform: translateX(-50%); }
.quest-scene .safe-home small { top: -49px; width: 76px; padding: 4px 5px; color: #fff; background: rgba(55,89,132,.76); transform: translateX(-50%); }
.quest-scene.chase-safe .safe-home { box-shadow: 0 0 0 5px rgba(255,238,132,.24),0 8px 0 #a7bed4,0 13px 22px rgba(42,61,117,.22); }
@media (max-width:590px) { .quest-scene .safe-home { right: 4%; bottom: 24%; width: 27px; height: 92px; border-width: 2px; }.quest-scene .safe-home::before { top: -19px; width: 37px; height: 16px; border-width: 2px; }.quest-scene .safe-home::after { right: -13px; bottom: 14px; width: 16px; height: 23px; border-width: 3px; }.quest-scene .safe-home small { top: -44px; } }

.countdown-setting-card { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:14px 0; padding:14px; border:1px solid #d8d0f4; border-radius:15px; background:linear-gradient(135deg,#f8f6ff,#eeebff); }.countdown-setting-card > div { display:grid; gap:3px; min-width:0; }.countdown-setting-card span { color:#725bc5; font-size:12px; font-weight:800; }.countdown-setting-card strong { color:#382d66; font-size:17px; }.countdown-setting-card small { color:#6f6786; font-size:12px; line-height:1.35; }.countdown-setting-card .secondary-button { min-height:42px; flex:0 0 auto; white-space:nowrap; }
@media (max-width:590px) { .countdown-setting-card { align-items:stretch; flex-direction:column; }.countdown-setting-card .secondary-button { width:100%; min-height:48px; } }


.challenge-task-picker { display: grid; gap: 11px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #e6e0f5; }
.challenge-task-picker-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--ink); }
.challenge-task-picker-heading strong { font-size: 16px; }
.challenge-task-picker-heading small { color: #796b99; font-weight: 750; }
.challenge-task-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.challenge-task-option { position: relative; display: flex; align-items: center; gap: 9px; min-height: 72px; padding: 10px; border: 1.5px solid #e1d9f1; border-radius: 15px; background: #fff; cursor: pointer; }
.challenge-task-option:has(input:checked) { border-color: #6f55d4; background: #f3efff; box-shadow: 0 0 0 3px rgba(111,85,212,.14); }
.challenge-task-option input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.challenge-task-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: #fff7dd; font-size: 21px; }
.challenge-task-option strong, .challenge-task-option small { display: block; line-height: 1.25; }
.challenge-task-option strong { color: var(--ink); font-size: 13px; }
.challenge-task-option small { margin-top: 4px; color: #7a6b96; font-size: 11px; font-weight: 750; }
.countdown-setting-card small + small { margin-top: 4px; }
@media (max-width: 390px) { .challenge-task-options { grid-template-columns: 1fr; } }


/* Generated brand icons for the primary mobile header. */
.brand-mark { overflow: hidden; background: transparent; box-shadow: none; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.parent-entry { display: inline-flex; align-items: center; gap: 7px; }
.parent-entry-icon { width: 27px; height: 27px; flex: 0 0 27px; object-fit: contain; }
.parent-entry span { margin-left: 0; }
@media (max-width: 590px) { .brand-mark { width: 34px; height: 34px; border-radius: 11px; }.parent-entry-icon { width: 25px; height: 25px; flex-basis: 25px; } }


/* Responsive hierarchy polish: calm spacing on phones and a single reading column on portrait tablets. */
@media (min-width: 591px) and (max-width: 980px) {
  .app-shell { width: min(100% - 48px, 880px); padding-top: 28px; }
  .topbar { margin-bottom: 24px; }
  .hero-card { grid-template-columns: minmax(0, 1fr); gap: 26px; min-height: 0; padding: 32px; }
  .hero-copy { max-width: 680px; }
  .hero-card h1 { max-width: 640px; }
  .hero-description { max-width: 580px; margin-bottom: 22px; }
  .quest-game-column { display: grid; gap: 16px; }
  .v2-theme .quest-scene { min-height: 390px; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .dashboard-grid > :first-child { grid-column: 1 / -1; }
  .parent-view { padding-top: 14px; }
  .parent-quick-nav { margin-bottom: 20px; }
}

@media (max-width: 590px) {
  .app-shell { width: min(100% - 20px, 1160px); padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: 42px; }
  .topbar { align-items: center; gap: 10px; margin-bottom: 20px; }
  .brand { gap: 9px; font-size: 16px; }
  .parent-entry { min-height: 48px; padding: 9px 11px; font-size: 13px; }
  .hero-card.hero-card--quest { gap: 20px; padding: 25px 20px 23px; }
  .hero-copy { align-self: start; }
  .child-identity { margin-bottom: 10px; }
  .hero-card h1 { font-size: clamp(29px, 8vw, 32px); line-height: 1.2; letter-spacing: -0.035em; }
  .hero-description { margin: 12px 0 0; font-size: 14px; line-height: 1.65; }
  .hero-metrics { gap: 10px; margin-top: 18px; }
  .metric-pill { flex: 1 1 calc(50% - 5px); min-width: 0; justify-content: center; padding: 11px 10px; }
  .metric-pill strong { font-size: 19px; }
  .challenge-control { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.22); }
  .challenge-start { min-height: 54px; }
  .challenge-control #challenge-status { min-height: 20px; margin: 9px 2px 0; line-height: 1.55; }
  .quest-game-column { display: grid; gap: 16px; }
  .quest-track-guide { padding-inline: 3px; }
  .dashboard-grid { gap: 14px; }
  .panel { border-radius: 20px; }
  .gentle-tip { margin-top: 16px; padding: 15px 16px; }
}

@media (max-width: 360px) {
  .brand { font-size: 15px; }
  .parent-entry { gap: 5px; padding-inline: 9px; font-size: 12px; }
  .hero-card h1 { font-size: 28px; }
  .metric-pill { gap: 5px; padding-inline: 8px; }
}

/* Keep the horizontally scrollable parent shortcuts inside the page on tablets. */
@media (max-width: 980px) {
  .parent-view { min-width: 0; overflow-x: hidden; }
  .parent-quick-nav { max-width: 100%; padding-bottom: 4px; overscroll-behavior-inline: contain; }
}

/* Tablet parents see every shortcut at once instead of a page-wide horizontal strip. */
@media (min-width: 591px) and (max-width: 980px) {
  .parent-quick-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; overflow: visible; margin-right: 0; padding-right: 0; }
  .parent-quick-nav a { min-width: 0; justify-content: center; padding-inline: 9px; font-size: 12px; }
}

/* Anchor the parent hero decoration inside its card so it never expands the document. */
.parent-header.parent-hero { position: relative; }
.parent-header.parent-hero::after { inset: auto 0 -55% auto; }

/* Completed-in-time state: the timer stops and the child closes the round explicitly. */
.challenge-control.is-completed {
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(255,241,168,.62);
  border-radius: 18px;
  background: rgba(49,112,85,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.challenge-control.is-completed .challenge-start {
  flex: 0 0 auto;
  color: #265b49;
  background: #fff3a9;
}
.challenge-control.is-completed #challenge-status {
  flex: 1 1 210px;
  max-width: none;
  align-self: center;
  color: #fffde0;
  font-size: 13px;
  font-weight: 850;
}
@media (max-width: 590px) {
  .challenge-control.is-completed { gap: 8px; padding: 12px; }
  .challenge-control.is-completed #challenge-status { margin: 0 2px; font-size: 12px; }
}

