/* A letter lifted from the notebook, with one unobtrusive scrolling surface. */
#result-dialog{width:min(610px,calc(100% - 28px));max-height:calc(100dvh - 32px);padding:0;overflow:hidden;border-radius:25px;background:var(--cream)}
#result-dialog[open]{display:flex;flex-direction:column}
#result-dialog,.result-scroll{scrollbar-width:none}
#result-dialog::-webkit-scrollbar,.result-scroll::-webkit-scrollbar{display:none;width:0;height:0}
.result-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 22px 0;flex-shrink:0}
.result-brand{display:flex;align-items:center;gap:8px;font-size:8px;font-weight:600;letter-spacing:1.1px;color:var(--muted)}
.result-brand>span{font-size:28px;line-height:1;color:var(--tomato)}
#result-dialog .dialog-close{position:static;display:grid;place-items:center;width:36px;height:36px;padding:0;border-radius:50%;font-size:27px;line-height:1;color:var(--ink);flex-shrink:0}
#result-dialog .dialog-close:hover{background:#f3e8d7}
.result-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:15px 32px 25px}
.result-eyebrow{font-size:8px;letter-spacing:1.2px;color:#987a55;margin-bottom:10px}
#result-dialog h2{font-size:36px;line-height:1.08;letter-spacing:-1.8px;margin:0 0 12px}
.result-intro{font-size:12px;line-height:1.6;color:var(--muted);max-width:350px}
.result-note{--rule:28px;position:relative;isolation:isolate;margin:29px 5px 24px;padding:28px 24px 28px 29px;border:1px solid #e4d8bd;background:linear-gradient(90deg,transparent 17px,#e9a08c66 17px,#e9a08c66 18px,transparent 18px),repeating-linear-gradient(to bottom,#fffdf5 0px,#fffdf5 calc(var(--rule) - 1px),#e8dfcd calc(var(--rule) - 1px),#e8dfcd var(--rule));box-shadow:2px 8px 18px #65502b13;transform:rotate(-.7deg);color:#514739}
.result-note:before{content:'';position:absolute;top:-12px;left:calc(50% - 47px);width:94px;height:24px;background:repeating-linear-gradient(90deg,#f4da58c9 0px,#f4da58c9 4px,#f7e37ba6 5px);transform:rotate(-4deg);clip-path:polygon(2% 0,98% 0,100% 30%,98% 50%,100% 80%,98% 100%,0 100%,2% 70%,0 45%);box-shadow:0 1px 2px #7b682514}
.result-note:after{content:'';position:absolute;left:-1px;right:-1px;bottom:-8px;height:9px;background:#fffdf5;clip-path:polygon(0 0,100% 0,100% 50%,97% 100%,94% 45%,91% 100%,88% 40%,85% 100%,82% 45%,79% 100%,76% 50%,73% 100%,70% 40%,67% 100%,64% 45%,61% 100%,58% 50%,55% 100%,52% 40%,49% 100%,46% 50%,43% 100%,40% 40%,37% 100%,34% 50%,31% 100%,28% 40%,25% 100%,22% 50%,19% 100%,16% 40%,13% 100%,10% 50%,7% 100%,4% 40%,1% 100%,0 50%)}
.note-letterhead,.note-hello,.note-opening,.note-details>div,.note-wishes>span,.note-wishes>p,.note-goodbye{position:relative;top:var(--ink-shift,0px)}
.note-letterhead{display:flex;justify-content:space-between;gap:12px;font-size:7px;line-height:var(--rule);letter-spacing:1.1px;color:#9b8b73;margin:0}
.note-hello{font:500 29px/var(--rule) var(--hand);color:#8b4d3e;margin:0;letter-spacing:-.3px}
.note-opening{font-size:11px;line-height:var(--rule);margin:0}
.note-details{margin:0}
.note-details>div{display:grid;grid-template-columns:85px minmax(0,1fr);gap:9px;align-items:baseline;min-height:var(--rule)}
.note-details dt{font:500 9px/1 var(--sans);color:#92826b}
.note-details dd{font:500 23px/var(--rule) var(--hand);margin:0;overflow-wrap:anywhere}
.note-details>div:last-child dd{font:500 12px/var(--rule) var(--sans)}
.note-wishes{margin:0}
.note-wishes>span{display:block;font:500 8px/var(--rule) var(--sans);color:#92826b}
.note-wishes p{font:400 12px/var(--rule) var(--sans);white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.note-goodbye{font:500 24px/var(--rule) var(--hand);color:#8b4d3e;margin:var(--rule) 0 0}
.note-goodbye>span{display:inline-block;margin-left:4px;transform:rotate(10deg);color:var(--tomato)}
.result-copy{display:flex;align-items:center;justify-content:center;gap:11px;width:100%;min-height:52px;padding:14px 18px;border:0;border-radius:15px;background:var(--ink);color:var(--cream);font:600 12px/1.5 var(--sans);transition:background .2s,transform .2s}
.result-copy:hover{background:#453d37;transform:translateY(-1px)}
.result-copy>svg{width:18px;height:18px;flex-shrink:0;color:var(--yellow)}
.copy-check{display:none;color:var(--yellow)}
.result-copy.is-copied .copy-check{display:inline}
.result-copy.is-copied>svg{display:none}
#copy-status.result-status{font-size:10px;line-height:1.6;color:#866c42;margin:8px 0 0}
.result-status:empty{display:none}
.result-contact-heading{margin-top:22px}
.result-contact-heading h3{font-size:15px;font-weight:700;letter-spacing:-.4px;line-height:1.3}
.result-contact-heading p{font-size:10px;line-height:1.6;color:var(--muted);margin-top:5px;max-width:330px}
.result-contacts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.result-contacts>a{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:12px;border:1px solid #e6ddce;border-radius:14px;background:#fffdf8;min-width:0;font-size:11px;font-weight:600;transition:transform .2s,border-color .2s,box-shadow .2s}
.result-contacts>a:hover{transform:translateY(-3px);border-color:#cbb99b;box-shadow:0 5px 10px #5140230a}
.contact-icon{display:grid;place-items:center;width:29px;height:29px;border-radius:9px;color:white}
.contact-icon svg{width:21px;height:21px}
.telegram-icon{background:#289ed5}
.max-icon{background:linear-gradient(145deg,#6553ed,#a845ed)}
.vk-icon{background:#0077ff;font:800 16px var(--sans);letter-spacing:-1px}
.contact-arrow{position:absolute;top:13px;right:12px;font-size:14px;font-weight:400;color:#9a8871}
.result-phone{font-size:10px;line-height:1.7;color:var(--muted);margin-top:16px}
.result-phone a{margin-left:5px;color:var(--ink);font-weight:600;white-space:nowrap}
.result-phone a:hover{text-decoration:underline;text-underline-offset:3px}
.result-demo{font-size:8px;line-height:1.6;color:#9b8e7b;margin-top:11px}
@media(max-width:480px){
  #result-dialog{width:calc(100% - 24px);max-height:calc(100dvh - 24px);border-radius:21px}
  .result-topbar{padding:10px 14px 0}
  .result-scroll{padding:12px 20px 22px}
  #result-dialog h2{font-size:30px;letter-spacing:-1.4px}
  .result-intro{font-size:11px}
  .result-note{margin:26px 2px 23px;padding:28px 17px 28px 25px}
  .note-hello{font-size:26px}
  .note-details>div{grid-template-columns:73px minmax(0,1fr);gap:6px}
  .note-details dd{font-size:22px}
  .note-details dt{font-size:8px}
  .note-letterhead{font-size:6px;letter-spacing:.8px}
  .note-goodbye{font-size:23px}
  .result-contacts>a{padding:10px;font-size:10px;gap:8px}
  .contact-arrow{right:10px;top:10px}
  .result-contact-heading{margin-top:20px}
}
.contact-kind{display:flex;gap:4px;width:fit-content;max-width:100%;margin-top:9px;padding:3px;border-radius:99px;background:#eee6d8}
.contact-kind button{border:0;border-radius:99px;padding:6px 10px;background:transparent;font:500 10px/1.3 var(--sans);color:var(--muted)}
.contact-kind button[aria-pressed=true]{background:var(--paper);color:var(--ink);box-shadow:0 1px 4px #5b472515}
.contact-kind button:focus-visible{outline:2px solid var(--tomato);outline-offset:2px}
