/* =========================================================
   NoChat — design system
   Warm ink background, vermillion→amber signal accent.
   Display: Bricolage Grotesque · Body: Manrope
   ========================================================= */
:root {
  --bg: #0b0a0d;
  --bg-2: #111015;
  --surface: #17161c;
  --surface-2: #1f1e25;
  --surface-3: #292830;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f3ee;
  --text-2: #c9c6c0;
  --muted: #8f8c96;
  --brand: #ff5a36;
  --brand-2: #ffb547;
  --brand-ink: #1a0a05;
  --brand-soft: rgba(255, 90, 54, 0.14);
  --online: #3ee6a8;
  --danger: #ff4d6d;
  --danger-soft: rgba(255, 77, 109, 0.14);
  --verified: #4fa8ff;
  --gradient: linear-gradient(135deg, #ff5a36 0%, #ff7d3b 45%, #ffb547 100%);
  --gradient-soft: linear-gradient(135deg, rgba(255,90,54,.22), rgba(255,181,71,.12));
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 10px 30px -10px rgba(255, 90, 54, 0.55);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font: "Manrope", system-ui, -apple-system, sans-serif;
  --sidebar-w: 256px;
  --tabbar-h: 64px;
  --topbar-h: 56px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: 8px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
::selection { background: var(--brand); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 10000; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* icons */
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
i[data-icon] { display: inline-flex; line-height: 0; font-style: normal; }

/* ---------- brand ---------- */
.brand-row { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; background: var(--gradient);
  display: grid; place-items: center; box-shadow: var(--shadow-glow); flex: none;
}
.brand-mark span { font-family: var(--font-display); font-weight: 800; color: var(--brand-ink); font-size: 20px; letter-spacing: -0.04em; }
.brand-mark.sm { width: 30px; height: 30px; border-radius: 9px; }
.brand-mark.sm span { font-size: 17px; }
.brand-mark.lg { width: 64px; height: 64px; border-radius: 20px; }
.brand-mark.lg span { font-size: 34px; }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.brand-word.sm { font-size: 19px; }
.brand-word b { color: var(--brand); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; font-weight: 700; font-size: 14px;
  transition: transform .15s var(--ease), background .15s, filter .15s, opacity .15s; white-space: nowrap;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .ic { width: 18px; height: 18px; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--gradient); color: var(--brand-ink); box-shadow: var(--shadow-glow); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.07); }
.btn-soft { background: var(--surface-2); border: 1px solid var(--line); }
.btn-soft:hover:not(:disabled) { background: var(--surface-3); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(255,77,109,.25); }
.btn-danger:hover:not(:disabled) { background: rgba(255,77,109,.22); }
.btn-success { background: rgba(62,230,168,.14); color: var(--online); border: 1px solid rgba(62,230,168,.25); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center;
  color: var(--text-2); transition: background .15s, color .15s, transform .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.glass { background: rgba(15, 14, 18, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.1); color: #fff; }
.glass:hover { background: rgba(30, 28, 36, .7); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; line-height: 1;
}
.count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--surface-3); font-size: 12px; font-weight: 700; color: var(--text-2); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; justify-content: space-between; }
.field > span em { font-style: normal; color: var(--muted); font-weight: 500; }
.field input, .field textarea, .input-affix {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 12px 14px; outline: none; transition: border-color .15s, box-shadow .15s; font-size: 15px;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus, .input-affix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input-affix { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; }
.input-affix input { border: 0; background: transparent; padding: 12px 0; box-shadow: none !important; flex: 1; min-width: 0; outline: none; }
.affix-pre { color: var(--muted); font-weight: 700; }
.affix-btn { font-size: 12px; font-weight: 700; color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.affix-btn:hover { background: var(--surface-2); color: var(--text); }
.field-help { color: var(--muted); font-size: 12px; }
.form-error { background: var(--danger-soft); color: #ff9aae; border: 1px solid rgba(255,77,109,.25); padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.form-hint { color: var(--muted); font-size: 12px; margin-top: 14px; text-align: center; }
.strength { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; background: var(--gradient); transition: width .25s; }

.search {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: border-color .15s;
}
.search:focus-within { border-color: var(--line-strong); }
.search input { flex: 1; background: none; border: 0; outline: none; color: var(--text); min-width: 0; }
.search.lg { height: 48px; border-radius: 14px; }
.search .ic { width: 18px; height: 18px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); margin-top: 4px; cursor: pointer; }
.switch-row > span { display: flex; flex-direction: column; }
.switch-row small { font-size: 12px; }
.switch { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(18px); }

.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.row-actions.end { justify-content: flex-end; }
.row-actions.center { justify-content: center; }

/* ---------- avatars ---------- */
.avatar {
  --s: 40px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; position: relative;
  background: var(--gradient-soft); display: inline-grid; place-items: center; overflow: visible;
  font-family: var(--font-display); font-weight: 800; color: var(--brand-2); font-size: calc(var(--s) * .4);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.xs { --s: 26px; }
.avatar.sm { --s: 36px; }
.avatar.md { --s: 48px; }
.avatar.lg { --s: 64px; }
.avatar.xl { --s: 112px; }
.avatar .dot { position: absolute; right: 2%; bottom: 2%; width: clamp(10px, 28%, 20px); height: clamp(10px, 28%, 20px); border-radius: 50%; background: var(--muted); border: 2px solid var(--bg); }
.avatar .dot.on { background: var(--online); }
.verified { display: inline-flex; color: var(--verified); margin-left: 4px; vertical-align: -3px; }
.verified svg { width: 16px; height: 16px; }

/* ---------- spinner / states ---------- */
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { position: fixed; inset: 0; display: grid; place-items: center; align-content: center; gap: 24px; background: var(--bg); z-index: 50; }
.empty-icon { width: 64px; height: 64px; border-radius: 20px; background: var(--gradient-soft); color: var(--brand-2); display: grid; place-items: center; margin: 0 auto 6px; }
.empty-icon .ic { width: 28px; height: 28px; }
.empty { text-align: center; padding: 48px 16px; display: grid; gap: 8px; justify-items: center; }
.empty h3 { font-family: var(--font-display); font-size: 20px; }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- toasts ---------- */
.toast-stack { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999; display: grid; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px;
  background: rgba(31, 30, 37, .92); backdrop-filter: blur(16px); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; animation: toastIn .3s var(--ease);
}
.toast .ic { color: var(--brand-2); }
.toast.success .ic { color: var(--online); }
.toast.error .ic { color: var(--danger); }
.toast.out { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.97); } }

/* =========================================================
   AUTH
   ========================================================= */
.auth { position: fixed; inset: 0; display: grid; grid-template-columns: 1.1fr 1fr; overflow-y: auto; }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 0% 0%, rgba(255,90,54,.18), transparent 60%), radial-gradient(800px 500px at 100% 100%, rgba(255,181,71,.12), transparent 60%), var(--bg-2); border-right: 1px solid var(--line); }
.auth-art::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000 30%, transparent); }
.auth-art-inner { position: relative; height: 100%; padding: 48px 56px; display: flex; flex-direction: column; }
.auth-headline { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 5vw, 68px); line-height: .98; letter-spacing: -0.045em; margin-top: 56px; }
.auth-headline em { font-style: normal; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-sub { color: var(--text-2); max-width: 440px; margin-top: 18px; font-size: 16px; }
.auth-points { list-style: none; display: grid; gap: 10px; margin-top: auto; padding-top: 32px; color: var(--text-2); font-weight: 600; }
.auth-points li { display: flex; align-items: center; gap: 10px; }
.auth-points .ic { color: var(--brand-2); }

.phone-stack { position: relative; height: 280px; margin-top: 36px; }
.phone { position: absolute; width: 150px; height: 260px; border-radius: 26px; padding: 6px; background: #1b1a20; border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); animation: float 6s ease-in-out infinite; }
.phone-screen { width: 100%; height: 100%; border-radius: 21px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 14px; }
.p1 { left: 0; top: 20px; transform: rotate(-8deg); }
.p2 { left: 140px; top: 0; z-index: 2; animation-delay: -2s; }
.p3 { left: 280px; top: 26px; transform: rotate(7deg); animation-delay: -4s; }
@keyframes float { 50% { translate: 0 -10px; } }
.s1 { background: linear-gradient(160deg, #ff5a36, #7a1d0c 70%); }
.s2 { background: var(--surface); justify-content: center; }
.s3 { background: linear-gradient(170deg, #2a2733, #121116); align-items: center; justify-content: center; }
.ph-heart { position: absolute; right: 12px; bottom: 60px; font-size: 24px; color: #fff; }
.ph-line { height: 8px; border-radius: 9px; background: rgba(255,255,255,.55); }
.w60 { width: 60%; } .w40 { width: 40%; } .w50 { width: 50%; }
.ph-bubble { font-size: 10px; padding: 6px 9px; border-radius: 12px; max-width: 85%; font-weight: 600; }
.ph-bubble.l { background: var(--surface-3); align-self: flex-start; }
.ph-bubble.r { background: var(--gradient); color: var(--brand-ink); align-self: flex-end; }
.ph-avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--gradient); }
.ph-pill { font-size: 10px; font-weight: 800; padding: 6px 12px; border-radius: 99px; background: var(--gradient); color: var(--brand-ink); }

.auth-panel { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(420px, 100%); }
.auth-card .brand-row.mobile-only { display: none; margin-bottom: 28px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 28px; }
.seg { height: 38px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); transition: background .2s, color .2s; }
.seg.active { background: var(--surface-3); color: var(--text); }
.auth-form h2 { font-family: var(--font-display); font-size: 30px; letter-spacing: -0.03em; }
.auth-form > p.muted { margin: 4px 0 22px; }
.auth-foot { margin-top: 28px; font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.auth-foot .ic { width: 14px; height: 14px; }
.auth-foot a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================
   SHELL
   ========================================================= */
.shell { position: fixed; inset: 0; display: grid; grid-template-columns: var(--sidebar-w) 1fr; }
.sidebar { border-right: 1px solid var(--line); background: var(--bg-2); padding: 22px 14px; display: flex; flex-direction: column; gap: 24px; overflow-y: auto; }
.sidebar-brand { padding: 0 8px; }
.side-nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 14px; border-radius: 12px; color: var(--text-2); font-weight: 600; transition: background .15s, color .15s; position: relative; }
.nav-item .ic { width: 22px; height: 22px; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gradient); }
.nav-item .badge { margin-left: auto; }
.create-btn { margin-top: 12px; height: 46px; }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; }
.sidebar-foot .tiny { display: flex; align-items: center; gap: 6px; padding: 0 8px; }
.sidebar-foot .tiny .ic { width: 14px; height: 14px; }
.denpher-link { color: var(--muted); }
.denpher-link:hover { color: var(--brand-2); }
.me-pill { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.me-pill:hover { background: var(--surface-2); }
.me-pill-text { display: grid; min-width: 0; }
.me-pill-text strong, .me-pill-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-pill-text small { color: var(--muted); font-size: 12px; }

.topbar { display: none; }
.tabbar { display: none; }
.stage { position: relative; overflow: hidden; height: 100dvh; }
.view { display: none; height: 100%; position: relative; }
.view.active { display: block; animation: viewIn .25s var(--ease); }
.view.scroll { overflow-y: auto; }
@keyframes viewIn { from { opacity: 0; } }
.page { max-width: 960px; margin: 0 auto; padding: 32px 28px 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; gap: 16px; }
.page-title { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 22px 0 20px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s, border-color .15s; }
.tab .ic { width: 18px; height: 18px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--brand); }

/* =========================================================
   REELS FEED
   ========================================================= */
.feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.feed::-webkit-scrollbar { display: none; }
.feed-state { height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px; }
.feed-state h3 { font-family: var(--font-display); font-size: 24px; }
.feed-tools { position: absolute; top: 18px; right: 20px; z-index: 5; display: flex; gap: 8px; }
.feed-tools .chip { height: 38px; }
.feed-tools .ic { width: 18px; height: 18px; }
.new-pill { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 6; display: inline-flex; gap: 6px; align-items: center; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--gradient); color: var(--brand-ink); font-weight: 800; font-size: 13px; box-shadow: var(--shadow-glow); animation: toastIn .3s var(--ease); }
.new-pill .ic { width: 16px; height: 16px; }

.reel { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 18px 0; }
.reel-frame { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; border-radius: var(--radius-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); }
.reel-frame video { width: 100%; height: 100%; object-fit: cover; }
.reel-tap { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.reel-paused { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .2s; }
.reel.is-paused .reel-paused { opacity: 1; }
.reel-paused span { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); color: #fff; }
.reel-paused .ic { width: 30px; height: 30px; margin-left: 4px; }
.reel-shade { position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(0deg, rgba(0,0,0,.82), rgba(0,0,0,.35) 50%, transparent); pointer-events: none; z-index: 2; }
.reel-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px 20px; z-index: 3; display: grid; gap: 8px; color: #fff; pointer-events: none; }
.reel-info > * { pointer-events: auto; }
.reel-author { display: flex; align-items: center; gap: 10px; }
.reel-author-btn { display: flex; align-items: center; gap: 10px; font-weight: 800; min-width: 0; }
.reel-author-btn .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reel-author .avatar { border: 2px solid rgba(255,255,255,.9); }
.reel-follow { height: 28px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.6); font-size: 12px; font-weight: 800; color: #fff; flex: none; }
.reel-follow.on { background: rgba(255,255,255,.18); border-color: transparent; }
.reel-caption { font-size: 14px; line-height: 1.45; max-height: 4.4em; overflow: hidden; color: rgba(255,255,255,.92); cursor: pointer; overflow-wrap: anywhere; }
.reel-caption.open { max-height: 40vh; overflow-y: auto; }
.reel-caption .tag { color: var(--brand-2); font-weight: 700; }
.reel-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,.75); font-weight: 600; min-width: 0; }
.reel-meta .ic { width: 14px; height: 14px; flex: none; }
.marquee { overflow: hidden; white-space: nowrap; max-width: 70%; mask-image: linear-gradient(90deg, #000 80%, transparent); }
.marquee span { display: inline-block; padding-right: 30px; animation: marquee 10s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }
.reel-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.18); z-index: 4; }
.reel-progress span { display: block; height: 100%; width: 0; background: var(--gradient); }

.reel-actions { display: flex; flex-direction: column; gap: 14px; align-self: flex-end; padding-bottom: 12px; }
.ra { display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.ra-btn { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); transition: transform .15s var(--ease), background .15s; }
.ra-btn:hover { background: var(--surface-3); }
.ra-btn:active { transform: scale(.9); }
.ra-btn .ic { width: 24px; height: 24px; }
.ra.liked .ra-btn { color: var(--brand); background: var(--brand-soft); border-color: rgba(255,90,54,.3); }
.ra.liked .ra-btn svg { fill: currentColor; }
.ra.liked .ra-btn { animation: pop .35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.18); } }

.heart-burst { position: absolute; z-index: 5; pointer-events: none; color: #fff; width: 110px; height: 110px; margin: -55px 0 0 -55px; filter: drop-shadow(0 8px 24px rgba(255,90,54,.7)); animation: burst .85s var(--ease) forwards; }
.heart-burst svg { width: 100%; height: 100%; fill: var(--brand); stroke: none; }
@keyframes burst { 0% { transform: scale(.2) rotate(-15deg); opacity: 0; } 25% { transform: scale(1.1) rotate(0); opacity: 1; } 60% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.3) translateY(-40px); opacity: 0; } }

/* =========================================================
   MESSAGES
   ========================================================= */
.chat-layout { display: grid; grid-template-columns: 340px 1fr; height: 100%; }
.convo-pane { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding: 24px 12px 12px; gap: 14px; }
.pane-head { display: flex; justify-content: space-between; align-items: center; padding: 0 8px; }
.pane-head .page-title { font-size: 28px; }
.convo-pane .search { margin: 0 4px; }
.convo-list { overflow-y: auto; flex: 1; display: grid; align-content: start; gap: 2px; }
.convo { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; text-align: left; width: 100%; transition: background .15s; }
.convo:hover { background: var(--surface); }
.convo.active { background: var(--surface-2); }
.convo-text { flex: 1; min-width: 0; display: grid; }
.convo-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.convo-top strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.convo-top time { font-size: 11px; color: var(--muted); flex: none; }
.convo-last { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo.unread .convo-last { color: var(--text); font-weight: 700; }
.convo .badge { flex: none; }

.chat-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: radial-gradient(900px 400px at 100% 0, rgba(255,90,54,.05), transparent 60%); }
.chat-empty { margin: auto; text-align: center; max-width: 340px; display: grid; gap: 8px; justify-items: center; padding: 24px; }
.chat-empty h3 { font-family: var(--font-display); font-size: 24px; }
.chat-empty .btn { margin-top: 8px; }
.chat-active { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 8px; height: 68px; padding: 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.back-btn { display: none; }
.chat-partner { display: flex; align-items: center; gap: 12px; text-align: left; padding: 6px 8px; border-radius: 12px; min-width: 0; }
.chat-partner:hover { background: var(--surface); }
.chat-partner-text { display: grid; min-width: 0; }
.chat-partner-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-partner-text small { font-size: 12px; }
.chat-partner-text small.on { color: var(--online); }
.msg-stream { flex: 1; overflow-y: auto; padding: 20px 20px 8px; display: flex; flex-direction: column; }
.msg-list { display: flex; flex-direction: column; gap: 3px; margin-top: auto; }
.day-sep { align-self: center; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 4px 10px; border-radius: 99px; margin: 14px 0 10px; }
.msg { max-width: min(72%, 520px); padding: 9px 13px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; position: relative; animation: msgIn .2s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg.theirs { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.msg.mine { align-self: flex-end; background: var(--gradient); color: var(--brand-ink); font-weight: 600; border-bottom-right-radius: 6px; }
.msg.grouped.theirs { border-top-left-radius: 6px; }
.msg.grouped.mine { border-top-right-radius: 6px; }
.msg time { display: block; font-size: 10px; opacity: .6; margin-top: 2px; text-align: right; font-weight: 600; }
.msg.pending { opacity: .6; }
.msg.big-emoji { background: none !important; font-size: 40px; padding: 0 4px; line-height: 1.15; }
.msg.big-emoji time { color: var(--muted); opacity: 1; }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--surface-2); border-radius: 18px; border-bottom-left-radius: 6px; margin-top: 6px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.composer { display: flex; align-items: center; gap: 8px; padding: 12px 16px 16px; flex: none; }
.composer input { flex: 1; height: 46px; padding: 0 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-strong); outline: none; min-width: 0; }
.composer input:focus { border-color: var(--brand); }
.send-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--gradient); color: var(--brand-ink); display: grid; place-items: center; flex: none; transition: transform .15s, opacity .15s; box-shadow: var(--shadow-glow); }
.send-btn:disabled { opacity: .35; box-shadow: none; cursor: default; }
.send-btn .ic { width: 20px; height: 20px; }
.emoji-wrap { position: relative; }
.emoji-picker { position: absolute; bottom: 52px; left: 0; width: 280px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 10px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 10; }
.emoji-picker button { font-size: 22px; height: 32px; border-radius: 8px; }
.emoji-picker button:hover { background: var(--surface-3); }

/* =========================================================
   PEOPLE
   ========================================================= */
.people-body { display: grid; gap: 28px; }
.section-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.person { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, transform .15s var(--ease); }
.person:hover { border-color: var(--line-strong); }
.person-head { display: flex; align-items: center; gap: 12px; text-align: left; min-width: 0; }
.person-text { display: grid; min-width: 0; }
.person-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-text small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-bio { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 0; }
.person-actions { display: flex; gap: 8px; margin-top: auto; }
.person-actions .btn { flex: 1; }
.person-actions .btn .ic { width: 16px; height: 16px; }
.person-actions .btn[aria-label] { flex: none; width: 34px; padding: 0; }
.btn.on { color: var(--brand-2); border-color: rgba(255,181,71,.35); }
.person-row { flex-direction: row; align-items: center; }
.person-row .person-head { flex: 1; }
.person-row .person-actions { margin-top: 0; flex: none; }
.person-row .person-actions .btn { flex: none; }
.list { display: grid; gap: 8px; }

/* =========================================================
   PROFILE
   ========================================================= */
.profile-hero { border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.profile-cover { height: 140px; background: radial-gradient(500px 200px at 20% 0, rgba(255,181,71,.55), transparent 70%), var(--gradient); position: relative; }
.profile-cover::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(0,0,0,.18) 1px, transparent 1px); background-size: 14px 14px; }
.profile-main { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: start; padding: 0 28px; margin-top: -56px; position: relative; }
.profile-main > .profile-id, .profile-main > .profile-cta { padding-top: 68px; }
.profile-avatar-btn { position: relative; border-radius: 50%; }
.profile-avatar-btn .avatar { border: 5px solid var(--surface); background-color: var(--surface-2); }
.avatar-cam { position: absolute; right: 4px; bottom: 6px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 3px solid var(--surface); transition: background .15s; }
.avatar-cam .ic { width: 16px; height: 16px; }
.profile-avatar-btn:hover .avatar-cam { background: var(--brand); color: var(--brand-ink); }
.profile-id { min-width: 0; }
.profile-name { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; overflow-wrap: anywhere; }
.profile-name .verified svg { width: 22px; height: 22px; }
.profile-bio { margin-top: 8px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-cta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 22px; }
.stat { padding: 16px; text-align: center; display: grid; transition: background .15s; }
.stat + .stat { border-left: 1px solid var(--line); }
a.stat:hover { background: var(--surface-2); }
.stat strong { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

.reel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tile { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.tile video { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.tile:hover video { transform: scale(1.04); }
.tile-meta { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.tile-meta .ic { width: 14px; height: 14px; }
.tile::after { content: ""; position: absolute; inset: 50% 0 0 0; background: linear-gradient(0deg, rgba(0,0,0,.55), transparent); pointer-events: none; }
.tile-meta { z-index: 1; }

.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.card h3 { font-family: var(--font-display); font-size: 18px; margin-bottom: 16px; }
.photo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.photo-row .row-actions { margin: 0; }
.meta-list { display: grid; gap: 10px; margin-bottom: 16px; }
.meta-list div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { font-weight: 700; text-align: right; overflow-wrap: anywhere; }

/* =========================================================
   MODALS
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(5, 4, 7, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-card { position: relative; width: min(480px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-xl); padding: 22px; box-shadow: var(--shadow-lg); animation: rise .28s var(--ease); display: flex; flex-direction: column; gap: 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-card.wide { width: min(820px, 100%); }
.modal-card.narrow { width: min(380px, 100%); }
.modal-card.center { text-align: center; align-items: center; }
.modal-card h2 { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.modal-x { position: absolute; top: 14px; right: 14px; z-index: 5; }

.upload-grid { display: grid; grid-template-columns: 260px 1fr; gap: 22px; }
.dropzone { aspect-ratio: 9 / 16; border-radius: var(--radius-lg); border: 2px dashed var(--line-strong); background: var(--bg-2); display: grid; place-items: center; position: relative; overflow: hidden; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone.drag, .dropzone:hover { border-color: var(--brand); background: var(--brand-soft); }
.drop-prompt { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 16px; font-size: 14px; }
.drop-prompt .btn { margin-top: 10px; }
.drop-prompt .muted { font-size: 12px; }
.drop-preview { position: absolute; inset: 0; }
.drop-preview video { width: 100%; height: 100%; object-fit: cover; }
.remove-video { position: absolute; top: 10px; right: 10px; }
.file-chip { position: absolute; left: 10px; bottom: 10px; right: 10px; font-size: 11px; font-weight: 700; padding: 6px 10px; border-radius: 8px; background: rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-fields { display: flex; flex-direction: column; min-width: 0; }
.upload-fields .row-actions { margin-top: auto; padding-top: 12px; }
.sound-pick { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 12px; padding: 4px 4px 4px 14px; color: var(--muted); }
.sound-pick:focus-within { border-color: var(--brand); }
.sound-pick input { flex: 1; background: none; border: 0; outline: none; padding: 8px 0; color: var(--text); min-width: 0; }
.progress { display: grid; gap: 6px; margin-top: 4px; }
.progress-track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--gradient); transition: width .2s; }
.progress small { color: var(--muted); font-weight: 700; }

.sound-list, .picker-list { display: grid; gap: 4px; max-height: 420px; overflow-y: auto; }
.sound { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; }
.sound:hover { background: var(--surface-2); }
.sound-play { width: 44px; height: 44px; border-radius: 12px; background: var(--gradient-soft); color: var(--brand-2); display: grid; place-items: center; flex: none; }
.sound-play.playing { background: var(--gradient); color: var(--brand-ink); }
.sound-text { flex: 1; min-width: 0; display: grid; }
.sound-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sound-text small { color: var(--muted); font-size: 12px; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; text-align: left; width: 100%; }
.pick-row:hover { background: var(--surface-2); }

.avatar-preview { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; background: var(--gradient-soft); display: grid; place-items: center; font-family: var(--font-display); font-size: 56px; font-weight: 800; color: var(--brand-2); border: 4px solid var(--surface-3); }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

.modal.sheet { place-items: end center; padding: 0; }
.sheet-card { width: min(560px, 100%); height: min(72dvh, 680px); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 20px 20px 0; animation: sheetUp .3s var(--ease); gap: 10px; }
@keyframes sheetUp { from { transform: translateY(40%); opacity: 0; } }
.comment-list { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 16px; padding: 8px 2px; }
.comment { display: flex; gap: 12px; align-items: flex-start; }
.comment-body { flex: 1; min-width: 0; }
.comment-body header { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.comment-body header button { font-weight: 800; }
.comment-body time { color: var(--muted); font-size: 12px; }
.comment-body p { font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--text-2); }
.comment .icon-btn { width: 32px; height: 32px; opacity: 0; }
.comment:hover .icon-btn, .comment .icon-btn:focus-visible { opacity: 1; }
.comment .icon-btn .ic { width: 16px; height: 16px; }
.comment-form { display: flex; align-items: center; gap: 10px; padding: 12px 0 16px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }
.comment-form input { flex: 1; height: 42px; padding: 0 14px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line-strong); outline: none; min-width: 0; }
.comment-form input:focus { border-color: var(--brand); }

.user-modal { padding: 0; gap: 0; }
.user-modal .profile-hero { border: 0; border-radius: 0; }
.user-modal .profile-main { padding: 0 22px; grid-template-columns: auto 1fr; }
.user-modal .profile-main .profile-cta { grid-column: 1 / -1; justify-content: flex-start; padding-top: 0; }
.user-modal .reel-grid { padding: 16px 22px 22px; }
.user-modal .empty { padding: 32px 16px; }
.user-modal .profile-avatar-btn { cursor: default; }

.modal.viewer { padding: 16px; }
.viewer-body { height: 100%; width: 100%; display: flex; justify-content: center; }
.viewer-body .reel { height: 100%; padding: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  :root { --sidebar-w: 84px; }
  .sidebar { padding: 22px 12px; align-items: center; }
  .sidebar .brand-word, .nav-item > span:not(.avatar), .create-btn span, .sidebar-foot { display: none; }
  .sidebar-brand { padding: 0; }
  .nav-item { width: 56px; justify-content: center; padding: 0; }
  .nav-item .badge { position: absolute; top: 6px; right: 6px; margin: 0; }
  .nav-item.active::before { left: -12px; }
  .create-btn { width: 56px; padding: 0; }
  .chat-layout { grid-template-columns: 300px 1fr; }
}

@media (max-width: 860px) {
  body { font-size: 15px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-card .brand-row.mobile-only { display: inline-flex; }
  .auth-panel { place-items: start center; padding-top: 48px; }

  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .sidebar { display: none; }
  .topbar { display: flex; position: absolute; top: 0; left: 0; right: 0; height: var(--topbar-h); padding: 0 12px 0 16px; align-items: center; justify-content: space-between; z-index: 20; background: rgba(11,10,13,.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .topbar-actions { display: flex; gap: 4px; }
  .shell[data-view="reels"] .topbar { background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); border-bottom: 0; backdrop-filter: none; }
  .shell[data-view="reels"] .topbar .icon-btn { color: #fff; }
  .stage { height: calc(100dvh - var(--tabbar-h) - env(safe-area-inset-bottom)); }
  .view.scroll { padding-top: var(--topbar-h); }
  .page { padding: 20px 16px 40px; }
  .page-title { font-size: 28px; }

  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(11,10,13,.94); backdrop-filter: blur(16px); border-top: 1px solid var(--line); z-index: 30; }
  .tab-item { display: grid; place-content: center; justify-items: center; gap: 2px; font-size: 10px; font-weight: 700; color: var(--muted); position: relative; }
  .tab-item .ic { width: 24px; height: 24px; }
  .tab-item.active { color: var(--text); }
  .tab-item.active .avatar { box-shadow: 0 0 0 2px var(--text); }
  .tab-item .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
  .tab-create-btn { width: 46px; height: 34px; border-radius: 11px; background: var(--gradient); color: var(--brand-ink); display: grid; place-items: center; box-shadow: var(--shadow-glow); }

  .feed-tools { display: none; }
  .new-pill { top: calc(var(--topbar-h) + 8px); }
  .reel { padding: 0; gap: 0; position: relative; }
  .reel-frame { aspect-ratio: auto; width: 100%; border-radius: 0; box-shadow: none; }
  .reel-actions { position: absolute; right: 10px; bottom: 24px; z-index: 4; gap: 16px; }
  .ra { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
  .ra-btn { background: transparent; border: 0; width: 44px; height: 44px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
  .ra-btn .ic { width: 30px; height: 30px; }
  .ra.liked .ra-btn { background: transparent; }
  .reel-info { right: 64px; padding-bottom: 22px; }

  .chat-layout { grid-template-columns: 1fr; padding-top: var(--topbar-h); }
  .convo-pane { border-right: 0; padding-top: 16px; }
  .chat-pane { display: none; }
  .chat-layout.has-active .convo-pane { display: none; }
  .chat-layout.has-active .chat-pane { display: flex; }
  .shell.chat-open .tabbar, .shell.chat-open .topbar { display: none; }
  .shell.chat-open .stage { height: 100dvh; }
  .shell.chat-open .chat-layout { padding-top: 0; }
  .back-btn { display: inline-grid; }
  .chat-head { padding: 0 8px; height: 60px; }
  .msg-stream { padding: 14px 12px 6px; }
  .msg { max-width: 82%; }
  .composer { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
  .composer input { font-size: 16px; }

  .profile-cover { height: 110px; }
  .profile-main { grid-template-columns: 1fr; justify-items: start; padding: 0 18px; margin-top: -48px; gap: 12px; }
  .profile-main > .profile-id, .profile-main > .profile-cta { padding-top: 0; }
  .reel-grid { grid-template-columns: repeat(3, 1fr); }
  .avatar.xl { --s: 96px; }
  .profile-cta { justify-content: flex-start; width: 100%; }
  .profile-cta .btn { flex: 1; }
  .profile-name { font-size: 26px; }
  .settings-grid { grid-template-columns: 1fr; }
  .reel-grid { gap: 3px; }
  .tile { border-radius: 6px; }

  .modal { padding: 0; place-items: end center; }
  .modal-card, .modal-card.wide, .modal-card.narrow { width: 100%; max-height: 92dvh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); animation: sheetUp .3s var(--ease); }
  .modal.viewer { padding: 0; place-items: stretch; }
  .viewer-body .reel-frame { border-radius: 0; }
  .upload-grid { grid-template-columns: 1fr; }
  .dropzone { aspect-ratio: auto; height: 260px; }
  .field input, .field textarea { font-size: 16px; }
  .comment-form input { font-size: 16px; }
  .people-grid { grid-template-columns: 1fr; }
  .user-modal .profile-main { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
