/* LovePath layout and interaction rules layered on FlayZ UI primitives. */
:root{
 font-size:16px;
 --space-1:4px;--space-2:var(--flayz-space-1);--space-3:12px;--space-4:var(--flayz-space-2);--space-5:20px;--space-6:var(--flayz-space-3);--space-8:var(--flayz-space-4);--space-10:40px;
 --text-caption:.8125rem;--text-body:.9375rem;--text-label:.875rem;--title-card:1.5rem;--title-section:1.75rem;
 --radius-control:16px;--radius-card:var(--flayz-radius);--radius-sheet:var(--flayz-radius);--touch:var(--flayz-touch-min);
 --duration-fast:140ms;--duration-normal:200ms;--ease-standard:cubic-bezier(.2,.7,.2,1);
 --shadow-soft:0 6px 24px #35162f0b;--shadow-sheet:0 20px 72px #160c2038;
 --focus:var(--accent-ink);--nav-inset:calc(104px + env(safe-area-inset-bottom));
}
:root[data-dark=true]{--shadow-soft:0 6px 24px #00000012;--shadow-sheet:0 20px 72px #00000060}
html{scroll-padding-top:24px;scroll-padding-bottom:var(--nav-inset);text-size-adjust:100%;-webkit-text-size-adjust:100%}
body{line-height:1.55;overscroll-behavior-y:none}
.shell{max-width:1120px;padding-inline:clamp(20px,4vw,48px);padding-bottom:var(--nav-inset)}
.setup-shell{padding:50px 25px}
.page-content{animation:none;min-width:0}
.section-head{gap:var(--space-3);margin:var(--space-8) 0 var(--space-4);align-items:center}
.section-head h2,.feature-heading,.feature-panel>.section-head h2,.home-drawing-entry .section-head h2{font-size:var(--title-section);line-height:1.2}
.overline{line-height:1.5;letter-spacing:.2em}
.card,.calendar,.conversation-panel,.us-drawing,.us-entry,.achievement-entry,.drawing-home-card{border-radius:var(--radius-card);border-color:var(--line)}
.card{box-shadow:var(--shadow-soft)}
.btn{font-size:var(--text-label);text-decoration:none}
.btn svg{width:20px;height:20px}
.btn.secondary,.btn.outline{box-shadow:none}
.icon-btn.flayz-button{width:var(--touch);height:var(--touch);min-height:var(--touch)}
.text-btn.flayz-button{padding-inline:6px;font-size:var(--text-label)}
button:disabled{cursor:default;opacity:.55}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
.field{gap:var(--space-2);font-size:var(--text-label);line-height:1.5}
.field .flayz-input{font-size:1rem;line-height:1.5}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--focus);outline:2px solid color-mix(in srgb,var(--focus) 20%,transparent);outline-offset:1px}
.field textarea{min-height:112px}
.field input[type=checkbox]{min-height:0}
.check{min-height:var(--touch);align-items:center;gap:12px;line-height:1.5}
.check .flayz-checkbox{width:22px;height:22px}
.form-error{line-height:1.5;margin:12px 0}
.search .flayz-input{border:0;background:transparent;padding-inline:0}
.tag.flayz-badge{background:var(--lavender);color:var(--ink)}
.filters{gap:8px;flex-wrap:wrap}
.filter{min-height:var(--touch);padding:10px 16px;font-size:var(--text-label)}
.meta,.small,.note-card small,.drawing-gallery-card p{font-size:var(--text-caption);line-height:1.55}
.tag{font-size:.75rem;line-height:1.5}
.flayz-progress{appearance:none;border:0;border-radius:999px;background:var(--line);overflow:hidden}
.flayz-progress::-webkit-progress-bar{background:var(--line)}
.flayz-progress::-webkit-progress-value{background:var(--accent)}
.flayz-progress::-moz-progress-bar{background:var(--accent)}
.list-tile .flayz-progress{width:calc(100% - 28px)}
.achievement-step-bar.flayz-progress{min-width:0}
.us-intro{padding:var(--space-5) 0 var(--space-8)}
.us-intro h2{font-size:clamp(30px,4.5vw,42px);line-height:1.15;margin:var(--space-3) 0 var(--space-4)}
.us-intro p{max-width:58ch;line-height:1.7}
.conversation-stage{padding:var(--space-8) 0 var(--space-6)}
.conversation-stage h2{font-size:clamp(26px,4vw,36px);margin:var(--space-4) 0 var(--space-6)}
.shared-answers article{padding:var(--space-5);border-radius:18px}
.feature-panel{padding:0;margin:var(--space-8) 0}
.gentle-empty{padding:var(--space-8) var(--space-5);border-style:solid;background:var(--surface)}
.gentle-empty h3,.note-card h3,.achievement-card h3,.drawing-gallery-card h3{font-size:var(--title-card);line-height:1.25}
.gentle-empty p,.achievement-card p{font-size:var(--text-label);line-height:1.65}
.achievement-card.locked{opacity:1;color:var(--muted);filter:none;background:var(--surface)}
.achievement-card.locked .achievement-medal{background:var(--sand);color:var(--muted)}
.settings-grid{gap:10px}
.setting-row{padding:16px;gap:16px;border:1px solid var(--line);border-radius:20px}
.setting-row h3{font-size:23px;line-height:1.25}
.setting-row p{font-size:var(--text-caption);margin-top:5px;line-height:1.5}
.setting-row>.circle{width:48px;height:48px}
.drawing-swatch,.custom-drawing-color,.drawing-size{min-width:48px;min-height:48px;width:48px;height:48px}
.drawing-tool{min-height:48px;padding:10px;font-size:var(--text-caption)}
.drawing-swatches{justify-content:flex-start;gap:4px}
.drawing-save-row .btn{min-height:52px}
.drawing-note textarea{min-height:88px}
.drawing-versions summary,.daily-archive summary{min-height:48px;display:flex;align-items:center;gap:8px;font-weight:600}
.drawing-section-list article{padding:var(--space-4);gap:var(--space-4)}
.drawing-section-list time{font-size:var(--text-caption)}
.drawing-section-list p{line-height:1.65}
.bottom-nav{padding:6px;gap:3px;border-radius:24px;background:var(--surface);backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:0 8px 30px #2113261c}
.bottom-nav button{min-height:58px;gap:5px;font-size:12px;border-radius:18px}
.bottom-nav button.active{background:var(--coral);color:var(--accent-ink)}
:root[data-dark=true] .bottom-nav{background:var(--surface);border-color:var(--line)}
:root[data-dark=true] .bottom-nav button.active{background:var(--coral);color:var(--accent-ink)}
.bottom-nav button[aria-current=page]{font-weight:650}
.home-list-footer{font-size:11px}
#toast{position:fixed;inset-inline:16px;inset-block-end:calc(var(--nav-inset) + 8px);width:max-content;max-width:min(480px,calc(100vw - 32px));line-height:1.5;pointer-events:none;z-index:150}
html:has(dialog[open]){overflow:hidden;scrollbar-gutter:stable}
dialog.flayz-modal{padding:0;max-block-size:calc(100dvh - 48px);box-shadow:var(--shadow-sheet);overscroll-behavior:contain}
.dialog-head{position:sticky;top:0;z-index:3;padding:16px 20px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;touch-action:pan-x}
.dialog-head h2{font-size:27px;line-height:1.2}
.dialog-body{padding:var(--space-5);min-width:0}
.dialog-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:24px;padding-bottom:env(safe-area-inset-bottom)}
.dialog-actions .btn{flex:1;min-width:120px}
.flayz-modal.drawing-editor{inline-size:min(850px,calc(100vw - 24px));max-inline-size:850px}
.drawing-editor .dialog-head{padding:14px 16px}
.drawing-editor .dialog-body{padding:16px}
@media(hover:hover) and (pointer:fine){.btn:hover,.icon-btn:hover{filter:brightness(.97)}.setting-row:hover,.conversation-history-row:hover{border-color:var(--muted)}}
@media(max-width:640px){
 :root{--title-section:1.5rem;--title-card:1.375rem}
 .shell{padding-inline:20px;padding-top:20px}
 .setup-shell{padding:30px 23px}
 .masthead{gap:12px;align-items:flex-start;margin-bottom:24px}
 .masthead>.row{gap:4px;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;max-width:164px}
 .masthead .brand{font-size:clamp(32px,8vw,42px)}
 .masthead .section-title{font-size:clamp(30px,8vw,40px)}
 .brand-sub,.section-subtitle{font-size:11px;line-height:1.6;letter-spacing:.12em;margin-top:8px}
 .masthead-copy{min-width:0}
 .masthead .sync-status{display:none}
 .section-head{margin-top:28px}
 .section-head>.text-btn{font-size:12px;white-space:nowrap;padding-inline:0;gap:4px}
 .us-entry,.achievement-entry{padding:20px;gap:14px}
 .us-entry h2{font-size:26px}.us-entry p,.drawing-home-card p{font-size:13px}
 .us-entry>.btn{width:100%;margin-top:2px}
 .conversation-panel,.us-drawing{padding:20px}
 .conversation-filters{grid-template-columns:1fr;gap:12px}
 .drawing-gallery{gap:20px}
 .settings-grid{grid-template-columns:1fr}
 .flayz-modal:not(.drawing-editor){inline-size:100%;max-inline-size:100%;margin:auto 0 0;max-block-size:calc(100dvh - max(16px,env(safe-area-inset-top)));border-radius:var(--radius-sheet) var(--radius-sheet) 0 0}
 .dialog-head:before{content:'';position:absolute;top:7px;left:calc(50% - 18px);width:36px;height:4px;border-radius:4px;background:var(--line)}
 .dialog-head{padding-top:22px}
 .dialog-body{padding:20px 20px calc(20px + env(safe-area-inset-bottom))}
 .flayz-modal.drawing-editor{inline-size:100%;block-size:100dvh;max-block-size:100dvh;max-inline-size:100%;margin:0;border-radius:0}
 .drawing-editor .dialog-head:before{display:none}
 .drawing-editor .dialog-body{padding:14px 14px calc(20px + env(safe-area-inset-bottom))}
 .drawing-tool-row{gap:4px}.drawing-tool{font-size:12px;padding-inline:6px}
}
@media(max-width:360px){.shell{padding-inline:16px}.masthead .brand{font-size:30px}.masthead>.row{max-width:156px}.bottom-nav button{font-size:11px}.drawing-size{min-width:44px;width:44px}}
html[data-keyboard=true] .bottom-nav{visibility:hidden;pointer-events:none}
/* Compact Home cards keep text flowing; answer content may grow naturally. */
@media(max-width:800px),(max-height:800px){
 .home-widgets .hero.home-hero{min-height:0;padding:10px 14px;border-radius:22px}
 .home-hero .home-hero-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px}
 .home-hero .couple-name{grid-column:1/-1;font-size:15px;margin-bottom:3px}
 .home-hero .duration{font-size:clamp(26px,7vw,32px);line-height:1.1;margin-bottom:0;letter-spacing:-1px;overflow-wrap:anywhere}
 .home-hero .since{font-size:10px;line-height:1.4;max-width:120px;text-align:right}
 .home-hero .milestone-link{margin-top:6px;padding:6px 8px;gap:8px;border-radius:16px}
 .home-hero .milestone-link .circle{width:32px;height:32px}
 .home-hero .milestone-link .circle svg{width:18px;height:18px}
 .home-hero .milestone-link .overline{font-size:8px;letter-spacing:1px}
 .home-hero .milestone-link h3{font-size:21px;margin:1px 0;line-height:1.15}
 .home-hero .milestone-link p{font-size:11px}
 .home-empty-row{grid-template-columns:32px minmax(0,1fr) auto;gap:8px;padding:12px;align-items:center}
 .home-empty-row>.circle{width:32px;height:32px}
 .home-empty-row>.circle svg{width:18px;height:18px}
 .home-empty-copy h3{font-size:17px;line-height:1.25;overflow-wrap:anywhere}
 .home-empty-copy p{font-size:12px;line-height:1.4;margin-top:4px}
 .home-empty-action{grid-column:auto;width:auto;max-width:110px;min-height:48px;white-space:normal;font-size:12px;padding:8px 10px;gap:5px}
 .home-empty-action svg{width:16px;flex-shrink:0}
 .home-list-grid .home-list-tile.is-empty{min-height:72px;padding:12px}
 .home-list-tile.is-empty>.circle{display:none}
 .home-list-tile.is-empty h3{font-size:16px}
 .home-widget-content .section-head{margin:16px 0 8px}
 [data-home-widget="couple"]>.daily-card,[data-home-widget="couple"]>.question-card{padding:12px 14px;margin-top:12px}
 [data-home-widget="couple"]>.daily-card h2{font-size:21px;line-height:1.2;margin:3px 0}
 [data-home-widget="couple"]>.daily-card p{margin:4px 0}
 [data-home-widget="couple"]>.daily-card blockquote{margin:8px 0;padding:6px 10px}
 [data-home-widget="couple"]>.daily-card.is-empty{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px}
 [data-home-widget="couple"]>.daily-card.is-empty>p{display:none}
 [data-home-widget="couple"]>.daily-card.is-empty .row>svg{display:none}
 [data-home-widget="couple"]>.daily-card.is-empty>.btn{max-width:110px;padding:8px 10px;font-size:12px}
 [data-home-widget="couple"]>.question-card h3{font-size:20px;line-height:1.3;margin:4px 0}
 [data-home-widget="couple"]>.question-card .text-btn{padding-block:6px}
 .home-widgets+.us-entry{padding:12px 14px;margin-block:16px;gap:10px}
 .home-widgets+.us-entry h2{font-size:22px;margin-block:2px}
 .home-widgets+.us-entry>.btn{width:auto;margin-top:0}
}
@media(max-width:640px){
 .home-empty-copy p{display:none}
 .home-empty-action{max-width:96px}
}

html[data-keyboard=true] .shell{padding-bottom:24px}
@media(prefers-reduced-motion:no-preference){
 .btn,.icon-btn,.filter,.bottom-nav button,.drawing-swatch{transition:background-color var(--duration-fast),color var(--duration-fast),transform var(--duration-fast) var(--ease-standard),border-color var(--duration-fast)}
 .btn:active,.icon-btn:active,.bottom-nav button:active{transform:scale(.97)}
 .filter:active,.drawing-swatch:active{transform:scale(.95)}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

@media(max-width:640px){.calendar{margin-inline:-20px;width:calc(100% + 40px);padding:18px 12px;overflow-x:auto}.calendar .weekdays,.calendar .dates{min-width:336px}.calendar .day{min-height:48px;margin:0}}
@media(max-width:360px){.calendar{margin-inline:-16px;width:calc(100% + 32px)}}

.discard-layer{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px;background:#160d1d99}.discard-panel{width:min(440px,100%);padding:24px;border:1px solid var(--line);border-radius:24px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow-sheet)}.discard-panel h2{font-size:28px;margin:12px 0}.discard-panel p{color:var(--muted);line-height:1.6;font-size:15px}.discard-actions{display:grid;gap:10px;margin-top:24px}.discard-actions .btn{width:100%;min-height:48px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.feature-option-note{display:block;color:var(--muted);font-size:12px;margin-top:4px}
.planner-notes-entry{margin:28px 0}.planner-notes-entry>button{display:flex;align-items:center;gap:16px;text-align:left;width:100%;padding:20px;background:var(--lavender);border-radius:24px;border:1px solid var(--line)}.planner-notes-entry h3{font-size:26px}.planner-notes-entry p{color:var(--muted);font-size:13px;margin-top:6px}
.notes-toolbar{display:flex;align-items:center;gap:16px;margin-bottom:16px}.notes-toolbar .search{flex:1;margin:0}.notes-toolbar>.btn{flex-shrink:0}.notes-scope{margin:16px 0}.system-notes-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;margin-top:24px;align-items:start}.system-note{position:relative;min-width:0;border:1px solid var(--line);border-radius:22px;background:var(--surface);overflow:hidden}.system-note.is-pinned{background:var(--sand);border-color:color-mix(in srgb,var(--accent-ink) 28%,var(--line))}.system-note-open{display:block;width:100%;text-align:left;padding:22px 54px 20px 20px;min-height:170px}.system-note-open h2{font:500 23px/1.25 var(--serif);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:12px}.system-note-open p{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;color:var(--muted);line-height:1.6}.system-note-open time{display:block;margin-top:20px;font-size:12px;color:var(--muted)}.note-pin{position:absolute;right:6px;top:6px;width:48px;height:48px;display:grid;place-items:center;border-radius:14px;color:var(--muted)}.note-pin[aria-pressed=true],.note-editor-toolbar [aria-pressed=true]{background:var(--lavender);color:var(--accent-ink)}.note-resume{display:flex;align-items:center;gap:12px;width:100%;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--lavender);text-align:left;margin-top:20px}.note-resume>span{flex:1;min-width:0}.note-resume small{display:block;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:4px}
.notes-editor{max-width:780px;margin:0 auto;padding-bottom:30px}.note-editor-toolbar{position:sticky;top:0;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;background:var(--paper);border-bottom:1px solid var(--line)}.note-editor-toolbar>.row{gap:4px}.note-scope-label{display:flex;gap:7px;align-items:center;font-size:12px;color:var(--muted);white-space:nowrap}.note-scope-label svg{width:16px;height:16px}.note-save-state{font-size:12px;color:var(--muted);min-height:36px;padding:10px 0}.note-title-input{display:block;width:100%;border:0;background:none;color:var(--ink);font:32px/1.3 var(--serif);padding:16px 0;margin:0;border-radius:0}.note-body-input{display:block;width:100%;min-height:55dvh;resize:none;overflow:hidden;border:0;background:none;color:var(--ink);font:16px/1.9 'Segoe UI',system-ui,sans-serif;padding:12px 0;margin:0;border-radius:0}.note-title-input:focus,.note-body-input:focus{outline:none}.note-title-input:focus-visible,.note-body-input:focus-visible{box-shadow:inset 2px 0 0 var(--accent-ink);padding-left:12px}.note-editor-footer{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:14px;color:var(--muted);font-size:12px}.note-error-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.shell:has(.notes-editor) .masthead{margin-bottom:12px}.shell:has(.notes-editor) .masthead .section-title{font-size:30px}
@media(max-width:640px){.notes-toolbar{gap:10px;flex-wrap:wrap}.notes-toolbar .search{flex-basis:100%}.notes-toolbar>.btn{width:100%}.system-notes-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.system-note-open{padding:18px 15px 16px;min-height:190px}.system-note-open h2{font-size:21px;padding-right:28px}.system-note-open p{font-size:13px}.note-editor-toolbar{gap:6px;flex-wrap:wrap}.note-editor-toolbar>.text-btn{font-size:13px}.note-editor-toolbar .icon-btn{width:44px;min-width:44px}.note-scope-label{font-size:11px}.note-title-input{font-size:28px}.note-editor-footer{font-size:11px;flex-wrap:wrap}.shell:has(.notes-editor) .masthead .section-subtitle{display:none}}
@media(max-width:350px){.system-notes-grid{grid-template-columns:1fr}.note-scope-label{order:3;width:100%;padding-bottom:8px}}

.note-editor-toolbar{flex-wrap:wrap}.note-editor-toolbar .note-save-state{flex-basis:100%;padding:0 4px 8px;min-height:24px;font-size:12px}.note-body-input{scroll-margin-top:100px}
.achievement-total{height:8px;max-width:480px;background:var(--line);border-radius:99px;margin-top:22px;overflow:hidden}.achievement-controls{display:flex;justify-content:space-between;align-items:end;gap:18px;flex-wrap:wrap;margin-bottom:28px}.achievement-controls .field{min-width:200px;flex:1;max-width:300px}.achievement-category{margin:28px 0 36px}.achievement-category .section-head h2{display:flex;gap:10px;align-items:center}.achievement-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}.achievement-card{display:flex;flex-direction:column;min-width:0}.achievement-card p{flex:1}.achievement-step{display:flex;align-items:center;gap:9px;margin-top:18px;font-size:12px;color:var(--muted);min-height:24px}.achievement-step svg{width:18px;height:18px;color:var(--accent-ink)}.achievement-step-bar{height:5px;flex:1;background:var(--line);border-radius:9px;overflow:hidden}.category-moments .achievement-medal,.category-story .achievement-medal{background:var(--coral)}.category-planner .achievement-medal,.category-doodle .achievement-medal{background:var(--lavender)}.category-lists .achievement-medal,.category-notes .achievement-medal{background:var(--sand)}.category-daily .achievement-medal,.category-questions .achievement-medal{background:var(--sage)}.relationship-collection{padding:24px;border:1px solid var(--line);border-radius:24px;background:var(--surface);margin:36px 0 24px}.relationship-collection>.section-head{margin-top:0}.relationship-collection>h3{font-size:23px;margin:24px 0 10px}.milestone-list{display:grid;gap:0}.milestone-list article{display:flex;align-items:center;gap:14px;padding:16px 0;border-bottom:1px solid var(--line)}.milestone-list article:last-child{border-bottom:0}.milestone-list small{display:block;font-size:12px;color:var(--muted);margin-top:4px}.milestone-list strong{font-size:16px;font-weight:500}.milestone-list>article>svg{color:var(--accent-ink)}.achievement-optional{margin-bottom:24px}
@media(max-width:640px){.achievement-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.achievement-card{padding:16px}.achievement-card h3{font-size:21px}.achievement-card p{font-size:13px}.achievement-controls{display:block}.achievement-controls .field{max-width:none;margin-top:16px}.achievement-category .section-head h2{font-size:23px}.relationship-collection{padding:18px}.relationship-collection .section-head{flex-wrap:wrap}.milestone-list article{gap:10px}.milestone-list .tag{font-size:11px;padding:5px 8px}}
@media(max-width:350px){.achievement-grid{grid-template-columns:1fr}}
