/* v49O: archive reading and composition. All rules stay inside Together. */
.te-heirloom .te-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:end;margin-top:20px}
.te-heirloom .te-search,.te-heirloom .te-sort{display:flex;flex-direction:column;gap:7px;font-size:10px;color:var(--heir-sub);min-width:0}
.te-heirloom .te-search input,.te-heirloom .te-sort select{width:100%;min-width:0;padding:10px 0;border:0;border-bottom:1px solid var(--heir-rule);border-radius:0;background:transparent;color:var(--heir-ink);font:inherit;font-size:12px;box-sizing:border-box}
.te-heirloom .te-search input::placeholder{color:var(--heir-sub);opacity:.85}
.te-heirloom .te-sort select{max-width:104px}
.te-heirloom .te-results{font-size:10px;line-height:1.6;color:var(--heir-sub);margin:12px 0 0;min-height:16px}
.te-heirloom .te-entry-actions{display:flex;gap:6px;flex-shrink:0}
.te-heirloom .te-entry-actions button{background:none;border:0;color:var(--heir-sub);font-size:11px;padding:8px 3px;min-height:32px}
.te-heirloom .te-note-open{display:block;width:100%;text-align:left;background:none;border:0;padding:0;color:var(--heir-ink)}
.te-heirloom .te-note-open p{overflow-wrap:anywhere;white-space:pre-wrap}
.te-heirloom .te-note-open>small{display:block;font-size:10px;color:var(--heir-sub);margin-top:10px}
.te-heirloom button.album-photo{width:100%;padding:0;color:var(--heir-sub);font-size:11px}
.te-heirloom .album-item p{overflow-wrap:anywhere;color:var(--heir-sub)}
.te-heirloom .album-item header{align-items:flex-start;gap:5px;flex-wrap:wrap}
.te-heirloom .album-item .te-byline{flex-wrap:wrap;line-height:1.6}
.te-heirloom .te-dialog{--te-wash:transparent;--te-rule:var(--heir-rule);--te-soft:var(--heir-sub);--te-ink:var(--heir-ink);color:var(--heir-ink);border-color:var(--heir-rule);padding:22px;max-height:calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overscroll-behavior:contain}
:root[data-phase="day"] .te-heirloom .te-dialog{background:#f0f8fa}
:root[data-phase="dusk"] .te-heirloom .te-dialog{background:#fcf1f7}
:root[data-phase="night"] .te-heirloom .te-dialog{background:#30243d;color-scheme:dark}
.te-heirloom .te-dialog-top,.te-heirloom .te-dialog-hint{color:var(--heir-sub)}
.te-heirloom .te-dialog-top button{min-width:36px;min-height:36px}
.te-heirloom .te-dialog textarea{min-height:140px;font-size:14px;line-height:1.85;resize:vertical;overflow-wrap:anywhere}
.te-heirloom .te-dialog input[type=date]{max-width:100%;min-width:0;box-sizing:border-box}
.te-heirloom .te-dialog .primary{min-height:42px;padding:11px 14px}
.te-heirloom .te-upload-preview{text-align:center;border-bottom:1px dashed var(--heir-rule);padding-bottom:14px}
.te-heirloom .te-upload-preview img{display:block;max-width:100%;max-height:230px;object-fit:contain;margin:0 auto}
.te-heirloom .te-upload-preview small{display:block;color:var(--heir-sub);font-size:10px;overflow-wrap:anywhere;margin-top:8px}
.te-heirloom .te-detail-dialog{max-width:min(92vw,620px)}
.te-heirloom .te-detail-byline{font-size:11px;color:var(--heir-sub);margin:14px 0 20px}
.te-heirloom .te-detail-image{display:grid;place-items:center;min-height:100px;color:var(--heir-sub);font-size:12px}
.te-heirloom .te-detail-image img{display:block;width:auto;height:auto;max-width:100%;max-height:52dvh;object-fit:contain}
.te-heirloom .te-detail-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.95;margin:22px 0;color:var(--heir-ink)}
.te-heirloom .te-detail-nav{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:2px dashed var(--heir-rule);padding-top:14px}
.te-heirloom .te-detail-nav button,.te-heirloom .te-detail-actions button{background:none;border:0;color:var(--heir-sub);padding:10px 0;font-size:12px;min-height:40px}
.te-heirloom .te-detail-nav small{font:italic 12px Georgia,serif;color:var(--heir-sub)}
.te-heirloom .te-detail-actions{display:flex;justify-content:space-between;gap:14px;margin-top:6px}
.te-heirloom button:disabled{opacity:.4;cursor:default}
.te-heirloom :is(button,input,textarea,select):focus-visible{outline:2px solid #b28bbd;outline-offset:4px}
@media(max-width:370px){.te-heirloom .te-search-row{gap:10px}.te-heirloom .te-dialog{padding:18px}.te-heirloom .te-detail-nav{gap:7px}.te-heirloom .te-detail-nav button{font-size:11px}}
