:root {
  --bg: #FBF6EF; --bg2: #F2EBE1; --card: #FFFFFF; --ink: #3A3550; --ink2: #7D7692; --line: #EDE5DA;
  --sage: #9CCBA9; --sage-d: #5E9C74; --lav: #C5B6EA; --lav-d: #8A72C9; --peach: #F7C2AA; --peach-d: #E58E6C;
  --sky: #A9CBEA; --sky-d: #5D97CC; --sun: #F7D774; --rose: #F2B3C4;
  --shadow: 0 6px 22px rgba(90, 70, 50, .07);
  --radius: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1D1A28; --bg2: #2A2639; --card: #27233A; --ink: #F1ECFA; --ink2: #A9A2C0; --line: #383350;
    --sage: #6FA382; --sage-d: #5E9C74; --lav: #8D7CC4; --lav-d: #9C86DA; --peach: #C98B73; --peach-d: #D9825F;
    --sky: #5D86AD; --sun: #D9B954; --rose: #B97A8D;
    --shadow: 0 6px 22px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #1D1A28; --bg2: #2A2639; --card: #27233A; --ink: #F1ECFA; --ink2: #A9A2C0; --line: #383350;
    --sage: #6FA382; --sage-d: #5E9C74; --lav: #8D7CC4; --lav-d: #9C86DA; --peach: #C98B73; --peach-d: #D9825F;
    --sky: #5D86AD; --sun: #D9B954; --rose: #B97A8D;
    --shadow: 0 6px 22px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Nunito, ui-rounded, system-ui, sans-serif; font-size: 16px; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overscroll-behavior-y: none; -webkit-user-select: none; user-select: none; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60vw 40vh at 90% -5%, color-mix(in srgb, var(--lav) 28%, transparent), transparent 70%),
              radial-gradient(60vw 40vh at -10% 30%, color-mix(in srgb, var(--peach) 22%, transparent), transparent 70%),
              radial-gradient(70vw 40vh at 100% 100%, color-mix(in srgb, var(--sage) 22%, transparent), transparent 70%); }
body.locked { overflow: hidden; }
input, textarea, .j-text, .paper { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; text-align: inherit; }
input, textarea, select { font: inherit; font-size: 16px; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
.boot { display: grid; place-items: center; min-height: 100dvh; font-size: 64px; animation: breathe 2.4s ease-in-out infinite; }

.app { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 14px) 16px calc(100px + env(safe-area-inset-bottom)); }
main > div { animation: fadeUp .35s ease both; }
.page { font-size: 29px; font-weight: 900; letter-spacing: -.3px; margin: 6px 0 2px; line-height: 1.15; }
.sub { color: var(--ink2); margin: 0 0 16px; font-weight: 600; }
.muted { color: var(--ink2); font-weight: 600; }
.small { font-size: 14px; }
.mt { margin-top: 14px; }
.center { text-align: center; }
.center-block { display: block; margin: 12px auto; }
.spacer { height: 16px; }
.note { text-align: center; color: var(--ink2); font-size: 14px; margin: 14px 8px; }
.note.warn { color: var(--peach-d); font-weight: 700; }
.label { font-size: 13px; font-weight: 800; color: var(--ink2); text-transform: uppercase; letter-spacing: .6px; margin: 16px 0 8px; }

/* nav */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center; gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--card) 80%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line); }
.app.framed { padding-top: 0; padding-bottom: 40px; }
.app.framed .nav { position: sticky; top: 0; bottom: auto; margin: 0 -16px 12px; padding: 6px 8px; border-top: 0; border-bottom: 1px solid var(--line); }
.nav button { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 5px; border-radius: 16px;
  font-size: 11.5px; font-weight: 800; color: var(--ink2); transition: color .2s, background .2s; }
.nav svg { width: 26px; height: 26px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.nav button.on { color: var(--lav-d); background: color-mix(in srgb, var(--lav) 18%, transparent); }
.nav button.on svg { transform: translateY(-1px) scale(1.08); }

/* cards & basics */
.card { display: block; width: 100%; background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card h2 { font-size: 17px; font-weight: 900; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pill { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--sage) 30%, transparent); color: var(--sage-d); margin-left: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; min-height: 48px; border-radius: 16px;
  font-weight: 900; background: var(--lav-d); color: #fff; transition: transform .15s, opacity .2s, background .2s; text-align: center; }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; }
.btn.block { width: 100%; margin-bottom: 10px; }
.btn.big { min-height: 58px; font-size: 18px; border-radius: 20px; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 12px; }
.btn.soft { background: var(--bg2); color: var(--ink); }
.btn.sage { background: var(--sage-d); }
.btn.peach { background: var(--peach-d); }
.btn.danger { background: var(--peach-d); color: #fff; }
.link { color: var(--lav-d); font-weight: 800; font-size: 14px; padding: 6px 2px; }
.x { width: 34px; height: 34px; border-radius: 50%; color: var(--ink2); font-size: 14px; flex: none; }
.x:active { background: var(--bg2); }
.input { width: 100%; padding: 13px 14px; border-radius: 15px; border: 2px solid var(--line); background: var(--card); outline: none; transition: border-color .2s; }
.input:focus { border-color: var(--lav); }
.input.big { font-size: 18px; padding: 15px 16px; }
textarea.input { resize: none; line-height: 1.55; display: block; }
.input::placeholder { color: color-mix(in srgb, var(--ink2) 70%, transparent); }
.inline-add { display: flex; gap: 8px; margin-top: 10px; }
.inline-add .input { flex: 1; }
.row-2 { display: flex; gap: 8px; }
.emoji-in { width: 58px !important; flex: none; text-align: center; font-size: 22px; padding: 10px 4px; }
.time-in { width: 108px !important; flex: none; padding: 10px 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 14px; border-radius: 999px; background: var(--bg2); font-weight: 800; font-size: 15px; border: 2px solid transparent; transition: all .18s; }
.chip:active { transform: scale(.95); }
.chip.on { background: color-mix(in srgb, var(--lav) 32%, var(--card)); border-color: var(--lav-d); }
.chip small { font-weight: 700; opacity: .8; }
.chip.ache.lvl1 { background: color-mix(in srgb, var(--sun) 45%, var(--card)); border-color: var(--sun); }
.chip.ache.lvl2 { background: color-mix(in srgb, var(--peach) 55%, var(--card)); border-color: var(--peach-d); }
.chip.ache.lvl3 { background: color-mix(in srgb, var(--rose) 70%, var(--card)); border-color: #D97A93; }
.small-gap { gap: 14px; margin-top: 6px; }

.seg { display: flex; background: var(--bg2); border-radius: 17px; padding: 4px; margin-bottom: 16px; }
.seg button { flex: 1; padding: 10px 4px; border-radius: 13px; font-weight: 800; font-size: 15px; color: var(--ink2); text-align: center; transition: all .2s; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .07); }

.empty { text-align: center; color: var(--ink2); padding: 14px 10px; font-weight: 600; }
.empty-e { font-size: 34px; margin-bottom: 4px; }

/* ticks */
.tick { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.tick:last-child { border-bottom: 0; }
.tick .t { flex: 1; font-weight: 700; font-size: 16.5px; cursor: pointer; }
.tick-sub { font-size: 13px; color: var(--ink2); font-weight: 700; }
.tick.done .t { color: var(--ink2); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--sage); }
.check { width: 32px; height: 32px; border-radius: 50%; border: 2.5px solid var(--sage); flex: none; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.check svg { width: 17px; height: 17px; stroke: #fff; opacity: 0; transition: opacity .2s; }
.check.on { background: var(--sage-d); border-color: var(--sage-d); animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
.check.on svg { opacity: 1; }
.time { font-size: 13px; font-weight: 800; color: var(--ink2); padding: 3px 8px; border-radius: 10px; background: var(--bg2); }
.time.due { background: color-mix(in srgb, var(--sun) 55%, transparent); color: var(--ink); animation: glow 2.4s ease-in-out infinite; }

/* today */
.hello { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.level { width: 52px; height: 52px; border-radius: 50%; flex: none; margin-top: 6px; display: grid; place-items: center;
  background: conic-gradient(from 200deg, var(--peach), var(--rose), var(--lav), var(--sage), var(--peach)); box-shadow: var(--shadow); }
.lvl-n { width: 42px; height: 42px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-weight: 900; font-size: 19px; }
.xp-row { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 13px; font-weight: 800; color: var(--ink2); }
.xp-row .xpbar { flex: 1; }
.xpbar { height: 10px; border-radius: 9px; background: var(--bg2); overflow: hidden; margin: 6px 0; }
.xpbar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--sage), var(--sun)); transition: width .8s cubic-bezier(.3, 1.3, .5, 1); }
.kind { display: block; width: 100%; text-align: left; border-radius: var(--radius); padding: 18px 18px 14px; margin-bottom: 14px; color: #3A2A40;
  background: linear-gradient(135deg, #F9CDB5, #F4BACB 50%, #CDBDF0); box-shadow: var(--shadow); }
.kind-label { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .8px; opacity: .7; }
.kind-text { font-size: 21px; font-weight: 800; line-height: 1.3; margin: 6px 0 8px; animation: fadeUp .4s both; }
.kind-hint { font-size: 12px; font-weight: 700; opacity: .6; }
.name-card > div:first-child { font-weight: 800; }
.garden-card { position: relative; overflow: hidden; padding-bottom: 0; }
.garden { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1px 2px; min-height: 48px; font-size: 30px; line-height: 1; padding: 0 2px 4px; position: relative; z-index: 1; }
.garden span { display: inline-block; transform-origin: 50% 100%; animation: grow .7s cubic-bezier(.3, 1.7, .5, 1) both, sway 4s ease-in-out infinite alternate; }
.garden span:nth-child(3n) { animation-duration: .7s, 5s; }
.garden-empty { font-size: 14px; color: var(--ink2); font-weight: 700; padding: 6px 0 10px; line-height: 1.4; }
.soil { height: 12px; margin: 0 -16px; background: linear-gradient(to bottom, color-mix(in srgb, var(--sage) 45%, transparent), color-mix(in srgb, #B5926A 35%, transparent)); border-radius: 0 0 var(--radius) var(--radius); }
.moods { display: flex; justify-content: space-between; gap: 4px; }
.moods button { font-size: 34px; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; transition: transform .2s, background .2s; }
.moods button:active { transform: scale(.88); }
.moods button.on { background: color-mix(in srgb, var(--lav) 35%, transparent); transform: scale(1.08); }
.moods.small { margin: 10px 0; justify-content: flex-start; gap: 6px; }
.moods.small button { font-size: 26px; width: 46px; height: 46px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; }
.quick button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; padding: 10px 2px; border-radius: 16px; text-align: center; line-height: 1.15; }
.quick button span { font-size: 28px; }
.quick button:active { background: var(--bg2); }
.week { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding: 6px 6px 0; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: var(--ink2); }
.wd i { width: 34px; height: 34px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; font-style: normal; font-size: 18px; }
.wd.on i { background: color-mix(in srgb, var(--sun) 40%, var(--card)); }
.wd.today i { outline: 2.5px solid var(--lav); }
.week-txt { width: 100%; text-align: center; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--ink2); }

/* water */
.glasses { display: flex; gap: 4px; align-items: center; }
.glass { flex: 1 1 0; min-width: 0; max-width: 40px; height: 46px; transition: transform .2s; }
.glass:active { transform: scale(.88); }
.glass svg { width: 100%; height: 100%; }
.g-out { fill: color-mix(in srgb, var(--sky) 14%, transparent); stroke: var(--sky); stroke-width: 2; }
.g-water { fill: var(--sky-d); opacity: 0; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), opacity .3s; }
.glass.full .g-water { opacity: .85; transform: scaleY(1); }
.glass.plus { border: 2px dashed var(--sky); border-radius: 10px; font-size: 22px; font-weight: 900; color: var(--sky-d); }
.glasses.lg { gap: 6px; }
.glasses.lg .glass { max-width: 48px; height: 58px; }

/* tasks */
.add-card { padding: 12px; }
.add-opts { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task-body { flex: 1; min-width: 0; cursor: pointer; }
.task-title { font-weight: 800; font-size: 16.5px; line-height: 1.3; padding-top: 4px; overflow-wrap: anywhere; }
.task.done .task-title { color: var(--ink2); text-decoration: line-through; text-decoration-color: var(--sage); text-decoration-thickness: 2px; }
.task-meta { display: flex; gap: 10px; font-size: 13px; color: var(--ink2); font-weight: 700; margin-top: 3px; flex-wrap: wrap; }
.star { margin-right: 4px; }
.steps { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.step { display: flex; align-items: center; gap: 10px; padding: 7px 4px; font-weight: 700; font-size: 15px; border-radius: 10px; }
.step .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--sage); flex: none; transition: all .2s; }
.step.on { color: var(--ink2); text-decoration: line-through; }
.step.on .dot { background: var(--sage-d); border-color: var(--sage-d); animation: pop .35s; }
.step-edit { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px; font-weight: 700; }
.done-card { opacity: .92; }
.pick { text-align: center; padding: 10px 4px; }
.pick-label { font-weight: 800; color: var(--ink2); }
.pick-title { font-size: 26px; font-weight: 900; margin: 12px 0 6px; line-height: 1.25; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.pick-meta { color: var(--ink2); font-weight: 700; margin-bottom: 20px; }
.rota-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.rota-item:last-child { border-bottom: 0; }
.rota-e { font-size: 26px; }
.rota-t { flex: 1; display: flex; flex-direction: column; }
.rota-t small { color: var(--ink2); font-weight: 700; }
.rota-days { display: flex; gap: 3px; }
.rota-days i { width: 18px; height: 18px; border-radius: 6px; font-size: 10px; font-weight: 900; font-style: normal; display: grid; place-items: center; background: var(--bg2); color: var(--ink2); }
.rota-days i.on { background: var(--sage-d); color: #fff; }

/* sheet */
.sheet-back { position: fixed; inset: 0; z-index: 60; background: rgba(30, 20, 45, .38); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; background: var(--card); border-radius: 28px 28px 0 0;
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); animation: slideUp .32s cubic-bezier(.2, .9, .3, 1); }
.grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 6px auto 14px; }
.sheet-title { font-size: 20px; font-weight: 900; margin-bottom: 12px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.sheet-actions .btn { flex: 1; }

/* feedback */
.confetti { position: fixed; z-index: 100; width: 9px; height: 9px; border-radius: 2px; pointer-events: none; }
.float-pts { position: fixed; z-index: 101; pointer-events: none; font-weight: 900; font-size: 22px; color: var(--lav-d); text-shadow: 0 2px 0 var(--card); }
.levelup { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; background: rgba(30, 20, 45, .3); animation: fade .25s; }
.levelup > div { background: var(--card); border-radius: 28px; padding: 26px 34px; text-align: center; display: flex; flex-direction: column; gap: 4px; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 20px 60px rgba(0, 0, 0, .2); }
.levelup b { font-size: 28px; font-weight: 900; }
.levelup em { font-style: normal; font-weight: 900; color: var(--lav-d); }
.lu-emoji { font-size: 60px; animation: spin 1.2s ease; }

/* calm */
.well-done { text-align: center; font-weight: 800; font-size: 17px; background: color-mix(in srgb, var(--lav) 25%, var(--card)); }
.breathe-run { display: flex; flex-direction: column; align-items: center; padding-top: 10px; }
.orb { position: relative; width: min(78vw, 320px); aspect-ratio: 1; display: grid; place-items: center; margin: 10px 0 28px; }
.orb .ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--bg2); stroke-width: 5; }
.ring .prog { stroke: var(--lav-d); stroke-linecap: round; stroke-dasharray: 590.6; transition: stroke-dashoffset 1s linear; }
.orb-core { position: absolute; width: 70%; height: 70%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, transparent 55%), linear-gradient(135deg, var(--peach), var(--lav) 60%, var(--sky)); opacity: .9; filter: blur(.3px); box-shadow: 0 0 60px color-mix(in srgb, var(--lav) 60%, transparent); }
.orb.guide .orb-core { animation: breathCycle 10s ease-in-out infinite; }
.orb.paused .orb-core { animation-play-state: paused; }
.orb-text { position: relative; text-align: center; font-weight: 800; color: #3A2A40; display: flex; flex-direction: column; gap: 4px; font-size: 18px; }
.orb-text b { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }
.run-btns { display: flex; gap: 10px; width: 100%; }
.run-btns .btn { flex: 1; }
.prompt { display: flex; justify-content: space-between; gap: 10px; width: 100%; font-weight: 900; font-size: 18px; margin-bottom: 12px; line-height: 1.3; }
.prompt span { color: var(--lav-d); }
.paper-lines { background-image: repeating-linear-gradient(transparent 0 24.5px, var(--line) 24.5px 25.5px); background-attachment: local; line-height: 25.5px !important; }
.handwrite { font-family: Caveat, cursive; font-size: 24px; line-height: 30px !important; background-image: repeating-linear-gradient(transparent 0 29.5px, var(--line) 29.5px 30.5px); }
.j-day { margin-bottom: 8px; }
.j-date { font-size: 13px; font-weight: 900; color: var(--ink2); text-transform: uppercase; letter-spacing: .6px; margin: 14px 4px 8px; }
.j-entry { text-align: left; }
.j-prompt { font-weight: 800; font-size: 14px; color: var(--lav-d); margin-bottom: 4px; }
.j-text { white-space: pre-wrap; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* vent */
.vent-card .muted { margin: -2px 0 12px; }
.vent-preview { display: flex; justify-content: center; margin: 4px 0 18px; }
.vent-preview .paper { width: 220px; height: 170px; transform: rotate(-2deg); }
.destroyers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.destroyer { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 4px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 800; font-size: 14px; transition: transform .15s; }
.destroyer span { font-size: 38px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.destroyer:active { transform: scale(.94); }
.destroyer:active span { transform: scale(1.25) rotate(-8deg); }
.destroyer.surprise { background: linear-gradient(135deg, #F9CDB5, #CDBDF0); color: #3A2A40; }
.paper { width: 100%; height: 100%; background: #FFFDF6; border-radius: 4px; padding: 16px 16px 12px 30px; overflow: hidden; color: #3A3550; box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
  background-image: linear-gradient(90deg, transparent 22px, #F4A3A3 22px 23.5px, transparent 23.5px), repeating-linear-gradient(#FFFDF6 0 27px, #CFE0F3 27px 28px); }
.paper p { margin: 0; font-family: Caveat, cursive; line-height: 28px; overflow-wrap: anywhere; white-space: pre-wrap; }
.vent-done { text-align: center; padding: 30px 10px; animation: fadeUp .5s both; }
.vent-done h2 { font-size: 24px; font-weight: 900; margin: 8px 0; }
.poof { font-size: 80px; animation: poof 1s ease both; }

/* vent games (hands-on, canvas) */
.vgame { position: relative; height: max(440px, calc(100dvh - 250px)); max-height: 700px; margin-top: 6px; border-radius: var(--radius); overflow: hidden;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.vgame canvas { position: absolute; inset: 0; display: block; }
.vg-fire { background: radial-gradient(120% 80% at 50% 110%, #5B3A2E, #2A2130 60%, #1E1A26); }
.vg-knife { background: repeating-linear-gradient(92deg, rgba(120,70,30,.07) 0 3px, transparent 3px 11px), repeating-linear-gradient(88deg, rgba(255,255,255,.05) 0 2px, transparent 2px 17px), linear-gradient(160deg, #E2B888, #C99263); }
.vg-gator { background: radial-gradient(60% 20% at 30% 80%, rgba(255,255,255,.12), transparent 70%), radial-gradient(50% 18% at 75% 60%, rgba(255,255,255,.10), transparent 70%), linear-gradient(#9CC9B5, #4F8B78 70%, #3F7565); }
.vg-shredder { background: linear-gradient(#ECE7F3, #D9D1E6); }
.vg-ants { background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.12) 0 2px, transparent 3px) 0 0 / 23px 19px, radial-gradient(circle at 70% 60%, rgba(40,90,30,.15) 0 2px, transparent 3px) 0 0 / 17px 21px, linear-gradient(#A8D394, #7FB46C); }
.vg-hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); text-align: center;
  padding: 10px 16px; border-radius: 99px; background: rgba(255,255,255,.88); color: #3A2A40; font-weight: 800; font-size: 15px; box-shadow: 0 6px 18px rgba(0,0,0,.18);
  pointer-events: none; transition: opacity .5s, transform .5s; animation: hintBob 2.4s ease-in-out infinite; }
.vg-hint.gone { opacity: 0; transform: translateX(-50%) translateY(12px); animation: none; }
.vg-auto { position: absolute; right: 12px; top: 12px; padding: 8px 14px; border-radius: 99px; background: rgba(255,255,255,.85); color: #3A2A40; font-weight: 800; font-size: 13px; box-shadow: 0 4px 12px rgba(0,0,0,.15); animation: fade .4s; }
@keyframes hintBob { 50% { transform: translateX(-50%) translateY(-4px); } }

/* food */
.week-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.week-nav b { font-size: 17px; }
.day-card { padding: 12px 12px 8px; }
.day-card.is-today { border: 2px solid var(--lav); }
.day-name { font-weight: 900; margin: 0 4px 6px; }
.slot { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 6px; border-radius: 12px; font-weight: 700; }
.slot:active { background: var(--bg2); }
.slot.empty .slot-v { color: color-mix(in srgb, var(--ink2) 70%, transparent); font-weight: 600; }
.slot-e { font-size: 20px; }
.recipe-head { display: flex; align-items: center; gap: 12px; width: 100%; }
.recipe-e { font-size: 34px; }
.recipe-t { flex: 1; display: flex; flex-direction: column; }
.recipe-t b { font-size: 17px; font-weight: 900; line-height: 1.25; }
.recipe-t small { color: var(--ink2); font-weight: 700; margin-top: 2px; }
.chev { color: var(--ink2); }
.recipe-why { margin: 10px 0 0; color: var(--ink2); font-weight: 600; }
.recipe-body { margin-top: 10px; animation: fadeUp .3s both; -webkit-user-select: text; user-select: text; }
.recipe-body h4 { font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: .6px; color: var(--ink2); margin: 14px 0 6px; }
.recipe-body ul, .recipe-body ol { margin: 0; padding-left: 22px; line-height: 1.55; }
.recipe-body li { margin-bottom: 4px; }
.buy { background: color-mix(in srgb, var(--sun) 30%, transparent); padding: 8px 12px; border-radius: 12px; font-weight: 700; font-size: 14px; }
.tip { background: color-mix(in srgb, var(--sage) 22%, transparent); padding: 10px 12px; border-radius: 12px; font-weight: 600; margin-top: 12px; }
.recipe-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.cooking { text-align: center; font-size: 46px; margin: 10px 0 20px; }
.cooking span { display: inline-block; animation: stir 1s ease-in-out infinite; transform-origin: 50% 90%; }
.diary-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.diary-row:last-child { border-bottom: 0; }
.d-time { font-size: 13px; font-weight: 800; color: var(--ink2); width: 44px; }
.d-what { flex: 1; display: flex; flex-direction: column; }
.d-what small { color: var(--ink2); font-weight: 700; }
.d-feel { font-size: 22px; }

/* me */
.hist-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hist-row:last-child { border-bottom: 0; }
.h-date { width: 92px; font-weight: 800; color: var(--ink2); flex: none; }
.h-mood { font-size: 20px; width: 26px; }
.h-aches { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; }
.h-aches i { font-style: normal; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.h-aches i.lvl1 { background: color-mix(in srgb, var(--sun) 45%, transparent); }
.h-aches i.lvl2 { background: color-mix(in srgb, var(--peach) 55%, transparent); }
.h-aches i.lvl3 { background: color-mix(in srgb, var(--rose) 70%, transparent); }
.h-aches em { color: var(--ink2); font-size: 13px; width: 100%; }
.level-card { display: flex; align-items: center; gap: 16px; }
.level-card > div:last-child { flex: 1; }
.big-level { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 900; color: #3A2A40; background: conic-gradient(from 200deg, var(--peach), var(--rose), var(--lav), var(--sage), var(--peach)); flex: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 8px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stats b { font-size: 24px; font-weight: 900; }
.stats span { font-size: 12px; color: var(--ink2); font-weight: 700; line-height: 1.2; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin: 10px 0; }
.bars i { flex: 1; min-height: 3px; border-radius: 4px 4px 2px 2px; background: linear-gradient(to top, var(--sage), var(--sun)); }
.bars i.today { background: linear-gradient(to top, var(--lav-d), var(--rose)); }
.rem-edit { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.rem-edit .input { padding: 10px; }

/* login */
.login { max-width: 420px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12vh) 22px 40px; text-align: center; }
.login h1 { font-size: 40px; font-weight: 900; }
.login-flower { font-size: 72px; animation: breathe 3s ease-in-out infinite; }
.login form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.login .card { text-align: left; margin-top: 20px; }
.code { text-align: center; letter-spacing: 8px; font-size: 26px !important; font-weight: 900; }

/* keyframes */
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes grow { from { transform: scale(0) translateY(10px); } to { transform: none; } }
@keyframes sway { from { rotate: -3deg; } to { rotate: 3deg; } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes slideUp { from { transform: translateY(100%); } }
@keyframes glow { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--sun) 35%, transparent); } }
@keyframes breathe { 50% { transform: scale(1.08); } }
@keyframes breathCycle { 0%, 100% { transform: scale(.72); } 40% { transform: scale(1); } 50% { transform: scale(1); } }
@keyframes spin { from { transform: rotate(-180deg) scale(.4); } }
@keyframes poof { 0% { transform: scale(.3); opacity: 0; } 50% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(1); } }
@keyframes stir { 50% { transform: rotate(25deg); } }

@media (prefers-reduced-motion: reduce) {
  .garden span { animation: grow .3s both; }
  .orb.guide .orb-core { animation-duration: 14s; }
}
