[hidden] { display: none !important; }
.plus-card { background: linear-gradient(135deg, color-mix(in srgb, #ffd23f 22%, var(--card)), color-mix(in srgb, #c58bff 22%, var(--card))); }
.plus-card h2 { margin: 0 0 4px; }
.plus-perks { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.legal h2 { margin: 18px 0 6px; font-size: 18px; }
.legal p, .legal li { font-size: 15px; line-height: 1.5; }
.legal ul { padding-inline-start: 20px; margin: 0; }
.legal-langs a { margin: 0 2px; }
.legal-langs a[aria-current] { font-weight: 700; }
.says-link { color: var(--accent); text-decoration: underline; word-break: break-all; }
.view-toggle { position: absolute; top: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; line-height: 1; padding: 0; background: color-mix(in srgb, var(--card) 80%, transparent); box-shadow: var(--shadow); z-index: 2; }
.pet-stage { position: relative; }
.room-bg { display: none; }
.pet-stage.room { width: 100%; aspect-ratio: 360 / 260; border-radius: 18px; overflow: hidden; margin: 8px 0; }
.pet-stage.room .room-bg { display: block; position: absolute; inset: 0; line-height: 0; }
.pet-stage.room .room-bg svg { width: 100%; height: 100%; }
.pet-stage.room .pet { position: absolute; left: calc(105 / 360 * 100%); width: calc(150 / 360 * 100%); }
.pet-stage.room .pet > svg { width: 100% !important; height: auto !important; max-width: none; }
.admin h2 { margin: 20px 0 8px; font-size: 17px; }
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.admin-tile { padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.admin-value { font-size: 22px; font-weight: 800; }
.admin-label { font-size: 12px; color: var(--muted); }
.admin-bars { display: flex; flex-direction: column; gap: 6px; }
.admin-bar-row { display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; }
.admin-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-bar { height: 12px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.admin-bar-fill { display: block; height: 100%; border-radius: 6px; background: var(--accent); }
.admin-bar-value { text-align: end; font-variant-numeric: tabular-nums; }
.admin-payments { padding-inline-start: 18px; font-size: 13px; }
.plus-teaser { display: block; width: 100%; margin-top: 10px; padding: 10px 14px; border-radius: 14px; text-align: start; font-weight: 600; background: linear-gradient(135deg, color-mix(in srgb, #ffd23f 22%, var(--card)), color-mix(in srgb, #c58bff 22%, var(--card))); color: inherit; }
.stageup { text-align: center; }
.stageup h2 { margin: 6px 0 4px; }
.stageup-pet { display: flex; justify-content: center; line-height: 0; margin: 6px 0; }
.stageup-text { margin: 0 0 14px; }
.stageup .secondary { margin-bottom: 8px; }
.referral-tiers { display: flex; justify-content: center; gap: 12px; margin: 12px 0 6px; }
.referral-tier { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 16px; background: var(--soft); min-width: 76px; opacity: .75; }
.referral-tier.owned { opacity: 1; box-shadow: 0 0 0 2px var(--accent) inset; }
.referral-thumb { width: 56px; height: 56px; border-radius: 12px; line-height: 0; display: flex; align-items: center; justify-content: center; }
.referral-need { font-weight: 700; font-size: 13px; }
.plus-monthly { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--card) 70%, transparent); font-weight: 600; }
.plus-monthly-thumb { width: 56px; height: 56px; flex: none; line-height: 0; }
.plus-status { font-weight: 700; text-align: center; margin: 8px 0; }
.plus-badge { margin-inline-start: 6px; display: inline-block; animation: plus-twinkle 2.4s ease-in-out infinite; }
@keyframes plus-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.25) rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .plus-badge { animation: none; } }
:root {
  --bg: #fff6ea;
  --card: #ffffff;
  --text: #3b2a1e;
  --muted: #9a8573;
  --accent: #f08a3e;
  --accent-text: #ffffff;
  --soft: #fff0dc;
  --danger: #e5484d;
  --radius: 22px;
  --shadow: 0 6px 18px rgba(120, 72, 30, 0.08);
  --tint-pet: linear-gradient(170deg, #fff3e0, #ffe0bf);
  --tint-question: linear-gradient(160deg, #fff8e6, #ffeccc);
  --tint-inbox: linear-gradient(160deg, #ffe9f0, #ffd6e4);
  --tint-crisis: #e3f3ff;
  --field: rgba(255, 255, 255, 0.75);
  --chart-line: #c96a24;
  --good: #2e7d32;
}

:root[data-tg] {
  --bg: var(--tg-theme-secondary-bg-color, #fff6ea);
  --card: var(--tg-theme-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #3b2a1e);
  --muted: var(--tg-theme-hint-color, #9a8573);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tg]) {
    --bg: #1d1712;
    --card: #2a221b;
    --text: #f5e9dc;
    --muted: #b09c88;
    --soft: #3a2e23;
    --shadow: none;
    --tint-pet: linear-gradient(170deg, #3b2b1e, #4a3220);
    --tint-question: linear-gradient(160deg, #3a3020, #47391f);
    --tint-inbox: linear-gradient(160deg, #3d2430, #4a2b3b);
    --tint-crisis: #1f3242;
    --field: rgba(0, 0, 0, 0.25);
    --chart-line: #f08a3e;
    --good: #7bd17f;
  }
}

:root[data-scheme="dark"] {
  --soft: color-mix(in srgb, var(--text) 10%, var(--card));
  --shadow: none;
  --tint-pet: linear-gradient(170deg, #3b2b1e, #4a3220);
  --tint-question: linear-gradient(160deg, #3a3020, #47391f);
  --tint-inbox: linear-gradient(160deg, #3d2430, #4a2b3b);
  --tint-crisis: #1f3242;
  --field: rgba(0, 0, 0, 0.25);
  --chart-line: #f08a3e;
  --good: #7bd17f;
}

:root[data-species="capybara"][data-scheme="light"] {
  --bg: #fff6ea;
  --card: #ffffff;
  --soft: #fff0dc;
  --text: #3b2a1e;
  --muted: #7a614c;
  --accent: #b45a1b;
  --accent-text: #ffffff;
  --tint-pet: linear-gradient(170deg, #fff3e0, #ffe0bf);
  --tint-question: linear-gradient(160deg, #fff3e0, #fff0dc);
  --chart-line: #b45a1b;
  --shadow: 0 6px 18px rgba(60, 40, 30, 0.08);
  --field: rgba(255, 255, 255, 0.75);
}

:root[data-species="capybara"][data-scheme="dark"] {
  --bg: #1d1712;
  --card: #2a221b;
  --soft: #3a2e23;
  --text: #f5e9dc;
  --muted: #c2ab95;
  --accent: #f2a365;
  --accent-text: #2b1a0c;
  --tint-pet: linear-gradient(170deg, #3b2b1e, #4a3220);
  --tint-question: linear-gradient(160deg, #3b2b1e, #3a2e23);
  --chart-line: #f2a365;
  --shadow: none;
  --field: rgba(0, 0, 0, 0.25);
}

:root[data-species="cat"][data-scheme="light"] {
  --bg: #fff5f3;
  --card: #ffffff;
  --soft: #ffe9e4;
  --text: #3d2629;
  --muted: #7d575b;
  --accent: #b8355f;
  --accent-text: #ffffff;
  --tint-pet: linear-gradient(170deg, #fff0ec, #ffd9cf);
  --tint-question: linear-gradient(160deg, #fff0ec, #ffe9e4);
  --chart-line: #b8355f;
  --shadow: 0 6px 18px rgba(60, 40, 30, 0.08);
  --field: rgba(255, 255, 255, 0.75);
}

:root[data-species="cat"][data-scheme="dark"] {
  --bg: #1f1517;
  --card: #2c1f22;
  --soft: #3d2a2f;
  --text: #f8e9ec;
  --muted: #c9a7ad;
  --accent: #ff8fb0;
  --accent-text: #2b0d17;
  --tint-pet: linear-gradient(170deg, #3d2328, #4c2a32);
  --tint-question: linear-gradient(160deg, #3d2328, #3d2a2f);
  --chart-line: #ff8fb0;
  --shadow: none;
  --field: rgba(0, 0, 0, 0.25);
}

:root[data-species="fox"][data-scheme="light"] {
  --bg: #fff4ec;
  --card: #ffffff;
  --soft: #ffe6d6;
  --text: #3b2418;
  --muted: #7b5644;
  --accent: #b5420f;
  --accent-text: #ffffff;
  --tint-pet: linear-gradient(170deg, #ffeede, #ffcfae);
  --tint-question: linear-gradient(160deg, #ffeede, #ffe6d6);
  --chart-line: #b5420f;
  --shadow: 0 6px 18px rgba(60, 40, 30, 0.08);
  --field: rgba(255, 255, 255, 0.75);
}

:root[data-species="fox"][data-scheme="dark"] {
  --bg: #1f150f;
  --card: #2d1f17;
  --soft: #3e2a1f;
  --text: #f8ebe2;
  --muted: #cba892;
  --accent: #ff9a62;
  --accent-text: #2b1206;
  --tint-pet: linear-gradient(170deg, #40261a, #52301f);
  --tint-question: linear-gradient(160deg, #40261a, #3e2a1f);
  --chart-line: #ff9a62;
  --shadow: none;
  --field: rgba(0, 0, 0, 0.25);
}

:root[data-species="bunny"][data-scheme="light"] {
  --bg: #f8f4ff;
  --card: #ffffff;
  --soft: #efe7ff;
  --text: #2e2640;
  --muted: #6f6488;
  --accent: #6b45b8;
  --accent-text: #ffffff;
  --tint-pet: linear-gradient(170deg, #f6f0ff, #e6d9ff);
  --tint-question: linear-gradient(160deg, #f6f0ff, #efe7ff);
  --chart-line: #6b45b8;
  --shadow: 0 6px 18px rgba(60, 40, 30, 0.08);
  --field: rgba(255, 255, 255, 0.75);
}

:root[data-species="bunny"][data-scheme="dark"] {
  --bg: #17141f;
  --card: #221d2e;
  --soft: #2f2840;
  --text: #efe9fb;
  --muted: #b4a9cc;
  --accent: #b9a0ff;
  --accent-text: #1a1030;
  --tint-pet: linear-gradient(170deg, #2a2240, #352a52);
  --tint-question: linear-gradient(160deg, #2a2240, #2f2840);
  --chart-line: #b9a0ff;
  --shadow: none;
  --field: rgba(0, 0, 0, 0.25);
}

:root[data-species="red_panda"][data-scheme="light"] {
  --bg: #f3f9f1;
  --card: #ffffff;
  --soft: #e3f2e1;
  --text: #1f2e23;
  --muted: #4f6857;
  --accent: #2e7a4b;
  --accent-text: #ffffff;
  --tint-pet: linear-gradient(170deg, #eef7ea, #d2ecc9);
  --tint-question: linear-gradient(160deg, #eef7ea, #e3f2e1);
  --chart-line: #2e7a4b;
  --shadow: 0 6px 18px rgba(60, 40, 30, 0.08);
  --field: rgba(255, 255, 255, 0.75);
}

:root[data-species="red_panda"][data-scheme="dark"] {
  --bg: #121a14;
  --card: #1c261e;
  --soft: #26342a;
  --text: #e7f3ea;
  --muted: #a5c2ad;
  --accent: #7fd39b;
  --accent-text: #0b2414;
  --tint-pet: linear-gradient(170deg, #1f3324, #264030);
  --tint-question: linear-gradient(160deg, #1f3324, #26342a);
  --chart-line: #7fd39b;
  --shadow: none;
  --field: rgba(0, 0, 0, 0.25);
}

:root[data-species="otter"][data-scheme="light"] {
  --bg: #f1f8fb;
  --card: #ffffff;
  --soft: #dff0f6;
  --text: #1d2f36;
  --muted: #4b6670;
  --accent: #1d6a85;
  --accent-text: #ffffff;
  --tint-pet: linear-gradient(170deg, #eaf6fb, #cde8f3);
  --tint-question: linear-gradient(160deg, #eaf6fb, #dff0f6);
  --chart-line: #1d6a85;
  --shadow: 0 6px 18px rgba(60, 40, 30, 0.08);
  --field: rgba(255, 255, 255, 0.75);
}

:root[data-species="otter"][data-scheme="dark"] {
  --bg: #10181c;
  --card: #19242a;
  --soft: #223239;
  --text: #e5f2f6;
  --muted: #a2bfc9;
  --accent: #6cc7e6;
  --accent-text: #062330;
  --tint-pet: linear-gradient(170deg, #1b2f38, #213b46);
  --tint-question: linear-gradient(160deg, #1b2f38, #223239);
  --chart-line: #6cc7e6;
  --shadow: none;
  --field: rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

:root {
  --top-inset: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --bottom-inset: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
}

html { overscroll-behavior: none; }
main { overflow-x: clip; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-text-size-adjust: 100%; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }
img, svg { -webkit-user-drag: none; }

body {
  margin: 0;
  transition: background-color .4s ease, color .4s ease;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main { max-width: 480px; margin: 0 auto; padding: calc(12px + var(--top-inset)) 16px 40px; }

.card {
  transition: background .4s ease;
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

h1, h2, h3 { margin: 0 0 10px; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.error { color: var(--danger); min-height: 1em; margin: 6px 0 0; font-size: 14px; }
.row { display: flex; gap: 8px; align-items: center; }
.between-top { justify-content: space-between; align-items: center; }
.spacer { flex: 1; }

label { display: block; margin: 14px 0 0; font-size: 14px; color: var(--muted); }

input, textarea, select {
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1.5px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-radius: 14px;
  padding: 12px;
}
input, textarea { width: 100%; margin-top: 6px; }
textarea { resize: none; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }

button {
  font: inherit;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--soft);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s;
}
button:active { transform: scale(0.97); }
button:disabled { opacity: .5; }
button.primary { background: var(--accent); color: var(--accent-text); font-weight: 600; }
button.wide { width: 100%; margin-top: 12px; }
button.secondary { background: none; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); font-weight: 600; margin-top: 8px; }
button.link { background: none; width: 100%; color: var(--accent); margin-top: 6px; }
button.link-inline { background: none; padding: 4px 0; color: var(--accent); }
button.danger-link { color: var(--danger); font-size: 14px; }

.hero { text-align: center; padding-top: 28px; }
.hero-pet { display: flex; justify-content: center; margin-bottom: 8px; }
.hero label { text-align: start; }
.species-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 4px; }
.species-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; font-size: 13px; background: var(--soft); }
.species-btn svg { display: block; }
.species-btn { position: relative; }
.species-btn.locked-species svg { opacity: 0.55; filter: grayscale(0.3); }
.species-price { position: absolute; top: 4px; right: 6px; font-size: 11px; font-weight: 800; background: var(--card); border-radius: 999px; padding: 1px 6px; }
.species-btn.active { background: color-mix(in srgb, var(--accent) 20%, var(--card)); outline: 2px solid var(--accent); }

.topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.chip {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--card);
  font-weight: 700;
  font-size: 15px;
  margin: 0;
  box-shadow: var(--shadow);
}
.icon-btn { background: var(--card); border-radius: 999px; width: 42px; height: 42px; padding: 0; font-size: 20px; box-shadow: var(--shadow); }

.pet-card { position: relative; text-align: center; padding-top: 22px; background: var(--tint-pet); }
.pet-card.decorated .pet-name,
.pet-card.decorated .pet-meta {
  display: inline-block;
  color: #3b2a1e;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 2px 12px;
}
.pet-card.decorated .pet-meta { margin-top: 4px; }
.pet-name { font-weight: 800; font-size: 20px; }
.bubble {
  display: inline-block;
  max-width: 92%;
  margin: 10px 0 4px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  color: #3b2a1e;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(120, 72, 30, 0.1);
}
.small-bubble { font-size: 14px; margin-top: 4px; }
.pet { display: flex; justify-content: center; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; line-height: 0; }
.pet svg { overflow: visible; }
.pet > svg { max-width: 76vw; height: auto; }
.pet.bounce { animation: bounce .5s; }
.pet.wiggle { animation: wiggle .5s; }
.pet.evolve { animation: evolve 1.2s; }
.pet { transform-origin: 50% 100%; touch-action: manipulation; -webkit-touch-callout: none; }
.pet.hop { animation: hop .6s ease-out; }
.pet.hop-big { animation: hop-big .9s ease-in-out; }
.pet.snuggle { animation: snuggle .9s ease-in-out infinite; }
.pb-ears, .pb-look { transform-box: fill-box; transform-origin: 50% 100%; }
.pet.idle-ears .pb-ears { animation: ear-flick .7s ease-in-out; }
.pet.idle-look .pb-look { animation: look-around 2.4s ease-in-out; }
.pet-meta { color: var(--muted); font-size: 14px; }
.small-meta { font-size: 13px; margin-top: 2px; }
.share { margin-top: 12px; font-size: 14px; padding: 8px 14px; background: rgba(255, 255, 255, 0.7); color: #3b2a1e; }

.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; background: var(--soft); }
.mood-emoji { font-size: 28px; line-height: 1; }
.mood-label { font-size: 11px; color: var(--muted); }
.mood.active { background: color-mix(in srgb, var(--accent) 22%, var(--card)); outline: 2px solid var(--accent); }

.tasks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--soft);
  cursor: pointer;
  transition: background .2s;
}
.task-emoji { font-size: 22px; }
.task-title { flex: 1; }
.check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--muted) 50%, transparent);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  flex: 0 0 auto;
}
.task.done { background: color-mix(in srgb, #7ccf7a 25%, var(--card)); }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
.task.done .check { background: #4caf50; border-color: #4caf50; }
.remove { padding: 4px 10px; background: none; color: var(--danger); font-weight: 700; }
.task-picker { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.task-picker input { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { padding: 8px 12px; font-size: 14px; border-radius: 999px; }

.energy { height: 14px; border-radius: 999px; background: var(--soft); overflow: hidden; margin: 6px 0 8px; }
.energy-bar { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #ffd54a, #ffa62b); transition: width .5s ease; }
.energy-bar.full { box-shadow: 0 0 12px #ffc107; }
.adv-story { display: flex; gap: 12px; align-items: flex-start; background: var(--soft); border-radius: 16px; padding: 12px; }
.adv-story p { margin: 0; }
.souvenir { font-size: 38px; line-height: 1; }

.refl-text { font-style: italic; margin: 0 0 4px; }
.screen-enter > * { animation: screen-in .32s cubic-bezier(.2, .8, .2, 1) both; }
.screen-enter > *:nth-child(2) { animation-delay: .03s; }
.screen-enter > *:nth-child(3) { animation-delay: .06s; }
.screen-enter > *:nth-child(4) { animation-delay: .09s; }
.screen-enter > *:nth-child(n+5) { animation-delay: .12s; }
@keyframes screen-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tab-icon { line-height: 0; color: var(--muted); transition: color .2s, transform .2s; }
.tab.active .tab-icon { color: var(--accent); transform: translateY(-1px); }
.icon-btn { display: grid; place-items: center; color: var(--text); }
.icon-label { display: inline-flex; align-items: center; gap: 6px; }
.icon-label svg { flex: 0 0 auto; }
.empty-state { text-align: center; padding: 22px 18px; }
.empty-art { display: flex; justify-content: center; line-height: 0; margin-bottom: 6px; opacity: 0.9; }
.room-scene { border-radius: 18px; overflow: hidden; line-height: 0; margin-bottom: 10px; cursor: pointer; }
.room-scene svg, .shop-preview svg { max-width: 100%; height: auto; }
.room-scene svg, .shop-preview svg[viewBox="0 0 360 260"] { width: 100%; height: auto; display: block; }
.pet-card .pet-actions { margin-top: 12px; }
.pet-card .pet-actions .share { margin-top: 0; }
.event-card { background: var(--tint-question); }
.event-head { display: flex; align-items: center; gap: 12px; }
.event-head h2 { margin: 0; }
.event-reward { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 16px; background: var(--field); display: grid; place-items: center; line-height: 0; }
.event-card .course-dots { margin-top: 10px; }
.shop-tile { position: relative; }
.shop-tile.unavailable .shop-thumb { opacity: 0.45; }
.event-badge { position: absolute; top: 4px; right: 6px; font-size: 14px; }
.album-progress { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; margin: 4px 0 10px; }
.album-bar { height: 100%; background: linear-gradient(90deg, #ffd54a, #f08a3e); border-radius: 999px; }
.album-milestones { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.milestone { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.milestone.reached { background: color-mix(in srgb, #ffd54a 35%, var(--card)); color: var(--text); font-weight: 700; }
.album-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.album-cell { position: relative; aspect-ratio: 1; padding: 0; display: grid; place-items: center; border-radius: 12px; }
.album-emoji { font-size: 26px; line-height: 1; }
.album-cell.locked .album-emoji { font-size: 18px; color: var(--muted); font-weight: 800; }
.album-badge { position: absolute; right: 2px; bottom: 1px; font-size: 10px; font-weight: 700; color: var(--muted); }
.album-detail { display: flex; gap: 12px; align-items: center; background: var(--soft); border-radius: 14px; padding: 12px; margin-top: 10px; }
.album-detail p { margin: 4px 0 0; }
.album-detail-emoji { font-size: 40px; line-height: 1; }
body.with-tabbar main { padding-bottom: calc(96px + var(--bottom-inset)); }
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  justify-content: space-around;
  padding: 6px 8px calc(6px + var(--bottom-inset));
  background: var(--card);
  box-shadow: 0 -4px 16px rgba(120, 72, 30, 0.1);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; background: none; border-radius: 12px; max-width: 96px; }
.tab-label { font-size: 11px; color: var(--muted); }
.tab.active { background: var(--soft); }
.tab.active .tab-label { color: var(--text); font-weight: 700; }
.first-steps { background: var(--tint-question); }
.fs-list { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }
.fs-list li.done { color: var(--good); text-decoration: line-through; }
.fs-congrats { font-weight: 700; margin: 12px 0 0; }
.course-dots { display: flex; gap: 6px; margin: 2px 0 10px; }
.course-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 30%, transparent); }
.course-dots .dot.done { background: #4caf50; }
.course-dots .dot.current { background: var(--accent); transform: scale(1.3); }
.course-step { margin: 4px 0 6px; }
.course-tip { margin: 0; font-size: 15px; }
.course-done { color: var(--good); font-weight: 700; margin-top: 12px; }
.course-badge { font-weight: 700; margin: 4px 0; }
.hero-stat { display: flex; align-items: center; gap: 16px; }
.hero-emoji { font-size: 56px; line-height: 1; }
.hero-number { font-size: 40px; font-weight: 800; line-height: 1.1; }
.chart { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: color-mix(in srgb, var(--muted) 25%, transparent); stroke-width: 1; }
.chart-axis { fill: var(--muted); font-size: 10px; }
.chart-line { fill: none; stroke: var(--chart-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--chart-line); stroke: var(--card); stroke-width: 2; }
.chart-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-hit { fill: transparent; cursor: pointer; }
.chart-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); background: var(--text); color: var(--card); padding: 6px 10px; border-radius: 10px; font-size: 13px; white-space: nowrap; pointer-events: none; }
.chart-table summary { cursor: pointer; color: var(--accent); font-size: 14px; margin-top: 8px; }
.helpers { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.helpers li { display: flex; gap: 10px; align-items: flex-start; }
.helper-emoji { font-size: 24px; line-height: 1.2; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--soft); border-radius: 14px; padding: 10px; text-align: center; }
.tile-value { font-size: 18px; font-weight: 800; }
.inbox-card { background: var(--tint-inbox); }
.inbox { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.invite { background: var(--soft); border-radius: 16px; padding: 14px; }
.invite p { margin: 6px 0 0; }
.friend-row { display: flex; align-items: center; gap: 12px; }
.friend-pet { flex: 0 0 auto; line-height: 0; }
.friend-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.gifts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.gift { font-size: 24px; padding: 6px 12px; border-radius: 999px; }
.exercises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.exercise { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; font-size: 14px; }
.exercise-emoji { font-size: 28px; line-height: 1; }
.exercise-sub { font-size: 12px; color: var(--muted); }
.exercise.done { background: color-mix(in srgb, #7ccf7a 25%, var(--card)); }
.exercise.done .exercise-sub { color: var(--good); font-weight: 800; }
.exercise-screen { text-align: start; }
.breath-stage { position: relative; height: 260px; display: grid; place-items: center; margin: 10px 0; }
.breath-ring { position: absolute; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 198, 255, 0.45), rgba(124, 198, 255, 0)); opacity: 0.35; }
.breath-pet { position: relative; line-height: 0; }
.breath-phase { text-align: center; font-size: 26px; font-weight: 800; min-height: 36px; }
.ground-pet { display: flex; justify-content: center; margin: 6px 0; line-height: 0; }
.ground-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 10px; }
.ground-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 30%, transparent); }
.ground-dots .dot.current { background: var(--accent); transform: scale(1.3); }
.ground-dots .dot.done { background: #4caf50; }
.exercise-screen input { margin-top: 10px; }
.gratitude-line { background: var(--soft); border-radius: 14px; padding: 10px; font-size: 14px; }
.question-card { background: var(--tint-question); }
.question-card h2 { margin-bottom: 12px; }
.question-card input { margin-top: 0; background: var(--field); }
.crisis { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: var(--tint-crisis); }
.crisis p { margin: 6px 0; font-size: 14px; }
.about li { flex-direction: column; gap: 2px; }

.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; color: var(--text); font-size: 15px; }
.switch + .switch { margin-top: 14px; }
.switch input[type="checkbox"] { width: 22px; height: 22px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
.switch select { padding: 6px 8px; }

.history { list-style: none; padding: 0; margin: 0; }
.history li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--muted) 15%, transparent); font-size: 14px; }
.history li:last-child { border-bottom: 0; }

.souvenir-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.souvenir-item { font-size: 30px; background: var(--soft); border-radius: 14px; padding: 6px 10px; }
.day-mood { font-size: 26px; }
.adv-line { background: var(--soft); border-radius: 14px; padding: 10px; font-size: 14px; }

.shop-preview { display: flex; justify-content: center; border-radius: 18px; padding: 10px 0; margin-bottom: 10px; background: var(--tint-pet); line-height: 0; }
.tryon { text-align: center; }
.tryon-name { font-weight: 700; min-height: 22px; }
.balance { margin-top: 10px; }
.shop-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.shop-tab { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; font-size: 14px; }
.shop-tab.active { background: var(--accent); color: var(--accent-text); }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shop-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 2px solid transparent; font-size: 13px; }
.shop-tile.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.shop-thumb { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; line-height: 0; }
.shop-name { text-align: center; line-height: 1.2; }
.shop-price { font-weight: 700; font-size: 12px; color: var(--muted); }
.rarity-rare .shop-thumb { box-shadow: 0 0 0 2px #7cc6ff inset; }
.rarity-epic .shop-thumb { box-shadow: 0 0 0 2px #b388ff inset; }
.rarity-legendary .shop-thumb { box-shadow: 0 0 0 2px #ffd54a inset, 0 0 12px rgba(255, 213, 74, 0.6); }
.shop { list-style: none; padding: 0; margin: 10px 0 0; }
.shop li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--muted) 15%, transparent); }
.shop li:last-child { border-bottom: 0; }
.shop .preview { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 28px; flex: 0 0 auto; background: var(--soft); }
.shop .name { flex: 1; }
.shop button { min-width: 96px; padding: 8px 12px; font-size: 14px; }
.shop button.equipped { background: var(--accent); color: var(--accent-text); }

.float { position: fixed; pointer-events: none; font-size: 28px; animation: float-up 1.4s ease-out forwards; z-index: 10; }
.toasts { position: fixed; left: 50%; top: calc(12px + var(--top-inset)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 20; width: min(92vw, 420px); }
.toast { background: #3b2a1e; color: #fff; padding: 10px 14px; border-radius: 16px; font-weight: 600; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.18); animation: toast-in .3s ease-out, toast-out .4s ease-in 2.6s forwards; }

.pb-bob { animation: pb-bob 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.pb-breathe { animation: pb-breathe 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.pb-blink { animation: pb-blink 5s infinite; transform-box: fill-box; transform-origin: 50% 50%; }
.pb-orange { animation: pb-orange 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.pb-sparkle { animation: pb-twinkle 2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
.pb-zzz { animation: pb-zzz 2.4s ease-in-out infinite; }

@keyframes pb-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes pb-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.02, 0.98); } }
@keyframes pb-blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes pb-orange { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-4deg); } }
@keyframes pb-twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
@keyframes pb-zzz { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-6px); } }
@keyframes bounce { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.08) translateY(-8px); } }
@keyframes hop { 0%, 100% { transform: none; } 20% { transform: scale(1.08, .9); } 50% { transform: translateY(-22px) scale(.95, 1.06); } 78% { transform: scale(1.06, .94); } }
@keyframes hop-big { 0%, 100% { transform: none; } 15% { transform: scale(1.1, .88); } 50% { transform: translateY(-46px) rotate(360deg); } 85% { transform: scale(1.08, .92); } }
@keyframes snuggle { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-4deg) scale(1.03, .97); } 75% { transform: rotate(4deg) scale(1.03, .97); } }
@keyframes ear-flick { 0%, 100% { transform: none; } 30% { transform: scaleY(.86); } 60% { transform: scaleY(1.06) rotate(-3deg); } }
@keyframes look-around { 0%, 100% { transform: none; } 20%, 40% { transform: translateX(-3.5px); } 60%, 80% { transform: translateX(3.5px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes evolve { 0% { transform: scale(1); filter: brightness(1); } 40% { transform: scale(.8); filter: brightness(1.8); } 70% { transform: scale(1.12); filter: brightness(1.3); } 100% { transform: scale(1); filter: brightness(1); } }
@keyframes float-up { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-90px) scale(1.4); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px); } }

@media (prefers-reduced-motion: reduce) {
  .screen-enter > *,
  .pb-bob, .pb-breathe, .pb-blink, .pb-orange, .pb-sparkle, .pb-zzz, .pet, .float, .toast,
  .pet .pb-ears, .pet .pb-look { animation: none !important; }
}

.gift-head, .visitor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.visitor-head { justify-content: flex-start; }
.visitor-card { background: var(--tint-pet); display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.visitor-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.visitor-card .primary { padding: 10px 14px; white-space: nowrap; }
.visitor-emoji { font-size: 38px; line-height: 1; animation: knock 1.2s ease-in-out infinite; transform-origin: 50% 100%; }
.gift-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 10px 0; }
.gift-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 10px; background: color-mix(in srgb, var(--muted) 12%, transparent); font-size: 11px; }
.gift-day.done { background: color-mix(in srgb, #4caf50 22%, transparent); }
.gift-day.current { background: var(--accent); color: var(--accent-text); transform: scale(1.06); }
.gift-day-prize { font-weight: 700; font-size: 13px; }
.gift-box { display: block; margin: 6px auto; font-size: 56px; line-height: 1; background: none; padding: 4px; }
.gift-box.ready { animation: gift-wobble 2.4s ease-in-out infinite; }
.gift-box.opening { animation: gift-open .7s ease-in-out; }
.gift-box:disabled { opacity: 1; }
.gift-text { text-align: center; }
.freeze-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.freeze-buttons { display: flex; gap: 12px; white-space: nowrap; }
@keyframes knock { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-10deg); } 80% { transform: rotate(8deg); } 90% { transform: rotate(-4deg); } }
@keyframes gift-wobble { 0%, 70%, 100% { transform: rotate(0) scale(1); } 76% { transform: rotate(-8deg) scale(1.05); } 82% { transform: rotate(8deg) scale(1.05); } 88% { transform: rotate(-4deg); } }
@keyframes gift-open { 0% { transform: scale(1); } 30% { transform: scale(.85, 1.1) rotate(-6deg); } 60% { transform: scale(1.25) rotate(6deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .visitor-emoji, .gift-box.ready, .gift-box.opening { animation: none !important; } }

.chip-tap { border: none; cursor: pointer; font: inherit; color: inherit; }
.gift-btn { position: relative; }
.gift-btn-icon { font-size: 20px; line-height: 1; }
.gift-btn.ready .gift-btn-icon { display: inline-block; animation: gift-wobble 2.4s ease-in-out infinite; }
.badge-dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #ff5a5f; box-shadow: 0 0 0 2px var(--card); }
.event-card.compact { padding: 10px 14px; }
.event-head { display: flex; align-items: center; gap: 12px; width: 100%; background: none; padding: 0; text-align: start; color: inherit; font: inherit; }
.event-head .event-reward { width: 40px; height: 40px; flex: none; line-height: 0; }
.event-head-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.event-chevron { font-size: 22px; color: var(--muted); transition: transform .2s; }
.event-chevron.open { transform: rotate(90deg); }
.event-more { margin-top: 10px; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 40; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; width: min(560px, 100%); transform: translateY(100%); z-index: 41;
  background: var(--card); border-radius: 22px 22px 0 0; padding: 10px 16px calc(18px + var(--bottom-inset));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .2); transition: transform .28s ease-out; max-height: 85vh; max-height: min(85dvh, calc(100dvh - var(--top-inset) - 24px)); overflow-y: auto; overscroll-behavior: contain; }
.sheet.open { transform: none; }
.screen-enter > .sheet, .screen-enter > .sheet-backdrop { animation: none; }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--muted) 40%, transparent); margin: 0 auto 8px; }
.sheet-close { width: 34px; height: 34px; font-size: 15px; box-shadow: none; background: color-mix(in srgb, var(--muted) 14%, transparent); }
.freeze-box { margin-top: 12px; padding: 12px; border-radius: 14px; background: color-mix(in srgb, var(--muted) 10%, transparent); }
.freeze-box .freeze-row { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .gift-btn.ready .gift-btn-icon, .sheet { animation: none !important; transition: none !important; } }