:root{--paper:#faf8f2;--ink:#36312e;--muted:#827a73;--green:#99546a;--line:#e6dfd7;--soft:#f6e9ed}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.7 system-ui,'Microsoft YaHei',sans-serif}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}a{color:var(--green);text-decoration:none}header,main,footer{max-width:1200px;margin:auto;padding:0 32px}header{display:flex;justify-content:space-between;align-items:center;height:104px;border-bottom:1px solid var(--line)}.brand{font:700 25px Georgia,serif;color:var(--ink)}.brand small{display:block;font:10px/2 system-ui;letter-spacing:2px;color:var(--muted)}#identity{display:flex;align-items:center;gap:16px;font-size:13px}.intro{display:flex;justify-content:space-between;align-items:center;padding:44px 0 32px}.eyebrow{font-size:11px;letter-spacing:3px;color:var(--green)}h1{font:38px/1.45 Georgia,'Songti SC',serif;margin:14px 0}h2{font-size:22px;margin:0 0 12px}h3{font-size:15px;margin:0 0 10px}p{color:var(--muted)}.week-motif{width:310px;padding:30px;background:#eee4df;transform:rotate(3deg);border:1px solid #dfd2ca;box-shadow:8px 10px 0 #e8e1d8}.week-motif span{font:24px Georgia,serif;display:block;border-bottom:1px solid #d6c7be;padding-bottom:16px}.week-motif b{display:block;margin:22px 0;font-weight:400}.week-motif i{font-size:12px;color:var(--muted)}#status{font-size:12px;min-height:24px;margin:0 0 12px}#status.error{color:#a55d46}#tabs{display:flex;border-bottom:1px solid var(--line);gap:8px;margin:0 0 24px;overflow:auto}button{background:white;color:var(--ink);border:1px solid var(--line);padding:10px 16px;border-radius:8px;min-height:44px}#tabs button{background:transparent;border:0;border-radius:0;white-space:nowrap;color:var(--muted);padding:12px 20px}#tabs button[aria-current=page]{border-bottom:3px solid var(--green);color:var(--green);font-weight:600}.primary{display:inline-block;background:var(--green);color:white;border:0;padding:10px 20px;border-radius:8px;min-height:44px}.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:20px}.toolbar h2{margin:0 auto 0 0}.book{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(260px,1fr);background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden}.days{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.day{min-height:170px;padding:18px;border-bottom:1px solid var(--line);border-right:1px solid var(--line);background:repeating-linear-gradient(white,white 31px,#f3efe9 32px)}.day.today h3{color:var(--green)}.day h3{display:flex;gap:10px;align-items:center}.day h3 span{font-size:24px;font-family:Georgia}.day h3 button{margin-left:auto;background:transparent;padding:0 10px;min-height:32px;border:0;color:var(--muted)}.pool{padding:22px;border-left:1px solid var(--line);background:#f8f4ee}.hint{font-size:12px;line-height:1.8}.task{display:flex;align-items:flex-start;gap:9px;padding:7px 0;font-size:14px}.task input{width:18px;height:18px;flex-shrink:0;margin-top:5px;accent-color:var(--green)}.task .title{flex:1;white-space:pre-wrap;overflow-wrap:anywhere;cursor:pointer}.task.done .title{text-decoration:line-through;color:#9a9189}.task button{padding:0 7px;font-size:12px;min-height:30px;background:transparent;border:0;color:var(--muted)}.task:focus-within{outline:1px solid var(--line)}.empty{padding:25px 0;color:var(--muted);font-size:13px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.card{background:white;border:1px solid var(--line);border-radius:12px;padding:22px}.card p{font-size:13px}.habits{overflow:auto;background:white;border:1px solid var(--line);border-radius:12px;padding:20px}table{border-collapse:collapse;width:100%;min-width:550px}td,th{padding:14px 8px;text-align:center;border-bottom:1px solid var(--line)}td:first-child,th:first-child{text-align:left}td button{min-width:40px;padding:0;min-height:40px}.checked{background:var(--green);color:white}.rest{color:#aaa099}.journal{max-width:780px;margin:auto;background:white;border:1px solid var(--line);padding:30px;border-radius:12px}.journal textarea{height:240px;width:100%;resize:vertical;border:0;background:repeating-linear-gradient(white,white 31px,#e7dfd5 32px);line-height:32px;padding:0;outline-offset:4px;color:var(--ink)}.journal textarea:focus{outline:2px solid #c9aca3}.completed{border-left:3px solid #c9aca3;padding:12px 16px;margin:12px 0;background:#f7f1ea}.actions{display:flex;gap:12px;justify-content:flex-end;margin-top:22px}dialog{border:1px solid var(--line);border-radius:14px;width:calc(100% - 32px);max-width:520px;padding:24px;max-height:90dvh;overflow:auto}dialog::backdrop{background:#302b2855}.dialog-title{display:flex;align-items:center;justify-content:space-between}.dialog-title button{border:0;font-size:24px;padding:0 10px}.dialog-title h2{margin:0}label{display:block;margin:16px 0;font-size:13px;font-weight:600}label input,label select,label textarea{display:block;width:100%;border:1px solid #e4dbd2;background:white;color:var(--ink);padding:10px 12px;border-radius:7px;min-height:44px;margin-top:6px}label textarea{min-height:120px}footer{padding-top:48px;padding-bottom:30px;text-align:center;font-size:12px;color:var(--muted)}[hidden]{display:none!important}:focus-visible{outline:2px solid var(--green);outline-offset:3px}#welcome{background:white;border:1px solid var(--line);padding:32px;border-radius:12px}.subtle{background:transparent;border:0;color:var(--muted)}.danger{color:#a65a45}.day.dragover{background:#f4e9e4}.journal input[type=date]{padding:8px;border:1px solid var(--line);border-radius:6px}.save-note{font-size:12px;color:var(--muted)}@media(max-width:800px){header,main,footer{padding-left:18px;padding-right:18px}header{height:80px}.intro{padding:24px 0}.week-motif{display:none}h1{font-size:29px}.intro p:last-child{font-size:13px}.book{grid-template-columns:1fr}.pool{border-left:0;border-top:1px solid var(--line)}.day{padding:12px;min-height:150px}.task{font-size:13px}#tabs{gap:0}#tabs button{padding:12px 15px}.toolbar h2{font-size:18px}.journal{padding:20px}.brand{font-size:22px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.authed .intro{padding:16px 0;align-items:center}.authed .intro h1{font-size:25px;margin:6px 0}.authed .intro h1 br{display:none}.authed .intro .eyebrow,.authed .week-motif{display:none}.authed .intro p{margin:6px 0;font-size:13px}body[data-theme=plain]{--paper:#f8f8f6;--green:#596264;--soft:#eff0ed}body[data-theme=brown]{--paper:#fbf7f0;--green:#80634d;--soft:#f0e9de}.card button{margin-right:6px;margin-bottom:6px}

.task-body{flex:1;min-width:0}.subtask{display:flex;gap:8px;align-items:center;margin:4px 0;font-size:12px;font-weight:400;color:var(--muted)}.subtask input{display:inline-block;margin:0;width:15px;min-height:15px;height:15px;padding:0}.journal-photo{max-width:100%;max-height:400px;display:block;border-radius:8px;margin:16px 0}@media print{header,.intro,#tabs,#status,footer,.toolbar button,.pool button,.task button,.day h3 button,#identity{display:none!important}body{background:white}.book{border-radius:0;grid-template-columns:2fr 1fr}main{padding:0}.day{break-inside:avoid}.task{break-inside:avoid}}

/* Paper notebook palette and touch layouts. Legacy green preference maps to paper. */
body[data-theme=green],body[data-theme=paper]{--paper:#faf7f1;--ink:#36312e;--muted:#827a73;--green:#99546a;--soft:#f6e9ed}
header,main,footer{width:100%}main,#workspace,#view,.card,.journal,.habits,.book,.toolbar{min-width:0}.toolbar>*{max-width:100%}.toolbar h2{overflow-wrap:anywhere}.card{overflow-wrap:anywhere}.card+.card{margin-top:0}.journal select{border:1px solid var(--line);background:white;border-radius:8px;min-height:44px;padding:8px 12px;color:var(--ink);margin-left:8px}.journal input[type=file]{max-width:100%;font-size:14px}.journal input::file-selector-button{background:var(--soft);border:1px solid var(--line);border-radius:6px;padding:10px;color:var(--ink)}.task .title{display:block}.task input{margin-top:10px}.task button,.day h3 button{min-height:44px;min-width:44px}.task button{padding:0 6px}.day.today{box-shadow:inset 3px 0 var(--green)}.habits th{font-size:12px}.habits td:first-child button{text-align:left;overflow-wrap:anywhere;max-width:200px}dialog{overscroll-behavior:contain}.actions{position:sticky;bottom:-24px;background:white;padding:16px 0;margin-top:12px}.brand{white-space:nowrap}#identity{min-width:0}#identity>*{max-width:180px;overflow-wrap:anywhere}#status{overflow-wrap:anywhere}
@media(max-width:800px){
body{font-size:14px;padding-bottom:calc(78px + env(safe-area-inset-bottom))}header,main,footer{padding-left:16px;padding-right:16px}header{height:76px;gap:12px}.brand{font-size:21px}.brand small{font-size:8px;letter-spacing:1.5px}#identity{gap:8px;font-size:12px;flex-wrap:wrap;justify-content:flex-end}#identity button{padding:6px 10px}.intro{padding:24px 0}.authed .intro{padding:16px 0 8px}.authed .intro h1{font-size:22px}.intro h1{font-size:30px}#status{font-size:11px;margin-bottom:16px}#tabs{position:fixed;bottom:0;left:0;right:0;z-index:20;background:#fffdf9;border-top:1px solid var(--line);border-bottom:0;box-shadow:0 -4px 20px #392d2310;margin:0;padding:8px 4px calc(8px + env(safe-area-inset-bottom));gap:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));overflow:visible}#tabs button{padding:9px 0;font-size:11px;min-width:0;min-height:48px;border-radius:8px;white-space:normal;line-height:1.4}#tabs button[aria-current=page]{border:0;background:var(--soft);color:var(--green)}.toolbar{gap:8px;display:flex;margin-bottom:16px}.toolbar h2{flex:1 0 100%;font-size:18px;margin-bottom:4px}.toolbar button{font-size:13px;padding:8px 12px}.book{display:block;border-radius:10px}.days{grid-template-columns:1fr}.day{min-height:125px;padding:12px 16px;border-right:0}.day h3{margin-bottom:6px}.day h3 span{font-size:25px}.pool{padding:20px 16px}.task{font-size:14px;gap:6px}.task button{font-size:11px;min-width:36px}.task .title{padding:8px 0}.task input{width:20px;height:20px}.cards{grid-template-columns:minmax(0,1fr);gap:16px}.card{padding:20px}.journal{padding:18px 16px}.journal textarea{height:280px;font-size:16px;line-height:32px}.journal input[type=date]{max-width:60%;font-size:16px}.journal select{max-width:36%;font-size:16px}.habits{padding:0;background:transparent;border:0;overflow:visible}.habits table{display:block;min-width:0;width:100%}.habits tbody{display:block}.habits tr{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));padding:12px 8px;background:white;border:1px solid var(--line);border-radius:10px;margin-bottom:12px}.habits tr:first-child{display:none}.habits td{display:flex;flex-direction:column;align-items:center;border:0;padding:0;min-width:0}.habits td:first-child{grid-column:1/-1;align-items:flex-start;margin-bottom:12px}.habits td:first-child button{max-width:100%;font-weight:600;border:0;padding:0 8px}.habits td[data-day]::before{content:attr(data-day);font-size:10px;color:var(--muted);margin-bottom:6px}.habits td button{min-width:38px;min-height:44px;padding:0;font-size:16px}#welcome{padding:24px 20px}#welcome .primary{width:100%;text-align:center}footer{padding-top:28px;padding-bottom:20px}dialog{margin:auto 0 0;width:100%;max-width:none;border-radius:18px 18px 0 0;max-height:88dvh;padding:20px 20px calc(20px + env(safe-area-inset-bottom))}dialog input,dialog select,dialog textarea{font-size:16px}.actions{bottom:-20px;padding-bottom:calc(16px + env(safe-area-inset-bottom))}.actions button{flex:1}.dialog-title h2{font-size:20px}
}
@media(max-width:360px){header,main,footer{padding-left:12px;padding-right:12px}.brand{font-size:18px}#identity{font-size:11px}#tabs button{font-size:10px}.habits td button{min-width:34px}.task button{min-width:32px}.journal select{margin-left:4px}}
@media print{body{padding-bottom:0}.days{grid-template-columns:repeat(2,minmax(0,1fr))}.day{box-shadow:none}}
/* Phone-first interaction layer: one day's agenda, thumb actions and compact cards. */
@media(max-width:800px){
.authed .intro{display:none}.authed header{height:64px;border:0}.authed #identity button{display:none}.authed #identity span{font-size:12px;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#status{margin:0 0 12px;min-height:20px}#view{padding-bottom:76px}body[data-page=journal] #view,body[data-page=templates] #view,body[data-page=mine] #view{padding-bottom:0}.mobile-weekbar{display:flex;gap:4px;align-items:center;margin:0 0 12px}.mobile-weekbar strong{flex:1;text-align:center;font-size:16px}.mobile-weekbar button{padding:4px 10px;background:transparent;border:0;min-width:44px}.mobile-weekbar button:last-child{border:1px solid var(--line);font-size:12px}.date-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin:0 0 16px}.date-strip button{border:0;background:transparent;padding:6px 0;border-radius:12px;min-height:66px}.date-strip span{display:block;font-size:11px;color:var(--muted)}.date-strip b{display:block;font:21px/1.8 Georgia,serif}.date-strip button[aria-pressed=true]{background:var(--green);color:white}.date-strip button[aria-pressed=true] span{color:white}.date-strip .is-today:not([aria-pressed=true]){background:var(--soft)}.segmented{display:grid;grid-template-columns:1fr 1fr;padding:4px;background:#eee8e1;border-radius:10px;margin-bottom:16px}.segmented button{border:0;background:transparent;min-height:40px;font-size:13px}.segmented button[aria-pressed=true]{background:#fffdf9;box-shadow:0 1px 4px #392d2310;color:var(--green);font-weight:600}.mobile-agenda{background:white;border:1px solid var(--line);border-radius:12px;padding:16px}.mobile-agenda h2{font-size:18px;margin:0}.mobile-agenda .hint{margin:4px 0 12px}.mobile-empty{padding:36px 16px;text-align:center;font-size:13px;line-height:1.9}.floating-add{position:fixed;right:16px;bottom:calc(88px + env(safe-area-inset-bottom));z-index:15;border-radius:24px;padding:12px 20px;box-shadow:0 4px 16px #99546a30;min-height:48px}.task{align-items:flex-start;border-top:1px solid #f1ece6;padding:8px 0;gap:10px}.task>input{width:24px;height:24px;margin:10px 0}.task-more{font-size:24px!important;min-width:44px!important}.task-body .title{font-size:15px;min-height:44px;line-height:1.65;display:block}.subtask{min-height:40px;font-size:13px}.subtask input{width:20px;height:20px}.list-chips{display:flex;gap:8px;overflow:auto;scrollbar-width:none;margin-bottom:16px;padding:2px 0 6px}.list-chips button{flex-shrink:0;border-radius:22px;min-height:44px}.list-chips button[aria-pressed=true]{background:var(--soft);border-color:#dcb8c4;color:var(--green)}.completed-fold{margin-top:16px;color:var(--muted)}summary{cursor:pointer;min-height:44px;padding:10px 0;font-size:14px}.habit-phone{background:white;border:1px solid var(--line);border-radius:12px;margin-bottom:14px;padding:16px}.habit-top{display:flex;align-items:center;gap:8px}.habit-top h3{font-size:16px;flex:1;margin:0;overflow-wrap:anywhere}.habit-top button{border:0;background:transparent;font-size:12px}.habit-phone>.primary,.habit-phone>.checked{width:100%;min-height:48px}.habit-phone .hint{margin:0 0 12px}.habit-history{margin-top:8px}.habit-history summary{font-size:12px;color:var(--muted)}.habit-checkstrip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}.habit-checkstrip>div{text-align:center;min-width:0}.habit-checkstrip small{display:block;font-size:10px;color:var(--muted);margin-bottom:6px}.habit-checkstrip button{padding:0;width:100%;min-width:0;min-height:44px}button:disabled{opacity:.4;cursor:default}.template-phone{padding:20px;background:white;border:1px solid var(--line);border-radius:12px;margin-bottom:16px}.template-phone small{font-size:11px;color:var(--green)}.template-phone h2{font-size:20px;margin:12px 0 6px}.template-phone p{font-size:13px}.template-phone button{width:100%;color:var(--green);background:var(--soft);border:0}.template-sheet>.primary{width:100%;margin:12px 0}.template-sheet>button:last-child{width:100%}.action-sheet>button{width:100%;margin:6px 0;text-align:left;background:#faf7f1;border:0;min-height:50px}.action-sheet .dialog-title h2{max-width:85%;font-size:17px;overflow-wrap:anywhere}.editor-extra{border-top:1px solid var(--line);margin-top:12px}.editor-extra summary{color:var(--muted)}dialog #edit-fields>label{margin:12px 0}.editor-extra label textarea{min-height:90px}#tabs button::before{display:block;font-size:18px;line-height:1.3;margin-bottom:4px}#tabs button[data-tab=week]::before{content:'▦'}#tabs button[data-tab=todo]::before{content:'☑'}#tabs button[data-tab=habit]::before{content:'◉'}#tabs button[data-tab=journal]::before{content:'✎'}#tabs button[data-tab=templates]::before{content:'✧'}#tabs button[data-tab=mine]::before{content:'☺'}#tabs button{padding:4px 0;font-size:10px;min-height:52px}.journal{border:0;background:transparent;padding:0}.journal textarea{padding:12px;background:repeating-linear-gradient(#fffdf9,#fffdf9 31px,#e7dfd5 32px);border-radius:8px;height:300px}.journal>button.primary{width:100%;margin-top:12px}.journal>label{margin:16px 0}.journal>h3{margin-top:24px}.account-group summary{font-size:16px;font-weight:600;padding:0;display:flex;align-items:center;min-height:44px;justify-content:space-between}.account-group summary::after{content:'+';font-size:20px;font-weight:400;color:var(--muted)}.account-group[open] summary::after{content:'−'}.account-group>button{display:block;width:100%;margin:8px 0;text-align:left;min-height:48px}.account-group p{margin:12px 0}.account-group>a{display:block;padding:10px 0}.cards{gap:12px}.card{padding:12px 16px}.cards+.card{margin-top:12px}footer{padding-top:16px;font-size:11px}
}
@media(max-width:800px){.mood-chips{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:16px 0}.mood-chips button{padding:6px 0;font-size:11px;min-width:0;border:0;background:white;min-height:46px}.mood-chips button[aria-pressed=true]{background:var(--soft);color:var(--green)}.photo-picker{background:white;border:1px dashed var(--line);border-radius:10px;padding:12px}.journal input[type=date]{width:100%;max-width:100%;text-align:center;background:white}.journal .hint{margin-top:0}.editor-extra summary:focus-visible{outline:2px solid var(--green)}}
/* Completion feedback: keep the row stable before grouping, no decorative interruption. */
.task-check{position:relative;flex-shrink:0;width:44px;min-height:44px;margin:0!important;display:flex;align-items:center;justify-content:center;cursor:pointer}.task-check input{position:absolute;width:26px!important;height:26px!important;min-height:0!important;margin:0!important;padding:0!important;opacity:0;cursor:pointer;z-index:2}.task-checkmark{display:block;width:24px;height:24px;border:1.5px solid #b5a9a5;border-radius:50%;position:relative;transition:background .16s,border-color .16s}.task-check input:checked+.task-checkmark{background:var(--green);border-color:var(--green)}.task-checkmark::after{content:'';position:absolute;left:7px;top:4px;width:6px;height:11px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg) scale(0);transition:transform .18s}.task-check input:checked+.task-checkmark::after{transform:rotate(45deg) scale(1)}.task-check input:focus-visible+.task-checkmark{outline:2px solid var(--green);outline-offset:4px}.task.just-completed .task-checkmark{animation:check-pop .4s ease-out}.task.just-completed .task-check::after{content:'';position:absolute;width:24px;height:24px;border-radius:50%;border:2px solid var(--green);animation:check-ring .55s ease-out forwards;pointer-events:none}.task.just-completed{animation:completed-wash .65s ease-out}.task .title{transition:color .2s,opacity .2s}.task.done .title{color:#a49a96;text-decoration-color:#bba9af}.completion-toast{position:fixed;left:50%;bottom:calc(166px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:30;max-width:calc(100% - 32px);width:max-content;background:#fffdf9;color:var(--green);border:1px solid #e8ced7;border-radius:16px;box-shadow:0 4px 24px #48323915;padding:10px 14px;display:flex;align-items:center;gap:12px;font-size:13px;animation:toast-rise .2s ease-out}.completion-toast button{border:0;background:var(--soft);color:var(--green);font-size:12px;min-height:36px;padding:6px 12px;white-space:nowrap}.completion-progress{height:4px;background:#f0e9e8;border-radius:4px;overflow:hidden;margin:0 0 16px}.completion-progress span{display:block;height:100%;background:var(--green);transition:width .3s}.mobile-agenda.all-complete{border-color:#dfb6c4;background:#fffafc}.date-progress{display:block;font-size:10px;line-height:1;color:var(--green);font-style:normal}.date-strip button[aria-pressed=true] .date-progress{color:white}.habit-checkstrip button.checked,.habit-phone>.checked{animation:check-pop .3s ease-out}.habit-checkstrip button{border-radius:50%;border:1px solid var(--line)}@keyframes check-pop{0%{transform:scale(.8)}55%{transform:scale(1.16)}100%{transform:scale(1)}}@keyframes check-ring{0%{transform:scale(1);opacity:.5}100%{transform:scale(2);opacity:0}}@keyframes completed-wash{0%{background:#f3e0e8}100%{background:transparent}}@keyframes toast-rise{from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}@media(min-width:601px){.completion-toast{bottom:28px}}@media(prefers-reduced-motion:reduce){.task-checkmark,.task-checkmark::after,.task .title,.completion-progress span{transition:none}.task.just-completed,.task.just-completed .task-checkmark,.task.just-completed .task-check::after,.completion-toast,.habit-checkstrip button.checked,.habit-phone>.checked{animation:none}.task.just-completed .task-check::after{display:none}}
/* First-run guidance and illustrated, selectable inspiration library. */
.guide-dialog{text-align:center;max-width:540px;padding:32px}.guide-dialog>h2{font:28px/1.5 Georgia,'Songti SC',serif}.guide-dialog>p{font-size:14px}.guide-art{height:145px;display:flex;align-items:center;justify-content:center;gap:16px;background:radial-gradient(circle at 15% 70%,#edc582 0 22px,transparent 23px),radial-gradient(circle at 85% 25%,#b9bdd8 0 28px,transparent 29px);margin-bottom:24px}.guide-art span{display:flex;align-items:center;justify-content:center;width:80px;height:90px;border-radius:22px;background:#efd3df;color:#99546a;font-size:38px;transform:rotate(-10deg)}.guide-art span:nth-child(2){background:#f5dca3;transform:rotate(8deg);color:#795f36}.guide-art span:nth-child(3){background:#d8dbea;transform:rotate(-6deg);color:#66698d}.guide-steps{margin:24px 0;text-align:left}.guide-steps>div{padding:12px 0;border-bottom:1px solid var(--line)}.guide-steps b{font-size:14px;display:block}.guide-steps small{display:block;color:var(--muted)}.guide-dialog>.primary{width:100%;margin-bottom:8px}.template-search{display:block;width:100%;max-width:540px;padding:12px 16px;border:1px solid var(--line);border-radius:12px;background:white;font-size:16px;min-height:48px;margin:16px 0}.template-filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.template-filters button{border-radius:22px;font-size:13px}.template-filters button[aria-pressed=true]{background:var(--soft);color:var(--green)}.template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.inspiration-card{background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden;position:relative;padding-bottom:16px;min-width:0}.template-cover{position:relative;isolation:isolate;display:flex;width:100%;min-height:150px;flex-direction:column;justify-content:center;align-items:flex-start;padding:24px;border:0;border-radius:0;overflow:hidden;color:#523e3c;text-align:left;background:#efd6dd}.template-cover::before,.template-cover::after{content:'';position:absolute;z-index:-1;pointer-events:none}.template-cover::before{width:100px;height:100px;border:18px solid #ffffff66;border-radius:50%;right:-20px;top:-25px}.template-cover::after{width:72px;height:90px;right:20px;bottom:-35px;transform:rotate(22deg);background:#ffffff44;border-radius:16px}.template-cover h2{font:23px/1.5 Georgia,'Songti SC',serif;margin:10px 0 0;max-width:90%;overflow-wrap:anywhere}.template-cover small{font-size:11px}.template-cover.sun{background:#f4dda4;color:#68532c}.template-cover.letters,.template-cover.note{background:repeating-linear-gradient(0deg,#ece1ca 0 23px,#ded0b5 24px);color:#5d4e3c}.template-cover.stars,.template-cover.moon{background:#dce0ee;color:#535674}.template-cover.cup{background:#ecd2b9;color:#694b39}.template-cover.trip{background:#dbe4e7;color:#425a64}.template-cover.desk{background:#e0dcd0;color:#595448}.inspiration-card>p{margin:14px 16px 8px;font-size:13px;min-height:44px}.inspiration-card>small{display:block;margin:0 16px;color:var(--muted);font-size:11px}.inspiration-card>button:last-child{display:block;width:calc(100% - 32px);margin:12px 16px 0;min-height:44px;background:#faf7f1;border:0}.inspiration-card>button.selected{background:var(--soft);color:var(--green)}.template-dock{position:sticky;bottom:16px;background:#fffdf9;border:1px solid var(--line);box-shadow:0 4px 24px #453a2912;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;border-radius:14px;margin-top:20px;z-index:15}.template-dock span{font-size:13px;color:var(--muted)}.template-detail>.template-cover{border-radius:10px}.template-detail>p{font-size:14px}.template-detail>.primary{width:100%;margin:12px 0 8px}.template-detail>button:last-child{width:100%}.template-import select,.template-import input{width:100%;min-height:48px;font-size:16px;padding:10px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);margin:8px 0}.template-import>.primary,.template-import>button:last-child{width:100%;margin:8px 0}body[data-page=templates] #view{padding-bottom:20px}
@media(max-width:800px){.template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.guide-dialog{height:auto;max-height:94dvh;border-radius:20px 20px 0 0;padding:24px}.guide-art{height:120px;margin-bottom:16px}.guide-art span{width:65px;height:75px}.guide-dialog>h2{font-size:25px}.guide-steps{margin:16px 0}.guide-dialog .subtle{min-height:44px}.template-grid{grid-template-columns:minmax(0,1fr);gap:16px}.template-cover{min-height:140px;padding:20px}.template-cover h2{font-size:24px}.template-filters{flex-wrap:nowrap;overflow:auto;scrollbar-width:none;padding-bottom:4px}.template-filters button{flex-shrink:0}.template-dock{position:fixed;left:12px;right:12px;bottom:calc(80px + env(safe-area-inset-bottom));margin:0;padding:12px;border-radius:12px}.template-dock .primary{padding:10px 12px;font-size:13px}.template-dock span{font-size:11px}body[data-page=templates] #view{padding-bottom:100px}.template-detail{padding-top:20px}}
.calendar-panel p{font-size:13px;overflow-wrap:anywhere}.calendar-panel>.primary,.calendar-actions>.primary{display:block;text-align:center;margin:12px 0}.calendar-panel>button:last-child{display:block;width:100%;margin-top:16px}.calendar-actions>input{width:100%;padding:12px;border:1px solid var(--line);border-radius:8px;font-size:14px;min-height:48px}.calendar-actions>button{width:100%;margin:6px 0}.calendar-panel details p{line-height:1.8}

/* Shared responsive bounds: content determines height; long text never widens a page. */
.authed .intro{display:none}
header .brand small{display:none}
.authed #status:not(.error){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0}
.authed header{height:64px}
main{padding-top:16px}
#view>*{min-width:0;max-width:100%}
.task-body,.habit-top h3,.account-group{min-width:0}
.subtask span,summary,.completed{overflow-wrap:anywhere}
input,select,textarea{max-width:100%;min-width:0}
@media(max-width:800px){
:root{--page-gutter:16px}
html,body{width:100%;min-width:0}
header,main,footer{padding-left:max(var(--page-gutter),env(safe-area-inset-left));padding-right:max(var(--page-gutter),env(safe-area-inset-right))}
header,.authed header{height:52px;border-bottom:1px solid var(--line)}
.brand{font-size:19px}#identity{font-size:12px;max-width:40%}
main{padding-top:14px}.intro{padding:12px 0}.intro h1{font-size:24px;margin:8px 0}.intro p{font-size:13px}
.authed #status.error{margin:0 0 12px;padding:10px 12px;background:var(--soft);border-radius:8px;position:static;width:auto;height:auto;clip-path:none}
.authed footer{display:none}
.toolbar{margin-bottom:12px}.toolbar h2{font-size:18px}.toolbar button{min-width:0}
.mobile-agenda,.habit-phone,.card{padding:16px;border-radius:14px}
.journal{padding:0 2px}.journal textarea{width:100%;padding:12px;font-size:16px}
.photo-picker input{width:100%;font-size:12px}
.list-chips,.template-filters{max-width:100%;min-width:0;padding:4px 2px 8px;scroll-padding:8px}
.list-chips button{max-width:85%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.task{gap:4px}.task-more{flex:0 0 40px;min-width:40px!important}.task-check{width:40px}.task .title{overflow-wrap:anywhere}
.mobile-empty{padding:28px 4px}.habit-top h3{line-height:1.5}.habit-top button{flex-shrink:0}
.dialog-title{gap:8px;align-items:flex-start}.dialog-title h2{min-width:0;overflow-wrap:anywhere}.dialog-title button{flex-shrink:0}
dialog{width:calc(100% - 16px);max-width:560px;margin:auto auto 0;padding:20px 16px calc(20px + env(safe-area-inset-bottom));max-height:90dvh;overflow-x:hidden}
dialog form{min-width:0}.actions{bottom:-20px;gap:8px}.actions button{min-width:0;padding:10px}
.guide-dialog{width:calc(100% - 16px);padding:20px 16px}.guide-steps{padding-left:0}.guide-dialog>h2{font-size:24px}
.template-dock{left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));gap:8px}.template-dock span{min-width:0}.template-dock button{flex-shrink:0}
.template-cover h2{font-size:22px}.calendar-actions input{min-width:0}
#tabs{padding-left:max(4px,env(safe-area-inset-left));padding-right:max(4px,env(safe-area-inset-right))}
}

.task-time{display:block;color:var(--muted);font-size:11px}.notify-device,.notify-settings,.notify-jobs{border-top:1px solid var(--line);padding-top:16px;margin-top:16px}.notification-center button{margin:4px 4px 4px 0}.notify-switch{display:flex;align-items:center;justify-content:space-between;gap:12px}.notify-switch input{width:22px;height:22px;min-height:22px;margin:0;accent-color:var(--green)}.notify-job{padding:12px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.notify-job strong,.notify-job small{display:block}.notify-job small{color:var(--muted);font-size:12px}.notification-center .primary{width:100%}.notification-center h3{margin-top:8px}
.notify-device>button{width:100%;margin:5px 0}.notify-preferences{border-top:1px solid var(--line);margin-top:16px}.notify-preferences>summary{font-weight:600}.notify-settings{border:0;margin-top:0}

.quick-dialog{padding:20px;max-width:520px}.quick-dialog h2{font-size:21px}.quick-dialog textarea{width:100%;max-width:100%;border:0;background:var(--paper);border-radius:12px;padding:14px;margin-top:16px;min-height:88px;resize:vertical;font-size:17px;color:var(--ink)}.quick-tags{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.quick-tags button{padding:8px 12px;border-radius:24px;font-size:12px;background:var(--soft);border:0;min-height:40px}.quick-picker:not(:empty){border:1px solid var(--line);border-radius:12px;padding:12px}.quick-picker button{margin:3px;font-size:12px;padding:8px}.quick-picker label{margin:8px 0}.quick-picker input{width:100%;min-width:0}.quick-preview{max-height:160px;overflow:auto;overflow-wrap:anywhere;font-size:12px;color:var(--muted)}.quick-preview div{padding:6px 0;border-bottom:1px solid var(--line)}.quick-more{margin-top:8px}.quick-more summary{color:var(--muted);font-size:13px}.quick-more label{margin:10px 0}.quick-more textarea{margin:6px 0;min-height:70px;font-size:15px}.quick-feedback{font-size:12px;min-height:20px;margin:8px 0;color:var(--green)}.quick-actions{display:flex;align-items:center;gap:12px;background:white;position:sticky;bottom:-20px;padding:12px 0}.quick-actions .primary{flex:1;border-radius:24px}.quick-actions .subtle{flex:0 0 auto}button:disabled{opacity:.4;cursor:default}@media(max-width:800px){.quick-dialog{padding:18px 16px calc(16px + env(safe-area-inset-bottom));max-height:90dvh}.quick-dialog .dialog-title button{min-width:44px}.quick-dialog textarea{font-size:16px}.quick-actions{bottom:-16px;padding-bottom:env(safe-area-inset-bottom)}.quick-dialog label input,.quick-dialog label select{font-size:16px}}
