html,body{min-height:100%;background:var(--paper)}
.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}
.entry-text{font-size:16px;line-height:1.5;font-weight:450;overflow-wrap:anywhere;white-space:pre-wrap;max-width:100%;text-align:center}
.entry{padding:15px 12px}.entry-body{width:100%;gap:5px}
#empty{flex-direction:column;gap:14px;text-align:center;color:var(--muted)}#empty-message{font-size:15px;margin:0;line-height:1.5}
.calendar-view #empty{display:flex;min-height:120px}.app.empty:not(.calendar-view) footer #add{visibility:visible}
#empty-action{display:none}
#search-bar{flex-shrink:0;display:flex;align-items:center;gap:4px;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--paper)}
.search-field{display:flex;align-items:center;gap:10px;min-width:0;flex:1;height:44px;padding:0 12px;border-radius:12px;background:var(--secondary)}
.search-field svg{width:18px;height:18px;color:var(--muted)}.search-field span{display:flex;flex:none}
.search-field input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--ink);font:16px system-ui;height:100%}
.search-field:focus-within{outline:2px solid var(--accent);outline-offset:-1px}#close-search{flex:none;width:44px;height:44px;color:var(--muted)}
#sheet{top:auto;height:auto;max-height:min(350px,calc(var(--visual-height,100dvh) - 12px - env(safe-area-inset-top)));bottom:var(--keyboard-gap,0px);margin-bottom:0}
#sheet .sheet-head{grid-template-columns:44px minmax(0,1fr) 58px;min-height:54px;border:0}
#sheet-title{margin:0;text-align:center;font-size:15px;font-weight:600;line-height:1.4}
#sheet #save{width:58px;height:44px;min-height:44px;border-radius:22px;font-size:14px;font-weight:600}
#composer{display:flex;flex-direction:column;min-height:0;padding:4px 0 calc(16px + env(safe-area-inset-bottom))}
#entry-text{flex-shrink:0;resize:none;width:100%;min-height:64px;max-height:100px;border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:var(--secondary);color:var(--ink);font:16px/1.5 system-ui,-apple-system,sans-serif;outline:none}
#entry-text:focus{border-color:var(--accent)}#entry-text::placeholder,.search-field input::placeholder{color:var(--muted);opacity:1}
.composer-meta{display:flex;justify-content:space-between;gap:8px;flex-shrink:0;min-height:22px;padding:4px 2px 8px;font-size:12px;line-height:1.4;color:var(--muted);font-variant-numeric:tabular-nums}
#reuse{display:flex;flex-direction:column;min-height:0;border-top:1px solid var(--line);padding-top:12px}
#reuse-title{flex-shrink:0;margin:0 0 6px;font-size:12px;font-weight:500;color:var(--muted)}
#recent-texts{overflow-y:auto;overscroll-behavior:contain;min-height:0;max-height:132px;scrollbar-width:thin;scrollbar-color:var(--scroll) transparent}
.reuse-empty{color:var(--muted);font-size:13px;line-height:1.5;margin:12px 0}
.reuse-entry{display:flex;width:100%;min-height:44px;gap:12px;align-items:center;justify-content:space-between;padding:10px 2px;border-radius:0;text-align:start;border-bottom:1px solid var(--line);font-size:14px;line-height:1.45;content-visibility:auto;contain-intrinsic-size:auto 44px}
.reuse-entry span{min-width:0;overflow-wrap:anywhere}.reuse-entry svg{width:17px;height:17px;flex:none;color:var(--muted)}.reuse-entry:last-child{border:0}.reuse-entry:hover{background:var(--secondary)}
#sheet.compact .sheet-head{grid-template-columns:44px minmax(0,1fr) 44px}#sheet.compact .sheet-head:after{content:''}
#toast span{gap:8px;font-size:13px;line-height:1.4}#toast:not(.undo-only){max-width:calc(100% - 32px);width:max-content;padding:12px 16px}
#celebration{position:fixed;inset:0;z-index:20;pointer-events:none;overflow:hidden;isolation:isolate}
.celebration-message{position:absolute;bottom:calc(88px + env(safe-area-inset-bottom));left:50%;translate:-50% 0;width:max-content;max-width:calc(100% - 40px);border-radius:22px;padding:10px 16px;background:var(--toast);color:var(--on-toast);font-size:14px;line-height:1.4;font-weight:600;text-align:center;box-shadow:0 3px 18px #0002;z-index:1}
#celebration i{position:absolute;bottom:calc(62px + env(safe-area-inset-bottom));left:50%;width:8px;height:12px;border-radius:2px;opacity:0}
@media(max-height:550px){#recent-texts{max-height:130px}#composer{padding-bottom:10px}#entry-text{min-height:64px}.composer-meta{padding-bottom:8px}#sheet .sheet-head{min-height:52px}}
@media(min-width:650px){html,body{background:var(--outer)}#sheet{margin:auto;top:0;bottom:0}}
