/* Lumina Chat — design system dari mockup Stitch, dinormalisasi:
   primary tunggal #16a34a, light-mode only, header putih konsisten, FAB bulat. */
:root{
  --primary:#16a34a; --primary-deep:#15803d; --mint:#dcfce7;
  --bg:#ffffff; --surface:#f8fafc; --incoming:#f1f5f9;
  --text:#0f172a; --text-2:#64748b; --line:#e2e8f0;
  --danger:#dc2626; --r-bubble:16px; --r-ui:12px;
  --vvh:100dvh;
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html{overflow-x:hidden}
body{font-family:'Inter',system-ui,sans-serif;background:#e8f0e9;color:var(--text);height:var(--vvh);overflow:hidden}
button{font:inherit;border:0;background:none;cursor:pointer;color:inherit}
input,textarea{font:inherit;color:inherit}
img{max-width:100%}
.hidden{display:none!important}

/* ---- screen shell (max 480px, center di desktop) ---- */
.screen{position:fixed;inset:0;margin:0 auto;max-width:480px;background:var(--bg);display:none;flex-direction:column;height:var(--vvh);box-shadow:0 0 40px rgba(15,23,42,.12)}
.screen.active{display:flex}
.screen-dark{background:#0f172a;color:#fff}

/* ---- splash (momen buka app) ---- */
#scr-splash{align-items:center;justify-content:center;background:radial-gradient(circle at 50% 36%,#dcfce7 0%,#f0fdf4 42%,#ffffff 100%);transition:opacity .45s ease,transform .45s ease}
#scr-splash.leaving{opacity:0;transform:scale(1.07);pointer-events:none}
.splash-inner{text-align:center;display:flex;flex-direction:column;align-items:center;gap:14px}
.splash-logo-wrap{position:relative;margin-bottom:6px}
.splash-ring{position:absolute;inset:-13px;border-radius:38px;border:2px solid rgba(22,163,74,.4);animation:ringspread 1.9s ease-out infinite}
@keyframes ringspread{0%{transform:scale(.88);opacity:.9}70%{transform:scale(1.22);opacity:0}100%{transform:scale(1.22);opacity:0}}
.splash-logo,.auth-logo{width:96px;height:96px;border-radius:28px;background:linear-gradient(150deg,#22c55e,#15803d);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 18px 44px rgba(22,163,74,.38),inset 0 1px 0 rgba(255,255,255,.35);animation:pop .55s cubic-bezier(.34,1.56,.64,1)}
.splash-logo svg,.auth-logo svg{width:52px;height:52px}
@keyframes pop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
#scr-splash h1{font-size:30px;font-weight:800;letter-spacing:-.03em;color:#052e16;animation:fadeup .55s ease .12s both}
#scr-splash p{color:var(--text-2);font-size:14.5px;animation:fadeup .55s ease .26s both}
@keyframes fadeup{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.splash-foot{position:absolute;bottom:max(22px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--primary-deep);animation:fadeup .55s ease .4s both}
.splash-foot svg{width:14px;height:14px}

/* ---- auth & onboarding ---- */
.auth-wrap{flex:1;overflow-y:auto;padding:48px 24px calc(40px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center}
.auth-logo{width:72px;height:72px;border-radius:22px;margin-bottom:20px}
.auth-logo svg{width:38px;height:38px}
.auth-wrap h2{font-size:24px;font-weight:800;letter-spacing:-.02em}
.auth-sub{color:var(--text-2);font-size:14px;margin:6px 0 26px;text-align:center}
.auth-wrap form{width:100%;display:flex;flex-direction:column;gap:14px}
.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}
.field em{font-style:normal;color:var(--text-2);font-weight:400}
.field input{height:52px;border:1px solid var(--line);border-radius:var(--r-ui);padding:0 16px;background:var(--surface);font-size:15px;outline:none;transition:border-color .15s, box-shadow .15s}
.field input:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--mint);background:#fff}
.btn-primary{height:52px;border-radius:var(--r-ui);background:var(--primary);color:#fff;font-weight:700;font-size:15px;box-shadow:0 8px 20px rgba(22,163,74,.28);transition:transform .1s}
.btn-primary:active{transform:scale(.98)}
.btn-primary[disabled]{opacity:.6}
.auth-err{margin-top:14px;color:var(--danger);font-size:13px;font-weight:600;text-align:center}
.auth-switch{margin-top:22px;font-size:14px;color:var(--text-2)}
.auth-switch button{color:var(--primary);font-weight:700;margin-left:4px}
.avatar-pick{position:relative;margin:6px 0 24px}
.avatar-cam{position:absolute;right:-2px;bottom:-2px;width:38px;height:38px;border-radius:50%;background:var(--primary);display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(22,163,74,.4);border:3px solid #fff}
.avatar-cam svg{width:18px;height:18px}

/* ---- permission priming ---- */
.perm-list{width:100%;display:flex;flex-direction:column;gap:10px;margin:6px 0 22px}
.perm-item{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:14px 16px}
.perm-item i{width:42px;height:42px;border-radius:50%;background:var(--mint);color:var(--primary-deep);display:flex;align-items:center;justify-content:center;flex:none}
.perm-item i svg{width:21px;height:21px}
.perm-info{flex:1}
.perm-info b{font-size:14.5px;font-weight:700;display:block}
.perm-info span{font-size:12.5px;color:var(--text-2)}
.perm-state{font-style:normal;font-weight:800;color:var(--primary);font-size:17px;width:24px;text-align:center}
.perm-item.perm-denied .perm-state{color:var(--danger)}
.perm-item.perm-denied i{background:#fee2e2;color:var(--danger)}

/* ---- avatars ---- */
.avatar{border-radius:50%;background:var(--mint);color:var(--primary-deep);display:flex;align-items:center;justify-content:center;font-weight:700;overflow:hidden;flex:none;position:relative}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar-xl{width:112px;height:112px;font-size:40px}
.avatar-lg{width:56px;height:56px;font-size:20px}
.avatar-md{width:48px;height:48px;font-size:18px}
.avatar-sm{width:40px;height:40px;font-size:15px}
.dot-online{position:absolute;right:0;bottom:0;width:13px;height:13px;border-radius:50%;background:var(--primary);border:2.5px solid #fff}

/* ---- main shell ---- */
.main-head{display:flex;align-items:center;justify-content:space-between;padding:calc(14px + env(safe-area-inset-top)) 20px 12px;background:var(--bg);border-bottom:1px solid var(--line)}
.main-head h1{font-size:22px;font-weight:800;letter-spacing:-.02em;color:var(--primary-deep)}
.head-actions button{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--surface)}
.head-actions svg{width:20px;height:20px}
.tabpane{flex:1;overflow-y:auto;display:none;padding-bottom:96px}
.tabpane.active{display:block}

/* story rail */
.story-rail{display:flex;gap:14px;padding:14px 16px 10px;overflow-x:auto;border-bottom:1px solid var(--line);scrollbar-width:none}
.story-rail::-webkit-scrollbar{display:none}
.story-item{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:11px;color:var(--text-2);flex:none;width:64px}
.story-item b{font-weight:500;max-width:64px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.story-ring{padding:2.5px;border-radius:50%;border:2.5px solid var(--primary)}
.story-ring.seen{border-color:var(--line)}
.story-add{position:relative}
.story-add::after{content:'+';position:absolute;right:-2px;bottom:-2px;width:20px;height:20px;border-radius:50%;background:var(--primary);color:#fff;font-weight:800;font-size:14px;display:flex;align-items:center;justify-content:center;border:2px solid #fff}

/* chat list */
.search-bar{padding:10px 16px}
.search-bar input{width:100%;height:44px;border-radius:9999px;border:1px solid var(--line);background:var(--surface);padding:0 18px;font-size:14px;outline:none}
.search-bar input:focus{border-color:var(--primary)}
.chat-item{display:flex;align-items:center;gap:12px;padding:12px 16px;min-height:72px;width:100%;text-align:left;border-bottom:1px solid var(--surface)}
.chat-item:active{background:var(--surface)}
.chat-item-main{flex:1;min-width:0}
.chat-item-top{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.chat-item-top b{font-size:15px;font-weight:700}
.chat-item-top time{font-size:11px;color:var(--text-2);flex:none}
.chat-item-top time.t-unread{color:var(--primary);font-weight:700}
.chat-item-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:3px}
.chat-item-bottom p{font-size:13px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:4px}
.chat-item-bottom p svg{width:15px;height:15px;flex:none}
.badge{min-width:20px;height:20px;border-radius:9999px;background:var(--primary);color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 6px;flex:none}

/* empty state — header tetap putih (fix bug layar 06) */
.empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:56px 32px;gap:10px}
.empty-art{width:120px;height:120px;border-radius:50%;background:var(--mint);display:flex;align-items:center;justify-content:center}
.empty-art svg{width:56px;height:56px}
.empty h3{font-size:18px;font-weight:800}
.empty p{font-size:14px;color:var(--text-2);max-width:280px}
.empty .btn-primary{margin-top:10px;padding:0 28px}

/* FAB — bulat penuh (fix bug layar 05) */
.fab{position:absolute;right:20px;bottom:calc(92px + env(safe-area-inset-bottom));width:58px;height:58px;border-radius:50%;background:var(--primary);display:flex;align-items:center;justify-content:center;box-shadow:0 10px 24px rgba(22,163,74,.4);z-index:5;transition:transform .12s}
.fab:active{transform:scale(.94)}
.fab svg{width:26px;height:26px}

/* bottom nav */
.bottom-nav{position:absolute;left:0;right:0;bottom:0;display:flex;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);border-top:1px solid var(--line);padding:8px 0 max(10px,env(safe-area-inset-bottom));z-index:6}
.bottom-nav button{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11px;font-weight:600;color:var(--text-2);position:relative;padding:4px 0}
.bottom-nav button.active{color:var(--primary-deep)}
.bottom-nav button.active i{background:var(--mint)}
.bottom-nav i{width:52px;height:30px;border-radius:9999px;display:flex;align-items:center;justify-content:center}
.bottom-nav svg{width:21px;height:21px}
.nav-badge{position:absolute;top:0;left:calc(50% + 8px);min-width:17px;height:17px;border-radius:9999px;background:var(--primary);color:#fff;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 5px}

/* ---- chat room ---- */
.chat-head{display:flex;align-items:center;gap:6px;padding:calc(10px + env(safe-area-inset-top)) 12px 10px;background:var(--bg);border-bottom:1px solid var(--line)}
.btn-back{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex:none}
.btn-back:active{background:var(--surface)}
.btn-back svg{width:22px;height:22px}
.chat-head-peer{display:flex;align-items:center;gap:10px;flex:1;min-width:0;text-align:left}
.chat-head-info{display:flex;flex-direction:column;min-width:0}
.chat-head-info b{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-head-info small{font-size:12px;color:var(--text-2)}
.chat-head-info small.typing{color:var(--primary);font-weight:600}
.msgs{flex:1;overflow-y:auto;padding:16px 14px;background:#f0f6f0;display:flex;flex-direction:column;gap:4px}
.day-sep{align-self:center;font-size:11px;font-weight:600;color:var(--text-2);background:#fff;border-radius:9999px;padding:4px 12px;margin:10px 0 6px;box-shadow:0 1px 3px rgba(15,23,42,.08)}
.bubble{max-width:78%;border-radius:var(--r-bubble);padding:9px 12px;font-size:14.5px;line-height:1.5;position:relative;word-wrap:break-word;white-space:pre-wrap}
.bubble.out{align-self:flex-end;background:var(--primary);color:#fff;border-bottom-right-radius:4px}
.bubble.in{align-self:flex-start;background:#fff;border-bottom-left-radius:4px;box-shadow:0 1px 2px rgba(15,23,42,.06)}
.bubble.first-out{margin-top:8px}
.bubble.first-in{margin-top:8px}
.bubble img{border-radius:10px;display:block;margin:-3px -6px 6px;max-height:320px;object-fit:cover}
.meta{display:inline-flex;align-items:center;gap:3px;font-size:10.5px;margin-left:8px;float:right;margin-top:8px;opacity:.85}
.bubble.in .meta{color:var(--text-2)}
.meta svg{width:14px;height:14px}
.tick-read{color:#a5f3fc}
.composer{display:flex;align-items:center;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:var(--bg);border-top:1px solid var(--line)}
.composer input[type=text]{flex:1;height:46px;border-radius:9999px;border:1px solid var(--line);background:var(--surface);padding:0 18px;font-size:15px;outline:none}
.composer input[type=text]:focus{border-color:var(--primary)}
#btn-attach{width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--text-2)}
#btn-attach:active{background:var(--surface)}
#btn-attach svg{width:22px;height:22px}
#btn-send{width:46px;height:46px;border-radius:50%;background:var(--primary);display:flex;align-items:center;justify-content:center;box-shadow:0 6px 14px rgba(22,163,74,.35);flex:none}
#btn-send svg{width:20px;height:20px}
#btn-send:active{transform:scale(.94)}

/* ---- picker ---- */
.search-bar.always{border-bottom:1px solid var(--line)}
.picker-results{flex:1;overflow-y:auto}
.picker-hint{padding:36px 32px;text-align:center;font-size:13.5px;color:var(--text-2);line-height:1.7}

/* ---- peer profile ---- */
.peer-body{flex:1;overflow-y:auto;padding:28px 20px;display:flex;flex-direction:column;align-items:center;gap:6px}
.peer-body h2{font-size:21px;font-weight:800;margin-top:14px}
.peer-body .peer-sub{color:var(--text-2);font-size:14px}
.peer-card{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px;margin-top:18px}
.peer-card label{font-size:11px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.04em}
.peer-card p{font-size:14.5px;margin-top:4px}
.peer-body .btn-primary{width:100%;margin-top:20px;display:flex;align-items:center;justify-content:center;gap:8px}
.peer-body .btn-primary svg{width:19px;height:19px}

/* ---- settings ---- */
.settings{padding:20px 16px}
.set-profile{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px;width:100%;text-align:left}
.set-profile-main{flex:1;min-width:0}
.set-profile-main b{font-size:16px;font-weight:800}
.set-profile-main p{font-size:13px;color:var(--text-2);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.set-profile>svg{width:20px;height:20px;color:var(--text-2);flex:none}
.set-group{margin-top:18px;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.set-row{display:flex;align-items:center;gap:12px;padding:15px 16px;width:100%;text-align:left;background:#fff;border-bottom:1px solid var(--surface);font-size:14.5px;font-weight:600}
.set-row:last-child{border-bottom:0}
.set-row:active{background:var(--surface)}
.set-row svg{width:20px;height:20px;color:var(--primary-deep);flex:none}
.set-row small{margin-left:auto;color:var(--text-2);font-weight:500;font-size:12.5px}
.set-row.danger{color:var(--danger)}
.set-row.danger svg{color:var(--danger)}
.ref-box{margin-top:18px;background:var(--mint);border-radius:16px;padding:16px;text-align:center}
.ref-box label{font-size:11px;font-weight:700;color:var(--primary-deep);text-transform:uppercase;letter-spacing:.06em}
.ref-box .code{font-size:22px;font-weight:800;letter-spacing:.06em;color:var(--primary-deep);margin:6px 0 10px}
.ref-box button{background:var(--primary);color:#fff;font-size:12.5px;font-weight:700;border-radius:9999px;padding:8px 18px}
.set-ver{text-align:center;color:var(--text-2);font-size:11.5px;margin-top:22px}

/* ---- story composer ---- */
.sc-mode{display:flex;gap:8px;padding:12px 16px}
.sc-mode button{flex:1;height:40px;border-radius:9999px;background:var(--surface);border:1px solid var(--line);font-weight:700;font-size:13.5px;color:var(--text-2)}
.sc-mode button.active{background:var(--mint);border-color:var(--primary);color:var(--primary-deep)}
.sc-body{flex:1;display:flex;flex-direction:column;padding:0 16px;min-height:0}
.sc-canvas{flex:1;border-radius:20px;display:flex;align-items:center;justify-content:center;padding:24px;transition:background .2s;min-height:0}
.sc-canvas textarea{width:100%;background:none;border:0;outline:none;color:#fff;font-size:24px;font-weight:700;text-align:center;resize:none;height:100%;line-height:1.5}
.sc-canvas textarea::placeholder{color:rgba(255,255,255,.65)}
.sc-canvas-img{background:var(--surface);border:2px dashed var(--line);overflow:hidden;position:relative}
.sc-canvas-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#0f172a}
.sc-pick{background:var(--primary);color:#fff;font-weight:700;border-radius:9999px;padding:12px 24px}
.sc-colors{display:flex;gap:10px;padding:14px 4px;justify-content:center}
.sc-colors button{width:34px;height:34px;border-radius:50%;border:3px solid transparent}
.sc-colors button.active{border-color:var(--text)}
#sc-caption{margin-top:12px;height:46px;border-radius:9999px;border:1px solid var(--line);background:var(--surface);padding:0 18px;font-size:14px;outline:none}
.sc-foot{padding:14px 16px calc(14px + env(safe-area-inset-bottom))}
.sc-foot .btn-primary{width:100%}

/* ---- story viewer ---- */
#scr-story-viewer{max-width:480px}
.sv-progress{display:flex;gap:4px;padding:calc(10px + env(safe-area-inset-top)) 12px 0;z-index:3}
.sv-progress i{flex:1;height:3px;border-radius:9999px;background:rgba(255,255,255,.3);overflow:hidden}
.sv-progress i b{display:block;height:100%;width:0;background:#fff;border-radius:9999px}
.sv-progress i b.anim{animation:svfill linear forwards}
@keyframes svfill{from{width:0}to{width:100%}}
.sv-head{display:flex;align-items:center;gap:10px;padding:12px;z-index:3}
.sv-head small{color:rgba(255,255,255,.7)}
.sv-close{margin-left:auto;width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}
.sv-close svg{width:22px;height:22px}
.sv-content{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:24px}
.sv-content .sv-text{font-size:26px;font-weight:800;text-align:center;line-height:1.5;color:#fff;word-break:break-word}
.sv-content img{max-height:100%;border-radius:8px}
.sv-caption{position:absolute;bottom:80px;left:0;right:0;text-align:center;color:#fff;font-size:15px;padding:0 24px;text-shadow:0 1px 8px rgba(0,0,0,.5)}
.sv-tap{position:absolute;top:80px;bottom:60px;left:0;width:40%;z-index:2}
.sv-tap-r{left:auto;right:0;width:60%}
.sv-foot{position:absolute;bottom:0;left:0;right:0;padding:14px 16px calc(16px + env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:center;gap:14px;color:rgba(255,255,255,.85);font-size:12.5px;z-index:3}
.sv-foot button{color:#fca5a5;font-weight:700;display:flex;align-items:center}
.sv-foot svg{width:17px;height:17px;flex:none}

/* story page (tab) */
.story-page{padding:8px 0}
.story-row{display:flex;align-items:center;gap:12px;padding:11px 16px;width:100%;text-align:left}
.story-row:active{background:var(--surface)}
.story-row-main b{font-size:15px;font-weight:700;display:block}
.story-row-main small{font-size:12.5px;color:var(--text-2)}
.story-sec{padding:16px 16px 6px;font-size:12px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.05em}

/* ---- call screen ---- */
#scr-call{background:linear-gradient(180deg,#052e16,#0f172a);color:#fff;justify-content:space-between}
.call-body{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding-top:env(safe-area-inset-top)}
.call-body small{font-size:14px;color:rgba(255,255,255,.75);letter-spacing:.02em}
.call-body h2{font-size:26px;font-weight:800;letter-spacing:-.02em}
.call-timer{font-size:15px;font-variant-numeric:tabular-nums;color:#86efac;font-weight:600}
.call-ringing #call-avatar{animation:ringpulse 1.6s ease-in-out infinite}
@keyframes ringpulse{0%,100%{box-shadow:0 0 0 0 rgba(22,163,74,.55)}50%{box-shadow:0 0 0 22px rgba(22,163,74,0)}}
.call-actions{display:flex;justify-content:center;gap:64px;padding:0 24px calc(44px + env(safe-area-inset-bottom))}
.call-act{display:flex;flex-direction:column;align-items:center;gap:10px;font-size:13px;color:rgba(255,255,255,.85);font-weight:600}
.call-btn{width:72px;height:72px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:transform .1s}
.call-btn:active{transform:scale(.92)}
.call-btn svg{width:30px;height:30px}
/* tombol Angkat KONTRAS JELAS (fix bug mockup 08: accept nyaris invisible) */
.call-accept{background:#16a34a;box-shadow:0 10px 30px rgba(22,163,74,.5)}
.call-decline{background:#dc2626;box-shadow:0 10px 30px rgba(220,38,38,.45)}
.call-mute{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.25)}
.call-mute.on{background:#fff;color:#0f172a}
.btn-call{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--primary-deep);flex:none}
.btn-call:active{background:var(--surface)}
.btn-call svg{width:21px;height:21px}
.bubble .call-log{display:flex;align-items:center;gap:8px;font-weight:600}
.bubble .call-log svg{width:17px;height:17px;flex:none}

/* toast */
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(24px + env(safe-area-inset-bottom));background:#0f172a;color:#fff;font-size:13.5px;font-weight:600;padding:11px 20px;border-radius:9999px;z-index:99;box-shadow:0 10px 30px rgba(15,23,42,.35);max-width:90vw;text-align:center}

/* touch affordance: semua interaktif keliatan tanpa hover */
@media (hover:hover){
  .chat-item:hover,.set-row:hover,.story-row:hover{background:var(--surface)}
}

/* ---- feed IG-style (tab Story) ---- */
.feed{padding-bottom:20px}
.post{border-bottom:8px solid var(--surface);padding-bottom:8px}
.post-head{display:flex;align-items:center;gap:10px;padding:12px 16px 10px}
.post-head b{font-size:14px;font-weight:700;display:block}
.post-head small{font-size:11.5px;color:var(--text-2)}
.post-head .post-del{margin-left:auto;width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--text-2)}
.post-head .post-del svg{width:17px;height:17px}
.post-img{width:100%;max-height:480px;object-fit:cover;display:block;background:var(--surface)}
.post-text{padding:6px 16px 10px;font-size:15px;line-height:1.6;white-space:pre-wrap;word-break:break-word}
.post-text.big{font-size:19px;font-weight:600;padding:18px 16px 14px}
.post-actions{display:flex;align-items:center;gap:6px;padding:8px 12px 0}
.post-like{display:flex;align-items:center;gap:6px;padding:8px 10px;border-radius:9999px;font-size:13.5px;font-weight:700;color:var(--text-2)}
.post-like svg{width:21px;height:21px}
.post-like.on{color:#dc2626}
.post-like.on svg{fill:#dc2626;stroke:#dc2626}
.post-like:active{transform:scale(.92)}
.post-caption{padding:2px 16px 6px;font-size:13.5px;line-height:1.55;word-break:break-word}
.post-caption b{font-weight:700}
.feed-empty{padding:44px 32px;text-align:center;color:var(--text-2);font-size:13.5px;line-height:1.7}

/* action sheet */
.sheet-backdrop{position:fixed;inset:0;background:rgba(5,46,22,.45);z-index:50;display:flex;align-items:flex-end;justify-content:center}
.sheet{width:100%;max-width:480px;background:#fff;border-radius:24px 24px 0 0;padding:10px 16px calc(22px + env(safe-area-inset-bottom));animation:sheetup .22s ease}
@keyframes sheetup{from{transform:translateY(60px);opacity:0}to{transform:none;opacity:1}}
.sheet-grab{width:40px;height:4px;border-radius:9999px;background:var(--line);margin:6px auto 14px}
.sheet-item{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:14px 12px;border-radius:16px}
.sheet-item:active{background:var(--surface)}
.sheet-item i{width:46px;height:46px;border-radius:14px;background:var(--mint);color:var(--primary-deep);display:flex;align-items:center;justify-content:center;flex:none}
.sheet-item i svg{width:22px;height:22px}
.sheet-item b{font-size:15px;font-weight:800;display:block}
.sheet-item span{font-size:12.5px;color:var(--text-2)}

/* post composer */
.pc-body{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:14px}
.pc-imgpick{position:relative;border:2px dashed var(--line);background:var(--surface);border-radius:20px;min-height:200px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.pc-imgpick span{color:var(--text-2);font-weight:600;font-size:14px}
.pc-imgpick img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
#pc-caption{border:1px solid var(--line);background:var(--surface);border-radius:16px;padding:14px 16px;font-size:15px;min-height:110px;resize:none;outline:none;line-height:1.6}
#pc-caption:focus{border-color:var(--primary)}

/* penonton story */
.sheet-title{font-size:15px;font-weight:800;padding:2px 12px 12px;color:var(--text)}
.viewers-list{max-height:50vh;overflow-y:auto}
.viewer-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px}
.viewer-row b{font-size:14.5px;font-weight:700;display:block}
.viewer-row small{font-size:12px;color:var(--text-2)}
.viewers-empty{padding:26px;text-align:center;color:var(--text-2);font-size:13.5px}

/* kontak & permintaan */
.mini-btn{border-radius:9999px;padding:8px 16px;font-size:12.5px;font-weight:700;flex:none}
.mini-btn.acc{background:var(--primary);color:#fff}
.mini-btn.rej{background:var(--surface);color:var(--danger);border:1px solid var(--line)}
.mini-btn.wait{background:var(--surface);color:var(--text-2);border:1px solid var(--line)}
.mini-btn[disabled]{opacity:.6}
.contact-actions{display:flex;gap:8px;flex:none}

/* username */
.uname-wrap{display:flex;align-items:center;height:52px;border:1px solid var(--line);border-radius:var(--r-ui);background:var(--surface);overflow:hidden}
.uname-wrap:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px var(--mint);background:#fff}
.uname-wrap i{font-style:normal;font-weight:800;color:var(--text-2);padding:0 4px 0 16px;font-size:16px}
.uname-wrap input{flex:1;height:100%;border:0;background:none;outline:none;font-size:15px;padding-right:16px}
.uname-hint{font-weight:600;font-size:12px;min-height:15px}
.uname-hint.ok{color:var(--primary-deep)}
.uname-hint.bad{color:var(--danger)}
.uname-tag{color:var(--text-2);font-weight:500;font-size:12.5px}

/* banner permintaan kontak */
.req-banner{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:12px 16px;background:var(--mint);border-bottom:1px solid var(--line);font-size:13.5px;font-weight:700;color:var(--primary-deep)}
.req-banner:active{opacity:.85}
.req-banner svg{width:18px;height:18px;flex:none}
.req-banner em{font-style:normal;margin-left:auto;font-weight:800}
.fab-badge{position:absolute;top:-3px;right:-3px;min-width:20px;height:20px;border-radius:9999px;background:#dc2626;color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;padding:0 6px;border:2px solid #fff}

/* pin pesan */
.pin-banner{display:flex;align-items:center;gap:9px;width:100%;text-align:left;padding:9px 14px;background:#fffbeb;border-bottom:1px solid #fde68a;font-size:12.5px;color:#92400e}
.pin-banner b{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}
.pin-banner svg{width:15px;height:15px;flex:none}
.pin-banner .pin-x{margin-left:auto;flex:none;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#92400e}
.bubble.flash{animation:bubbleflash 1.2s ease}
@keyframes bubbleflash{0%,60%{background:#fde68a}100%{}}
.bubble.out.flash{animation:bubbleflashout 1.2s ease}
@keyframes bubbleflashout{0%,60%{background:#0d7a37}100%{}}
.bubble .pin-mark{position:absolute;top:-7px;right:8px;width:16px;height:16px;background:#f59e0b;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff}
.bubble .pin-mark svg{width:9px;height:9px}
