@font-face{font-family:Satoshi;src:url('/assets/satoshi.woff2') format('woff2');font-weight:300 900;font-display:swap}
:root{color-scheme:light;--paper:#f6f5ef;--ink:#202c25;--muted:#67716a;--green:#263e30}
*{box-sizing:border-box}
html,body{margin:0;min-width:280px}
body{height:100svh;display:flex;flex-direction:column;background:var(--paper);color:var(--ink);font-family:Satoshi,sans-serif;-webkit-font-smoothing:antialiased}
a,button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none;cursor:pointer}
button{font:inherit;cursor:pointer}
a:focus-visible,button:focus-visible{outline:3px solid #8a664b;outline-offset:6px}
.color-field{position:fixed;inset:0 auto 0 0;width:35%;z-index:-1;background:linear-gradient(155deg,#d1ddcb,#dfe5d8);border-bottom-right-radius:clamp(44px,7vw,108px)}
.site-header{height:100px;flex:0 0 100px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(28px,5.7vw,100px)}
.author{display:inline-flex;align-items:center;gap:11px;font-size:20px;font-weight:700;letter-spacing:-.55px}
.author img{border-radius:50%;display:block}
.profile-link{font-size:15px;font-weight:500;display:inline-flex;gap:9px;align-items:center;color:var(--muted)}
.profile-link:hover{color:var(--ink)}
.profile-link span{font-size:19px}
.hero{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:clamp(32px,5vw,84px);width:min(1220px,88vw);margin:0 auto;padding:0 0 70px}
.book-stage{display:grid;place-items:center;min-width:0;perspective:1800px}
.book{height:min(66svh,650px,60vw);aspect-ratio:5/8;position:relative;transform:rotateY(-13deg) rotateZ(-2.5deg);transform-style:preserve-3d;filter:drop-shadow(15px 26px 17px rgba(29,42,29,.14));transition:transform .45s ease}
.book-front{position:relative;z-index:2;width:100%;height:100%;overflow:hidden;border-radius:3px 6px 6px 3px;background:white;box-shadow:inset 0 0 0 1px #ddd}
.cover{display:block;width:100%;height:100%;object-fit:cover}
.book-front:after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:linear-gradient(90deg,rgba(0,0,0,.17) 0,rgba(255,255,255,.2) 1.5%,rgba(0,0,0,.035) 3.2%,transparent 5%,transparent 97%,rgba(0,0,0,.04) 100%);box-shadow:inset -1px 0 1px rgba(0,0,0,.1),inset 1px 0 1px rgba(255,255,255,.65)}
.page-edge{position:absolute;z-index:1;top:6px;bottom:5px;left:calc(100% - 2px);width:15px;border-radius:0 3px 3px 0;transform:skewY(-8deg);transform-origin:left center;background:repeating-linear-gradient(90deg,#d6d4cb 0,#efeee7 1px,#f8f7ef 2px,#e7e5dc 3px);box-shadow:inset -2px 0 2px #cecdc3}
.book-copy{padding-bottom:8px}
.book-story{max-width:500px;margin:0 0 28px;font-size:clamp(17px,1.55vw,20px);line-height:1.55;letter-spacing:-.015em;color:var(--muted)}
.book-story p{margin:0 0 .85em}
.book-story p:last-child{margin-bottom:0}
.book-story strong{font-weight:650;color:var(--ink)}
.book-story a{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.18em}
.book-story .story-ending{color:var(--green)}
.download-area{position:relative;display:flex;flex-direction:column;align-items:flex-start}
.download-button{display:inline-flex;align-items:center;justify-content:center;gap:18px;min-width:250px;min-height:60px;padding:17px 23px;background:var(--green);color:#fff;border-radius:7px;font-size:17px;font-weight:650;line-height:1.4;box-shadow:0 2px 3px rgba(27,43,30,.1);transition:background .18s ease,transform .18s ease,box-shadow .18s ease}
.download-button:hover{background:#172c1f;transform:translateY(-2px);box-shadow:0 5px 12px rgba(27,43,30,.12)}
.download-button:active{transform:translateY(0)}
.download-button[aria-disabled=true]{cursor:wait;transform:none;opacity:.78}
.format{font-size:13px;letter-spacing:.025em;color:var(--muted);margin:13px 0 0}
.download-status{font-size:13px;line-height:1.5;color:#904536;max-width:310px;margin:12px 0 0}
.download-status:empty{display:none}
dialog{width:min(440px,calc(100vw - 40px));border:0;border-radius:16px;padding:44px 38px 36px;color:var(--ink);background:var(--paper);box-shadow:0 30px 100px #101e2440;max-height:calc(100svh - 36px)}
dialog::backdrop{background:rgba(24,38,29,.38);backdrop-filter:blur(5px)}
.close-button{position:absolute;right:16px;top:16px;border:0;background:transparent;color:var(--muted);padding:9px;display:grid;place-items:center;border-radius:50%}
.close-button:hover{background:#e6e9df;color:var(--ink)}
.thanks-avatar{display:block;border-radius:50%;margin-bottom:24px}
h2{font-size:31px;font-weight:650;line-height:1.12;letter-spacing:-1.1px;margin:0 0 16px}
#thanks-message{font-size:17px;line-height:1.5;color:var(--muted);max-width:300px;margin:0}
.signature{margin:22px 0 0;font-size:16px;font-weight:650}
@keyframes book-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@media(prefers-reduced-motion:no-preference){.book-stage{animation:book-float 6s ease-in-out infinite}}
@media(hover:hover) and (prefers-reduced-motion:no-preference){.book-stage:hover .book{transform:rotateY(-8deg) rotateZ(-1deg)}}
@media(max-width:760px) and (orientation:portrait){
  body{height:auto;min-height:100svh}
  .color-field{position:absolute;width:100%;height:calc(96px + min(82vw,380px));bottom:auto;border-radius:0 0 65px 0}
  .site-header{height:72px;flex-basis:72px;padding:0 24px}
  .author{font-size:17px;gap:9px}.author img{width:30px;height:30px}.profile-link{font-size:13px;gap:5px}
  .hero{flex:0 0 auto;width:100%;display:flex;flex-direction:column;justify-content:flex-start;gap:42px;padding:24px 24px 48px}
  .book-stage{flex:none}
  .book{height:min(112vw,520px);transform:rotateY(-12deg) rotateZ(-2deg)}
  .page-edge{width:11px}
  .book-copy{width:100%;max-width:440px;padding:0;text-align:left}
  .book-story{font-size:16px;line-height:1.5;margin-bottom:22px;letter-spacing:-.01em}
  .book-story p{margin-bottom:.65em}
  .download-area{align-items:center}
  .download-button{font-size:16px;min-width:242px;min-height:54px;padding:14px 21px}
  .format{margin-top:9px;font-size:12px}
  .download-status{margin-top:6px;font-size:12px;max-width:270px}
}
@media(orientation:landscape) and (max-height:650px){
  .site-header{height:66px;flex-basis:66px;padding:0 34px}.hero{padding-bottom:26px;gap:35px;width:86vw}
  .book{height:calc(100svh - 126px)}.book-story{font-size:clamp(13px,1.55vw,17px);line-height:1.4;margin-bottom:17px}.book-story p{margin-bottom:.6em}
  .download-button{min-width:210px;min-height:50px;font-size:15px;padding:13px 17px}.format{margin-top:9px}
}
@media(max-width:950px) and (orientation:landscape) and (max-height:500px){
  body{height:auto;min-height:100svh}
  .hero{flex:0 0 auto;padding:24px 0 40px}
  .book{height:min(54vw,480px)}
  .book-story{font-size:16px;line-height:1.5}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}dialog::backdrop{backdrop-filter:none}}
