/* Second edition: quieter tools, more useful reading, and larger touch targets. */
:root{--muted:#6e7b6e}
[hidden]{display:none!important}
.reading-progress{position:absolute;bottom:-1px;left:0;width:100%;height:2px;overflow:hidden;pointer-events:none}
.reading-progress span{display:block;height:100%;background:var(--accent);transform:scaleX(0);transform-origin:left;opacity:.7}
.day-note{max-width:1132px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:26px;padding:28px 0;border-bottom:1px solid var(--line)}
.day-date{display:flex;align-items:center;gap:22px;flex-shrink:0}
.day-date>span:first-child{font-family:var(--serif);font-size:17px;letter-spacing:2px;color:#65745f}
.day-date>span:last-child{font-size:10px;letter-spacing:1px;color:#87917e;border-left:1px solid #cfd5c4;padding-left:22px}
.day-note>p{font-family:var(--serif);font-size:12px;color:#8c9385;letter-spacing:1px}
.day-note>.text-button{font-size:11px;letter-spacing:.5px}
.story{padding-top:76px}
.chapter-copy{min-width:0}
.chapter-copy h3,.chapter-copy>p,.journal-entry h3,.event-row h3,.event-row p,.photo-item h3{overflow-wrap:anywhere}
.chapter-navigation{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:24px;padding-top:16px;border-top:1px solid #dbe0d1}
.chapter-navigation>div{display:flex;align-items:center;gap:9px}
.chapter-navigation>div>span{font-family:Georgia,serif;font-size:12px;letter-spacing:1px;white-space:nowrap}
.chapter-navigation i{color:#8b9780;font-style:normal;font-size:10px}
.chapter-navigation .icon-button{width:31px;height:31px;border:1px solid #cbd2c1;border-radius:0}
.chapter-navigation .icon-button:disabled{cursor:default;opacity:.3}
.chapter-navigation .icon-button .icon{width:13px;height:13px}
.chapter-navigation .text-button{font-size:10px;letter-spacing:0;gap:6px}
.chapter-navigation .text-button .icon{width:13px;height:13px}
.collection-tools{display:flex;align-items:center;justify-content:space-between;gap:25px;margin:0 0 28px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.inline-search{display:flex;gap:10px;align-items:center;max-width:420px;flex:1;min-width:0;color:#89917f}
.inline-search>.icon,.inline-search>span>.icon{width:16px;height:16px;flex-shrink:0}
.inline-search input{border:0;background:transparent;font-size:12px;color:var(--ink);width:100%;padding:8px 0;min-width:0}
.inline-search input::placeholder{color:#8a9480;letter-spacing:.5px}
.sort-control select,.timeline-controls select{border:0;background:transparent;color:#6f7e64;padding:8px 18px 8px 3px;font-size:11px;cursor:pointer;max-width:100%}
.photo-item h3{gap:10px}.photo-item h3 .icon{flex-shrink:0}
.load-more{display:flex;margin:35px auto 0;padding:10px 28px;border:1px solid #cbd3c0;font-family:var(--serif)}
.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:17px;min-height:195px;width:100%;border-top:1px solid #dce0d4;border-bottom:1px solid #dce0d4;background:linear-gradient(90deg,transparent,#e8eddf55,transparent)}
.empty-state>.text-button{font-family:var(--sans);font-size:11px;color:var(--ink)}
.journal .collection-tools{border-color:#d4ddcb;margin-bottom:34px}
.journal-entry{min-width:0}
.journal-entry-bottom{gap:8px;flex-wrap:wrap}
.journal-actions{gap:8px}.journal-actions .delete-entry{font-size:10px;padding:8px 1px;color:#71816a}
.journal-entry>p{color:#687b63}.journal-top{color:#6f8166}
.timeline-controls{display:flex;align-items:center;justify-content:space-between;margin:-7px 0 25px}
.event-actions{display:flex;gap:20px;margin-top:7px}
.event-actions .text-button{font-size:11px}.event-actions .icon{width:13px;height:13px}
.editor-dialog{width:570px}
.field>span{display:flex;align-items:center;justify-content:space-between}
.field>span>small{font-size:10px;color:#8b987e;font-weight:400}
.field input:focus,.field textarea:focus,.field select:focus{border-color:#849575;background:#fffef9}
.spaced-row{margin-top:18px}
.photo-drop{border:1px dashed #a7b39a;background:#ebeee450;padding:20px;text-align:center;position:relative;cursor:pointer}
.photo-drop>span{display:flex;justify-content:center;gap:12px;font-size:14px;margin-bottom:7px}
.photo-drop>input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%;padding:0}
.photo-drop:focus-within{outline:2px solid var(--accent);outline-offset:3px}
.photo-drop>small{font-size:10px;color:#8c9982;letter-spacing:.5px}
.upload-preview{display:flex;gap:15px;align-items:center;padding:10px 0;margin:-6px 0 14px}
.upload-preview img{width:78px;height:60px;object-fit:cover;flex-shrink:0}
.upload-preview span{font-size:11px;color:#77866d;overflow-wrap:anywhere;min-width:0}
#draftStatus{max-width:190px;line-height:1.7;color:#7e906e}
.save-failed{color:var(--accent)}
.lightbox{background:#1d2e25f5}
.lightbox-counter{position:absolute;top:31px;left:50%;transform:translateX(-50%);font-family:Georgia,serif;letter-spacing:4px;font-size:12px;color:#a9b9a0}
.lightbox figure{max-width:1080px}.lightbox img{touch-action:pan-y pinch-zoom}
.lightbox-actions{gap:22px;flex-shrink:0}
.lightbox-actions #photoEdit,.lightbox-actions #photoDelete{font-size:11px;color:#b5c4ac}
.lightbox-actions #photoDownload{color:#b5c4ac}
.lightbox figcaption h3{overflow-wrap:anywhere}
.lightbox figcaption p{overflow-wrap:anywhere;max-width:650px}
.lightbox-prev,.lightbox-next{border:1px solid #c6d6ba44}
.lightbox .icon-button:hover{background:#b3cda31c}
.toast{display:flex;align-items:center;gap:20px;pointer-events:none}
.toast.visible{pointer-events:auto}
#undoButton{font-size:12px;white-space:nowrap;color:#f3d0a3;border-bottom:1px solid #b9966a;padding:2px 0;letter-spacing:1px}
.back-to-top{position:fixed;right:25px;bottom:25px;width:48px;height:66px;z-index:19;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:1px solid #c6cdbb;background:#f7f5efee;backdrop-filter:blur(8px);color:#7b8a6f;box-shadow:0 4px 18px #2b4b2c08;transition:color .2s,transform .2s}
.back-to-top:hover{color:var(--accent);transform:translateY(-3px)}
.back-to-top>span:last-child{font-size:10px;letter-spacing:2px}
.back-to-top .icon{transform:rotate(90deg);width:14px;height:14px}
.petals.paused .petal,.page-hidden .petal{animation-play-state:paused}
.reveal{opacity:1;transform:none}
.motion-ready .reveal:not(.visible){opacity:0;transform:translateY(18px)}
@media(max-width:1250px){.day-note{margin:0 5.5%;gap:20px}.day-note>p{display:none}.day-date{gap:18px}}
@media(max-width:800px){.day-note{padding:22px 0;margin:0 30px}.day-date{display:block}.day-date>span:first-child{display:block;font-size:16px}.day-date>span:last-child{display:block;padding:0;border:0;margin-top:3px;font-size:9px}.chapter-navigation{margin-top:17px;gap:6px}.chapter-navigation .text-button{font-size:9px}.chapter-navigation>div{gap:5px}.chapter-navigation .icon-button{width:28px;height:28px}.chapter-navigation .text-button .icon{display:none}.back-to-top{right:15px;bottom:15px;width:40px;height:58px}.lightbox-actions{gap:17px}}
@media(max-width:540px){
  .day-note{margin:0 24px;padding:21px 0;gap:16px}.day-note>.text-button{font-size:10px;gap:8px;letter-spacing:0}
  .day-date>span:first-child{font-size:14px;letter-spacing:1px}.day-date>span:last-child{font-size:9px}
  .story{padding-top:48px}.chapter-navigation .text-button{font-size:11px}.chapter-navigation .text-button .icon{display:block}
  .chapter-navigation .icon-button{width:36px;height:36px}.chapter-navigation>div{gap:10px}
  .album-toolbar{position:relative;align-items:center;gap:12px;margin-bottom:18px}
  .filter-tabs{gap:23px;overflow:auto;white-space:nowrap;scrollbar-width:none;flex:1;min-width:0;padding:4px 2px}
  .filter-tabs::-webkit-scrollbar{display:none}.filter-tabs button{font-size:11px;flex-shrink:0;min-height:37px}
  .album-toolbar>.quiet{display:none}
  .collection-tools{gap:12px;margin-bottom:24px;padding-bottom:8px}
  .inline-search{gap:8px}.inline-search input{font-size:11px;padding:10px 0}.inline-search input::placeholder{letter-spacing:0}
  .sort-control{max-width:135px;flex-shrink:0}.sort-control select{font-size:10px;padding-right:2px}
  .photo-item h3{font-size:13px}.photo-item p{color:#7d8974}
  .journal .collection-tools{margin-bottom:29px}.journal-actions .delete-entry{font-size:11px;min-height:35px;padding:6px 8px}
  .journal-entry-bottom{gap:15px}.journal-actions{gap:5px}.journal-like{min-width:35px;min-height:35px}
  .editor-dialog{padding:25px 21px}.form-footer{gap:10px}.form-footer>.quiet{font-size:9px;max-width:130px}
  .field input,.field select,.field textarea,.form-row input{font-size:16px}.field input[type=date]{min-width:0;padding:11px 7px;font-size:14px;min-height:45px}
  .photo-drop{padding:23px 10px}.photo-drop>span{font-size:13px}.photo-drop>small{font-size:9px}
  .lightbox{padding:70px 18px 82px}.lightbox figure{justify-content:center}.lightbox figcaption{display:block;padding-top:17px}
  .lightbox figcaption h3{font-size:20px}.lightbox figcaption p{font-size:11px;line-height:1.8}
  .lightbox-actions{flex-direction:row;align-items:center;justify-content:flex-end;gap:22px;margin-top:13px}
  .lightbox-actions #photoEdit,.lightbox-actions #photoDelete,.lightbox-actions #photoFavorite{min-height:36px;font-size:11px}
  .lightbox-counter{font-size:11px;top:32px}.lightbox img{max-height:calc(100svh - 300px)}
  .toast{bottom:19px;max-width:calc(100% - 38px);padding:12px 17px;gap:16px;font-size:11px}.toast>span{overflow-wrap:anywhere}
  .back-to-top{right:12px;bottom:14px;width:36px;height:51px;background:#f7f5eff5}.back-to-top>span:last-child{font-size:9px}
  footer{padding-bottom:31px}footer>div{flex-wrap:wrap;gap:7px}footer button{margin-left:5px}
}
@media(max-width:540px) and (max-height:720px){.hero{min-height:570px}.hero-content{top:8%}.hero h1{margin-top:17px;margin-bottom:16px}.hero .primary-button{margin-top:20px}.hero-signature{margin-top:19px}}
@media(prefers-reduced-motion:reduce){.motion-ready .reveal:not(.visible){opacity:1;transform:none}}
