:root {
  color-scheme: light;
  --paper: #f6f0e4;
  --paper-deep: #eee5d4;
  --surface: #fffdf8;
  --surface-soft: #f2eddf;
  --ink: #24342d;
  --muted: #65756d;
  --line: #d9ddcf;
  --forest: #2f6750;
  --forest-dark: #204a39;
  --forest-pale: #dbe9d6;
  --sun: #e8ae37;
  --sun-pale: #fbebbc;
  --clay: #bd654d;
  --clay-pale: #f3ddd4;
  --sky: #c9e4e5;
  --blue: #527b9f;
  --violet: #776a98;
  --shadow: 0 14px 38px rgba(52, 70, 59, 0.11);
  --shadow-soft: 0 6px 18px rgba(52, 70, 59, 0.08);
  --radius-1: 10px;
  --radius-2: 17px;
  --radius-3: 25px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.5; }
body::before { position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 8% 0%, rgba(255,255,255,.9), transparent 22rem), radial-gradient(circle at 95% 18%, rgba(215,232,209,.58), transparent 28rem); content: ""; }
button, input, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:active { transform: translateY(1px) scale(.985); }
:focus-visible { outline: 3px solid rgba(47,103,80,.35); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 100; padding: .55rem .9rem; color: white; background: var(--forest-dark); border-radius: var(--radius-1); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.app-shell { width: min(100%, 1180px); min-height: 100dvh; margin: 0 auto; padding: 0 0 calc(6.3rem + env(safe-area-inset-bottom)); }
.app-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: .65rem 1rem; background: rgba(246,240,228,.9); border-bottom: 1px solid rgba(111,124,112,.1); backdrop-filter: blur(18px); }
.profile-chip { display: flex; align-items: center; gap: .7rem; min-width: 0; padding: 0; background: transparent; border: 0; cursor: pointer; text-align: left; }
.profile-avatar { display: grid; flex: 0 0 auto; width: 42px; height: 42px; place-items: center; color: white; background: var(--forest); border: 2px solid var(--forest-dark); border-radius: 14px 14px 10px 14px; font-weight: 800; box-shadow: var(--shadow-soft); }
.profile-chip small, .profile-chip strong { display: block; }
.profile-chip small { color: var(--muted); font-size: .7rem; }
.profile-chip strong { max-width: 13rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.header-actions { display: flex; align-items: center; gap: .55rem; }
.currency-chip { display: flex; align-items: center; gap: .35rem; min-height: 38px; padding: .35rem .65rem; color: #765516; background: var(--sun-pale); border: 1px solid #e1c97f; border-radius: 999px; font-variant-numeric: tabular-nums; }
.currency-chip > span { color: var(--sun); }
.install-button { min-height: 38px; padding: .45rem .7rem; color: white; background: var(--forest); border: 0; border-radius: var(--radius-1); cursor: pointer; font-size: .76rem; font-weight: 700; }

main { padding: .55rem .75rem 0; }
.view { animation: view-in .28s ease both; }
.view-heading { padding: 1rem .25rem 1.25rem; }
.view-heading h1 { margin: 0 0 .55rem; font-size: clamp(1.85rem, 7vw, 2.8rem); line-height: 1.12; letter-spacing: -.045em; text-wrap: balance; }
.view-heading > p, .view-heading > div > p { max-width: 42rem; margin: 0; color: var(--muted); font-size: .9rem; }
.kicker { margin: 0 0 .3rem; color: var(--forest); font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h2 { margin: 0; font-size: 1.25rem; line-height: 1.2; letter-spacing: -.025em; }
h3 { line-height: 1.25; }

.today-hero { position: relative; min-height: 300px; overflow: hidden; padding: 1.35rem 1.25rem; color: #17362b; background: linear-gradient(160deg, #eaf3e3 0%, #cfe4d1 62%, #b8d3ad 100%); border-radius: 28px 28px 16px 28px; box-shadow: var(--shadow); }
.today-hero::after { position: absolute; right: -55px; bottom: -90px; width: 260px; height: 220px; background: #89b783; border-radius: 50%; content: ""; opacity: .72; }
.hero-copy { position: relative; z-index: 3; max-width: 80%; }
.hero-copy h1 { max-width: 17ch; margin: 0 0 .6rem; font-size: clamp(1.85rem, 8vw, 3rem); line-height: 1.08; letter-spacing: -.05em; text-wrap: balance; }
.hero-copy > p:last-child { max-width: 31rem; color: #4f6d5b; font-size: .86rem; }
.hero-orbit { position: absolute; right: 1.4rem; top: 1.5rem; z-index: 2; width: 92px; height: 92px; }
.orbit-planet { position: absolute; inset: 18px; background: var(--sun); border: 6px solid rgba(255,255,255,.45); border-radius: 50%; box-shadow: 0 8px 20px rgba(177,126,25,.2); }
.orbit-planet::after { position: absolute; top: 22px; left: -17px; width: 70px; height: 17px; border: 4px solid rgba(115,103,70,.38); border-radius: 50%; content: ""; transform: rotate(-18deg); }
.orbit-star { position: absolute; color: #fff8d5; animation: star-float 3s ease-in-out infinite; }
.star-one { top: 0; left: 5px; font-size: 1.2rem; }
.star-two { right: 0; bottom: 0; animation-delay: -1.2s; }
.daily-progress { position: absolute; right: 1.15rem; bottom: 1.15rem; left: 1.15rem; z-index: 4; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: .5rem .8rem; padding: .8rem 1rem; background: rgba(255,253,248,.84); border: 1px solid rgba(255,255,255,.7); border-radius: 15px 15px 9px 15px; box-shadow: 0 6px 18px rgba(44,69,54,.1); backdrop-filter: blur(8px); }
.progress-copy { display: grid; min-width: 62px; }
.progress-copy strong { font-size: 1.35rem; line-height: 1; font-variant-numeric: tabular-nums; }
.progress-copy span, .streak-label { color: var(--muted); font-size: .7rem; }
.progress-track { height: 9px; overflow: hidden; background: rgba(69,96,76,.14); border-radius: 999px; }
.progress-track > span { display: block; width: 0; height: 100%; background: var(--forest); border-radius: inherit; transition: width .45s ease; }
.streak-label { grid-column: 2; }

.content-block { margin-top: .75rem; padding: 1.15rem 1rem 1.3rem; background: var(--surface); border: 1px solid rgba(109,126,112,.2); border-radius: 22px 22px 14px 22px; box-shadow: var(--shadow-soft); }
.section-title-row { display: flex; align-items: end; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.section-title-row .kicker { margin-bottom: .2rem; }
.quiet-button, .primary-button, .secondary-button, .danger-button { min-height: 40px; padding: .55rem .8rem; border-radius: var(--radius-1); cursor: pointer; font-weight: 750; transition: .2s ease; }
.quiet-button { color: var(--forest-dark); background: var(--forest-pale); border: 1px solid #b9ceb6; }
.quiet-button:hover { background: #cfe1ca; }
.primary-button { color: white; background: var(--forest); border: 1px solid var(--forest); box-shadow: 0 5px 13px rgba(47,103,80,.18); }
.primary-button:hover { background: var(--forest-dark); }
.secondary-button { color: var(--forest-dark); background: white; border: 1px solid #b8c5b9; }
.danger-button { color: #8d4235; background: var(--clay-pale); border: 1px solid #dfb4a8; }
.primary-button:disabled, .quiet-button:disabled, .secondary-button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.helper-copy { color: var(--muted); font-size: .7rem; text-align: right; }

.segmented-control { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; margin-bottom: .9rem; padding: 3px; background: var(--surface-soft); border-radius: 12px; }
.segmented-control button { min-height: 36px; color: var(--muted); background: transparent; border: 0; border-radius: 9px; cursor: pointer; font-size: .78rem; font-weight: 700; }
.segmented-control button.active { color: var(--forest-dark); background: white; box-shadow: 0 3px 10px rgba(50,68,58,.08); }
.quest-list { display: grid; gap: .65rem; }
.quest-card { --quest-color: var(--forest); display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .75rem; padding: .85rem; background: #fbfaf5; border: 1px solid var(--line); border-left: 4px solid var(--quest-color); border-radius: 14px 14px 9px 14px; }
.quest-card.pending { background: #fbf6e8; border-left-color: var(--sun); }
.quest-card.done { opacity: .72; background: #edf3e9; }
.quest-icon { display: grid; width: 42px; height: 42px; place-items: center; color: var(--quest-color); background: color-mix(in srgb, var(--quest-color) 12%, white); border-radius: 12px; font-size: 1.15rem; font-weight: 800; }
.quest-copy { min-width: 0; }
.quest-copy h3 { margin: 0 0 .25rem; overflow-wrap: anywhere; font-size: .92rem; }
.quest-meta { display: flex; flex-wrap: wrap; gap: .25rem .65rem; color: var(--muted); font-size: .68rem; }
.reward-meta { color: #86611d; font-weight: 700; }
.quest-action { min-width: 66px; padding: .5rem .55rem; color: var(--forest-dark); background: white; border: 1px solid #b6c4b7; border-radius: 9px; cursor: pointer; font-size: .72rem; font-weight: 800; }
.quest-status { color: var(--muted); font-size: .7rem; font-weight: 700; }
.empty-state { padding: 2.2rem 1rem; color: var(--muted); text-align: center; background: var(--surface-soft); border-radius: 14px; }
.empty-state > span { display: block; margin-bottom: .4rem; font-size: 1.8rem; }
.empty-state strong { display: block; color: var(--ink); }

.habit-list { display: grid; grid-auto-columns: minmax(132px, 1fr); grid-auto-flow: column; gap: .6rem; overflow-x: auto; padding-bottom: .2rem; scroll-snap-type: x mandatory; }
.habit-button { display: grid; min-height: 112px; padding: .85rem; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 15px 15px 9px 15px; cursor: pointer; text-align: left; scroll-snap-align: start; }
.habit-button > span { color: var(--forest); font-size: 1.35rem; font-weight: 800; }
.habit-button strong { align-self: end; font-size: .82rem; }
.habit-button small { color: var(--muted); font-size: .65rem; }
.habit-button.checked { color: #355b46; background: var(--forest-pale); border-color: #b0cbb0; }

.goal-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; margin-bottom: .75rem; }
.goal-summary > div { padding: .8rem .45rem; text-align: center; background: rgba(255,253,248,.76); border: 1px solid rgba(109,126,112,.18); border-radius: 13px; }
.goal-summary span, .goal-summary strong { display: block; }
.goal-summary span { color: var(--muted); font-size: .65rem; }
.goal-summary strong { margin-top: .15rem; color: var(--forest-dark); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.goal-list { display: grid; gap: .75rem; }
.goal-card { position: relative; overflow: hidden; padding: 1rem; background: #f9f7ee; border: 1px solid var(--line); border-radius: 16px 16px 10px 16px; }
.goal-card::after { position: absolute; right: -35px; top: -35px; width: 100px; height: 100px; background: var(--goal-tint,#dfe9d8); border-radius: 50%; content: ""; opacity: .8; }
.goal-head { position: relative; z-index: 1; display: flex; align-items: start; justify-content: space-between; gap: .75rem; }
.goal-title { display: flex; align-items: center; gap: .6rem; }
.goal-title > span { display: grid; width: 40px; height: 40px; place-items: center; color: var(--forest-dark); background: white; border-radius: 11px; font-size: 1.1rem; font-weight: 800; }
.goal-title h3 { margin: 0; font-size: .96rem; }
.goal-title small { color: var(--muted); font-size: .68rem; }
.goal-number { position: relative; z-index: 1; text-align: right; }
.goal-number strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.goal-number span { color: var(--muted); font-size: .68rem; }
.goal-progress { margin: 1rem 0 .7rem; }
.goal-footer { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.goal-footer > span { color: #84601c; font-size: .68rem; font-weight: 700; }
.goal-checkin { min-height: 36px; padding: .4rem .65rem; color: white; background: var(--forest); border: 0; border-radius: 9px; cursor: pointer; font-size: .72rem; font-weight: 800; }
.goal-checkin.pending { color: #795c1f; background: var(--sun-pale); cursor: default; }
.milestone-list { display: grid; grid-template-columns: repeat(2,1fr); gap: .6rem; }
.milestone-item { display: flex; align-items: center; gap: .6rem; padding: .75rem; background: var(--surface-soft); border-radius: 12px; }
.milestone-item > span { display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; color: #7c5b1b; background: var(--sun-pale); border-radius: 50%; }
.milestone-item strong, .milestone-item small { display: block; }
.milestone-item strong { font-size: .76rem; }
.milestone-item small { color: var(--muted); font-size: .62rem; }

.pet-heading, .reward-heading, .parent-heading { display: flex; align-items: start; justify-content: space-between; gap: .7rem; }
.ticket-chip, .review-count { flex: 0 0 auto; padding: .5rem .65rem; color: #6f531b; background: var(--sun-pale); border: 1px solid #dfc377; border-radius: 999px; font-size: .7rem; }
.ticket-chip { cursor: pointer; }
.pet-world { position: relative; min-height: 390px; overflow: hidden; background: linear-gradient(#d9eff0 0 60%, #b9d7a7 60%); border-radius: 28px 28px 16px 28px; box-shadow: var(--shadow); }
.world-sky { position: absolute; inset: 0 0 40%; overflow: hidden; }
.world-sky::before { position: absolute; top: 30px; right: 38px; width: 64px; height: 64px; background: var(--sun); border: 8px solid rgba(255,255,255,.42); border-radius: 50%; content: ""; }
.world-cloud { position: absolute; width: 68px; height: 20px; background: rgba(255,255,255,.72); border-radius: 999px; }
.world-cloud::before, .world-cloud::after { position: absolute; bottom: 0; background: inherit; border-radius: 50%; content: ""; }
.world-cloud::before { left: 11px; width: 30px; height: 30px; }.world-cloud::after { right: 9px; width: 38px; height: 38px; }
.cloud-a { top: 82px; left: 28px; }.cloud-b { top: 145px; right: 25px; transform: scale(.65); }
.world-ground { position: absolute; right: -15%; bottom: -90px; width: 125%; height: 270px; background: #82b277; border-radius: 50% 50% 0 0; transform: rotate(2deg); }
.world-ground::before { position: absolute; left: 9%; top: -30px; width: 72%; height: 130px; background: #a5c996; border-radius: 50%; content: ""; }
.pet-illustration { position: absolute; left: 50%; bottom: 30px; z-index: 3; width: 230px; transform: translateX(-50%); animation: pet-breathe 2.8s ease-in-out infinite; }
.pet-illustration svg { display: block; width: 100%; filter: drop-shadow(0 10px 12px rgba(41,66,50,.12)); }
.pet-illustration .tail { animation: tail-wag .75s ease-in-out infinite alternate; transform-origin: 177px 154px; }
.pet-illustration.hop { animation: pet-hop .7s ease-in-out 2; }
.pet-speech { position: absolute; top: -28px; right: -42px; max-width: 136px; padding: .55rem .65rem; background: rgba(255,255,255,.93); border: 1px solid rgba(84,104,90,.24); border-radius: 12px 12px 3px 12px; box-shadow: var(--shadow-soft); font-size: .68rem; font-weight: 700; }
.pet-level-badge { position: absolute; left: .9rem; bottom: .9rem; z-index: 4; display: flex; align-items: center; gap: .5rem; padding: .48rem .65rem; background: rgba(255,253,248,.88); border-radius: 10px; backdrop-filter: blur(7px); }
.pet-level-badge span { color: var(--muted); font-size: .68rem; }.pet-level-badge strong { color: var(--forest-dark); font-size: .8rem; }
.pet-vitals { display: grid; grid-template-columns: repeat(3,1fr); gap: .45rem; margin-top: .6rem; }
.pet-vitals > div { display: grid; gap: .25rem; padding: .65rem; background: rgba(255,253,248,.82); border: 1px solid rgba(110,127,113,.18); border-radius: 12px; }
.pet-vitals span { color: var(--muted); font-size: .65rem; }.pet-vitals strong { font-size: .7rem; font-variant-numeric: tabular-nums; }
.mini-track { height: 6px; overflow: hidden; background: #dce3d8; border-radius: 99px; }.mini-track i { display: block; width: 0; height: 100%; background: var(--forest); border-radius: inherit; transition: width .4s ease; }.mini-track.warm i { background: var(--sun); }.mini-track.rose i { background: var(--clay); }
.inventory-list { display: grid; grid-template-columns: repeat(4,1fr); gap: .5rem; }
.inventory-button { position: relative; display: grid; min-height: 94px; padding: .65rem .35rem; place-items: center; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.inventory-button > span { display: grid; width: 38px; height: 38px; place-items: center; color: var(--forest); background: white; border-radius: 50%; font-size: 1.15rem; font-weight: 800; }
.inventory-button strong { font-size: .68rem; }.inventory-button small { color: var(--muted); font-size: .6rem; }.inventory-button i { position: absolute; top: 5px; right: 5px; display: grid; width: 20px; height: 20px; place-items: center; color: white; background: var(--forest); border-radius: 50%; font-size: .6rem; font-style: normal; }
.inventory-button:disabled { opacity: .45; cursor: not-allowed; }
.incubator-card { display: grid; grid-template-columns: 94px minmax(0,1fr); align-items: center; gap: .9rem; margin-top: .75rem; padding: 1rem; background: linear-gradient(130deg,#eee7f4,#dce8f1); border: 1px solid #d1cedd; border-radius: 22px 22px 14px 22px; box-shadow: var(--shadow-soft); }
.egg-visual { position: relative; display: grid; width: 90px; height: 108px; place-items: center; background: radial-gradient(circle at 35% 25%,#fff 0 8%,#d2bddf 9% 100%); border: 4px solid rgba(92,76,112,.35); border-radius: 52% 48% 48% 52% / 62% 62% 38% 38%; box-shadow: inset -10px -12px 18px rgba(85,68,101,.13),0 10px 20px rgba(77,71,100,.12); transform: rotate(3deg); }
.egg-visual span { color: #7f6c9a; font-size: 1.8rem; }.incubator-copy h2 { margin-bottom: .25rem; }.incubator-copy > p:not(.kicker) { margin-bottom: .6rem; color: var(--muted); font-size: .72rem; }.egg-track > span { background: var(--violet); }.incubator-copy small { color: #685d7c; font-size: .65rem; }
.game-entry { display: grid; grid-template-columns: 80px minmax(0,1fr); align-items: center; gap: .8rem; background: #fff7df; border-color: #e8d49b; }.game-entry > .primary-button { grid-column: 1 / -1; }.game-entry p:not(.kicker) { margin: .2rem 0 0; color: var(--muted); font-size: .72rem; }
.game-art { position: relative; width: 74px; height: 74px; background: var(--sun-pale); border-radius: 50% 44% 50% 45%; }.game-art span { position: absolute; top: 15px; left: 20px; color: var(--sun); font-size: 2rem; }.game-art i,.game-art b { position: absolute; color: #d68b2c; }.game-art i { right: 5px; bottom: 14px; width: 16px; height: 16px; border: 3px solid currentColor; border-radius: 50%; }.game-art b { top: 5px; right: 10px; }
.pet-collection { display: grid; grid-template-columns: repeat(3,1fr); gap: .6rem; }.pet-card { display: grid; min-height: 104px; place-items: center; background: var(--surface-soft); border-radius: 14px; text-align: center; }.pet-card span { font-size: 2rem; filter: grayscale(.2); }.pet-card strong,.pet-card small { display: block; }.pet-card strong { font-size: .74rem; }.pet-card small { color: var(--muted); font-size: .6rem; }.pet-card.locked { opacity: .48; }.pet-card.locked span { filter: grayscale(1); }

.wallet-card { flex: 0 0 auto; min-width: 92px; padding: .7rem; color: #715315; background: var(--sun-pale); border: 1px solid #e1c579; border-radius: 14px; }.wallet-card span,.wallet-card strong { display: block; }.wallet-card span { font-size: .62rem; }.wallet-card strong { margin-top: .15rem; font-size: 1.2rem; }.wallet-card i { color: var(--sun); font-style: normal; }
.shop-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .65rem; }.shop-card { display: flex; min-height: 170px; flex-direction: column; padding: .85rem; background: var(--surface-soft); border-radius: 15px; }.shop-icon { display: grid; width: 48px; height: 48px; place-items: center; color: var(--forest); background: white; border-radius: 50%; font-size: 1.35rem; font-weight: 800; }.shop-card h3 { margin: .65rem 0 .15rem; font-size: .84rem; }.shop-card p { margin: 0 0 .65rem; color: var(--muted); font-size: .64rem; }.shop-card button { width: 100%; margin-top: auto; }
.family-reward-list { display: grid; gap: .55rem; }.family-reward { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .65rem; padding: .75rem; background: var(--surface-soft); border-radius: 13px; }.family-reward > span { display: grid; width: 40px; height: 40px; place-items: center; color: var(--clay); background: white; border-radius: 11px; font-size: 1.1rem; font-weight: 800; }.family-reward h3 { margin: 0; font-size: .78rem; }.family-reward p { margin: .1rem 0 0; color: var(--muted); font-size: .62rem; }.family-reward button { min-width: 66px; }
.history-list { display: grid; gap: .45rem; }.history-item { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }.history-item:last-child { border-bottom: 0; }.history-item strong,.history-item small { display: block; }.history-item strong { font-size: .76rem; }.history-item small { color: var(--muted); font-size: .62rem; }.history-cost { color: #7d5c18; font-size: .72rem; font-weight: 800; }

.review-count { color: #7f4636; background: var(--clay-pale); border-color: #dfb4a7; }.review-list { display: grid; gap: .6rem; }.review-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .65rem; padding: .8rem; background: var(--surface-soft); border-left: 4px solid var(--sun); border-radius: 13px; }.review-item h3 { margin: 0 0 .15rem; font-size: .82rem; }.review-item p { margin: 0; color: var(--muted); font-size: .65rem; }.review-actions { display: flex; align-items: center; gap: .35rem; }.review-actions button { min-height: 34px; padding: .35rem .55rem; font-size: .67rem; }
.parent-grid { display: grid; gap: .75rem; }.stacked-form { display: grid; gap: .8rem; }.stacked-form label,.settings-form label { position: relative; display: grid; gap: .35rem; color: var(--muted); font-size: .69rem; font-weight: 700; }.stacked-form input,.stacked-form select,.settings-form input,.settings-form select { width: 100%; min-height: 44px; padding: 0 .7rem; color: var(--ink); background: white; border: 1px solid #b9c3b8; border-radius: 9px; }.stacked-form input:focus,.stacked-form select:focus,.settings-form input:focus,.settings-form select:focus { border-color: var(--forest); outline: 3px solid rgba(47,103,80,.12); }.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }.field-suffix { position: absolute; right: .65rem; bottom: .75rem; color: var(--muted); font-size: .63rem; }.check-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: .5rem !important; }.check-label input { width: 18px; min-height: 18px; accent-color: var(--forest); }.settings-form { display: grid; gap: .7rem; }.install-guide { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1rem; padding: .8rem; background: var(--forest-pale); border-radius: 12px; }.install-guide strong { font-size: .78rem; }.install-guide p { margin: .15rem 0 0; color: #526b5c; font-size: .64rem; }

.app-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 40; display: grid; grid-template-columns: repeat(5,1fr); width: min(100%,1180px); margin: 0 auto; padding: .45rem .35rem calc(.45rem + env(safe-area-inset-bottom)); background: rgba(255,253,248,.96); border-top: 1px solid var(--line); box-shadow: 0 -10px 28px rgba(43,61,51,.1); backdrop-filter: blur(18px); }
.app-nav button { position: relative; display: grid; gap: .05rem; min-height: 52px; place-items: center; color: var(--muted); background: transparent; border: 0; border-radius: 12px; cursor: pointer; }.app-nav button > span { font-size: 1.2rem; font-weight: 800; }.app-nav button > b { font-size: .63rem; font-weight: 700; }.app-nav button.active { color: var(--forest-dark); background: var(--forest-pale); }.app-nav .pet-nav-button > span { display: grid; width: 38px; height: 38px; margin-top: -19px; place-items: center; color: white; background: var(--forest); border: 5px solid var(--surface); border-radius: 50%; box-shadow: 0 5px 14px rgba(47,103,80,.25); }.app-nav i { position: absolute; top: 5px; right: calc(50% - 17px); width: 8px; height: 8px; background: var(--clay); border: 2px solid white; border-radius: 50%; }

dialog { width: min(520px,calc(100% - 1.25rem)); max-height: min(88dvh,760px); padding: 0; overflow: auto; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 24px 24px 15px 24px; box-shadow: 0 24px 70px rgba(29,45,37,.28); }.focus-dialog::backdrop,.game-dialog::backdrop,.info-dialog::backdrop { background: rgba(26,39,33,.56); backdrop-filter: blur(5px); }.focus-content,.game-content,.info-dialog > div { position: relative; padding: 2.2rem 1.25rem 1.3rem; text-align: center; }.close-button { position: absolute; top: .75rem; right: .75rem; display: grid; width: 36px; height: 36px; place-items: center; color: var(--muted); background: var(--surface-soft); border: 0; border-radius: 50%; cursor: pointer; font-size: 1.25rem; }.timer-face { display: grid; width: 190px; height: 190px; margin: 1.5rem auto 1rem; place-items: center; color: var(--forest-dark); background: white; border: 11px solid var(--forest-pale); border-radius: 50%; box-shadow: inset 0 0 0 2px #b8d0b6; font-size: 2.4rem; font-weight: 850; font-variant-numeric: tabular-nums; }.focus-content > p:not(.kicker),.game-content > p:not(.kicker) { color: var(--muted); font-size: .8rem; }.dialog-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.2rem; }
.game-hud { display: flex; justify-content: space-between; margin: 1rem 0 .5rem; color: var(--muted); font-size: .74rem; }.game-board { position: relative; height: 300px; overflow: hidden; background: linear-gradient(#d9eff0 0 64%,#a8cc98 64%); border: 1px solid #b9cdb8; border-radius: 16px; }.sun-target { position: absolute; left: 44%; top: 38%; display: grid; width: 52px; height: 52px; place-items: center; color: #d9941d; background: #fff4c9; border: 3px solid #e5bc5c; border-radius: 50%; cursor: pointer; font-size: 1.55rem; box-shadow: 0 7px 16px rgba(165,119,27,.22); transition: left .16s ease,top .16s ease,transform .1s ease; }.sun-target:active { transform: scale(.88); }.game-content > .primary-button { width: 100%; margin-top: .7rem; }.info-dialog ol { display: grid; gap: .8rem; padding-left: 1.25rem; text-align: left; font-size: .82rem; }.dialog-note { padding: .7rem; color: #74551a; background: var(--sun-pale); border-radius: 10px; text-align: left; font-size: .72rem; }
.toast { position: fixed; left: 50%; bottom: calc(5.4rem + env(safe-area-inset-bottom)); z-index: 80; max-width: calc(100% - 1.5rem); padding: .7rem 1rem; color: white; background: var(--ink); border-radius: 999px; box-shadow: 0 12px 28px rgba(24,38,31,.24); opacity: 0; pointer-events: none; transform: translate(-50%,18px); transition: .24s ease; font-size: .78rem; }.toast.show { opacity: 1; transform: translate(-50%,0); }.celebration-layer { position: fixed; inset: 0; z-index: 70; overflow: hidden; pointer-events: none; }.spark { position: absolute; top: -16px; color: var(--spark-color); animation: spark-fall 1.5s cubic-bezier(.2,.65,.4,1) forwards; }

@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes star-float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(10deg); } }
@keyframes pet-breathe { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-4px); } }
@keyframes pet-hop { 0%,100% { transform: translateX(-50%) translateY(0); } 45% { transform: translateX(-50%) translateY(-24px) rotate(-2deg); } }
@keyframes tail-wag { from { transform: rotate(-8deg); } to { transform: rotate(13deg); } }
@keyframes spark-fall { to { transform: translate3d(var(--drift),105vh,0) rotate(720deg); opacity: .08; } }

@media (min-width: 760px) {
  .app-shell { padding-inline: 1rem; }
  .app-header { padding-inline: .5rem; }
  main { padding-inline: 0; }
  .today-hero { min-height: 350px; padding: 2rem; }
  .hero-copy { max-width: 62%; }
  .daily-progress { right: 2rem; bottom: 2rem; left: 2rem; }
  .quest-list { grid-template-columns: repeat(2,1fr); }
  .habit-list { grid-auto-flow: initial; grid-template-columns: repeat(3,1fr); overflow: visible; }
  .goal-list { grid-template-columns: repeat(2,1fr); }
  .pet-world { min-height: 470px; }
  .pet-illustration { width: 270px; }
  .inventory-list { grid-template-columns: repeat(5,1fr); }
  .incubator-card { grid-template-columns: 120px minmax(0,1fr); padding: 1.4rem; }
  .shop-grid { grid-template-columns: repeat(5,1fr); }
  .family-reward-list { grid-template-columns: repeat(2,1fr); }
  .parent-grid { grid-template-columns: repeat(2,1fr); }
  .settings-form { grid-template-columns: repeat(4,1fr); align-items: end; }
  .app-nav { bottom: 1rem; width: min(620px,calc(100% - 2rem)); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 32px rgba(43,61,51,.16); }
  .toast { bottom: 6.5rem; }
}

@media (min-width: 1020px) {
  .view[data-view="today"].active { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(320px,.8fr); gap: .75rem; }
  .view[data-view="today"] .today-hero { grid-column: 1 / -1; }
  .view[data-view="today"] .habit-strip { margin-top: .75rem; }
  .pet-vitals { max-width: 620px; margin-inline: auto; }
}

@media (max-width: 390px) {
  .app-header { padding-inline: .7rem; }
  .profile-chip strong { max-width: 9rem; }
  .install-button { display: none !important; }
  main { padding-inline: .55rem; }
  .today-hero { min-height: 318px; padding-inline: 1rem; }
  .hero-copy { max-width: 92%; }
  .hero-copy h1 { font-size: 1.75rem; }
  .daily-progress { right: .75rem; left: .75rem; }
  .content-block { padding-inline: .85rem; }
  .quest-card { grid-template-columns: auto minmax(0,1fr); }
  .quest-card > :last-child { grid-column: 2; justify-self: start; }
  .form-row { grid-template-columns: 1fr; }
  .inventory-list { grid-template-columns: repeat(3,1fr); }
  .shop-grid { grid-template-columns: 1fr 1fr; }
  .family-reward { grid-template-columns: auto minmax(0,1fr); }.family-reward button { grid-column: 2; justify-self: start; }
  .install-guide { align-items: stretch; flex-direction: column; }
}

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