:root {
  color-scheme: light;
  --bg: #f7f8f3;
  --paper: #fffefa;
  --soft: #eef2e8;
  --soft-strong: #e4ece0;
  --ink: #1c2c23;
  --muted: #526359;
  --line: #e0e7dc;
  --green: #285940;
  --button: #285940;
  --button-hover: #1f4834;
  --button-ink: #fff;
  --warm: #f5ebde;
  --warm-ink: #7a4b27;
  --rose: #f2e7e5;
  --blue: #e8edf2;
  --danger: #9b342d;
  --shadow: 0 18px 52px #263a2410;
  --radius: 24px;
  --ease: cubic-bezier(.22, .76, .28, 1);
  --sans: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171e18;
  --paper: #222b23;
  --soft: #26362b;
  --soft-strong: #324637;
  --ink: #eff3ec;
  --muted: #b5c2b6;
  --line: #3a493d;
  --green: #b6d7bc;
  --button: #b6d7bc;
  --button-hover: #c9e4cc;
  --button-ink: #172b1f;
  --warm: #3c3228;
  --warm-ink: #eec49e;
  --rose: #3d3035;
  --blue: #2e3844;
  --danger: #f3a9a2;
  --shadow: 0 18px 52px #0002;
}

body:not(.personal-shell) {
  --bg: #f6f7f2;
  --paper: #fff;
  --soft: #eaf1e6;
  --soft-strong: #e2ebdd;
  --ink: #273b35;
  --muted: #566960;
  --line: #e0e7dd;
  --green: #3d6654;
  --button: #3d6654;
  --button-hover: #274d3c;
  --warm: #f5e9dc;
  --blue: #e9eff5;
  --lavender: #efebf5;
  --hero-sage: #e7efdf;
  --leaf-light: #9bb488;
  --leaf-mid: #81a172;
  --leaf-dark: #6b8d67;
  --art-halo: #f8fbebad;
  --art-ring: #53754440;
  --shadow: 0 8px 30px #233c290a;
}

:root[data-theme="dark"] body:not(.personal-shell) {
  --bg: #18231e;
  --paper: #222e28;
  --soft: #2b3c31;
  --soft-strong: #314336;
  --ink: #e6ede3;
  --muted: #b0beb2;
  --line: #38463c;
  --green: #b0cfb4;
  --button: #b0cfb4;
  --button-hover: #c3dfc3;
  --warm: #493d30;
  --blue: #303f49;
  --lavender: #3c3648;
  --hero-sage: #314432;
  --leaf-light: #abc99e;
  --leaf-mid: #92b388;
  --leaf-dark: #7c9b76;
  --art-halo: #8ab07a36;
  --art-ring: #adc99e45;
  --shadow: 0 8px 30px #00000010;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled, [aria-disabled="true"] { cursor: default; opacity: .65; }
button, a, summary, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a { color: var(--green); }
img { display: block; max-width: 100%; }
svg { display: block; flex-shrink: 0; }
h1, h2, h3, p, figure { margin: 0; }
fieldset { min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
main[tabindex="-1"]:focus, :is(h1, h2)[tabindex="-1"]:focus { outline: none; }
textarea, input:not([type="checkbox"]):not([type="radio"]), select {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); padding: .75rem 1rem;
}
textarea { display: block; resize: vertical; min-height: 5rem; line-height: 1.7; }
::placeholder { color: var(--muted); opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--green); }
.skip-link { position: fixed; z-index: 20; top: 8px; left: 8px; transform: translateY(-150%); background: var(--paper); padding: .5rem 1rem; border-radius: 8px; }
.skip-link:focus { transform: none; }
.noscript { padding: 1.25rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .42rem;
  min-height: 44px; max-width: 100%; padding: .56rem 1rem; border: 1px solid transparent; border-radius: 99px;
  font-size: .9rem; font-weight: 650; line-height: 1.4; text-align: center; text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .18s var(--ease);
}
.button:active:not(:disabled) { transform: scale(.98); }
.button-primary { background: var(--button); color: var(--button-ink); }
.button-primary:hover { background: var(--button-hover); }
.button-secondary { background: var(--paper); border-color: var(--line); color: var(--green); }
.button-secondary:hover { background: var(--soft-strong); border-color: var(--soft-strong); }
.button-plain { background: transparent; color: var(--green); }
.button-plain:hover { background: var(--soft); }
.button-danger { background: var(--rose); color: var(--danger); }
.button-danger:hover { border-color: currentColor; }
.button-small { min-height: 40px; padding: .45rem .95rem; }
.button-hero { min-height: 50px; padding-inline: 1.3rem; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--green); background: var(--soft-strong); }
.site-width { width: min(1168px, calc(100% - 80px)); margin-inline: auto; }
.eyebrow { color: var(--green); font-size: .875rem; font-weight: 650; letter-spacing: .055em; }

.public-header { position: sticky; z-index: 4; top: 0; border-bottom: 1px solid var(--line); background: var(--bg); background: color-mix(in srgb, var(--bg), transparent 9%); backdrop-filter: blur(18px); }
.public-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 68px; gap: 1rem; }
.public-nav nav, .public-actions, .app-actions { display: flex; align-items: center; gap: .8rem; }
.public-actions { justify-content: end; }
.nav-link { min-height: 44px; border: 0; padding: 0 .65rem; background: transparent; color: var(--muted); font-size: .9rem; border-radius: 99px; }
.nav-link:hover { color: var(--green); background: var(--soft); }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: .58rem; width: max-content; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 1.25rem; font-weight: 760; letter-spacing: .045em; }
.brand-mark { display: inline-grid; place-items: center; width: 37px; height: 37px; color: var(--green); border-radius: 12px; background: var(--soft-strong); }
.public-hero { display: grid; grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr); align-items: center; gap: clamp(2rem, 5.5vw, 5.1rem); padding-block: clamp(3.3rem, 7vw, 6.1rem); }
.hero-category { display: flex; align-items: center; gap: .57rem; margin-bottom: 1.2rem; }
.hero-category > span, .preview-status > span { background: var(--green); width: 7px; height: 7px; border-radius: 50%; flex: none; }
.hero-copy h1 { font-size: clamp(3.15rem, 5.3vw, 5.05rem); letter-spacing: -.064em; line-height: 1.13; font-weight: 740; }
.hero-copy em { color: var(--green); font-style: normal; }
.hero-description { margin-top: 1.55rem; max-width: 23em; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.13rem); line-height: 1.84; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.65rem; }
.hero-art {
  position: relative; overflow: hidden; margin: 0; aspect-ratio: 1.12; border-radius: 32px; background: var(--warm);
  isolation: isolate; border: 1px solid var(--line); box-shadow: var(--shadow); animation: art-enter .8s var(--ease) both;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 57% 51%; }
.hero-art figcaption { position: absolute; bottom: 1rem; right: 1rem; display: flex; align-items: center; gap: .35rem; color: #2c392c; background: #fffcf1d9; backdrop-filter: blur(10px); border-radius: 99px; padding: .34rem .72rem; font-size: .875rem; }
.hero-art figcaption > span { color: #54705b; }
.hero-copy { animation: enter .6s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes art-enter { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
.feature-section, .privacy-section { scroll-margin-top: 93px; }
.feature-section { padding: 1.75rem 0 5rem; }
.feature-heading { display: grid; justify-items: center; text-align: center; gap: .55rem; margin-bottom: 1.8rem; }
.feature-heading h2, .privacy-section h2 { font-size: clamp(1.65rem, 3vw, 2.55rem); line-height: 1.25; letter-spacing: -.045em; }
.feature-heading p, .feature-card p, .privacy-section p { color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.feature-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 235px; padding: clamp(1.15rem, 3vw, 1.7rem); border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-card h3 { font-size: 1.24rem; letter-spacing: -.02em; margin: .85rem 0 .35rem; }
.feature-card p { margin-bottom: 1rem; }
.feature-card > :last-child { margin-top: auto; }
.feature-icon, .empty-icon, .community-feature-icon { display: inline-grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--soft-strong); color: var(--green); }
.feature-pet .feature-icon { background: var(--warm); color: var(--warm-ink); }
.feature-journal .feature-icon { background: var(--blue); }
.practice-detail { width: 100%; color: var(--green); }
.practice-detail summary { display: list-item; width: max-content; max-width: 100%; padding: .6rem .7rem; cursor: pointer; border-radius: 12px; font-size: .9rem; font-weight: 650; }
.practice-detail summary:hover { background: var(--soft); }
.practice-detail p { margin: .5rem 0 0; }
.privacy-section { display: flex; align-items: flex-start; gap: 1.55rem; padding: clamp(1.35rem, 4vw, 2.7rem); background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 2.75rem; }
.privacy-section h2 { margin-bottom: .4rem; }
.privacy-section p { max-width: 52em; }
.public-footer { display: flex; justify-content: space-between; gap: .7rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-block: 1.3rem; color: var(--muted); font-size: .875rem; }
[data-reveal].revealed { animation: enter .52s var(--ease) both; }

.app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100dvh; }
.app-sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; padding: 2.05rem 1.15rem 1rem; overflow: auto; background: var(--paper); border-right: 1px solid var(--line); }
.app-sidebar .brand { margin: 0 0 2.15rem .35rem; }
.app-shell .brand { gap: .7rem; text-align: left; }
.app-shell .brand-mark { width: 42px; height: 44px; border-radius: 14px 14px 14px 5px; color: var(--button-ink); background: var(--button); }
.brand-copy { display: grid; align-items: center; gap: .16rem; line-height: 1.2; }
.brand-copy :is(strong, b) { font-size: 1.35rem; font-weight: 740; }
.brand-copy small { color: var(--muted); font-size: .65rem; font-weight: 550; letter-spacing: .11em; }
.app-nav { display: grid; gap: .4rem; }
.app-nav-item { min-height: 46px; min-width: 0; width: 100%; display: flex; align-items: center; gap: .7rem; border: 0; background: transparent; border-radius: 11px; padding: .55rem .75rem; color: var(--muted); text-align: left; font-size: .91rem; }
.app-nav-item:hover { background: var(--soft); color: var(--green); }
.app-nav-item.is-current { background: var(--soft-strong); color: var(--green); font-weight: 700; }
.nav-lock { margin-left: auto; }
.sidebar-footer { margin-top: auto; padding-top: 1rem; }
.sidebar-support { display: grid; gap: .38rem; margin-bottom: .65rem; padding: .82rem .85rem; border-radius: 13px; background: var(--bg); }
.sidebar-support strong { font-size: .86rem; }
.sidebar-support .button { justify-self: start; min-height: 38px; padding-inline: .38rem; font-size: .82rem; }
.app-body { min-width: 0; }
.app-topbar { min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .65rem clamp(1.45rem, 3.2vw, 3rem); border-bottom: 1px solid var(--line); background: var(--bg); }
.app-breadcrumb, .toolbar-date { color: var(--muted); font-size: .82rem; }
.app-breadcrumb { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .55rem; min-width: 0; }
.app-breadcrumb strong { color: var(--ink); font-weight: 650; }
.toolbar-date { white-space: nowrap; }
.language-toggle { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: .34rem .6rem; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--green); font-size: .82rem; font-weight: 650; white-space: nowrap; }
.language-toggle:hover { background: var(--soft); border-color: var(--green); }
[data-backend="django"]:not([data-local-review]) .app-topbar .app-actions { margin-inline-start: auto; }
.preview-status { display: inline-flex; gap: .45rem; align-items: center; color: var(--muted); font-size: .875rem; white-space: nowrap; }
.preview-status > span { width: 6px; height: 6px; }
.mobile-brand, .mobile-nav { display: none; }
.account-button { display: flex; align-items: center; gap: .58rem; padding: .3rem .55rem .3rem .4rem; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); color: var(--green); }
.account-button:hover { background: var(--soft-strong); }
.account-avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--soft-strong); color: var(--green); font-size: .875rem; font-weight: 720; }
.account-avatar[data-age="teen"] { background: var(--warm); color: var(--warm-ink); }
.account-copy { display: grid; text-align: left; line-height: 1.2; min-width: 3.6rem; }
.account-copy strong { font-size: .9rem; font-weight: 720; }
.account-copy small { font-size: .72rem; margin-top: .18rem; color: var(--muted); white-space: nowrap; }
.app-content { width: min(100%, 1440px); margin-inline: auto; padding: clamp(1.5rem, 3vw, 2.65rem) clamp(1.45rem, 3.2vw, 3rem) 3rem; }
.page-heading { margin: 0 0 1.55rem; animation: enter .34s var(--ease) both; }
.page-heading .eyebrow { margin-bottom: .24rem; }
.page-heading h1 { font-size: clamp(2.12rem, 4vw, 3.35rem); letter-spacing: -.052em; line-height: 1.16; font-weight: 735; }
.page-heading p:not(.eyebrow) { color: var(--muted); margin-top: .5rem; }
.app-content .page-heading h1 { font-size: clamp(1.72rem, 3vw, 2.25rem); letter-spacing: -.035em; font-weight: 680; }
.app-shell .app-content .button { border-radius: 10px; }
.app-shell .app-content .button-plain { padding-inline: .45rem; }
.stats-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.stat-card { min-width: 0; display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.stat-icon { display: grid; flex: none; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: var(--soft); color: var(--green); }
.stat-card:first-child .stat-icon { background: var(--warm); color: var(--warm-ink); }
.stat-copy { display: grid; gap: .05rem; line-height: 1.3; }
.stat-value { font-size: 1.38rem; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .875rem; color: var(--muted); }
.progress-feedback { margin-bottom: 1rem; padding: .7rem .9rem; background: var(--soft); color: var(--muted); border-radius: 12px; }
.progress-feedback .button { margin-top: .45rem; }
.dashboard-grid, .journal-grid, .pet-grid, .community-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.journal-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.community-grid { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); }
.dashboard-main, .dashboard-aside, .pet-sidebar, .community-main { display: grid; gap: 1rem; min-width: 0; }
.panel { min-width: 0; padding: clamp(1rem, 2.3vw, 1.55rem); background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.app-content .panel { border-radius: 17px; box-shadow: var(--shadow); }
.app-content .dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(228px, 30%); gap: clamp(1rem, 2vw, 1.6rem); }
.app-content :is(.dashboard-main, .dashboard-aside) { gap: clamp(1rem, 1.8vw, 1.4rem); }
.summary-panel .stats-strip { grid-template-columns: 1fr; gap: .42rem; margin: 0; }
.summary-panel .stat-card { padding: .55rem .65rem; border-radius: 12px; border-color: transparent; background: var(--bg); }
.summary-panel .stat-icon { width: 34px; height: 34px; border-radius: 10px; }
.summary-panel .stat-value { font-size: 1.08rem; }
.summary-panel .stat-label { font-size: .78rem; }
.home-hero, .public-preview {
  position: relative; display: flex; align-items: center; min-height: 214px;
  padding: clamp(1.35rem, 3vw, 2rem); overflow: hidden; isolation: isolate;
  border: 1px solid var(--line); border-radius: 20px; background: var(--hero-sage);
  box-shadow: var(--shadow); animation: enter .42s var(--ease) both;
}
.public-preview { min-height: 250px; }
.app-content .feature-section { padding-block: 1.5rem 1.7rem; }
.app-content .feature-heading { justify-items: start; text-align: left; margin-bottom: 1rem; }
.app-content :is(.feature-heading, .privacy-section) h2 { font-size: clamp(1.28rem, 2.3vw, 1.65rem); letter-spacing: -.027em; }
.app-content .feature-card { min-height: 195px; border-radius: 17px; }
.app-content .privacy-section { margin: 0; border-radius: 17px; }
.home-hero-copy, .public-preview-copy { position: relative; z-index: 1; min-width: 0; max-width: min(75%, 38rem); }
.home-hero .eyebrow, .public-preview .eyebrow { display: flex; align-items: center; gap: .55rem; margin-bottom: .72rem; font-size: .76rem; letter-spacing: .12em; }
.home-hero .eyebrow::before, .public-preview .eyebrow::before { content: ""; width: 1.05rem; height: 1px; background: currentColor; }
.home-hero h2, .public-preview :is(h1, h2) { font-size: clamp(1.55rem, 3vw, 2.3rem); line-height: 1.35; font-weight: 650; letter-spacing: -.03em; }
.home-hero p:not(.eyebrow), .public-preview p:not(.eyebrow) { margin-top: .6rem; color: var(--muted); font-size: .92rem; }
.home-hero .button, .public-preview-actions { margin-top: 1rem; }
.public-preview-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.growth-art { position: absolute; right: .45rem; bottom: -.7rem; width: 214px; height: 210px; pointer-events: none; }
.growth-art :is(.sun, .ground, .stem, .leaf) { position: absolute; }
.growth-art .sun { top: 4px; right: 17px; width: 138px; height: 138px; border-radius: 50%; background: var(--art-halo); }
.growth-art .ground { right: 30px; bottom: 27px; width: 121px; height: 22px; border: 1px solid var(--art-ring); border-radius: 50%; }
.growth-art .stem { right: 88px; bottom: 36px; width: 2px; height: 112px; background: var(--leaf-dark); transform: rotate(10deg); transform-origin: bottom; }
.growth-art .leaf { width: 58px; height: 32px; border-radius: 2px 95% 2px 95%; background: var(--leaf-mid); box-shadow: inset -9px -1px 0 #274d3c14; }
.growth-art .l1 { right: 93px; bottom: 89px; transform: rotate(18deg); }
.growth-art .l2 { right: 32px; bottom: 112px; transform: rotate(-69deg); background: var(--leaf-dark); }
.growth-art .l3 { right: 90px; bottom: 137px; width: 43px; height: 26px; transform: rotate(29deg); background: var(--leaf-light); }
.dashboard-talk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.dashboard-talk-card { min-width: 0; display: grid; align-content: start; gap: .35rem; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); text-align: left; color: var(--ink); }
.dashboard-talk-card:is(button, a):hover { border-color: var(--green); background: var(--soft); }
.dashboard-talk-card :is(p, small) { color: var(--muted); font-size: .82rem; }
.talk-letter { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; color: var(--green); background: var(--soft-strong); font-weight: 680; }
.dashboard-talk-card:nth-child(2) .talk-letter { background: var(--warm); }
.dashboard-talk-card:nth-child(3) .talk-letter { background: var(--blue); }
.dashboard-talk-card:nth-child(4) .talk-letter { background: var(--lavender); }
.panel-header { margin-bottom: .95rem; }
.section-title, .community-view h2 { font-size: 1.2rem; letter-spacing: -.027em; line-height: 1.4; }
.section-description { font-size: .94rem; color: var(--muted); margin-top: .2rem; }
.panel-title-row { display: flex; align-items: start; justify-content: space-between; gap: .55rem; }
.task-count, .privacy-label, .pet-level { display: inline-flex; align-items: center; gap: .35rem; flex: none; color: var(--green); border-radius: 99px; background: var(--soft); padding: .27rem .62rem; font-size: .83rem; font-weight: 650; }
.mood-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; }
.mood-choice { display: grid; place-items: center; gap: .4rem; min-height: 76px; padding: .5rem .15rem; border: 1px solid transparent; background: transparent; border-radius: 17px; font-size: .875rem; line-height: 1.3; transition: background .2s var(--ease), border-color .2s var(--ease), transform .18s var(--ease); }
.mood-choice:hover { background: var(--bg); transform: translateY(-2px); }
.mood-choice.is-selected, .mood-choice[aria-pressed="true"] { background: var(--soft); border-color: var(--green); }
.mood-glyph, .entry-mood { --mood-tone: var(--soft-strong); --mood-ink: var(--green); color: var(--mood-ink); background: var(--mood-tone); }
[data-mood="happy"] { --icon-tone: var(--warm); --icon-ink: var(--warm-ink); }
[data-mood="sad"], [data-mood="anxious"] { --icon-tone: var(--blue); }
[data-mood="angry"] { --icon-tone: var(--rose); --icon-ink: var(--danger); }
.mood-glyph { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; color: var(--icon-ink, var(--green)); background: var(--icon-tone, var(--soft-strong)); }
.app-content .mood-choice { color: var(--muted); border-radius: 13px; }
.app-content .mood-choice:is(:hover, .is-selected, [aria-pressed="true"]) { color: var(--green); }
.app-content .mood-glyph { border-radius: 50%; }
.task-list { display: grid; gap: .5rem; }
.task-toggle { min-height: 44px; display: flex; align-items: center; gap: .65rem; text-align: left; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: .92rem; }
.task-toggle:hover { border-color: var(--green); }
.task-toggle.is-complete { background: var(--soft); }
.task-check { display: grid; place-items: center; flex: none; width: 21px; height: 21px; border-radius: 7px; border: 1px solid var(--line); background: var(--paper); color: transparent; }
.task-toggle.is-complete .task-check { background: var(--button); color: var(--button-ink); }
.task-points { margin-left: auto; color: var(--green); font-size: .82rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.pet-preview { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: .6rem; background: var(--warm); align-items: center; overflow: hidden; }
.pet-preview-copy { min-width: 0; }
.pet-preview-copy p { color: var(--muted); font-size: .88rem; margin: .35rem 0 .7rem; }
.pet-preview-copy .section-title { font-size: 1.55rem; }
.pet-preview-copy .button { padding-inline: .7rem; font-size: .85rem; }
.pet-art { border-radius: 17px; overflow: hidden; background: var(--warm); }
.pet-art img { width: 100%; height: 100%; object-fit: cover; object-position: 64% center; }
.pet-preview .pet-art { aspect-ratio: 1; }
.card-kicker { display: flex; align-items: center; gap: .4rem; color: var(--green); font-size: .875rem; font-weight: 650; margin-bottom: .4rem; }
.pet-preview .card-kicker { color: var(--warm-ink); }
.daily-card { background: var(--soft); }
.daily-content p { margin-top: .42rem; color: var(--muted); font-size: .94rem; }
.daily-content .culture-translation { font-size: .85rem; }
.daily-toggle { margin-top: .5rem; padding-inline: .45rem; }
.daily-toggle:hover { background: var(--soft-strong); }
.journal-moods { margin: .2rem 0 1.15rem; padding: 0; border: 0; }
.journal-form :is(legend, label) { font-weight: 650; font-size: .9rem; margin-bottom: .42rem; }
.journal-input label { display: block; }
.character-count { display: block; text-align: right; color: var(--muted); font-size: .82rem; margin-top: .25rem; }
.journal-actions, .pet-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .8rem; }
.journal-storage-note, .mood-hint { color: var(--muted); font-size: .875rem; margin-top: .75rem; }
.mood-hint { border-radius: 12px; padding: .75rem; background: var(--soft); color: var(--ink); }
.journal-entry { padding: .6rem 0 .75rem; border-bottom: 1px solid var(--line); }
.journal-entry-head { display: flex; flex-wrap: wrap; align-items: center; column-gap: .55rem; }
.entry-mood { display: inline-flex; gap: .3rem; align-items: center; font-size: .875rem; border-radius: 99px; padding: .2rem .5rem; color: var(--icon-ink, var(--green)); background: var(--icon-tone, var(--soft-strong)); }
.journal-entry time { font-size: .82rem; color: var(--muted); }
.journal-delete { margin-left: auto; }
.entry-text { overflow-wrap: anywhere; white-space: pre-wrap; margin-top: .3rem; }
.delete-confirmation { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .6rem; margin-top: .5rem; border-radius: 12px; background: var(--rose); }
.delete-confirmation > span { flex: 1 0 100%; }
.journal-empty { display: grid; justify-items: center; text-align: center; padding: 1.1rem .5rem 1.55rem; color: var(--muted); }
.journal-empty strong { color: var(--ink); margin-top: .7rem; }
.pet-details { padding: 0; overflow: hidden; }
.pet-details > .pet-art { border-radius: 0; aspect-ratio: 1.85; }
.pet-details-copy { padding: clamp(1rem, 2.3vw, 1.55rem); }
.pet-progress { display: grid; gap: .55rem; }
.pet-meter-label { display: flex; align-items: center; justify-content: space-between; gap: .3rem; font-size: .9rem; color: var(--muted); }
.pet-meter-label strong { color: var(--green); }
progress { appearance: none; display: block; width: 100%; height: 9px; border: 0; border-radius: 99px; overflow: hidden; background: var(--soft); color: var(--green); margin-top: .25rem; }
progress::-webkit-progress-bar { background: var(--soft-strong); }
progress::-webkit-progress-value { background: var(--green); border-radius: 99px; transition: width .3s var(--ease); }
progress::-moz-progress-bar { background: var(--green); }
.pet-guide { background: var(--soft); }
.pet-guide p { color: var(--muted); }
.pet-guide p + p { margin-top: .5rem; }
.badge-list { list-style: none; display: grid; gap: .45rem; padding: 0; margin: 0; }
.badge-item { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .9rem; }
.badge-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg); }
.badge-item.is-unlocked { color: var(--ink); }
.badge-item.is-unlocked .badge-icon { color: var(--green); background: var(--soft-strong); }
.badge-state { margin-left: auto; font-size: .8rem; white-space: nowrap; }

.community-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.community-tab { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); color: var(--muted); font-size: .92rem; }
.community-tab.is-active { background: var(--soft-strong); color: var(--green); border-color: var(--soft-strong); font-weight: 680; }
.community-tab:hover { border-color: var(--green); }
.community-tab-count { font-size: .8rem; }
.community-composer h2, .community-people h2, .community-guide h2 { margin-bottom: .7rem; }
.community-composer-footer, .community-post-head, .community-post-actions, .community-thread-head { display: flex; align-items: center; gap: .5rem; }
.community-composer-footer { margin-top: .65rem; flex-wrap: wrap; }
.community-notice { display: inline-flex; align-items: center; gap: .35rem; font-size: .875rem; color: var(--green); }
.community-count { font-size: .82rem; color: var(--muted); margin-left: auto; }
.community-feed { display: grid; gap: .65rem; }
.community-feed > h2 { margin: .25rem 0 0 .12rem; }
.community-post-head { gap: .68rem; }
.community-avatar { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; flex: none; background: var(--soft-strong); color: var(--green); font-size: .92rem; font-weight: 650; }
.community-avatar[data-tone="clay"] { background: var(--warm); color: var(--warm-ink); }
.community-avatar[data-tone="rose"] { background: var(--rose); color: var(--danger); }
.community-post-meta { display: grid; line-height: 1.4; }
.community-post-meta span, .community-action-state, .community-person-details span { color: var(--muted); font-size: .83rem; }
.community-post-content { margin: .72rem 0 .5rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.community-post-actions { flex-wrap: wrap; gap: .2rem; }
.community-post-actions .button { padding-inline: .52rem; }
.community-post-actions [aria-pressed="true"] { color: var(--danger); background: var(--rose); }
.community-post-actions [aria-pressed="true"] svg { fill: currentColor; }
.community-replies { list-style: none; display: grid; gap: .4rem; margin: .5rem 0 0; padding: .7rem; border-radius: 12px; background: var(--bg); overflow-wrap: anywhere; }
.community-replies p { margin-top: .08rem; }
.community-reply-form, .community-report-form, .community-message-form { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; margin-top: .65rem; }
.community-report-form label { width: 100%; }
.community-guide { background: var(--soft); }
.community-guide h2 { margin-top: .65rem; }
.community-guide p, .community-guide li, .community-empty { color: var(--muted); }
.community-guide ul { margin: .5rem 0 0; padding-left: 1.2em; }
.community-guide li + li { margin-top: .25rem; }
.community-person { display: flex; align-items: center; flex-wrap: wrap; column-gap: .6rem; border-top: 1px solid var(--line); padding: .7rem 0; }
.community-person-details { display: grid; flex: 1; min-width: 70px; }
.community-person-actions { display: flex; flex-wrap: wrap; gap: .3rem; }
.community-thread-head { flex-wrap: wrap; margin-bottom: .55rem; }
.community-thread-head h2 { flex: 1; }
.community-messages { display: grid; gap: .57rem; margin: .7rem 0 0; padding: .7rem; background: var(--bg); border-radius: 13px; min-height: 8rem; max-height: 32rem; overflow: auto; list-style: none; align-content: start; }
.community-message { justify-self: start; width: fit-content; min-width: 4rem; max-width: min(86%, 30rem); padding: .5rem .68rem; background: var(--paper); border-radius: 12px 12px 12px 4px; overflow-wrap: anywhere; white-space: pre-wrap; }
.community-message.is-mine { justify-self: end; border-radius: 12px 12px 4px 12px; background: var(--soft-strong); }
.community-message > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; }
.community-message > div span { color: var(--muted); font-size: .8rem; }
.community-message-form input { flex: 1 1 12rem; }
.community-restricted { display: grid; justify-items: start; gap: .8rem; max-width: 35rem; }
.community-restricted p { color: var(--muted); }
.community-live .community-list-heading, .community-content-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .4rem; }
.community-live .community-people .community-list-heading { margin-bottom: .45rem; }
.community-live .community-list-heading h2 { margin-bottom: 0; }
.community-content-meta { justify-content: flex-start; }
.community-content-meta span { color: var(--muted); font-size: .83rem; }
.community-feedback { padding: .75rem 1rem; margin: .45rem 0; border-radius: 12px; background: var(--rose); color: var(--danger); overflow-wrap: anywhere; }
.community-feedback .button { margin-top: .35rem; }
.community-search-form { display: flex; flex-wrap: wrap; gap: .45rem; padding-bottom: .65rem; }
.community-search-form input, .community-live .community-reply-form input { flex: 1 1 12rem; width: auto; min-width: 0; }
.community-live .community-message .community-report-form { white-space: normal; }
.community-live .community-message .community-report-form select { min-width: 0; }
.community-live .community-person-details strong, .community-live .community-post-meta strong { overflow-wrap: anywhere; }

.profile-dialog { width: min(440px, calc(100% - 2rem)); max-height: min(640px, calc(100dvh - 2rem)); overflow: auto; padding: clamp(1rem, 4vw, 1.55rem); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); background: var(--paper); color: var(--ink); }
.profile-dialog[open] { animation: enter .22s var(--ease) both; }
.profile-dialog::backdrop { background: #12231868; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.profile-dialog h2 { font-size: 1.45rem; line-height: 1.3; }
.profile-dialog p { color: var(--muted); font-size: .9rem; margin: .5rem 0 .9rem; }
.profile-options { display: grid; gap: .5rem; }
.profile-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: .65rem; width: 100%; min-height: 59px; padding: .48rem .65rem; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; line-height: 1.4; }
.profile-option:hover { background: var(--soft); border-color: var(--green); }
.profile-option strong, .profile-option small { display: block; font-size: .92rem; }
.profile-option small { color: var(--muted); font-size: .82rem; }
.option-icon { color: var(--green); }
.auth-switch { display: flex; flex-wrap: wrap; gap: .35rem; margin: .8rem 0 1rem; }
.auth-switch .button[aria-pressed="true"] { background: var(--soft-strong); }
.auth-form { display: grid; gap: .4rem; }
.auth-form label { margin-top: .25rem; font-size: .9rem; font-weight: 650; }
.auth-form > .button { margin-top: .6rem; justify-self: stretch; }
.campus-email-form { width: 100%; min-width: 0; }
.campus-email-form .auth-status { color: var(--green); font-size: .85rem; }
.campus-email-form .auth-status.is-error { color: var(--danger); }
.auth-hint { color: var(--muted); font-size: .82rem; }
.auth-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; align-items: stretch; }
.auth-send-code { min-width: 6.2rem; }
.auth-captcha { display: grid; gap: .45rem; max-width: 100%; overflow-x: auto; padding: .55rem; background: var(--soft); border-radius: 12px; }
.auth-captcha > .button { justify-self: start; }
.profile-dialog .auth-status { color: var(--green); margin: .1rem 0 0; font-size: .85rem; }
.auth-account-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .68rem; margin: .85rem 0; }
.auth-account-meta { display: grid; min-width: 0; overflow-wrap: anywhere; }
.auth-account-meta small { color: var(--muted); }
.auth-account-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .8rem; }
.profile-dialog .auth-error { margin: .45rem 0 0; color: var(--danger); }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 1.3rem; width: max-content; max-width: calc(100% - 2rem); padding: .55rem .9rem; color: var(--button-ink); background: var(--button); font-size: .9rem; border-radius: 14px; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .app-sidebar { padding-inline: .95rem; }
  .app-content, .app-topbar { padding-inline: 1.55rem; }
  .pet-preview .pet-art { aspect-ratio: .85; }
}
@media (max-width: 1050px) {
  .app-content .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .app-content .dashboard-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .toolbar-date { display: none; }
}
@media (max-width: 880px) {
  .site-width { width: calc(100% - 48px); }
  .public-hero { gap: 1.75rem; }
  .hero-copy h1 { font-size: clamp(2.7rem, 6.3vw, 4rem); }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .app-sidebar { display: none; }
  .app-topbar { min-height: 65px; padding-inline: 1.3rem; }
  .app-content { padding-bottom: calc(6.25rem + env(safe-area-inset-bottom)); }
  .app-topbar .preview-status { margin-left: auto; }
  .mobile-brand { display: block; }
  .app-breadcrumb { display: none; }
  .mobile-brand .brand-mark { width: 34px; height: 34px; border-radius: 11px 11px 11px 4px; }
  .mobile-brand .brand-copy :is(strong, b) { font-size: 1.12rem; }
  .mobile-brand .brand-copy small { display: none; }
  .mobile-nav {
    position: fixed; z-index: 5; inset: auto 0 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: .3rem max(1rem, env(safe-area-inset-right)) max(.35rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    background: var(--paper); background: color-mix(in srgb, var(--paper), transparent 6%); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
  }
  .mobile-nav .app-nav-item { position: relative; min-height: 50px; padding: .35rem .1rem; display: grid; justify-items: center; gap: .08rem; font-size: .78rem; line-height: 1.3; text-align: center; }
  .mobile-nav .app-nav-item > span:first-of-type { max-width: 100%; overflow-wrap: anywhere; }
  .mobile-nav .nav-lock { position: absolute; left: calc(50% + 13px); top: .35rem; }
  .toast { bottom: calc(4.65rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 680px) {
  .site-width { width: calc(100% - 36px); }
  .public-nav { grid-template-columns: 1fr auto; min-height: 61px; }
  .public-nav nav { display: none; }
  .public-nav .brand-mark, .mobile-brand .brand-mark { width: 34px; height: 34px; }
  .public-hero { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; padding-block: 2.35rem 2.5rem; }
  .hero-copy h1 { font-size: clamp(2.85rem, 10.7vw, 4.1rem); }
  .hero-category { margin-bottom: .75rem; }
  .hero-description { margin-top: 1rem; }
  .hero-actions { margin-top: 1.15rem; }
  .hero-art { aspect-ratio: 1.34; border-radius: 22px; }
  .feature-heading { justify-items: start; text-align: left; margin-bottom: 1rem; }
  .feature-section { padding: .85rem 0 1.75rem; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .feature-card { min-height: 0; }
  .app-content .feature-card { min-height: 0; }
  .privacy-section { flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
  .privacy-section h2 { font-size: 1.48rem; }
  .app-content { padding-inline: 1rem; padding-top: 1.35rem; }
  .app-topbar { padding-inline: .95rem; }
  .app-actions { gap: .25rem; }
  .app-content .dashboard-aside { grid-template-columns: minmax(0, 1fr); }
  .home-hero, .public-preview { padding: 1.25rem; }
  .home-hero-copy, .public-preview-copy { max-width: 85%; }
  .growth-art { right: -.75rem; bottom: -.75rem; transform: scale(.75); transform-origin: right bottom; opacity: .65; }
  .dashboard-talk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-copy { display: none; }
  .account-button { gap: .12rem; min-height: 44px; padding: .2rem .26rem; }
  .account-avatar { width: 31px; height: 31px; }
  .page-heading { margin-bottom: 1rem; }
  .dashboard-grid, .journal-grid, .pet-grid, .community-grid { grid-template-columns: minmax(0, 1fr); }
  .stats-strip { gap: .42rem; }
  .stat-card { padding: .6rem .45rem; gap: .4rem; border-radius: 13px; }
  .stat-icon { width: 28px; height: 28px; border-radius: 9px; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat-value { font-size: 1.08rem; }
  .stat-label { font-size: .8rem; }
  .pet-preview .pet-art { aspect-ratio: 1.25; }
  .community-aside { grid-row: 2; }
}
@media (max-width: 365px) {
  .hero-copy h1 { font-size: 2.63rem; }
  .button-hero { padding-inline: .85rem; }
  .app-topbar { padding-inline: .65rem; }
  .app-content { padding-inline: .7rem; }
  .growth-art { opacity: .48; }
  .mobile-nav { padding-inline: max(.25rem, env(safe-area-inset-left)) max(.25rem, env(safe-area-inset-right)); }
  .mobile-nav .app-nav-item { font-size: .72rem; }
  .stat-card { gap: .22rem; padding: .52rem .32rem; }
  .mood-glyph { width: 36px; height: 36px; }
  .mood-glyph svg { width: 19px; height: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
