/* VIVO TV — white editorial surface, phone-app layout.
   Palette + type follow virtualintegrationviaopen.com. Layout positions (tab bar,
   raised centre FEED button, sticky top bar, view scrolling) follow the phone app.
   NO EMOJIS ANYWHERE — icons are inline line SVGs. */

@font-face{font-family:'Orbitron';src:url('../orbitron.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:'Montserrat';src:url('../montserrat-600.woff2') format('woff2');font-weight:600;font-display:swap}

:root{
  --ink:#111114; --sub:#5a5c66; --faint:#8e909a;
  --line:#e2e3e8; --line-soft:#eef0f3; --bg:#ffffff; --bg-alt:#fafafb;
  --sans:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Helvetica,Arial,sans-serif;
  --mono:ui-monospace,"SF Mono","Cascadia Code",Menlo,Consolas,monospace;
  --tabbar:60px; --radius:14px;
  /* three gradients, 2–3 true-spectrum stops each, used sparingly */
  --g-live:linear-gradient(90deg,#ff2d2d,#ff8a00);              /* live / urgency */
  --g-good:linear-gradient(90deg,#00b3ff,#7a5cff);              /* verified good  */
  --g-make:linear-gradient(90deg,#ffcc00,#00c46a);              /* progress / made */
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
html,body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans)}
body{line-height:1.5;-webkit-font-smoothing:antialiased;overflow-x:hidden}
a{color:inherit;text-decoration:none;-webkit-tap-highlight-color:transparent}
img,svg{display:block;max-width:100%}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

/* ---------- app shell (positions copied from the phone app) ---------- */
#app{max-width:520px;margin:0 auto;min-height:100dvh;position:relative;background:var(--bg);overflow-x:hidden}
.view{display:none;min-height:100dvh;padding-bottom:calc(var(--tabbar) + env(safe-area-inset-bottom) + 16px);overflow-x:hidden}
.view.active{display:block}
.pad{padding:16px}

/* sticky top bar */
.topbar{display:flex;align-items:center;gap:10px;padding:12px 16px;
  padding-top:calc(12px + env(safe-area-inset-top));background:rgba(255,255,255,.92);
  backdrop-filter:blur(12px);position:sticky;top:0;z-index:40;border-bottom:1px solid var(--line-soft)}
.topbar .spacer{margin-left:auto}
.topbar h2{font-size:15px;font-weight:600;margin:0;letter-spacing:-.01em}
.iconbtn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:50%}
.iconbtn svg{width:19px;height:19px;stroke:var(--ink);fill:none;stroke-width:1.6}

/* brand lockup: vivo + red trademark (same construction as the splash end frame) */
.brand{display:block;width:74px;height:auto}

/* ---------- type ---------- */
.eyebrow{font-family:var(--mono);font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:var(--faint);margin:0 0 8px}
h1.big{font-size:clamp(26px,7.4vw,34px);font-weight:300;line-height:1.12;letter-spacing:-.02em;margin:0 0 10px}
h1.big em{font-style:normal;color:var(--faint)}
.lede{font-size:14px;color:var(--sub);margin:0}
.sec-title{font-size:13px;font-weight:600;margin:0;letter-spacing:-.01em}
.muted{color:var(--sub)}
.tiny{font-size:11px}
.num{font-family:var(--mono);font-size:11px;color:var(--faint)}

/* ---------- primitives ---------- */
.sec{padding:18px 16px;border-top:1px solid var(--line-soft)}
.sec:first-of-type{border-top:none}
.sec-head{display:flex;align-items:baseline;gap:10px;margin-bottom:12px}
.sec-head .more{margin-left:auto;font-size:11px;color:var(--faint);font-family:var(--mono);letter-spacing:.08em}

.card{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--bg)}
.row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line-soft)}
.row:last-child{border-bottom:none}
.row .grow{flex:1;min-width:0}
.row .rt{margin-left:auto;text-align:right;flex-shrink:0}
.ellip{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5em;min-height:42px;
  padding:.6em 1.2em;border-radius:3px;font-size:13.5px;font-weight:500;border:1px solid transparent}
.btn-primary{background:var(--ink);color:#fff}
.btn-secondary{border-color:var(--line);color:var(--ink)}
.btn-wide{width:100%}

/* live dot + pills */
.live-pill{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid var(--line);
  border-radius:100px;padding:3px 10px;font-family:'Montserrat',var(--sans);font-weight:600;font-size:9.5px;
  letter-spacing:.12em;text-transform:uppercase;color:var(--ink)}
.dot{width:6px;height:6px;border-radius:50%;background:#ff2d2d;flex-shrink:0;animation:pulse 1.4s ease-in-out infinite}
@keyframes pulse{
  0%,100%{opacity:1;transform:scale(1);box-shadow:0 0 0 0 rgba(255,45,45,.35)}
  50%{opacity:.55;transform:scale(.8);box-shadow:0 0 0 4px rgba(255,45,45,0)}
}

.chip{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid var(--line);
  border-radius:100px;font-size:11px;font-family:var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--sub);white-space:nowrap}
.chip.on{border-color:transparent;color:#fff;background:var(--ink)}
.chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.chips::-webkit-scrollbar{display:none}

/* the standard pill — TRUE · SAFE · CONSTRUCTIVE, one component reused everywhere */
.std-pill{display:inline-flex;align-items:center;gap:7px;height:24px;padding:0 10px;
  border:1px solid var(--line);border-radius:100px;font-family:var(--mono);font-size:9.5px;
  letter-spacing:.1em;color:var(--sub);white-space:nowrap}
.std-pill i{width:5px;height:5px;border-radius:50%;background:var(--ink);flex-shrink:0}
.fineprint{font-family:var(--mono);font-size:9.5px;letter-spacing:.06em;color:var(--faint);margin-top:8px}

/* verified mark — the TRUE test, the badge the brand rests on */
.verified{display:inline-flex;align-items:center;gap:5px;font-family:var(--mono);font-size:10px;
  letter-spacing:.1em;text-transform:uppercase;color:#0a7ea4}
.verified svg{width:12px;height:12px;stroke:#0a7ea4;fill:none;stroke-width:2}

/* genre tile: 2-tone spectrum wash, restrained */
.g-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.g-tile{border:1px solid var(--line);border-radius:var(--radius);padding:11px 12px;min-height:66px;
  display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}
.g-tile b{font-family:var(--mono);font-size:11.5px;letter-spacing:.12em;font-weight:500}
.g-tile span{font-size:10.5px;color:var(--faint)}
.g-tile .wash{position:absolute;left:0;right:0;top:0;height:3px}

/* rail of live cards */
.rail{display:flex;gap:10px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px}
.rail::-webkit-scrollbar{display:none}
.live-card{width:212px;flex-shrink:0}
.thumb{aspect-ratio:16/10;border-radius:10px;border:1px solid var(--line);position:relative;overflow:hidden}
.thumb .tl{position:absolute;top:7px;left:7px}
.thumb .br{position:absolute;bottom:7px;right:7px;background:rgba(17,17,20,.82);color:#fff;padding:3px 7px;
  border-radius:4px;font-family:var(--mono);font-size:9.5px;letter-spacing:.06em}

/* progress — the CONSTRUCTIVE test made visible */
.bar{height:4px;border-radius:100px;background:var(--line-soft);overflow:hidden}
.bar i{display:block;height:100%;border-radius:100px;background:var(--g-make)}

.avatar{width:38px;height:38px;border-radius:50%;background:var(--bg-alt);border:1px solid var(--line);flex-shrink:0}
.avatar.sm{width:30px;height:30px}

/* ---------- bottom tab bar (positions copied from the phone app) ---------- */
.tabbar{position:fixed;bottom:0;left:0;right:0;max-width:520px;margin:0 auto;z-index:90;display:flex;
  align-items:center;justify-content:space-around;background:rgba(255,255,255,.95);backdrop-filter:blur(16px);
  border-top:1px solid var(--line);height:calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom)}
.tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  font-family:var(--mono);font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:var(--faint);
  min-width:48px;height:100%;padding-top:2px}
.tabbar a > svg{width:22px;height:22px;stroke:var(--faint);fill:none;stroke-width:1.6}
.tabbar a.active{color:var(--ink)}
.tabbar a.active > svg{stroke:var(--ink)}
.tabbar a span{position:relative}
.tabbar a.active span::after{content:"";position:absolute;left:50%;transform:translateX(-50%);
  bottom:-4px;width:14px;height:2px;border-radius:2px;background:var(--g-good)}
/* the raised circular FEED button, kept from the original */
.tabbar a.center{width:60px;height:60px;border-radius:50%;background:var(--ink);margin-top:-46px;
  border:4px solid #fff;justify-content:center;gap:0;color:#fff}
.tabbar a.center > svg{width:24px;height:24px;stroke:#fff;fill:none;stroke-width:1.8}
.tabbar a.center.active > svg{stroke:#fff}

/* ---------- FEED: full-bleed vertical snap scroll, three.js behind ---------- */
#view-feed{padding-bottom:0}
.feed{height:100dvh;overflow-y:auto;scroll-snap-type:y mandatory;scrollbar-width:none;background:#08090c}
.feed::-webkit-scrollbar{display:none}
.moment{height:100dvh;scroll-snap-align:start;position:relative;display:flex;flex-direction:column;
  justify-content:flex-end;padding:20px 16px calc(var(--tabbar) + env(safe-area-inset-bottom) + 22px);color:#fff}
.moment .gl{position:absolute;inset:0;z-index:0}
.moment .scrim{position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(180deg,rgba(0,0,0,.45),transparent 26%,transparent 46%,rgba(0,0,0,.75))}
.moment .m-body{position:relative;z-index:2;padding-right:70px}
.moment h3{font-size:18px;font-weight:500;margin:8px 0 6px;letter-spacing:-.01em}
.moment p{margin:0;font-size:13px;color:rgba(255,255,255,.78)}
.moment .m-top{position:absolute;top:calc(14px + env(safe-area-inset-top));left:16px;right:16px;z-index:2;
  display:flex;align-items:center;gap:8px}
.moment .verified{color:#7fd4ff}
.moment .verified svg{stroke:#7fd4ff}
.m-actions{position:absolute;right:14px;bottom:calc(var(--tabbar) + env(safe-area-inset-bottom) + 34px);
  z-index:2;display:flex;flex-direction:column;gap:16px;align-items:center}
.m-actions button{display:flex;flex-direction:column;align-items:center;gap:4px;color:#fff;
  font-family:var(--mono);font-size:9.5px;letter-spacing:.06em}
.m-actions svg{width:24px;height:24px;stroke:#fff;fill:none;stroke-width:1.6}
.m-genre{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;
  padding:3px 8px;border-radius:100px;background:rgba(255,255,255,.16);backdrop-filter:blur(6px)}

/* support — the reward loop, always one tap from the story */
.support{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--line);
  border-radius:var(--radius);background:var(--bg-alt)}
.support .grow{flex:1;min-width:0}

/* ---------- splash (kept: the VIVO reveal) ---------- */
#splash{position:fixed;inset:0;z-index:999;background:#000;transition:opacity .6s,visibility .6s}
#splash.gone{opacity:0;visibility:hidden;pointer-events:none}
#vivo-gl{position:absolute;inset:0;z-index:1}
#vivo-gl canvas{display:block;width:100%;height:100%}
#splash .tagline{position:absolute;left:0;right:0;text-align:center;z-index:3;
  bottom:calc(48px + env(safe-area-inset-bottom));font-family:var(--mono);font-size:10px;font-weight:400;
  letter-spacing:.28em;text-transform:uppercase;color:#c9c9d2;opacity:0;transform:translateY(8px);
  transition:opacity .9s ease,transform .9s ease}
#splash.vivo-in .tagline{opacity:1;transform:none}
@media (min-width:1000px) and (pointer:fine){
  #splash{opacity:0}
  body.skin-placed #splash{opacity:1}
}

/* ---------- desktop / notebook: the app sits inside a phone on a white page ---------- */
@media (min-width:1000px) and (pointer:fine){
  body.skin{background:#fff;overflow:hidden;height:100dvh}
  body.skin #device{position:fixed;inset:0;display:grid;place-items:center;z-index:0}
  /* the phone: hairline body on white, screen cut out of the middle */
  body.skin .phone{position:relative;border-radius:54px;background:#fff;
    border:1px solid var(--line);
    box-shadow:0 1px 2px rgba(17,17,20,.05),0 18px 50px -12px rgba(17,17,20,.18),0 60px 120px -40px rgba(17,17,20,.16);
    padding:11px}
  body.skin .phone::after{content:"";position:absolute;left:50%;top:19px;transform:translateX(-50%);
    width:104px;height:24px;border-radius:100px;background:#111114;z-index:12}
  body.skin .screen{position:relative;border-radius:44px;overflow:hidden;background:#fff;
    box-shadow:inset 0 0 0 1px var(--line-soft)}
  body.skin #app{position:absolute;left:0;top:0;max-width:none;margin:0;min-height:0;
    transform-origin:top left;overflow:hidden;border-radius:44px}
  body.skin .view.active{height:var(--skin-h);min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
  body.skin .view::-webkit-scrollbar{display:none}
  body.skin .view{min-height:var(--skin-h)}
  body.skin .feed{height:var(--skin-h)}
  body.skin .moment{height:var(--skin-h)}
  body.skin .tabbar{position:absolute}
  body.skin .topbar{padding-top:44px}   /* clear the notch */
  body.skin #splash{position:absolute}
  /* a quiet caption beside the device, in the language of the marketing site */
  body.skin #device .caption{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);
    font-family:var(--mono);font-size:10px;letter-spacing:.24em;text-transform:uppercase;color:var(--faint)}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ---------- phone home screen (boot surface) ---------- */
#homescreen{position:fixed;inset:0;z-index:150;display:flex;flex-direction:column;align-items:center;
  padding:calc(54px + env(safe-area-inset-top)) 20px 40px;
  background:linear-gradient(168deg,#f7f9ff 0%,#fdf8f3 58%,#f4f7ff 100%);
  opacity:0;transform:scale(1.04);transition:opacity .38s ease,transform .38s ease;pointer-events:none}
#homescreen.on{opacity:1;transform:none;pointer-events:auto}
#homescreen[hidden]{display:none}
.hs-clock{text-align:center;margin-bottom:34px}
#hs-time{font-size:52px;font-weight:200;letter-spacing:-.02em;line-height:1}
#hs-date{font-family:var(--mono);font-size:10px;letter-spacing:.22em;text-transform:uppercase;color:var(--faint);margin-top:8px}
.hs-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:22px 10px;width:100%;max-width:340px}
.hs-icon{display:flex;flex-direction:column;align-items:center;gap:6px;
  font-family:var(--mono);font-size:8.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--sub)}
.hs-icon > span{width:56px;height:56px;border-radius:14px;background:#fff;border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center}
.hs-icon > span svg{width:24px;height:24px;stroke:var(--ink);fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.hs-icon.vivo > span{background:#0b0b0e;border-color:#0b0b0e}
.hs-icon.vivo > span svg{width:38px;height:auto;stroke:none}
body.skin #homescreen{padding-top:66px}   /* clear the notch on the desktop frame */

/* ---------- notification banner ---------- */
#notif{position:fixed;top:calc(10px + env(safe-area-inset-top));left:10px;right:10px;z-index:400;
  display:flex;gap:10px;align-items:center;text-align:left;background:rgba(255,255,255,.96);
  backdrop-filter:blur(14px);border:1px solid var(--line);border-radius:16px;padding:11px 14px;
  box-shadow:0 10px 34px rgba(17,17,20,.12);transform:translateY(-130%);
  transition:transform .45s cubic-bezier(.2,.9,.3,1.1)}
#notif.show{transform:none}
#notif[hidden]{display:none}
#notif .n-ic{width:34px;height:34px;border-radius:9px;background:#0b0b0e;flex-shrink:0;
  display:flex;align-items:center;justify-content:center}
#notif .n-ic svg{width:24px;height:auto}
#notif .grow{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
#notif b{font-size:12.5px;font-weight:600}
#notif #notif-m{font-size:12px;color:var(--sub);display:block;overflow:hidden;text-overflow:ellipsis;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
body.skin #notif{top:48px}

/* ---------- toast ---------- */
.toast{position:fixed;left:50%;transform:translate(-50%,8px);bottom:calc(var(--tabbar) + env(safe-area-inset-bottom) + 20px);
  z-index:420;background:#111114;color:#fff;padding:10px 16px;border-radius:100px;font-size:12px;
  opacity:0;transition:opacity .3s,transform .3s;pointer-events:none;max-width:86%;text-align:center;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ---------- bottom sheet ---------- */
#sheet{position:fixed;inset:0;z-index:430}
#sheet[hidden]{display:none}
.sheet-back{position:absolute;inset:0;background:rgba(17,17,20,.34);opacity:0;transition:opacity .3s}
#sheet.open .sheet-back{opacity:1}
.sheet-card{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:18px 18px 0 0;
  padding:18px 16px calc(20px + env(safe-area-inset-bottom));max-height:72%;overflow-y:auto;
  transform:translateY(102%);transition:transform .34s cubic-bezier(.2,.9,.3,1)}
#sheet.open .sheet-card{transform:none}
.input{width:100%;border:1px solid var(--line);border-radius:10px;padding:11px 12px;font:inherit;
  font-size:14px;background:#fff;color:var(--ink)}
.input:focus{outline:2px solid var(--ink);outline-offset:0;border-color:transparent}

/* ---------- home line ---------- */
#homeline{position:fixed;left:50%;transform:translateX(-50%);bottom:5px;width:118px;height:4px;
  border-radius:100px;background:rgba(17,17,20,.28);z-index:120;padding:0;touch-action:none}
#homeline::before{content:"";position:absolute;left:-24px;right:-24px;top:-16px;bottom:-8px}
body:has(#view-feed.active) #homeline{background:rgba(255,255,255,.55)}

/* ---------- thread bubbles + composer ---------- */
.bubble{max-width:78%;padding:9px 12px;font-size:13.5px;line-height:1.4}
.bubble.them{align-self:flex-start;background:var(--bg-alt);border:1px solid var(--line-soft);
  border-radius:4px 14px 14px 14px}
.bubble.me{align-self:flex-end;background:var(--ink);color:#fff;border-radius:14px 14px 4px 14px}
.composer{display:flex;gap:8px;align-items:center;border:1px solid var(--line);border-radius:100px;
  padding:4px 6px 4px 16px;background:#fff}
.composer-input{flex:1;border:0;outline:0;font:inherit;font-size:13.5px;background:none;color:var(--ink);min-width:0}

/* ---------- feed action states ---------- */
.a-heart.liked svg{fill:#ff2d2d;stroke:#ff2d2d}
#btn-broadcast.is-live{background:var(--ink)!important}

/* ---------- idle screensaver (desktop only; torus) ---------- */
#saver{position:absolute;inset:0;z-index:1200;background:#000;opacity:0;pointer-events:none;transition:opacity .9s ease}
#saver.on{opacity:1;pointer-events:auto}
#saver canvas{display:block;width:100%;height:100%}

/* ---------- status bar (part of the phone fiction) ---------- */
#statusbar{position:fixed;top:env(safe-area-inset-top);left:0;right:0;z-index:300;display:flex;
  align-items:center;justify-content:space-between;padding:6px 18px 0;pointer-events:none;color:var(--ink)}
#sb-time{font-size:12.5px;font-weight:600;letter-spacing:.02em}
.sb-icons{display:flex;align-items:center;gap:5px}
.sb-icons b{font-size:10px;font-weight:700;letter-spacing:.04em}
body:has(#view-feed.active) #statusbar{color:#fff}
body.skin #statusbar{top:34px;padding-top:0}
.topbar{padding-top:calc(30px + env(safe-area-inset-top))}
#homescreen{padding-top:calc(64px + env(safe-area-inset-top))}
body.skin .topbar{padding-top:58px}
body.skin #homescreen{padding-top:74px}
.moment .m-top{top:calc(32px + env(safe-area-inset-top))}
body.skin .moment .m-top{top:60px}

/* notification: retract fully + fade (no bottom sliver), spring drop-in, clear the status bar */
#notif{top:calc(28px + env(safe-area-inset-top));transform:translateY(calc(-100% - 90px));opacity:0;
  transition:transform .45s cubic-bezier(.32,1.25,.32,1),opacity .3s ease}
#notif.show{transform:none;opacity:1}
body.skin #notif{top:60px}

/* WATCH zap OSD */
#watch-osd{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:3;
  font-family:var(--mono);font-size:9.5px;letter-spacing:.14em;color:#fff;background:rgba(17,17,20,.7);
  padding:3px 9px;border-radius:100px;opacity:0;transition:opacity .25s}
#watch-osd.show{opacity:1}

/* research: horizontal sub-scrollers must not trigger browser back-nav */
.chips,.rail{overscroll-behavior-x:contain}
.feed{overscroll-behavior-y:contain}
#view-genre{touch-action:pan-y}

/* app icon = the tight 3-knot braid */
.hs-icon.vivo > span{padding:0;overflow:hidden}
.hs-icon.vivo > span img{width:100%;height:100%;border-radius:inherit;display:block}
#notif .n-ic{overflow:hidden}
#notif .n-ic img{width:100%;height:100%;border-radius:inherit;display:block}
