/* Scoped to the memoir cover; other themes and the workspace keep their styles. */
.home.home-memoir{position:relative;min-height:calc(100svh - 86px);padding:50px 7vw 165px;display:flex;align-items:center;justify-content:center;isolation:isolate}
.home-memoir:before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 70% 40%,color-mix(in srgb,var(--accent) 13%,transparent),transparent 60%),linear-gradient(125deg,color-mix(in srgb,var(--bg) 94%,#b99970),var(--bg))}
.memoir-cover{width:min(1220px,100%);display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);align-items:center;gap:clamp(40px,6vw,100px);text-align:left}
.memoir-copy{position:relative;padding-bottom:28px;min-width:0}
.memoir-eyebrow{font-size:10px;letter-spacing:.18em;color:var(--muted);margin:0 0 34px;line-height:2}
.memoir-eyebrow span{margin:0 10px;opacity:.45}
.home-memoir .memoir-copy h1{font-family:var(--display-font);font-weight:500;font-size:clamp(30px,3.5vw,54px);line-height:1.45;letter-spacing:.055em;color:var(--ink);margin:0 0 25px;white-space:pre-wrap;overflow-wrap:anywhere;text-wrap:pretty}
.memoir-description{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:2.3;letter-spacing:.09em;color:var(--muted);margin:0}
.memoir-controls{display:flex;flex-wrap:wrap;gap:22px;margin-top:46px}
.memoir-controls button{display:inline-flex;align-items:center;gap:9px;min-height:36px;color:var(--ink);font-size:11px;opacity:.78;transition:opacity .2s}
.memoir-controls button:hover{opacity:1}.memoir-controls svg{width:19px;height:19px}.memoir-controls [data-memoir-auto]{color:var(--muted)}
.memoir-photo-area{position:relative;width:100%;max-width:570px;justify-self:center;margin:20px 0 35px}
.memoir-photo-button{display:block;position:relative;width:100%;padding:0 0 28px;aspect-ratio:auto;text-align:initial;touch-action:none;background:none!important;border:0!important;border-radius:0;box-shadow:none!important}
.memoir-stack{display:block;position:relative;width:100%}
.memoir-print{position:absolute;inset:0;display:flex;flex-direction:column;padding:clamp(10px,1.5vw,19px) clamp(10px,1.5vw,19px) 0;background:#f9f7f1;transform:translate(calc(var(--depth)*2px),calc(var(--depth)*-3px)) rotate(var(--tilt));box-shadow:0 2px 5px #211b1820,0 18px 42px #211b181c;transform-origin:50% 65%;border:1px solid #ffffffa0;pointer-events:none}
.memoir-print.is-front{position:relative;inset:auto}
.memoir-print img{display:block;width:100%;aspect-ratio:1;min-height:0;object-fit:cover;object-position:center;filter:none;background:#ddd5c8;flex:none}
.memoir-paper-label{display:flex;align-items:center;height:38px;flex-shrink:0;color:#81786e;letter-spacing:.16em;font-size:9px}
.memoir-photo-actions{position:absolute;right:14px;bottom:69px;z-index:7;display:flex;align-items:center;gap:10px}
.memoir-photo-actions button{height:30px;width:30px;display:grid;place-items:center;color:#746b61;border-radius:50%;background:#eae5dc;transition:background .2s,transform .2s}.memoir-photo-actions button:hover:not(:disabled){background:#ddd5c9;transform:translateY(-2px)}.memoir-photo-actions button:disabled{opacity:.3;cursor:default}
.memoir-photo-actions svg{width:17px;height:17px}.memoir-custom-badge img{width:26px;height:26px;object-fit:contain;display:block}
.memoir-edit{position:absolute;right:-48px;top:45%;height:36px;width:36px;display:grid;place-items:center;border-radius:50%;background:color-mix(in srgb,var(--surface) 65%,transparent);color:var(--muted);transition:color .2s,background .2s;z-index:7}.memoir-edit:hover{color:var(--ink);background:var(--surface)}.memoir-edit svg{width:17px;height:17px}
.memoir-caption{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 2px 0;font-size:10px;color:var(--muted);letter-spacing:.06em}.memoir-number{font-variant-numeric:tabular-nums}.memoir-caption>span:nth-child(2){opacity:.72}
.memoir-dots{display:flex;align-items:center;gap:2px}.memoir-dots button{width:19px;height:25px;position:relative;padding:0}.memoir-dots button:after{content:"";position:absolute;inset:10px 7px;border-radius:3px;background:var(--muted);opacity:.25;transition:opacity .2s}.memoir-dots button[aria-current=true]:after{opacity:1}
.memoir-status{font-size:11px;color:var(--muted);line-height:1.8;min-height:20px;margin:14px 0 0}
body[data-dark=true] .memoir-print{background:#e5e0d5;border-color:#eee8dc80;box-shadow:0 2px 5px #0004,0 22px 55px #0005}body[data-dark=true] .memoir-print img{filter:none}
#memoir-editor{box-sizing:border-box;position:fixed;inset:18px 18px 18px auto;margin:0;width:min(410px,calc(100vw - 36px));height:calc(100dvh - 36px);max-height:none;max-width:none;padding:26px;border:0;border-radius:22px;background:var(--surface);color:var(--ink);box-shadow:0 18px 65px #0002}
#memoir-editor[open]{display:flex;flex-direction:column;gap:16px}#memoir-editor::backdrop{background:#1114;backdrop-filter:blur(5px)}
.memoir-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.memoir-editor-heading h2{font-size:21px;margin:0;font-weight:500}.memoir-editor-heading button{width:32px;height:32px;color:var(--muted);font-size:23px;border-radius:50%;background:color-mix(in srgb,var(--ink) 5%,transparent)}
.memoir-editor-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:3px}.memoir-editor-tabs{display:flex;align-items:center;gap:7px;margin:0 0 24px}.memoir-editor-tabs button{width:34px;height:36px;display:grid;place-items:center;border-radius:9px;background:var(--soft);color:var(--muted);font-size:11px}.memoir-editor-tabs button[aria-pressed=true]{background:var(--accent);color:white}.memoir-editor-tabs small{margin-left:auto;color:var(--muted);font-size:10px}.memoir-editor-tabs svg{width:16px;height:16px}
#memoir-editor label{display:block;font-size:12px;color:var(--muted);margin:17px 0}#memoir-editor input:not([type=checkbox]),#memoir-editor textarea{box-sizing:border-box;display:block;width:100%;margin-top:9px;padding:12px;border:1px solid color-mix(in srgb,var(--ink) 10%,transparent);border-radius:9px;background:color-mix(in srgb,var(--ink) 3%,var(--surface));color:var(--ink);font-family:inherit;font-size:13px;line-height:1.7;box-shadow:none;resize:vertical}#memoir-editor input:focus,#memoir-editor textarea:focus{outline:1px solid var(--muted);outline-offset:1px}
.memoir-editor-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:15px 0}.memoir-editor-row button,#memoir-editor [data-memoir-use-url],#memoir-editor [data-memoir-add-url]{display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:12px;color:var(--ink);padding:10px 13px;background:var(--soft);border-radius:9px}.memoir-editor-row svg{width:17px;height:17px}#memoir-editor [data-memoir-remove],#memoir-editor [data-memoir-clear-icon]{background:none;color:var(--muted);padding-left:2px}
#memoir-editor .memoir-auto-option{display:flex;align-items:center;gap:9px;margin-top:28px}#memoir-editor .memoir-auto-option input{accent-color:var(--accent);width:16px;height:16px;flex:0 0 16px;margin:0;padding:0}.memoir-local-note{font-size:11px;color:var(--muted);line-height:1.9;margin:20px 0}#memoir-editor [data-memoir-status]{font-size:12px;line-height:1.6;min-height:0;margin:0;color:var(--muted)}#memoir-editor>.primary{width:100%;min-height:43px;flex-shrink:0}#memoir-editor button:disabled{opacity:.35;cursor:default}
body[data-theme=cinema][data-view=home]:has(.home-memoir) header,body[data-theme=cinema][data-view=home]:has(.home-memoir) .brand-mark{color:var(--ink)}
body[data-theme=cinema][data-view=home]:has(.home-memoir) .account{background:var(--soft);color:var(--ink)}
body[data-theme=cinema][data-view=home]:has(.home-memoir) .dock{color:var(--ink)}
body[data-theme=cinema][data-view=home]:has(.home-memoir) :is(.dock-label,.prototype,.brand-en){color:var(--muted)}
@media(min-width:761px) and (max-height:800px){.home.home-memoir{padding-top:18px;padding-bottom:135px}.memoir-photo-area{max-width:min(470px,calc(100dvh - 265px))}.memoir-cover{gap:45px}.home-memoir .memoir-copy h1{font-size:36px}.memoir-controls{margin-top:28px}.memoir-eyebrow{margin-bottom:22px}}
@media(max-width:760px){.home.home-memoir{padding:22px 30px 155px;min-height:calc(100svh - 76px)}.memoir-cover{grid-template-columns:1fr;gap:22px;max-width:440px}.memoir-copy{padding:0}.memoir-eyebrow{font-size:8px;margin-bottom:12px}.home-memoir .memoir-copy h1{font-size:28px;margin-bottom:12px}.memoir-description{font-size:11px;line-height:1.9}.memoir-controls{margin-top:15px;gap:20px}.memoir-controls button{font-size:10px}.memoir-status:empty{display:none}.memoir-photo-area{width:calc(100% - 22px);margin:4px 0 22px;justify-self:start}.memoir-edit{right:-32px;width:28px;height:32px}.memoir-paper-label{height:34px;font-size:8px}.memoir-photo-actions{right:10px;bottom:66px}.memoir-photo-actions button{height:27px;width:27px}.memoir-caption{font-size:9px;gap:6px}.memoir-dots button{width:16px}#memoir-editor{inset:10px;width:calc(100vw - 20px);height:calc(100dvh - 20px);padding:22px}}
@media(prefers-reduced-motion:reduce){.home-memoir *{animation:none!important;transition:none!important}}
/* Photo editing previews remain local until Done is pressed. */
.memoir-controls{gap:10px;align-items:center}
.memoir-controls [data-memoir-music]{width:36px;height:36px;justify-content:center;border-radius:50%;background:color-mix(in srgb,var(--ink) 6%,transparent)}
.memoir-controls [data-memoir-music][aria-pressed=true]{background:color-mix(in srgb,var(--accent) 19%,transparent);opacity:1}
.memoir-controls [data-memoir-track]{padding:6px 9px;font-size:12px;letter-spacing:.06em}
.memoir-editor-preview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:18px;padding:18px 0 22px;min-height:135px}
.memoir-editor-preview img{width:100%;aspect-ratio:1;object-fit:cover;object-position:center;box-sizing:border-box;border:7px solid #f5f2ea;box-shadow:0 3px 12px #0002}
.memoir-editor-preview b{display:block;font-size:15px;font-weight:500;line-height:1.7;overflow-wrap:anywhere;white-space:pre-wrap}
.memoir-editor-preview p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:10px;line-height:1.8;color:var(--muted);margin-top:9px}
.memoir-image-source{font-size:10px;line-height:1.7;color:var(--muted);overflow-wrap:anywhere;margin:0 0 14px}
#memoir-editor .memoir-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-shrink:0}
#memoir-editor .memoir-editor-footer .memoir-auto-option{margin:0;gap:10px;font-size:12px;color:var(--ink)}
#memoir-editor .memoir-editor-footer small{display:block;color:var(--muted);font-size:10px;margin-top:4px}
#memoir-editor .memoir-editor-footer .primary{min-width:110px;min-height:43px}
#memoir-editor .memoir-auto-option input{appearance:none;width:32px;height:19px;flex-basis:32px;border:0;border-radius:20px;position:relative;background:color-mix(in srgb,var(--ink) 20%,var(--surface));cursor:pointer;transition:background .2s}
#memoir-editor .memoir-auto-option input:before{content:'';position:absolute;width:13px;height:13px;border-radius:50%;background:#fff;left:3px;top:3px;transition:transform .2s}
#memoir-editor .memoir-auto-option input:checked{background:var(--accent)}
#memoir-editor .memoir-auto-option input:checked:before{transform:translateX(13px)}
#memoir-editor [data-memoir-reset]{font-size:11px;color:var(--muted);padding:10px 0;margin-top:8px}

/* The old cinema glow otherwise shows through while the main view fades. */
body[data-theme=cinema][data-dark=true]{background-image:none}
#memoir-editor .memoir-image-upload{position:relative;display:block;width:100%;padding:0;margin:18px 0 10px;overflow:hidden;border-radius:10px;background:var(--soft);aspect-ratio:1}
#memoir-editor .memoir-image-upload img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
#memoir-editor .memoir-image-upload>span{position:absolute;inset:auto 0 0;display:flex;align-items:center;justify-content:center;gap:8px;padding:14px;color:#fff;background:linear-gradient(transparent,#0009);font-size:12px}
#memoir-editor .memoir-image-upload svg{width:16px;height:16px}
#memoir-editor .memoir-editor-footer{gap:10px}
#memoir-editor .memoir-auto-option>span{white-space:nowrap;font-size:11px}
#memoir-editor .memoir-editor-footer .primary{min-width:78px}
#memoir-editor>.dialog-done{display:none!important}
