/* Phone geometry follows Figma frame 210:9207 (402 × 874). */
.preview-status{display:none}.type-nav{display:flex;gap:8px;margin-bottom:8px}.type-nav button{white-space:nowrap;border:1px solid #ebe9e4;background:#fff;border-radius:24px;padding:6px 14px;font-size:13px;line-height:20px}.type-nav button.selected{color:#fff;background:#23262a;border-color:#23262a}
.header-date{display:flex;align-items:center;gap:6px;justify-content:center;font-weight:600;font-size:17px;color:#23262a}.header-date svg{width:12px;height:12px;color:#8a8f96}.header-date:disabled{opacity:1}.header-date:disabled svg{display:none}
.attachment-button{width:36px;height:36px;display:grid;place-items:center;color:#8a8f96}.attachment-button svg{width:22px;height:22px}
.chat-list{display:flex;flex-direction:column;gap:12px}.chat-time-divider{text-align:center;color:#8a8f96;font-size:12px;line-height:18px;margin:12px 0 2px}.chat-item{display:flex;flex-direction:column;align-items:flex-end;max-width:100%}.chat-bubble{background:#fff;border-radius:24px 8px 24px 24px;padding:12px 16px;width:max-content;min-width:min(192px,100%);max-width:min(332px,100%)}.chat-text{font-size:16px;line-height:26px;letter-spacing:-.3125px;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;color:#23262a;min-width:0}.chat-footer{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid #ebe9e4;min-height:36px}.chat-category{padding:0;display:flex;align-items:center;gap:8px;min-width:0;flex:1;color:#88897d;font-size:13px;font-weight:600;line-height:19.5px;text-align:left;overflow-wrap:anywhere}.chat-category.work{color:#4881c6}.chat-category.learning{color:#81aa3c}.chat-category.life,.chat-category.knowledge{color:#8e66b6}.chat-category.sport{color:#36c8bb}.chat-category.food{color:#ca6b4b}.chat-category.todo{color:#88897d}.category-symbol{width:26px;height:26px;border-radius:9px;display:grid;place-items:center;background:color-mix(in srgb,currentColor 16%,white);flex-shrink:0}.category-symbol svg{width:18px;height:18px;stroke-width:1.8}.chat-actions{position:relative;flex-shrink:0;margin-left:auto}.chat-more{width:28px;height:28px;padding:0;display:grid;place-items:center;color:#8a8f96;border-radius:50%}.chat-more svg{width:17px;height:17px}.chat-more[aria-expanded="true"]{background:#f5f4f1}.chat-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:8;width:154px;display:grid;padding:5px;border:1px solid #ebe9e4;border-radius:12px;background:#fff;box-shadow:0 8px 24px #23262a24}.chat-menu.above{top:auto;bottom:calc(100% + 8px)}.chat-menu[hidden]{display:none}.chat-menu button{display:flex;align-items:center;gap:9px;min-height:40px;padding:7px 9px;border-radius:8px;text-align:left;white-space:nowrap;font-size:13px;color:#23262a}.chat-menu button:hover,.chat-menu button:focus-visible{background:#f5f4f1}.chat-menu svg{width:16px;height:16px}.chat-menu [data-trash]{color:#aa514c}.chat-link{display:flex;align-items:center;gap:6px;margin-top:6px;color:#8b5cf6;text-decoration:none;font-size:13px;line-height:19.5px;overflow-wrap:anywhere}.chat-link svg{width:14px;height:14px}.empty-history{text-align:center;color:#8a8f96;font-size:13px}
.menu-row{width:100%;display:flex;text-align:left;align-items:center;gap:12px;padding:16px 4px;border-bottom:1px solid #ebe9e4;font-size:14px}.calendar-heading{display:flex;align-items:center;justify-content:space-between;margin:16px 0}.calendar-heading button{width:40px;height:40px}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}.calendar-grid>span{font-size:12px;color:#8a8f96;min-height:24px}.calendar-grid button{height:40px;border-radius:10px;position:relative;font-size:13px}.calendar-grid button.selected{background:#23262a;color:white}.calendar-grid button i{position:absolute;bottom:3px;left:calc(50% - 2px);width:4px;height:4px;background:#8b5cf6;border-radius:50%}.calendar-today{margin-top:12px;width:100%}
.attachment-draft{display:flex;gap:8px;overflow-x:auto;padding:0 0 8px;max-width:100%}.attachment-chip{display:flex;align-items:center;gap:4px;background:white;border:1px solid #ebe9e4;border-radius:12px;padding:2px 4px 2px 10px;max-width:240px;flex-shrink:0;font-size:12px}.attachment-chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-chip button{width:36px;height:36px;padding:8px;flex-shrink:0}.attachment-chip svg{width:16px;height:16px}.record-attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;min-width:0}.record-attachments a{display:flex;flex-direction:column;gap:4px;max-width:100%;font-size:12px;color:#68626e;overflow-wrap:anywhere;text-decoration:none}.record-attachments img{width:160px;max-width:100%;max-height:180px;object-fit:cover;border-radius:12px}.search-field{display:flex;align-items:center;gap:4px}.search-field input{min-width:0;flex:1}.search-field button{width:44px;height:44px}.search-panel>label,.search-filters label{display:grid;gap:6px;color:#707780;font-size:12px}.search-filters{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.search-filters label:first-child{grid-column:1/-1}.search-filters input,.search-filters select{width:100%;min-width:0;height:42px;padding:0 10px;border:1px solid #e3e6e9;border-radius:12px;background:#fff}.search-empty{color:#8a8f96;font-size:14px;padding:24px 0}.search-result{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;border-bottom:1px solid #ebe9e4}.search-result>button:first-child{min-width:0;padding:14px 4px;text-align:left;display:grid;gap:4px}.search-result strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.search-result small{font-size:12px}.search-result span{display:flex;align-items:center;gap:2px;color:#387567;font-size:12px}.search-result span svg{width:14px;height:14px}.search-result>button:last-child{width:44px;height:44px;display:grid;place-items:center;color:#8a8f96}.menu-row small{display:block;margin-top:4px;font-size:12px}.calendar-handle:focus-visible{outline-offset:0}
.diary-nav-asset{display:none}
@media(min-width:761px){.quick-nav{display:none}.topbar{color:#23262a}}
@media(max-width:760px){
 body.keyboard-open .app{height:var(--visual-height);position:fixed;top:var(--visual-top);width:100%}body.keyboard-open .quick-nav{display:none}body.keyboard-open .preview-status{display:none}body.keyboard-open dialog{max-height:calc(var(--visual-height) - 12px)}
 :root{background:#f5f4f1;color:#23262a;--muted:#8a8f96;--line:#ebe9e4;--green:#23262a;font-family:"PingFang SC",-apple-system,BlinkMacSystemFont,sans-serif}
 .app{min-height:0}.sidebar{display:none}.workspace{overflow:hidden}.topbar{height:44px;min-height:44px;padding:0;border:0;background:#f5f4f1}.topbar .icon-button{width:44px;height:44px;background:transparent;color:#23262a}.topbar .icon-button svg{width:20px;height:20px}.header-date{padding:10px 0;line-height:24px}.header-date #mobile-title{font-size:17px;font-weight:600}.header-date:disabled{cursor:default}
 .design-preview .preview-status{display:block;height:62px;flex-shrink:0;overflow:hidden;background:#f5f4f1}.preview-status img{display:block;width:100%;height:62px;object-fit:contain}
 .scroll-area{scrollbar-gutter:auto;scrollbar-width:none;min-height:0}.content{padding:24px 16px 16px;max-width:none;margin:0}.day-divider{font-size:12px;line-height:18px;gap:12px;margin:0 0 12px;white-space:nowrap}.day-divider:before,.day-divider:after{background:#ebe9e4}.page-heading{margin:0 0 20px}.page-heading h1{display:none}.page-heading p{font-size:12px}.date-mark{background:#ebe9e4;color:#8a8f96;font-size:10px}
 .bottom-area{padding:8px 12px 12px;border-top:.585px solid #ebe9e4;background:#f5f4f1;flex-shrink:0}.bottom-inner{max-width:none}.type-nav{display:none}
 .composer{display:flex;align-items:center;gap:4px;border:0;box-shadow:0 0 0 1px #ebe9e4;border-radius:26px;padding:5px 6px 5px 16px;min-height:52px;height:auto;background:#fff}.composer textarea{flex:1;width:0;min-width:0;height:42px;min-height:42px;padding:8px 0;resize:none;font-size:16px;line-height:26px;letter-spacing:-.3125px;font-family:inherit}.composer textarea::placeholder{color:#8a8f96}.composer-bottom{margin:0;align-self:flex-end;gap:2px}.composer-bottom>span,.composer-caption{display:none}.send{height:36px;width:36px;background:#23262a}.attachment-button{padding:0}.composer:focus-within{box-shadow:0 0 0 1px #a2a3a5}
 .quick-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0;height:calc(65px + max(20px,env(safe-area-inset-bottom)));padding:1px 0 max(20px,env(safe-area-inset-bottom));border-top:1px solid #ebe9e4;background:#fff;flex-shrink:0;overflow:visible}.quick-nav .nav-button{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;padding:10px 0 0;min-height:0;height:64px;border:0;border-radius:0;background:none;font-size:11px;line-height:16.5px;font-weight:400;color:#8a8f96}.nav-icon{display:grid;place-items:center;width:26px;height:26px}.quick-nav .nav-button.active{background:none;color:#23262a;font-weight:500}.quick-nav .nav-button.active .nav-icon{background:#23262a;color:#fff;border-radius:8px}.quick-nav .nav-button svg{width:20px;height:20px;stroke-width:1.8}.quick-nav .nav-button.active svg{width:18px;height:18px}.diary-nav-asset{display:none}
 .record{padding:16px;border-radius:24px;margin-bottom:12px}.record-body{font-size:16px;line-height:26px}.record-foot{border-top:1px solid #ebe9e4;padding-top:8px}.classify{background:none;color:#23262a}.record-head,.record-actions .text-button{font-size:11px}.summary{margin-bottom:24px;padding:16px;background:#fff;border:0;border-radius:20px}.summary strong{font-size:25px}.summary>div+div{padding-left:10px}.summary p{font-size:10px}.section-heading h2{font-size:17px}.section-heading span{font-size:10px}.diary-row{grid-template-columns:42px 1fr;gap:23px}.diary-card{padding:18px;border-radius:24px}.diary-card h3{font-size:16px}.diary-card p{font-size:14px}.diary-card footer{font-size:10px}.back{margin:0 0 12px}.review{background:white;border-radius:24px}.review textarea{font-size:16px}
 dialog{margin:auto 0 0;width:100%;max-width:100%;border-radius:24px 24px 0 0;max-height:90dvh;padding:20px 20px max(24px,env(safe-area-inset-bottom));box-shadow:none}dialog::backdrop{background:#0006}.dialog-head h2{font-size:17px}.dialog-head .icon-button{width:36px;height:36px}.field-row{gap:12px}.dialog-actions{display:grid;grid-template-columns:1fr 2fr}.toast{top:56px;font-size:12px}.design-preview .toast{top:118px}.plan-reminder{margin:0 0 12px;background:#fff;border:1px solid #ebe9e4;color:#23262a;border-radius:16px}.plan-reminder>svg:first-child{color:#8a8f96}#editor[open]{height:min(92dvh,760px)}#editor form{height:100%;max-height:none}.dialog-scroll{padding-right:4px}.dialog-actions{padding-bottom:max(0px,env(safe-area-inset-bottom))}
 .chat-detection{font-size:11px;line-height:17px}.weekday-picker label{margin-right:7px}.detection-result{margin-top:10px}
 .calendar-dialog{margin:0;width:100%;border-radius:0 0 28px 28px;padding:0 20px 14px;max-height:90dvh;box-shadow:0 12px 30px #23262a29}.calendar-dialog::backdrop{background:rgba(0,0,0,.7)}.calendar-dialog>.dialog-head{display:none}.design-preview .calendar-dialog{padding-top:60px}.design-preview .calendar-dialog:before{content:"";position:absolute;top:0;left:0;width:100%;height:60px;background:#fff url('assets/preview-calendar-status.png') center top/402px 62px no-repeat}.calendar-dialog .calendar-heading{height:36px;margin:0 0 16px}.calendar-heading strong{font-size:17px;line-height:24px;font-weight:600;color:#23262a}.calendar-dialog .calendar-heading button{width:36px;height:36px;color:#8a8f96}.calendar-dialog .calendar-grid{gap:0;grid-template-columns:repeat(7,1fr);grid-template-rows:30px;grid-auto-rows:52px}.calendar-dialog .calendar-grid>span{height:26px;padding:4px 0;font-size:12px;line-height:18px}.calendar-dialog .calendar-grid button{height:52px;display:flex;align-items:flex-start;justify-content:center;padding:2px 0 10px;font-size:15px;line-height:40px;background:none;color:#23262a}.calendar-dialog .calendar-grid button>span{display:block;width:36px;height:28px;line-height:28px;margin-top:6px;border-radius:8px}.calendar-dialog .calendar-grid button.selected>span{background:#26292e;color:#fff;font-weight:600}.calendar-dialog .calendar-grid button i{bottom:2px;left:calc(50% - 3px);width:6px;height:6px}.calendar-handle{display:block;width:64px;height:24px;background:transparent;padding:0;margin:2px auto -6px;position:relative;touch-action:none}.calendar-handle:after{content:"";display:block;width:40px;height:4px;border-radius:4px;background:#ebe9e4;margin:auto}

}
/* P08, P09, P17 have their own measured page headers; P16 is a full-height drawer. */
@media(max-width:760px){
 body[data-page="diary"] .content,body[data-page="review"] .content,body[data-page="settings"] .content{padding:0;margin:0;max-width:none}
 body[data-page="review"] .preview-status,body[data-page="settings"] .preview-status{background:#fff}
 body[data-page="diary"] .quick-nav .nav-icon>svg{display:none}
 body[data-page="diary"] .quick-nav .diary-nav-asset{display:block;object-fit:contain}
 body[data-page="diary"] .quick-nav [data-page="home"] .diary-nav-asset{width:24px;height:24px}
 body[data-page="diary"] .quick-nav [data-page="diary"] .diary-nav-asset{width:16px;height:16px}
 body[data-page="diary"] .quick-nav [data-page="memo"] .diary-nav-asset{width:20px;height:20px}
 body[data-page="diary"] .quick-nav [data-page="knowledge"] .diary-nav-asset{width:24px;height:25px}
 body[data-page="settings"] .settings-content{min-height:calc(100dvh - 44px);width:400px;max-width:100%}
 body.design-preview[data-page="settings"] .settings-content{min-height:calc(100dvh - 106px)}
 .screen-header{position:sticky;top:0;z-index:2}.screen-header h1{font-size:17px;letter-spacing:0;line-height:24px}.screen-header .icon-button{height:44px;width:44px}
 .week-calendar{position:sticky;top:0;z-index:2}.diary-screen{background:#fff}.time-card,.health-card{scroll-snap-align:start}.overview-scroller{scroll-snap-type:x proximity}.review-form{padding-top:16px}
}
@media(min-width:761px){body[data-page="diary"] .content{padding:24px 32px}.screen-header{border-bottom:1px solid #ebe9e4}.review-form,.settings-content{max-width:620px;margin:auto}.settings-content{min-height:600px}.week-calendar{border-radius:16px;height:76px}.time-card,.health-card{flex:1;min-width:210px}.diary-schedule{padding-top:16px}}

@media(max-width:760px){
 body[data-page="memo"] .content,body[data-page="memo-edit"] .content{padding:0;margin:0;max-width:none}
 .memo-edit-screen{min-height:calc(100dvh - 62px)}
 .memo-header,.memo-list{width:100%}
 .memo-filters{width:100%;max-width:none;padding-right:16px}
 #batch3-sheet{margin:auto 0 0;width:100%;max-width:100%;border-radius:28px 28px 0 0}
 #batch3-sheet.memo{height:min(338px,90dvh)}
 #batch3-sheet.food{height:min(682px,90dvh)}
 #batch3-sheet.sport{height:min(652px,90dvh)}
}
@media(min-width:761px){
 body[data-page="memo"] .content{padding-top:20px}
}
.batch-plan-row{display:grid;grid-template-columns:112px minmax(0,1fr);gap:8px;align-items:end;margin:8px 0}.batch-plan-row label{min-width:0;margin:0;color:#707780;font-size:12px}.batch-plan-row input{margin-top:5px;width:100%;min-width:0;padding:8px;height:40px}.batch-plan-row input[type="date"]{font-size:12px}.batch-plan-row input:not([type="date"]){font-size:13px}#batch-plan-error{min-height:18px;color:#a03f32;font-size:12px}#batch-plan-form .dialog-actions button{white-space:nowrap}#batch-plan-form .dialog-actions .primary{flex:1}
