@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap');
:root{--ink:#38252b;--muted:#8d777d;--pink:#e85d75;--rose:#f8dce2;--line:#f0e4e7;--paper:#fffafb;--shadow:0 18px 60px rgba(110,45,65,.09)}
*{box-sizing:border-box}body{margin:0;color:var(--ink);font-family:'DM Sans',sans-serif;background:var(--paper)}button,input,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 max(5vw,24px);border-bottom:1px solid #f4e8eb;background:#ffffffb8}.brand{text-decoration:none;color:var(--ink);font-weight:700;font-size:21px;display:flex;gap:10px;align-items:center}.brand-mark{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;color:white;background:var(--pink);font-size:24px}.text-link{color:var(--pink);text-decoration:none;font-weight:600}.hero{min-height:calc(100vh - 76px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:70px 22px;position:relative;overflow:hidden}.hero:before,.hero:after{content:"";position:absolute;width:360px;height:360px;border-radius:50%;background:#fce9ed;filter:blur(1px);z-index:-1}.hero:before{left:-220px;top:12%}.hero:after{right:-220px;bottom:5%}.hero-flower{font-size:44px;color:#e8a0ad;margin-bottom:12px}.eyebrow{font-size:10px;letter-spacing:3px;font-weight:700;color:var(--pink);margin:0 0 15px}.hero h1,.login-card h1,.dashboard-head h1,.story h1{font:600 clamp(42px,7vw,76px)/1.08 'Playfair Display',serif;margin:0}.hero h1 em{color:var(--pink);font-weight:500}.lead{max-width:590px;line-height:1.8;color:var(--muted);margin:22px auto}.lookup{width:min(650px,100%);margin-top:24px;text-align:left;background:white;border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:var(--shadow)}label{display:block;font-size:13px;font-weight:600;margin:0 0 9px}.lookup-row{display:flex;align-items:center;gap:8px;background:#fff8fa;border:1px solid var(--line);border-radius:12px;padding:7px 8px 7px 13px}.lookup-row span{font-size:13px;color:var(--muted);white-space:nowrap}.lookup-row input{min-width:0;flex:1;border:0;background:transparent;outline:0;padding:10px 0}.primary{border:0;border-radius:10px;padding:12px 18px;background:var(--pink);color:white;font-weight:700;box-shadow:0 7px 18px #e85d7530}.primary:hover{background:#d94d68}.full{width:100%}.hero-foot{margin-top:48px;color:var(--muted);font-size:12px}.hero-foot span{color:var(--pink)}.admin-shell{background:#fff8fa;min-height:100vh}.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:30px}.login-brand{margin-bottom:25px}.login-card{width:min(440px,100%);background:white;border:1px solid var(--line);border-radius:22px;padding:36px;box-shadow:var(--shadow)}.mini-heart{width:44px;height:44px;border-radius:50%;background:#fff0f3;color:var(--pink);display:grid;place-items:center;font-size:22px;margin-bottom:22px}.login-card h1{font-size:38px}.muted{color:var(--muted);line-height:1.6}.login-card form{margin-top:24px}.login-card input,.modal input:not([type=checkbox]),.modal textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:12px 13px;margin-bottom:17px;background:#fffdfd;outline-color:#f2a4b2}.login-card .primary{margin-top:8px}.tiny{font-size:11px}.error{color:#c43f59;font-size:12px;min-height:16px}.dashboard{min-height:100vh;display:grid;grid-template-columns:245px 1fr}.sidebar{background:white;border-right:1px solid var(--line);padding:28px 18px;display:flex;flex-direction:column;min-height:100vh}.side-label{font-size:10px;letter-spacing:2px;color:#b39da3;font-weight:700;margin:48px 12px 14px}.side-link{padding:13px 14px;border-radius:10px;color:#8d777d;text-decoration:none;display:flex;gap:13px;margin-bottom:5px}.side-link.active{background:#fff0f3;color:var(--pink);font-weight:700}.sidebar-bottom{margin-top:auto}.ghost{border:1px solid var(--line);background:white;border-radius:10px;padding:11px 16px;color:var(--ink);font-weight:600}.sidebar-bottom .ghost{margin-top:15px}.main-content{padding:44px clamp(22px,5vw,70px);max-width:1500px;width:100%;margin:auto}.dashboard-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.dashboard-head h1{font-size:42px}.dashboard-head .muted{margin:8px 0}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:34px 0}.stat-card,.panel{background:white;border:1px solid var(--line);border-radius:16px;padding:22px}.stat-card span,.stat-card small{display:block;color:var(--muted);font-size:12px}.stat-card strong{display:block;font:600 34px 'Playfair Display',serif;margin:8px 0}.panel{padding:25px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.panel h2{font:600 24px 'Playfair Display',serif;margin:0}.panel-head p{font-size:12px;margin:6px 0}.search{border:1px solid var(--line);border-radius:9px;padding:10px 12px;max-width:230px}.couple-row{display:flex;align-items:center;gap:14px;padding:16px 0;border-top:1px solid #f5ecee}.avatar{width:42px;height:42px;border-radius:50%;background:#fff0f3;color:var(--pink);display:grid;place-items:center;font-size:22px}.couple-info{flex:1;min-width:0}.couple-info strong,.couple-info small{display:block}.couple-info strong span{color:var(--pink)}.couple-info small{color:var(--muted);margin-top:5px}.status{font-size:11px;border-radius:20px;padding:6px 10px}.status.live{background:#eaf8f0;color:#31835a}.status.draft{background:#f4f0f1;color:#8d777d}.row-actions{display:flex;gap:7px}.small-btn{border:1px solid var(--line);border-radius:8px;padding:7px 10px;background:white;color:var(--ink);font-size:12px;text-decoration:none}.empty{padding:35px 12px;text-align:center;color:var(--muted);font-size:13px}.message{color:#31835a;font-size:13px}.modal{border:0;border-radius:20px;width:min(560px,calc(100% - 28px));padding:0;box-shadow:0 24px 90px #3b182333}.modal::backdrop{background:#321d25a8;backdrop-filter:blur(3px)}.modal form{padding:28px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.modal-head h2{font:600 27px 'Playfair Display',serif;margin:0}.close{border:0;background:#fff0f3;color:var(--pink);border-radius:50%;width:34px;height:34px;font-size:23px}.modal input:not([type=checkbox]),.modal textarea{margin-bottom:13px}.slug-field{display:flex;align-items:center;border:1px solid var(--line);border-radius:10px;padding-left:13px;margin-bottom:5px;color:var(--muted)}.slug-field input{border:0!important;margin:0!important}.check-row{display:flex;align-items:center;gap:10px;margin:12px 0}.check-row input{accent-color:var(--pink)}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:15px}.story-shell{background:radial-gradient(circle at 50% 25%,#fff 0,#fff6f8 55%,#fbe8ed 100%);min-height:100vh}.story{min-height:calc(100vh - 76px);display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:45px 20px}.story-heart{font-size:54px;color:var(--pink);margin:12px}.story h1{font-size:clamp(42px,8vw,72px)}.story-note{margin:34px 0;padding:22px 28px;border:1px solid #f0dce1;background:#ffffffa8;border-radius:14px;color:#98747e;font:italic 18px 'Playfair Display',serif}.story .text-link{margin-top:10px}@media(max-width:800px){.dashboard{grid-template-columns:1fr}.sidebar{min-height:auto;padding:15px 20px;display:grid;grid-template-columns:1fr auto;align-items:center}.side-label,.side-link{display:none}.sidebar-bottom{margin:0;display:flex;align-items:center;gap:10px}.sidebar-bottom .ghost{margin:0}.main-content{padding:28px 18px}.dashboard-head{align-items:flex-start;flex-direction:column}.stats{gap:8px}.stat-card{padding:14px}.stat-card strong{font-size:28px}.panel{padding:17px}.panel-head{align-items:flex-start;flex-direction:column}.search{max-width:none;width:100%}.couple-row{flex-wrap:wrap}.couple-info{min-width:calc(100% - 70px)}.status{margin-left:56px}.row-actions{margin-left:auto}.lookup-row{flex-wrap:wrap}.lookup-row input{min-width:100px}.lookup-row button{width:100%}}

/* Foto cover dan galeri pasangan */
.media-modal{max-height:90vh;overflow:auto}.media-section{border-top:1px solid var(--line);padding:18px 0}.media-section h3{font:600 20px 'Playfair Display',serif;margin:0 0 5px}.media-section .muted{font-size:12px;margin:4px 0 14px}.media-section input[type=file]{display:block;width:100%;margin:8px 0 13px;font-size:12px}.cover-preview{height:170px;border:1px dashed #e9cbd2;border-radius:13px;background:#fff8fa;display:grid;place-items:center;overflow:hidden;color:var(--muted);font-size:12px;margin:12px 0}.cover-preview img{width:100%;height:100%;object-fit:cover}.gallery-admin-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(115px,1fr));gap:10px;margin-top:16px}.gallery-admin-item{position:relative}.gallery-admin-item img{width:100%;height:110px;object-fit:cover;border-radius:10px;border:1px solid var(--line)}.danger-btn{color:#c43f59}.story-cover{width:min(900px,100%);height:clamp(220px,45vw,480px);border-radius:22px;overflow:hidden;margin:0 auto 36px;box-shadow:var(--shadow)}.story-cover img{width:100%;height:100%;object-fit:cover}.gallery-section{width:min(1000px,100%);margin:55px auto 10px}.gallery-section h2{font:600 32px 'Playfair Display',serif;margin:0 0 22px}.story-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}.story-gallery figure{margin:0;background:white;padding:8px;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.story-gallery img{width:100%;height:220px;object-fit:cover;border-radius:9px;display:block}.story-gallery figcaption{font-size:12px;color:var(--muted);padding:9px 4px 3px}

/* CintaKita: cover lebih kecil dan foto tidak dipotong */
.story-cover{width:min(680px,92%);height:clamp(170px,30vw,320px);border-radius:18px;overflow:hidden;margin:0 auto 30px;box-shadow:var(--shadow);background:#fff}
.story-cover img{width:100%;height:100%;object-fit:contain;display:block}
/* Galeri kenangan slideshow otomatis */
.gallery-section{width:min(820px,100%);margin:48px auto 10px}
.gallery-section h2{font:600 32px 'Playfair Display',serif;margin:0 0 22px}
.gallery-slider{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:12px}
.story-gallery{position:relative;min-width:0;height:clamp(240px,48vw,430px);background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden;display:flex;align-items:center;justify-content:center}
.gallery-slide{display:none;width:100%;height:100%;margin:0;padding:12px;flex-direction:column;align-items:center;justify-content:center}
.gallery-slide.active{display:flex;animation:galleryFade .45s ease}
.gallery-slide img{width:100%;height:100%;min-height:0;object-fit:contain;border-radius:9px;display:block}
.gallery-slide figcaption{flex:0 0 auto;font-size:13px;color:var(--muted);padding:10px 4px 2px}
.gallery-arrow{width:42px;height:42px;border:1px solid var(--line);border-radius:50%;background:white;color:var(--pink);font-size:30px;line-height:1;box-shadow:var(--shadow)}
.gallery-arrow:hover{background:#fff0f3}
.gallery-dots{display:flex;justify-content:center;gap:8px;margin:16px 0 7px}
.gallery-dot{width:8px;height:8px;padding:0;border:0;border-radius:50%;background:#e8cbd2}
.gallery-dot.active{width:22px;border-radius:10px;background:var(--pink)}
.gallery-counter{font-size:12px;color:var(--muted);margin:0}
@keyframes galleryFade{from{opacity:.35}to{opacity:1}}
@media(max-width:600px){.story-cover{width:94%;height:clamp(150px,52vw,260px);margin-bottom:25px}.gallery-slider{grid-template-columns:32px minmax(0,1fr) 32px;gap:5px}.gallery-arrow{width:32px;height:32px;font-size:24px}.story-gallery{height:clamp(230px,70vw,360px)}.gallery-slide{padding:8px}}

/* Pemutar musik pada halaman cerita */
.music-player{width:min(560px,100%);margin:38px auto 20px;padding:22px;background:rgba(255,255,255,.82);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
.music-player h2{font:600 25px 'Playfair Display',serif;margin:0 0 14px}
.music-player audio{display:none}
.music-player .tiny{margin:10px 0 0}

/* Surat rahasia dan kejutan */
.surprises-section,.secret-section{width:min(760px,100%);margin:48px auto 20px;padding:28px;background:#ffffffc9;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow)}
.surprises-section h2,.secret-section h2{font:600 30px 'Playfair Display',serif;margin:0 0 16px}
.surprise-buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.surprise-button{border:1px solid #efcbd3;border-radius:999px;background:#fff4f6;color:#b94d66;padding:12px 18px;font-weight:700}
.surprise-button:hover{background:#ffe8ed}
.surprise-message{margin:20px auto 0;padding:20px;background:#fff8fa;border:1px dashed #e8a0ad;border-radius:14px;white-space:pre-wrap;line-height:1.8;color:#805d67}
#secret-form{display:flex;gap:10px;max-width:520px;margin:20px auto;align-items:center}
#secret-form input{flex:1;min-width:0;border:1px solid var(--line);border-radius:10px;padding:12px 14px}
.secret-letter{margin:20px auto 0;padding:26px;text-align:left;background:#fff9f0;border:1px solid #f1dfc7;border-radius:15px;white-space:pre-wrap;line-height:1.9;color:#735d50}
.secret-letter h3{font:600 24px 'Playfair Display',serif;margin:0 0 12px;color:#9a6571}
.secret-letter p{margin:0}
.surprise-admin-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff;margin-top:8px}
.surprise-admin-item p{margin:4px 0 0;white-space:pre-wrap}
@media(max-width:600px){#secret-form{flex-direction:column;align-items:stretch}.surprises-section,.secret-section{padding:20px}}


/* CintaKita romantic visual refresh */
.story-shell{position:relative;isolation:isolate;overflow-x:hidden;background:
 radial-gradient(ellipse at 15% 12%,rgba(255,218,228,.72),transparent 34%),
 radial-gradient(ellipse at 88% 34%,rgba(255,231,211,.58),transparent 30%),
 linear-gradient(145deg,#fffafd 0%,#fff4f7 48%,#fffaf5 100%)}
.story-shell:before,.story-shell:after{content:"";position:fixed;z-index:-1;pointer-events:none;border-radius:50%;filter:blur(2px)}
.story-shell:before{width:380px;height:380px;left:-230px;top:25%;background:radial-gradient(circle,#f8cbd6a8,transparent 68%)}
.story-shell:after{width:430px;height:430px;right:-260px;top:60%;background:radial-gradient(circle,#f6dfd0a0,transparent 70%)}
.romance-effects{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.float-heart{position:absolute;bottom:-12vh;color:#e88ca0;opacity:0;filter:drop-shadow(0 5px 9px #d76a8225);animation:floatRomanceIntro 5.8s ease-out both;font-size:20px}
.heart-a{left:7%;animation-delay:0s;font-size:21px}.heart-b{left:19%;animation-delay:.25s;font-size:28px}
.heart-c{left:34%;animation-delay:.55s;font-size:18px;color:#d9a77b}.heart-d{left:52%;animation-delay:.8s;font-size:24px}
.heart-e{left:68%;animation-delay:1.05s;font-size:23px;color:#d9a77b}.heart-f{left:81%;animation-delay:1.3s;font-size:29px}
.heart-g{left:92%;animation-delay:1.55s;font-size:19px;color:#d9a77b}.heart-h{left:43%;animation-delay:1.8s;font-size:17px}
@keyframes floatRomanceIntro{0%{transform:translate3d(0,0,0) rotate(-15deg) scale(.65);opacity:0}14%{opacity:.55}70%{opacity:.4}100%{transform:translate3d(42px,-118vh,0) rotate(38deg) scale(1.2);opacity:0}}
.story{position:relative;z-index:1;max-width:1120px;margin:0 auto;padding:clamp(38px,7vw,82px) 22px 70px;animation:storyArrive .9s cubic-bezier(.2,.7,.2,1) both}
@keyframes storyArrive{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
.story .eyebrow{letter-spacing:4px;font-size:10px}
.story-kicker{display:flex;align-items:center;gap:13px;color:#c47b8b;font-size:10px;font-weight:700;letter-spacing:4px;margin:2px 0 15px}
.story-kicker span{width:30px;height:1px;background:linear-gradient(90deg,transparent,#d99aaa)}
.story-kicker span:last-child{transform:rotate(180deg)}
.story-heart{width:68px;height:68px;margin:10px auto 20px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#fff,#ffe9ef);box-shadow:0 9px 30px #c75a7625,inset 0 0 0 1px #f4d6de;animation:heartBeat 2.8s ease-in-out infinite}
.story-heart span{font-size:31px;text-shadow:0 5px 12px #e85d7545}
@keyframes heartBeat{0%,100%{transform:scale(1)}8%{transform:scale(1.09)}16%{transform:scale(1)}24%{transform:scale(1.05)}32%{transform:scale(1)}}
.story h1{font-size:clamp(44px,8vw,82px);letter-spacing:-1.8px;text-shadow:0 8px 30px #b75b6b12}
#story-intro{max-width:650px;font:italic clamp(16px,2vw,20px)/1.85 'Playfair Display',serif;color:#90727b;margin:20px auto 12px}
.story-date{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;border:1px solid #f1dce2;border-radius:999px;background:#ffffffa8;color:#a77b85;font-size:12px;margin:8px 0 0}
.story-date:not(:empty):before{content:"♡";color:#d77e91;font-size:15px}
.hero-divider{display:flex;align-items:center;justify-content:center;gap:13px;margin:28px auto 8px;color:#d99aaa;font-size:12px}
.hero-divider i{display:block;width:75px;height:1px;background:linear-gradient(90deg,transparent,#e8bdc8,transparent)}
.story-cover{position:relative;width:min(650px,92%);height:clamp(190px,34vw,360px);padding:9px;border:1px solid #f2dce2;border-radius:24px;background:linear-gradient(145deg,#fff,#fff1f5);box-shadow:0 24px 70px #9d53651c,0 4px 14px #9d536510;margin:0 auto 34px}
.story-cover:after{content:"";position:absolute;inset:5px;border:1px solid #ffffffb8;border-radius:19px;pointer-events:none}
.story-cover img{border-radius:16px}
.gallery-section,.music-player,.surprises-section,.secret-section{position:relative;overflow:hidden;background:rgba(255,255,255,.76);backdrop-filter:blur(14px);border:1px solid #f0dce2;border-radius:25px;box-shadow:0 20px 65px rgba(124,65,82,.08),inset 0 1px #fff;margin:42px auto;padding:clamp(22px,4vw,38px)}
.gallery-section:before,.music-player:before,.surprises-section:before,.secret-section:before{content:"";position:absolute;width:150px;height:150px;right:-78px;top:-84px;border-radius:50%;background:radial-gradient(circle,#ffe4eb,transparent 70%);pointer-events:none}
.gallery-section h2,.music-player h2,.surprises-section h2,.secret-section h2{font:600 clamp(27px,4vw,36px) 'Playfair Display',serif;color:#563943;margin:0 0 20px}
.gallery-section h2:after,.surprises-section h2:after,.secret-section h2:after{content:"";display:block;width:42px;height:2px;margin:12px auto 0;border-radius:4px;background:linear-gradient(90deg,#e88da0,#f5c6cf)}
.gallery-slider{gap:15px}
.story-gallery{height:clamp(250px,48vw,470px);border-radius:19px;border-color:#f1e1e5;background:linear-gradient(135deg,#fff,#fff8fa);box-shadow:0 12px 35px #7f45520d}
.gallery-slide{padding:16px}
.gallery-slide img{border-radius:13px}
.gallery-arrow{width:44px;height:44px;border:0;background:#fff0f4;box-shadow:0 7px 18px #bd64751b;transition:transform .25s,background .25s}
.gallery-arrow:hover{transform:scale(1.08);background:#ffe1e8}
.gallery-dot{transition:all .3s}
.music-player{max-width:600px}
.music-player .eyebrow{margin-bottom:9px}
.surprise-button{position:relative;overflow:hidden;border:1px solid #edc5d0;background:linear-gradient(135deg,#fff8fa,#ffeaf0);box-shadow:0 7px 18px #b85e7512;transition:transform .25s,box-shadow .25s}
.surprise-button:before{content:"✧";margin-right:8px;color:#d77f92}
.surprise-button:hover{transform:translateY(-3px);box-shadow:0 12px 24px #b85e7525;background:linear-gradient(135deg,#fff,#ffe4eb)}
.surprise-message{position:relative;border:1px solid #f1d5dc;background:linear-gradient(135deg,#fffafb,#fff2f5);box-shadow:0 10px 28px #b85e7510;animation:letterPop .55s cubic-bezier(.2,.8,.2,1) both}
.surprise-message:before{content:"♥";display:block;color:#df8a9c;font-size:20px;margin-bottom:8px}
#secret-form input{background:#fffafb;border-color:#efdce1;padding:14px 16px;box-shadow:inset 0 2px 5px #8d46500a}
#secret-form input:focus{outline:2px solid #f5c1cd;outline-offset:2px}
#secret-form .primary{border-radius:999px;padding:14px 22px;background:linear-gradient(135deg,#e8758c,#cb526e);box-shadow:0 9px 22px #d45c762c;transition:transform .2s,box-shadow .2s}
#secret-form .primary:hover{transform:translateY(-2px);box-shadow:0 13px 26px #d45c7640}
.secret-letter{position:relative;max-width:620px;padding:clamp(23px,4vw,38px);border:1px solid #efd9c9;border-radius:8px 22px 22px 22px;background:linear-gradient(135deg,#fffdf7,#fff6ec);box-shadow:0 16px 38px #8b665018;animation:letterPop .7s cubic-bezier(.2,.8,.2,1) both}
.secret-letter:before{content:"DENGAN SEPENUH HATI";display:block;text-align:center;letter-spacing:3px;font-size:9px;font-weight:700;color:#c18c83;margin-bottom:18px}
.secret-letter:after{content:"♥";display:block;text-align:center;color:#d98696;font-size:20px;margin-top:22px}
.secret-letter h3{text-align:center;font-size:27px;color:#986171}
.secret-letter p{font:16px/2 'Playfair Display',serif;color:#735d50}
@keyframes letterPop{from{opacity:0;transform:translateY(16px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
.story-note{max-width:680px;margin:52px auto 24px;padding:24px 30px;border:1px solid #f0dce2;border-radius:18px;background:#ffffffa6;box-shadow:0 12px 35px #a75b6b0c;font:italic 19px/1.7 'Playfair Display',serif;color:#99727d}
.story>.text-link{display:inline-flex;align-items:center;gap:8px;padding:12px 19px;border-radius:999px;background:#fff0f4;border:1px solid #f1d7de;transition:transform .2s}
.story>.text-link:hover{transform:translateY(-2px)}
.topbar{position:relative;z-index:2;background:#ffffffa8;backdrop-filter:blur(14px);border-bottom-color:#f3e2e7}
@media(max-width:600px){
 .story{padding:34px 15px 55px}
 .story h1{letter-spacing:-.8px}
 .story-cover{height:clamp(160px,55vw,260px);padding:7px;border-radius:19px}
 .gallery-section,.music-player,.surprises-section,.secret-section{border-radius:19px;margin:30px auto;padding:21px 15px}
 .gallery-slider{grid-template-columns:30px minmax(0,1fr) 30px;gap:5px}
 .gallery-arrow{width:30px;height:30px;font-size:23px}
 .story-gallery{height:clamp(225px,68vw,350px)}
 #secret-form{gap:9px}
 .story-note{margin:36px auto 20px;padding:20px 17px;font-size:17px}
}
@media(prefers-reduced-motion:reduce){
 .romance-effects{display:none}
 .story,.story-heart,.float-heart,.gallery-slide.active,.surprise-message,.secret-letter{animation:none!important}
 *,*:before,*:after{scroll-behavior:auto!important;transition:none!important}
}


/* CintaKita one-screen layout: ringkas, tanpa panel Lagu Kenangan */
html,body.story-shell{height:100%;min-height:100%;overflow:hidden}
body.story-shell{height:100svh;min-height:100svh}
.topbar{height:54px;padding:0 clamp(14px,3vw,34px)}
.topbar .brand{font-size:18px}
.topbar .brand-mark{width:30px;height:30px;font-size:20px}
.story{height:calc(100svh - 54px);min-height:0;width:min(1440px,100%);max-width:1440px;margin:0 auto;padding:clamp(10px,1.6vh,20px) clamp(12px,2vw,28px);display:grid;grid-template-columns:minmax(280px,.82fr) minmax(0,1.18fr);grid-template-rows:minmax(0,1fr);align-items:stretch;gap:clamp(10px,1.5vw,22px);overflow:hidden}
.story-hero{min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:clamp(10px,2vw,26px);border:1px solid #f1dce2;border-radius:26px;background:rgba(255,255,255,.55);backdrop-filter:blur(12px);box-shadow:0 18px 55px rgba(124,65,82,.07)}
.story-kicker{margin:0 0 clamp(5px,1vh,12px);font-size:9px;letter-spacing:3px}
.story-heart{width:clamp(42px,5vw,60px);height:clamp(42px,5vw,60px);margin:4px auto 10px}
.story-heart span{font-size:25px}
.story h1{font-size:clamp(28px,3.7vw,54px);line-height:1.08;letter-spacing:-1px;overflow-wrap:anywhere}
#story-intro{font-size:clamp(13px,1.25vw,17px);line-height:1.55;margin:clamp(8px,1.5vh,16px) auto 7px}
.story-date{font-size:11px;padding:6px 12px;margin:4px 0 0}
.hero-divider{margin:clamp(8px,1.5vh,16px) auto 0}
.hero-divider i{width:48px}
.story-cover{order:0;width:min(100%,390px);height:clamp(105px,23vh,230px);flex:0 1 auto;margin:0 auto clamp(9px,1.5vh,16px);padding:6px;border-radius:18px}
.story-cover:after{border-radius:13px}
.story-cover img{border-radius:11px}
#story-cover.hidden{display:none}
#gallery-section{grid-column:2;grid-row:1;min-width:0;min-height:0;width:100%;height:100%;margin:0;padding:clamp(12px,1.7vw,24px);display:flex;flex-direction:column;justify-content:center}
#gallery-section.hidden{display:none!important}
#gallery-section .eyebrow{margin:0 0 5px}
#gallery-section h2,#surprises-section h2,#secret-section h2{font-size:clamp(20px,2vw,28px);margin:0 0 8px}
#gallery-section h2:after,#surprises-section h2:after,#secret-section h2:after{margin:7px auto 0}
.gallery-slider{grid-template-columns:34px minmax(0,1fr) 34px;gap:8px;min-height:0}
.story-gallery{height:min(52vh,440px);min-height:150px}
.gallery-slide{padding:8px}
.gallery-dots{margin:8px 0 3px}
#surprises-section,#secret-section{margin:0;padding:clamp(12px,1.5vw,20px);border-radius:20px}
#surprises-section{grid-column:1;grid-row:1;align-self:end;transform:translateY(-8px);display:none}
#secret-section{grid-column:1;grid-row:1;align-self:end;display:none}
#surprises-section:not(.hidden),#secret-section:not(.hidden){display:block}
#surprises-section:not(.hidden)~#secret-section:not(.hidden){grid-column:2;grid-row:1;align-self:end}
#surprises-section .eyebrow,#secret-section .eyebrow{font-size:8px;letter-spacing:2px;margin:0 0 4px}
.surprise-buttons{gap:6px}
.surprise-button{font-size:11px;padding:8px 11px}
.surprise-message{font-size:12px;line-height:1.45;padding:10px;margin:8px auto 0;max-height:90px;overflow:auto}
#secret-section .muted{font-size:11px;line-height:1.35;margin:4px 0 8px}
#secret-form{gap:6px;margin:8px auto 0}
#secret-form input{padding:9px 10px;font-size:12px}
#secret-form .primary{padding:9px 12px;font-size:11px;white-space:nowrap}
#secret-status{font-size:11px;margin:5px 0 0}
.secret-letter{padding:12px;margin:8px auto 0;max-height:105px;overflow:auto}
.secret-letter h3{font-size:17px;margin-bottom:5px}
.secret-letter p{font-size:12px;line-height:1.5}
.story-note,.story>.text-link{display:none}
.music-player{display:none!important}
@media(max-width:700px){
 html,body.story-shell{overflow:hidden}
 .topbar{height:46px}
 .story{height:calc(100svh - 46px);padding:8px;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:7px}
 .story-hero{padding:9px 7px;border-radius:17px}
 .story-cover{height:clamp(80px,17vh,150px);margin-bottom:7px;padding:4px}
 .story-kicker{font-size:7px;letter-spacing:1.5px;gap:5px}
 .story-kicker span{width:13px}
 .story-heart{width:35px;height:35px;margin:3px auto 6px}
 .story-heart span{font-size:18px}
 .story h1{font-size:clamp(20px,6vw,30px);letter-spacing:-.5px}
 #story-intro{font-size:11px;line-height:1.4;margin:7px auto 4px}
 .story-date{font-size:9px;padding:5px 8px}
 .hero-divider{margin:7px auto 0}
 .hero-divider i{width:25px}
 #gallery-section{padding:9px 7px;border-radius:17px}
 #gallery-section .eyebrow{font-size:7px;letter-spacing:1.5px}
 #gallery-section h2{font-size:18px;margin-bottom:6px}
 .gallery-slider{grid-template-columns:22px minmax(0,1fr) 22px;gap:3px}
 .gallery-arrow{width:22px;height:22px;font-size:18px}
 .story-gallery{height:clamp(135px,30vh,250px);min-height:120px;border-radius:12px}
 .gallery-slide{padding:4px}
 .gallery-slide img{border-radius:8px}
 .gallery-slide figcaption{font-size:9px;padding:4px 2px 0}
 .gallery-dots{gap:5px;margin:6px 0 2px}
 .gallery-dot{width:6px;height:6px}
 .gallery-dot.active{width:14px}
 .gallery-counter{font-size:9px}
 #surprises-section,#secret-section{padding:9px 7px;border-radius:14px}
 #surprises-section h2,#secret-section h2{font-size:16px;margin-bottom:5px}
 .surprise-button{font-size:9px;padding:6px 8px}
 #secret-form{flex-direction:column;align-items:stretch}
 #secret-form input,#secret-form .primary{width:100%;padding:7px;font-size:10px}
 #secret-section .muted{font-size:9px}
 .secret-letter{max-height:75px;padding:8px}
 .secret-letter h3{font-size:14px}
 .secret-letter p{font-size:10px;line-height:1.35}
}
@media(max-height:650px){.story{padding-top:5px;padding-bottom:5px}.story-heart{margin:2px auto 5px}.hero-divider{margin-top:5px}.story-cover{height:clamp(65px,15vh,130px)}.story-gallery{height:34vh}.gallery-section,.surprises-section,.secret-section{padding:9px}}

/* Final grid arrangement: hero at left, memories and actions at right */
.story-content{grid-column:2;grid-row:1;min-width:0;min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr) auto;gap:clamp(7px,1vw,14px);overflow:hidden}
#gallery-section{grid-column:1 / -1;grid-row:1}
#surprises-section,#secret-section{grid-column:auto!important;grid-row:2!important;align-self:stretch;transform:none;min-width:0;min-height:0;display:block}
#surprises-section.hidden,#secret-section.hidden{display:none!important}
#gallery-section.hidden{display:none!important}
.story-content:has(#gallery-section.hidden){grid-template-rows:minmax(0,1fr)}
.story-content:has(#gallery-section.hidden) #surprises-section,.story-content:has(#gallery-section.hidden) #secret-section{grid-row:1!important}
.story-content:has(#surprises-section.hidden) #secret-section{grid-column:1 / -1!important}
.story-content:has(#secret-section.hidden) #surprises-section{grid-column:1 / -1!important}
@media(max-width:700px){.story-content{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr) auto;gap:6px}#gallery-section{grid-column:1 / -1;grid-row:1;padding:9px 7px}#surprises-section,#secret-section{grid-row:2!important;padding:8px 6px} .story-content:has(#gallery-section.hidden){grid-template-rows:minmax(0,1fr)}}


/* Interactive romantic surprise + secret letter overlays */
.romance-modal{position:fixed;inset:0;margin:auto;width:min(92vw,620px);max-width:620px;max-height:min(88svh,820px);overflow:auto;padding:clamp(26px,5vw,48px);border:1px solid #f1cbd5;border-radius:28px;background:linear-gradient(145deg,#fffdfd 0%,#fff3f6 55%,#fffaf2 100%);color:#68434e;box-shadow:0 28px 100px #51263745;text-align:center;opacity:0;transform:translateY(24px) scale(.94)}
.romance-modal[open]{animation:romanceModalIn .62s cubic-bezier(.18,.85,.25,1) forwards}
.romance-modal::backdrop{background:rgba(55,28,39,.56);backdrop-filter:blur(8px);animation:backdropIn .35s ease both}
.romance-modal-close{position:absolute;right:13px;top:11px;width:38px;height:38px;border:0;border-radius:50%;background:#fff;color:#b65e75;font-size:27px;line-height:1;cursor:pointer;box-shadow:0 4px 15px #9a4d601c;transition:transform .2s}
.romance-modal-close:hover{transform:rotate(90deg) scale(1.08)}
.modal-sparkle{color:#d77c91;font-size:25px;letter-spacing:9px;margin:0 0 10px;animation:heartFloat 2.8s ease-in-out infinite}
.modal-sparkle.bottom{margin:20px 0 0;font-size:20px;letter-spacing:7px}
.modal-eyebrow{font-size:9px;letter-spacing:4px;font-weight:700;color:#c27c8b;margin:0 0 8px}
.romance-modal h2{font:600 clamp(25px,5vw,38px)/1.2 'Playfair Display',serif;color:#8f5969;margin:0 0 22px}
.romance-modal-content{display:grid;gap:17px;justify-items:center}
.surprise-modal-image{display:block;width:auto;max-width:100%;max-height:55svh;object-fit:contain;border:7px solid #fff;border-radius:18px;box-shadow:0 15px 45px #9b58651e;animation:surpriseImageIn .75s cubic-bezier(.2,.8,.2,1) both}
.surprise-modal-message{width:100%;margin:0;padding:clamp(16px,3vw,25px);border:1px solid #f2dce2;border-radius:17px;background:#ffffffc9;color:#795a64;font:italic clamp(15px,2.4vw,19px)/1.8 'Playfair Display',serif;white-space:pre-wrap;overflow-wrap:anywhere;animation:messageRise .7s .12s both}
.secret-romance-modal{background:linear-gradient(145deg,#fffdf7,#fff5ec);border-color:#ecd9c7}
.secret-modal-paper{position:relative;padding:clamp(22px,4vw,38px);border:1px solid #ead6c2;border-radius:5px 20px 20px 20px;background:repeating-linear-gradient(0deg,#fffdf7,#fffdf7 31px,#f6eadc 32px);box-shadow:0 14px 38px #80624b17;text-align:left;color:#70594d;font:clamp(15px,2.2vw,18px)/1.9 'Playfair Display',serif;white-space:pre-wrap;overflow-wrap:anywhere;animation:letterUnfold .9s cubic-bezier(.2,.8,.2,1) both}
.secret-modal-paper:before{content:'DENGAN SEPENUH HATI  ♥';display:block;text-align:center;letter-spacing:2px;font:700 9px 'DM Sans',sans-serif;color:#bd8b7c;margin-bottom:18px}
.secret-form-unlocked{opacity:.45;pointer-events:none}
@keyframes romanceModalIn{0%{opacity:0;transform:translateY(24px) scale(.94)}65%{opacity:1;transform:translateY(-4px) scale(1.015)}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes backdropIn{from{opacity:0}to{opacity:1}}
@keyframes surpriseImageIn{from{opacity:0;transform:scale(.82) rotate(-2deg)}to{opacity:1;transform:scale(1) rotate(0)}}
@keyframes messageRise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
@keyframes letterUnfold{from{opacity:0;transform:perspective(800px) rotateX(-13deg) translateY(12px)}to{opacity:1;transform:perspective(800px) rotateX(0) translateY(0)}}
@keyframes heartFloat{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-5px) scale(1.08)}}
@media(max-width:600px){.romance-modal{width:calc(100vw - 24px);padding:30px 17px 22px;border-radius:22px}.surprise-modal-image{max-height:48svh}.romance-modal h2{margin-bottom:16px}.secret-modal-paper{padding:18px 14px}}
@media(prefers-reduced-motion:reduce){.romance-modal[open],.romance-modal::backdrop,.modal-sparkle,.surprise-modal-image,.surprise-modal-message,.secret-modal-paper{animation:none!important;opacity:1;transform:none}}

/* CintaKita multi-admin, pilihan tema, dan tautan berbagi */
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;background:#fff5f7;border-radius:12px;padding:5px;margin:20px 0 18px}.auth-tab{border:0;border-radius:9px;padding:10px;background:transparent;color:var(--muted);font-weight:700}.auth-tab.active{background:white;color:var(--pink);box-shadow:0 3px 12px #63304412}.auth-form{margin-top:0!important}.auth-form.hidden{display:none!important}.theme-select{width:100%;padding:12px 13px;border:1px solid var(--line);border-radius:10px;background:#fffdfd;color:var(--ink);margin-bottom:12px}.theme-preview{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:12px;margin:0 0 16px;background:#fffdfd}.theme-preview span{width:24px;height:24px;border-radius:50%;border:1px solid #00000012}.theme-preview small{color:var(--muted);margin-left:4px}.copy-link-btn{background:#fff5f7;border-color:#f4d4dc;color:#b94260;font-weight:700}.row-actions{flex-wrap:wrap}

.story-shell{background:radial-gradient(circle at 50% 25%,#fff 0,var(--paper) 55%,var(--rose) 100%);color:var(--ink)}.story-shell .story-heart,.story-shell .story-kicker,.story-shell .eyebrow{color:var(--pink)}.story-shell .text-link{color:var(--pink)}.story-shell .primary{background:var(--pink)}.story-shell[data-theme="midnight"]{background:radial-gradient(circle at 50% 20%,#514064 0,#292135 55%,#17131f 100%);color:#f6edf9}.story-shell[data-theme="midnight"] .lead,.story-shell[data-theme="midnight"] .muted,.story-shell[data-theme="midnight"] .story-note{color:#d6c5df}.story-shell[data-theme="midnight"] .story-note{background:#ffffff12;border-color:#ffffff2b}.story-shell[data-theme="midnight"] .topbar{background:#211b2ccc;border-color:#ffffff20}.story-shell[data-theme="midnight"] .brand{color:#f6edf9}

/* Penyesuaian kontras otomatis untuk seluruh elemen halaman sesuai tema pasangan */
.story-shell{
  --theme-surface:color-mix(in srgb,var(--paper) 92%,white);
  --theme-surface-soft:color-mix(in srgb,var(--paper) 82%,var(--rose));
  --theme-border:color-mix(in srgb,var(--ink) 18%,var(--paper));
  color:var(--ink);
}
.story-shell :is(h1,h2,h3,h4,p,span,label,figcaption,small,strong,em){
  color:inherit;
}
.story-shell :is(.lead,.muted,.story-note,.gallery-counter,.gallery-slide figcaption){color:var(--muted)}
.story-shell :is(.gallery-section,.music-player,.surprises-section,.secret-section,.story-hero,.story-gallery){
  background:var(--theme-surface);border-color:var(--theme-border);color:var(--ink);
}
.story-shell :is(.gallery-section h2,.music-player h2,.surprises-section h2,.secret-section h2){color:var(--ink)}
.story-shell .story-note{background:var(--theme-surface-soft);border-color:var(--theme-border);color:var(--ink)}
.story-shell :is(.story-gallery,.gallery-arrow){background:var(--theme-surface);border-color:var(--theme-border)}
.story-shell .gallery-arrow{color:var(--pink)}
.story-shell :is(.surprise-button,.story>.text-link,.gallery-dot){background:var(--theme-surface-soft);border-color:var(--theme-border);color:var(--ink)}
.story-shell .surprise-button:before{color:var(--pink)}
.story-shell :is(.primary,#secret-form .primary){background:var(--pink);color:var(--theme-accent-text);border:1px solid var(--theme-border)}
.story-shell :is(.primary,#secret-form .primary):hover{filter:brightness(.96)}
.story-shell :is(#secret-form input,input,textarea,select){background:var(--theme-surface);color:var(--ink);border-color:var(--theme-border)}
.story-shell input::placeholder,.story-shell textarea::placeholder{color:var(--muted);opacity:1}
.story-shell :is(.romance-modal,.romance-modal.secret-romance-modal){background:var(--theme-surface);color:var(--ink);border-color:var(--theme-border)}
.story-shell :is(.romance-modal h2,.modal-eyebrow,.modal-sparkle){color:var(--pink)}
.story-shell .romance-modal-close{background:var(--theme-surface-soft);color:var(--pink);border:1px solid var(--theme-border)}
.story-shell .surprise-modal-message{background:var(--theme-surface-soft);color:var(--ink);border-color:var(--theme-border)}
.story-shell .secret-modal-paper{background:var(--theme-surface-soft);color:var(--ink);border-color:var(--theme-border)}
.story-shell .secret-modal-paper:before{color:var(--pink)}
.story-shell .secret-modal-paper :is(h1,h2,h3,p){color:var(--ink)}
.story-shell .topbar{background:color-mix(in srgb,var(--paper) 90%,transparent);border-color:var(--theme-border)}
.story-shell .brand{color:var(--ink)}
.story-shell .text-link{color:var(--pink)}
.story-shell :focus-visible{outline:2px solid var(--pink);outline-offset:3px}
.story-shell[data-theme="midnight"]{--theme-surface:#30263d;--theme-surface-soft:#3a2e49;--theme-border:#665477;--theme-accent-text:#211b2c}
.story-shell[data-theme="midnight"] :is(.gallery-section,.music-player,.surprises-section,.secret-section,.story-hero,.story-gallery){background:var(--theme-surface);border-color:var(--theme-border)}
.story-shell[data-theme="midnight"] :is(.story-note,.surprise-button,.story>.text-link,.surprise-modal-message,.secret-modal-paper){background:var(--theme-surface-soft);color:#f6edf9;border-color:var(--theme-border)}
.story-shell[data-theme="midnight"] :is(.gallery-section h2,.music-player h2,.surprises-section h2,.secret-section h2,.secret-modal-paper :is(h1,h2,h3,p)){color:#f6edf9}
.story-shell[data-theme="midnight"] :is(input,textarea,select){background:#211b2c;color:#f6edf9;border-color:var(--theme-border)}
.story-shell[data-theme="midnight"] .topbar{background:#211b2cdd;border-color:var(--theme-border)}
.story-shell[data-theme="midnight"] .brand{color:#f6edf9}

/* RESPONSIVE UPDATE: admin dan halaman pasangan untuk HP, tablet, dan PC */
html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }
img,video,canvas,svg{max-width:100%;}
button,a,input,select,textarea{touch-action:manipulation;}
input,select,textarea{max-width:100%;}
.dashboard,.main-content,.panel,.couple-list,.couple-row,.couple-info{min-width:0;}
.couple-row{gap:12px;}
.row-actions{flex-wrap:wrap;}
.modal,.romance-modal{max-width:calc(100vw - 24px);max-height:calc(100svh - 24px);overflow:auto;overscroll-behavior:contain;}
.modal form{min-width:0;}
.modal input,.modal textarea,.modal select{min-width:0;}

@media (max-width: 800px){
  .dashboard{display:flex;flex-direction:column;}
  .sidebar{position:relative;z-index:5;min-height:0;width:100%;padding:12px 14px;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:7px;border-right:0;border-bottom:1px solid var(--line);}
  .sidebar>.brand{flex:1 0 100%;font-size:19px;}
  .sidebar .side-label{display:none;}
  .sidebar .side-link{display:flex;align-items:center;justify-content:center;flex:1 1 auto;min-width:0;margin:0;padding:10px 8px;font-size:12px;gap:6px;white-space:nowrap;background:#fff8fa;}
  .sidebar .side-link span{overflow:hidden;text-overflow:ellipsis;}
  .sidebar .sidebar-bottom{flex:1 0 100%;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:3px 0 0;min-width:0;}
  .sidebar-bottom #admin-email{overflow-wrap:anywhere;}
  .sidebar-bottom .ghost{width:auto;margin:0;padding:9px 15px;}
  .main-content{padding:22px 16px 32px;}
  .dashboard-head{width:100%;}
  .dashboard-head h1{font-size:clamp(30px,7vw,40px);}
  .dashboard-head>.primary{width:100%;}
  .stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:22px 0;}
  .stat-card{min-width:0;padding:12px 9px;}
  .stat-card strong{font-size:clamp(22px,5vw,28px);overflow-wrap:anywhere;}
  .stat-card span,.stat-card small{font-size:10px;line-height:1.35;}
  .panel{padding:16px 13px;}
  .panel-head{width:100%;}
  .couple-row{align-items:flex-start;}
  .couple-info{flex:1 1 calc(100% - 65px);}
  .status{margin-left:54px;}
  .row-actions{width:100%;margin-left:54px;}
  .row-actions>*{flex:0 1 auto;}
}

@media (max-width: 900px){
  /* Pada layar sempit, halaman pasangan menjadi satu kolom yang dapat digulir.
     Ini mencegah isi terpotong pada Android dan tablet. */
  html,html:has(body.story-shell),body.story-shell{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto;}
  body.story-shell{min-height:100svh;height:auto;}
  .story{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;width:100%;height:auto;min-height:calc(100svh - 46px);max-width:760px;margin:0 auto;padding:clamp(14px,3vw,26px);gap:14px;overflow:visible;text-align:center;}
  .story-hero{width:100%;min-height:0;padding:clamp(16px,4vw,28px);flex:0 0 auto;}
  .story-cover{width:min(100%,440px);height:clamp(150px,42vw,300px);margin:0 auto 12px;}
  .story-kicker{font-size:9px;letter-spacing:2px;}
  .story-heart{width:44px;height:44px;margin:7px auto;}
  .story h1{font-size:clamp(27px,6vw,44px);line-height:1.12;}
  #story-intro{font-size:clamp(13px,2.2vw,16px);line-height:1.6;max-width:620px;}
  .story-date{font-size:11px;}
  .hero-divider{margin:10px auto 0;}
  .story-content{display:flex;flex-direction:column;width:100%;min-width:0;min-height:0;gap:12px;overflow:visible;}
  #gallery-section,#surprises-section,#secret-section{display:block;width:100%;height:auto;min-width:0;min-height:0;margin:0;padding:clamp(15px,3vw,22px);border-radius:18px;overflow:visible;}
  #gallery-section.hidden,#surprises-section.hidden,#secret-section.hidden{display:none!important;}
  #gallery-section h2,#surprises-section h2,#secret-section h2{font-size:clamp(20px,4vw,26px);}
  .gallery-slider{grid-template-columns:38px minmax(0,1fr) 38px;gap:8px;}
  .gallery-arrow{width:36px;height:36px;font-size:24px;}
  .story-gallery{width:100%;height:clamp(220px,58vw,430px);min-height:190px;}
  .gallery-slide{padding:8px;}
  .gallery-slide img{object-fit:contain;}
  .gallery-dots{flex-wrap:wrap;}
  .surprise-buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;}
  .surprise-button{font-size:13px;padding:10px 14px;max-width:100%;}
  .surprise-message,.secret-letter{max-height:240px;overflow:auto;}
  #secret-section .muted{font-size:13px;line-height:1.55;}
  #secret-form{display:flex;flex-wrap:wrap;gap:9px;}
  #secret-form input{flex:1 1 180px;min-width:0;padding:12px;font-size:14px;}
  #secret-form .primary{flex:0 0 auto;padding:12px 16px;font-size:13px;white-space:normal;}
  .story-note,.story>.text-link{display:block;max-width:100%;}
  .story-note{margin:8px auto 0;padding:15px;font-size:15px;}
  .story>.text-link{margin:0 auto 8px;}
  .romance-modal{width:calc(100vw - 24px);max-height:calc(100svh - 24px);padding:clamp(22px,5vw,34px) clamp(15px,4vw,25px);}
}

@media (max-width: 560px){
  .login-wrap{padding:18px 13px;}
  .login-card{padding:25px 19px;border-radius:18px;}
  .login-card h1{font-size:32px;}
  .sidebar{padding:10px;gap:6px;}
  .sidebar .side-link{font-size:10px;padding:9px 4px;gap:4px;}
  .sidebar .side-link span{white-space:normal;text-align:center;line-height:1.2;}
  .main-content{padding:18px 11px 26px;}
  .stats{gap:6px;}
  .stat-card{padding:10px 6px;}
  .stat-card span,.stat-card small{font-size:9px;}
  .panel{padding:14px 10px;}
  .couple-row{gap:9px;}
  .row-actions{margin-left:0;gap:6px;}
  .row-actions>*{font-size:11px;padding:8px;}
  .status{margin-left:0;}
  .modal{width:calc(100vw - 16px);max-width:calc(100vw - 16px);border-radius:15px;}
  .modal form{padding:19px 14px;}
  .modal-head{gap:10px;align-items:flex-start;}
  .modal-head h2{font-size:22px;}
  .modal-actions{flex-wrap:wrap;}
  .modal-actions>*{flex:1 1 110px;}
  .media-section input[type=file]{font-size:11px;}
  .story{padding:12px 10px 22px;gap:10px;}
  .story-hero{padding:15px 11px;border-radius:18px;}
  .story-cover{height:clamp(140px,52vw,240px);}
  .story h1{font-size:clamp(25px,8vw,36px);}
  #story-intro{font-size:13px;}
  #gallery-section,#surprises-section,#secret-section{padding:14px 10px;}
  .gallery-slider{grid-template-columns:30px minmax(0,1fr) 30px;gap:5px;}
  .gallery-arrow{width:29px;height:29px;font-size:21px;}
  .story-gallery{height:clamp(190px,65vw,310px);min-height:170px;}
  .gallery-slide figcaption{font-size:11px;}
  #secret-form{flex-direction:column;align-items:stretch;}
  #secret-form input,#secret-form .primary{width:100%;flex:1 1 auto;min-height:42px;font-size:14px;}
  .romance-modal{width:calc(100vw - 16px);max-width:calc(100vw - 16px);padding:28px 14px 20px;border-radius:19px;}
  .romance-modal h2{font-size:22px;overflow-wrap:anywhere;}
  .surprise-modal-image{max-height:42svh;}
  .secret-modal-paper{font-size:14px;line-height:1.7;padding:16px 12px;}
}

@media (max-width: 360px){
  .stats{grid-template-columns:1fr;}
  .stat-card{display:flex;align-items:center;justify-content:space-between;gap:8px;}
  .stat-card strong{margin:0;font-size:22px;}
  .sidebar .side-link{font-size:9px;}
  .story h1{font-size:24px;}
}


/* CintaKita: pasangan prioritaskan tampilan satu layar, lalu scroll yang halus dan beranimasi */
html:has(body.story-shell){scroll-behavior:smooth;scroll-padding-top:18px}
.story-shell{overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable}
.story{padding:clamp(16px,3vh,34px) clamp(14px,3vw,28px) 44px}
.story-hero{min-height:min(84svh,780px);display:flex;flex-direction:column;align-items:center;justify-content:center}
.story-hero>*{flex-shrink:0}
.story-kicker{margin:0 0 8px;gap:9px;font-size:9px;letter-spacing:3px}
.story-heart{width:clamp(48px,7vh,64px);height:clamp(48px,7vh,64px);margin:5px auto 12px}
.story-heart span{font-size:clamp(23px,4vh,30px)}
.story h1{font-size:clamp(34px,6vw,68px);line-height:1.04;letter-spacing:-1px}
#story-intro{max-width:620px;font-size:clamp(14px,1.8vw,18px);line-height:1.55;margin:12px auto 8px}
.story-date{margin:5px 0 0;padding:6px 13px}
.hero-divider{margin:16px auto 6px}
.story-cover{width:min(560px,84vw);height:clamp(110px,22vh,220px);margin:0 auto 14px;padding:6px;border-radius:18px}
.story-cover img{border-radius:12px}
.story-content{width:100%;max-width:1000px;margin:0 auto}
.gallery-section,.music-player,.surprises-section,.secret-section{margin:24px auto;padding:clamp(17px,3vw,28px);border-radius:20px}
.gallery-section h2,.music-player h2,.surprises-section h2,.secret-section h2{font-size:clamp(23px,3vw,30px);margin-bottom:14px}
.story-gallery{height:clamp(190px,38vh,390px)}
.gallery-slide{padding:10px}
.surprises-section,.secret-section{max-width:760px}
.story-note{margin:22px auto 12px;padding:15px 20px;max-width:720px;font-size:clamp(14px,1.7vw,17px)}
.story>.text-link{display:inline-block;margin:8px auto 18px}
.story-scroll-cue{display:flex;flex-direction:column;align-items:center;gap:5px;margin:3px auto 0;color:var(--muted);font-size:10px;letter-spacing:.7px;opacity:.85;animation:scrollCueFloat 1.8s ease-in-out infinite}
.story-scroll-cue span{font-size:19px;color:var(--pink);line-height:1}
@keyframes scrollCueFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(6px)}}
.scroll-reveal{opacity:0;transform:translateY(26px) scale(.99);transition:opacity .75s ease,transform .75s cubic-bezier(.2,.7,.2,1)}
.scroll-reveal.is-visible{opacity:1;transform:translateY(0) scale(1)}
@media(min-width:900px) and (min-height:700px){
 .story-hero{min-height:min(88svh,850px)}
 .story-cover{height:clamp(130px,23vh,250px)}
}
@media(max-width:700px){
 .story{padding:12px 13px 30px}
 .story-hero{min-height:84svh;min-height:84dvh}
 .story-kicker{font-size:8px;letter-spacing:2.2px;margin-bottom:6px}
 .story-heart{width:48px;height:48px;margin:3px auto 9px}
 .story-heart span{font-size:23px}
 .story h1{font-size:clamp(31px,9vw,48px);line-height:1.05;letter-spacing:-.7px}
 #story-intro{font-size:14px;line-height:1.48;margin:9px auto 6px;max-width:95%}
 .story-date{font-size:11px;padding:5px 11px}
 .hero-divider{margin:10px auto 3px}
 .story-cover{width:94%;height:clamp(105px,20dvh,175px);margin-bottom:9px;padding:5px}
 .story-cover:after{inset:3px}
 .gallery-section,.music-player,.surprises-section,.secret-section{margin:18px auto;padding:17px 13px;border-radius:17px}
 .gallery-section h2,.music-player h2,.surprises-section h2,.secret-section h2{font-size:25px}
 .story-gallery{height:clamp(190px,43dvh,330px)}
 .gallery-slider{grid-template-columns:30px minmax(0,1fr) 30px;gap:5px}
 .gallery-arrow{width:30px;height:30px;font-size:22px}
 .gallery-slide{padding:7px}
 .gallery-slide figcaption{font-size:11px;padding:6px 2px 0}
 .surprise-button{padding:10px 13px;font-size:13px}
 .story-note{margin:16px auto 8px;padding:12px 14px;line-height:1.55}
 .romance-modal{width:calc(100% - 22px);max-height:88dvh;overflow:auto}
}
@media(max-height:650px) and (max-width:900px){
 .story-hero{min-height:auto;padding-top:10px;padding-bottom:18px}
 .story-cover{height:clamp(90px,17dvh,135px)}
 .story-heart{width:40px;height:40px}
 .story-heart span{font-size:20px}
 .story h1{font-size:clamp(29px,7vw,40px)}
 #story-intro{font-size:13px;margin:6px auto 4px}
 .hero-divider{margin:7px auto 2px}
}
@media(prefers-reduced-motion:reduce){
 html:has(body.story-shell){scroll-behavior:auto}
 .scroll-reveal{opacity:1;transform:none;transition:none}
 .story-scroll-cue{animation:none}
}


/* Petunjuk gulir hanya untuk layar Android/tablet; desktop tetap bersih */
@media (min-width: 901px){
  .story-scroll-cue{display:none!important}
}
@media (max-width: 900px){
  .story-scroll-cue{display:flex}
}


/* Desktop story-cover: keep the frame fitted to the actual image ratio. */
@media (min-width: 701px) {
  .story-hero > #story-cover.story-cover {
    box-sizing: border-box;
    display: block;
    width: fit-content;
    max-width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0 auto clamp(12px, 2vh, 22px);
    padding: 8px;
    overflow: hidden;
  }
  .story-hero > #story-cover.story-cover img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: clamp(130px, 24vh, 230px);
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
  }
}
