/* Approved design: warm ivory / sage palette, editorial writing-desk layout. */
:root{--desk-ink:#29352c;--desk-muted:#71776e;--desk-green:#365b3d;--desk-paper:#faf9f5;--desk-line:#e5e7de;--desk-sage:#eff1e9;--desk-serif:'Songti SC','STSong','Noto Serif CJK SC',serif}
body{background:var(--desk-paper);color:var(--desk-ink)}
.worktop{padding:20px 3%;gap:20px;background:var(--desk-paper);border-color:var(--desk-line);min-height:84px}
.worktop .desk-brand{display:flex;align-items:center;gap:24px;white-space:nowrap}.desk-brand strong{font:700 25px var(--desk-serif);letter-spacing:1px}.worktop .desk-brand span{font:italic 13px var(--desk-serif);color:#86877e;letter-spacing:2px;border-left:1px solid var(--desk-line);padding-left:22px;margin:0}
.worktop nav{gap:20px;margin:auto}.worktop nav button{border:0;background:none;border-radius:0;padding:12px 4px;font:17px var(--desk-serif);color:var(--desk-ink);position:relative}.worktop nav button[aria-current=page]:after{content:'';position:absolute;height:3px;background:var(--desk-green);bottom:2px;left:8px;right:8px;border-radius:2px}.worktop nav button:hover{color:var(--desk-green);background:none}
.worktop .desk-signature{font:13px var(--desk-serif);color:var(--desk-muted);display:flex;align-items:center;gap:12px;white-space:nowrap}.desk-signature span{font-size:29px;color:var(--desk-green)}.desk-signature b{font:14px sans-serif;margin-left:14px;padding-left:20px;border-left:1px solid var(--desk-line)}
#cloudSaveStatus{flex-basis:100%;text-align:right;font-size:11px;line-height:1;margin-top:-12px;color:#777e73}.worktop #saveArticle{background:var(--desk-green)}
.desk-page{max-width:1560px;margin:auto;padding:0 3%}.health-strip{display:grid;grid-template-columns:190px 220px minmax(310px,1fr) 175px;align-items:center;gap:30px;padding:27px 28px;background:var(--desk-sage);border-radius:14px;min-height:124px;margin:8px 0 46px}
.desk-page button,.desk-page input,.desk-page textarea,dialog button,dialog textarea{font:inherit}.desk-page button,dialog button{cursor:pointer}.desk-page button:disabled{cursor:default}
.sleep-overview{border:0;background:none;text-align:left;color:var(--desk-ink);padding:0}.sleep-overview>span{font:13px var(--desk-serif)}.sleep-overview strong{display:block;font:700 39px var(--desk-serif);white-space:nowrap;margin-top:8px;letter-spacing:-1px}.sleep-overview small{font:19px var(--desk-serif);letter-spacing:0}
.sleep-chart{border-left:1px solid #d9dfd2;display:flex;justify-content:space-around;align-items:flex-end;padding-left:25px;gap:7px;height:78px}.sleep-bar{display:flex;align-items:center;flex-direction:column;justify-content:flex-end;height:100%;gap:9px;font-size:10px;color:#767e70}.sleep-bar i{display:block;width:15px;border-radius:3px 3px 0 0;background:#bccbb3}.sleep-bar[data-current=true] i{background:var(--desk-green)}.sleep-bar[data-missing=true] i{height:2px!important;background:#d8ddd2}.sleep-bar span{white-space:nowrap}
.feeling p{margin:0 0 12px;font:14px var(--desk-serif)}.mood-options{display:flex;gap:12px}.mood-options button{border:1px solid #d6dccf;border-radius:24px;background:#fcfcfa;color:var(--desk-ink);padding:9px 15px;min-height:40px;display:flex;gap:9px;align-items:center;white-space:nowrap;font-size:18px}.mood-options button span{font:14px var(--desk-serif)}.mood-options button[aria-pressed=true]{border-color:var(--desk-green);color:var(--desk-green);background:#f8fbf4;box-shadow:0 0 0 1px var(--desk-green)}
.sync-state{text-align:right;line-height:1.7}.sync-state span{font-size:11px;color:var(--desk-muted);display:block}.sync-state button{border:0;background:none;font:13px var(--desk-serif);color:var(--desk-green);text-decoration:underline;text-underline-offset:4px;padding:8px 0 0}
.desk-grid{display:grid;grid-template-columns:minmax(0,1.93fr) minmax(305px,1fr);gap:34px}.writing-desk,.desk-companion{min-width:0}.desk-intro{display:flex;justify-content:space-between;align-items:center;margin:4px 0 26px;gap:12px}.desk-intro h1{font:700 clamp(32px,3.1vw,50px)/1.4 var(--desk-serif);margin:8px 0 10px;letter-spacing:1px;white-space:nowrap}.desk-intro p{font:17px/1.7 var(--desk-serif);color:var(--desk-muted);margin:0}.desk-aside-note{font:italic 14px/1.8 var(--desk-serif);color:#929487;white-space:nowrap;transform:rotate(-5deg);text-align:right;margin-top:20px}.desk-aside-note i{display:block;font-size:32px;color:#9cab8c}
.capture-sheet{background:#fffefa;border:1px solid var(--desk-line);border-radius:13px;overflow:hidden;padding:25px 25px 12px}.capture-sheet textarea{resize:vertical;display:block;width:100%;min-height:270px;border:0;background:repeating-linear-gradient(transparent,transparent 42px,#f0f0e9 43px,#f0f0e9 44px);font:18px/44px var(--desk-serif);color:var(--desk-ink);padding:0 0 10px;outline-offset:5px;max-height:65vh}.capture-sheet textarea::placeholder{color:#95998f}.capture-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:28px}.capture-buttons{display:flex;gap:12px;align-items:center}.voice-button{display:flex;align-items:center;gap:12px;background:none;border:0;color:var(--desk-muted);padding:0;font-size:13px!important}.voice-button svg{width:44px;height:44px;padding:12px;stroke:var(--desk-ink);fill:none;stroke-width:1.5;border:1px solid var(--desk-line);border-radius:50%;background:#f7f8f2}.capture-status{font-size:11px;color:var(--desk-muted);line-height:1.6;min-height:18px;margin:12px 0 0}.capture-status[data-error=true]{color:#923d30}
.desk-primary{background:var(--desk-green);color:#fffef6;border:1px solid var(--desk-green);border-radius:10px;padding:13px 22px;font:16px var(--desk-serif)!important;display:inline-flex;gap:18px;align-items:center;justify-content:center;min-height:45px;text-decoration:none}.desk-primary:hover{background:#2a4930}.quiet-button{background:transparent;color:var(--desk-green);border:1px solid #d7decd;border-radius:9px;padding:11px 17px;min-height:42px}.quiet-button:hover{background:var(--desk-sage)}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:18px}.section-heading h2,.desk-companion h2{font:700 21px var(--desk-serif);margin:0}.section-heading>button,.text-button{border:0;background:none;color:var(--desk-muted);font-size:12px!important;padding:5px 0;white-space:nowrap}.ideas-preview{margin-top:32px}.idea-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.idea-card{border:1px solid var(--desk-line);background:#f6f6f0;border-radius:10px;text-align:left;padding:20px 17px;min-width:0;min-height:94px;display:flex;flex-direction:column;gap:10px;color:var(--desk-ink)}.idea-card strong{font:16px var(--desk-serif);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.idea-card span{font-size:11px;line-height:1.6;color:var(--desk-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.idea-card:hover{border-color:#9caf90}.empty-ideas{grid-column:1/-1;border:1px dashed #d9dfd1;border-radius:10px;padding:24px;color:var(--desk-muted);font:14px/1.7 var(--desk-serif);background:#f7f7f1}
.desk-companion{border-left:1px solid var(--desk-line);padding-left:20px}.companion-card,.recent-card{background:#fffefa;border:1px solid var(--desk-line);border-radius:14px;padding:22px;margin-bottom:13px}.companion-card h2{font-size:27px}.subtle{color:var(--desk-muted);font-size:13px;line-height:1.8;margin:8px 0}.companion-message{display:flex;align-items:center;gap:15px;margin:20px 0 9px}.companion-message img{border-radius:50%;object-fit:cover;flex-shrink:0;width:76px;height:76px}.companion-message p{font:16px/1.8 var(--desk-serif);background:var(--desk-sage);border-radius:12px;padding:12px 16px;margin:0}.companion-card .text-button{display:block;margin-left:auto;color:var(--desk-green)}
.recent-card .section-heading{margin-bottom:17px}.recent-card img{width:100%;aspect-ratio:2.35;object-fit:cover;border-radius:9px;display:block}.recent-card h3{font:700 19px/1.6 var(--desk-serif);margin:13px 0 8px}.recent-card .subtle{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.recent-actions{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:13px}.recent-actions>span{font-size:11px;color:#65755b;background:#f0f3e9;padding:5px 8px;border-radius:4px}.recent-actions button{font-size:14px!important;padding:9px 16px;min-height:38px}.recent-empty{padding:27px;background:var(--desk-sage);border-radius:8px;color:var(--desk-muted);font:16px/1.8 var(--desk-serif)}
.evening-card{display:flex;align-items:center;gap:15px;border:1px solid var(--desk-line);border-radius:12px;background:#f6f6ef;width:100%;text-align:left;color:var(--desk-ink);padding:21px}.evening-card strong{font:16px var(--desk-serif);display:block}.evening-card small{font-size:11px;display:block;color:var(--desk-muted);margin-top:9px;line-height:1.6}.evening-card>span:last-child{margin-left:auto}.moon-icon{font-size:31px}.desk-footer{display:flex;justify-content:space-between;gap:20px;padding:28px 0;margin-top:12px;color:#929688;font:italic 12px var(--desk-serif);border-top:1px solid var(--desk-line)}
.desk-detail{max-width:1020px;min-height:480px;margin:auto;padding:12px 0 48px}.desk-detail h1{font:700 36px var(--desk-serif);margin:0 0 12px}.note-list{display:grid;gap:14px}.note-entry{padding:22px;border:1px solid var(--desk-line);background:#fffefa;border-radius:12px;min-width:0}.note-entry p{font:16px/1.9 var(--desk-serif);white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 12px}.note-entry small{color:var(--desk-muted);font-size:11px}.note-entry button{float:right}.sleep-table{width:100%;border-collapse:collapse;font-size:14px;background:#fffefa}.sleep-table th,.sleep-table td{text-align:left;padding:15px 10px;border-bottom:1px solid var(--desk-line)}.health-note{font-size:12px;color:var(--desk-muted);line-height:1.8;margin:16px 0}
#ownerLogin{max-width:430px;margin:60px auto;border-radius:14px;background:#fffefa;padding:30px}#ownerLogin input{font:inherit;width:100%;padding:12px;border:1px solid #d5ddcf;border-radius:7px}#ownerLogin button{margin-top:16px;background:var(--desk-green);color:white;padding:12px 22px;border:0;border-radius:7px;cursor:pointer}
#deskDialog{width:min(560px,calc(100% - 32px));border:1px solid var(--desk-line);border-radius:17px;padding:30px;background:var(--desk-paper);color:var(--desk-ink);max-height:85vh;overflow:auto}#deskDialog::backdrop{background:#24312855;backdrop-filter:blur(3px)}.dialog-close{position:absolute;right:15px;top:12px;border:0;background:none;font-size:26px!important;color:var(--desk-muted)}#dialogContent h2{font:700 25px var(--desk-serif);margin:5px 0 15px}#dialogContent p{line-height:1.85;color:var(--desk-muted);font-size:14px}#dialogContent textarea{width:100%;min-height:150px;resize:vertical;border:1px solid #d7decd;border-radius:8px;padding:15px;background:#fffefa;line-height:1.8;color:var(--desk-ink)}.dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:18px}.dialog-status{font-size:12px!important;min-height:20px;white-space:pre-wrap}button:focus-visible,a:focus-visible,textarea:focus-visible{outline:2px solid var(--desk-green);outline-offset:4px}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(min-width:1450px){.capture-sheet textarea{min-height:310px}.desk-page{padding:0 40px}}
@media(max-width:1190px){.worktop .desk-brand span,.desk-aside-note,.desk-signature{display:none!important}.worktop nav{margin-left:auto;margin-right:0;gap:18px}.health-strip{grid-template-columns:165px 180px 1fr;gap:22px;padding:24px}.sync-state{grid-column:1/-1;display:flex;justify-content:space-between;text-align:left;border-top:1px solid #dde2d5;padding-top:8px}.sync-state button{padding:0}.desk-grid{gap:20px;grid-template-columns:minmax(0,1.65fr) minmax(290px,1fr)}.desk-intro h1{font-size:35px}.capture-sheet{padding:20px 20px 12px}.capture-buttons{gap:8px}.capture-buttons button{padding:11px 14px;font-size:14px!important}.desk-companion{padding-left:15px}.companion-card,.recent-card{padding:19px}.idea-cards{grid-template-columns:1fr}.idea-card{min-height:70px;padding:17px}.idea-card span{display:none}}
@media(max-width:780px){.worktop{padding:17px 20px 9px;gap:14px}.desk-brand strong{font-size:24px}.worktop nav{width:100%;order:3;gap:0;justify-content:space-between;overflow:visible}.worktop nav button{font-size:16px;padding:10px}.worktop #cloudSaveStatus{flex-basis:auto;flex:1;text-align:right;margin:0;font-size:10px}.desk-page{padding:0 18px}.health-strip{margin:12px 0 28px;padding:20px;grid-template-columns:1fr 1fr;gap:20px 10px;border-radius:12px}.sleep-overview strong{font-size:34px}.sleep-overview small{font-size:16px}.sleep-chart{padding-left:15px;gap:5px;height:68px}.sleep-bar i{width:12px}.feeling{grid-column:1/-1}.mood-options{justify-content:space-between;gap:8px}.mood-options button{flex:1;justify-content:center;padding:9px 8px;font-size:18px}.mood-options button span{font-size:13px}.sync-state{gap:15px}.desk-grid{display:flex;flex-direction:column;gap:24px}.desk-intro{margin:0 0 18px}.desk-intro h1{font-size:clamp(25px,7vw,37px);letter-spacing:0;white-space:normal}.desk-intro p{font-size:14px}.capture-sheet{padding:18px 18px 10px}.capture-sheet textarea{min-height:200px;font-size:16px;line-height:40px;background:repeating-linear-gradient(transparent,transparent 38px,#f0f0e9 39px,#f0f0e9 40px)}.capture-actions{margin-top:20px;gap:10px}.capture-buttons{gap:9px}.capture-buttons button{font-size:13px!important;padding:10px 12px;gap:8px}.voice-button svg{width:39px;height:39px;padding:10px}.section-heading h2{font-size:19px}.ideas-preview{margin-top:24px}.idea-cards{grid-template-columns:1fr}.idea-card{flex-direction:row;justify-content:space-between;align-items:center;gap:20px}.idea-card strong{font-size:16px}.idea-card span{display:block;max-width:50%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.desk-companion{border-left:0;padding-left:0}.companion-card{padding:24px}.recent-card img{max-height:210px}.desk-footer{font-size:11px;padding:23px 0}.desk-detail h1{font-size:28px}.sleep-table th,.sleep-table td{font-size:12px;padding:12px 5px}.sleep-table th:last-child,.sleep-table td:last-child{display:none}.note-entry{padding:18px}.note-entry button{float:none;margin-top:15px}.note-entry p{font-size:15px}.desk-footer>span:last-child{display:none}#ownerLogin{margin:40px 20px}.desk-detail .section-heading{align-items:flex-start}.desk-detail .section-heading>button{font-size:12px!important}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important}}

/* Live health view: observation time and content changes remain distinct. */
.health-live-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px}.health-live-badge{display:inline-flex;align-items:center;gap:9px;font-size:13px;color:#547242}.health-live-badge:before{content:'';width:8px;height:8px;border-radius:50%;background:#719859}.health-live-badge[data-state=error],.health-live-badge[data-state=delayed],#sleepSync[data-state=error],#sleepSync[data-state=delayed]{color:#986126}.health-live-badge[data-state=error]:before,.health-live-badge[data-state=delayed]:before{background:#b48c46}.health-live-badge[data-state=unconfigured]{color:#818878}.health-live-badge[data-state=unconfigured]:before{background:#b0b7a8}.health-summary-grid{display:grid;grid-template-columns:1.05fr 1fr;gap:22px;margin-bottom:24px}.health-night-card,.health-connection-card,.health-week-card{border:1px solid var(--desk-line);border-radius:16px;background:#fffefa;padding:27px}.health-night-card>small{font-size:13px;color:var(--desk-muted)}.health-night-card>h2{font:700 43px/1.4 var(--desk-serif);margin:24px 0 34px}.sleep-stages{height:24px;display:flex;border-radius:6px;overflow:hidden;gap:3px;background:#f2f3ed}.sleep-stages .core{background:#b5c9a4}.sleep-stages .deep{background:#4b6b3c}.sleep-stages .rem{background:#d9ddbf}.sleep-stage-labels{display:flex;justify-content:space-between;gap:12px;margin-top:18px}.sleep-stage-labels p{margin:0;font-size:12px}.sleep-stage-labels span{display:block;color:var(--desk-muted)}.sleep-stage-labels strong{display:block;font:17px var(--desk-serif);margin-top:8px}.health-connection-card h2{font:700 21px var(--desk-serif);margin:0}.health-channel{font-size:13px;color:#638052;margin:13px 0 20px}.health-sync-times{display:grid;grid-template-columns:110px 1fr;gap:12px;font-size:13px;line-height:1.6}.health-sync-times dt{color:var(--desk-muted)}.health-sync-times dd{margin:0}.health-dependency{font-size:11px;line-height:1.9;color:var(--desk-muted);border-top:1px solid var(--desk-line);padding-top:12px}.health-pending{font-size:12px;line-height:1.8;color:#936230;background:#f7f1e6;border-radius:8px;padding:13px;margin-top:20px}.health-week-card{background:#f4f6ed;margin-bottom:23px}.health-week-bars{display:flex;justify-content:space-between;gap:12px;align-items:end;margin:28px 0 22px}.health-day-column{flex:1;min-width:0;text-align:center;font-size:11px;color:var(--desk-muted)}.health-day-column strong{font-size:12px;font-weight:400;white-space:nowrap;display:block;margin-bottom:12px}.health-bar-area{height:140px;display:flex;align-items:end;justify-content:center}.health-bar-area i{display:block;width:48%;max-width:38px;min-width:18px;background:#799564;border-radius:5px 5px 0 0}.health-day-column[data-missing=true] i{background:#d4ddc9}.health-day-column span{display:block;margin-top:12px}.health-insight{font:16px/1.9 var(--desk-serif);border-top:1px solid #dce3d2;padding-top:20px}.health-history{border:1px solid var(--desk-line);border-radius:10px;background:#fffefa;padding:18px}.health-history summary{cursor:pointer;font-size:14px}.health-history[open] summary{margin-bottom:18px}
@media(max-width:780px){.health-summary-grid{grid-template-columns:1fr;gap:15px}.health-night-card,.health-connection-card,.health-week-card{padding:22px}.health-night-card>h2{font-size:36px;margin:20px 0 25px}.sleep-stage-labels strong{font-size:16px}.health-week-card .section-heading{align-items:start;flex-direction:column;gap:6px}.health-week-bars{gap:7px}.health-day-column strong{font-size:9px;white-space:normal;min-height:25px;line-height:1.5}.health-bar-area{height:105px}.health-live-badge{font-size:12px}.health-live-heading .quiet-button{font-size:12px;padding:8px 12px}.health-insight{font-size:14px}.health-sync-times{font-size:12px;grid-template-columns:100px 1fr}}

.health-morning{border:1px solid #dbe3d1;background:#edf2e5;border-radius:14px;padding:23px;margin:24px 0}.health-morning h2,.health-activity h2,.health-vitals h2,.health-workouts h2{font:700 22px var(--desk-serif);margin:0 0 10px}.health-morning p{font:17px/1.9 var(--desk-serif);margin:13px 0 18px}.health-activity,.health-vitals,.health-workouts{margin:30px 0}.health-period{display:flex;gap:7px}.health-period button{padding:7px 15px;min-height:35px;font-size:13px}.health-period button[aria-pressed=true]{background:var(--desk-green);color:#fff}.health-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-top:18px}.health-metric-card{border:1px solid var(--desk-line);border-radius:12px;background:#fffefa;padding:20px;min-width:0}.health-metric-card>span{font-size:13px;color:var(--desk-muted);display:block}.health-metric-card strong{font:700 30px var(--desk-serif);display:block;margin:14px 0 10px}.health-metric-card small{font-size:10px;color:var(--desk-muted);display:block;line-height:1.8}.health-workout-card{display:flex;justify-content:space-between;gap:20px;align-items:center;background:#fffefa;border:1px solid var(--desk-line);border-radius:12px;padding:20px 23px;margin-top:13px}.health-workout-card h3{font:700 18px var(--desk-serif);margin:0}.workout-values{display:flex;gap:18px;align-items:center;font-size:13px}.workout-values strong{font:700 18px var(--desk-serif)}.health-channel-receipt{font-size:11px;color:#6f7f60;line-height:1.8;margin:6px 0}.health-vitals .health-metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:780px){.health-metric-grid,.health-vitals .health-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.health-metric-card{padding:17px}.health-metric-card strong{font-size:27px}.health-morning p{font-size:15px}.health-workout-card{align-items:flex-start;flex-direction:column;gap:10px;padding:20px}.workout-values{flex-wrap:wrap;gap:15px}}

/* Flow belongs to the same writing desk, with an ordinary same-tab link. */
.worktop nav .desk-nav-link{font:19px var(--desk-serif);color:var(--desk-ink);text-decoration:none;padding:10px 0;white-space:nowrap;position:relative}
.worktop nav .desk-nav-link:hover{color:var(--desk-green)}
.desk-nav-link:focus-visible,.flow-entry:focus-visible{outline:2px solid var(--desk-green);outline-offset:5px;border-radius:4px}
.flow-entry{display:flex;align-items:flex-start;gap:17px;padding:24px;background:var(--desk-sage);border:1px solid #dce3d3;border-radius:14px;color:var(--desk-ink);text-decoration:none;margin-bottom:22px;transition:border-color .15s,background .15s}
.flow-entry:hover{border-color:#9bb28d;background:#e9efdf}.flow-entry-mark{font:38px/1 var(--desk-serif);color:var(--desk-green)}
.flow-entry strong{font:700 22px var(--desk-serif);display:block}.flow-entry small{display:block;font-size:13px;color:var(--desk-muted);line-height:1.8;margin:10px 0 18px}.flow-entry b{font-size:14px;font-weight:500;color:var(--desk-green)}
@media(max-width:780px){.worktop nav .desk-nav-link{font-size:16px;padding:10px}.worktop nav{scrollbar-width:thin}.worktop nav>*{flex-shrink:0}.flow-entry{margin-bottom:20px;padding:21px}}

.desk-home-link{display:inline-flex;align-items:center;min-height:44px;color:var(--desk-green);font-size:13px;text-underline-offset:4px}.desk-home-link:focus-visible{outline:2px solid var(--desk-green);outline-offset:4px}

/* Sleep drill-down: existing day bars open one shared, accessible detail dialog. */
button.sleep-bar{border:0;background:none;padding:0;min-width:0;flex:1;font-size:10px;color:var(--desk-muted);cursor:pointer}
button.sleep-bar:disabled,button.health-day-column:disabled{cursor:default}
button.sleep-bar:not(:disabled):hover i{background:var(--desk-green)}
button.health-day-column{border:0;background:none;padding:5px 2px;color:var(--desk-muted);font:inherit;cursor:pointer;border-radius:8px}
button.health-day-column:not(:disabled):hover{background:#e7eddc}button.health-day-column:not(:disabled):hover .health-bar-area i{background:var(--desk-green)}
#deskDialog.sleep-dialog{width:min(720px,calc(100% - 36px));padding:30px;max-height:90vh;max-height:90dvh;overscroll-behavior:contain}
#deskDialog .dialog-close{width:44px;height:44px;display:grid;place-items:center;z-index:2}
.sleep-dialog [data-stage=awake]{--stage-color:#dc7560}.sleep-dialog [data-stage=rem]{--stage-color:#27a9ba}.sleep-dialog [data-stage=core]{--stage-color:#398ddd}.sleep-dialog [data-stage=deep]{--stage-color:#635ab4}.sleep-dialog [data-stage=asleep]{--stage-color:#8b97a9}
.sleep-detail-nav{display:flex;gap:12px;align-items:center;margin:22px 0}.sleep-detail-nav select{flex:1;min-width:0;appearance:auto;font:16px var(--desk-serif);padding:10px 14px;border:1px solid var(--desk-line);border-radius:9px;color:var(--desk-ink);background:#fffefa}.sleep-date-arrow{width:44px;height:44px;border:1px solid var(--desk-line);border-radius:50%;background:#fffefa;color:var(--desk-green);font-size:24px!important}.sleep-date-arrow:disabled{opacity:.35}
.sleep-detail-total{margin:23px 0}.sleep-detail-total small{display:block;color:var(--desk-muted);font-size:13px}.sleep-detail-total strong{display:block;font:700 45px/1.4 var(--desk-serif);margin:5px 0 10px}.sleep-detail-total>span{font-size:12px;color:var(--desk-green);background:var(--desk-sage);padding:6px 10px;border-radius:7px;display:inline-block}
.sleep-detail-times{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:24px}.sleep-detail-times>div{background:var(--desk-sage);padding:15px 18px;border-radius:10px}.sleep-detail-times span{display:block;font-size:12px;color:var(--desk-muted)}.sleep-detail-times strong{display:block;font:600 22px var(--desk-serif);margin-top:7px}
.sleep-timeline h3,.sleep-detail-signals h3{font:700 19px var(--desk-serif);margin:22px 0 14px}.sleep-dialog .sleep-detail-note{font-size:12px!important;color:var(--desk-muted);line-height:1.8!important}
.sleep-timeline-lane{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;border-top:1px solid var(--desk-line);gap:8px}.sleep-timeline-lane>span{font-size:11px;color:var(--desk-muted)}.sleep-lane-track{position:relative;height:52px;background-image:linear-gradient(to right,#dfe5d7 1px,transparent 1px);background-size:33.333% 100%}
.sleep-piece{position:absolute;top:10px;height:32px;min-width:2px;border-radius:6px;background:var(--stage-color);opacity:.95}.sleep-timeline-axis{display:flex;justify-content:space-between;margin:9px 0 18px 80px;font-size:11px;color:var(--desk-muted)}.sleep-timeline>select{max-width:100%;font:13px inherit;margin-bottom:12px}
.sleep-composition{display:flex;gap:3px;height:26px;border-radius:7px;overflow:hidden;margin:16px 0}.sleep-composition span{background:var(--stage-color)}
.sleep-detail-stages{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin:22px 0}.sleep-detail-stage{display:flex;gap:12px;justify-content:space-between;align-items:center;border:1px solid var(--desk-line);background:#fffefa;border-radius:11px;padding:16px}.sleep-detail-stage>span{font-size:12px;line-height:1.5}.sleep-detail-stage>span:before{content:'';display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--stage-color);margin-right:7px}.sleep-detail-stage strong{font:600 17px var(--desk-serif);white-space:nowrap}
.sleep-segment-list{margin:14px 0;padding:12px 0;border-block:1px solid var(--desk-line);font-size:12px}.sleep-segment-list summary{cursor:pointer;color:var(--desk-green)}.sleep-segment-list table{border-collapse:collapse;width:100%;margin-top:13px}.sleep-segment-list td{padding:9px 3px;border-top:1px solid var(--desk-line);font-size:12px}.sleep-segment-list td:last-child{text-align:right}
.sleep-signal-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.sleep-signal-grid>div{padding:16px;background:#fffefa;border:1px solid var(--desk-line);border-radius:10px}.sleep-signal-grid span,.sleep-signal-grid small{display:block;color:var(--desk-muted);font-size:12px}.sleep-signal-grid strong{display:block;font:700 25px var(--desk-serif);margin:8px 0}.sleep-signal-grid small{font-size:11px;line-height:1.7}
@media(max-width:600px){#deskDialog.sleep-dialog{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;border-radius:22px 22px 0 0;max-height:94vh;max-height:94dvh;padding:24px 20px calc(24px + env(safe-area-inset-bottom))}.sleep-detail-total strong{font-size:39px}.sleep-detail-stages{grid-template-columns:1fr}.sleep-detail-stage{padding:16px}.sleep-detail-stage>span{font-size:14px}.sleep-detail-stage strong{font-size:19px}.sleep-timeline-lane{grid-template-columns:58px minmax(0,1fr);gap:6px}.sleep-timeline-axis{margin-left:64px}.sleep-lane-track{height:48px}.sleep-piece{height:29px;top:9px}.sleep-detail-nav{margin-top:20px}}

button.health-day-column{font-size:11px}.health-day-column .health-bar-area{display:flex;margin-top:0}

.connection-notice{max-width:700px;margin:36px auto;padding:24px;color:#203a28}.connection-notice progress{width:100%;height:5px;accent-color:#365b3d}.view-loading{padding:25px;background:#eff1e9;border-left:4px solid #365b3d}.voice-help{font-size:13px;line-height:1.7;color:#43543f;margin:12px 0}.voice-button{min-height:44px;font-weight:700;color:#203a28;white-space:nowrap}.voice-button:active,nav button:active,nav summary:active{background:#e5eadf}.worktop nav .desk-more:has([aria-current=page])>summary{background:#173a2b;color:#fffdf4;border-radius:7px}
@media(max-width:780px){.capture-actions{flex-wrap:wrap}.capture-buttons{width:100%;justify-content:space-between}.voice-button span{display:inline}.voice-button{gap:8px}.capture-sheet textarea{min-height:150px}#deskPage[data-view=today] #todayTopics{display:none}#deskPage[data-view=today]{display:flex;flex-direction:column}#deskPage[data-view=today] .health-strip{order:2}#deskPage[data-view=today] .desk-footer{order:3}.writing-desk{padding-top:24px}}

button,a,summary{touch-action:manipulation}

button,a,summary{-webkit-tap-highlight-color:transparent}
/* Same desk palette, clearer rooms and stronger boundaries. */
#deskPage{--room-ink:#25452f;--room-paper:#eef2e7}
#deskPage[data-view=ideas]{--room-ink:#713e28;--room-paper:#f5eadd}
#deskPage[data-view=health]{--room-ink:#245653;--room-paper:#e7f0ed}
#deskPage[data-view=review]{--room-ink:#514235;--room-paper:#f2ece2}
#deskPage:not([data-view=topics]) .desk-detail>.section-heading{padding:22px 24px;margin-bottom:24px;background:var(--room-ink);border:2px solid var(--room-ink);border-radius:12px;color:#fffdf4}
#deskPage:not([data-view=topics]) .desk-detail>.section-heading h1{color:#fffdf4;margin:0}
#deskPage:not([data-view=topics]) .desk-detail>.section-heading .subtle{color:#f0ebdc}
#deskPage:not([data-view=topics]) #backToday{background:#fffdf4;color:var(--room-ink);border:1px solid #fffdf4;white-space:nowrap;min-height:44px}
.desk-intro{padding:22px 24px;border:2px solid #294732;border-radius:12px;background:#294732;color:#fffdf4}.desk-intro h1{color:#fffdf4}.desk-intro p{color:#efe8ce}
.memory-capture{border:2px solid #718165!important}.memory-cue{background:#e9eedc!important;border-bottom:2px solid #718165}.recall-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.recall-heading .recall-eyebrow{margin:0;color:#364b32;font-size:13px;letter-spacing:0}.recall-shuffle{border:1px solid #5b713f;border-radius:6px;padding:8px 12px;min-height:44px;background:#fffdf4;color:#294732;font-weight:700;white-space:nowrap}.recall-shuffle:disabled{opacity:.55;cursor:default}
.desk-page .recall-word{border:2px solid #667b50!important;background:#fffdf4!important;color:#243e28!important;font-weight:700!important}.desk-page .recall-word[aria-pressed=true]{background:#264a30!important;color:#fffdf4!important;border-color:#264a30!important}.recall-original summary{color:#33472f!important}.recall-link{color:#30442b!important}
.ideas-preview{padding:24px;border:2px solid #947539;border-radius:12px;background:#f4ecd8}.ideas-preview .section-heading{border-bottom:2px solid #b99c59;padding-bottom:16px;margin-bottom:18px}.ideas-preview h2{font-size:24px;color:#3a2d18}.ideas-preview .section-heading button{color:#4e3b1c;font-weight:700}.ideas-preview .idea-card{background:#fffdf7;border:1px solid #ac956a;border-left:5px solid #947539}.ideas-preview .idea-card strong{color:#322817}.ideas-preview .idea-card span{color:#514832}
.note-entry,.health-night-card,.health-connection-card,.health-week-card,.health-history,.health-metric-card,.health-workout-card{border-color:#8e9b88!important}.note-entry{border-left:5px solid var(--room-ink);background:#fffdf7}.note-entry small{color:#555b4f}.note-entry button{color:var(--room-ink);font-weight:700}
.desk-more #showToday{border-left:4px solid #365b3d!important}.desk-more #showIdeas{border-left:4px solid #713e28!important}.desk-more #showHealth{border-left:4px solid #245653!important}.desk-more a[href="/flow/"]{border-left:4px solid #866418!important}.desk-more #showReview{border-left:4px solid #514235!important}
.desk-more [aria-current=page]{background:#243f2b!important;color:#fffdf4!important;border-radius:5px!important;font-weight:700!important}.desk-more [aria-current=page]:after{display:none!important}
@media(max-width:780px){.ideas-preview{padding:18px}.ideas-preview h2{font-size:22px}#deskPage:not([data-view=topics]) .desk-detail>.section-heading{padding:19px;gap:12px;flex-wrap:wrap}.desk-intro{padding:20px}.recall-heading{align-items:flex-start}.recall-heading .recall-eyebrow{line-height:1.7}}
.companion-card,.recent-card,.flow-entry,.evening-card{border:1px solid #8d9b80}.recent-card{border-top:5px solid #365b3d}.companion-card{background:#f0efdf}.idea-originals,.ideas-side>section{border-color:#9b8b76}.keyword-panel h2,.idea-originals h2{color:#573b28}

.desk-home-link{display:inline-flex;align-items:center;min-height:44px;padding:8px 10px;border:1px solid var(--desk-line);border-radius:6px;color:var(--desk-ink);font:600 15px var(--desk-serif);text-decoration:none;background:var(--desk-sage)}
.desk-home-link:hover{border-color:var(--desk-green)}.desk-home-link:focus-visible{outline:2px solid var(--desk-green);outline-offset:3px}
@media(max-width:780px){.worktop .desk-brand{gap:10px;white-space:normal}.desk-home-link{font-size:14px;white-space:nowrap}.desk-brand strong{font-size:22px}}
