/* ShareCardLink - Wall (feed + stories) */
:root{
  --bg:#ffffff; --fg:#0f1419; --muted:#6b7280; --line:#e6e8eb; --soft:#f3f4f6; --card:#ffffff;
  --accent:#e8a300; --like:#ff3040; --nav:rgba(255,255,255,.86); --sheet:#ffffff;
  --ring:conic-gradient(from 210deg,#f9ce34,#ee2a7b,#6228d7,#f9ce34);
}
@media (prefers-color-scheme: dark){
  :root{ --bg:#0b0c10; --fg:#f3f4f6; --muted:#9aa3ae; --line:#23262d; --soft:#16181d; --card:#0b0c10;
    --nav:rgba(38,40,46,.82); --sheet:#16181d; }
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--fg)}
body{font-family:'Poppins',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;font-size:14px;-webkit-tap-highlight-color:transparent;
  padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
[hidden]{display:none!important}

/* top bar */
.wl-top{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:calc(10px + env(safe-area-inset-top,0px)) 14px 10px;background:var(--bg);border-bottom:1px solid var(--line)}
.wl-brand{display:flex;align-items:center;gap:8px;font-weight:700;font-size:19px;letter-spacing:-.2px}
.wl-brand img{width:28px;height:28px;border-radius:8px}
.wl-ic{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:50%}
.wl-ic svg{width:26px;height:26px}
.wl-main{max-width:520px;margin:0 auto}

/* stories */
.wl-stories{display:flex;gap:14px;overflow-x:auto;padding:12px 14px 10px;scrollbar-width:none;border-bottom:1px solid var(--line)}
.wl-stories::-webkit-scrollbar{display:none}
.wl-story{flex:0 0 auto;width:76px;display:flex;flex-direction:column;align-items:center;gap:6px}
.wl-sav{position:relative;width:74px;height:74px;border-radius:50%;padding:3px;display:block}
.wl-sav.ring{background:var(--ring)}
.wl-sav img{width:100%;height:100%;border-radius:50%;object-fit:cover;border:3px solid var(--bg);background:var(--soft);display:block}
.wl-story.seen .wl-sav.ring{background:var(--line)}
.wl-splus{position:absolute;right:0;bottom:0;width:24px;height:24px;border-radius:50%;background:var(--fg);color:var(--bg);
  font-style:normal;font-weight:700;font-size:18px;line-height:21px;text-align:center;border:3px solid var(--bg)}
.wl-sname{max-width:76px;font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* quick composer */
.wl-quick{display:flex;align-items:center;gap:12px;width:calc(100% - 28px);margin:12px 14px;padding:10px 14px;border:1px solid var(--line);
  border-radius:16px;background:var(--soft);color:var(--muted);text-align:left}
.wl-quick img{width:34px;height:34px;border-radius:50%;object-fit:cover}
.wl-quick span{flex:1}

/* post */
.wl-post{border-bottom:1px solid var(--line);padding-bottom:12px;background:var(--card)}
.wl-ph{position:relative;display:flex;align-items:center;gap:10px;padding:10px 12px}
.wl-av{width:38px;height:38px;border-radius:50%;padding:2px;flex:0 0 auto}
.wl-av.ring{background:var(--ring)}
.wl-av img{width:100%;height:100%;border-radius:50%;object-fit:cover;border:2px solid var(--bg);display:block;background:var(--soft)}
.wl-who{flex:1;min-width:0;display:flex;flex-direction:column}
.wl-name{font-weight:600}
.wl-sub{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wl-more{width:36px;height:36px;display:flex;align-items:center;justify-content:center}
.wl-more svg{fill:currentColor;stroke:none;width:20px}
.wl-menu{position:absolute;right:12px;top:48px;z-index:20;min-width:190px;background:var(--sheet);border:1px solid var(--line);border-radius:14px;
  box-shadow:0 14px 40px rgba(0,0,0,.25);overflow:hidden}
.wl-menu a,.wl-menu button{display:block;width:100%;text-align:left;padding:12px 16px;font-size:14px;border-top:1px solid var(--line)}
.wl-menu > :first-child{border-top:0}
.wl-menu .danger{color:#ef4444;font-weight:600}

.wl-media{position:relative;background:#000;overflow:hidden;user-select:none}
.wl-imgs .wl-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.wl-imgs .wl-track::-webkit-scrollbar{display:none}
.wl-imgs img{flex:0 0 100%;width:100%;max-height:640px;aspect-ratio:4/5;object-fit:cover;scroll-snap-align:center;display:block}
.wl-imgs[data-n="1"] img{aspect-ratio:auto;max-height:680px;object-fit:contain;background:#000}
.wl-count{position:absolute;top:12px;right:12px;padding:3px 9px;border-radius:999px;background:rgba(0,0,0,.6);color:#fff;font-size:12px}
.wl-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:5px}
.wl-dots i{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.5)}
.wl-dots i.on{background:#fff}
.wl-vid video{display:block;width:100%;max-height:680px;background:#000}
.wl-mute{position:absolute;right:12px;bottom:12px;width:30px;height:30px;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;display:flex;align-items:center;justify-content:center}
.wl-mute svg{width:16px;height:16px}
.wl-vid.sound .wl-mute .x{display:none}
.wl-textcard{position:relative;margin:0 12px;padding:26px 22px;border-radius:18px;min-height:150px;display:flex;align-items:center;
  background:linear-gradient(135deg,#1e3a8a,#7c3aed 55%,#db2777);color:#fff;font-size:18px;font-weight:500;line-height:1.45}
.wl-textcard p{margin:0;word-wrap:break-word;overflow-wrap:anywhere}
.wl-textcard a{text-decoration:underline}
.wl-heart-pop{position:absolute;left:50%;top:50%;width:96px;height:96px;margin:-48px 0 0 -48px;pointer-events:none;opacity:0;transform:scale(.3);
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 20.5s-7.5-4.6-9.2-9.3C1.6 7.8 3.9 4.5 7.3 4.5c2 0 3.6 1.1 4.7 2.7 1.1-1.6 2.7-2.7 4.7-2.7 3.4 0 5.7 3.3 4.5 6.7-1.7 4.7-9.2 9.3-9.2 9.3z'/%3E%3C/svg%3E") center/contain no-repeat;
  filter:drop-shadow(0 4px 14px rgba(0,0,0,.35))}
.wl-heart-pop.go{animation:wlpop .9s ease forwards}
@keyframes wlpop{15%{opacity:1;transform:scale(1.15)}30%{transform:scale(.95)}45%{transform:scale(1)}80%{opacity:1}100%{opacity:0;transform:scale(1)}}

.wl-acts{display:flex;align-items:center;gap:14px;padding:10px 12px 4px}
.wl-acts > button svg{width:26px;height:26px}
.wl-like.on svg{fill:var(--like);stroke:var(--like)}
.wl-like.bump{animation:wlbump .35s ease}
@keyframes wlbump{50%{transform:scale(1.25)}}
.wl-sp{flex:1}
.wl-cta{display:inline-flex;align-items:center;gap:5px;padding:6px 11px;border-radius:999px;border:1px solid var(--line);font-size:12.5px;font-weight:600}
.wl-cta svg{width:15px;height:15px}
.wl-cta.wa{color:#16a34a;border-color:rgba(22,163,74,.35)}
.wl-likes{padding:2px 12px;font-size:13.5px}
.wl-likes b{font-weight:600}
.wl-cap{padding:4px 12px 0;line-height:1.45}
.wl-cap .wl-cap-t{overflow-wrap:anywhere}
.wl-cap a:not(.wl-name){color:#3b82f6}
.wl-cap.clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.wl-cap-more{color:var(--muted);display:none}
.wl-cap.clamp .wl-cap-more{display:inline}
.wl-allc{display:block;padding:4px 12px 0;color:var(--muted);font-size:13.5px;text-align:left}
.wl-lastc{padding:2px 12px 0;font-size:13.5px;line-height:1.4}
.wl-lastc b{font-weight:600}
.wl-empty{text-align:center;color:var(--muted);padding:40px 20px}
#wl-end{min-height:60px;display:flex;align-items:center;justify-content:center}
#wl-end.loading::after{content:"";width:24px;height:24px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--fg);animation:wlspin .8s linear infinite}
@keyframes wlspin{to{transform:rotate(360deg)}}

/* bottom navigation: floating pill */
.wl-nav{position:fixed;left:50%;bottom:calc(12px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:60;
  width:min(92vw,440px);height:62px;display:flex;align-items:center;justify-content:space-around;padding:0 8px;border-radius:999px;
  background:var(--nav);-webkit-backdrop-filter:blur(18px) saturate(1.4);backdrop-filter:blur(18px) saturate(1.4);
  border:1px solid var(--line);box-shadow:0 10px 30px rgba(0,0,0,.22)}
.wl-nav a,.wl-nav button{width:54px;height:46px;border-radius:999px;display:flex;align-items:center;justify-content:center}
.wl-nav .on{background:rgba(127,127,127,.18)}
.wl-nav svg{width:26px;height:26px}
.wl-nav .on svg{stroke-width:2.2}
.wl-nav img{width:28px;height:28px;border-radius:50%;object-fit:cover;border:1.5px solid var(--fg)}

/* sheets */
.wl-sheet{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.55);display:flex;align-items:flex-end;justify-content:center}
.wl-cbox,.wl-cmbox{width:100%;max-width:560px;background:var(--sheet);border-radius:22px 22px 0 0;max-height:92vh;display:flex;flex-direction:column;
  animation:wlup .3s cubic-bezier(.22,1,.36,1);padding-bottom:env(safe-area-inset-bottom,0px)}
@keyframes wlup{from{transform:translateY(100%)}}
.wl-chead,.wl-cmhead{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border-bottom:1px solid var(--line)}
.wl-chead b,.wl-cmhead b{font-size:16px}
.wl-cmhead{padding-left:16px}
.wl-postbtn{padding:8px 16px;border-radius:999px;background:#0095f6;color:#fff;font-weight:600}
.wl-postbtn[disabled]{opacity:.5}
.wl-cuser{display:flex;align-items:center;gap:10px;padding:12px 16px 0}
.wl-cuser img{width:36px;height:36px;border-radius:50%;object-fit:cover}
.wl-cbox textarea{width:100%;min-height:120px;border:0;outline:0;resize:none;padding:12px 16px;background:transparent;color:var(--fg);font:inherit;font-size:16px}
.wl-prev{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:0 16px;overflow-y:auto}
.wl-prev:empty{display:none}
.wl-prev .it{position:relative;border-radius:12px;overflow:hidden;background:#000;aspect-ratio:1}
.wl-prev .it.v{grid-column:1/-1;aspect-ratio:16/10}
.wl-prev img,.wl-prev video{width:100%;height:100%;object-fit:cover;display:block}
.wl-prev .rm{position:absolute;top:6px;right:6px;width:26px;height:26px;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;font-size:17px;line-height:26px}
.wl-cbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 16px 16px;border-top:1px solid var(--line);margin-top:12px}
.wl-cbar button{display:flex;align-items:center;gap:6px;padding:8px 12px;border-radius:12px;background:var(--soft);font-weight:500}
.wl-cbar svg{width:20px;height:20px}
.wl-hint{font-size:12px;color:var(--muted)}
.wl-progress{height:3px;background:var(--line)}
.wl-progress i{display:block;height:100%;width:0;background:#0095f6;transition:width .2s}
.wl-grip{width:40px;height:4px;border-radius:4px;background:var(--line);margin:8px auto 0}
.wl-cmbox{height:75vh}
.wl-cmlist{flex:1;overflow-y:auto;padding:8px 0}
.wl-cm{display:flex;gap:10px;padding:10px 16px}
.wl-cm img{width:34px;height:34px;border-radius:50%;object-fit:cover;flex:0 0 auto}
.wl-cm div{flex:1;min-width:0;line-height:1.4;overflow-wrap:anywhere}
.wl-cm small{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.wl-cm small button{color:var(--muted);font-size:12px;margin-left:10px}
.wl-cmempty{text-align:center;color:var(--muted);padding:40px 16px}
.wl-cmform{display:flex;align-items:center;gap:10px;padding:10px 12px;border-top:1px solid var(--line)}
.wl-cmform img{width:32px;height:32px;border-radius:50%;object-fit:cover}
.wl-cmform input{flex:1;min-width:0;padding:11px 14px;border-radius:999px;border:1px solid var(--line);background:var(--soft);color:var(--fg);font:inherit;font-size:15px;outline:0}
.wl-cmform button{color:#0095f6;font-weight:600;padding:0 6px}

/* story viewer */
.wl-sv{position:fixed;inset:0;z-index:200;background:#000;color:#fff;display:flex;align-items:center;justify-content:center}
.wl-svbars{position:absolute;top:calc(8px + env(safe-area-inset-top,0px));left:8px;right:8px;display:flex;gap:4px;z-index:3}
.wl-svbars i{flex:1;height:2.5px;border-radius:2px;background:rgba(255,255,255,.35);overflow:hidden}
.wl-svbars i b{display:block;height:100%;width:0;background:#fff}
.wl-svbars i.done b{width:100%}
.wl-svhead{position:absolute;top:calc(20px + env(safe-area-inset-top,0px));left:10px;right:6px;display:flex;align-items:center;gap:9px;z-index:3;text-shadow:0 1px 3px rgba(0,0,0,.5)}
.wl-svhead img{width:34px;height:34px;border-radius:50%;object-fit:cover;background:#333}
.wl-svhead span{color:rgba(255,255,255,.75);font-size:13px;flex:1}
.wl-svhead .wl-ic{color:#fff}
.wl-svmedia{width:100%;height:100%;display:flex;align-items:center;justify-content:center;max-width:560px}
.wl-svmedia img,.wl-svmedia video{max-width:100%;max-height:100%;object-fit:contain}
.wl-svzone{position:absolute;top:80px;bottom:90px;z-index:2}
.wl-svzone.l{left:0;width:35%}
.wl-svzone.r{right:0;width:65%}
.wl-svcard{position:absolute;bottom:calc(22px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);z-index:3;
  padding:10px 20px;border-radius:999px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.35);font-weight:600;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}

.wl-toast{position:fixed;left:50%;bottom:calc(92px + env(safe-area-inset-bottom,0px));transform:translate(-50%,20px);z-index:300;
  padding:10px 16px;border-radius:12px;background:#111827;color:#fff;font-size:13.5px;opacity:0;pointer-events:none;transition:.25s;max-width:88vw;text-align:center}
.wl-toast.on{opacity:1;transform:translate(-50%,0)}

@media (min-width:600px){
  .wl-post{border:1px solid var(--line);border-radius:14px;margin:14px 0;overflow:hidden}
  .wl-sheet{align-items:center}
  .wl-cbox,.wl-cmbox{border-radius:20px}
}
