.gift-compose-dialog.book-action-dialog{--gift-sheet:#f5f2e3;--gift-hand:"Kaiti SC",STKaiti,KaiTi,var(--serif);width:min(850px,calc(100vw - 36px));border:0;border-radius:4px 10px 5px 8px;background:var(--paper);box-shadow:0 26px 90px #142f2233;mask:url('/brand-assets/envelope-edge.svg') center/100% 100% no-repeat;max-height:calc(100dvh - 36px)}
.gift-compose-dialog::backdrop{background:#1f372958;backdrop-filter:blur(7px)}
.gift-compose-dialog .book-action-heading{padding:22px 32px 10px;border:0;background:var(--paper)}.gift-compose-dialog .book-action-heading h2{font-size:25px;font-weight:400}.gift-compose-dialog .book-action-body{padding:0 32px 22px}.gift-compose-dialog .book-action-status{padding-left:32px;padding-right:32px;font-size:12px}.gift-compose-dialog .book-action-status:empty{padding-bottom:7px}
.gift-writing-intro{font-size:12px;color:var(--muted);margin:1px 0 18px;line-height:1.8}.gift-writing-steps{display:flex;gap:0;list-style:none;margin:0 0 24px;padding:0;color:var(--muted);font-size:11px;line-height:1.8}.gift-writing-steps li{position:relative;display:flex;align-items:center;gap:20px;min-height:30px;opacity:.6}.gift-writing-steps li:not(:last-child):after{content:'';height:1px;width:35px;margin-right:20px;background:currentColor;opacity:.45;transform:rotate(-1deg)}.gift-writing-steps li[aria-current=step]{color:var(--ink);opacity:1;font-weight:500}.gift-writing-steps li[aria-current=step]:before{content:'';position:absolute;left:0;bottom:0;width:4em;height:2px;background:var(--accent);opacity:.5;clip-path:polygon(0 40%,30% 10%,100% 30%,95% 80%,65% 100%,3% 70%)}
.gift-writing-paper{position:relative;isolation:isolate;display:flex;flex-direction:column;gap:0;padding:29px 36px 30px;filter:drop-shadow(0 5px 9px #33432911)}.gift-writing-paper:before{content:'';position:absolute;inset:0;z-index:-1;background-color:var(--gift-sheet);background-image:linear-gradient(100deg,#f5f2e3d9,#f5f2e3b3),url('/brand-assets/sage-paper.webp');background-size:auto,600px;background-blend-mode:normal,multiply;mask:url('/brand-assets/letter-edge.svg') center/100% 100% no-repeat}
.gift-writing-book{display:flex;align-items:center;gap:23px;padding-bottom:22px;margin-bottom:20px;border-bottom:1px solid color-mix(in srgb,var(--line) 35%,transparent)}.gift-writing-book>div:last-child{display:flex;flex-direction:column;gap:6px;min-width:0}.gift-writing-book strong{font:21px/1.6 var(--serif);font-weight:400;overflow-wrap:anywhere}.gift-writing-book small{font-size:11px;color:var(--muted);line-height:1.6}.gift-writing-book .action-book-cover{width:52px;height:77px;flex:none;rotate:-1deg}.gift-writing-book .binding-type{inset:10px 5px 8px 10px;gap:4px}.gift-writing-book .binding-title{font-size:9px;-webkit-line-clamp:4}.gift-writing-book .binding-author,.gift-writing-book .binding-original{display:none}.gift-writing-book .action-book-cover:before{inset:6px 4px 6px 8px}
.gift-writing-address{display:flex;align-items:baseline;gap:17px;font:21px/1.7 var(--gift-hand);margin-bottom:19px}.gift-writing-address>span{color:var(--muted);font-size:18px}.gift-writing-address input{background:transparent;border:0;border-bottom:1px solid color-mix(in srgb,var(--line) 42%,transparent);border-radius:0;padding:4px 2px;min-height:45px;min-width:0;width:min(100%,370px);font:25px/1.5 var(--gift-hand);color:var(--ink)}.gift-writing-address input::placeholder{color:var(--muted);opacity:.65;font-size:21px}
.gift-writing-words{display:block;width:100%;min-height:166px;max-height:390px;resize:vertical;padding:0 2px;margin:0 0 24px;background:repeating-linear-gradient(transparent 0,transparent calc(2em - 1px),color-mix(in srgb,var(--line) 20%,transparent) calc(2em - 1px),color-mix(in srgb,var(--line) 20%,transparent) 2em);border:0;border-radius:0;color:var(--ink);font:21px/2 var(--gift-hand);letter-spacing:.005em}.gift-writing-words::placeholder{color:var(--muted);opacity:.65}.gift-writing-words:focus-visible,.gift-writing-address input:focus-visible{outline:1px solid color-mix(in srgb,var(--accent) 70%,transparent);outline-offset:6px}
.gift-writing-signature{display:flex;flex-direction:column;align-items:flex-end;gap:6px;padding-right:4px}.gift-writing-signature>span{font:21px/1.7 var(--gift-hand)}.gift-writing-signature small{font:10px/1.7 var(--sans);color:var(--muted)}
.gift-writing-options{margin:23px 0 0}.gift-writing-options>label{display:flex;align-items:center;gap:10px;min-height:44px;font:12px/1.8 var(--sans)}.gift-writing-options input{width:16px;height:16px;accent-color:var(--accent);margin:0}.gift-writing-scope{font:11px/1.9 var(--sans);color:var(--muted);margin:2px 0 18px;max-width:54em}.gift-writing-actions{display:flex;align-items:center;justify-content:space-between;gap:25px}.gift-writing-help{font:11px/1.9 var(--sans);color:var(--muted);margin:0;max-width:27em}.gift-writing-actions .primary,.gift-preview-actions .primary,.gift-sealed-actions .primary{font-size:12px;min-height:46px;flex:none;border-radius:3px 6px 3px 5px;padding:11px 20px}
.gift-preview-bar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:0 0 14px;font-size:11px;color:var(--muted)}.gift-preview-bar button{font-size:12px;min-height:44px}.gift-preview-frame{display:block;width:100%;height:clamp(420px,55dvh,680px);border:0;border-radius:2px 6px 3px 4px;background:var(--paper)}.gift-preview-actions{display:flex;align-items:center;justify-content:space-between;gap:25px;padding:21px 0 5px}.gift-preview-actions p{font:11px/1.9 var(--sans);color:var(--muted);margin:0;max-width:26em}
.gift-sealed-stage{text-align:center;padding:5px 0 0}.gift-sealed-envelope{position:relative;isolation:isolate;width:min(390px,100%);min-height:206px;margin:0 auto 28px;text-align:left;padding:47px 36px 28px;filter:drop-shadow(1px 12px 12px #35462d1a);transform:rotate(-1deg);overflow-wrap:anywhere}.gift-sealed-envelope:before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(110deg,#e5e6d8d9,#e3e6d4b3),url('/brand-assets/sage-paper.webp') center/500px,#e5e6d8;mask:url('/brand-assets/envelope-edge.svg') center/100% 100% no-repeat}.gift-sealed-mark{position:absolute;right:30px;top:26px;display:grid;place-items:center;width:42px;height:48px;background:var(--accent);color:var(--paper);font:13px/1.6 var(--serif);border-radius:45% 53% 47% 50%/51% 47% 54% 46%;opacity:.85}.gift-sealed-to{font:27px/1.6 var(--gift-hand);margin:0 48px 10px 0}.gift-sealed-book{font:15px/1.7 var(--serif);color:var(--muted);margin:0}.gift-sealed-from{font:13px/1.7 var(--gift-hand);margin:16px 0 0;color:var(--muted)}.gift-sealed-title{font:25px/1.6 var(--serif);font-weight:400;margin:0 0 10px}.gift-sealed-note{font:12px/1.9 var(--sans);color:var(--muted);max-width:33em;margin:0 auto 24px}.gift-sealed-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px 23px}.gift-sealed-actions .text-link{font-size:12px;min-height:44px;display:inline-flex;align-items:center}.gift-sealed-link{font:11px/1.8 var(--sans);margin:21px auto 5px;text-align:left;width:min(500px,100%);color:var(--muted)}.gift-sealed-link summary{min-height:40px;display:list-item;cursor:pointer;width:max-content;margin:0 auto}.gift-sealed-link .gift-share-url{font-size:11px;margin-top:8px;width:100%;border:1px solid var(--line);border-radius:3px;padding:10px;background:var(--paper);color:var(--ink)}.gift-write-another{font:11px/1.8 var(--sans);color:var(--muted);min-height:44px;margin:8px 0 0}.gift-write-another:hover{color:var(--ink)}
.gift-compose-history{margin-top:24px;padding-top:12px;border-top:1px solid color-mix(in srgb,var(--line) 40%,transparent);font-size:11px;color:var(--muted)}.gift-compose-history>summary{cursor:pointer;min-height:44px;padding:9px 0}.gift-history-row{display:flex;align-items:center;gap:10px 15px;flex-wrap:wrap;padding:10px 0;border-top:1px solid color-mix(in srgb,var(--line) 30%,transparent)}.gift-history-row>span{flex:1;color:var(--ink)}.gift-history-row :is(a,button){min-height:40px}.gift-history-row small{width:100%;line-height:1.9}
:root[data-site-theme=night] .gift-compose-dialog{--gift-sheet:#2b372c}:root[data-site-theme=night] .gift-writing-paper:before{background-image:linear-gradient(#2b372cd9,#2b372cbf),url('/brand-assets/sage-paper.webp')}:root[data-site-theme=night] .gift-sealed-envelope:before{background-image:linear-gradient(#34432dd9,#34432dbf),url('/brand-assets/sage-paper.webp')}
@media(prefers-color-scheme:dark){:root:not([data-site-theme=paper]) .gift-compose-dialog{--gift-sheet:#2b372c}:root:not([data-site-theme=paper]) .gift-writing-paper:before{background-image:linear-gradient(#2b372cd9,#2b372cbf),url('/brand-assets/sage-paper.webp')}:root:not([data-site-theme=paper]) .gift-sealed-envelope:before{background-image:linear-gradient(#34432dd9,#34432dbf),url('/brand-assets/sage-paper.webp')}}
@media(max-width:600px){.gift-compose-dialog.book-action-dialog{width:calc(100vw - 18px);max-height:calc(100dvh - 20px)}.gift-compose-dialog .book-action-heading{padding:16px 21px 7px}.gift-compose-dialog .book-action-heading h2{font-size:23px}.gift-compose-dialog .book-action-body{padding:0 19px 20px}.gift-compose-dialog .book-action-status{padding-left:21px;padding-right:21px}.gift-writing-intro{font-size:11px;margin-bottom:14px}.gift-writing-steps{margin-bottom:18px;font-size:10px}.gift-writing-steps li{gap:13px}.gift-writing-steps li:not(:last-child):after{width:22px;margin-right:13px}.gift-writing-paper{padding:23px 22px 25px}.gift-writing-book{gap:20px;margin-bottom:16px;padding-bottom:18px}.gift-writing-book strong{font-size:19px}.gift-writing-book small{font-size:10px}.gift-writing-address{gap:12px;margin-bottom:15px}.gift-writing-address input{font-size:23px;width:100%}.gift-writing-address input::placeholder{font-size:20px}.gift-writing-words{font-size:20px;min-height:166px;max-height:300px;margin-bottom:20px}.gift-writing-signature>span{font-size:21px}.gift-writing-actions{flex-direction:column;align-items:stretch;gap:15px}.gift-writing-actions .primary{align-self:flex-end}.gift-writing-help{max-width:none}.gift-writing-options{margin-top:17px}.gift-writing-scope{margin-bottom:18px;font-size:10px}.gift-writing-options>label{font-size:11px}.gift-preview-frame{height:max(350px,calc(100dvh - 310px));width:calc(100% + 18px);margin-left:-9px}.gift-preview-bar{gap:15px;font-size:10px}.gift-preview-actions{flex-direction:column;align-items:stretch;gap:14px;padding-top:17px}.gift-preview-actions p{max-width:none;font-size:10px}.gift-preview-actions .primary{align-self:flex-end}.gift-sealed-envelope{width:min(340px,100%);padding:45px 27px 25px;min-height:195px;margin-bottom:24px}.gift-sealed-mark{right:24px;top:24px}.gift-sealed-to{font-size:25px}.gift-sealed-title{font-size:24px}.gift-sealed-note{font-size:11px}.gift-sealed-actions{gap:9px 20px}.gift-compose-history{margin-top:20px}.gift-history-row{gap:8px 12px}.gift-history-row a,.gift-history-row button{font-size:11px}}
@media(forced-colors:active){.gift-compose-dialog.book-action-dialog{mask:none;border:1px solid CanvasText;background:Canvas;box-shadow:none}.gift-writing-paper,.gift-sealed-envelope{background:Canvas;border:1px solid CanvasText;filter:none}.gift-writing-paper:before,.gift-sealed-envelope:before{display:none}.gift-writing-address input,.gift-writing-words{background:Canvas;color:CanvasText;border-bottom:1px solid CanvasText}.gift-sealed-mark{background:ButtonFace;color:ButtonText;border:1px solid ButtonText}.gift-writing-steps li[aria-current=step]:before{background:Highlight}.gift-writing-scope,.gift-writing-help,.gift-preview-actions p{color:CanvasText}}

/* These compact labels retain the same pointer area as the writing actions. */
.gift-compose-dialog .gift-sealed-link>summary{min-width:44px;min-height:44px;padding-block:12px}
.gift-compose-dialog .gift-history-row :is(a,button){display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
.gift-compose-dialog .gift-write-another{min-width:44px}
