:root{--bg:#fbe3d8;--bg2:#f8d3c6;--cream:#fff4ea;--cream2:#fdeadd;--rose:#c9456b;--rose2:#d6577a;--rose-d:#a93457;--ink:#5a2f3c;--muted:#7d5a64;--line:#efd3c8;--sh-d:rgba(190,120,100,.30);--sh-l:rgba(255,255,255,.9)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:var(--bg)}
body{margin:0;min-height:100vh;color:var(--ink);font-family:"DM Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-size:16px;line-height:1.45;
 background:radial-gradient(900px 500px at 50% -10%,#fff1e8 0,transparent 70%),linear-gradient(180deg,#fbe6dc,#f9d9cd 60%,#f6cfc2);background-attachment:fixed;
 padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
h1,h2,.serif{font-family:"Playfair Display","DM Serif Display",Georgia,"Times New Roman",serif;font-weight:600;color:var(--rose);letter-spacing:.2px}
main,.wrap{width:min(94vw,520px);margin:0 auto;padding:14px 0 48px}
/* hero */
.hero{position:relative;overflow:hidden;border-radius:32px;padding:22px 22px 0;min-height:230px;
 background:linear-gradient(180deg,#f7c5cf 0%,#f6cdd6 30%,#e6cfe6 62%,#fbe0d4 100%);
 box-shadow:0 18px 36px var(--sh-d),0 4px 10px rgba(190,120,100,.18),inset 0 2px 0 rgba(255,255,255,.7)}
.hero .cloud{position:absolute;background:#fff;border-radius:99px;opacity:.75;filter:blur(.3px);animation:drift 14s ease-in-out infinite alternate}
.hero .cloud::before,.hero .cloud::after{content:"";position:absolute;background:#fff;border-radius:50%}
.cloud.c1{width:70px;height:20px;top:62px;right:96px}.c1::before{width:30px;height:30px;left:10px;top:-14px}.c1::after{width:24px;height:24px;left:34px;top:-10px}
.cloud.c2{width:54px;height:16px;top:128px;left:-6px;animation-duration:18s}.c2::before{width:24px;height:24px;left:8px;top:-11px}.c2::after{width:18px;height:18px;left:26px;top:-8px}
@keyframes drift{to{transform:translateX(18px)}}
.hero h1{position:relative;z-index:2;margin:30px 0 4px;font-size:clamp(40px,12vw,56px);line-height:1;text-shadow:0 2px 0 rgba(255,255,255,.4)}
.hero h1 .heart{position:absolute;top:-22px;left:62%;font-size:20px;animation:beat 2.4s ease-in-out infinite}
.hero p{position:relative;z-index:2;margin:0;color:#4b2f55;font-size:17px;max-width:62%}
.hero svg.sky{position:absolute;right:-6px;bottom:0;width:62%;max-width:300px;z-index:1}
.hero .skyline{position:absolute;left:0;right:0;bottom:0;width:100%;height:70px;z-index:1}
@keyframes beat{0%,100%{transform:scale(1)}50%{transform:scale(1.18)}}
.hero.small{min-height:170px}
.hero-bar{position:absolute;top:14px;left:14px;right:14px;display:flex;justify-content:space-between;z-index:3}
.iconbtn{width:46px;height:46px;border-radius:50%;border:0;background:var(--cream);color:var(--rose);display:grid;place-items:center;font-size:20px;cursor:pointer;padding:0;
 box-shadow:0 6px 14px var(--sh-d),inset 0 2px 0 var(--sh-l),inset 0 -2px 0 rgba(214,160,140,.25);transition:transform .15s}
.iconbtn:active{transform:scale(.92)}
.iconbtn svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* cards */
.card{background:linear-gradient(180deg,var(--cream),var(--cream2));border-radius:30px;padding:20px;margin-top:18px;
 box-shadow:0 18px 34px var(--sh-d),0 3px 8px rgba(190,120,100,.16),inset 0 2px 0 var(--sh-l),inset 0 -3px 0 rgba(224,170,150,.22);animation:rise .5s both}
.card.overlap{margin-top:-34px;position:relative;z-index:4}
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.card h2{font-size:22px;margin:0 0 6px}
.sub,.hint{color:var(--muted);font-size:14.5px;line-height:1.5}
.hint{margin-top:10px}
.hint b{color:var(--rose-d)}
/* inputs */
textarea,input[type=password],input[type=text]{width:100%;font:inherit;font-size:16px;color:var(--ink);padding:15px 16px;border-radius:20px;border:2px solid transparent;
 background:#fdeee4;box-shadow:inset 4px 4px 9px rgba(205,140,120,.28),inset -4px -4px 9px rgba(255,255,255,.9);outline:0;transition:border-color .2s,box-shadow .2s}
textarea{resize:none;height:92px}
textarea::placeholder,input::placeholder{color:#a98089}
textarea:focus,input:focus{border-color:var(--rose2)}
/* choice cards */
.modes{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0 12px}
.modes label{display:block;cursor:pointer}
.modes input{position:absolute;opacity:0;pointer-events:none}
.modes span{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:14px 4px 12px;border-radius:22px;font-size:13.5px;font-weight:600;color:var(--ink);line-height:1.2;user-select:none;
 background:var(--cream);box-shadow:0 8px 16px var(--sh-d),inset 0 2px 0 var(--sh-l);transition:transform .18s,box-shadow .18s,background .18s,color .18s;min-height:92px;justify-content:center}
.modes span i{font-style:normal;font-size:26px;width:46px;height:46px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,#fde3d6,#f7cdd0);box-shadow:inset 0 2px 0 rgba(255,255,255,.8)}
.modes label:hover span{transform:translateY(-2px)}
.modes input:checked + span{background:linear-gradient(180deg,#fff,#ffe9e6);color:var(--rose-d);box-shadow:0 0 0 2.5px var(--rose2),0 10px 20px rgba(201,69,107,.28);transform:translateY(-2px)}
.modes input:focus-visible + span{outline:3px solid var(--rose-d);outline-offset:2px}
.row{display:flex;gap:10px;align-items:center;margin:0 0 14px;font-size:15px;color:var(--muted);font-weight:500;flex-wrap:wrap}
select{font:inherit;font-size:16px;padding:10px 36px 10px 14px;border-radius:99px;border:0;color:var(--ink);background:var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c9456b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;appearance:none;-webkit-appearance:none;
 box-shadow:0 5px 12px var(--sh-d),inset 0 2px 0 var(--sh-l)}
/* buttons */
button,.btn{font-family:inherit}
.btn,button.primary,#go,#pk-new,.login-submit{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:56px;font-size:18px;font-weight:600;padding:14px 22px;border:0;border-radius:99px;color:#fff;text-decoration:none;cursor:pointer;
 background:linear-gradient(180deg,var(--rose2),var(--rose));box-shadow:0 12px 22px rgba(201,69,107,.38),inset 0 2px 0 rgba(255,255,255,.35),inset 0 -3px 0 rgba(120,20,50,.22);transition:transform .15s,box-shadow .15s,filter .15s}
.btn:active,#go:active,#pk-new:active,.pk:active,.login-submit:active{transform:translateY(2px) scale(.99);box-shadow:0 6px 12px rgba(201,69,107,.3),inset 0 2px 0 rgba(255,255,255,.25)}
button:disabled{opacity:.6;cursor:default}
button:focus-visible,.btn:focus-visible,a:focus-visible{outline:3px solid var(--rose-d);outline-offset:3px}
#go::after,#pk-new::after{content:"→";display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--cream);color:var(--rose);font-size:18px;margin-right:-10px}
#pk-new:disabled::after,#go:disabled::after{opacity:.7}
.btn.green{margin-top:12px}
.btn.green::after{content:none}
.ghost{background:var(--cream)!important;color:var(--rose-d)!important;font-size:15px;font-weight:600;padding:10px 18px;min-height:44px;margin-top:12px;border:0;border-radius:99px;width:100%;cursor:pointer;
 box-shadow:0 6px 14px var(--sh-d),inset 0 2px 0 var(--sh-l)!important}
.pk{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:58px;font-size:18px;font-weight:600;border:0;border-radius:99px;padding:14px 22px;color:#fff;cursor:pointer;
 background:linear-gradient(180deg,#e0678a,var(--rose-d));box-shadow:0 12px 22px rgba(169,52,87,.4),inset 0 2px 0 rgba(255,255,255,.35),inset 0 -3px 0 rgba(90,10,40,.25)}
.or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:14px;margin:20px 0 16px}
.or::before,.or::after{content:"";flex:1;height:2px;border-radius:2px;background:linear-gradient(90deg,transparent,var(--line),transparent)}
.login-submit{margin-top:14px}
.logout{background:none;border:0;color:var(--rose-d);font-size:14px;font-weight:600;padding:6px 10px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
/* status */
.status{margin-top:18px;display:none;padding:14px;border-radius:22px;background:#fdeee4;box-shadow:inset 3px 3px 8px rgba(205,140,120,.25),inset -3px -3px 8px rgba(255,255,255,.9)}
.spin{width:24px;height:24px;border:3px solid #f1cfc6;border-top-color:var(--rose);border-radius:50%;animation:s .8s linear infinite;flex:none}
@keyframes s{to{transform:rotate(360deg)}}
.bar{height:12px;background:#f3d3c8;border-radius:99px;overflow:hidden;margin-top:12px;box-shadow:inset 0 2px 4px rgba(190,120,100,.3)}
.bar div{height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#e98aa5,var(--rose));transition:width .4s}
.err{background:#fde0e3;color:#8a1f3d;border-radius:20px;padding:12px 16px;margin-top:14px;display:none;font-size:15px;font-weight:500}
.err:empty{padding:0;margin:0}
.done{margin-top:16px;display:none;padding:16px;border-radius:24px;background:#fff9f3;box-shadow:inset 0 0 0 2px #f6d9cf;animation:rise .4s both}
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:14px}
.grid img{width:100%;border-radius:20px;display:block;box-shadow:0 8px 16px var(--sh-d);border:3px solid #fff}
.top{display:flex;justify-content:flex-end}
.pkrow{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 0;border-top:2px solid var(--line)}
.pkrow .n{font-weight:600;color:var(--ink);font-size:15px}.pkrow .d{font-size:13px;color:var(--muted)}
.pkrow button{width:auto;margin:0;flex:none}
.pkok{background:#e4f3e6!important;color:#1f5a2c!important}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.err.l:not(:empty){display:block}
.hero{padding-bottom:56px}
.hero svg.sky{width:auto;height:190px;max-width:50%}
.hero.small{min-height:232px}
.hero.small h1{font-size:clamp(30px,9vw,40px);margin-top:64px;max-width:72%}
.hero.small h1 .heart{left:auto;right:-24px}
.hero p{max-width:56%}
.hero.small p{font-size:15px}

/* ===== design system: 8px grid; primary 56, secondary 44, icon 44x44 ===== */
:root{--r-pill:999px;--h-lg:56px;--h-md:44px}
body{padding-bottom:calc(104px + env(safe-area-inset-bottom))}
main{padding-bottom:24px}
.card{padding:24px;margin-top:24px}
.card.overlap{margin-top:-32px}
.card h2{font-size:22px;line-height:28px;margin:0 0 8px}
.sub,.hint{font-size:15px;line-height:22px}
.hint{margin-top:16px}
.iconbtn{width:var(--h-md);height:var(--h-md);font-size:18px}
.iconbtn svg{width:20px;height:20px}
/* primary */
.btn,#go,#pk-new,.login-submit,.pk{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:var(--h-lg);min-height:var(--h-lg);padding:0 24px;margin:0;
 font-family:inherit;font-weight:600;font-size:17px;line-height:1;border:0;border-radius:var(--r-pill);color:#fff;text-decoration:none;cursor:pointer;position:relative;
 background:linear-gradient(180deg,var(--rose2),var(--rose));box-shadow:0 8px 16px rgba(201,69,107,.34),inset 0 2px 0 rgba(255,255,255,.35),inset 0 -3px 0 rgba(120,20,50,.22);
 transition:transform .15s,box-shadow .15s,filter .15s}
.pk{background:linear-gradient(180deg,#e0678a,var(--rose-d))}
.login-submit{margin-top:16px}
#go,#pk-new{margin-top:0}
#pk-new{margin-top:16px}
.btn.green{margin-top:16px}
.btn:hover,#go:hover,#pk-new:hover,.pk:hover,.login-submit:hover{filter:brightness(1.05)}
.btn:active,#go:active,#pk-new:active,.pk:active,.login-submit:active{transform:translateY(2px);box-shadow:0 3px 8px rgba(201,69,107,.3),inset 0 2px 0 rgba(255,255,255,.25)}
#go::after,#pk-new::after{content:"\2192";position:absolute;right:12px;top:50%;margin:-16px 0 0;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--cream);color:var(--rose);font-size:17px;line-height:1}
#go:disabled::after,#pk-new:disabled::after{content:"";background:transparent;border:3px solid rgba(255,255,255,.45);border-top-color:#fff;animation:s .8s linear infinite;opacity:1}
button:disabled,.btn[aria-disabled=true]{opacity:.7;cursor:progress;transform:none}
/* secondary */
.ghost,.pkrow button{display:inline-flex;align-items:center;justify-content:center;height:var(--h-md);min-height:var(--h-md);padding:0 24px;margin:0;width:auto;font-family:inherit;font-weight:600;font-size:15px;line-height:1;border:0;border-radius:var(--r-pill);cursor:pointer;
 background:var(--cream)!important;color:var(--rose-d)!important;box-shadow:0 4px 12px var(--sh-d),inset 0 2px 0 var(--sh-l)!important;transition:transform .15s,filter .15s}
.done>.ghost{display:flex;width:100%;margin-top:16px}
.ghost:hover{filter:brightness(.97)}
.ghost:active{transform:translateY(1px)}
.pkrow{min-height:64px;padding:12px 0;gap:16px}
.pkrow:first-child{border-top:0}
#pk-list{margin:0 0 8px}
#pk-list:not(:empty){font-size:15px}
/* option cards: equal widths/heights, aligned */
.modes{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:16px 0}
.modes span{height:104px;min-height:104px;padding:8px 4px;gap:8px;border-radius:24px;font-size:13px;font-weight:600;line-height:16px;justify-content:center}
.modes span i{width:44px;height:44px;border-radius:16px;font-size:24px;flex:none}
.row{margin:0 0 16px;min-height:var(--h-md)}
select{height:var(--h-md);padding:0 40px 0 16px;font-size:15px;font-weight:500}
textarea{height:96px}
.status{margin:16px 0 0}
.done{margin-top:16px}
.err{margin:16px 0 0}
.or{margin:24px 0}
/* tab bar */
.tabbar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(16px + env(safe-area-inset-bottom));z-index:50;display:flex;gap:8px;padding:8px;border-radius:var(--r-pill);
 background:linear-gradient(180deg,var(--rose2),var(--rose-d));box-shadow:0 16px 32px rgba(169,52,87,.4),inset 0 2px 0 rgba(255,255,255,.25)}
.tabbar a{display:flex;align-items:center;justify-content:center;gap:8px;height:var(--h-lg);min-width:128px;padding:0 24px;border-radius:var(--r-pill);color:#fff;text-decoration:none;font-family:inherit;font-weight:600;font-size:15px;line-height:1;transition:background .2s,color .2s,box-shadow .2s}
.tabbar a svg{width:22px;height:22px;flex:none}
.tabbar a.on{background:linear-gradient(180deg,#fff,var(--cream));color:var(--rose);box-shadow:0 6px 14px rgba(90,10,40,.3),inset 0 -2px 0 rgba(224,170,150,.4)}
.tabbar a:not(.on):hover{background:rgba(255,255,255,.14)}
.tabbar a:focus-visible{outline:3px solid #fff;outline-offset:2px}
[hidden]{display:none!important}
.tabbar a svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hero p{margin-top:8px}
.modes span{justify-content:flex-start;padding:12px 4px 8px}
