@font-face{font-family:Archive;src:local('Segoe UI')}*{box-sizing:border-box}html{font-size:16px;scroll-behavior:smooth}body{margin:0;color:#202a29;background:#f8f9fa;font-family:Archive,'Helvetica Neue',Arial,'Yu Gothic',sans-serif;line-height:1.55}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #448477;outline-offset:4px}button{color:inherit}a{color:#245e50;text-underline-offset:4px}svg{width:24px;height:24px;flex-shrink:0}h1,h2,h3,p{margin:0}h1{font-size:clamp(2rem,3.8vw,3.2rem);font-weight:560;letter-spacing:-.045em;line-height:1.18}h2{font-weight:550;letter-spacing:-.02em}img{display:block;max-width:100%;background:#e8ecea}button{border:0}input,select{min-height:46px;background:#fff;border:1px solid #d9dfdd;border-radius:12px;padding:10px 14px;max-width:100%;color:#263d36}input[type=checkbox]{min-height:20px;width:20px;accent-color:#245e50}select{cursor:pointer}label{font-size:.9rem}.sidebar{position:fixed;inset:0 auto 0 0;width:240px;background:#fff;border-right:1px solid #e6eae7;padding:38px 22px;display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:12px;font-size:1.3rem;font-weight:600;background:none;text-align:left;white-space:nowrap;padding:0}.brand-mark{display:grid;place-items:center;background:#215b4f;color:#fff;width:40px;height:40px;border-radius:12px;font-family:Georgia,serif;font-size:28px}.nav-caption{font-size:.75rem;color:#78837f;letter-spacing:.12em;text-transform:uppercase;margin:53px 16px 16px}.navigation{display:flex;flex-direction:column;gap:8px}.nav-item{display:flex;align-items:center;gap:14px;min-height:50px;text-align:left;background:none;padding:12px 16px;border-radius:12px;color:#69736f;font-size:.94rem}.nav-item:hover{background:#f4f6f4}.nav-item.active{color:#215b4f;background:#edf3ef;font-weight:600}.sidebar-foot{margin-top:auto;padding:20px 12px 0}.sidebar-foot p{font-size:.8rem;color:#929995;margin-top:12px}.sync-badge{display:inline-flex;gap:7px;align-items:center;font-size:.8rem;color:#6b7971;white-space:nowrap}.sync-badge svg{width:18px;height:18px}.main{margin-left:240px;max-width:1900px;padding:0 48px 70px}.topbar{height:84px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e2e7e4;color:#87928d;font-size:.84rem}.mobile-brand{display:none}.heading{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:40px 0 30px}.eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:.75rem;color:#788b81;margin-bottom:12px}.heading select{font-size:.88rem;max-width:260px;background:transparent}.result-count{font-size:.83rem;color:#748379;margin-bottom:20px}.entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px 28px}.entry-card{padding:0;background:#fff;border-radius:18px;overflow:hidden;text-align:left;box-shadow:0 3px 18px #243e3105;transition:box-shadow .2s;min-width:0}.entry-card:hover{box-shadow:0 8px 25px #243e3112}.card-visual{position:relative;aspect-ratio:4/3;background:#e5ece8;overflow:hidden}.card-visual>img{width:100%;height:100%;object-fit:cover}.image-badge{position:absolute;bottom:16px;right:16px;background:#111b1b7d;backdrop-filter:blur(12px);color:#fff;font-size:.75rem;border-radius:8px;padding:4px 10px}.no-photo{display:flex;flex-direction:column;justify-content:center;padding:32px;color:#425d52;background:linear-gradient(135deg,#e0ece5,#edf1ed)}.no-photo svg{margin-bottom:18px}.no-photo p{font-family:Georgia,serif;font-size:1.5rem;overflow:hidden;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical}.card-body{padding:23px 24px 19px}.card-meta{display:flex;justify-content:space-between;flex-wrap:wrap;gap:6px;font-size:.76rem;color:#728377;margin-bottom:12px}.journal-dot{color:#386653}.card-body h2{font-size:1.24rem;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.excerpt{font-size:.92rem;color:#77807b;margin-top:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.byline{display:flex;align-items:center;gap:8px;font-size:.8rem;color:#64766b;margin-top:22px}.avatar{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#eef2ec;font-size:.72rem}.byline svg{margin-left:auto;width:18px}.pager{display:flex;align-items:center;justify-content:center;gap:20px;margin:36px 0 12px;font-size:.85rem}.button{background:#fff;border:1px solid #d9dfda;padding:10px 18px;min-height:44px;border-radius:12px;font-size:.88rem}.button:hover{background:#eef3ef}.primary{background:#215b4f;color:#fff;border-color:#215b4f}.toolbar{display:flex;gap:16px;align-items:end;margin-bottom:26px}.field{display:flex;flex-direction:column;gap:6px;color:#64766b}.field span{font-size:.8rem}.search-panel{border:1px solid #e0e6e1;background:white;border-radius:18px;padding:24px;margin-bottom:26px}.search-input{width:100%;font-size:1.1rem;background:#f7f9f7;border:0;padding:16px 20px}.search-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0}.check{display:inline-flex;align-items:center;gap:10px;margin-right:24px}.chips{display:flex;gap:10px;overflow:auto;padding-bottom:10px;margin-bottom:16px}.chip{flex-shrink:0;border-radius:24px;padding:10px 18px;background:#edf0ed;font-size:.9rem}.chip.selected{background:#215b4f;color:white}.media-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.media-tile{position:relative;background:#dce5df;padding:0;aspect-ratio:1;overflow:hidden;border-radius:8px}.media-tile img{width:100%;height:100%;object-fit:cover}.media-tile>svg{position:absolute;inset:40%;width:20%;height:20%;color:white;filter:drop-shadow(0 2px 5px #000)}.tile-date,.media-type{position:absolute;bottom:8px;left:10px;font-size:.75rem;color:white;text-shadow:0 1px 5px #000;background:#0005;border-radius:4px;padding:2px 5px}.media-type{top:10px;bottom:auto}.month-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}.month-card{padding:0;background:transparent;text-align:left}.mosaic{aspect-ratio:1.2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:3px;overflow:hidden;border-radius:14px;background:#e6ede8}.mosaic img{width:100%;height:100%;object-fit:cover}.mosaic img:only-child{grid-column:1/3;grid-row:1/3}.month-card h2{font-size:1.12rem;margin-top:14px}.month-card p{font-size:.82rem;color:#7a897e;margin-top:4px}.journal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.journal-card{position:relative;aspect-ratio:1.4;padding:0;overflow:hidden;border-radius:18px;background:#215b4f;color:#fff;text-align:left}.journal-card>img{width:100%;height:100%;object-fit:cover}.journal-card>div{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:end;padding:28px;background:linear-gradient(transparent,#0e211cbf)}.all-journals{padding:32px;display:flex;flex-direction:column;justify-content:end}.all-journals svg{width:48px;height:48px;margin-bottom:auto}.journal-card h2{font-size:1.7rem}.journal-card p{font-size:.88rem;margin-top:8px}.settings{max-width:760px;display:grid;gap:20px}.setting-section{border-radius:18px;padding:30px;background:white;border:1px solid #e1e6e2}.setting-section h2{font-size:1.2rem;margin-bottom:18px}.setting-section p{font-size:.94rem;color:#6b7971;margin:14px 0}.setting-section .subtle{font-size:.83rem}.progress-row{display:flex;justify-content:space-between;gap:15px;margin:20px 0 7px;font-size:.88rem}progress{width:100%;height:5px;accent-color:#3e7964;border:0;display:block}progress::-webkit-progress-bar{background:#e7eee8;border-radius:8px}progress::-webkit-progress-value{background:#3e7964;border-radius:8px}.empty{padding:70px 20px;text-align:center;color:#7b8980}.empty svg{width:45px;height:45px;margin-bottom:20px}.empty h2{color:#3d5348;font-size:1.5rem}.empty p{margin:14px auto 24px}.loading{padding:40px;color:#75847b}.initial{padding:10vh;text-align:center;font-family:Georgia,serif;font-size:3rem}dialog{border:0;padding:0;max-width:920px;width:calc(100% - 70px);max-height:94dvh;border-radius:20px;background:#fff;color:#24392e;overscroll-behavior:contain}dialog::backdrop{background:#10251de0;backdrop-filter:blur(8px)}.detail-bar{position:sticky;top:0;background:#ffffffeb;backdrop-filter:blur(12px);display:flex;align-items:center;justify-content:space-between;padding:14px 26px;z-index:2;border-bottom:1px solid #e8ede9;font-size:.86rem}.story-header{padding:40px 50px 22px}.story-header h1{font-family:Georgia,'Yu Mincho',serif;font-size:clamp(1.8rem,3.5vw,2.8rem);font-weight:400;letter-spacing:-.025em;overflow-wrap:anywhere;line-height:1.3}.story-byline{margin-top:16px;color:#7a877e;font-size:.88rem}.story-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:20px 50px;font-size:1.07rem;line-height:1.95;color:#394d42}.story h2.story-text{font-size:1.55rem;font-weight:550}.story-media{margin:28px 0}.photo-button{display:block;width:100%;padding:0;background:#edf0ed}.photo-button img{width:100%;max-height:1000px;object-fit:contain}.story-media video{display:block;width:100%;max-height:75dvh;background:#152019}.story-media audio{display:block;width:calc(100% - 80px);margin:20px 40px}.attachment-link{display:block;margin:10px 40px;font-size:.8rem;color:#7c8c81;overflow-wrap:anywhere}.metadata{border-top:1px solid #e6ece7;margin:35px 40px;padding:24px 0;font-size:.9rem}.metadata summary{cursor:pointer}.metadata p,.metadata h3{margin:16px 0}.metadata pre{max-height:240px;overflow:auto;background:#f4f7f4;padding:16px;font-size:.8rem;white-space:pre-wrap;word-break:break-word}.lightbox{background:#101b17;width:100vw;max-width:none;height:100dvh;max-height:none;border-radius:0;color:white}.lightbox img{width:100%;height:100%;object-fit:contain;background:transparent}.lightbox-close{position:absolute;top:calc(16px + env(safe-area-inset-top));right:20px;padding:14px;background:#0008;border-radius:12px;color:white;z-index:2}.lightbox-original{position:absolute;bottom:calc(20px + env(safe-area-inset-bottom));left:20px;color:white;background:#0008;padding:10px 16px;border-radius:12px}.youtube-card,.link-card{display:block;margin:24px 40px;padding:30px;background:#edf2ef;border-radius:14px;text-align:left}.youtube-player{display:block;width:100%;aspect-ratio:16/9;border:0}.bold{font-weight:bold}.italic{font-style:italic}.error-page{padding:40px}.image-error{object-fit:contain!important;font-size:.8rem}
@media(min-width:1600px){.entry-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.main{padding-left:60px;padding-right:60px}.media-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.month-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){.sidebar{width:88px;padding:28px 15px}.brand>span:last-child,.nav-caption,.nav-item span,.sidebar-foot{display:none}.brand{justify-content:center}.navigation{margin-top:46px}.nav-item{justify-content:center;padding:14px}.main{margin-left:88px;padding:0 28px 50px}.entry-grid{gap:24px 18px}.card-body{padding:18px}.card-meta{flex-direction:column}.search-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.sidebar{top:auto;bottom:0;width:100%;height:auto;border:0;border-top:1px solid #e4eae5;padding:4px max(8px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));background:#ffffffed;backdrop-filter:blur(18px)}.brand{display:none}.navigation{margin:0;flex-direction:row;justify-content:space-around;gap:0}.nav-item{flex-direction:column;gap:3px;padding:8px 5px;min-width:40px;border-radius:8px;min-height:50px;flex:1}.nav-item span{display:block;font-size:.75rem;line-height:1.15}.nav-item svg{width:21px;height:21px}.nav-item:nth-child(5){display:none}.nav-item:nth-child(3) span{font-size:.7rem}.main{margin:0;padding:0 max(18px,env(safe-area-inset-right)) calc(110px + env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}.topbar{height:calc(62px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);border:0}.desktop-breadcrumb{display:none}.mobile-brand{display:block;font-size:1.12rem;font-weight:600;letter-spacing:-.03em;color:#294e3e}.topbar .sync-badge{font-size:.75rem}.heading{padding:20px 0 26px;gap:15px;align-items:end}.heading h1{font-size:2rem}.eyebrow{font-size:.75rem;letter-spacing:.1em;margin-bottom:8px}.heading select{max-width:43%;font-size:.8rem;min-height:40px;padding:8px}.entry-grid{grid-template-columns:1fr;gap:26px;margin:0 -18px}.entry-card{border-radius:0;box-shadow:none}.card-visual{aspect-ratio:1.1}.card-body{padding:20px 22px}.card-meta{flex-direction:row}.card-body h2{font-size:1.3rem}.byline{margin-top:18px}.result-count{margin-bottom:15px}.media-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;margin:0 -16px}.media-tile{border-radius:0}.tile-date{font-size:.75rem;bottom:5px;left:3px}.month-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px}.month-card h2{font-size:1rem}.journal-grid{grid-template-columns:1fr}.journal-card{aspect-ratio:1.4}.search-panel{padding:16px}.search-fields{gap:12px}.search-fields select,.search-fields input{min-width:0;width:100%;font-size:.85rem;padding:8px}.check{margin-bottom:20px}.setting-section{padding:22px}.toolbar{gap:12px}.pager{gap:12px}.pager .button{padding:9px 13px}dialog{width:100%;max-width:none;max-height:100dvh;height:100dvh;border-radius:0;margin:0}.detail-bar{padding:calc(10px + env(safe-area-inset-top)) 18px 10px}.story{padding-bottom:calc(30px + env(safe-area-inset-bottom))}.story-header{padding:30px 24px 12px}.story-text{margin:20px 24px;font-size:1rem}.story-media{margin:24px 0}.attachment-link{margin:10px 24px}.metadata{margin:30px 24px}.youtube-card,.link-card{margin:24px}.memory-grid .card-visual{aspect-ratio:.95}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

body:has(dialog[open]){overflow:hidden}.photo-button img{height:auto}.setting-section select+.button{margin-left:12px}

.heading{flex-wrap:wrap}.write-actions{display:flex;gap:10px;order:3;width:100%}.heading>select{margin-left:auto}.new-entry{margin-bottom:10px}.calendar-trigger{margin-bottom:20px}.onboarding{max-width:720px;padding:48px;background:#fff;border-radius:22px;border:1px solid #e1e8e3}.onboarding h2{font-family:Georgia,serif;font-size:2rem}.onboarding p{margin:20px 0;color:#67796d}.onboarding button{margin:6px}.notice{padding:14px 18px;background:#edf3ef;border-radius:12px;margin:15px 0;font-size:.9rem;overflow-wrap:anywhere}.notice.error{background:#f9eae8;color:#943d32}.import-actions{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}.import-progress{margin-top:20px}.import-progress progress{margin:15px 0}.import-copies{margin-top:24px}.import-copies summary,.sharing-options summary{cursor:pointer;padding:12px 0}.import-copies label{margin:20px 0}.setting-section input:not([type=checkbox]){width:100%}.setting-section button{margin:6px 8px 6px 0}.setting-section .field{margin-top:18px}.draft-item{display:block;text-align:left;width:100%;background:#eef4ee;padding:16px;border-radius:10px}.editor-body{padding:30px 36px}.editor-fields{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}.editor-fields>*{min-width:0}.editor-text{display:block;border:0;border-bottom:1px solid #dfe8e1;background:#fff;color:#2a4032;resize:vertical;min-height:320px;width:100%;margin:26px 0;padding:16px 0;font:inherit;font-size:1.1rem;line-height:1.9}.editor-body form>.field{margin:20px 0}.editor-body input:not([type=checkbox]){max-width:100%}.draft-status{font-size:.85rem;color:#738478;margin:20px 0}.attachment-list{font-size:.85rem;color:#657d6e;overflow-wrap:anywhere}.calendar-body{padding:30px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin-top:25px}.weekday{text-align:center;font-size:.8rem;color:#829087;padding:10px 0}.calendar-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;background:#f0f4f0;min-height:75px;border-radius:12px}.calendar-day:hover{background:#dce9dd}.calendar-day.today{background:#245b4a;color:white}.calendar-day small{font-size:.75rem}.media-error{margin:18px 24px;padding:15px;background:#f8efe8;font-size:.9rem}.setup-guide{max-width:900px;margin:40px auto;padding:20px}.setup-guide h1{margin:30px 0}.setup-guide .setting-section{margin:24px 0}.setup-guide li{margin:14px 0}.setup-guide code{overflow-wrap:anywhere}.sync-live{font-size:.87rem;overflow-wrap:anywhere}
@media(max-width:1100px){.sidebar>.new-entry,.sidebar>.calendar-trigger{display:none}}
@media(max-width:700px){.heading{gap:18px}.heading>div:first-child{max-width:55%}.write-actions{gap:8px}.write-actions .button{padding:9px 14px;font-size:.86rem}.navigation{gap:0}.nav-item{padding:7px 2px;min-width:0}.nav-item span{font-size:.7rem}.nav-item:nth-child(5){display:none}.editor-body{padding:22px}.editor-fields{grid-template-columns:1fr 1fr}.editor-fields>:first-child{grid-column:1/3}.editor-text{min-height:36dvh}.calendar-body{padding:18px}.calendar-grid{gap:4px}.calendar-day{min-height:58px;border-radius:8px}.calendar-day small{font-size:.75rem}.onboarding{padding:28px}.onboarding h2{font-size:1.8rem}.import-actions>*{width:100%}.setup-guide{margin:15px auto;padding:16px}.setup-guide h1{font-size:2rem}}.story .media-error{color:#914633}
:root{--writing-accent:#23775e}
.editor-dialog{max-width:960px!important;background:#fbfaf6}
.editor-dialog .editor-body{padding:24px clamp(16px,5vw,64px) 48px}
.composer-host{margin:20px 0 32px}
.compose-toolbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:rgba(251,250,246,.97);border:1px solid #dddeda;border-radius:16px;padding:10px;margin-bottom:30px;box-shadow:0 4px 16px #163d2910}
.compose-indicator{font-size:12px;color:#23775e;flex-basis:100%;font-weight:600;padding:0 4px 4px}
.compose-button,.compose-select{border:1px solid #d9ddd6;border-radius:9px;background:white;color:#243b36;padding:8px 11px;min-height:40px;font:inherit;font-size:13px;cursor:pointer}
.compose-button:hover,.compose-button[aria-pressed=true]{background:#e1efe7;border-color:#23775e}
.compose-button:disabled{opacity:.35;cursor:default}
.compose-select{max-width:120px}
.compose-button.color-dot{width:28px;min-height:28px;height:28px;border:3px solid #fff;box-shadow:0 0 0 1px #d9ddd6;padding:0;border-radius:50%}
.compose-button:focus-visible,.compose-select:focus-visible{outline:3px solid #79bba5;outline-offset:3px}
.compose-label{display:block;font-size:12px;font-weight:600;letter-spacing:.06em;color:#687b70;margin:20px 0 10px}
.rich-edit{white-space:pre-wrap;overflow-wrap:anywhere;outline:none;caret-color:#23775e;border:1px solid transparent;border-left:3px solid #dfe5dc;border-radius:6px;padding:14px 18px;line-height:1.8;min-height:100px;background:#fffefb;transition:border-color .15s,background .15s}
.rich-edit:focus{border-color:#a7cab7;border-left-color:#23775e;background:#fff;box-shadow:0 0 0 3px #23775e0b}
.rich-edit:empty:before{content:attr(data-placeholder);color:#9ba69e;pointer-events:none}
.compose-title{font-size:34px;line-height:1.45;min-height:80px;font-weight:500}
.compose-paragraph{font-size:20px;padding-right:54px}
.compose-gap{display:flex;gap:8px;padding:12px 0;justify-content:center;opacity:.8}
.compose-gap .compose-button{border-style:dashed;background:transparent;color:#597363;font-size:12px;min-height:36px}
.compose-gap:hover,.compose-gap:focus-within{opacity:1}
.compose-block{position:relative}
.block-controls{position:absolute;right:7px;top:8px;z-index:2;display:flex;flex-direction:column;gap:4px}
.block-controls .compose-button{padding:4px;min-height:28px;width:28px;font-size:14px}
.compose-attachment{border:1px solid #dce3d9;border-radius:14px;background:#eef2eb;overflow:hidden;min-height:90px;padding:12px 48px 12px 12px;display:flex;align-items:center;gap:15px;overflow-wrap:anywhere}
.compose-attachment img{width:140px;height:110px;object-fit:cover;border-radius:8px}
.compose-options{border-top:1px solid #dfe5dc;padding-top:18px;margin-top:28px}
.compose-options summary{cursor:pointer;color:#597363;margin-bottom:15px}
.rich-display{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85}
@media(max-width:600px){.compose-title{font-size:28px}.compose-toolbar{gap:5px;padding:8px}.compose-button,.compose-select{font-size:12px;padding:7px}.compose-paragraph{font-size:18px}.compose-attachment img{width:95px;height:85px}.editor-dialog .editor-body{padding:16px 14px 36px}}
.calendar-selection{border-top:1px solid #dbe4dc;margin-top:24px;padding-top:18px}
.calendar-day[aria-pressed=true]{background:#d5eadd;border:2px solid #23775e}
.calendar-entry-link{display:block;width:100%;padding:16px;text-align:left;border:1px solid #dbe4dc;background:white;border-radius:10px;margin:10px 0;color:#243b36;cursor:pointer}
.compose-attachment video{max-width:100%;max-height:260px;border-radius:8px}
.compose-attachment audio{max-width:100%}
.rich-edit{scroll-margin-top:175px}
.compose-attachment.has-player{flex-direction:column;align-items:stretch}
.compose-attachment.has-player video,.compose-attachment.has-player audio{width:100%;min-width:0}
.compose-gap .compose-button{color:#365b46!important;border-color:#c1d2c5!important;background:#f0f5ed!important}
/* Continuous writing surface and saved attachment layout */
.paper-body{min-height:420px;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;padding:24px 16px!important;white-space:pre-wrap;font-size:20px;line-height:1.9;display:flow-root;overflow-wrap:anywhere}
.paper-body>div{min-height:1.9em}.paper-body:focus{outline:0}.composer-host{background:#fff;border-radius:16px;padding:0 12px 18px}.composer-host .compose-title{border:0;border-bottom:1px solid #e5e9e5;border-radius:0;background:transparent;box-shadow:none}.composer-host .compose-label{padding:0 16px}.compose-toolbar{top:0}.paper-attachment{position:relative;display:block;margin-top:18px;margin-bottom:18px;max-width:100%;padding:0;outline:2px solid transparent;border-radius:8px;white-space:normal;line-height:1.4;break-inside:avoid}
.paper-attachment.selected{outline-color:#45947b}.paper-attachment.awaiting-position{outline-style:dashed}.paper-preview{overflow:hidden;border-radius:8px}.paper-preview img,.paper-preview video{width:100%;height:auto;max-height:none;display:block}.paper-preview audio{width:100%;display:block}.paper-file{padding:18px;background:#edf2ef;border-radius:8px;overflow-wrap:anywhere}
.paper-resize,.paper-move{position:absolute;touch-action:none;z-index:3;opacity:0;pointer-events:none;background:#23775e;color:white;border:2px solid white;box-shadow:0 2px 6px #0003;min-height:44px;width:44px;border-radius:50%;padding:4px}
.paper-resize{right:-8px;bottom:-8px;cursor:nwse-resize}.paper-move{left:-8px;top:-8px;cursor:grab}.paper-attachment.selected .paper-resize,.paper-attachment.selected .paper-move,.paper-attachment:focus-within .paper-resize,.paper-attachment:focus-within .paper-move{opacity:1;pointer-events:auto}
.paper-media-tools{position:sticky;top:112px;z-index:4;padding:12px;background:#edf5ef;border:1px solid #b9d4c2;border-radius:12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px}.paper-media-tools[hidden]{display:none}.paper-media-tools input{width:110px;padding:0;min-height:32px;accent-color:#23775e}.paper-media-tools select{min-height:34px;padding:5px;font-size:12px}.paper-media-tools button{min-height:34px}
.placed-media{box-sizing:border-box;max-width:100%;margin-top:18px;margin-bottom:18px}.placed-media .photo-button,.placed-media video,.placed-media audio{width:100%;max-width:100%}.placed-media .attachment-link{font-size:12px;margin:6px;overflow-wrap:anywhere}.story{display:flow-root}.story .metadata,.story .pager{clear:both}.story .placed-media[style*="float: left"]{margin-right:12px!important}.story .placed-media[style*="float: right"]{margin-left:12px!important}.paper-attachment[style*="float: left"]{margin-right:12px!important}.paper-attachment[style*="float: right"]{margin-left:12px!important}
.theme-toggle{border:1px solid #cbd8d0;background:#eff5f0;color:#284b3c;border-radius:999px;padding:8px 12px;min-height:38px;white-space:nowrap;font-size:13px}.topbar{gap:10px}.topbar .sync-badge{margin-left:auto}.detail-bar .theme-toggle{margin-left:auto}.detail-bar h2{font-size:18px}
html[data-theme=dark] body{background:#151b1a;color:#e4ebe6}
html[data-theme=dark] :is(.sidebar,.entry-card,.setting-section,.editor-dialog,dialog,.compose-toolbar,.composer-host,.rich-edit,.paper-body,.calendar-entry-link,.calendar-day,.compose-button,.compose-select,input,select,.search-form,.journal-card){background:#202926!important;color:#e4ebe6!important;border-color:#3d4c44!important}
html[data-theme=dark] :is(.topbar,.detail-bar,.metadata,.compose-options,.calendar-selection){border-color:#3d4c44;background:#202926}
html[data-theme=dark] :is(.paper-media-tools,.paper-file,.theme-toggle,.nav-item.active,.chip.selected,.calendar-day[aria-pressed=true],.compose-button[aria-pressed=true]){background:#30483c!important;color:#d7f0df!important;border-color:#648b73!important}
html[data-theme=dark] :is(.eyebrow,.subtle,.result-count,.compose-label,.sync-badge,.story-byline,.nav-item,.nav-caption,.draft-status,.compose-indicator,.card-date,.card-journal){color:#a7bcae!important}
html[data-theme=dark] :is(a,.attachment-link){color:#9dd4b9}html[data-theme=dark] :is(.story-header,.story-text,.rich-display){color:#e4ebe6}html[data-theme=dark] .paper-body{caret-color:#bceace}html[data-theme=dark] .compose-button.color-dot{background:var(--swatch)!important}html[data-theme=dark] .rich-edit[data-placeholder]:empty:before{color:#98a99f}
html[data-theme=dark] span[data-color="#243b36"]{color:#e4ebe6!important}html[data-theme=dark] span[data-color="#a63342"]{color:#ef8796!important}html[data-theme=dark] span[data-color="#ad6419"]{color:#e4b46c!important}html[data-theme=dark] span[data-color="#23775e"]{color:#83c9aa!important}html[data-theme=dark] span[data-color="#336bb0"]{color:#8bbcf0!important}html[data-theme=dark] span[data-color="#8157a0"]{color:#c4a0e8!important}
@media(max-width:600px){.composer-host{padding:0 4px 16px}.paper-body{padding:14px 6px!important;font-size:18px}.paper-media-tools{top:130px}.theme-toggle{font-size:12px;padding:7px 10px}.detail-bar{gap:6px}.detail-bar .button{padding:8px}.detail-bar h2{font-size:16px}}
.editor-dialog .detail-bar{z-index:10}.composer-host .compose-toolbar{top:64px}.paper-media-tools{top:calc(64px + var(--composer-tools-height,128px))}.paper-body{scroll-margin-top:290px}.placed-media[style*="float: left"],.paper-attachment[style*="float: left"]{margin-right:0!important;padding-right:12px}.placed-media[style*="float: right"],.paper-attachment[style*="float: right"]{margin-left:0!important;padding-left:12px}
html[data-theme=dark] button:not(.color-dot){background-color:#283a30;color:#e1ebe4;border-color:#506458}html[data-theme=dark] .button.primary{background:#34745b;color:#fff}html[data-theme=dark] .theme-toggle{background:#344a3d;color:#e7f5ec}html[data-theme=dark] .nav-item.active{background:#36543f}
html[data-theme=dark] :is(.search-input,.metadata pre,.onboarding,.editor-text,.media-error){background:#202926;color:#dce8df;border-color:#3d4c44}html[data-theme=dark] .notice.error{background:#422b30;color:#f4c9d0}html[data-theme=dark] .nav-item:hover{background:#304437}

/* Shared photo layouts: editor and reading keep the same proportions. */
.photo-collection{display:grid;gap:6px;clear:both;min-width:0}.collection-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-collection>img,.photo-collection>.story-media{min-width:0;width:100%;margin:0}.collection-tiles>img,.collection-tiles .photo-button img{width:100%;height:100%;aspect-ratio:1;object-fit:cover}.collection-tiles .photo-button{height:100%}.collection-tiles>.story-media{overflow:hidden;border-radius:12px}.collection-stack{grid-template-columns:1fr}.collection-gallery{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;padding-bottom:10px}.collection-gallery>img,.collection-gallery>.story-media{flex:0 0 88%;width:88%;scroll-snap-align:start;object-fit:cover;aspect-ratio:4/3}.collection-gallery .photo-button img{width:100%;height:100%;aspect-ratio:4/3;object-fit:cover}.gallery-hint{display:block;font-size:12px;opacity:.65;padding:6px 0}.paper-preview.collection-tiles>img{height:auto;aspect-ratio:1;object-fit:cover}.paper-preview.collection-gallery>img{height:auto;object-fit:cover}.header-save{white-space:nowrap}.editor-dialog>.detail-bar{flex-wrap:wrap}.day-entry-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.calendar-entry-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;overflow:hidden;padding:0;border-radius:16px;gap:8px}.calendar-entry-card img{width:100%;height:170px;object-fit:cover}.calendar-entry-card strong,.calendar-entry-card small,.day-entry-number{padding:0 14px}.calendar-entry-card small{padding-bottom:14px}.day-entry-number{font-size:12px;opacity:.65;padding-top:10px}.day-story-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:64px;background:var(--paper,#fff);z-index:9;padding:8px 20px;border-bottom:1px solid #8883}[data-theme=dark] .day-story-nav{background:#172320}@media(max-width:520px){.day-entry-list{grid-template-columns:1fr}.calendar-entry-card img{height:210px}.editor-dialog>.detail-bar h2{font-size:16px;flex:1}.editor-dialog>.detail-bar{gap:6px;padding:10px}.header-save{padding:9px 12px}}

.gallery-controls{display:flex;justify-content:flex-end;gap:8px;margin:6px 0}.gallery-controls button{min-width:44px;min-height:44px}.collection-tiles .story-media .photo-button{display:block;width:100%}

.context-trigger{position:fixed;right:max(22px,env(safe-area-inset-right));z-index:30;border-radius:28px!important;min-height:48px;padding:10px 20px!important;box-shadow:0 6px 24px #0002;background:#23775e!important;color:white!important;font-weight:700}.context-tools{position:fixed;left:50%;transform:translateX(-50%);width:min(440px,calc(100vw - 28px));z-index:31;background:#fff;border:1px solid #8883;border-radius:22px;box-shadow:0 12px 55px #0003;padding:14px}.context-tools[hidden],.context-trigger[hidden]{display:none}.context-tools-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;font-size:14px}.context-tools-row{display:flex;gap:8px;flex-wrap:wrap}.context-tools-row button,.context-tools-row select{min-height:44px}.context-tools-row .color-dot{min-width:36px;min-height:36px}.context-tools-row select{max-width:140px;border-radius:10px;padding:8px}.context-tools-row .color-dot{background:var(--swatch)!important}[data-theme=dark] .context-tools{background:#24332f;color:#edf4ef}.composer-host{padding-bottom:65px}

.composer-host>.compose-toolbar{display:none}.paper-media-tools{top:64px}.context-tools{max-height:55dvh;overflow-y:auto}.context-tools-row .compose-select{max-width:180px}

@media(min-width:900px){.composer-host>.compose-toolbar{display:flex}.paper-media-tools{top:calc(64px + var(--composer-tools-height,0px))}}

.insert-pair{display:flex;align-items:stretch;gap:8px;margin:4px 0 14px;padding-bottom:14px;border-bottom:1px solid #8883}.insert-pair>button,.insert-pair>select{flex:1;min-width:0;min-height:44px!important;max-width:none;border-radius:12px}.insert-pair>select{padding:8px;font-size:14px}.gallery-controls{justify-content:center;align-items:center;gap:0;flex-wrap:wrap;margin:2px 0 10px}.gallery-controls .gallery-dot{flex:0 0 32px!important;width:32px!important;min-width:32px!important;height:44px!important;min-height:44px!important;max-height:44px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;display:grid;place-items:center}.gallery-dot::after{content:'';display:block;width:6px;height:6px;border-radius:8px;background:currentColor;opacity:.25}.gallery-dot[aria-current=true]::after{width:18px;opacity:.85}.gallery-dot:focus-visible{outline:2px solid #23775e!important;outline-offset:-4px}.gallery-position{font-size:12px;opacity:.6;white-space:nowrap;margin-left:10px}.collection-gallery{scrollbar-width:thin;border-radius:14px}.collection-gallery:focus-visible{outline:2px solid #23775e;outline-offset:3px}.gallery-hint{display:none}.date-author-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:end}.date-author-row label{min-width:0}.date-author-row input,.date-author-row select{width:100%;min-width:0;box-sizing:border-box}.author-default-info{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:-4px 0 22px;font-size:12px;color:var(--muted)}.author-default-info button{font-size:12px;padding:6px 10px;min-height:36px}.author-default-info button[hidden]{display:none}

.history-float{position:fixed;left:max(14px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));z-index:28;display:flex;gap:2px;padding:2px;border:1px solid #8883;border-radius:28px;background:#ffffff80;backdrop-filter:blur(12px);box-shadow:0 2px 12px #0001;opacity:.7;transition:opacity .15s}.history-float:hover,.history-float:focus-within{opacity:1}.history-float button{display:grid;place-items:center;width:44px!important;min-width:44px!important;height:44px!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;font:28px/1 system-ui!important;color:inherit!important}.history-float button:disabled{opacity:.25}.history-float button:focus-visible{outline:2px solid #23775e;outline-offset:-4px}html[data-theme=dark] .history-float{background:#20352c80;color:#e3eee8}.editor-dialog:has(.context-tools:not([hidden]))>.history-float{opacity:0;pointer-events:none}@media(prefers-reduced-motion:reduce){.history-float{transition:none}}

body>.history-float{bottom:calc(86px + env(safe-area-inset-bottom));z-index:45}@media(min-width:900px){body>.history-float{bottom:18px}}

.journal-choice-row{display:flex;align-items:end;gap:10px;margin-bottom:24px}.journal-choice-row>.field{flex:1;min-width:0}.journal-choice-row select{width:100%}.journal-choice-row button{font-size:12px;max-width:40%}.journal-manage-trigger{margin-bottom:20px}.journal-manager{display:grid;gap:14px}.journal-management-row{padding:18px 0;border-top:1px solid #8883;display:grid;gap:12px}.journal-management-row details p{margin:10px 0}.journal-management-row input{width:100%}

/* Scroll locking follows actual open overlays, never a stale JS class. */
dialog[open]{overflow-y:auto} .topbar{gap:12px}.trash-trigger{white-space:nowrap;font-size:.85rem;padding:8px 12px}.trash-body{display:grid;gap:18px}.trash-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.trash-row>p{flex:1 1 220px;overflow-wrap:anywhere}.danger{color:#b03932;background:#b0393210;border:1px solid #b0393240}.purge-confirm{padding:20px;border:1px solid #b0393260;border-radius:14px;display:flex;flex-wrap:wrap;gap:14px}.purge-confirm h3,.purge-confirm p{width:100%}[data-theme=dark] .danger{color:#ffa79e}
@media(min-width:701px){.sidebar{overflow-y:auto;overscroll-behavior-y:auto}.sidebar-foot{position:static;margin-top:30px}}
@media(max-width:700px){.topbar{gap:8px;flex-wrap:wrap;height:auto;min-height:calc(62px + env(safe-area-inset-top));padding-bottom:8px}.topbar .sync-badge{margin-left:auto}.trash-trigger{min-height:40px}.trash-body{padding:20px 18px 100px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@media(max-width:700px){.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px 8px;padding-top:calc(8px + env(safe-area-inset-top))}.topbar .mobile-brand{grid-column:1;grid-row:1;font-size:1rem}.topbar .trash-trigger{grid-column:2;grid-row:1}.topbar .theme-toggle{grid-column:3;grid-row:1}.topbar .sync-badge{grid-column:1/-1;grid-row:2;margin-left:0;justify-self:end}.heading>div:first-child{flex-basis:100%}.heading>select{max-width:100%}}
@media(max-width:700px){.heading>div:first-child{max-width:100%;width:100%}}
.button.danger{color:#b03932!important;background:#b0393210!important;border-color:#b0393260!important}[data-theme=dark] .button.danger{color:#ffa79e!important;background:#b0393220!important}

.settings-import>summary{cursor:pointer;font-size:1.15rem;font-weight:550;padding:4px 0}.settings-import[open]>summary{margin-bottom:20px}@media(max-width:700px){.topbar{grid-template-columns:minmax(0,1fr) auto}.topbar .theme-toggle{grid-column:2}}

.feed>.entry-grid{margin-bottom:28px}.feed>.media-grid{margin-bottom:6px}.feed-placeholder{contain:strict;overflow-anchor:none}.feed-more{display:block;margin:28px auto}.feed-more[hidden]{display:none}.photo-loading{background:linear-gradient(135deg,#e4eae6,#f3f5f1);min-height:120px}.card-visual .photo-loading{height:100%;width:100%}[data-theme=dark] .photo-loading{background:#283731}.entry-card .card-visual{overflow:hidden}

.sync-pilot{border:1px solid #8883;border-radius:16px;padding:20px;margin:20px 0}.sync-pilot h3{margin-bottom:8px}.sync-pilot input{max-width:240px}.notice a{display:block;margin-top:12px}

.feed>.feed-placeholder{margin-bottom:28px}.feed-media>.feed-placeholder{margin-bottom:6px}

.photo-collection>.story-media{position:relative}

.lightbox-actions{position:absolute;bottom:calc(20px + env(safe-area-inset-bottom));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));display:flex;flex-wrap:wrap;justify-content:center;gap:8px;z-index:3}.lightbox-actions a,.lightbox-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;color:#fff;background:#101b17e8;border:1px solid #ffffff40;padding:10px 16px;border-radius:14px;text-decoration:none;font-size:14px;backdrop-filter:blur(8px)}.lightbox-actions .original-download{background:#215b4fe8}

.original-body{padding:24px;overflow-wrap:anywhere}.original-body p{margin:12px 0}.original-save-actions{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}.original-save-actions a{display:inline-flex;align-items:center;text-decoration:none;min-height:44px}

.video-actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;padding:.5rem 0}.video-actions .media-error{flex-basis:100%;font-size:.85rem;margin:0}.video-actions .media-error[hidden]{display:none}.story-media video[hidden],.paper-preview video[hidden]{display:none}

/* Sync is a persistent app control, independent of the current screen. */
.sync-control{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:9px 15px;border:1px solid #23775e55;border-radius:24px;background:#eef7f2;color:#174e3c;font:600 13px/1.3 system-ui;cursor:pointer;max-width:260px}
.sync-control[data-state=syncing]{border-color:#298566;background:#d9eee4}.sync-control[data-state=failed]{border-color:#b66e41;background:#fff0df;color:#763a1c}
.sync-float{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:calc(86px + env(safe-area-inset-bottom));z-index:55;box-shadow:0 3px 16px #0002;backdrop-filter:blur(12px);max-width:calc(100vw - 135px)}
dialog>.sync-float{bottom:max(18px,env(safe-area-inset-bottom))}.sync-float[hidden]{display:none}@media(min-width:900px){.sync-float{bottom:18px}}
.sync-center,.sync-save-dialog{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 32px);border:1px solid #80978b44;border-radius:24px;padding:0;background:#f9fbf8;color:#243b36;box-shadow:0 16px 70px #0004}.sync-center::backdrop,.sync-save-dialog::backdrop{background:#102b2266;backdrop-filter:blur(5px)}
.sync-center .detail-bar{position:sticky;top:0;z-index:2;background:inherit;padding:16px;gap:12px}.sync-center .detail-bar h2{margin:0;font-size:22px}.sync-center-body,.sync-save-dialog{padding:24px}.sync-center-body{padding-bottom:80px}.sync-save-dialog h2{font-size:24px;margin-top:0}.sync-save-dialog .history-float{display:none}
.sync-progress{border:1px solid #74978233;border-radius:16px;padding:16px;margin:16px 0;background:#eef5ef}.sync-progress p{margin:8px 0;overflow-wrap:anywhere}.sync-progress progress{width:100%;height:8px;accent-color:#23775e}.sync-file{font-size:13px}.sync-auto{display:flex;align-items:center;gap:12px;min-height:48px}.sync-auto input{width:22px;height:22px;accent-color:#23775e}.sync-pending-row{padding:10px 0;border-bottom:1px solid #8883;font-size:14px}.entry-sync-status{display:block;color:#926024;font-size:12px;font-weight:600;padding:4px 0}.entry-sync-status[hidden]{display:none}#detail>.entry-sync-status{padding:10px 24px}
html[data-theme=dark] .sync-control{background:#263d33;color:#d8eee2;border-color:#80b49a66}html[data-theme=dark] .sync-control[data-state=failed]{background:#513b2e;color:#ffe3bd}html[data-theme=dark] .sync-center,html[data-theme=dark] .sync-save-dialog{background:#1f3029;color:#e5eee8}html[data-theme=dark] .sync-progress{background:#283d32}html[data-theme=dark] .entry-sync-status{color:#f0c587}
@media(max-width:600px){.topbar .sync-control{font-size:11px;padding:7px 10px;max-width:180px}.sync-center-body,.sync-save-dialog{padding:18px}.sync-center-body{padding-bottom:80px}}

.sync-center,.sync-save-dialog{height:fit-content;min-height:0;margin:auto;inset:0;overflow:auto}.sync-progress progress[hidden],.sync-progress .notice[hidden],.sync-pending-row[hidden]{display:none}

/* A single writing-tools entry point on phones, tablets and desktop. */
.composer-host>.compose-toolbar{display:none}.entry-editor>.sync-float{display:none}

.entry-editor .discard-draft{color:#a33b43;background:transparent;border:1px solid #a33b4333;font-size:13px;padding:9px 12px}html[data-theme=dark] .entry-editor .discard-draft{color:#f0aeb2;border-color:#f0aeb244}@media(max-width:600px){.entry-editor .detail-bar{flex-wrap:wrap}.entry-editor .discard-draft{margin-left:auto}}

.entry-editor .detail-bar{flex-wrap:wrap}.editor-discard-actions{display:flex;justify-content:flex-end;gap:8px;flex-basis:100%;padding-top:6px;border-top:1px solid #8882}.editor-discard-actions .discard-draft{margin-left:0}.entry-editor .delete-saved-entry{font-size:13px;color:#a33b43;background:#a33b430a;border:1px solid #a33b4366;padding:9px 12px}html[data-theme=dark] .entry-editor .delete-saved-entry{color:#f0aeb2;border-color:#f0aeb266}@media(max-width:600px){.editor-discard-actions .button{flex:1;min-height:44px}}

.draft-confirm p{margin:16px 0 24px}.draft-confirm .import-actions{margin-bottom:0}

.history-float[hidden]{display:none!important}

.context-tools>.history-float{position:static;inset:auto;width:max-content;max-width:100%;margin:0 0 10px;opacity:1;box-shadow:none;backdrop-filter:none}

/* Collections: bounded photo grids and touch-sized selection. */
.collections-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:24px;margin-top:24px}.collection-cover{position:relative;isolation:isolate;aspect-ratio:4/3;border:0;border-radius:20px;overflow:hidden;background:#264438;color:white;text-align:left;cursor:pointer}.collection-cover>img{width:100%;height:100%;object-fit:cover}.collection-cover-label{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:24px;background:linear-gradient(transparent 25%,#000a)}.collection-cover-label h2{font-size:28px;margin:0}.collection-cover-label p{margin-bottom:0}.collection-dialog{width:min(1100px,96vw);max-width:96vw;height:90dvh;max-height:94dvh;padding:0;overflow:auto;border-radius:20px}.collection-body{padding:24px 24px 100px}.collection-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.collection-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;align-items:end}.collection-filters input,.collection-body form input{max-width:100%;box-sizing:border-box;width:100%}.collection-pick-grid,.collection-attachments{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.collection-pick{display:flex;flex-direction:column;gap:8px;border:1px solid #8884;border-radius:14px;padding:10px;cursor:pointer;overflow:hidden;overflow-wrap:anywhere}.collection-pick:has(input:checked){outline:3px solid #468878;background:#46887818}.collection-pick img{width:100%;height:150px;object-fit:cover;border-radius:8px}.collection-pick input{width:24px;height:24px;accent-color:#468878}.collection-item{min-width:0}.collection-item-actions{display:flex;flex-wrap:wrap;gap:4px}.collection-item .button.quiet{padding:8px;font-size:12px;min-height:40px}.collection-item .media-tile{width:100%}.attachment-name{overflow-wrap:anywhere}.collection-choice{display:block;width:100%;text-align:left;border:1px solid #8883;border-radius:12px;background:transparent;color:inherit;padding:18px;margin:12px 0;font:inherit;cursor:pointer}.collection-body .sync-progress{margin-bottom:16px}.collection-body .pager{flex-wrap:wrap}.collection-dialog .detail-bar{flex-wrap:wrap}.collection-dialog .detail-bar h2{margin-right:auto}.collection-body .collection-actions:has(strong){position:sticky;top:60px;z-index:2;background:var(--bg,#f6f5f0);padding:12px;border-radius:12px}.story-media>.quiet{font-size:12px;margin-top:8px}html[data-theme=dark] .collection-body .collection-actions:has(strong){background:#202d28}@media(max-width:650px){.collection-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0}.collection-body{padding:16px 14px 100px}.collection-pick-grid,.collection-attachments{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.collection-pick img{height:120px}.collection-filters{grid-template-columns:1fr 1fr}.collections-grid{grid-template-columns:1fr}.collection-body .entry-grid{grid-template-columns:1fr}.collection-body .collection-actions .button{min-height:44px}.collection-cover-label h2{font-size:26px}}

@media(max-width:700px){.navigation .nav-item:nth-child(n){display:flex;flex:0 0 72px}.navigation{overflow-x:auto;justify-content:flex-start}.navigation .nav-item span{font-size:.65rem}.collection-dialog .detail-bar{padding-top:calc(12px + env(safe-area-inset-top))}}

.collection-sync-details,.collection-help{margin:12px 0;color:inherit;font-size:.85rem}.collection-sync-details summary,.collection-help summary{cursor:pointer;padding:8px 0}.collection-help p{padding:12px 0}.collection-body>.subtle{margin:10px 0}.collection-attachments .media-tile{aspect-ratio:1;min-height:130px}.collection-attachments .media-tile img{width:100%;height:100%;object-fit:cover}.collection-item>.entry-card{width:100%}

.collection-delete-confirm[hidden]{display:none}.collection-delete-confirm{padding:20px;margin-bottom:18px;border:1px solid #bf555577;border-radius:14px}.collection-delete-confirm p{margin:12px 0}.collection-danger{color:#ac3c44}html[data-theme=dark] .collection-danger{color:#f4a8af}
/* Reading controls: close stays visible; only the action rail scrolls sideways. */
body:has(dialog[open]){overflow:hidden}
#detail{overflow-x:hidden;overscroll-behavior:contain}
#detail .entry-bar{display:flex;flex-wrap:nowrap;gap:10px;padding:10px 16px;max-width:100%;touch-action:pan-x;isolation:isolate}
.entry-actions{display:flex;align-items:center;gap:8px;min-width:0;flex:1;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;touch-action:pan-x;scrollbar-width:thin;scrollbar-color:#7b918766 transparent;padding:3px 2px 6px}
.entry-actions>*{flex:0 0 auto;white-space:nowrap}
.entry-actions .theme-toggle{margin-left:0}
.entry-journal{max-width:180px;overflow:hidden;text-overflow:ellipsis;font-size:12px;color:#687c72;margin-right:8px}
.entry-bar .entry-close{flex:0 0 auto;white-space:nowrap;min-height:44px;padding:8px 14px;border-color:#6a887755;box-shadow:-8px 0 12px #00000005}
.entry-photo-status{display:block;font-size:12px;color:#748379;padding:8px 24px}
.entry-photo-status:empty{display:none}
#detail .story{padding-bottom:85px;min-width:0}
dialog .detail-bar h2{min-width:0;overflow-wrap:anywhere}
.collection-dialog .detail-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px}
.collection-dialog .detail-bar>.button{white-space:nowrap}
.collection-body>.subtle:empty{display:none}
.setting-section>summary{cursor:pointer;font-weight:600;font-size:1.05rem;min-height:28px}
.setting-section>summary:focus-visible{outline:3px solid #448477;outline-offset:4px}
.setting-section>details{margin-top:18px;padding-top:14px;border-top:1px solid #8882}
.setting-section>details>summary{padding:6px 0;cursor:pointer}
.setting-section>.button{margin:4px 6px 8px 0}
.setting-section>.field{margin:16px 0 8px}
.sync-center-body>.subtle{font-size:13px;line-height:1.6;margin:12px 0 24px}
.sync-center-body h3{font-size:16px;margin-top:20px}
.sync-pending-list{font-size:14px}
.sync-control{white-space:nowrap}
.chips,.navigation{overscroll-behavior-x:contain}
.search-fields>*{min-width:0}
.pager{flex-wrap:wrap}
html[data-theme=dark] .entry-journal,html[data-theme=dark] .entry-photo-status{color:#b1c1b8}
@media(max-width:700px){
 #detail .entry-bar{padding:calc(8px + env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left));gap:6px}
 .entry-actions{gap:6px}.entry-actions .button{padding:8px 12px;min-height:44px}.entry-journal{max-width:110px}
 .entry-bar .entry-close{padding:8px 10px}
 .topbar{grid-template-columns:minmax(0,1fr) auto auto;flex-wrap:nowrap}
 .topbar .mobile-brand{grid-column:1;grid-row:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .topbar .sync-control{grid-column:2;grid-row:1;max-width:150px;font-size:12px}
 .topbar .theme-toggle{grid-column:3;grid-row:1}
 .heading{row-gap:14px;padding-bottom:20px}.heading .heading-actions{gap:8px}
 .setting-section{padding:20px}.settings{gap:14px}
 .collection-dialog .detail-bar h2{font-size:18px;line-height:1.4}
 .sync-float{font-size:12px;max-width:calc(100vw - 135px)}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* Consistent contrast and compact navigation in both themes. */
html[data-theme=dark] :is(.field,.setting-section p,.card-meta,.byline,.excerpt,.journal-dot,.mobile-brand,.author-default-info,.empty,.calendar-weekday){color:#b4c3bb}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#a6b8ae;opacity:1}
html[data-theme=dark] .notice:not(.error){background:#2a3b33;color:#dcebe2;border-color:#537362}
html[data-theme=dark] .search-panel{background:#202926;border-color:#3d4c44}
html[data-theme=dark] .no-photo{background:linear-gradient(135deg,#30463a,#233a31);color:#dfebe3}
html[data-theme=dark] .empty h2{color:#dce9e0}
@media(max-width:700px){.navigation{scrollbar-width:none;padding-right:16px}.navigation::-webkit-scrollbar{display:none}.sidebar{box-shadow:0 -6px 18px #00000008}.nav-item{min-height:52px}}
.collection-cover-label h2{overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;line-height:1.3}
.collection-dialog .detail-bar h2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.collection-body .collection-actions:has(strong){position:static}
.collection-body form>.button{margin-top:16px}
.calendar-day{min-width:0;font-variant-numeric:tabular-nums}
.calendar-body{padding-bottom:95px}
@media(max-width:700px){
 .heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}
 .heading>div:first-child{grid-column:1/-1;width:100%;max-width:100%;min-width:0}
 .heading>.write-actions{grid-column:1;grid-row:2;order:0;width:auto;flex-wrap:wrap}
 .heading>select{grid-column:2;grid-row:2;max-width:145px;width:100%;margin:0;font-size:12px}
 .write-actions .button{padding:9px 10px;font-size:12px}
 .entry-actions{scrollbar-width:none;mask-image:linear-gradient(to right,#000 calc(100% - 12px),transparent)}
 .entry-actions::-webkit-scrollbar{display:none}
}
@media(max-width:360px){
 .heading{grid-template-columns:1fr}.heading>.write-actions{grid-column:1;grid-row:2}.heading>select{grid-column:1;grid-row:3;max-width:100%}
 .topbar .mobile-brand{font-size:.85rem}.topbar .sync-control{font-size:11px;padding:7px 8px}.topbar .theme-toggle{font-size:11px;padding:8px}
 .editor-dialog>.detail-bar h2{flex-basis:100%}.editor-dialog>.detail-bar>.theme-toggle{margin-left:0}.editor-dialog>.detail-bar>.button{flex:1}
}
.toolbar{flex-wrap:wrap;gap:10px}
@media(max-width:360px){.toolbar{gap:6px}.toolbar>select{padding:9px 10px}.toolbar>.button{padding:9px 12px}}
.attachment-unavailable{margin:16px 24px;padding:16px 18px;border:1px solid #8883;border-radius:12px;font-size:13px;line-height:1.6;color:#677b70;background:#87988d0a}
html[data-theme=dark] .attachment-unavailable{color:#b8c8be}
.sidebar{overflow-y:auto;overscroll-behavior:contain}
@media(min-width:701px) and (max-width:1100px){.nav-item span{display:block;font-size:10px;line-height:1.15;white-space:normal}.nav-item{flex-direction:column;gap:4px;min-height:54px;padding:7px 2px}.navigation{gap:4px}}

/* Keep photo actions above the separate history/sync control row. */
.lightbox-actions{bottom:calc(82px + env(safe-area-inset-bottom))}
.lightbox>.sync-float{bottom:calc(18px + env(safe-area-inset-bottom))}
.original-view-error{padding:100px 24px 180px;text-align:center;color:#fff}

/* Photo pixels and controls occupy separate layout rows, never overlays. */
dialog.lightbox[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;margin:0;inset:0;max-width:100vw}
.photo-view-header{display:flex;justify-content:flex-end;padding:calc(6px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left));background:#101b17}
.photo-view-header .lightbox-close{position:static;padding:10px 14px;min-height:44px}
.photo-view-stage{min-height:0;min-width:0;overflow:hidden;display:flex;align-items:center;justify-content:center}
.photo-view-stage .zoom-image{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
.photo-view-stage .original-view-error{padding:24px;margin:0;overflow:auto;max-height:100%}
.photo-view-footer{display:grid;gap:8px;padding:10px max(12px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#101b17;border-top:1px solid #ffffff1a}
.photo-view-footer .lightbox-actions{position:static;display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.photo-view-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.photo-view-controls>.history-float,.photo-view-controls>.sync-float{position:static;inset:auto;margin:0;box-shadow:none;backdrop-filter:none}
.photo-view-controls>.history-float{flex-shrink:0;color:#fff;background:#ffffff12}
.photo-view-controls>.sync-float{max-width:calc(100% - 108px);min-width:0}
@media(min-width:700px){.photo-view-footer{grid-template-columns:minmax(0,1fr) auto;align-items:center}.photo-view-footer .lightbox-actions{justify-content:flex-start}.photo-view-controls{gap:20px}}
.photo-view-footer .lightbox-actions button{background:#203b33;color:#fff;border-color:#ffffff40}.photo-view-footer .lightbox-actions .original-download{background:#215b4f}
.photo-action-status{margin:0;text-align:center;font-size:13px;color:#d6e5de;overflow-wrap:anywhere;grid-column:1/-1}.photo-action-status[hidden]{display:none}.photo-view-footer .lightbox-actions a{background:#215b4f;color:#fff}.photo-view-footer .lightbox-actions [aria-disabled=true]{opacity:.55;pointer-events:none}@media(min-width:700px){.photo-view-footer .lightbox-actions{grid-column:1;grid-row:1}.photo-view-footer .photo-view-controls{grid-column:2;grid-row:1}.photo-action-status{grid-row:2}}
.video-original-actions{display:flex;gap:8px;flex-wrap:wrap;padding:10px 16px}.video-original-actions button{min-height:44px}.video-actions .photo-action-status{color:inherit;padding:0 16px 10px;text-align:left}

/* Compact manual sync summary, shared by Settings and the existing Sync sheet. */
.sync-incoming-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.sync-incoming-row .sync-incoming{font-size:13px;min-width:0;margin:4px 0}
.sync-incoming-row .sync-check{flex:none;min-height:44px;padding:6px 12px;font-size:13px;background:transparent;color:inherit}
.sync-save-dialog>.button{margin:8px 8px 0 0;min-height:44px}

.sync-center-body{padding:16px 18px 28px}
.sync-center-body>.import-actions{display:flex;gap:8px}
.sync-center-body>.import-actions>.button{flex:1;min-width:0}
.sync-center-body>.import-actions>[hidden]{display:none}
.sync-pending-details{font-size:13px;margin-top:12px}
.sync-pending-details>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px}
.sync-pending-details>summary::before{content:'▸'}.sync-pending-details[open]>summary::before{content:'▾'}

.sync-control[data-pending=true]:not([data-state=syncing]):not([data-state=failed]){background:#fff1d4;color:#71400a;border-color:#b88322}
html[data-theme=dark] .sync-control[data-pending=true]:not([data-state=syncing]):not([data-state=failed]){background:#483919;color:#ffe4a8;border-color:#b89550}
.sync-progress>.sync-incoming{font-size:13px}

.compose-paste-status{font-size:13px;margin:4px 0 10px;color:inherit;overflow-wrap:anywhere}
.composer-host .paper-media-tools{position:fixed;top:auto;z-index:30;display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 10px;padding:14px;border-radius:18px;box-shadow:0 12px 36px #102a3030;overflow-y:auto;overscroll-behavior:contain;max-width:calc(100vw - 20px);font-size:13px;isolation:isolate}
.composer-host .paper-media-tools[hidden]{display:none}
.composer-host .paper-media-tools input{width:100%;min-width:0;min-height:36px}
.composer-host .paper-media-tools button,.composer-host .paper-media-tools select{min-height:44px;min-width:0;white-space:normal;font-size:13px;border-radius:10px}
.composer-host .paper-media-tools button:last-child{background:#215b4f;color:white}

.paper-preview img.selected-photo{outline:3px solid #2b9f84;outline-offset:-4px}.paper-media-tools .media-remove{color:#a63342;border:1px solid currentColor;background:transparent}

.composer-host .paper-media-tools button:last-child{grid-column:1 / -1}

.composer-host .paper-media-tools{overflow-anchor:none;left:10px;top:10px}

/* Attachment controls occupy their own line, outside the resized figure. */
.composer-host .paper-media-tools{position:static;inset:auto;z-index:auto;width:100%;max-width:100%;max-height:none;box-sizing:border-box;margin:10px 0 22px;overflow:visible;box-shadow:none;border:1px solid #8884;grid-template-columns:minmax(0,1fr) minmax(0,1fr);clear:both;cursor:default;line-height:1.4;outline:none}
.composer-host .paper-media-tools:focus-visible{outline:2px solid #45947b;outline-offset:3px}

.composer-host .paper-media-tools button.media-remove{color:#a63342;border-color:currentColor;background:transparent}
html[data-theme=dark] .composer-host .paper-media-tools button.media-remove{color:#ff9ca8;border-color:currentColor;background:transparent}

.composer-host .paper-media-tools button.media-remove{color:#b42335!important;-webkit-text-fill-color:#b42335!important;border-color:currentColor!important}
html[data-theme=dark] .composer-host .paper-media-tools button.media-remove{color:#ff9ca8!important;-webkit-text-fill-color:#ff9ca8!important;border-color:currentColor!important}

.media-delete-check{grid-column:1 / -1;display:grid;grid-template-columns:1fr 1fr;gap:10px;border-top:1px solid #8884;padding-top:12px}.media-delete-check[hidden]{display:none}.media-delete-check p{grid-column:1 / -1;font-size:14px}.composer-host .paper-media-tools .media-delete-check button:last-child{grid-column:auto;background:transparent}

.paper-body .drop-before{border-top:3px solid #2b9f84}.paper-body .drop-after{border-bottom:3px solid #2b9f84}.paper-body .is-dragging{opacity:.65;outline:2px dashed #2b9f84}
.paper-move{touch-action:none;cursor:grab}.paper-body .is-dragging .paper-move{cursor:grabbing}


.paper-body>div:not(.paper-media-tools),.paper-body>p{margin:0;padding:0;min-height:1lh}
.story .rich-display.story-text:has(+ .rich-display.story-text){margin-bottom:0}
.story .rich-display.story-text + .rich-display.story-text{margin-top:0}
