@font-face{font-family:Song;src:url(assets/type/display.woff) format("woff");font-display:swap}
@font-face{font-family:Read;src:url(assets/type/reading.woff) format("woff");font-display:swap}
:root{color-scheme:dark;--mist:#f3f1dc;--ink:#172e2c;--glint:#d9ca96}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:#101c1e;color:var(--mist);font:1rem/1.55 Read,"Malgun Gothic",sans-serif}
.phone{width:min(100%,402px);margin:auto;background:var(--ink);min-height:100svh}
h1,p,fieldset{margin:0}
h1{font:600 1.55rem/1.45 Song,Batang,serif;letter-spacing:-.038em;word-break:keep-all;overflow-wrap:break-word}
h1[tabindex="-1"]:focus{outline:0}
/* Approved compact translucent email step: same product artwork, one labelled field. */
#grove.silk-grove[data-step="email"]{position:relative;isolation:isolate;display:grid;align-items:center;min-height:100svh;background:#1b3027}
#grove.silk-grove[data-step="email"] .portrait{position:absolute;inset:0;width:100%;height:100%;background:#1b3027}
#grove.silk-grove[data-step="email"] .portrait img{height:100%;object-position:50% 30%;transform:none;mask-image:linear-gradient(#000 0 85%,transparent 100%)}
#grove.silk-grove[data-step="email"] .voice{margin:0;padding:clamp(210px,38svh,360px) 18px max(56px,env(safe-area-inset-bottom));background:transparent}
#grove.silk-grove[data-step="email"] .voice::before{content:none}
.email-panel{padding:20px 18px;border:1px solid #9baa8c;border-radius:10px;background:#e2e9d2e8;color:#244538;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);word-break:keep-all;overflow-wrap:break-word;color-scheme:light}
.email-panel h1{font-size:1.375rem;line-height:1.55;letter-spacing:-.03em}
.email-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;margin-top:16px}
.email-row input{display:block;box-sizing:border-box;width:100%;min-width:0;height:max(48px,calc(1.5em + 22px));padding:10px;border:1px solid #6c8972;border-radius:7px;background:#f4f5e8dc;color:#244538;font-size:1rem;line-height:1.5}
.email-row input::placeholder{color:#5b705e}
.email-row button{min-width:68px;min-height:48px;padding:10px 12px;border:1px solid #476d4c;border-radius:7px;background:#31573f;color:#fff8df;font-weight:600;line-height:1.5}
.email-panel .error{font-size:.875rem;line-height:1.5;color:#7d3027;margin:10px 0 0}
.email-panel .error:empty{display:none}
@media(max-height:530px){#grove.silk-grove[data-step="email"] .voice{padding-top:110px;padding-bottom:24px;align-self:start}}
/* End approved email step. */
button,input,select{font:inherit}
button{cursor:pointer;touch-action:manipulation}
button:active{transform:translateY(1px)}
button:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid #f7db87;outline-offset:3px}
button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.cover{position:relative;isolation:isolate;min-height:min(100svh,800px);display:flex;flex-direction:column;justify-content:space-between;gap:clamp(290px,48svh,440px);padding:26px 24px max(29px,env(safe-area-inset-bottom));background:#1a3339}
.cover img,.portrait img{display:block;width:100%;height:100%;object-fit:cover}
.cover img,.cover:after{position:absolute;inset:0;z-index:-1}
.cover img{height:calc(100% - clamp(52px,10svh,84px));object-position:68% 50%;mask-image:linear-gradient(#000 0 74%,transparent 100%)}
.cover:after{content:"";background:linear-gradient(160deg,#1428296e,transparent 32%),linear-gradient(to top,#102622f2 0%,#17302a89 13%,transparent 32%)}
.brand{color:#f2eacc;font-size:.88rem;font-weight:600;letter-spacing:.04em}
.brand{align-self:flex-start;text-shadow:0 1px 5px #081916}
.cover-foot{display:grid;gap:10px;justify-items:start}
.cover-foot h1{font-size:3.2rem;line-height:1.12;letter-spacing:-.055em}
.promise{font-size:1.0625rem;line-height:1.6;color:#f5f1dc;text-wrap:pretty;word-break:keep-all}
.cover-foot .enter{margin-top:5px}
.enter,.reply-button{color:#23352e;background:#e4d5a8;border:1px solid #e7d8ac}
.enter{border-radius:22px 5px 22px 5px;padding:10px 18px;min-height:48px;display:inline-flex;align-items:center;gap:14px;font-weight:650}
.enter span{font-size:1.35em;line-height:1}
.portrait{height:clamp(220px,calc(100svh - 151px),min(171vw,700px));position:relative;overflow:hidden;background:#344d43}
.portrait img{object-position:64% 32%}
#grove:is([data-step=birth],[data-step=time]) .portrait{height:clamp(210px,calc(100svh - 246px),min(135vw,550px))}
#grove:is([data-step=birth],[data-step=time]) .portrait img{transform:scale(1.12);transform-origin:50% 24%;object-position:50% 23%}
#grove[data-step=done] .portrait{height:clamp(184px,33svh,278px)}
#grove[data-step=done] .portrait img{object-position:center top}
.back{position:absolute;top:12px;left:12px;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#152e2bcc;color:#fff6dc;border:1px solid #cedeac60}
.voice{position:relative;padding:18px 21px max(24px,env(safe-area-inset-bottom));background:linear-gradient(118deg,#2a443b 0%,#233c35 45%,#172f2d 100%)}
.voice:before{content:"";position:absolute;inset:-11px 0 auto;height:11px;background:linear-gradient(transparent,#233c35b8);pointer-events:none}
.speech{color:#d6dfcc;margin-bottom:3px;word-break:keep-all;overflow-wrap:break-word}
.reply,.date-row{display:flex;align-items:center;gap:9px;margin-top:14px}
.reed{position:relative;flex:1;min-width:0;border:1px solid #a0b092;border-radius:5px 13px 5px 12px;background:#ceddb20a;box-shadow:inset 3px 0 #b4c3993d}
.reed:focus-within{outline:2px solid #ebdba9;outline-offset:2px}
.reed input{color:#fcf5df;width:100%;min-height:50px;padding:11px 37px 11px 15px;background:transparent;border:0;outline:0}
.reed input::placeholder{color:#c9d4c5;opacity:1}
.leaves{position:absolute;right:-4px;top:-4px;pointer-events:none;width:46px;height:23px;color:#b7c796}
.branch{fill:none;stroke:currentColor;stroke-width:1.4}.leaf{fill:#9db787;stroke:#ced1a1;stroke-width:.45}
.reply-button{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;border-radius:50%}
.error{color:#ffdcbd;font-size:.9rem;margin-top:7px}.error:empty{display:none}
.calendar-choice{display:flex;flex-wrap:wrap;border:0;padding:0;margin-top:10px;gap:6px}
.calendar-choice label{cursor:pointer;position:relative;display:inline-flex}
.calendar-choice input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.calendar-choice span{display:grid;place-items:center;min-width:62px;min-height:44px;padding:5px 10px;border:1px solid #768d7d;border-radius:6px}
.calendar-choice input:checked+span{background:#e1d4af;color:#25382f;border-color:#e6dbb8}
.calendar-choice input:checked+span:before{content:"✓";display:inline}.calendar-choice input:checked+span{display:inline-flex;gap:.25em;justify-content:center;align-items:center}
.calendar-choice input:focus-visible+span{outline:2px solid #f2d685;outline-offset:2px}
.calendar-choice .leap{align-items:center;gap:6px;margin-left:4px}
.calendar-choice .leap input{position:static;width:1.1rem;height:1.1rem;opacity:1;accent-color:#dbc998}
.calendar-choice .leap span{display:inline;min-width:0;min-height:0;padding:0;border:0;color:inherit;background:none}
.calendar-choice .leap input:checked+span:before{content:none}
.calendar-choice .leap{min-height:44px;min-width:52px}
.calendar-choice .leap input:checked+span{background:transparent;color:inherit}
.calendar-choice .leap:has(:disabled){color:#b2bdaf;cursor:default}
.date-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.date-row select{flex:1 1 3.6em}.date-row #year{flex-basis:5em}
.date-row select{max-width:100%;min-width:0;min-height:48px;color:#f1eedf;border:1px solid #869a89;background:#243e36;border-radius:6px;padding:7px 3px}
.text-button{margin-top:8px;color:#f3edcf;min-height:48px;background:none;border:0;text-decoration:underline;text-underline-offset:5px;padding:6px 0}
.text-button span{margin-left:4px}
.outline-note,.input-record{color:#d0dccc;font-size:1rem;line-height:1.55;margin:6px 0 12px;word-break:keep-all;overflow-wrap:break-word}
#ending details{border-top:1px solid #627a6b}
#ending details:last-of-type{border-bottom:1px solid #627a6b}
#ending summary{display:flex;gap:10px;align-items:center;justify-content:space-between;min-height:52px;padding:9px 0;cursor:pointer;font-weight:600;font-size:1.0625rem}
#ending summary::after{content:"";width:8px;height:8px;border-right:1.5px solid;border-bottom:1.5px solid;transform:rotate(45deg);margin:0 5px 4px;flex-shrink:0}
#ending details[open] summary::after{transform:rotate(225deg);margin-bottom:0}
#ending summary::-webkit-details-marker{display:none}
#ending summary:focus-visible{outline:2px solid #ebdba9;outline-offset:2px}
#ending details p{margin:0 0 13px;color:#e2e9db;line-height:1.7;font-size:1.0625rem}
.input-record{margin:15px 0 0}
#ending .edit-info{margin-top:8px;border:0}
#ending .edit-info summary{width:fit-content;min-height:48px;color:var(--mist);font:inherit;text-decoration:underline;text-underline-offset:4px}
.edit-fields{display:flex;flex-wrap:wrap;gap:6px}
.edit-fields button{min-height:48px;padding:6px 12px;color:var(--mist);background:#233f38;border:1px solid #769186;border-radius:6px;word-break:keep-all}
#grove[data-step=profile] .portrait{height:clamp(175px,42svh,352px)}
#grove[data-step=profile]{min-height:100svh;background:linear-gradient(118deg,#2a443b 0%,#233c35 45%,#172f2d 100%)}
#grove[data-step=profile] .voice{background:transparent}
#grove[data-step=profile] .portrait img{object-position:50% 20%}
.place-hint{color:#d8e0d2;margin:3px 0 12px;line-height:1.55}
.place-row{display:flex;flex-wrap:wrap;gap:8px}
.place-row label{flex:1 1 6.3em;min-width:0}
.place-row label,.profile-sex legend{font-weight:600;color:#efeedd}
.place-row select,.place-row input{display:block;width:100%;min-height:48px;padding:8px;margin-top:4px;border:1px solid #869a89;border-radius:6px;background:#243e36;color:#f1eedf;font:inherit;font-weight:400}
.place-row input::placeholder,.place-row option.historical{color:#c5cec1}
.profile-sex legend{padding:0 0 4px}
#profile-step .enter{margin-top:14px}
@media(max-width:350px){.voice,.cover{padding-inline:15px}.date-row{gap:4px}}
@media(prefers-reduced-motion:no-preference){#grove.showing .portrait img{animation:reveal .3s ease-out}.voice form:not([hidden]),#ending:not([hidden]){animation:reveal .2s ease-out}@keyframes reveal{from{opacity:.55}to{opacity:1}}}

@font-face{font-family:GateRead;src:url(assets/type/gate-reading.woff) format("woff");font-display:swap}
@font-face{font-family:GateSong;src:url(assets/type/gate-display.woff) format("woff");font-display:swap}
.fast-gate{font-family:GateRead,Read,"Malgun Gothic",sans-serif}
.fast-gate h1{font-family:GateSong,Song,Batang,serif}
.fast-gate .cover picture{display:contents}
.fast-gate .cover picture > source{display:none}
