/* finesse · register=product · shell=responsive-top-nav+mobile-tabbar
 * A=white+charcoal · B=readable-sans+editorial-number · C=component-daily-desk
 * D=state-feedback+functional-native-motion · E=typographic-personal-notebook · SOUL=7 SPECTACLE=5 DENSITY=7
 * White page, dark contrasting controls; additional motion rules live in motion.css. */
:root {
  --page: #ffffff;
  --surface: #ffffff;
  --panel: #ffffff;
  --ink: #242424;
  --body: #505050;
  --muted: #707070;
  --accent: #292929;
  --accent-hover: #111111;
  --accent-soft: #ffffff;
  --on-accent: #ffffff;
  --line: #e7e7e7;
  --line-strong: #c9c9c9;
  --shadow: 0 7px 24px -12px rgba(0, 0, 0, .12);
  --shadow-lg: 0 18px 45px -20px rgba(0, 0, 0, .18);
  --scrim: rgba(0, 0, 0, .3);
  --white-alpha: rgba(255, 255, 255, .97);
  --danger: #292929;
  --danger-soft: #ffffff;
  --info: #505050;
  --info-soft: #ffffff;
  --peach: #ffffff;
  --lilac: #ffffff;
  --transparent: rgba(0, 0, 0, 0);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: Georgia, "Songti SC", "SimSun", serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.2, .8, .2, 1.15);
  --r: 20px;
  --r-sm: 12px;
  --r-lg: 28px;
  --header-h: 90px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; overflow-x: clip; background: var(--page); color: var(--ink); font: 14px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button, a { -webkit-user-select: none; user-select: none; }
button { border: 0; background: none; }
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
button, .button { transition: transform .2s var(--spring), background-color .2s, color .2s, border-color .2s; }
button:active:not(:disabled), .button:active { transform: scale(.96); }
img { max-width: 100%; display: block; object-fit: cover; }
svg { display: block; width: 21px; height: 21px; flex-shrink: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; min-width: 0; }
h1, h2, h3, h4 { font-weight: 600; }
h1 { font-size: clamp(27px, 3vw, 37px); line-height: 1.55; letter-spacing: -.035em; }
h2 { font-size: 21px; line-height: 1.5; letter-spacing: -.025em; }
h3 { font-size: 16px; line-height: 1.6; }
small { font-size: 12px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 12px 20px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }
.site-header { height: var(--header-h); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; background: var(--white-alpha); backdrop-filter: blur(14px); }
.header-inner { max-width: 1240px; padding: 0 34px; margin: auto; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { font-size: 18px; font-weight: 600; letter-spacing: .04em; }
.main-nav { display: flex; gap: 32px; height: 100%; }
.nav-link { position: relative; display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); white-space: nowrap; padding: 0 4px; min-height: 44px; transition: color .2s; }
.nav-link svg { width: 18px; height: 18px; stroke-width: 1.65; }
.nav-link::after { content: ""; position: absolute; height: 2px; bottom: 19px; left: 5px; right: 5px; border-radius: 3px; background: var(--accent); transform: scaleX(0); transform-origin: center; transition: transform .3s var(--ease); }
.nav-link.active { color: var(--accent); font-weight: 600; }
.nav-link.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 17px; }
.icon-button { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--muted); flex-shrink: 0; }
.icon-button.small { width: 34px; height: 34px; }
.icon-button svg { width: 20px; height: 20px; }
.header-divider { width: 1px; height: 22px; background: var(--line); }
.profile-button { position: relative; width: 39px; height: 39px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--page); color: var(--accent); display: grid; place-items: center; font: 16px var(--serif); }
.profile-button i { position: absolute; right: 0; bottom: 1px; width: 9px; height: 9px; border: 2px solid var(--page); background: var(--accent); border-radius: 50%; }
.app-main { max-width: 1200px; min-height: calc(100vh - 240px); padding: 34px 34px 28px; margin: 0 auto; }
.page { opacity: 1; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; margin: 0 0 28px; gap: 22px; }
.date-label { color: var(--muted); font-size: 11px; display: inline-flex; align-items: center; gap: 8px; letter-spacing: .04em; margin-bottom: 12px; }
.date-label::before { content: ""; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.heading-note { color: var(--muted); font-size: 12px; line-height: 1.9; padding-bottom: 7px; text-align: right; }
.heading-note svg { width: 25px; height: 25px; margin: 0 0 7px auto; stroke-width: 1.2; }
.photo-heart[aria-pressed="true"] { color: var(--accent); }
.photo-heart[aria-pressed="true"] svg { fill: var(--accent-soft); }
.mood-panel { border: 1px solid var(--line); border-radius: var(--r); padding: 23px 22px 17px; background: var(--page); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.panel-heading h3 { font-size: 15px; }
.panel-heading > svg { width: 19px; height: 19px; color: var(--accent); }
.panel-subtitle { color: var(--muted); font-size: 11px; }
.mood-options { display: flex; justify-content: space-between; gap: 7px; padding: 18px 0 11px; }
.mood-option { display: flex; flex-direction: column; align-items: center; gap: 7px; border-radius: 15px; min-width: 45px; padding: 4px 2px; font-size: 10px; color: var(--muted); }
.mood-face { display: grid; place-items: center; width: 45px; height: 45px; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; transition: background .2s, transform .3s var(--spring), border-color .2s; }
.mood-face svg { width: 26px; height: 26px; stroke-width: 1.25; }
.mood-option[aria-pressed="true"] { color: var(--accent); }
.mood-option[aria-pressed="true"] .mood-face { background: var(--accent-soft); border-color: var(--accent); transform: translateY(-3px); }
.mood-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--accent); min-height: 36px; padding: 2px 0; white-space: nowrap; font-size: 12px; }
.text-button svg { width: 14px; height: 14px; transition: transform .2s; }
.quote-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 21px 23px 15px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); min-height: 162px; }
.quote-label { display: flex; gap: 6px; color: var(--accent); font-size: 11px; align-items: center; }
.quote-label svg { width: 14px; height: 14px; }
.quote-panel blockquote { margin: 12px 0; font-size: 17px; letter-spacing: .03em; line-height: 1.9; font-weight: 400; white-space: pre-line; }
.quote-bottom { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; }
.quote-bottom .icon-button { margin: -6px -6px -4px 0; }
.section { margin-top: 35px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 17px; }
.section-heading h2 { font-size: 19px; }
.section-heading p { color: var(--muted); font-size: 11px; margin-top: 5px; }
.tool-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; }
.tool-quick { text-align: left; padding: 19px 19px 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--page); position: relative; min-height: 137px; }
.tool-icon { display: inline-grid; place-items: center; width: 39px; height: 39px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; color: var(--accent); margin-bottom: 12px; }
.tool-icon.blue { background: var(--info-soft); color: var(--info); }
.tool-icon.peach { background: var(--peach); color: var(--body); }
.tool-icon.lilac { background: var(--lilac); color: var(--body); }
.tool-icon svg { width: 21px; height: 21px; stroke-width: 1.5; }
.tool-quick strong { font-size: 13px; font-weight: 500; display: block; }
.tool-quick > small { font-size: 10px; color: var(--muted); display: block; margin-top: 4px; }
.tool-quick > .arrow { position: absolute; right: 15px; top: 24px; width: 15px; height: 15px; color: var(--muted); transition: transform .25s var(--ease); }
.section-footnote { margin-top: 10px; text-align: right; color: var(--muted); font-size: 10px; }
.site-footer { max-width: 1200px; margin: 12px auto 0; padding: 20px 34px 25px; color: var(--muted); font-size: 10px; }
.site-footer > div { display: flex; justify-content: space-between; padding-top: 23px; border-top: 1px solid var(--line); }
.site-footer i { margin-left: 8px; font-style: normal; color: var(--accent); }
.site-footer > button { display: block; margin: 9px 0 0 auto; min-height: 28px; font-size: 10px; }
.subtle-link { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.mobile-nav { display: none; }
.button { min-height: 45px; border-radius: var(--r-sm); padding: 10px 19px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 12px; font-weight: 500; border: 1px solid var(--line); white-space: nowrap; }
.button svg { width: 17px; height: 17px; }
.button.primary { background: var(--page); color: var(--ink); border-color: var(--accent); }
.button.secondary { background: var(--page); color: var(--body); }
.button.soft { background: var(--page); color: var(--accent); border-color: var(--line-strong); }
.button.danger { color: var(--danger); background: var(--page); border-color: var(--accent); }
.button.full { width: 100%; }
.page-description { color: var(--muted); margin-top: 9px; font-size: 12px; line-height: 1.8; }
.page-title-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.surface { background: var(--page); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.journal-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: 23px; align-items: start; }
.journal-left { min-width: 0; }
.journal-composer { padding: 25px 27px; }
.composer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.composer-head h2 { font-size: 17px; }
.privacy-pill { color: var(--body); background: var(--page); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 20px; font-size: 10px; white-space: nowrap; }
.privacy-pill svg { width: 12px; height: 12px; }
.composer-title { width: 100%; border: 0; background: var(--page); color: var(--ink); font-size: 20px; font-weight: 500; padding: 8px 0; border-radius: 3px; }
.composer-title::placeholder { color: var(--muted); opacity: 1; font-weight: 400; }
.journal-text { width: 100%; min-height: 190px; padding: 14px 0 12px; background: var(--page); color: var(--body); line-height: 2; border: 0; resize: vertical; font-size: 14px; }
textarea::placeholder, input::placeholder { color: var(--muted); opacity: 1; }
.form-label { display: block; font-size: 12px; color: var(--body); margin-bottom: 8px; font-weight: 500; }
.composer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.composer-meta { font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.mood-select { padding: 8px 27px 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; font-size: 12px; color: var(--body); min-height: 38px; max-width: 120px; }
.journal-list { display: grid; gap: 14px; margin-top: 18px; }
.journal-entry { padding: 21px 24px; animation: item-enter .35s var(--ease); }
.entry-meta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; gap: 8px; margin-bottom: 10px; }
.entry-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.entry-meta svg { width: 12px; height: 12px; }
.journal-entry h3 { margin-bottom: 8px; }
.journal-entry p { font-size: 13px; color: var(--body); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; }
.entry-actions { display: flex; justify-content: flex-end; gap: 17px; padding-top: 10px; }
.entry-actions button { font-size: 10px; color: var(--muted); min-height: 30px; }
.empty-journal { padding: 38px 24px; text-align: center; }
.empty-journal > svg { width: 35px; height: 35px; margin: auto auto 15px; color: var(--accent); stroke-width: 1.25; }
.empty-journal h3 { font-size: 15px; }
.empty-journal p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.calendar { padding: 22px; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 15px; }
.calendar-head small { color: var(--muted); font-size: 10px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px 3px; text-align: center; }
.calendar-grid > span { min-height: 33px; display: grid; place-items: center; font-size: 11px; position: relative; }
.calendar-grid .weekday { color: var(--muted); min-height: 26px; font-size: 10px; }
.calendar-grid .today { background: var(--page); border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-weight: 600; }
.calendar-grid .has-entry::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); position: absolute; bottom: 3px; left: calc(50% - 1.5px); }
.calendar-caption { padding-top: 16px; margin-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; display: flex; align-items: center; gap: 7px; }
.calendar-caption > i { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.gentle-prompts { margin-top: 18px; padding: 23px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); }
.gentle-prompts h3 { font-size: 14px; margin-bottom: 15px; }
.prompt { display: flex; align-items: center; gap: 9px; text-align: left; width: 100%; color: var(--body); font-size: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.prompt:last-child { border-bottom: 0; }
.prompt svg { color: var(--accent); width: 15px; height: 15px; }
.local-note { margin-top: 16px; font-size: 10px; line-height: 1.8; color: var(--muted); display: flex; align-items: flex-start; gap: 6px; }
.local-note svg { width: 13px; height: 16px; }
.studio-layout { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,1fr); gap: 35px; align-items: start; }
.studio-preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; position: sticky; top: 112px; min-width: 0; }
.preview-topline { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--muted); margin-bottom: 21px; }
.preview-topline > span { display: inline-flex; align-items: center; gap: 5px; }
.preview-topline svg { width: 12px; height: 12px; }
.canvas-wrap { max-width: 345px; margin: auto; background: var(--page); box-shadow: var(--shadow-lg); transition: transform .4s var(--ease); }
.canvas-wrap canvas { display: block; width: 100%; height: auto; aspect-ratio: 4/5; }
.preview-caption { text-align: center; font-size: 10px; margin-top: 22px; color: var(--muted); }
.editor-panel { padding-top: 3px; min-width: 0; }
.editor-section { padding: 0 0 23px; margin-bottom: 23px; border-bottom: 1px solid var(--line); }
.editor-section:last-child { margin-bottom: 0; border: 0; }
.editor-section h3 { margin-bottom: 13px; font-size: 14px; }
.editor-section h3 small { font-size: 10px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.photo-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.photo-choice { border: 1px solid var(--line); border-radius: 11px; padding: 15px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 85px; font-size: 10px; }
.photo-choice img { width: 100%; height: 75px; border-radius: 8px; }
.photo-choice.active { border-color: var(--accent); }
.photo-choice.active::after { content: "✓"; position: absolute; right: 7px; top: 7px; width: 16px; height: 16px; border: 1px solid var(--accent); border-radius: 50%; background: var(--page); color: var(--ink); font-size: 10px; display: grid; place-items: center; }
.upload-choice { display: flex; flex-direction: column; gap: 6px; justify-content: center; align-items: center; background: var(--surface); border: 1px dashed var(--line-strong); min-height: 85px; font-size: 10px; color: var(--muted); cursor: pointer; border-radius: 11px; }
.upload-choice svg { width: 19px; height: 19px; }
.upload-choice:has(+ input:focus-visible), .upload-zone:has(+ input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.field { margin-bottom: 15px; display: block; }
.field > span { font-size: 11px; color: var(--body); margin-bottom: 7px; display: flex; justify-content: space-between; }
.field > span small { color: var(--muted); font-size: 10px; }
.input { width: 100%; border: 1px solid var(--line); background: var(--page); border-radius: 10px; padding: 11px 13px; color: var(--ink); font-size: 13px; min-height: 44px; }
textarea.input { line-height: 1.9; resize: vertical; min-height: 88px; }
.field-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.template-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.template-choice { border: 1px solid var(--line); padding: 12px 8px 10px; border-radius: 10px; color: var(--muted); font-size: 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.template-choice svg { width: 29px; height: 29px; stroke-width: 1.15; }
.template-choice.active { border-color: var(--accent); background: var(--surface); color: var(--accent); }
.editor-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: 12px; }
.studio-details { color: var(--muted); font-size: 10px; text-align: center; margin-top: 11px; }
.template-strip { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; min-height: 35px; border: 1px solid var(--line); border-radius: 25px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.chip.active { background: var(--page); color: var(--ink); border-color: var(--accent); font-weight: 600; }
.chip svg { width: 13px; height: 13px; }
.pocket-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; }
.search-field { position: relative; min-width: 240px; }
.search-field svg { position: absolute; top: 13px; left: 14px; width: 16px; height: 16px; color: var(--muted); }
.search-field input { padding-left: 39px; background: var(--surface); }
.pocket-tabs { margin: 25px 0 23px; display: flex; flex-wrap: wrap; gap: 9px; }
.pocket-tools { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.pocket-tool { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 23px; border: 1px solid var(--line); border-radius: 17px; min-height: 173px; background: var(--page); }
.pocket-tool h3 { font-size: 14px; }
.pocket-tool p { font-size: 11px; color: var(--muted); margin-top: 5px; }
.pocket-tool > .arrow { position: absolute; right: 20px; top: 27px; width: 15px; height: 15px; color: var(--muted); }
.status-tag { display: inline-flex; align-items: center; font-size: 9px; border-radius: 20px; padding: 2px 7px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); margin-top: 13px; }
.status-tag.available { color: var(--accent); border-color: var(--transparent); background: var(--accent-soft); }
.knowledge-list { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.knowledge-card { border: 1px solid var(--line); border-radius: 17px; overflow: hidden; text-align: left; padding: 0; background: var(--page); position: relative; }
.knowledge-art { display: grid; align-items: center; height: 125px; padding: 21px 23px; background: var(--panel); }
.knowledge-art { border-bottom: 1px solid var(--line); }
.knowledge-art > span { font: italic 57px/1 var(--serif); color: var(--accent); opacity: .6; }
.knowledge-art.blue { background: var(--info-soft); }
.knowledge-art.blue > span { color: var(--info); }
.knowledge-art.peach { background: var(--peach); }
.knowledge-card-copy { padding: 17px 21px 19px; }
.knowledge-card-copy > small { font-size: 10px; color: var(--muted); }
.knowledge-card-copy > h3 { font-size: 15px; margin: 7px 0; }
.knowledge-card-copy > p { color: var(--muted); font-size: 11px; }
.knowledge-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; font-size: 10px; color: var(--muted); }
.knowledge-card-footer svg { width: 15px; height: 15px; color: var(--accent); }
.no-results { grid-column: 1/-1; padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }
.app-dialog { width: min(540px,calc(100% - 36px)); max-height: min(85vh,850px); padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--page); color: var(--ink); box-shadow: var(--shadow-lg); overflow-y: auto; }
.app-dialog[open] { animation: dialog-enter .28s var(--ease); }
.app-dialog::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(15px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 21px 25px 12px; gap: 15px; }
.dialog-head h2 { font-size: 19px; }
.dialog-head .icon-button { margin-right: -8px; }
.dialog-body { padding: 0 25px 25px; }
.dialog-intro { font-size: 12px; color: var(--muted); margin-bottom: 20px; line-height: 1.9; }
.dialog-callout { padding: 16px; border-radius: 12px; background: var(--surface); color: var(--body); font-size: 12px; line-height: 1.9; margin: 17px 0; }
.dialog-callout svg { color: var(--accent); width: 20px; height: 20px; margin-bottom: 8px; }
.dialog-body h3 { font-size: 14px; margin: 20px 0 7px; }
.dialog-body p { font-size: 13px; line-height: 1.95; color: var(--body); }
.dialog-body > p + p { margin-top: 13px; }
.dialog-body ul { font-size: 12px; color: var(--body); padding-left: 20px; line-height: 2; }
.article-meta { display: flex; gap: 13px; color: var(--muted); font-size: 10px; margin-bottom: 18px; }
.article-bottom { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; }
.article-example { white-space: pre-wrap; margin: 14px 0; padding: 17px; border-radius: 12px; background: var(--panel); font-size: 12px; color: var(--body); line-height: 1.9; }
.profile-stats { display: flex; gap: 35px; margin: 20px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-stats strong { display: block; font-size: 25px; font-weight: 500; font-variant-numeric: tabular-nums; }
.profile-stats small { color: var(--muted); font-size: 11px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.upload-zone { border: 1px dashed var(--line-strong); border-radius: 15px; background: var(--surface); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 27px 15px; min-height: 160px; cursor: pointer; }
.upload-zone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone > svg { width: 31px; height: 31px; stroke-width: 1.25; color: var(--accent); margin-bottom: 12px; }
.upload-zone strong { font-size: 13px; font-weight: 500; }
.upload-zone small { color: var(--muted); font-size: 10px; margin-top: 5px; }
.file-list { margin: 15px 0; display: grid; gap: 8px; }
.file-row { padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 9px; }
.file-row > span { min-width: 0; font-size: 11px; overflow-wrap: anywhere; }
.file-row small { font-size: 9px; color: var(--muted); display: block; }
.file-error { color: var(--danger); font-size: 11px; margin: 10px 0; }
.processing { display: inline-block; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: var(--transparent); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-stack { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; width: min(400px,calc(100% - 36px)); pointer-events: none; }
.toast { display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--line); padding: 13px 17px; border-radius: 13px; background: var(--white-alpha); color: var(--ink); box-shadow: var(--shadow-lg); font-size: 12px; animation: toast-enter .28s var(--ease); margin-top: 8px; }
.toast svg { color: var(--accent); width: 17px; height: 17px; }
.toast.error svg { color: var(--danger); }
.toast.leaving { opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; }
@keyframes toast-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes item-enter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.favorite-pop { animation: favorite-pop .35s var(--spring); }
@keyframes favorite-pop { 40% { transform: scale(1.19); } }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.no-script { margin: 40px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); }
::view-transition-old(root) { animation: transition-out .15s ease both; }
::view-transition-new(root) { animation: transition-in .25s var(--ease) both; }
@keyframes transition-out { to { opacity: 0; } }
@keyframes transition-in { from { opacity: 0; transform: translateY(5px); } }
.home-heading { margin-bottom: 24px; align-items: center; }
.home-heading h1 { font-size: clamp(25px,2.65vw,31px); letter-spacing: -.025em; }
.home-heading .date-label { margin-bottom: 8px; }
.home-heading .page-description { margin-top: 5px; }
.home-heading-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.day-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 15px; margin-bottom: 22px; overflow: hidden; }
.overview-item { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; text-align: left; padding: 17px 20px; min-width: 0; min-height: 72px; background: var(--page); }
.overview-item + .overview-item { border-left: 1px solid var(--line); }
.overview-item > svg { width: 17px; height: 17px; color: var(--body); }
.overview-item > span { color: var(--body); font-size: 11px; }
.overview-item > strong { font-size: 25px; line-height: 1.2; font-weight: 400; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 5px; }
.overview-item strong small { font: 10px var(--font); color: var(--muted); white-space: nowrap; }
.daily-dashboard { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1.1fr) minmax(0,.95fr); gap: 18px; align-items: stretch; }
.daily-dashboard > * { min-width: 0; }
.component-topline { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 15px; }
.component-index { color: var(--muted); font-size: 10px; letter-spacing: .07em; }
.component-topline > svg { width: 16px; height: 16px; color: var(--body); }
.quick-note-card { display: flex; flex-direction: column; padding: 22px; }
.quick-note-card h2 { font-size: 20px; margin-bottom: 4px; }
.quick-note-card textarea { color: var(--body); width: 100%; resize: vertical; border: 0; background: var(--page); min-height: 155px; flex: 1; margin: 15px 0 17px; padding: 5px 0; font-size: 13px; line-height: 2; border-radius: 2px; }
.quick-note-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 15px; border-top: 1px solid var(--line); }
.quick-note-bottom > span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.quick-note-bottom .button { padding: 8px 13px; min-height: 40px; font-size: 11px; }
.quick-note-privacy { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; margin-top: 15px; }
.quick-note-privacy svg { width: 11px; height: 11px; }
.daily-feelings { display: grid; grid-template-rows: auto 1fr; gap: 16px; }
.daily-feelings .mood-panel { padding: 20px 21px 12px; }
.daily-feelings .component-topline { margin-bottom: 9px; }
.daily-feelings .mood-panel h3 { font-size: 15px; }
.daily-feelings .mood-options { padding-top: 17px; padding-bottom: 12px; }
.daily-feelings .mood-face { width: 40px; height: 40px; }
.daily-feelings .mood-option { min-width: 0; }
.daily-feelings .mood-bottom { gap: 9px; flex-wrap: wrap; padding-top: 8px; }
.daily-feelings .mood-bottom .text-button { font-size: 10px; min-height: 29px; }
.daily-feelings .quote-panel { min-height: 160px; padding: 18px 22px 13px; }
.daily-feelings .quote-panel blockquote { font-size: 18px; line-height: 1.8; margin: 8px 0; }
.daily-dashboard .calendar { display: flex; flex-direction: column; padding: 23px 20px; }
.daily-dashboard .calendar-head { flex-wrap: wrap; gap: 5px; margin-bottom: 19px; }
.daily-dashboard .calendar-grid { flex: 1; align-content: center; gap: 10px 3px; }
.daily-dashboard .calendar-grid > span { min-height: 31px; }
.daily-dashboard .calendar-caption { font-size: 9px; white-space: nowrap; }
.home-tools { margin-top: 30px; }
.home-tools .tool-quick-grid { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; }
.home-tools .tool-quick { display: flex; flex-direction: column; min-height: 173px; padding: 17px 15px 14px; border-radius: 15px; }
.home-tools .tool-quick > .tool-icon { width: 35px; height: 35px; border-radius: 10px; margin-bottom: 12px; }
.home-tools .tool-quick > strong { font-weight: 500; font-size: 12px; }
.home-tools .tool-quick > small { font-size: 10px; line-height: 1.8; margin: 5px 0 12px; }
.home-tools .tool-quick > .arrow { width: 13px; height: 13px; right: 14px; top: 21px; }
.tool-state { font-size: 9px; color: var(--muted); margin-top: auto; display: flex; align-items: center; gap: 5px; }
.tool-state::before { content: ""; width: 3px; height: 3px; background: currentColor; border-radius: 50%; }
.home-bottom-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; margin-top: 25px; }
.home-bottom-grid > .surface { min-width: 0; padding: 23px; }
.home-bottom-grid .section-heading { align-items: center; margin-bottom: 16px; }
.home-bottom-grid .section-heading h2 { font-size: 18px; }
.home-bottom-grid .section-heading .text-button { font-size: 11px; }
.recent-intro { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.starter-prompts { display: grid; gap: 8px; }
.starter-prompt { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; text-align: left; font-size: 12px; }
.prompt-number { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.starter-prompt > svg { width: 14px; height: 14px; margin-left: auto; }
.reading-row { display: flex; align-items: center; width: 100%; gap: 15px; text-align: left; padding: 13px 0; border-bottom: 1px solid var(--line); }
.reading-row:first-child { padding-top: 0; }
.reading-row:last-child { border-bottom: 0; padding-bottom: 0; }
.reading-number { font: italic 25px var(--serif); color: var(--muted); min-width: 27px; align-self: flex-start; padding-top: 3px; }
.reading-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.reading-copy > small { font-size: 9px; color: var(--muted); }
.reading-copy > strong { font-size: 12px; font-weight: 500; }
.reading-copy > span { font-size: 10px; color: var(--muted); }
.reading-row > svg, .recent-entry > svg { width: 15px; height: 15px; color: var(--muted); }
.recent-entry { display: flex; align-items: center; gap: 16px; padding: 17px 0; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.recent-entry:first-child { padding-top: 3px; }
.recent-entry:last-child { border-bottom: 0; }
.recent-entry-date { display: flex; flex-direction: column; gap: 4px; font-size: 18px; color: var(--body); font-variant-numeric: tabular-nums; }
.recent-entry-date > small { font-size: 10px; color: var(--muted); }
.recent-entry-copy { display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.recent-entry-copy > strong { font-size: 12px; font-weight: 500; }
.recent-entry-copy > span { font-size: 11px; line-height: 1.8; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.legacy-favorite { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
@media (hover:hover) and (pointer:fine) {
  .icon-button:hover { background: var(--page); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
  .nav-link:hover { color: var(--accent); }
  .button.primary:hover { background: var(--page); border-color: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
  .button.secondary:hover, .button.soft:hover { background: var(--page); border-color: var(--accent); }
  .tool-quick:hover, .pocket-tool:hover { transform: translateY(-4px); background: var(--page); border-color: var(--line-strong); box-shadow: var(--shadow); }
  .tool-quick:hover > .arrow { transform: translate(2px,-2px); color: var(--accent); }
  .knowledge-card:hover { transform: translateY(-3px); }
  .mood-option:hover .mood-face { transform: translateY(-4px) rotate(-5deg); background: var(--accent-soft); }
  .text-button:hover svg { transform: translateX(3px); }
  .chip:hover:not(.active) { background: var(--surface); }
  .prompt:hover { color: var(--accent); }
  .starter-prompt:hover { transform: translateX(3px); border-color: var(--line-strong); }
  .reading-row:hover > svg, .recent-entry:hover > svg { transform: translate(2px,-2px); color: var(--ink); }
  .reading-row > svg, .recent-entry > svg { transition: transform .2s var(--ease); }
  .overview-item:hover { box-shadow: inset 0 -2px var(--accent); }
}
@media (max-width:1000px) {
  .knowledge-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .day-overview .overview-item { padding-inline: 15px; gap: 8px; }
  .overview-item > svg { display: none; }
  .overview-item { grid-template-columns: 1fr auto; }
  .daily-dashboard { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .quick-note-card { grid-column: 1/-1; }
  .quick-note-card textarea { min-height: 95px; }
  .home-tools .tool-quick-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .home-tools .tool-quick { min-height: 150px; }
  .home-heading-actions { gap: 8px; }
  .home-heading-actions .button { padding-inline: 12px; }
  .header-inner { padding-inline: 25px; gap: 18px; }
  .main-nav { gap: 21px; }
  .brand-copy strong { font-size: 16px; }
  .app-main { padding-inline: 25px; }
  .mood-panel { padding-inline: 17px; }
  .quote-panel { padding-inline: 19px; }
  .mood-options { gap: 3px; }
  .mood-face { width: 40px; height: 40px; }
  .mood-option { min-width: 37px; }
  .tool-quick { padding-inline: 15px; }
  .journal-layout { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 18px; }
  .studio-layout { gap: 23px; }
  .studio-preview { padding: 22px; }
}
@media (max-width:760px) {
  .home-heading { flex-direction: column; align-items: stretch; gap: 17px; }
  .home-heading h1 { font-size: 25px; }
  .home-heading-actions { justify-content: flex-start; }
  .home-heading-actions .button { min-height: 40px; font-size: 11px; }
  .day-overview { margin-bottom: 18px; }
  .day-overview .overview-item { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 14px 12px; }
  .overview-item > span { font-size: 10px; }
  .overview-item > strong { font-size: 23px; gap: 4px; }
  .overview-item strong small { font-size: 9px; }
  .daily-dashboard { gap: 15px; }
  .daily-feelings .mood-panel { padding: 20px 17px 12px; }
  .daily-feelings .mood-face { width: 35px; height: 35px; }
  .daily-feelings .mood-face svg { width: 23px; height: 23px; }
  .daily-feelings .quote-panel { padding: 18px 20px 13px; }
  .daily-dashboard .calendar { padding: 22px 17px; }
  .daily-dashboard .calendar-caption { white-space: normal; }
  .home-bottom-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  :root { --header-h: 76px; }
  .header-inner { padding-inline: 21px; }
  .main-nav { display: none; }
  .header-divider { display: none; }
  .header-actions { gap: 5px; }
  .brand img { width: 37px; height: 37px; }
  .brand-copy strong { font-size: 16px; letter-spacing: .015em; }
  .app-main { padding: 26px 21px 28px; }
  h1 { font-size: 29px; line-height: 1.6; }
  .page-heading { margin-bottom: 22px; }
  .heading-note { display: none; }
  .mood-panel { padding: 19px 16px 13px; }
  .mood-panel .panel-subtitle { font-size: 10px; }
  .mood-bottom { flex-wrap: wrap; gap: 0; }
  .mood-bottom .text-button { min-height: 28px; }
  .mood-options { padding-top: 13px; }
  .mood-option { min-width: 0; flex: 1; }
  .mood-face { width: 36px; height: 36px; }
  .mood-face svg { width: 23px; height: 23px; }
  .quote-panel { padding: 19px 17px 14px; }
  .quote-panel blockquote { font-size: 15px; }
  .tool-quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .tool-quick { min-height: 133px; padding: 17px 19px; }
  .section { margin-top: 29px; }
  .site-footer { padding: 7px 21px calc(110px + env(safe-area-inset-bottom)); margin-top: 5px; }
  .site-footer > div { gap: 18px; font-size: 9px; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 35; justify-content: space-around; background: var(--white-alpha); border-top: 1px solid var(--line); backdrop-filter: blur(18px); padding: 10px 15px calc(10px + env(safe-area-inset-bottom)); }
  .mobile-nav .nav-link { display: flex; flex-direction: column; gap: 4px; flex: 1; justify-content: center; min-height: 47px; font-size: 10px; padding: 0; }
  .mobile-nav .nav-link svg { width: 21px; height: 21px; }
  .mobile-nav .nav-link::after { top: -11px; bottom: auto; left: calc(50% - 15px); right: auto; width: 30px; }
  .toast-stack { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .journal-layout { grid-template-columns: minmax(0,1fr); }
  .journal-right { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 15px; align-items: start; }
  .gentle-prompts { margin: 0; }
  .journal-right > .local-note { grid-column: 1/-1; margin-top: 0; }
  .page-title-row { align-items: flex-start; }
  .page-title-row > .button { min-height: 38px; padding: 9px 10px; font-size: 10px; }
  .page-title-row > .button span { display: none; }
  .studio-layout { display: flex; flex-direction: column; gap: 25px; }
  .studio-preview { position: relative; top: auto; width: 100%; padding: 21px 30px; }
  .canvas-wrap { max-width: 300px; }
  .editor-panel { width: 100%; }
  .pocket-title-row { flex-direction: column; gap: 20px; }
  .search-field { width: 100%; }
  .pocket-tools { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .pocket-tool { padding: 18px; min-height: 171px; }
  .knowledge-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .knowledge-card-copy { padding: 15px; }
  .knowledge-card-copy > h3 { font-size: 14px; }
  .knowledge-art { padding-inline: 17px; }
  .page-description { font-size: 11px; }
  .section-heading h2 { font-size: 18px; }
}
@media (max-width:480px) {
  .home-heading h1 { font-size: 24px; }
  .daily-dashboard { grid-template-columns: minmax(0,1fr); }
  .quick-note-card { padding: 21px; }
  .quick-note-card textarea { min-height: 120px; }
  .daily-feelings { gap: 15px; }
  .daily-feelings .mood-panel { padding: 20px 21px 13px; }
  .daily-feelings .mood-face { width: 43px; height: 43px; }
  .daily-feelings .mood-face svg { width: 26px; height: 26px; }
  .daily-dashboard .calendar { padding: 22px; }
  .daily-dashboard .calendar-grid { gap: 4px 3px; }
  .home-tools .tool-quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
  .home-tools .tool-quick { min-height: 158px; padding: 17px; }
  .home-tools .tool-quick > .tool-icon { width: 37px; height: 37px; }
  .home-tools .section-footnote { text-align: left; line-height: 1.8; }
  .home-bottom-grid > .surface { padding: 21px; }
  .home-bottom-grid .section-heading h2 { font-size: 17px; }
  .home-bottom-grid .section-heading .text-button { font-size: 10px; }
  .reading-row { gap: 11px; }
  .recent-entry { gap: 13px; }
  .reading-copy > strong { font-size: 12px; }
  .mood-panel { padding: 20px 20px 14px; }
  .mood-options { padding: 18px 0 13px; gap: 9px; }
  .mood-face { width: 46px; height: 46px; }
  .mood-option { font-size: 11px; }
  .mood-face svg { width: 28px; height: 28px; }
  .mood-bottom { flex-wrap: nowrap; }
  .quote-panel { min-height: 145px; padding: 19px 22px 12px; }
  .quote-panel blockquote { font-size: 18px; margin: 11px 0; }
  .journal-right { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .journal-composer { padding: 21px; }
  .composer-title { font-size: 18px; }
  .journal-text { min-height: 170px; }
  .composer-meta { gap: 8px; font-size: 9px; }
  .composer-bottom .button { padding-inline: 13px; }
  .page-title-row { gap: 8px; }
  .studio-preview { padding: 19px 25px; }
  .photo-choices { gap: 8px; }
  .photo-choice img { height: 67px; }
  .upload-choice { min-height: 77px; }
  .field-row { gap: 10px; }
  .template-choice { font-size: 10px; padding-inline: 5px; }
  .pocket-tool { padding: 16px; }
  .pocket-tool h3 { font-size: 13px; }
  .pocket-tool p { font-size: 10px; }
  .pocket-tool > .arrow { right: 13px; top: 22px; }
  .knowledge-list { grid-template-columns: minmax(0,1fr); }
  .knowledge-card { display: grid; grid-template-columns: 82px minmax(0,1fr); align-items: stretch; }
  .knowledge-art { height: 100%; padding: 16px; justify-content: center; }
  .knowledge-art > span { font-size: 38px; }
  .knowledge-card-copy { padding: 17px 16px; }
  .knowledge-card-footer { margin-top: 12px; }
  .app-dialog { border-radius: 21px; }
  .dialog-head { padding-inline: 21px; }
  .dialog-body { padding-inline: 21px; }
}
@media (max-width:350px) {
  .day-overview .overview-item { padding-inline: 9px; }
  .overview-item > span { font-size: 9px; }
  .overview-item > strong { font-size: 20px; gap: 3px; }
  .overview-item strong small { font-size: 8px; }
  .home-heading h1 { font-size: 22px; }
  .home-bottom-grid .section-heading { flex-wrap: wrap; gap: 3px; }
  .header-inner { padding-inline: 16px; }
  .app-main { padding-inline: 16px; }
  .brand { gap: 8px; }
  .brand-copy strong { font-size: 15px; }
  .brand img { width: 34px; height: 34px; }
  .search-trigger { display: none; }
  .tool-quick { padding-inline: 16px; }
  .mood-options { gap: 4px; }
  .mood-face { width: 42px; height: 42px; }
  .field-row { grid-template-columns: minmax(0,1fr); gap: 0; }
  .editor-actions { gap: 8px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .page, .app-dialog[open], .toast { opacity: 1; transform: none; }
  .mood-face { transform: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
@media (pointer:coarse) {
  .icon-button, .icon-button.small, .profile-button { min-width: 44px; min-height: 44px; }
  .text-button, .chip, .subtle-link, .entry-actions button { min-height: 44px; }
}
