/* =====================================================================
   ShotGram · design system v4
   Dark surface, brand gradient kept from the logo (cyan → violet → magenta).
   ===================================================================== */

:root {
  --ink: #06070f;
  --surface: #0e0f1c;
  --surface-2: #16172b;
  --surface-3: #1e1f39;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);

  --text: #f4f5ff;
  --muted: #9498bd;
  --dim: #6a6e93;

  --cyan: #00d8ff;
  --magenta: #ff2ed1;
  --violet: #8b5cff;
  --blue: #3f92ff;
  --ok: #2fe3a0;
  --bad: #ff4e6b;
  --like: #ff3355;

  --brand: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 52%, var(--magenta) 100%);
  --ring: conic-gradient(from 200deg, #ffc53d, var(--magenta), var(--violet), var(--cyan), #ffc53d);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;

  --shadow: 0 18px 60px rgba(0, 0, 0, .55);
  --shell: 540px;
  --bar-h: 58px;
  --top-h: 56px;

  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; min-height: 100%;
  background: var(--ink); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100dvh; overflow-x: hidden; overscroll-behavior-y: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img, video { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.03em; font-weight: 800; }
h1 { font-size: 32px; line-height: 1.06; letter-spacing: -.05em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; }
svg { width: 24px; height: 24px; flex: none; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 8px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 99px; }

/* ------------------------------------------------------------ utilities */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack-tight { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { text-align: center; }
.block { display: block; }
.accent { color: var(--blue); }
.danger-text { color: var(--bad); }
.strong { font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.wordmark {
  font-weight: 800; font-size: 20px; letter-spacing: -.05em;
  background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------------------------------------------------------- shell */
.app-shell {
  min-height: 100dvh;
  width: min(var(--shell), 100%);
  margin-inline: auto;
  position: relative;
  background: var(--ink);
  border-inline: 1px solid var(--line);
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  background: rgba(6, 7, 15, .88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 8px; }
.topbar .brand img { width: 26px; height: 26px; object-fit: contain; }

.screen {
  padding: 10px 0 calc(var(--bar-h) + 22px + env(safe-area-inset-bottom));
  min-height: calc(100dvh - var(--top-h));
}
.screen.full { padding: 0; }

.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(var(--shell), 100%);
  height: calc(var(--bar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: rgba(6, 7, 15, .94);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  z-index: 50;
}
.tab { display: grid; place-items: center; height: 100%; color: var(--muted); }
.tab.active { color: var(--text); }
.tab.active svg { stroke-width: 2.2; }
.tab-avatar .avatar { border: 2px solid transparent; }
.tab.active .tab-avatar .avatar { border-color: var(--text); }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px; color: var(--text);
}
.icon-btn.plain { width: auto; height: auto; padding: 6px; }
.icon-btn:active { background: rgba(255, 255, 255, .06); }
.badge-host { position: relative; }
.count-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 99px; background: var(--bad); color: #fff;
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
}

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
  transition: transform .08s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--blue); border-color: transparent; color: #fff; }
.btn.secondary { background: var(--surface-3); }
.btn.ghost { background: var(--surface-2); }
.btn.danger { background: var(--bad); border-color: transparent; color: #fff; }
.btn.block { width: 100%; }
.btn.small { padding: 6px 14px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .5; }

.link-plain { color: inherit; font-size: inherit; }
.link-btn { color: var(--blue); font-weight: 600; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted);
}
.chip svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------- inputs */
.input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  outline: none;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--line-strong); }
.input.area { resize: vertical; min-height: 84px; }
.input.bare { background: none; border: 0; padding: 10px 2px; }
.input.good { border-color: var(--ok); }
.input.bad { border-color: var(--bad); }

.form { display: flex; flex-direction: column; gap: 14px; padding: 0 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.field-hint { font-size: 12px; color: var(--dim); }
.form-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.password-wrap { position: relative; }
.password-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12.5px; color: var(--muted); font-weight: 600;
}

.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3);
  transition: background .18s ease;
}
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform .18s ease;
}
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(18px); }

.seg {
  display: flex; gap: 4px; padding: 4px; margin: 10px 14px;
  background: var(--surface-2); border-radius: 12px;
}
.seg button {
  flex: 1; padding: 8px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--muted);
}
.seg button.active { background: var(--surface-3); color: var(--text); }

/* -------------------------------------------------------------- notices */
.notice {
  padding: 11px 13px; border-radius: 12px; font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.notice.error { border-color: rgba(255, 78, 107, .45); color: #ffd3da; background: rgba(255, 78, 107, .08); }
.notice.success { border-color: rgba(47, 227, 160, .4); color: #c9ffe9; background: rgba(47, 227, 160, .07); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 20px); transform: translateX(-50%);
  z-index: 200; max-width: min(420px, calc(100% - 28px));
  padding: 11px 16px; border-radius: 12px; font-size: 13.5px;
  background: #22243f; border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  animation: toastIn .18s ease;
}
.toast.error { background: #40202b; border-color: rgba(255, 78, 107, .5); }
.toast.success { background: #17392f; border-color: rgba(47, 227, 160, .45); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }

.offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  padding: 7px 12px; text-align: center; font-size: 12.5px;
  background: #402a12; color: #ffdcae;
}

/* ------------------------------------------------------------ loading */
.loading { display: grid; place-items: center; padding: 34px; }
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .14); border-top-color: var(--cyan);
  animation: spin .8s linear infinite;
}
.spinner.sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s infinite;
  border-radius: 10px;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.skeleton.row-sk { height: 58px; margin: 8px 14px; }
.skeleton.circle { width: 42px; height: 42px; border-radius: 50%; }
.skeleton.circle.lg { width: 62px; height: 62px; }
.skeleton.line { height: 12px; }
.skeleton.square { aspect-ratio: 1; border-radius: 0; }
.skeleton.tile { aspect-ratio: 1; border-radius: 2px; }

.empty { padding: 44px 24px; text-align: center; display: grid; gap: 6px; justify-items: center; }
.empty-icon {
  display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 8px;
  border-radius: 50%; border: 2px solid var(--line-strong); color: var(--muted);
}
.empty-icon.big { width: 82px; height: 82px; }
.empty-icon svg { width: 30px; height: 30px; }

.list-head {
  padding: 16px 16px 8px; font-weight: 700; font-size: 14px; color: var(--text);
}

/* -------------------------------------------------------------- avatars */
.avatar {
  display: grid; place-items: center; overflow: hidden; flex: none;
  border-radius: 50%; background: var(--surface-3); color: #fff;
  font-weight: 700; letter-spacing: -.02em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { width: 26px; height: 26px; font-size: 10px; }
.avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.avatar.md { width: 46px; height: 46px; font-size: 15px; }
.avatar.lg { width: 60px; height: 60px; font-size: 19px; }
.avatar.xl { width: 88px; height: 88px; font-size: 28px; }
.avatar.tint-0 { background: linear-gradient(135deg, #00d8ff, #3f92ff); }
.avatar.tint-1 { background: linear-gradient(135deg, #8b5cff, #ff2ed1); }
.avatar.tint-2 { background: linear-gradient(135deg, #ffc53d, #ff6a3d); }
.avatar.tint-3 { background: linear-gradient(135deg, #2fe3a0, #00d8ff); }
.avatar.tint-4 { background: linear-gradient(135deg, #ff4e6b, #8b5cff); }
.avatar.tint-5 { background: linear-gradient(135deg, #3f92ff, #2fe3a0); }

.story-ring {
  display: inline-grid; place-items: center; border-radius: 50%; padding: 3px;
  background: var(--ring);
}
.story-ring.seen { background: var(--surface-3); }
.story-ring.plain { background: var(--line); }
.story-ring .avatar { border: 2.5px solid var(--ink); }
.story-ring.lg { position: relative; }

.verified { display: inline-grid; place-items: center; position: relative; color: var(--blue); }
.verified svg { width: 15px; height: 15px; }
.verified-tick { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.verified-tick svg { width: 9px; height: 9px; stroke-width: 3.4; }

/* ---------------------------------------------------------------- tray */
.tray-wrap { border-bottom: 1px solid var(--line); }
.tray {
  display: flex; gap: 16px; padding: 12px 14px;
  overflow-x: auto; scrollbar-width: none;
}
.tray::-webkit-scrollbar { display: none; }
.tray-item {
  display: grid; justify-items: center; gap: 6px; width: 70px; cursor: pointer;
}
.tray-item .tiny { max-width: 70px; color: var(--muted); }
.tray-plus {
  position: absolute; right: -2px; bottom: -2px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--blue);
  display: grid; place-items: center; border: 2px solid var(--ink);
}
.tray-plus svg { width: 13px; height: 13px; stroke-width: 3; }

/* ----------------------------------------------------------- post card */
.post-card { border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.post-author { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: left; }
.post-author b { font-size: 14px; }

.media-wrap { position: relative; background: #000; }
.slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; aspect-ratio: 1;
}
.slides::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%; width: 100%; height: 100%;
  object-fit: cover; scroll-snap-align: center;
}
.slide-count {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 9px; border-radius: 99px; background: rgba(0, 0, 0, .62);
  font-size: 11.5px; font-weight: 600;
}
.slide-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0, 0, 0, .4); display: grid; place-items: center; opacity: 0;
  transition: opacity .15s ease;
}
.media-wrap:hover .slide-nav { opacity: 1; }
.slide-nav svg { width: 17px; height: 17px; }
.slide-nav.prev { left: 8px; }
.slide-nav.next { right: 8px; }

.dots { display: flex; gap: 4px; justify-content: center; flex: 1; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.dot.on { background: var(--blue); }

.heart-burst {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; opacity: 0; pointer-events: none;
}
.heart-burst svg { width: 96px; height: 96px; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .5)); }
.heart-burst.go { animation: burst .9s ease; }
@keyframes burst {
  0% { opacity: 0; transform: scale(.4); }
  15% { opacity: 1; transform: scale(1.12); }
  35% { transform: scale(.95); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: scale(1); }
}

.post-actions { display: flex; align-items: center; gap: 14px; padding: 10px 12px 4px; }
.act { color: var(--text); display: grid; place-items: center; }
.act svg { width: 25px; height: 25px; }
.act.liked { color: var(--like); animation: pop .3s ease; }
.act.save { margin-left: auto; }
.act.saved { color: var(--text); }
.post-actions .dots { flex: 1; }
@keyframes pop { 50% { transform: scale(1.25); } }

.post-body { padding: 2px 12px 8px; display: grid; gap: 4px; }
.like-line b { font-size: 14px; }
.caption { font-size: 14px; line-height: 1.45; }
.caption .caption-text { margin-left: 6px; }
.mini-comment { font-size: 14px; color: var(--text); }
.mini-comment span { margin-left: 6px; }
.post-time { text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.tag-link { color: #7fb3ff; cursor: pointer; }

/* ---------------------------------------------------------------- grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.tile { position: relative; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.tile-badge { position: absolute; top: 6px; right: 6px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.tile-badge svg { width: 17px; height: 17px; }
.tile-hover {
  position: absolute; inset: 0; display: none; gap: 18px;
  align-items: center; justify-content: center; background: rgba(0, 0, 0, .45);
  font-weight: 700; font-size: 14px;
}
.tile-hover span { display: inline-flex; align-items: center; gap: 5px; }
.tile-hover svg { width: 18px; height: 18px; }
.tile:hover .tile-hover { display: flex; }

/* ------------------------------------------------------------- explore */
.search-bar { padding: 8px 14px; }
.search-wrap { position: relative; display: flex; align-items: center; gap: 8px; }
.search-wrap > svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--dim); }
.search-wrap .input { padding-left: 38px; }
.search-wrap .icon-btn { position: absolute; right: 6px; }

.tag-bubble {
  display: grid; place-items: center; width: 46px; height: 46px; flex: none;
  border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line);
}
.tag-bubble.lg { width: 68px; height: 68px; }
.tag-head { display: flex; gap: 14px; align-items: center; padding: 14px; }

/* -------------------------------------------------------- stacked pages */
.stack-head {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px 10px;
  border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.stack-title { flex: 1; font-size: 16px; }
.stack-action { min-width: 40px; display: flex; justify-content: flex-end; }

/* ------------------------------------------------------------- profile */
.cover {
  position: relative;
  height: 148px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(6, 7, 15, .1), rgba(6, 7, 15, .72));
}
.cover.busy { opacity: .55; }
.cover-edit {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  background: rgba(6, 7, 15, .68); border: 1px solid var(--line-strong); color: var(--text);
  backdrop-filter: blur(8px);
}
.cover-edit svg { width: 15px; height: 15px; }

.edit-cover {
  position: relative; height: 130px; margin-bottom: 6px;
  background-size: cover; background-position: center; background-color: var(--surface-2);
  border-radius: 14px;
}
.edit-cover::after {
  content: ''; position: absolute; inset: 0; border-radius: 14px;
  background: linear-gradient(to bottom, transparent, rgba(6, 7, 15, .6));
}

.profile-head {
  display: flex; align-items: flex-end; gap: 20px; padding: 8px 16px 12px;
  margin-top: -34px; position: relative; z-index: 2;
}
.profile-head .avatar.xl { border: 3px solid var(--ink); }
.profile-avatar { position: relative; }
.avatar-plus {
  position: absolute; right: 0; bottom: 2px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--blue);
  display: grid; place-items: center; border: 3px solid var(--ink);
}
.avatar-plus svg { width: 14px; height: 14px; stroke-width: 3; }
.profile-stats { display: flex; flex: 1; justify-content: space-around; }
.stat { display: grid; justify-items: center; gap: 1px; }
.stat b { font-size: 16px; }

.profile-meta { padding: 0 16px 12px; display: grid; gap: 3px; }
.bio { font-size: 14px; white-space: pre-wrap; }
.profile-actions { padding: 0 16px 14px; gap: 8px; }

.profile-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.ptab { padding: 11px 0; display: grid; place-items: center; color: var(--dim); border-bottom: 2px solid transparent; }
.ptab.active { color: var(--text); border-bottom-color: var(--text); }

.edit-avatar { display: grid; justify-items: center; padding: 14px 0 18px; }
.edit-avatar-button {
  position: relative; display: inline-grid; place-items: center; padding: 0;
  border: 0; background: transparent; border-radius: 50%; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.edit-avatar-button:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }
.edit-avatar-button .avatar.xl {
  border: 3px solid var(--ink); box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
  transition: transform .18s ease, filter .18s ease;
}
.edit-avatar-button:hover .avatar.xl,
.edit-avatar-button:focus-visible .avatar.xl {
  transform: scale(1.035); filter: brightness(1.06);
}
.avatar-camera {
  position: absolute; right: -2px; bottom: 1px; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--blue); color: #fff; border: 3px solid var(--ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.avatar-camera svg { width: 14px; height: 14px; stroke-width: 2.4; }

/* ---------------------------------------------------------- user rows */
.user-row { display: flex; align-items: center; gap: 10px; padding: 7px 14px; }
.user-row-main {
  display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
  text-align: left; padding: 7px 14px; width: 100%;
}
.user-row .user-row-main { padding: 0; }
.user-row-main b { font-size: 14px; }
.pick-box {
  width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid var(--line-strong);
  display: grid; place-items: center; color: transparent; flex: none;
}
.pick-box.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.pick-box svg { width: 14px; height: 14px; stroke-width: 3; }
.suggest { padding: 10px 0 24px; border-top: 1px solid var(--line); margin-top: 8px; }
.suggest > .row { padding: 0 16px; }

/* ------------------------------------------------------------ activity */
.notif { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 0; }
.notif.fresh { background: rgba(63, 146, 255, .06); }
.notif-text { font-size: 13.5px; line-height: 1.35; }
.notif-text b { margin-right: 4px; }
.notif-text .muted { display: block; }
.notif-thumb {
  width: 46px; height: 46px; border-radius: 6px; overflow: hidden; flex: none;
  background: var(--surface-2); display: grid; place-items: center;
}
.notif-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------ comments */
.comment-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 6px; border-top: 1px solid var(--line); }
.comment-group { padding: 2px 0; }
.comment { display: flex; gap: 10px; padding: 8px 14px; align-items: flex-start; }
.comment.reply { padding-left: 48px; }
.comment-avatar { flex: none; }
.comment-body { font-size: 14px; line-height: 1.4; }
.comment-body span { margin-left: 6px; }
.comment-meta { display: flex; gap: 12px; margin-top: 3px; align-items: center; }
.comment-like { color: var(--muted); }
.comment-like svg { width: 15px; height: 15px; }
.comment-like.liked { color: var(--like); }

.comment-bar {
  position: sticky; bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: rgba(6, 7, 15, .95); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.comment-off { padding: 18px 14px; text-align: center; }
.reply-chip {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted); padding: 2px 0;
}

.mention-box {
  position: absolute; bottom: 100%; left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: var(--shadow); max-height: 220px; overflow-y: auto;
}
.mention-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; width: 100%; text-align: left; }
.mention-item:active { background: var(--surface-2); }

/* ------------------------------------------------------------ composer */
.composer { padding-bottom: 20px; position: relative; }
.pick-empty { display: grid; justify-items: center; text-align: center; padding: 46px 22px; gap: 4px; }
.preview { position: relative; background: #000; }
.preview .slides { aspect-ratio: 1; }
.slide-box { position: relative; flex: 0 0 100%; scroll-snap-align: center; }
.slide-box img, .slide-box video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.chip-btn {
  position: absolute; padding: 7px 12px; border-radius: 99px;
  background: rgba(0, 0, 0, .6); font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
}
.chip-btn svg { width: 15px; height: 15px; }
.chip-btn.remove { top: 8px; right: 8px; padding: 6px; }
.chip-btn.add { bottom: 12px; right: 12px; }
.preview .dots { position: absolute; bottom: 12px; left: 0; right: 0; }

.compose-row { position: relative; padding: 12px 14px 6px; }
.compose-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--text);
}
.compose-item svg { width: 21px; height: 21px; color: var(--muted); }
.switch-row { cursor: default; }
.upload-state { padding: 16px; display: grid; gap: 8px; }
.upload-state .bar { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.upload-state .bar span { display: block; height: 100%; background: var(--brand); transition: width .25s ease; }

/* --------------------------------------------------------------- reels */
.reels { height: calc(100dvh - var(--top-h) - var(--bar-h)); overflow-y: auto; scroll-snap-type: y mandatory; }
.reel { position: relative; height: 100%; scroll-snap-align: start; background: #000; overflow: hidden; }
.reel video { width: 100%; height: 100%; object-fit: cover; }
.reel-shade {
  position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, .72), transparent);
  pointer-events: none;
}
.reel-rail {
  position: absolute; right: 10px; bottom: 96px;
  display: grid; gap: 20px; justify-items: center;
}
.rail-btn { display: grid; justify-items: center; gap: 3px; color: #fff; font-size: 11.5px; font-weight: 600; }
.rail-btn.liked { color: var(--like); }
.reel-info { position: absolute; left: 14px; right: 74px; bottom: 22px; display: grid; gap: 7px; }
.reel-author { display: flex; align-items: center; gap: 8px; color: #fff; }
.reel-caption { font-size: 13.5px; line-height: 1.4; max-height: 74px; overflow: hidden; }
.reel-sound {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .5);
  display: grid; place-items: center; color: #fff;
}
.reel-sound svg { width: 17px; height: 17px; }
.reel-empty { display: grid; place-items: center; height: 100%; }

/* ------------------------------------------------------------- stories */
.story-viewer {
  position: fixed; inset: 0; z-index: 400; background: #000;
  display: grid; place-items: center;
}
.story-stage { position: relative; width: min(var(--shell), 100%); height: 100%; overflow: hidden; }
.story-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 6; }
.story-bar { flex: 1; height: 2.5px; border-radius: 99px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.story-bar .fill { display: block; height: 100%; width: 0; background: #fff; }
.story-bar .fill.done { width: 100%; }
.story-top {
  position: absolute; top: 22px; left: 10px; right: 10px; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; color: #fff;
}
.story-user { display: flex; align-items: center; gap: 8px; color: #fff; }
.story-media { position: absolute; inset: 0; display: grid; place-items: center; background: #000; }
.story-media img, .story-media video { width: 100%; height: 100%; object-fit: contain; }
.story-caption {
  position: absolute; left: 16px; right: 16px; bottom: 96px;
  background: rgba(0, 0, 0, .45); padding: 10px 12px; border-radius: 12px; font-size: 14px;
}
.story-half { position: absolute; top: 0; bottom: 78px; width: 34%; z-index: 5; }
.story-half.left { left: 0; }
.story-half.right { right: 0; width: 66%; }
.story-foot {
  position: absolute; left: 12px; right: 12px; bottom: 18px; z-index: 6;
  display: flex; align-items: center; gap: 8px;
}
.story-reply { border-radius: 99px; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.story-views { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 13px; }
.story-views svg { width: 18px; height: 18px; }

.story-compose { position: fixed; inset: 0; z-index: 380; background: #000; display: grid; grid-template-rows: 1fr auto; }
.story-compose-media { position: relative; overflow: hidden; }
.story-compose-media img, .story-compose-media video { width: 100%; height: 100%; object-fit: contain; }
.story-compose-bar { display: flex; gap: 10px; padding: 12px 14px calc(18px + env(safe-area-inset-bottom)); }
.story-close { position: absolute; top: 14px; left: 12px; color: #fff; }

/* ------------------------------------------------------------------ DM */
.thread { display: flex; align-items: center; gap: 12px; padding: 9px 14px; width: 100%; text-align: left; }
.thread-body { display: grid; gap: 1px; flex: 1; min-width: 0; }
.thread-status { font-size: 13px; color: var(--muted); }
.thread.unread .thread-status { color: var(--text); font-weight: 600; }
.blue-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); flex: none; }

.room { display: grid; grid-template-rows: auto 1fr auto; height: 100dvh; }
.room-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-bottom: 1px solid var(--line); background: rgba(6, 7, 15, .9); backdrop-filter: blur(16px);
}
.room-peer { display: flex; align-items: center; gap: 10px; flex: 1; }
.room-body { overflow-y: auto; padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 4px; }
.room-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.room-intro { display: grid; justify-items: center; gap: 4px; padding: 40px 20px; }

.day-divider { text-align: center; font-size: 11.5px; color: var(--dim); margin: 12px 0 6px; }
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble {
  max-width: 78%; padding: 8px 12px; border-radius: 18px;
  background: var(--surface-2); font-size: 14.5px; display: grid; gap: 4px;
}
.bubble-row.mine .bubble { background: var(--blue); color: #fff; }
.bubble-row.mine .bubble .tiny { color: rgba(255, 255, 255, .75); }
.bubble-img { border-radius: 12px; max-height: 280px; object-fit: cover; }
.bubble-time { text-align: right; }
.shared-post {
  display: grid; gap: 6px; border-radius: 12px; overflow: hidden;
  background: rgba(0, 0, 0, .25); text-align: left; color: inherit; width: 220px;
}
.shared-post img, .shared-post video { width: 100%; aspect-ratio: 1; object-fit: cover; }
.shared-cap { padding: 0 10px 8px; display: block; }

/* --------------------------------------------------------------- sheets */
.sheet-backdrop, .modal-backdrop {
  position: fixed; inset: 0; z-index: 220; background: rgba(3, 4, 10, .68);
  backdrop-filter: blur(4px); display: flex; animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet-backdrop { align-items: flex-end; justify-content: center; }
.sheet {
  width: min(var(--shell), 100%); max-height: 84dvh; overflow-y: auto;
  background: var(--surface); border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--line-strong);
  padding: 8px 14px calc(20px + env(safe-area-inset-bottom));
  animation: sheetUp .2s ease;
}
.sheet.tall { height: 78dvh; display: flex; flex-direction: column; }
@keyframes sheetUp { from { transform: translateY(24px); } }
.sheet-grip { width: 40px; height: 4px; border-radius: 99px; background: var(--line-strong); margin: 6px auto 12px; }
.sheet-title { text-align: center; padding-bottom: 10px; }
.sheet-scroll { flex: 1; overflow-y: auto; min-height: 80px; margin: 8px -14px 0; }
.sheet-list { display: grid; }
.sheet-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 4px;
  border-top: 1px solid var(--line); text-align: left; font-size: 14.5px;
}
.sheet-item.danger { color: var(--bad); }
.share-foot { display: flex; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }

.modal-backdrop { align-items: center; justify-content: center; padding: 20px; }
.modal {
  position: relative; width: min(420px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px;
  box-shadow: var(--shadow);
}
.modal.wide { width: min(560px, 100%); }
.modal-close { position: absolute; top: 10px; right: 10px; color: var(--muted); }

/* ----------------------------------------------------------------- auth */
.auth {
  width: min(420px, 100%); margin-inline: auto;
  padding: 32px 20px calc(40px + env(safe-area-inset-bottom));
  display: grid; justify-items: center;
}
.auth-banner {
  width: 100%; max-width: 420px; border-radius: 16px;
  border: 1px solid var(--line); margin-bottom: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
}
.auth-title { text-align: center; margin-bottom: 18px; }
.auth-title p { letter-spacing: .16em; text-transform: uppercase; font-size: 11.5px; }
.auth-title p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.auth .form, .auth .seg, .auth .card { width: 100%; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card.pad { padding: 18px; }
.verify-code { text-align: center; letter-spacing: .5em; font-size: 22px; font-weight: 700; }
.lead { display: grid; place-items: center; }

.meter-head { display: flex; justify-content: space-between; font-size: 12px; margin-top: 8px; }
.meter-bars { display: flex; gap: 5px; margin-top: 5px; }
.meter-bar { flex: 1; height: 4px; border-radius: 99px; background: var(--surface-3); }
.meter-bar.on { background: var(--ok); }
.meter-bar.on.lv1 { background: var(--bad); }
.meter-bar.on.lv2 { background: #ffc53d; }
.meter-hint { font-size: 12px; color: var(--dim); margin-top: 6px; }

/* -------------------------------------------------------------- desktop */
@media (min-width: 720px) {
  .post-card { border: 1px solid var(--line); border-radius: 14px; margin: 0 0 14px; overflow: hidden; }
  .screen { padding-left: 0; padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ================================================================
   ShotGram auth experience
   Desktop: split-screen social login with visual gallery.
   Mobile: clean single-column auth card.
   ================================================================ */
.auth-layout {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.72fr);
  align-items: stretch;
  justify-items: stretch;
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 216, 255, .10), transparent 36%),
    radial-gradient(circle at 55% 85%, rgba(255, 46, 209, .10), transparent 34%),
    var(--ink);
}

.auth-visual {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  padding: clamp(34px, 5vw, 72px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(6,7,15,.12), rgba(6,7,15,.42)),
    radial-gradient(circle at 40% 35%, rgba(139,92,255,.13), transparent 35%);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -.045em;
}
.auth-brand img {
  width: 44px; height: 44px; object-fit: contain;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,.45));
}
.auth-kicker {
  margin-top: 26px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
}
.auth-visual-copy h1 {
  max-width: 720px;
  margin-top: 11px;
  font-size: clamp(42px, 4.3vw, 70px);
  line-height: .98;
  letter-spacing: -.065em;
}
.auth-visual-copy h1 span {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-subtitle {
  max-width: 560px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(15px, 1.35vw, 18px);
}

.auth-gallery {
  position: relative;
  min-height: 390px;
  max-width: 760px;
  width: 100%;
  align-self: center;
  justify-self: center;
}
.auth-shot {
  position: absolute;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255,255,255,.15);
  background: var(--surface-2);
  box-shadow: 0 26px 80px rgba(0,0,0,.48);
  border-radius: 28px;
  transform-origin: center;
}
.auth-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.auth-shot-main {
  width: min(44vw, 400px);
  aspect-ratio: .92;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) rotate(-3deg);
  z-index: 4;
}
.auth-shot-main img { object-position: center; }

.auth-shot-top {
  width: min(31vw, 280px);
  aspect-ratio: 1.36;
  left: 7%;
  top: 9%;
  transform: rotate(-7deg);
  z-index: 2;
}
.auth-shot-top img { object-position: center 35%; }

.auth-shot-bottom {
  width: min(34vw, 310px);
  aspect-ratio: 2.25;
  right: 3%;
  bottom: 8%;
  transform: rotate(6deg);
  z-index: 2;
}
.auth-shot-bottom img { object-position: center; }

.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  pointer-events: none;
}
.auth-glow-one {
  width: 220px; height: 220px;
  left: 12%; top: 32%;
  background: rgba(0,216,255,.14);
}
.auth-glow-two {
  width: 260px; height: 260px;
  right: 8%; bottom: 18%;
  background: rgba(255,46,209,.12);
}

.auth-visual-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--dim);
  font-size: 11px;
}

.auth-panel {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 72px) clamp(26px, 5vw, 72px);
  background: rgba(12,13,23,.78);
}
.auth-card-shell {
  width: min(440px, 100%);
}
.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
}
.auth-mobile-brand img { object-fit: contain; }

.auth-title {
  text-align: left;
  margin-bottom: 22px;
}
.auth-overline {
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 10.5px;
  font-weight: 800;
  margin-bottom: 7px;
}
.auth-title h2 {
  font-size: clamp(25px, 2.2vw, 31px);
  letter-spacing: -.055em;
}
.auth-title p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13.5px;
}

.auth-form { gap: 10px; }
.auth-input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line-strong);
}
.auth-input:focus {
  border-color: rgba(0,216,255,.55);
  background: rgba(255,255,255,.05);
}
.password-wrap .auth-input { padding-right: 68px; }

.auth-primary {
  min-height: 50px;
  border-radius: 13px;
  font-weight: 800;
}
.auth-forgot {
  text-align: center;
  margin-top: 1px;
}
.auth-forgot .link-btn { font-size: 12.5px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 2px;
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .13em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--line);
}

.discord-btn {
  min-height: 50px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.16);
  background: #5865f2;
  color: #fff;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.discord-btn:hover { filter: brightness(1.06); }
.discord-btn svg { width: 19px; height: 19px; }

.auth-switch {
  text-align: center;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
.auth-switch .link-btn { color: var(--text); }
.auth-legal {
  margin-top: 16px;
  color: var(--dim);
  text-align: center;
  font-size: 10.5px;
  line-height: 1.55;
}

.auth-layout .notice {
  border-radius: 13px;
}
.auth-layout .card {
  border-radius: 18px;
}

@media (max-width: 980px) and (min-width: 720px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  }
  .auth-visual { padding: 34px; }
  .auth-visual-copy h1 { font-size: 43px; }
  .auth-shot-main { width: 320px; }
  .auth-shot-top { width: 220px; }
  .auth-shot-bottom { width: 245px; }
}

@media (max-width: 719px) {
  .auth-layout {
    display: block;
    min-height: 100dvh;
  }
  .auth-visual {
    min-height: 220px;
    padding: 24px 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: block;
  }
  .auth-visual-copy .auth-brand,
  .auth-visual-copy .auth-kicker,
  .auth-visual-copy .auth-subtitle,
  .auth-visual-copy h1 {
    display: none;
  }
  .auth-gallery {
    min-height: 220px;
    height: 220px;
    max-width: 420px;
    margin: 0 auto;
  }
  .auth-shot-main {
    width: 190px;
    height: 220px;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -45%) rotate(-2deg);
  }
  .auth-shot-top {
    width: 130px;
    height: 92px;
    left: 5%;
    top: 25%;
  }
  .auth-shot-bottom {
    width: 138px;
    height: 70px;
    right: 2%;
    bottom: 22%;
  }
  .auth-visual-foot { display: none; }
  .auth-panel {
    min-height: calc(100dvh - 220px);
    padding: 26px 20px 44px;
    align-items: flex-start;
  }
  .auth-mobile-brand { display: flex; }
  .auth-title { margin-bottom: 18px; }
}


/* ------------------------------------------------ first-run profile setup */
.onboarding-wrap { width: min(620px, 100%); margin: 0 auto; }
.onboarding-eyebrow { text-align: center; color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .18em; margin-bottom: 8px; }
.onboarding-title { margin-bottom: 16px; }
.onboarding-card { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); box-shadow: 0 24px 80px rgba(0,0,0,.26); }
.onboarding-card::before { content: ''; position: absolute; inset: -30% 35% auto -20%; height: 220px; background: radial-gradient(circle, rgba(95,91,255,.18), transparent 68%); pointer-events: none; }
.onboarding-card-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--border); }
.onboarding-avatar { width: 48px; height: 48px; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.06); border: 1px solid var(--border); display: grid; place-items: center; }
.onboarding-avatar img { width: 100%; height: 100%; object-fit: cover; }
.onboarding-step { padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--muted); background: rgba(255,255,255,.05); }
.onboarding-form { padding: 20px; }
.onboarding-input-wrap { position: relative; }
.onboarding-input-wrap > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 2; color: var(--muted); font-weight: 800; }
.onboarding-input-wrap .input { padding-left: 30px; }
.onboarding-privacy { display: flex; gap: 10px; align-items: flex-start; margin: 2px 0 4px; padding: 12px 14px; border: 1px solid var(--border); background: rgba(255,255,255,.03); border-radius: 14px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.onboarding-check { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--accent); font-weight: 900; }
.profile-joined { display: inline-flex; align-items: center; gap: 5px; margin-top: 7px; font-size: 12px; color: var(--muted); }
.profile-joined svg { width: 14px; height: 14px; }
@media (max-width: 740px) {
  .onboarding-card { border-radius: 18px; }
  .onboarding-form { padding: 16px; }
}

/* ---------------------------------------------------------- pro creator studio */
.creator-intro {
  margin: 12px 14px 4px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
}
.creator-intro-copy { min-width: 0; flex: 1; }
.creator-kicker { display: inline-block; font-size: 10px; font-weight: 850; letter-spacing: .18em; color: var(--blue); }
.creator-intro h2 { margin: 4px 0 5px; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.02em; }
.creator-intro p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; max-width: 620px; }
.creator-intro-badge { flex: 0 0 auto; width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; align-content: center; font-size: 22px; font-weight: 850; background: rgba(95,91,255,.12); border: 1px solid rgba(95,91,255,.22); color: var(--text); }
.creator-intro-badge span { font-size: 8px; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.creator-pick-empty { min-height: 420px; align-content: center; }
.creator-pick-icon { width: 74px; height: 74px; border-radius: 24px; display: grid; place-items: center; margin: 0 auto 10px; background: linear-gradient(145deg, rgba(95,91,255,.22), rgba(0,216,255,.10)); border: 1px solid var(--border); }
.creator-pick-icon svg { width: 32px; height: 32px; }
.compose-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 18px 14px 7px; border-top: 1px solid var(--line); }
.compose-section-head > span { font-size: 11px; color: var(--dim); }
.creator-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 14px 8px; }
.creator-field { margin: 0; }
.creator-field .input { min-height: 46px; }
.field-hint { display: block; margin-top: 5px; font-size: 10.5px; color: var(--dim); line-height: 1.35; }
.post-data-summary { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; padding: 14px; }
.post-summary-item { min-width: 78px; flex: 1 1 78px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.025); }
.post-summary-item b { display: block; font-size: 15px; }
.post-summary-item span { color: var(--dim); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.post-summary-country { flex: 1 1 180px; min-width: 180px; display: flex; align-items: center; justify-content: center; padding: 10px 11px; border: 1px solid var(--border); border-radius: 13px; color: var(--muted); font-size: 11px; }
.media-slide-stage { position: relative; width: 100%; height: 100%; overflow: hidden; background: #000; display: grid; place-items: center; }
.media-slide-stage > .slide { width: 100%; height: 100%; object-fit: cover; }
.media-overlay, .reel-overlay-layer .media-overlay { position: absolute; z-index: 5; max-width: 88%; color: #fff; font-weight: 750; line-height: 1.08; white-space: pre-wrap; text-align: center; user-select: none; pointer-events: auto; }
.media-overlay a { color: inherit; text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: 2px; }
.media-index { position: absolute; top: 10px; left: 10px; min-width: 26px; padding: 5px 8px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; font-weight: 800; z-index: 8; }
.video-edit-chip { position: absolute; left: 10px; bottom: 10px; z-index: 8; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: rgba(0,0,0,.58); border: 1px solid rgba(255,255,255,.13); color: #fff; font-size: 11px; font-weight: 750; }
.video-edit-chip svg { width: 14px; height: 14px; }
.cover-badge { position: absolute; right: 10px; bottom: 10px; z-index: 8; display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: rgba(0,0,0,.58); color: #fff; font-size: 10px; font-weight: 750; }
.cover-badge svg { width: 13px; height: 13px; }
.post-place { display: inline-flex; align-items: center; gap: 4px; }
.profile-country { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------- video editor */
.video-editor { width: min(1050px, 100%); }
.video-editor-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 4px 4px 16px; }
.video-editor-header h2 { margin: 5px 0 5px; font-size: 24px; }
.video-editor-header p { margin: 0; max-width: 700px; }
.video-editor-meta { flex: 0 0 auto; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 10px; color: var(--muted); }
.video-editor-layout { display: grid; grid-template-columns: minmax(280px, 1.05fr) minmax(330px, .95fr); gap: 16px; }
.editor-stage-wrap { display: grid; place-items: center; min-height: 560px; padding: 12px; border: 1px solid var(--border); border-radius: 20px; background: radial-gradient(circle at 50% 10%, rgba(255,255,255,.06), transparent 48%), #050608; overflow: hidden; }
.editor-stage { position: relative; width: min(100%, 440px); border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.editor-stage::after { content: ''; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.08); border-radius: inherit; pointer-events: none; z-index: 7; }
.editor-stage video { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: center; }
.editor-stage.aspect-1-1 { aspect-ratio: 1 / 1; }
.editor-stage.aspect-4-5 { aspect-ratio: 4 / 5; }
.editor-stage.aspect-9-16 { aspect-ratio: 9 / 16; }
.editor-stage.aspect-16-9 { aspect-ratio: 16 / 9; }
.editor-overlay-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.editor-time { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 8; padding: 5px 8px; border-radius: 999px; background: rgba(0,0,0,.58); color: #fff; font-size: 10px; font-variant-numeric: tabular-nums; }
.editor-controls { display: grid; gap: 10px; align-content: start; max-height: 560px; overflow: auto; padding-right: 2px; }
.editor-section { padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.025); }
.editor-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.editor-section-title b { font-size: 13px; }
.editor-section-title span { font-size: 10.5px; color: var(--dim); }
.editor-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.editor-pill { border: 1px solid var(--border); border-radius: 999px; padding: 7px 10px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 10.5px; }
.editor-pill.active { color: #fff; border-color: rgba(95,91,255,.55); background: rgba(95,91,255,.16); }
.range-row { display: grid; grid-template-columns: 52px minmax(100px,1fr) 54px; align-items: center; gap: 8px; margin-top: 11px; }
.range-row label { font-size: 10.5px; color: var(--muted); }
.range-row input[type=range] { width: 100%; accent-color: var(--blue); }
.range-row output { text-align: right; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cover-preview-row { display: flex; align-items: center; gap: 10px; }
.cover-preview { width: 86px; height: 116px; border-radius: 12px; background: #050608; border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; color: var(--dim); font-size: 9px; text-align: center; padding: 4px; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview-row .btn { flex: 1; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 10px 0; }
.editor-grid .field { margin: 0; }
.overlay-list { display: grid; gap: 7px; margin-top: 10px; }
.overlay-list-item { display: grid; grid-template-columns: minmax(0,1fr) auto 32px; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.025); }
.overlay-sample { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-editor-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 4px 2px; }
.video-editor-actions .btn { min-width: 130px; }
.reel-stage { position: absolute; inset: 0; overflow: hidden; background: #000; }
.reel-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: center; }
.reel-overlay-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }

@media (max-width: 820px) {
  .video-editor-layout { grid-template-columns: 1fr; }
  .editor-stage-wrap { min-height: 420px; }
  .editor-controls { max-height: none; overflow: visible; }
}
@media (max-width: 640px) {
  .creator-intro { padding: 14px; border-radius: 18px; }
  .creator-intro-badge { width: 58px; height: 58px; border-radius: 17px; }
  .creator-data-grid { grid-template-columns: 1fr; }
  .post-data-summary { display: grid; grid-template-columns: repeat(2, 1fr); }
  .post-summary-country { min-width: 0; }
  .video-editor-header { display: block; }
  .video-editor-meta { display: inline-block; margin-top: 10px; }
  .editor-stage-wrap { min-height: 360px; padding: 8px; }
  .video-editor-actions { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 20; }
  .video-editor-actions .btn { min-width: 0; flex: 1; }
}

/* V10 stacking fixes: interactive video text stays above the reel shade. */
.slide-box { height: 100%; }
.reel-stage { z-index: 3; }
.reel-shade { z-index: 2; }
.reel-info { z-index: 6; }
.reel-rail { z-index: 7; }
.reel-sound { z-index: 8; }
.heart-burst { z-index: 9; }
.tag-more { padding: 14px; }

/* V12 stamped media downloads */
.act[data-download] { margin-left: 2px; }
.act[data-download] svg { width: 18px; height: 18px; }
