/* Bloom Your Way: burgundy, blush pink, ivory and cream; warm garden atmosphere. */
:root {
  --burgundy: #7a1430;
  --burgundy-2: #8e1d3d;
  --burgundy-dark: #5c0c22;
  --ink: #6a0f2a;
  --blush: #f7d6d4;
  --blush-2: #f3c6c6;
  --ivory: #fdf4ee;
  --cream: #fae8de;
  --gold: #e7bf73;
  --pink: #f6a7b8;
  --text: #4b1324;
  --muted: #8a5a66;
  --shadow: 0 10px 30px rgba(92, 12, 34, .18);
  --radius: 22px;
  --serif: "Cormorant Garamond", "Lora", Georgia, serif;
  --serif2: "Lora", Georgia, serif;
  --script: "Great Vibes", "Cormorant Garamond", cursive;
  --sans: "Mulish", "Segoe UI", system-ui, sans-serif;
  --nav-h: 76px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.large-text { font-size: 112%; }
body {
  margin: 0; color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.45;
  background: #f2d9d2 url("../assets/garden-beds.webp") center / cover fixed;
  min-height: 100vh;
}
body::before { content: ""; position: fixed; inset: 0; background: rgba(250, 226, 220, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: -1; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.center { text-align: center; }
.muted { color: var(--muted); }

.app { position: relative; max-width: 860px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: linear-gradient(180deg, var(--ivory), var(--blush) 75%); box-shadow: 0 0 60px rgba(92, 12, 34, .18); overflow-x: hidden; }
.view { padding-bottom: calc(var(--nav-h) + 34px + env(safe-area-inset-bottom)); outline: none; }
.under-bar { padding-top: 78px; padding-left: 16px; padding-right: 16px; }

/* ---------- top bar ---------- */
.topbar { position: absolute; z-index: 40; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 16px 0; pointer-events: none; }
.topbar[hidden] { display: none; }
.topbar a { pointer-events: auto; }
.brand-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px 9px 12px; border-radius: 999px; text-decoration: none; color: #fff3ef; background: linear-gradient(180deg, var(--burgundy-2), var(--burgundy-dark)); box-shadow: 0 4px 14px rgba(60, 5, 20, .35); font-family: var(--serif2); font-size: 15px; letter-spacing: .04em; }
.brand-icon .ico { color: var(--pink); width: 22px; height: 22px; }
.brand-spark { color: var(--gold); font-size: 13px; }
.gear-btn { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #fff3ef; background: linear-gradient(180deg, var(--burgundy-2), var(--burgundy-dark)); box-shadow: 0 4px 14px rgba(60, 5, 20, .35); }
.gear-btn .ico { width: 26px; height: 26px; }

/* ---------- bottom nav ---------- */
.tabbar { position: fixed; z-index: 50; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 860px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 10px 6px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #8a1838, var(--burgundy-dark)); border-radius: 28px 28px 0 0; box-shadow: 0 -6px 24px rgba(60, 5, 20, .3); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: #f8dfe3; font-size: 14px; padding: 4px 2px 6px; border-radius: 16px; position: relative; }
.tabbar a .ico { width: 30px; height: 30px; color: #f6e7ea; }
.tabbar a.active { color: #fff; }
.tabbar a.active .ico { color: #ffd1dc; filter: drop-shadow(0 0 6px rgba(255, 190, 210, .7)); }
.tabbar a.active::after { content: ""; position: absolute; bottom: 0; left: 18%; right: 18%; height: 2px; border-radius: 2px; background: #fff3ef; }
.tabbar a:focus-visible { outline: 2px solid var(--gold); }

/* ---------- shared blocks ---------- */
.title-card { margin: 0 auto 14px; max-width: 620px; text-align: center; padding: 14px 22px 12px; background: rgba(253, 236, 230, .94); border-radius: 26px; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .7); }
.title-card h1 { margin: 0; display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--ink); font-size: clamp(30px, 6vw, 44px); line-height: 1.1; }
.title-card .title-ico { color: var(--burgundy); width: 34px; height: 34px; }
.title-card p { margin: 4px 0 0; color: var(--ink); font-size: 16px; }
.inline-heart { width: 16px; height: 16px; vertical-align: -2px; color: var(--burgundy); }
.count-line { text-align: center; color: var(--ink); font-family: var(--serif2); font-style: italic; margin: 6px 0 12px; }
.script-title { font-family: var(--script); font-weight: 400; color: var(--ink); margin: 0; font-size: clamp(54px, 12vw, 84px); line-height: 1; }
.tagline { font-family: var(--serif2); font-style: italic; margin: 4px 0 0; font-size: 18px; }
.script-head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-family: var(--script); font-weight: 400; color: var(--ink); font-size: clamp(32px, 6vw, 44px); }
.script-head::before, .script-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--ink)); }
.script-head::after { background: linear-gradient(90deg, var(--ink), transparent); }
.script-head span { white-space: nowrap; }
.big-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: min(560px, calc(100% - 32px)); margin: 18px auto 0; padding: 16px 26px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; color: #fff4f1; background: linear-gradient(180deg, var(--burgundy-2), var(--burgundy-dark)); box-shadow: 0 8px 22px rgba(92, 12, 34, .35), inset 0 1px 0 rgba(255, 255, 255, .2); font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(24px, 4.6vw, 32px); transition: transform .15s; }
.big-btn:hover { transform: translateY(-1px); }
.big-btn:active { transform: scale(.98); }
.big-btn .ico { width: 30px; height: 30px; }
.big-btn .ico.pink { color: var(--pink); }
.big-btn.small { width: auto; margin: 0; padding: 11px 22px; font-size: 21px; flex: 1; }
.big-btn.small .ico { width: 22px; height: 22px; }
.ghost-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1.5px solid var(--burgundy); background: rgba(255, 255, 255, .5); color: var(--ink); cursor: pointer; text-decoration: none; font-family: var(--serif2); font-size: 16px; flex: 1; }
.ghost-btn .ico { width: 20px; height: 20px; }
.ghost-btn.danger { color: #9b1027; border-color: #b0263c; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: rgba(253, 236, 230, .95); color: var(--ink); text-decoration: none; font-family: var(--serif2); font-weight: 600; box-shadow: var(--shadow); border: 1px solid #e7b9bd; }
.pill-btn .ico { color: var(--burgundy); }
.bar { height: 14px; border-radius: 999px; background: #f0c9cb; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--burgundy-dark), var(--burgundy-2)); transition: width .6s; }
.empty-note { margin: 12px 16px 0; padding: 14px 18px; border-radius: 18px; background: rgba(253, 236, 230, .95); text-align: center; font-family: var(--serif2); color: var(--ink); box-shadow: var(--shadow); }
.empty-note a { font-weight: 600; }
.flourish { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--ink); margin: -6px auto 8px; max-width: 520px; }
.flourish i { flex: 1; height: 1.5px; background: linear-gradient(90deg, transparent, var(--ink)); }
.flourish i:last-child { background: linear-gradient(90deg, var(--ink), transparent); }
.flourish .ico { width: 34px; height: 34px; }
.flourish.small { margin: 10px auto; max-width: 240px; }
.flourish.small .ico { width: 18px; height: 18px; }

/* ---------- garden scene ---------- */
.scene { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.scene-inner { position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 100%; aspect-ratio: 16 / 9; min-width: 100%; }
.scene-bg { width: 100%; height: 100%; object-fit: cover; }
.bloom { position: absolute; transform: translate(-50%, -78%); pointer-events: none; filter: saturate(1.05) drop-shadow(0 2px 2px rgba(60, 20, 10, .25)); }
.bloom.is-new { animation: bloomIn 1.2s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes bloomIn { from { transform: translate(-50%, -78%) scale(0); opacity: 0; } to { transform: translate(-50%, -78%) scale(1); opacity: 1; } }
.deco { position: absolute; transform: translate(-50%, -80%); pointer-events: none; }
.path-band { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 26%; object-fit: cover; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%); mask-image: linear-gradient(to bottom, transparent, #000 45%); opacity: .95; }
.flutter { position: absolute; width: 9%; top: 42%; left: 12%; z-index: 900; pointer-events: none; animation: flutter 14s ease-in-out infinite; }
@keyframes flutter { 0% { transform: translate(0, 0) rotate(-6deg); } 25% { transform: translate(140%, -40%) rotate(8deg) scaleX(.85); } 50% { transform: translate(300%, 20%) rotate(-4deg); } 75% { transform: translate(120%, 60%) rotate(6deg) scaleX(.9); } 100% { transform: translate(0, 0) rotate(-6deg); } }
html.calm .flutter, html.calm .bloom.is-new { animation: none; }

/* ---------- home ---------- */
.hero { position: relative; }
.hero-scene { aspect-ratio: auto; height: clamp(440px, 78vw, 640px); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(255, 220, 200, .25), transparent 25%, transparent 70%, rgba(250, 226, 220, .85)); }
.garden-badge { position: absolute; z-index: 5; top: calc(76px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); padding: 10px 26px; text-align: center; background: rgba(253, 236, 230, .95); border-radius: 18px; box-shadow: var(--shadow); white-space: nowrap; }
.gb-title { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 28px; color: var(--ink); }
.gb-title .ico { color: var(--burgundy); }
.gb-sub { display: flex; align-items: center; gap: 6px; justify-content: center; color: var(--ink); font-size: 17px; }
.gb-sub .ico.pink { color: #d23b67; width: 18px; height: 18px; }
.cta { position: absolute; z-index: 5; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 16px 30px; border-radius: 999px; text-decoration: none; color: #fff4f1; white-space: nowrap; background: linear-gradient(180deg, var(--burgundy-2), var(--burgundy-dark)); box-shadow: 0 10px 26px rgba(60, 5, 20, .45), inset 0 1px 0 rgba(255, 255, 255, .2); border: 1.5px solid rgba(255, 220, 225, .5); font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(24px, 5vw, 34px); }
.cta .ico { width: 30px; height: 30px; }
.welcome { text-align: center; margin: 8px 0 0; font-family: var(--serif2); font-style: italic; color: var(--ink); font-size: 18px; }
.reminder { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 12px 16px; border-radius: 18px; text-decoration: none; background: rgba(255, 255, 255, .7); border: 1px solid #e9b9be; color: var(--ink); }
.reminder > span { flex: 1; }
.reminder .ico { color: var(--burgundy); }
.explore { position: relative; z-index: 6; margin: 14px 16px 0; padding: 16px 16px 18px; border-radius: 30px; background: rgba(253, 238, 232, .96); box-shadow: var(--shadow); border: 1px solid #f0cfc8; }
.home .explore { margin-top: -6px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { display: block; border-radius: 20px; overflow: hidden; background: #fff6f1; text-decoration: none; box-shadow: 0 4px 12px rgba(92, 12, 34, .16); border: 1px solid #efd3cb; transition: transform .15s; }
.tile:hover { transform: translateY(-2px); }
.tile img { width: 100%; aspect-ratio: 228 / 138; object-fit: cover; }
.tile-label { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 8px 8px 8px 12px; font-family: var(--serif2); color: var(--text); font-size: 16px; }
.mini-go { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--burgundy); color: #fff; }
.mini-go .ico { width: 17px; height: 17px; }

/* ---------- my garden ---------- */
.garden-view { padding-top: calc(70px + env(safe-area-inset-top)); }
.garden-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 0 16px 12px; flex-wrap: wrap; }
.garden-head .tagline { color: var(--ink); }
.progress-card { min-width: 230px; padding: 12px 18px 14px; border-radius: 20px; background: rgba(253, 236, 230, .96); box-shadow: var(--shadow); border: 1px solid #ecc6c0; text-align: center; }
.pc-title { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--serif2); color: var(--ink); }
.pc-title .ico { color: var(--burgundy); }
.pc-num { font-family: var(--serif); font-weight: 700; font-size: 30px; color: var(--ink); margin-bottom: 6px; }
.garden-scene { margin: 0 12px; border-radius: 26px; box-shadow: var(--shadow); }
.garden-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 14px 16px 0; }
.flower-list { margin: 16px 16px 0; padding: 16px; border-radius: 26px; background: rgba(253, 238, 232, .96); box-shadow: var(--shadow); }
.flower-list ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.flower-list li { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; background: #fff7f3; border: 1px solid #f0d4cd; }
.flower-list li img { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; }
.flower-list li b { display: block; font-family: var(--serif2); color: var(--ink); }
.flower-list li span { font-size: 13px; color: var(--muted); }

/* ---------- challenges ---------- */
.challenges-view, .animals-view, .collection-view { min-height: 100vh; }
.ch-list { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.ch-card { display: flex; align-items: center; gap: 16px; padding: 10px 14px 10px 10px; border-radius: 24px; text-decoration: none; background: rgba(250, 222, 212, .95); border: 1.5px solid rgba(255, 255, 255, .85); box-shadow: 0 6px 16px rgba(92, 12, 34, .14); transition: transform .15s; }
.ch-card:hover { transform: translateY(-2px); }
.ch-img { width: clamp(110px, 24vw, 208px); aspect-ratio: 204 / 150; object-fit: cover; border-radius: 18px; flex: none; }
.ch-body { flex: 1; min-width: 0; }
.ch-body h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(22px, 4.4vw, 32px); color: var(--ink); line-height: 1.1; }
.ch-body h3 .ico { color: var(--burgundy); width: 24px; height: 24px; }
.ch-body p { margin: 0 0 6px; color: #4e1b25; font-size: clamp(14px, 2.6vw, 18px); }
.ch-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; color: #4e1b25; }
.ch-cat { margin-left: 8px; padding: 1px 10px; border-radius: 999px; background: rgba(122, 20, 48, .1); color: var(--ink); font-size: 13px; }
.ch-done { display: inline-flex; align-items: center; gap: 3px; padding: 1px 10px; border-radius: 999px; background: var(--burgundy); color: #fff; font-size: 13px; }
.ch-done .ico { width: 14px; height: 14px; }
.go { width: 54px; height: 54px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #a8274c, var(--burgundy-dark)); box-shadow: 0 4px 10px rgba(92, 12, 34, .35); }
.go .ico { width: 24px; height: 24px; }
.ch-card.done { background: rgba(250, 230, 224, .9); }
.ch-card.done .ch-img { filter: saturate(.85); }
.section-pill { margin: 26px auto 8px; width: fit-content; padding: 8px 26px; border-radius: 999px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 28px; color: var(--ink); background: rgba(253, 236, 230, .95); box-shadow: var(--shadow); }
.ch-card.promo { max-width: 760px; margin: 0 auto; }

/* ---------- challenge details ---------- */
.detail-view { position: relative; min-height: 100vh; background: linear-gradient(180deg, #fbe0dc, #f6d0cf); }
.detail-head { display: flex; align-items: center; justify-content: space-between; max-width: 760px; margin: 6px auto 0; }
.detail-head h1 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--ink); font-size: clamp(30px, 6vw, 46px); }
.spacer { width: 56px; }
.round-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; background: radial-gradient(circle at 35% 30%, #a8274c, var(--burgundy-dark)); box-shadow: 0 4px 12px rgba(92, 12, 34, .35); }
.round-btn .ico { width: 26px; height: 26px; }
.divider-flower { display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 0 auto 10px; color: var(--burgundy); }
.divider-flower::before, .divider-flower::after { content: ""; flex: 1; height: 1px; background: var(--ink); opacity: .6; }
.corner-art { position: absolute; bottom: calc(var(--nav-h) + 10px); width: clamp(110px, 24vw, 240px); pointer-events: none; z-index: 0; }
.corner-art.l { left: 0; } .corner-art.r { right: 0; }
.detail-card { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 16px 18px 20px; border-radius: 30px; background: rgba(253, 232, 228, .96); box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .8); }
.detail-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; align-items: center; }
.detail-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 24px; box-shadow: 0 6px 16px rgba(92, 12, 34, .2); }
.detail-title { text-align: center; }
.detail-title h2 { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 8px; font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--ink); font-size: clamp(28px, 5.6vw, 52px); line-height: 1.05; }
.detail-title h2 .ico { width: 42px; height: 42px; color: var(--burgundy); }
.detail-title p { margin: 0 0 10px; font-family: var(--serif2); font-style: italic; color: var(--ink); font-size: clamp(16px, 2.8vw, 22px); }
.cat-tag { display: inline-block; padding: 2px 12px; border-radius: 999px; background: rgba(122, 20, 48, .1); color: var(--ink); font-size: 14px; }
.heart-doodle { display: block; margin: 10px auto 0; width: 40px; height: 40px; color: var(--burgundy); }
.line-head { display: flex; align-items: center; gap: 14px; margin: 20px 0 10px; font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--ink); font-size: clamp(24px, 4.6vw, 34px); }
.line-head::before, .line-head::after { content: ""; flex: 1; height: 1px; background: var(--ink); opacity: .7; }
.task { display: flex; align-items: center; gap: 18px; width: 100%; text-align: left; background: none; border: 0; padding: 4px 12px; cursor: pointer; font-family: var(--serif2); font-size: clamp(17px, 3.2vw, 24px); color: #3d0f1c; }
.tick { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 2px solid #b0263c; display: grid; place-items: center; color: transparent; transition: .2s; }
.task.checked .tick { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
.tick .ico { width: 28px; height: 28px; }
.why { margin-top: 18px; padding: 16px 20px; border-radius: 22px; background: rgba(248, 205, 206, .7); text-align: center; }
.why h4 { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 6px; font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--ink); font-size: clamp(22px, 4.2vw, 32px); }
.why h4 .ico { color: #c2405f; width: 34px; height: 34px; }
.why p { margin: 0; font-family: var(--serif2); color: #4a1420; font-size: clamp(15px, 2.8vw, 20px); }
.done-note { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px auto 0; color: var(--ink); font-family: var(--serif2); font-style: italic; text-align: center; padding: 0 16px; }
.detail-view .big-btn { position: relative; z-index: 1; }

/* ---------- settings ---------- */
.settings-view { position: relative; min-height: 100vh; padding: calc(16px + env(safe-area-inset-top)) 16px calc(var(--nav-h) + 40px); background: linear-gradient(180deg, #fde9e2, #f9dcd6); }
.settings-head { position: relative; display: flex; align-items: center; justify-content: center; min-height: 120px; }
.settings-head .round-btn { position: absolute; left: 0; top: 10px; }
.sbutterfly { position: absolute; right: 0; top: 0; width: clamp(90px, 22vw, 190px); pointer-events: none; }
.settings-list { position: relative; z-index: 2; display: grid; gap: 14px; max-width: 760px; margin: 6px auto 0; }
.set-row { display: flex; align-items: center; gap: 20px; padding: 16px 26px; border-radius: 40px; border: 1.5px solid #9b3651; background: rgba(250, 212, 212, .85); cursor: pointer; text-align: left; font-family: var(--serif2); font-weight: 500; font-size: clamp(20px, 3.8vw, 28px); color: var(--ink); transition: background .15s; }
.set-row:hover { background: rgba(247, 198, 200, .95); }
.set-row span { flex: 1; }
.row-ico { width: 42px; height: 42px; color: var(--burgundy-dark); }
.row-go { width: 26px; height: 26px; color: var(--ink); }
.logout { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 14px; width: min(440px, 70%); margin: 26px auto 0; padding: 14px; border-radius: 26px; border: 1.5px solid #9b3651; background: rgba(250, 212, 212, .85); cursor: pointer; font-family: var(--serif2); font-size: clamp(22px, 4vw, 30px); color: var(--ink); }
.logout .ico { width: 32px; height: 32px; }
.sig { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 14px; margin: 22px auto 0; max-width: 360px; font-family: var(--script); font-size: 34px; color: var(--ink); }
.sig i { flex: 1; height: 1px; background: var(--ink); }
.settings-view .corner-art { bottom: var(--nav-h); width: clamp(84px, 20vw, 200px); z-index: 1; opacity: .95; }
@media (max-width: 640px) { .logout { width: 62%; } .sig { font-size: 28px; max-width: 60%; } }

/* ---------- premium ---------- */
.premium-view { padding-bottom: 10px; }
.premium-hero { position: relative; padding-top: calc(80px + env(safe-area-inset-top)); text-align: center; background: radial-gradient(ellipse at 50% 20%, #fff2e3, #f6d3c4 60%, #e9b7a5); }
.premium-hero .flourish { max-width: 380px; margin: 0 auto; }
.premium-title { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--ink); font-size: clamp(54px, 13vw, 92px); line-height: 1; }
.premium-sub { margin: 6px 0 0; font-family: var(--serif2); font-style: italic; color: var(--ink); font-size: clamp(22px, 4.6vw, 30px); line-height: 1.3; }
.premium-bed { width: 100%; margin-top: -10px; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%); mask-image: linear-gradient(to bottom, transparent, #000 18%); }
.premium-bed.rounded { border-radius: 26px; -webkit-mask-image: none; mask-image: none; margin: 0 auto; width: calc(100% - 32px); box-shadow: var(--shadow); }
.offer { position: relative; margin: -70px 16px 0; padding: 30px 20px 22px; text-align: center; border-radius: 34px; background: rgba(253, 236, 229, .97); border: 1.5px solid #9b3651; box-shadow: var(--shadow); }
.offer-bow { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); width: 76px; height: 76px; color: var(--burgundy); }
.offer h2 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--ink); font-size: clamp(28px, 6vw, 42px); }
.offer > p { margin: 6px 0 0; font-family: var(--serif2); font-style: italic; color: var(--ink); font-size: clamp(18px, 3.6vw, 24px); }
.perks { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 6px; }
.perks > div { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 8px; font-family: var(--serif2); color: var(--ink); font-size: clamp(14px, 2.8vw, 19px); }
.perks > div + div { border-left: 1.5px solid #9b3651; }
.perks .ico { width: 48px; height: 48px; color: var(--burgundy-dark); }
.maybe { display: block; margin: 16px auto 0; background: none; border: 0; cursor: pointer; font-family: var(--serif2); font-style: italic; font-size: 22px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.premium-home .ph-head { text-align: center; margin-bottom: 10px; }
.tagline.dark { color: var(--ink); }
.ph-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 760px; margin: 14px auto; }
.ph-stats div { text-align: center; padding: 10px; border-radius: 18px; background: rgba(253, 236, 230, .95); box-shadow: var(--shadow); }
.ph-stats b { display: block; font-family: var(--serif); font-size: 30px; color: var(--ink); }
.ph-stats span { font-size: 13px; color: var(--muted); }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; max-width: 760px; margin: 0 auto; }
.ph-card { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; border-radius: 24px; text-decoration: none; background: rgba(250, 222, 212, .95); border: 1.5px solid rgba(255, 255, 255, .85); box-shadow: 0 6px 16px rgba(92, 12, 34, .14); }
.ph-card img { width: 110px; height: 84px; object-fit: cover; border-radius: 16px; flex: none; }
.ph-card div { flex: 1; }
.ph-card h3 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 24px; color: var(--ink); line-height: 1.1; }
.ph-card p { margin: 4px 0 0; font-size: 14px; }
.ph-card .go { width: 44px; height: 44px; }

/* ---------- journal ---------- */
.journal-view { min-height: 100vh; padding: calc(14px + env(safe-area-inset-top)) 16px calc(var(--nav-h) + 30px); background: #fdf1ea; }
.journal-head { position: relative; text-align: center; padding: 6px 70px 10px; }
.journal-head h1 { margin: 0; font-family: var(--serif2); font-weight: 600; color: var(--ink); font-size: clamp(40px, 9vw, 70px); line-height: .98; }
.jb { position: absolute; width: clamp(70px, 14vw, 140px); }
.jb.l { left: 2%; top: 20px; } .jb.r { right: 10%; top: 60px; width: clamp(64px, 13vw, 130px); }
.close-x { position: absolute; right: 0; top: 0; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #9b1e43, var(--burgundy-dark)); box-shadow: 0 4px 12px rgba(92, 12, 34, .3); }
.close-x .ico { width: 26px; height: 26px; }
.journal-card { max-width: 760px; margin: 14px auto 0; padding: 18px 20px 14px; border-radius: 32px; border: 1.5px solid var(--burgundy); background: #fdf3ee; box-shadow: 0 8px 18px rgba(92, 12, 34, .12); }
.journal-card h2 { margin: 0; font-family: var(--serif2); font-weight: 600; color: var(--ink); font-size: clamp(30px, 6vw, 46px); }
.jsub { margin: 0 0 6px; font-family: var(--serif2); font-style: italic; color: var(--ink); font-size: clamp(18px, 3.6vw, 26px); }
.lined { display: block; width: 100%; min-height: 430px; resize: vertical; border: 0; outline: none; padding: 0 6px; color: #3a0d18; font-family: var(--serif2); font-size: 20px; line-height: 44px; background: transparent repeating-linear-gradient(180deg, transparent 0 43px, rgba(122, 20, 48, .55) 43px 44px); background-attachment: local; }
.lined.small { min-height: 260px; font-size: 18px; }
.saved { text-align: right; font-size: 13px; color: var(--muted); margin-top: 6px; }
.journal-foot { text-align: center; font-family: var(--serif2); font-style: italic; color: var(--ink); font-size: clamp(20px, 4vw, 28px); margin: 22px 0 0; }
.journal-view .big-btn { font-family: var(--serif2); font-style: normal; }
.entries { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.entries button { width: 100%; text-align: left; cursor: pointer; padding: 12px 16px; border-radius: 16px; border: 1px solid #e3b9bd; background: #fff8f4; }
.entries b { display: block; font-family: var(--serif2); color: var(--ink); }
.entries span { color: var(--muted); font-size: 14px; }

/* ---------- animals ---------- */
.unlock-bar { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 0 auto 6px; padding: 12px 20px; border-radius: 999px; background: rgba(253, 236, 230, .95); box-shadow: var(--shadow); font-size: 18px; color: var(--ink); }
.unlock-bar .ico { color: var(--burgundy); width: 28px; height: 28px; }
.unlock-bar .bar { flex: 1; min-width: 80px; }
.animal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; max-width: 820px; margin: 10px auto 0; }
.animal { position: relative; border-radius: 22px; overflow: hidden; border: 2.5px solid #f7e2da; background: #e9d0c4; box-shadow: 0 6px 14px rgba(60, 20, 10, .25); aspect-ratio: 372 / 410; padding: 0; }
.animal img { width: 100%; height: 100%; object-fit: cover; }
.aname { position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 4px 4px 5px; border-radius: 0 0 18px 18px; text-align: center; color: #fff3ef; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(14px, 2.6vw, 22px); background: linear-gradient(180deg, var(--burgundy-2), var(--burgundy-dark)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lock-ico { position: absolute; left: 50%; bottom: 26%; transform: translateX(-50%); color: #f5e6cf; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.lock-ico .ico { width: 38px; height: 38px; }
.animal.mystery { cursor: pointer; }
.animal.mystery img { filter: brightness(.12) blur(2px); }
.animal.mystery .lock-ico { color: var(--gold); animation: twinkle 1.6s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: translateX(-50%) scale(1.25) rotate(20deg); } }

/* animal garden */
.animal-garden-view { padding-top: calc(70px + env(safe-area-inset-top)); }
.ag-head { text-align: center; margin-bottom: 10px; }
.ag-head .script-title { font-size: clamp(48px, 11vw, 78px); }
.ag-pill { display: inline-flex; align-items: center; gap: 12px; margin-top: 6px; padding: 8px 24px; border-radius: 999px; background: #fdf0e6; border: 1.5px solid var(--gold); box-shadow: var(--shadow); font-family: var(--script); font-size: clamp(28px, 6vw, 40px); color: var(--ink); }
.ag-pill .ico { color: var(--burgundy); width: 28px; height: 28px; }
.ag-scene { margin: 0 12px; border-radius: 26px; box-shadow: var(--shadow); }
.critters { position: absolute; inset: 0; z-index: 1200; }
.critter { position: absolute; width: 11%; cursor: pointer; transform: translate(-50%, -85%) scale(var(--s, 1)); transition: left 2.6s ease-in-out, top 2.6s ease-in-out; filter: drop-shadow(0 6px 4px rgba(40, 20, 10, .35)); }
.critter.flip { transform: translate(-50%, -85%) scale(var(--s, 1)) scaleX(-1); }
.critter.walk { animation: bob .65s ease-in-out 4; }
.critter.hop { animation: hop .7s ease-out 2; }
@keyframes bob { 50% { margin-top: -1.4%; } }
@keyframes hop { 40% { margin-top: -5%; } 70% { margin-top: 0; } }
html.calm .critter { transition: none; animation: none !important; }

/* collections */
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; max-width: 820px; margin: 0 auto; }
.coll-card { position: relative; display: flex; flex-direction: column; padding: 0 0 10px; border-radius: 22px; overflow: hidden; cursor: pointer; text-align: center; border: 2.5px solid #f7e2da; background: rgba(253, 236, 230, .97); box-shadow: 0 6px 14px rgba(60, 20, 10, .18); }
.coll-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.coll-card.locked img { filter: saturate(.6) brightness(.85); }
.coll-card.active { border-color: var(--burgundy); }
.coll-card .lock-ico { bottom: auto; top: 30%; }
.cname { margin-top: 8px; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 22px; color: var(--ink); }
.tag { align-self: center; margin-top: 4px; padding: 2px 12px; border-radius: 999px; font-size: 13px; background: rgba(122, 20, 48, .1); color: var(--ink); }
.tag.on { background: var(--burgundy); color: #fff; }
.tag.prem { background: linear-gradient(90deg, #f1d39a, #e7bf73); color: #5c0c22; }

/* ---------- modal & toast ---------- */
#modal-root { position: fixed; inset: 0; z-index: 100; display: none; }
#modal-root.open { display: grid; place-items: center; }
.modal-back { position: absolute; inset: 0; background: rgba(60, 8, 22, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .2s; }
.modal { position: relative; width: min(520px, calc(100% - 28px)); max-height: calc(100% - 40px); overflow: auto; padding: 22px 22px 20px; border-radius: 28px; background: linear-gradient(180deg, #fff6f1, #fbe3de); box-shadow: 0 20px 50px rgba(60, 8, 22, .4); animation: pop .3s cubic-bezier(.2, 1.3, .4, 1); }
.m-title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--ink); font-size: 32px; }
.m-title.center { justify-content: center; text-align: center; }
.m-title .ico { color: var(--burgundy); width: 30px; height: 30px; }
.m-body { margin: 0 0 12px; font-family: var(--serif2); font-size: 18px; color: #3d0f1c; }
.m-note { font-size: 14px; color: var(--muted); }
.m-note .ico { color: #c9902e; width: 16px; height: 16px; vertical-align: -2px; }
.m-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.m-actions.col { flex-direction: column; }
.field { display: block; font-family: var(--serif2); color: var(--ink); margin: 6px 0 12px; }
.field input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: 18px var(--sans); border-radius: 14px; border: 1.5px solid #d3a2a9; background: #fff; color: var(--text); }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #efcfcf; font-family: var(--serif2); }
.toggle { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #efcfcf; cursor: pointer; }
.toggle > span { flex: 1; }
.toggle b { display: block; font-family: var(--serif2); color: var(--ink); font-size: 18px; }
.toggle small { color: var(--muted); }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle i { width: 54px; height: 32px; border-radius: 999px; background: #e3bcc0; position: relative; transition: .2s; flex: none; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: .2s; }
.toggle input:checked + i { background: var(--burgundy); }
.toggle input:checked + i::after { left: 25px; }
.toggle input:focus-visible + i { outline: 2px solid var(--gold); }
.bullets { padding-left: 20px; font-family: var(--serif2); color: #3d0f1c; }
.bullets li { margin: 4px 0; }
.faq { border-bottom: 1px solid #efcfcf; padding: 10px 0; }
.faq summary { cursor: pointer; font-family: var(--serif2); font-weight: 600; color: var(--ink); }
.faq p { margin: 6px 0 0; color: #3d0f1c; }
.bloom-burst { position: relative; width: 180px; height: 180px; margin: 0 auto 6px; display: grid; place-items: center; }
.bloom-pop { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; animation: grow 1s cubic-bezier(.2, 1.4, .4, 1) both; }
.spk { position: absolute; left: 50%; top: 50%; color: #e7b44f; width: 22px; height: 22px; margin: -11px; animation: burst 1.3s var(--d, 0s) ease-out both; }
.spk .ico { width: 22px; height: 22px; }
@keyframes burst { 0% { transform: rotate(var(--a)) translateY(0) scale(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: rotate(var(--a)) translateY(-100px) scale(1); opacity: 0; } }
@keyframes grow { from { transform: scale(0) rotate(-30deg); } to { transform: scale(1) rotate(0); } }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.reveal-box { position: relative; display: block; width: 220px; height: 240px; margin: 4px auto 10px; padding: 0; border: 3px solid var(--gold); border-radius: 26px; overflow: visible; cursor: pointer; background: #2a1016; }
.reveal-box img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; filter: brightness(.05) blur(3px); transition: filter 1s ease, transform .6s; }
.reveal-box .spk { display: none; }
.reveal-box .tap { position: absolute; left: 0; right: 0; bottom: 14px; color: #f5d9a0; font-family: var(--serif); font-style: italic; font-size: 24px; animation: twinkle2 1.4s ease-in-out infinite; }
@keyframes twinkle2 { 50% { opacity: .5; } }
.reveal-box.revealed img { filter: none; transform: scale(1.04); }
.reveal-box.revealed .spk { display: block; }
.reveal-box.revealed .tap { display: none; }
.reveal-name { visibility: hidden; }
.modal.is-revealed .reveal-name { visibility: visible; animation: pop .4s; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: calc(var(--nav-h) + 26px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 20px; border-radius: 999px; background: var(--burgundy-dark); color: #fff; font-family: var(--serif2); box-shadow: var(--shadow); transition: .3s; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sheet .m-actions .ghost-btn { flex: 1; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  :root { --nav-h: 68px; }
  .tabbar a { font-size: 11.5px; }
  .tabbar a .ico { width: 26px; height: 26px; }
  .brand-pill { font-size: 13px; padding: 8px 14px 8px 10px; }
  .gear-btn { width: 44px; height: 44px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .garden-badge { padding: 8px 18px; }
  .gb-title { font-size: 23px; }
  .gb-sub { font-size: 15px; }
  .hero-scene { height: 420px; }
  .cta { padding: 13px 22px; }
  .ch-card { gap: 10px; padding: 8px 8px 8px 8px; border-radius: 20px; }
  .ch-img { width: 96px; aspect-ratio: 1 / 1; }
  .go { width: 40px; height: 40px; }
  .go .ico { width: 18px; height: 18px; }
  .ch-cat { display: none; }
  .detail-top { grid-template-columns: 1fr; }
  .detail-img { aspect-ratio: 4 / 3; }
  .animal-grid { grid-template-columns: repeat(3, 1fr); gap: 9px; }
  .set-row { padding: 12px 18px; gap: 14px; }
  .row-ico { width: 32px; height: 32px; }
  .settings-head { min-height: 100px; }
  .perks .ico { width: 36px; height: 36px; }
  .offer { padding: 28px 12px 18px; }
  .critter { width: 15%; }
  .ag-scene { aspect-ratio: 1 / 1; }
  .journal-head { padding: 6px 56px 10px; }
  .close-x { width: 52px; height: 52px; }
  .lined { font-size: 18px; min-height: 360px; }
  .coll-grid { grid-template-columns: repeat(2, 1fr); }
  .garden-scene { aspect-ratio: 16 / 10; }
}
@media (prefers-reduced-motion: reduce) {
  .flutter, .bloom.is-new, .critter, .spk, .bloom-pop { animation: none !important; transition: none !important; }
}

.random-btn { margin: 4px auto 10px; width: min(420px, calc(100% - 32px)); padding: 12px 22px; font-size: clamp(22px, 4.4vw, 28px); }
.random-btn .ico { width: 28px; height: 28px; }
