/* ─────────────────────────────────────────────────────────────────────────────
   אינסטגרם בוטומט — design system
   Botomat base (Assistant 800/700, gray-900 primary, generous radii) + an
   Instagram-gradient accent used sparingly (rings, hero glow, brand mark).
   ───────────────────────────────────────────────────────────────────────────── */
:root {
  --ink: #0b0f19;
  --ink-2: #1f2937;
  --ink-3: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #f1f2f4;
  --line-2: #e6e8ec;
  --soft: #f7f8fa;
  --accent: #fbbf24;
  --ig-1: #feda75; --ig-2: #fa7e1e; --ig-3: #d62976; --ig-4: #962fbf; --ig-5: #4f5bd5;
  --ig: linear-gradient(45deg, var(--ig-1) 0%, var(--ig-2) 25%, var(--ig-3) 50%, var(--ig-4) 75%, var(--ig-5) 100%);
  --ig-conic: conic-gradient(from 0deg, var(--ig-1), var(--ig-2), var(--ig-3), var(--ig-4), var(--ig-5), var(--ig-1));
  --wa: #25d366;
  --r-lg: 14px; --r-xl: 18px; --r-2xl: 24px; --r-3xl: 32px;
  --sh-1: 0 1px 2px rgba(16,24,40,.05);
  --sh-2: 0 8px 24px -8px rgba(16,24,40,.14), 0 2px 6px -2px rgba(16,24,40,.06);
  --sh-3: 0 30px 60px -20px rgba(16,24,40,.28), 0 10px 24px -12px rgba(16,24,40,.12);
  --ease: cubic-bezier(.2,.8,.2,1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Assistant', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-weight: 600; color: var(--ink); background: #fff; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
::selection { background: rgba(214,41,118,.18); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.press { transition: transform .2s var(--ease), background .2s, box-shadow .2s, color .2s, opacity .2s; }
.press:active { transform: scale(.95); }

/* ── header ───────────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.78); backdrop-filter: saturate(1.8) blur(18px); -webkit-backdrop-filter: saturate(1.8) blur(18px);
  border-bottom: 1px solid rgba(230,232,236,.7);
  padding-top: var(--safe-t);
}
.top.clear { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.top-in { max-width: 1040px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; white-space: nowrap; letter-spacing: -.2px; }
.brand b { font-weight: 800; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--ig); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 6px 16px -6px rgba(214,41,118,.6); }
.top-search { position: relative; flex: 1; max-width: 340px; }

/* ── search field + suggestions (shared by hero + header) ─────────────────── */
.sfield { position: relative; }
.sfield input {
  width: 100%; font: inherit; font-weight: 700; color: var(--ink); background: var(--soft);
  border: 1.5px solid transparent; border-radius: 14px; padding: 10px 42px 10px 38px; outline: none;
  transition: all .2s var(--ease); font-size: 15px;
}
.sfield input::placeholder { color: var(--faint); font-weight: 600; }
.sfield input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(251,191,36,.16); }
.sfield input::-webkit-search-cancel-button { display: none; }
.sfield .s-ico { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; display: flex; }
.sfield .s-clear { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); color: var(--muted); display: grid; place-items: center; }
.sfield .s-spin { position: absolute; left: 12px; top: 50%; margin-top: -9px; width: 18px; height: 18px; border-width: 2.5px; }

.sfield.big input { font-size: 18px; padding: 20px 60px 20px 56px; border-radius: 22px; background: #fff; border: 1.5px solid var(--line-2); box-shadow: var(--sh-3); }
.sfield.big input:focus { border-color: var(--accent); box-shadow: var(--sh-3), 0 0 0 5px rgba(251,191,36,.18); }
.sfield.big .s-ico { right: 22px; color: var(--ink-3); }
.sfield.big .s-clear { left: 18px; width: 26px; height: 26px; }
.sfield.big .s-spin { left: 20px; margin-top: -11px; width: 22px; height: 22px; }

.suggest {
  position: absolute; top: calc(100% + 8px); right: 0; left: 0; z-index: 40;
  background: #fff; border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--sh-3);
  padding: 8px; max-height: min(70vh, 520px); overflow-y: auto; text-align: right;
  animation: pop .18s var(--ease);
}
.sfield.big + .suggest, .hero .suggest { border-radius: 24px; padding: 10px; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.s-label { font-size: 11px; font-weight: 800; color: var(--faint); letter-spacing: .14em; text-transform: uppercase; padding: 8px 12px 6px; }
.s-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; transition: background .15s; cursor: pointer; }
.s-row:hover, .s-row.on { background: var(--soft); }
.s-row .av { width: 46px; height: 46px; }
.s-main { min-width: 0; flex: 1; }
.s-user { font-weight: 800; display: flex; align-items: center; gap: 4px; font-size: 15px; }
.s-name { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-meta { color: var(--faint); font-size: 13px; white-space: nowrap; font-weight: 700; }
.s-empty { padding: 18px 14px; color: var(--muted); text-align: center; line-height: 1.6; }
.s-empty b { color: var(--ink); }
.s-sk { display: flex; align-items: center; gap: 12px; padding: 9px 10px; }
.s-sk .c { width: 46px; height: 46px; border-radius: 50%; }
.s-sk .l { height: 12px; border-radius: 6px; }

/* ── avatar ───────────────────────────────────────────────────────────────── */
.av { border-radius: 50%; object-fit: cover; background: var(--line); flex: none; }
.av-ph { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; background: linear-gradient(135deg, #c7cbd4, #9aa1ad); }
.verified { color: #1d9bf0; display: inline-flex; flex: none; }

/* ── home ─────────────────────────────────────────────────────────────────── */
.hero { position: relative; z-index: 5; padding: 70px 20px 40px; text-align: center; isolation: isolate; }
.hero-bg { position: absolute; inset: -64px 0 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.blob.b1 { width: 520px; height: 520px; background: radial-gradient(circle, #ffb36b 0%, rgba(255,179,107,0) 70%); top: -160px; right: -120px; }
.blob.b2 { width: 560px; height: 560px; background: radial-gradient(circle, #f15fa5 0%, rgba(241,95,165,0) 70%); top: -40px; left: -200px; animation-duration: 22s; opacity: .42; }
.blob.b3 { width: 480px; height: 480px; background: radial-gradient(circle, #8b7bff 0%, rgba(139,123,255,0) 70%); top: 160px; right: 25%; animation-duration: 26s; opacity: .32; }
@keyframes drift { to { transform: translate3d(40px, 30px, 0) scale(1.08); } }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,0) 40%, #fff 92%); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 12px; border-radius: 999px; background: rgba(255,255,255,.8); border: 1px solid var(--line-2); box-shadow: var(--sh-1); font-size: 13px; font-weight: 800; color: var(--ink-3); margin-bottom: 22px; backdrop-filter: blur(8px); }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.hero h1 { font-size: clamp(36px, 7.4vw, 68px); font-weight: 800; line-height: 1.04; letter-spacing: -1.6px; margin: 0 auto 16px; max-width: 820px; }
.hero h1 .grad { background: var(--ig); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .04em; }
.hero p.sub { color: var(--muted); font-weight: 600; margin: 0 auto 34px; max-width: 560px; font-size: clamp(16px, 2.2vw, 19px); line-height: 1.6; }
.hero .search-wrap { max-width: 640px; margin: 0 auto; position: relative; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 700; color: var(--ink-3); box-shadow: var(--sh-1); }
.chip:hover { border-color: #d6d9df; color: var(--ink); }

.recent { max-width: 1000px; margin: 30px auto 0; padding: 0 20px; }
.recent h3, .sec-h { font-size: 13px; font-weight: 800; color: var(--faint); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; text-align: center; }
.stories { display: flex; gap: 18px; overflow-x: auto; padding: 4px 4px 10px; justify-content: center; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { width: 84px; flex: none; text-align: center; }
.story .ring { width: 78px; height: 78px; margin: 0 auto 7px; }
.story .ring .av { width: 100%; height: 100%; }
.story span { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.story:hover .ring { transform: translateY(-3px); }

.ring { position: relative; border-radius: 50%; padding: 3px; background: var(--ig); transition: transform .3s var(--ease); display: block; }
.ring > .av, .ring > .av-ph { border: 3px solid #fff; width: 100% !important; height: 100% !important; }
.ring.live::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--ig-conic); animation: rot 6s linear infinite; z-index: 0; }
.ring.live > * { position: relative; z-index: 1; }
@keyframes rot { to { transform: rotate(360deg); } }

.features { position: relative; z-index: 1; max-width: 1000px; margin: 64px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { position: relative; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-3xl); padding: 26px 24px 24px; box-shadow: var(--sh-1); transition: transform .3s var(--ease), box-shadow .3s; overflow: hidden; }
.feat:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.feat .ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: #fff; margin-bottom: 16px; }
.feat:nth-child(1) .ic { background: linear-gradient(135deg, #fa7e1e, #d62976); }
.feat:nth-child(2) .ic { background: linear-gradient(135deg, #d62976, #962fbf); }
.feat:nth-child(3) .ic { background: linear-gradient(135deg, #962fbf, #4f5bd5); }
.feat b { display: block; font-size: 19px; font-weight: 800; margin-bottom: 4px; letter-spacing: -.2px; }
.feat span { color: var(--muted); font-size: 15px; line-height: 1.55; }

.foot { text-align: center; color: var(--faint); font-size: 13px; padding: 56px 16px calc(28px + var(--safe-b)); }
.foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* ── profile ──────────────────────────────────────────────────────────────── */
.app { min-height: 70vh; }
.cover { position: relative; height: 210px; overflow: hidden; margin-top: -65px; }
.cover-img { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(48px) saturate(1.6); transform: scale(1.15); opacity: .75; }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,.15) 0%, rgba(255,255,255,.55) 55%, #fff 100%); }
.prof { position: relative; max-width: 1000px; margin: -118px auto 0; padding: 0 28px; display: grid; grid-template-columns: auto 1fr; gap: 0 44px; align-items: end; }
.prof .ring { width: 176px; height: 176px; padding: 4px; box-shadow: 0 18px 40px -16px rgba(214,41,118,.45); }
.prof .ring > .av { border-width: 5px; }
.p-head { padding-bottom: 10px; min-width: 0; }
.p-name { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.6px; line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
.p-user { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 16px; margin-top: 4px; }
.p-user .ltr { color: var(--ink-3); }
.p-body { max-width: 1000px; margin: 22px auto 0; padding: 0 28px; display: grid; grid-template-columns: 1fr auto; gap: 22px 40px; align-items: start; }
.p-bio { white-space: pre-wrap; word-break: break-word; font-weight: 600; color: var(--ink-2); font-size: 16px; line-height: 1.65; max-width: 620px; }
.p-bio a { color: #1764c0; font-weight: 700; }
.p-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lchip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 12px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line-2); font-weight: 800; font-size: 14px; color: var(--ink-2); max-width: 100%; }
.lchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.lchip:hover { background: #fff; border-color: #d6d9df; }
.p-side { display: flex; flex-direction: column; gap: 12px; align-items: stretch; min-width: 300px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: #fff; border: 1px solid var(--line-2); border-radius: 18px; padding: 12px 10px; text-align: center; box-shadow: var(--sh-1); }
.stat b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.actions { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 14px; font-weight: 800; font-size: 14.5px; white-space: nowrap; transition: transform .2s var(--ease), background .2s, box-shadow .2s; }
.btn:active { transform: scale(.96); }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 8px 20px -10px rgba(11,15,25,.6); flex: 1; }
.btn-dark:hover { background: #000; }
.btn-soft { background: var(--soft); color: var(--ink); border: 1px solid var(--line-2); }
.btn-soft:hover { background: #fff; border-color: #d6d9df; }
.btn-wa { background: #effcf3; color: #128c4a; border: 1px solid #c9f1d6; }
.btn-wa:hover { background: #e3f9ea; }
.btn-ghost { color: var(--ink-3); padding: 9px 12px; }
.btn-ghost:hover { background: var(--soft); }
.private-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--muted); background: var(--soft); border: 1px solid var(--line-2); padding: 4px 10px; border-radius: 999px; margin-top: 8px; }

.tabbar { position: sticky; top: calc(64px + var(--safe-t)); z-index: 20; background: rgba(255,255,255,.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); margin-top: 30px; border-bottom: 1px solid var(--line); }
.tabs { position: relative; max-width: 1000px; margin: 0 auto; padding: 10px 28px; display: flex; gap: 6px; }
.tabs-seg { position: relative; display: inline-flex; background: var(--soft); border: 1px solid var(--line-2); border-radius: 14px; padding: 4px; }
.tab { position: relative; z-index: 1; display: flex; align-items: center; gap: 7px; padding: 8px 18px; font-size: 14.5px; font-weight: 800; color: var(--muted); border-radius: 10px; transition: color .25s; }
.tab.on { color: var(--ink); }
.tab-pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px -2px rgba(16,24,40,.18), 0 0 0 1px rgba(16,24,40,.04); transition: all .35s var(--ease); }
.tabs .count { margin-inline-start: auto; align-self: center; color: var(--faint); font-size: 13px; font-weight: 700; }

.gridwrap { max-width: 1000px; margin: 0 auto; padding: 18px 28px 0; }
.grid { display: grid; grid-template-columns: repeat(var(--grid-cols, 3), 1fr); gap: 10px; }
.grid.reels .cell { aspect-ratio: 9 / 16; }
.cell { position: relative; aspect-ratio: var(--cell-ratio, 4 / 5); background: var(--line); overflow: hidden; display: block; border-radius: 18px; isolation: isolate; animation: rise .55s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .4s; opacity: 0; }
.cell img.ok { opacity: 1; }
.cell::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.62) 0%, rgba(0,0,0,0) 55%); opacity: 0; transition: opacity .3s; z-index: 1; }
.cell .cap { position: absolute; right: 12px; left: 12px; bottom: 11px; z-index: 2; color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: 0; transform: translateY(6px); transition: all .3s var(--ease); text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.cell .cap small { display: block; font-size: 11.5px; opacity: .8; font-weight: 700; margin-top: 2px; }
@media (hover: hover) {
  .cell:hover img { transform: scale(1.045); }
  .cell:hover::after, .cell:hover .cap { opacity: 1; }
  .cell:hover .cap { transform: none; }
}
.badge { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border-radius: 10px; background: rgba(15,15,20,.42); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: 11.5px; font-weight: 800; direction: ltr; }
.more-row { display: flex; justify-content: center; padding: 30px 0; min-height: 90px; }

.state { text-align: center; padding: 64px 20px; max-width: 460px; margin: 0 auto; }
.state .ill { width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 28px; display: grid; place-items: center; background: var(--soft); border: 1px solid var(--line-2); color: var(--ink-3); }
.state h2 { font-weight: 800; margin: 0 0 8px; font-size: 24px; letter-spacing: -.3px; }
.state p { color: var(--muted); margin: 0 0 22px; line-height: 1.6; }
.state .row { display: flex; gap: 8px; justify-content: center; }

/* skeleton / spinner */
.sk { background: linear-gradient(90deg, #f1f2f4 25%, #e8eaee 37%, #f1f2f4 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.spin { display: inline-block; width: 26px; height: 26px; border: 3px solid var(--line-2); border-top-color: var(--ink); border-radius: 50%; animation: rot .7s linear infinite; }

/* ── post viewer ──────────────────────────────────────────────────────────── */
.viewer { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 34px 84px; animation: fade .22s var(--ease); }
.v-backdrop { position: absolute; inset: 0; background: rgba(8,10,16,.9); overflow: hidden; }
.v-backdrop .v-blur { position: absolute; inset: -80px; background-size: cover; background-position: center; filter: blur(60px) saturate(1.4) brightness(.55); opacity: .9; transition: background-image .3s; }
@keyframes fade { from { opacity: 0; } }
.v-close { position: fixed; top: calc(14px + var(--safe-t)); left: 16px; color: #fff; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; z-index: 5; background: rgba(255,255,255,.1); backdrop-filter: blur(8px); }
.v-close:hover { background: rgba(255,255,255,.2); }
.v-nav { position: fixed; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--ink); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.35); z-index: 5; transition: transform .2s var(--ease), background .2s; }
.v-nav:hover { background: #fff; transform: scale(1.06); }
.v-nav:active { transform: scale(.94); }
.v-prev { right: 20px; } .v-next { left: 20px; }
.v-card { position: relative; z-index: 2; background: #fff; border-radius: 22px; overflow: hidden; display: flex; width: min(1180px, 100%); height: min(88vh, 900px); box-shadow: 0 40px 100px -20px rgba(0,0,0,.6); animation: card .32s var(--ease); }
@keyframes card { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.v-media { flex: 1 1 auto; min-width: 0; background: #000; position: relative; display: flex; }
.v-side { width: 380px; flex: none; display: flex; flex-direction: column; }
.v-head { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.v-head .ring { width: 42px; height: 42px; padding: 2px; flex: none; }
.v-head .ring > .av { border-width: 2px; }
.v-head .u { font-weight: 800; display: flex; align-items: center; gap: 4px; font-size: 15px; }
.v-head .loc { font-size: 12.5px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 3px; }
.v-body { padding: 18px; overflow-y: auto; flex: 1; white-space: pre-wrap; word-break: break-word; font-weight: 600; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.v-body a { color: #1764c0; font-weight: 800; }
.v-body .nocap { color: var(--faint); }
.v-foot { padding: 14px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v-date { color: var(--muted); font-size: 13.5px; font-weight: 700; }
.v-acts { display: flex; gap: 6px; }
.v-acts .btn { padding: 9px 13px; font-size: 13.5px; border-radius: 12px; }

.car { position: relative; width: 100%; height: 100%; }
.car-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.car-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; background: #000; position: relative; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: contain; }
.car-btn { position: absolute; top: 50%; margin-top: -18px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center; z-index: 3; box-shadow: 0 4px 14px rgba(0,0,0,.3); transition: transform .2s var(--ease), opacity .2s; }
.car-btn:active { transform: scale(.9); }
.car-prev { right: 14px; } .car-next { left: 14px; }
.dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 3; pointer-events: none; }
.dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.5); transition: all .3s var(--ease); }
.dots i.on { background: #fff; width: 20px; }
.count-pill { position: absolute; top: 14px; left: 14px; background: rgba(0,0,0,.5); backdrop-filter: blur(8px); color: #fff; font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; z-index: 3; direction: ltr; }
.v-loading { position: relative; z-index: 2; display: grid; place-items: center; gap: 14px; color: rgba(255,255,255,.85); font-weight: 700; }
.v-loading .spin { border-color: rgba(255,255,255,.25); border-top-color: #fff; width: 34px; height: 34px; }
.v-err { position: relative; z-index: 2; color: #fff; }
.v-err .ill { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #fff; }
.v-err p { color: rgba(255,255,255,.7); }
.v-mhead { display: none; }
.v-grab { display: none; }

/* ── toast ───────────────────────────────────────────────────────────────── */
.toast { position: fixed; bottom: calc(26px + var(--safe-b)); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 16px; font-weight: 800; z-index: 90; box-shadow: 0 20px 40px -12px rgba(0,0,0,.45); animation: toast .3s var(--ease); display: flex; align-items: center; gap: 8px; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }
.noscript { text-align: center; padding: 40px; }

/* ── usage page ──────────────────────────────────────────────────────────── */
.usage { max-width: 1000px; margin: 0 auto; padding: 34px 24px 0; }
.u-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.u-title h1 { font-size: 30px; font-weight: 800; margin: 0; letter-spacing: -.5px; }
.u-title p { margin: 4px 0 0; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line-2); border-radius: 24px; padding: 18px 18px 16px; box-shadow: var(--sh-1); }
.kpi .k-l { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; }
.kpi .k-v { font-size: 30px; font-weight: 800; letter-spacing: -.6px; margin-top: 4px; direction: ltr; text-align: right; }
.kpi .k-s { color: var(--muted); font-size: 13px; font-weight: 700; margin-top: 2px; }
.kpi.hero-k { background: var(--ink); color: #fff; border-color: var(--ink); }
.kpi.hero-k .k-l { color: rgba(255,255,255,.55); }
.kpi.hero-k .k-s { color: rgba(255,255,255,.7); }
.panel { background: #fff; border: 1px solid var(--line-2); border-radius: 24px; padding: 20px; box-shadow: var(--sh-1); margin-top: 14px; }
.panel h2 { font-size: 16px; font-weight: 800; margin: 0 0 14px; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 150px; direction: ltr; }
.bars .b { flex: 1; background: linear-gradient(to top, #d62976, #fa7e1e); border-radius: 6px 6px 3px 3px; min-height: 3px; position: relative; opacity: .9; }
.bars .b:hover { opacity: 1; }
.bars .b.empty { background: var(--line); }
.bars-x { display: flex; justify-content: space-between; direction: ltr; color: var(--faint); font-size: 12px; font-weight: 700; margin-top: 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.kv:last-child { border: 0; }
.kv span { color: var(--muted); }
.note { color: var(--muted); font-size: 14px; line-height: 1.65; }
.meter { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: var(--ig); border-radius: 99px; }

/* ── mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .top-in { padding: 8px 14px; gap: 10px; height: 58px; }
  .brand-text { display: none; }
  .top-search { max-width: none; }
  .hero { padding: 42px 18px 20px; }
  .hero h1 { letter-spacing: -1px; }
  .sfield.big input { font-size: 16.5px; padding: 17px 52px 17px 48px; border-radius: 18px; }
  .sfield.big .s-ico { right: 18px; }
  .features { grid-template-columns: 1fr; margin-top: 40px; gap: 12px; }
  .feat { display: grid; grid-template-columns: auto 1fr; gap: 0 14px; padding: 18px; border-radius: 24px; }
  .feat .ic { grid-row: span 2; margin: 0; }
  .stories { justify-content: flex-start; }
  .cover { height: 150px; margin-top: -59px; }
  .prof { margin-top: -78px; padding: 0 16px; gap: 0 16px; }
  .prof .ring { width: 104px; height: 104px; padding: 3px; }
  .prof .ring > .av { border-width: 3px; }
  .p-head { padding-bottom: 2px; }
  .p-user { font-size: 14.5px; }
  .p-body { grid-template-columns: 1fr; padding: 0 16px; margin-top: 16px; gap: 16px; }
  .p-bio { font-size: 15px; }
  .p-side { min-width: 0; }
  .stat { padding: 10px 6px; border-radius: 16px; }
  .stat b { font-size: 18px; }
  .tabbar { top: calc(58px + var(--safe-t)); margin-top: 20px; }
  .tabs { padding: 8px 16px; }
  .tabs-seg { flex: 1; }
  .tab { flex: 1; justify-content: center; }
  .gridwrap { padding: 4px 0 0; }
  .grid { gap: 2px; }
  .cell { border-radius: 0; }
  .badge { top: 6px; left: 6px; padding: 4px 5px; border-radius: 8px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }

  .viewer { padding: 0; align-items: stretch; }
  .v-backdrop { background: #000; }
  .v-card { flex-direction: column; height: 100%; width: 100%; border-radius: 0; overflow-y: auto; background: #fff; animation: sheet .3s var(--ease); }
  @keyframes sheet { from { transform: translateY(24px); opacity: 0; } }
  .v-mhead { display: flex; position: sticky; top: 0; z-index: 4; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); padding-top: calc(12px + var(--safe-t)); padding-left: 64px; }
  .v-side .v-head { display: none; }
  .v-media { flex: none; height: min(76vh, calc(100vw * 1.25)); }
  .v-side { width: 100%; flex: 1 0 auto; }
  .v-nav { display: none; }
  .v-close { top: calc(10px + var(--safe-t)); left: 10px; color: var(--ink); background: var(--soft); width: 40px; height: 40px; }
  .v-foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ═════════════════════════════════════════════════════════════════════════════
   v3 — accounts, personal area, reels, admin
   ═════════════════════════════════════════════════════════════════════════════ */
.ring.plain { background: linear-gradient(135deg, #e9ebef, #d9dce2); box-shadow: none !important; }
.ring.small { width: 42px; height: 42px; padding: 2px; flex: none; }
.ring.small > .av { border-width: 2px; }
.story-tag { position: absolute; z-index: 2; bottom: -6px; left: 50%; transform: translateX(-50%); background: var(--ig); color: #fff; font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 2.5px solid #fff; white-space: nowrap; }
.story-new { position: absolute; z-index: 2; top: -2px; left: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #ef4444; color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; border: 2.5px solid #fff; }
.grow { flex: 1; }
.btn.sm { padding: 7px 12px; font-size: 13.5px; border-radius: 11px; }
.btn.big { width: 100%; padding: 14px 18px; font-size: 16px; border-radius: 16px; }
.btn.icon-only { padding: 10px 12px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.loading { opacity: .7; pointer-events: none; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-google { background: #fff; color: var(--ink); border: 1.5px solid var(--line-2); box-shadow: var(--sh-1); }
.btn-google:hover { border-color: #cfd3da; background: #fcfcfd; }
.danger-text { color: #dc2626; }
.center { display: grid; place-items: center; padding: 40px 0; }
.note { color: var(--muted); font-size: 14px; line-height: 1.65; margin: 0; }
.hint { color: var(--muted); font-size: 13.5px; margin: 10px 2px 0; }
.end-note { color: var(--faint); font-weight: 700; font-size: 13.5px; }
.dot-badge { position: absolute; top: -4px; left: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #ef4444; color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; font-style: normal; line-height: 1; }

/* header user area + menu */
.user-area { display: flex; align-items: center; gap: 8px; position: relative; }
.hdr-ic { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); }
.hdr-ic:hover { background: var(--soft); }
.hdr-me { border-radius: 50%; padding: 2px; border: 2px solid var(--line-2); display: flex; }
.hdr-me:hover { border-color: #cfd3da; }
.menu { position: absolute; top: calc(100% + 10px); left: 0; z-index: 50; width: 250px; background: #fff; border: 1px solid var(--line-2); border-radius: 20px; box-shadow: var(--sh-3); padding: 8px; animation: pop .18s var(--ease); }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head b { display: block; font-weight: 800; } .menu-head small { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-weight: 700; color: var(--ink-2); font-size: 14.5px; text-align: right; }
.menu a:hover, .menu button:hover { background: var(--soft); }
.menu .menu-admin { color: #b45309; }
.menu button { color: #dc2626; }

/* mobile tab bar */
.botnav { position: fixed; bottom: 0; right: 0; left: 0; z-index: 35; display: none; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.8) blur(16px); -webkit-backdrop-filter: saturate(1.8) blur(16px); border-top: 1px solid var(--line-2); padding: 6px 6px calc(6px + var(--safe-b)); }
.botnav a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--faint); font-size: 10.5px; font-weight: 800; }
.botnav a.on { color: var(--ink); }
.botnav a .av { width: 24px !important; height: 24px !important; font-size: 11px !important; }
.botnav a.on .av { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); }
.botnav .dot-badge { top: -2px; left: calc(50% - 22px); }

/* search lock */
.s-lock { padding: 18px 16px; text-align: center; display: grid; gap: 6px; justify-items: center; }
.s-lock-ic { width: 46px; height: 46px; border-radius: 15px; background: var(--soft); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-3); margin-bottom: 4px; }
.s-lock b { font-size: 16px; } .s-lock span { color: var(--muted); font-size: 14px; max-width: 360px; }
.s-lock-act { display: flex; gap: 8px; margin-top: 8px; }
.hero-gate { margin-top: 14px; color: var(--muted); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.hero-gate a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* dialogs */
.dlg-wrap { position: fixed; inset: 0; z-index: 110; background: rgba(11,15,25,.45); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.dlg-wrap.out { opacity: 0; transition: opacity .15s; }
.dlg { background: #fff; border-radius: 26px; padding: 26px 24px 20px; width: min(400px, 100%); box-shadow: var(--sh-3); text-align: center; animation: card .22s var(--ease); }
.dlg-ic { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 20px; background: var(--soft); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-2); }
.dlg h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.dlg p { margin: 0 0 14px; color: var(--muted); line-height: 1.6; }
.dlg .btn-google { width: 100%; margin-bottom: 4px; }
.dlg-act { display: flex; gap: 8px; margin-top: 10px; }
.dlg-act .btn { flex: 1; }

/* auth */
.auth { position: relative; min-height: calc(100vh - 64px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 16px 60px; isolation: isolate; }
.auth-bg { position: absolute; inset: -64px 0 0; z-index: -1; overflow: hidden; pointer-events: none; }
.auth-bg .b1 { top: -100px; right: -60px; } .auth-bg .b2 { bottom: -200px; left: -160px; top: auto; }
.auth-card { width: min(420px, 100%); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border: 1px solid var(--line-2); border-radius: 30px; padding: 30px 26px 26px; box-shadow: var(--sh-3); text-align: center; animation: card .3s var(--ease); }
.auth-brand { display: inline-flex; margin-bottom: 14px; }
.auth-brand .brand-mark { width: 54px; height: 54px; border-radius: 17px; }
.brand-mark.dark { background: var(--ink); box-shadow: 0 8px 20px -8px rgba(0,0,0,.5); }
.auth h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.auth-sub { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.auth-foot { margin-top: 18px; color: var(--muted); font-weight: 700; }
.auth-foot a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: 13px; font-weight: 700; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.form { display: grid; gap: 12px; text-align: right; }
.fld { display: grid; gap: 6px; text-align: right; }
.fld > span { font-size: 13px; font-weight: 800; color: var(--ink-3); }
.fld small { color: var(--faint); font-size: 12px; }
.fld input, .fld select { font: inherit; font-weight: 700; font-size: 16px; color: var(--ink); background: var(--soft); border: 1.5px solid transparent; border-radius: 14px; padding: 12px 14px; outline: none; transition: all .2s var(--ease); width: 100%; }
.fld input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(251,191,36,.16); }
.code-input { text-align: center; letter-spacing: 10px; font-size: 26px !important; font-family: ui-monospace, Menlo, monospace; }
.form-row { display: flex; justify-content: flex-start; margin-top: -4px; }
.muted-link { color: var(--muted); font-size: 13.5px; font-weight: 700; }
.muted-link:hover { color: var(--ink); }
.form-err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .fld { flex: 1; min-width: 200px; }

/* profile tools (filters / select) */
.tabs { align-items: center; }
.tools { margin-inline-start: auto; display: flex; gap: 6px; }
.tool { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; font-weight: 800; font-size: 13.5px; color: var(--muted); border: 1px solid transparent; }
.tool:hover { background: var(--soft); color: var(--ink); }
.tool.on { background: var(--ink); color: #fff; }
.filters { max-width: 1000px; margin: 0 auto; padding: 0 28px 12px; display: grid; gap: 10px; animation: pop .2s var(--ease); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips-row .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.fchip { padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 800; color: var(--ink-3); background: var(--soft); border: 1px solid var(--line-2); }
.fchip:hover { border-color: #cfd3da; }
.fchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cell .pick { position: absolute; top: 10px; right: 10px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid #fff; background: rgba(0,0,0,.25); color: transparent; display: none; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.grid.selecting .cell .pick { display: grid; }
.grid.selecting .cell.picked .pick { background: #3b82f6; color: #fff; }
.grid.selecting .cell.picked img { transform: scale(.92); border-radius: 14px; }
.grid.selecting .cell.picked { background: #dbeafe; }
.selbar { position: fixed; bottom: calc(20px + var(--safe-b)); left: 50%; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line-2); border-radius: 20px; padding: 8px 8px 8px 8px; box-shadow: var(--sh-3); animation: toast .25s var(--ease); white-space: nowrap; }
.selbar #selCount { font-weight: 800; padding: 0 10px; }
body.has-tabbar .selbar { bottom: calc(80px + var(--safe-b)); }

/* viewer meta */
.v-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--line); }
.v-stats { display: flex; gap: 12px; color: var(--ink-3); font-weight: 800; font-size: 14px; }
.v-stats span { display: inline-flex; align-items: center; gap: 4px; }
.v-foot { flex-wrap: wrap; justify-content: flex-start; }
.v-foot { flex-wrap: nowrap; }
.v-foot .btn-dark { flex: 1; min-width: 0; }
.v-foot .btn { white-space: nowrap; }

/* personal area */
.me { max-width: 720px; margin: 0 auto; padding: 26px 18px 0; }
.me-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.me-head h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.me-head span { color: var(--muted); font-size: 14px; }
.me-tabs { display: flex; gap: 4px; background: var(--soft); border: 1px solid var(--line-2); border-radius: 18px; padding: 5px; overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(72px + var(--safe-t)); z-index: 15; }
.me-tabs::-webkit-scrollbar { display: none; }
.me-tab { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 14px; border-radius: 13px; font-weight: 800; font-size: 14.5px; color: var(--muted); white-space: nowrap; transition: all .2s; }
.me-tab:hover { color: var(--ink); }
.me-tab.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -2px rgba(16,24,40,.18); }
.me-tab .dot-badge { position: static; border: 0; margin-inline-start: 2px; }
.me-body { padding-top: 18px; }
.onboard { text-align: center; padding: 30px 0 10px; }
.big-ill { width: 92px; height: 92px; margin: 0 auto 16px; border-radius: 30px; display: grid; place-items: center; color: #fff; background: var(--ig); box-shadow: 0 16px 36px -14px rgba(214,41,118,.55); }
.onboard h2 { font-size: 26px; font-weight: 800; margin: 0 0 8px; }
.onboard p { color: var(--muted); max-width: 440px; margin: 0 auto 22px; line-height: 1.6; }
.ob-search { max-width: 560px; margin: 0 auto; position: relative; text-align: right; }

/* feed */
.feed { display: grid; gap: 18px; }
.fcard { background: #fff; border: 1px solid var(--line-2); border-radius: 26px; overflow: hidden; box-shadow: var(--sh-1); animation: rise .45s var(--ease) both; }
.fc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.fc-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; font-size: 14.5px; }
.fc-time { color: var(--faint); font-size: 13px; font-weight: 700; white-space: nowrap; }
.new-pill { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #78350f; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.fc-media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; background: var(--line); overflow: hidden; cursor: zoom-in; }
.fc-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.fc-media img.ok { opacity: 1; }
.fc-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.fc-play svg { width: 64px; height: 64px; padding: 18px 16px 18px 20px; border-radius: 50%; background: rgba(0,0,0,.35); backdrop-filter: blur(6px); }
.fc-foot { padding: 12px 16px 14px; display: grid; gap: 8px; }
.fc-stats { display: flex; gap: 14px; font-weight: 800; color: var(--ink-2); font-size: 14px; }
.fc-stats span { display: inline-flex; align-items: center; gap: 5px; }
.fc-cap { margin: 0; color: var(--ink-2); font-weight: 600; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.fc-act { display: flex; gap: 6px; }
.sk-card { animation: none; }
.feed-div { text-align: center; padding: 22px 12px; display: grid; gap: 4px; justify-items: center; }
.feed-div span { display: inline-flex; align-items: center; gap: 6px; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; padding: 7px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.feed-div small { color: var(--muted); font-weight: 700; }
.caught { text-align: center; padding: 34px 16px; background: #fff; border: 1px solid var(--line-2); border-radius: 26px; }
.caught-ic { width: 70px; height: 70px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 14px 30px -12px rgba(5,150,105,.55); }
.caught h3 { margin: 0 0 6px; font-size: 21px; font-weight: 800; }
.caught p { margin: 0 0 16px; color: var(--muted); }

/* following / history / settings */
.panel-lite { position: relative; margin-bottom: 14px; }
.sec-h2 { font-size: 12px; font-weight: 800; color: var(--faint); letter-spacing: .12em; text-transform: uppercase; margin: 6px 4px 10px; }
.flist { display: grid; gap: 4px; }
.frow { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; transition: background .15s; }
.frow:hover { background: var(--soft); }
.frow .ring.small { width: 52px; height: 52px; }
.f-main { flex: 1; min-width: 0; display: grid; }
.f-main b { display: inline-flex; gap: 4px; align-items: center; }
.f-main span { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-meta { display: grid; justify-items: end; gap: 3px; } .f-meta small { color: var(--faint); font-size: 12px; white-space: nowrap; }
.hist-head { display: flex; align-items: center; justify-content: space-between; }
.hist { display: grid; gap: 2px; }
.hrow { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; font-weight: 700; }
.hrow:hover { background: var(--soft); }
.hrow > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow small { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.h-ic { width: 34px; height: 34px; border-radius: 11px; background: var(--soft); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-3); flex: none; }
.set-card { background: #fff; border: 1px solid var(--line-2); border-radius: 24px; padding: 20px; margin-bottom: 14px; box-shadow: var(--sh-1); }
.set-card h3 { margin: 0 0 14px; font-size: 17px; font-weight: 800; }
.set-card .kv { padding: 10px 0; }
.row-card { display: flex; gap: 10px; flex-wrap: wrap; }
.opts { display: grid; gap: 10px; }
.opts.three { grid-template-columns: repeat(3, 1fr); }
.opt { position: relative; display: grid; gap: 4px; padding: 14px 16px; border-radius: 18px; border: 1.5px solid var(--line-2); cursor: pointer; transition: all .2s; background: #fff; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt b { display: flex; align-items: center; gap: 7px; font-weight: 800; }
.opt span { color: var(--muted); font-size: 13.5px; }
.opt:hover { border-color: #cfd3da; }
.opt.on { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11,15,25,.07); }
.opt.on::after { content: ''; position: absolute; top: 14px; left: 14px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0 0 4px #fff, 0 0 0 1.5px var(--ink); }
.switch { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch > span { width: 44px; height: 26px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch > span::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch input:checked + span { background: #22c55e; }
.switch input:checked + span::after { transform: translateX(-18px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.switch small { color: var(--faint); font-weight: 600; }

/* reels — immersive */
body.reels-mode .top, body.reels-mode .botnav { display: none !important; }
body.reels-mode { overflow: hidden; background: #000; }
.reels { position: fixed; inset: 0; z-index: 45; background: #000; }
.reels-back { position: absolute; top: calc(12px + var(--safe-t)); right: 12px; z-index: 5; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.reels-title { position: absolute; top: calc(20px + var(--safe-t)); left: 0; right: 0; z-index: 4; text-align: center; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 6px; pointer-events: none; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.reels-track { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.reels-track::-webkit-scrollbar { display: none; }
.reel-slide { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; display: grid; place-items: center; background: #000; }
.reel-slide.loading .spin { border-color: rgba(255,255,255,.25); border-top-color: #fff; }
.reel-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(40px) brightness(.5) saturate(1.3); }
.reel-poster, .reel-video { position: relative; z-index: 1; width: 100%; height: 100%; max-width: 560px; object-fit: contain; }
.reel-slide.playing .reel-poster { display: none; }
.reel-video { position: absolute; inset: 0; margin: 0 auto; }
.reel-ui { position: absolute; inset: auto 0 0 0; z-index: 3; display: flex; align-items: flex-end; gap: 12px; padding: 80px 16px calc(24px + var(--safe-b)); background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0)); color: #fff; max-width: 560px; margin: 0 auto; }
.reel-info { flex: 1; min-width: 0; display: grid; gap: 6px; }
.reel-who { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.reel-who .av { border: 2px solid #fff; }
.reel-info p { margin: 0; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.reel-time { font-size: 12.5px; opacity: .85; display: inline-flex; align-items: center; gap: 4px; }
.reel-side { display: grid; gap: 12px; }
.rbtn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.rbtn:hover { background: rgba(255,255,255,.24); }
.reel-slide.end { padding: 20px; }
.reel-slide.end .caught { background: rgba(255,255,255,.96); max-width: 420px; }
.hint-scroll { color: #fff; font-weight: 800; text-align: center; margin-top: 14px; opacity: .9; }

/* admin */
.adm { max-width: 1240px; margin: 0 auto; padding: 24px 20px 0; display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.adm-nav { position: sticky; top: calc(84px + var(--safe-t)); display: grid; gap: 4px; background: #fff; border: 1px solid var(--line-2); border-radius: 22px; padding: 10px; box-shadow: var(--sh-1); }
.adm-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; color: var(--faint); letter-spacing: .1em; padding: 6px 10px 10px; }
.adm-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 13px; font-weight: 800; color: var(--muted); transition: all .15s; }
.adm-link:hover { background: var(--soft); color: var(--ink); }
.adm-link.on { background: var(--ink); color: #fff; }
.adm-main { min-width: 0; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.adm-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.adm-head p { margin: 4px 0 0; color: var(--muted); }
.adm-head p a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.kpi .k-v small { font-size: 15px; font-weight: 700; color: var(--muted); }
.panel h2 { display: flex; align-items: center; justify-content: space-between; }
.mini-link { font-size: 13px; color: var(--muted); font-weight: 700; }
.bars2 { display: flex; align-items: flex-end; gap: 8px; height: 170px; direction: ltr; padding-bottom: 18px; }
.bcol { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; position: relative; }
.bcol .b { width: 40%; border-radius: 5px 5px 2px 2px; min-height: 2px; }
.bcol .b.v { background: linear-gradient(to top, #d62976, #fa7e1e); }
.bcol .b.s { background: linear-gradient(to top, #4f5bd5, #962fbf); }
.bcol small { position: absolute; bottom: -18px; font-size: 11px; color: var(--faint); font-weight: 700; }
.legend { display: flex; gap: 16px; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.legend .lv { background: #d62976; } .legend .ls { background: #4f5bd5; }
.evs { display: grid; }
.ev { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 14px; min-width: 0; }
.ev:last-child { border: 0; }
.ev-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ev-t a { color: #1764c0; }
.ev-t small { color: var(--faint); }
.ev-at { color: var(--faint); white-space: nowrap; font-size: 12.5px; }
.ev-dev { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; font-size: 12.5px; }
.ev-dev:hover { color: var(--ink); }
.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.c-blue { background: #eff6ff; color: #1d4ed8; } .c-violet { background: #f5f3ff; color: #6d28d9; } .c-pink { background: #fdf2f8; color: #be185d; }
.c-green { background: #ecfdf5; color: #047857; } .c-amber { background: #fffbeb; color: #b45309; } .c-teal { background: #f0fdfa; color: #0f766e; }
.c-red { background: #fef2f2; color: #b91c1c; } .c-gray { background: var(--soft); color: var(--muted); }
.who-u { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-a { color: var(--faint); font-size: 13px; font-weight: 700; }
.toolbar { display: grid; gap: 10px; margin-bottom: 14px; }
.toolbar .sfield { max-width: 420px; }
.tbl-wrap { background: #fff; border: 1px solid var(--line-2); border-radius: 22px; overflow: auto; box-shadow: var(--sh-1); }
.tbl-meta { color: var(--muted); font-weight: 700; font-size: 13px; padding: 12px 16px 0; }
.tbl { width: 100%; border-collapse: collapse; min-width: 760px; }
.tbl th { text-align: right; font-size: 11.5px; font-weight: 800; color: var(--faint); letter-spacing: .08em; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.tbl tr[data-vid], .tbl tr[data-uid] { cursor: pointer; transition: background .15s; }
.tbl tr[data-vid]:hover, .tbl tr[data-uid]:hover { background: var(--soft); }
.tbl tr.is-blocked td { background: #fff7f7; }
.tbl small { color: var(--muted); font-size: 12.5px; }
.dev, .loc2 { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dev b, .loc2 b { display: block; font-weight: 800; font-size: 14px; }
.dev small, .loc2 small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev.line { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.dev-ic { width: 34px; height: 34px; border-radius: 11px; background: var(--soft); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-3); flex: none; }
.dev-ic.big { width: 52px; height: 52px; border-radius: 16px; }
.flag { font-size: 22px; line-height: 1; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; color: var(--muted); font-weight: 700; }
.drawer-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(11,15,25,.35); animation: fade .15s; }
.drawer-wrap.out { opacity: 0; transition: opacity .2s; }
.drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(520px, 100%); background: #fff; box-shadow: var(--sh-3); overflow-y: auto; animation: slide .28s var(--ease); }
@keyframes slide { from { transform: translateX(-30px); opacity: 0; } }
.dr-close { position: sticky; top: 12px; margin: 12px 12px 0 auto; float: left; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); z-index: 2; }
.dr-body { padding: 18px 22px 30px; clear: both; }
.dr-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.dr-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.dr-head p { margin: 2px 0 0; color: var(--muted); }
.kvs { margin-bottom: 14px; }
.kv .ua { display: block; max-width: 300px; font-size: 11.5px; color: var(--muted); word-break: break-all; text-align: left; }
.dr-sec { font-size: 13px; font-weight: 800; color: var(--faint); letter-spacing: .1em; margin: 22px 0 8px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.grid-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sticky-save { position: sticky; bottom: 16px; display: flex; justify-content: flex-start; margin: 14px 0; z-index: 5; }
.sticky-save .btn { box-shadow: var(--sh-3); padding: 13px 26px; }
.invs { display: grid; gap: 8px; margin-top: 14px; }
.inv { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 16px; }
.inv > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.inv small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv.revoked { opacity: .55; }

@media (max-width: 960px) {
  .adm { grid-template-columns: 1fr; padding-top: 14px; }
  .adm-nav { position: static; display: flex; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .adm-title { display: none; }
  .adm-link { white-space: nowrap; }
  .grid-fields, .opts.three { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .botnav { display: flex; }
  body.has-tabbar .app { padding-bottom: calc(76px + var(--safe-b)); }
  body.has-tabbar .toast { bottom: calc(86px + var(--safe-b)); }
  .hdr-ic { display: none; }
  .hdr-login { padding: 7px 12px; }
  .tools .tool span { display: none; }
  .filters { padding: 0 16px 10px; }
  .me { padding: 16px 12px 0; }
  .me-head { display: none; }
  .me-tabs { top: calc(66px + var(--safe-t)); border-radius: 16px; }
  .me-tab { padding: 9px 10px; font-size: 13.5px; }
  .me-tab span { display: none; }
  .me-tab.on span { display: inline; }
  .fcard { border-radius: 0; border-left: 0; border-right: 0; margin: 0 -12px; }
  .adm-head h1 { font-size: 23px; }
  .auth-card { padding: 24px 18px 20px; border-radius: 26px; }
  .selbar { max-width: calc(100% - 24px); }
  .selbar #selAll { display: none; }
}
.inline-form > .btn { flex: none; }

/* ═══ v4 — refresh-on-open, recommendations, insights ═══ */
.spin.sm { width: 15px; height: 15px; border-width: 2px; }
.refresh-pill { position: sticky; top: calc(140px + var(--safe-t)); z-index: 14; margin: 0 auto 12px; width: max-content; max-width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); box-shadow: var(--sh-2); font-weight: 800; font-size: 13.5px; color: var(--ink-3); transition: opacity .4s, transform .4s; }
.refresh-pill.new { background: var(--ink); color: #fff; border-color: var(--ink); cursor: pointer; animation: pop .3s var(--ease); }
.refresh-pill.ok { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.refresh-pill.gone { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.fc-why { display: flex; align-items: center; gap: 6px; padding: 0 16px 10px; color: #7c3aed; font-weight: 800; font-size: 13px; }
.reel-why { display: inline-flex; align-items: center; gap: 5px; width: max-content; background: rgba(255,255,255,.18); backdrop-filter: blur(8px); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.reel-why.new { background: #fbbf24; color: #78350f; }
.ins-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.ins-kpis > div { background: var(--soft); border: 1px solid var(--line-2); border-radius: 18px; padding: 12px; text-align: center; }
.ins-kpis b { display: block; font-size: 20px; font-weight: 800; }
.ins-kpis span { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.ins-sec { margin-top: 18px; }
.ins-sec h4 { margin: 0 0 10px; font-size: 13px; font-weight: 800; color: var(--faint); letter-spacing: .08em; }
.ins-two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.heat-grid { display: grid; grid-template-columns: 26px repeat(24, 1fr); gap: 3px; direction: ltr; }
.heat-grid i { aspect-ratio: 1; border-radius: 4px; display: block; min-width: 0; }
.heat-day { font-size: 11.5px; font-weight: 800; color: var(--muted); display: grid; place-items: center; }
.heat-hours { display: grid; grid-template-columns: 26px repeat(24, 1fr); direction: ltr; margin-top: 4px; font-size: 10.5px; color: var(--faint); font-weight: 700; }
.heat-leg { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 8px; font-size: 11.5px; color: var(--faint); font-weight: 700; direction: ltr; }
.heat-leg i { width: 14px; height: 14px; border-radius: 4px; }
.cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.ctag { padding: 5px 11px; border-radius: 999px; font-weight: 800; font-size: calc(12px + var(--w) * 6px); background: rgba(214,41,118, calc(.06 + var(--w) * .2)); color: rgb(calc(120 + var(--w) * 70), 30, calc(80 + var(--w) * 40)); border: 1px solid rgba(214,41,118,.12); }
.ins-acct { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-weight: 800; font-size: 13.5px; }
.ins-acct span { width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-acct i, .ins-type i { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; display: block; }
.ins-acct i b, .ins-type i b { display: block; height: 100%; border-radius: 99px; background: var(--ig); }
.ins-type { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-weight: 800; font-size: 13.5px; }
.ins-type span { width: 70px; } .ins-type small { width: 36px; color: var(--muted); text-align: left; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 800; font-size: 13.5px; margin-bottom: 12px; }
.back-link:hover { color: var(--ink); }
.up-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.up-id { flex: 1; min-width: 200px; }
.up-id h1 { margin: 0; font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.up-id p { margin: 2px 0; color: var(--ink-3); font-weight: 700; text-align: right; }
.up-id small { color: var(--muted); }
.seg-tabs { display: flex; gap: 4px; background: var(--soft); border: 1px solid var(--line-2); border-radius: 16px; padding: 4px; margin: 16px 0 0; overflow-x: auto; scrollbar-width: none; }
.seg { padding: 9px 14px; border-radius: 12px; font-weight: 800; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -2px rgba(16,24,40,.18); }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.vcell { position: relative; border-radius: 16px; overflow: hidden; background: var(--line); aspect-ratio: 4 / 5; display: block; }
.vcell img { width: 100%; height: 100%; object-fit: cover; }
.vcell::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0) 55%); }
.vbadge { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(6px); }
.vbar { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: rgba(255,255,255,.3); z-index: 3; }
.vbar b { display: block; height: 100%; background: #fbbf24; }
.vmeta { position: absolute; bottom: 10px; right: 10px; left: 10px; z-index: 2; color: #fff; display: grid; font-size: 12.5px; }
.vmeta small { opacity: .85; font-size: 11.5px; }
@media (max-width: 760px) {
  .refresh-pill { top: calc(124px + var(--safe-t)); }
  .ins-kpis { grid-template-columns: 1fr 1fr; }
  .ins-two { grid-template-columns: 1fr; }
  .heat-grid, .heat-hours { grid-template-columns: 20px repeat(24, 1fr); gap: 2px; }
  .heat-grid i { border-radius: 2px; }
  .fcard .fc-why { padding: 0 14px 8px; }
}

.ins-learn { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 14px; border-radius: 16px; background: #f5f3ff; border: 1px solid #ddd6fe; color: #5b21b6; font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.ins-learn span { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ins-learn small { color: #7c3aed; opacity: .8; }
.ctag.neg { background: var(--soft); color: var(--muted); border-color: var(--line-2); font-size: 12.5px; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.vflag { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.vflag.skip { background: #fee2e2; color: #b91c1c; }
.vflag.full { background: #dcfce7; color: #15803d; }

/* ═══ v6 — advanced search ═══ */
.s-all { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; padding: 11px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line-2); font-weight: 800; color: var(--ink); }
.s-all:hover { background: #fff; border-color: #cfd3da; }
.s-all span { margin-inline-start: auto; color: var(--muted); }
.srch { max-width: 900px; margin: 0 auto; padding: 26px 18px 0; }
.srch-bar { margin-bottom: 14px; }
.srch-tools { display: grid; gap: 10px; margin-bottom: 14px; }
.srch-row2 { display: flex; gap: 10px; align-items: center; }
.srch-row2 .sfield { flex: 1; }
.sel { display: inline-flex; align-items: center; gap: 8px; background: var(--soft); border: 1.5px solid var(--line-2); border-radius: 14px; padding: 4px 6px 4px 12px; font-weight: 800; font-size: 13.5px; color: var(--muted); }
.sel select { font: inherit; font-weight: 800; color: var(--ink); background: transparent; border: 0; outline: none; padding: 6px 4px; cursor: pointer; }
.srch-meta { color: var(--muted); font-weight: 700; margin: 4px 4px 10px; min-height: 20px; }
.srch-meta b { color: var(--ink); } .srch-meta span { color: var(--ink); }
.srch-list { display: grid; gap: 8px; }
.rcard { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #fff; border: 1px solid var(--line-2); border-radius: 22px; box-shadow: var(--sh-1); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; animation: rise .35s var(--ease) both; }
.rcard:hover { border-color: #d6d9df; box-shadow: var(--sh-2); transform: translateY(-1px); }
.rcard:active { transform: scale(.99); }
.rc-av { flex: none; position: relative; }
.rc-av .av { width: 64px !important; height: 64px !important; }
.rc-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rc-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rc-name { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-user { color: var(--muted); font-weight: 700; font-size: 13.5px; text-align: right; }
.rc-bio { color: var(--ink-3); font-size: 13.5px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.rc-stats { flex: none; display: grid; justify-items: center; gap: 2px; min-width: 70px; }
.rc-stats b { font-size: 18px; font-weight: 800; }
.rc-stats span { color: var(--muted); font-size: 12px; font-weight: 700; }
.more-note { color: var(--muted); font-weight: 700; margin-inline-start: 10px; }
.s-lock.big { background: #fff; border: 1px solid var(--line-2); border-radius: 26px; padding: 34px 20px; }
@media (max-width: 760px) {
  .srch { padding: 14px 12px 0; }
  .srch-row2 { flex-wrap: wrap; }
  .srch-row2 .sfield { flex-basis: 100%; }
  .rcard { padding: 10px 12px; gap: 11px; border-radius: 18px; }
  .rc-av .av { width: 52px !important; height: 52px !important; }
  .rc-stats { min-width: 54px; }
  .rc-stats b { font-size: 15.5px; }
  .chips-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .chips-row::-webkit-scrollbar { display: none; }
  .fchip { white-space: nowrap; }
}

/* ═══ v7 — personalization, immersive viewer, reels controller ═══ */
#app { zoom: var(--zoom, 1); }
body.reels-mode #app { zoom: 1; }
:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
:root[data-gridcap="0"] .cell .cap, :root[data-gridcap="0"] .cell::after { display: none !important; }
:root[data-vblur="0"] .v-blur { display: none; }
:root[data-vblur="0"] .v-backdrop { background: rgba(8,10,16,.94); }
/* density */
:root[data-density="compact"] .grid { gap: 3px; }
:root[data-density="compact"] .feed { gap: 8px; }
:root[data-density="compact"] .rcard { padding: 8px 10px; gap: 10px; }
:root[data-density="compact"] .srch-list { gap: 5px; }
:root[data-density="compact"] .set-card, :root[data-density="compact"] .panel { padding: 14px; }
:root[data-density="compact"] .fc-foot { padding: 8px 12px 10px; }
:root[data-density="compact"] .p-body { margin-top: 12px; }
/* corners */
:root[data-corners="soft"] :is(.cell, .fcard, .rcard, .panel, .kpi, .stat, .set-card, .v-card, .auth-card, .suggest, .feat, .caught, .tbl-wrap, .vcell, .dlg) { border-radius: 12px !important; }
:root[data-corners="square"] :is(.cell, .fcard, .rcard, .panel, .kpi, .stat, .set-card, .v-card, .auth-card, .suggest, .feat, .caught, .tbl-wrap, .vcell, .dlg) { border-radius: 3px !important; }
:root[data-corners="square"] :is(.btn, .fchip, .lchip, .tab, .tabs-seg, .me-tabs, .me-tab, .seg-tabs, .seg, .sfield input, .fld input, .chip, .tool) { border-radius: 4px !important; }
/* feed as grid */
:root[data-feedlayout="grid"] .feed { display: grid; grid-template-columns: repeat(var(--grid-cols, 3), 1fr); gap: 4px; }
:root[data-feedlayout="grid"] .fcard { border-radius: 10px; border: 0; box-shadow: none; position: relative; }
:root[data-feedlayout="grid"] .fcard .fc-head, :root[data-feedlayout="grid"] .fcard .fc-foot, :root[data-feedlayout="grid"] .fcard .fc-why { display: none; }
:root[data-feedlayout="grid"] .fcard .fc-media { aspect-ratio: var(--cell-ratio, 4 / 5); }
:root[data-feedlayout="grid"] .fcard .fc-play svg { width: 38px; height: 38px; padding: 10px; }
:root[data-feedlayout="grid"] :is(.feed-div, .caught, .onboard) { grid-column: 1 / -1; }
:root[data-feedlayout="grid"] .sk-card { display: none; }

/* ── viewer: transitions + "media only" layout + edge taps ── */
.v-card.enter-next { animation: inNext .28s var(--ease); }
.v-card.enter-prev { animation: inPrev .28s var(--ease); }
@keyframes inNext { from { opacity: .3; transform: translateX(-46px); } }
@keyframes inPrev { from { opacity: .3; transform: translateX(46px); } }
.v-card.bump-next { animation: bumpN .35s var(--ease); } .v-card.bump-prev { animation: bumpP .35s var(--ease); }
@keyframes bumpN { 40% { transform: translateX(-14px); } } @keyframes bumpP { 40% { transform: translateX(14px); } }
.v-loading .v-ph { position: absolute; max-width: min(80vw, 700px); max-height: 80vh; object-fit: contain; border-radius: 14px; opacity: .35; filter: blur(2px); }
.v-loading { position: relative; }
.edge { position: absolute; top: 12%; bottom: 22%; width: 16%; z-index: 2; background: transparent; border: 0; padding: 0; display: none; -webkit-tap-highlight-color: transparent; }
.edge-next { left: 0; } .edge-prev { right: 0; }
.edge:disabled { pointer-events: none; }
.v-mbar { display: none; }
.v-mini { display: none; }
.viewer.mode-media { padding: 0; }
.viewer.mode-media .v-card { width: 100%; height: 100%; border-radius: 0 !important; background: transparent; box-shadow: none; }
.viewer.mode-media .v-side, .viewer.mode-media .v-mhead { display: none !important; }
.viewer.mode-media .v-media { background: transparent; height: 100% !important; flex: 1; }
.viewer.mode-media .slide { background: transparent; }
.viewer.mode-media .edge { display: block; }
.viewer.mode-media .v-mbar { display: grid; gap: 8px; position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 60px 18px calc(18px + var(--safe-b)); background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0)); color: #fff; pointer-events: none; }
.viewer.mode-media .v-mbar > * { pointer-events: auto; }
.viewer.mode-media .v-mwho .v-head { display: flex; border: 0; padding: 0; }
.viewer.mode-media .v-mwho .u { color: #fff; }
.viewer.mode-media .v-mwho .loc { color: rgba(255,255,255,.8); }
.viewer.mode-media .v-macts { position: absolute; left: 14px; bottom: calc(18px + var(--safe-b)); display: grid; gap: 10px; }
.mbtn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.mbtn:hover { background: rgba(255,255,255,.26); }
.v-mcap { margin: 0; max-width: calc(100% - 70px); font-weight: 600; line-height: 1.45; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.viewer.mode-media .dots { bottom: auto; top: 18px; }
.viewer.mode-media .count-pill { top: 16px; left: auto; right: 70px; }
.viewer.mode-media .v-close { color: #fff; background: rgba(255,255,255,.14); }
.viewer.mode-media .v-nav { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); box-shadow: none; }
@media (max-width: 760px) {
  .viewer:not(.mode-media) .edge { display: block; top: 0; bottom: 0; width: 14%; }
  .viewer.mode-media .v-media { height: 100% !important; }
}

/* ── reels: real viewport height, controls ── */
.reels { height: 100dvh; }
.reels-track { height: 100dvh; touch-action: pan-y; }
.reel-slide { height: 100dvh; }
.reel-video { pointer-events: none; }
.reels.no-cap .reel-info p { display: none; }
.reels-mute { position: absolute; top: calc(12px + var(--safe-t)); left: 12px; z-index: 5; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.reels-nav { position: absolute; z-index: 5; left: 24px; top: 50%; transform: translateY(-50%); display: grid; gap: 12px; }
.reels-nav button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.14); backdrop-filter: blur(8px); }
.reels-nav button svg { transform: rotate(90deg); }
.reels-nav button:hover { background: rgba(255,255,255,.26); }
@media (hover: none), (max-width: 760px) { .reels-nav { display: none; } }

/* ── personalization panel ── */
.pp { display: grid; gap: 6px; }
.pp-sec { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pp-sec:last-of-type { border-bottom: 0; }
.pp-sec h4 { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.swatch { display: grid; justify-items: center; gap: 6px; padding: 8px 4px; border-radius: 16px; border: 2px solid transparent; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.swatch i { width: 40px; height: 40px; border-radius: 13px; background: var(--g); box-shadow: 0 6px 14px -6px rgba(0,0,0,.35); }
.swatch.on { border-color: var(--ink); background: var(--soft); }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-weight: 800; font-size: 14px; flex-wrap: wrap; }
.prow > span { color: var(--ink-2); }
.switch.prow { justify-content: flex-start; }
.switch b small { display: block; color: var(--faint); font-weight: 600; font-size: 12px; }
.pseg { display: inline-flex; background: var(--soft); border: 1px solid var(--line-2); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.pseg button { padding: 7px 12px; border-radius: 9px; font-weight: 800; font-size: 13px; color: var(--muted); }
.pseg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px -2px rgba(16,24,40,.2); }
.pp-preview { display: grid; grid-template-columns: repeat(var(--grid-cols, 3), 1fr); gap: 4px; max-width: 260px; margin-top: 10px; }
.pp-preview i { aspect-ratio: var(--cell-ratio, 4 / 5); border-radius: 6px; background: linear-gradient(135deg, hsl(var(--h) 70% 82%), hsl(calc(var(--h) + 40) 70% 70%)); }
.pp-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; color: var(--faint); font-size: 12.5px; font-weight: 700; }
@media (max-width: 760px) { .swatches { grid-template-columns: repeat(3, 1fr); } }
