:root {
  --bg: #09090b;
  --bg-2: #111114;
  --bg-3: #18181c;
  --line: #26262c;
  --line-2: #33333b;
  --text: #f4f4f5;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --accent: #ff2d87;
  --grad: linear-gradient(135deg, #ff5a5f 0%, #ff2d87 55%, #8b5cf6 100%);
  --heart: #ff3b5c;
  --thumb: #3b9bff;
  --ok: #22c55e;
  --radius: 14px;
  --tabbar: 58px;
  --side: 244px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', var(--font);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; }
body { overscroll-behavior: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: var(--text); }
img, video { display: block; }
.muted { color: var(--text-3); }
.hidden { display: none !important; }
svg.i { width: 24px; height: 24px; flex: none; }

/* preview ribbon */
.ribbon {
  position: fixed; z-index: 1000; top: 14px; right: -38px; transform: rotate(45deg);
  background: #facc15; color: #111; font: 800 11px/1 var(--font); letter-spacing: .14em;
  padding: 6px 44px; pointer-events: none; box-shadow: 0 2px 10px rgba(0,0,0,.5);
}

/* layout */
#app { min-height: 100%; }
.side { display: none; }
main#view { min-height: 100dvh; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
main#view.full { padding-bottom: 0; }
.brand { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -.02em; display: inline-flex; align-items: baseline; gap: 2px; }
.brand-n { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.tabbar {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(9,9,11,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; height: 100%; display: grid; place-items: center; color: var(--text-2); }
.tabbar a.on { color: var(--text); }
.tabbar .up { width: 46px; height: 32px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #fff; }
.tab-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid transparent; }
.tabbar a.on .tab-av { border-color: var(--text); }

@media (min-width: 900px) {
  .side {
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--side);
    padding: 26px 14px 18px; border-right: 1px solid var(--line); background: var(--bg); z-index: 40;
  }
  .side .brand { padding: 0 12px 26px; font-size: 26px; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav a { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; font-weight: 500; color: var(--text-2); }
  .side-nav a:hover { background: var(--bg-3); color: var(--text); }
  .side-nav a.on { color: var(--text); font-weight: 700; }
  .side-nav .cta { margin-top: 14px; background: var(--grad); color: #fff; justify-content: center; font-weight: 700; }
  .side-nav .cta:hover { background: var(--grad); filter: brightness(1.08); }
  .side-foot { margin-top: auto; padding: 0 12px; font-size: 12px; color: var(--text-3); line-height: 1.8; }
  .side-foot a:hover { color: var(--text); }
  main#view { margin-left: var(--side); padding-bottom: 0; }
  .tabbar { display: none; }
}

/* generic page */
.page { max-width: 640px; margin: 0 auto; padding: 18px 16px 40px; }
.page.wide { max-width: 1040px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 18px; }
.page-head h1 { font-family: var(--display); font-size: 26px; margin: 0; letter-spacing: -.02em; }
.topbar-m { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
@media (min-width: 900px) { .topbar-m { display: none; } }
h2 { font-size: 17px; margin: 26px 0 10px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stack > * + * { margin-top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 12px; font-weight: 600; background: var(--bg-3); border: 1px solid var(--line-2); color: var(--text);
  transition: transform .08s ease, filter .15s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--grad); border: 0; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.white { background: #fff; color: #111; border: 0; }
.btn.ghost { background: transparent; }
.btn.danger { color: #ff6b81; border-color: #4a2030; }
.btn.block { width: 100%; }
.btn.sm { height: 34px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn.ig { background: linear-gradient(90deg, #f58529, #dd2a7b 50%, #8134af); border: 0; color: #fff; }
.btn.ig.soon { background: var(--bg-3); color: var(--text-2); border: 1px dashed var(--line-2); }
.soon-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: #2a2a31; color: var(--text-2); }

label.f { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input, textarea.input, select.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--bg-3);
  border: 1px solid var(--line-2); outline: none; transition: border-color .15s;
}
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: #6b6b76; }
.err { color: #ff6b81; font-size: 14px; min-height: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check a { color: var(--text); text-decoration: underline; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin: 18px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg button { height: 64px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; display: grid; place-items: center; line-height: 1.2; }
.seg button small { display: block; font-weight: 500; color: var(--text-3); font-size: 11px; }
.seg button.on { border-color: var(--accent); background: rgba(255,45,135,.1); }

/* auth hero */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px 90px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-hero { text-align: center; margin-bottom: 26px; }
.auth-hero .brand { font-size: 40px; }
.auth-hero p { color: var(--text-2); margin: 8px 0 0; font-size: 16px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--text-2); font-size: 14px; }
.auth-switch a { color: var(--text); font-weight: 600; }

/* ---------- feed ---------- */
.feed-wrap { position: relative; height: calc(100dvh - var(--tabbar) - env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .feed-wrap { height: 100dvh; } }
.feed { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.feed-top {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: center;
  padding: 14px 16px calc(14px); pointer-events: none;
}
.feed-top .brand { position: absolute; left: 16px; font-size: 20px; pointer-events: auto; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.feed-tabs { display: flex; gap: 20px; pointer-events: auto; }
.feed-tabs button { font-weight: 700; font-size: 16px; color: rgba(255,255,255,.6); padding: 4px 0; text-shadow: 0 1px 6px rgba(0,0,0,.5); position: relative; }
.feed-tabs button.on { color: #fff; }
.feed-tabs button.on::after { content: ''; position: absolute; left: 25%; right: 25%; bottom: -3px; height: 2px; border-radius: 2px; background: #fff; }
@media (min-width: 900px) { .feed-top .brand { display: none; } }

.slide { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; position: relative; display: flex; justify-content: center; align-items: center; }
.stage { position: relative; height: 100%; width: 100%; background: #000; overflow: hidden; }
@media (min-width: 900px) {
  .slide { padding: 20px 0; gap: 18px; align-items: flex-end; }
  .stage { width: auto; aspect-ratio: 9 / 16; height: 100%; border-radius: 16px; }
}
.stage video, .stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage .poster { filter: blur(0); }
.stage::after { content: ''; position: absolute; inset: auto 0 0 0; height: 48%; background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none; }
.stage::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 110px; background: linear-gradient(rgba(0,0,0,.45), transparent); pointer-events: none; z-index: 1; }
.meta { position: absolute; z-index: 3; left: 0; right: 76px; bottom: 0; padding: 0 16px 18px; }
@media (min-width: 900px) { .meta { right: 0; } }
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--bg-3); flex: none; }
.av-ph { display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--grad); }
.who .name { font-weight: 700; font-size: 15px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.who .sub { font-size: 12px; color: rgba(255,255,255,.75); }
.fbtn { height: 30px; padding: 0 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.7); font-size: 13px; font-weight: 700; color: #fff; }
.fbtn.on { border-color: rgba(255,255,255,.3); color: rgba(255,255,255,.75); }
.cap { font-size: 14px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); max-height: 4.4em; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.cap.open { max-height: none; }
.tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.16); backdrop-filter: blur(6px); color: #fff; text-transform: uppercase; }
.tag.demo { background: #facc15; color: #111; }
.rail { position: absolute; z-index: 4; right: 8px; bottom: 18px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
@media (min-width: 900px) { .rail { position: static; padding-bottom: 6px; } }
.act { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.act .ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; transition: transform .15s; }
@media (min-width: 900px) { .act .ic { background: var(--bg-3); } .act { color: var(--text); text-shadow: none; } }
.act svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.act.on.heart svg { color: var(--heart); fill: var(--heart); }
.act.on.thumb svg { color: var(--thumb); fill: var(--thumb); }
.act.pop .ic { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
.mute-ind { position: absolute; z-index: 4; top: 58px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; }
.mute-ind svg { width: 18px; height: 18px; }
@media (min-width: 900px) { .mute-ind { top: 14px; } }
.burst { position: absolute; z-index: 6; width: 110px; height: 110px; color: var(--heart); pointer-events: none; animation: burst .8s ease forwards; }
@keyframes burst { 0% { transform: translate(-50%,-50%) scale(.2); opacity: 0; } 20% { transform: translate(-50%,-50%) scale(1.15); opacity: 1; } 60% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 100% { transform: translate(-50%,-80%) scale(.9); opacity: 0; } }
.progress { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.15); }
.progress i { display: block; height: 100%; width: 0; background: #fff; }
.feed-empty { height: 100%; display: grid; place-items: center; text-align: center; padding: 24px; }
.feed-empty h2 { font-family: var(--display); font-size: 26px; margin: 0 0 8px; }
.feed-empty p { color: var(--text-2); max-width: 340px; margin: 0 auto 20px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.back-btn { position: absolute; z-index: 7; top: 12px; left: 12px; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; }

/* ---------- discover ---------- */
.hero-strip { border-radius: 18px; padding: 22px 20px; margin-bottom: 18px; background: radial-gradient(120% 140% at 0% 0%, rgba(255,90,95,.28), transparent 50%), radial-gradient(120% 140% at 100% 100%, rgba(139,92,246,.28), transparent 55%), var(--bg-2); border: 1px solid var(--line); }
.hero-strip h1 { font-family: var(--display); margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; }
.hero-strip p { margin: 0; color: var(--text-2); }
.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; left: 13px; top: 13px; width: 20px; height: 20px; color: var(--text-3); }
.search .input { padding-left: 42px; }
.chips { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.chip { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--text-2); }
.chip.on { background: #fff; color: #111; border-color: #fff; }
.grid-people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .grid-people { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid-people { grid-template-columns: repeat(4, 1fr); } }
.pcard { position: relative; border-radius: 14px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); aspect-ratio: 3/4; display: block; }
.pcard .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard .cover-ph { position: absolute; inset: 0; background: linear-gradient(160deg, #1f1f26, #121216); }
.pcard::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,.85)); }
.pcard .pinfo { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px; }
.pcard .av { width: 34px; height: 34px; border: 2px solid #fff; margin-bottom: 6px; }
.pcard .pn { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .ps { font-size: 12px; color: rgba(255,255,255,.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- profile ---------- */
.prof { padding: 18px 16px 0; max-width: 940px; margin: 0 auto; }
.prof-top { display: flex; gap: 18px; align-items: center; }
.prof-av { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; flex: none; }
.prof-av-wrap { padding: 3px; border-radius: 50%; background: var(--grad); flex: none; }
.prof-av-wrap .prof-av { border: 3px solid var(--bg); }
@media (min-width: 700px) { .prof-av { width: 140px; height: 140px; } .prof-top { gap: 44px; } }
.prof-name { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.role { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--bg-3); color: var(--text-2); border: 1px solid var(--line-2); }
.role.brand { color: #fbbf24; border-color: #4d3a12; }
.role.creator { color: #f472b6; border-color: #4d1c35; }
.stats { display: flex; gap: 22px; margin-top: 10px; }
.stats div { font-size: 13px; color: var(--text-2); }
.stats b { display: block; font-size: 17px; color: var(--text); }
.bio { margin: 14px 0 0; white-space: pre-wrap; font-size: 14px; }
.iglink { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 600; color: #f9a8d4; }
.prof-actions { display: flex; gap: 8px; margin: 16px 0 6px; }
.prof-actions .btn { flex: 1; height: 38px; font-size: 14px; }
.prof-actions .btn.icon { flex: 0 0 42px; padding: 0; }
.grid-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 2px; }
.gp { position: relative; aspect-ratio: 9/16; background: var(--bg-3); overflow: hidden; display: block; }
.gp img, .gp video { width: 100%; height: 100%; object-fit: cover; }
.gp .gpc { position: absolute; left: 8px; bottom: 6px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.gp .gpc svg { width: 14px; height: 14px; }
.empty-grid { text-align: center; color: var(--text-3); padding: 48px 16px; }

/* ---------- upload ---------- */
.drop { display: block; border: 2px dashed var(--line-2); border-radius: 18px; padding: 34px 18px; text-align: center; cursor: pointer; background: var(--bg-2); transition: border-color .15s, background .15s; }
.drop:hover, .drop.drag { border-color: var(--accent); background: rgba(255,45,135,.05); }
.drop .big { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.drop h3 { margin: 0 0 4px; font-size: 18px; }
.drop p { margin: 0; color: var(--text-3); font-size: 13px; }
.up-grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .up-grid { grid-template-columns: 240px 1fr; align-items: start; } }
.up-prev { position: relative; aspect-ratio: 9/16; border-radius: 16px; overflow: hidden; background: #000; max-width: 260px; margin: 0 auto; width: 100%; }
.up-prev video { width: 100%; height: 100%; object-fit: cover; }
.bar { height: 8px; border-radius: 4px; background: var(--bg-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }

/* ---------- sheets ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: 82dvh; background: var(--bg-2); border-radius: 20px 20px 0 0; border: 1px solid var(--line); border-bottom: 0; display: flex; flex-direction: column; animation: up .22s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; border-bottom: 1px solid var(--line); } }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
.sheet-h { display: flex; align-items: center; justify-content: center; position: relative; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.sheet-h .x { position: absolute; right: 10px; top: 8px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; }
.sheet-b { overflow-y: auto; padding: 14px 16px; flex: 1; }
.sheet-f { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 8px; align-items: center; }
.sheet-f .input { height: 42px; border-radius: 999px; }
.cmt { display: flex; gap: 10px; padding: 8px 0; }
.cmt .av { width: 34px; height: 34px; }
.cmt .cb { flex: 1; min-width: 0; font-size: 14px; }
.cmt .cn { font-weight: 700; font-size: 13px; }
.cmt .ct { color: var(--text-3); font-size: 12px; font-weight: 400; margin-left: 6px; }
.cmt .cx { color: var(--text-3); font-size: 12px; align-self: flex-start; padding: 4px; }
.menu-list button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 500; }
.menu-list button:last-child { border-bottom: 0; }
.menu-list .danger { color: #ff6b81; }

/* ---------- misc ---------- */
#toast { position: fixed; z-index: 300; left: 50%; bottom: calc(var(--tabbar) + 18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #fff; color: #111; font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 12px; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { #toast { bottom: 28px; margin-left: calc(var(--side) / 2); } }
.legal h1 { font-family: var(--display); }
.legal h2 { margin-top: 28px; }
.legal p, .legal li { color: #d4d4d8; font-size: 15px; }
.inbox-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.inbox-item .av { width: 44px; height: 44px; }
.inbox-item .ib { flex: 1; min-width: 0; }
.inbox-item .im { margin: 4px 0 8px; white-space: pre-wrap; font-size: 14px; color: #d4d4d8; }
.status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.status.accepted { color: var(--ok); }
.status.declined { color: #ff6b81; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.ig-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ig-media button { position: relative; aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: var(--bg-3); }
.ig-media img { width: 100%; height: 100%; object-fit: cover; }
.ig-media .done { position: absolute; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; font-weight: 700; font-size: 13px; }

/* QC fixes 10/17 */
@media (max-width: 899px) {
  .feed-top .brand { display: none; }
  .ribbon { top: auto; right: auto; left: 10px; bottom: calc(var(--tabbar) + 10px + env(safe-area-inset-bottom)); transform: none; padding: 4px 8px; border-radius: 6px; font-size: 9px; opacity: .85; }
}
@media (min-width: 900px) { .feed-top { padding-top: 30px; } .slide { padding-top: 64px; } }
@media (max-width: 899px) { .meta { padding-bottom: 34px; } .rail { bottom: 34px; } }
.btn.ig { white-space: nowrap; font-size: 14px; padding: 0 12px; } .btn.ig .soon-tag { font-size: 10px; padding: 3px 6px; }

/* ---------- cross-posting (10/18) ---------- */
.xs { font-size: 12px; }
.btn.soon { background: var(--bg-3); color: var(--text-2); border: 1px dashed var(--line-2); }
.pf { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff; }
.pf svg { width: 19px; height: 19px; }
.pf.instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.pf.facebook { background: #1877f2; }
.pf.tiktok { background: #111; box-shadow: inset 0 0 0 1px #2c2c33, -1.5px -1px 0 #25f4ee inset, 1.5px 1px 0 #fe2c55 inset; }
/* switch */
input.sw { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #3a3a42; position: relative; flex: none; cursor: pointer; transition: background .15s; margin: 0; }
input.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
input.sw:checked { background: var(--accent); }
input.sw:checked::after { transform: translateX(18px); }
input.sw:disabled { opacity: .35; cursor: default; }
/* settings: connected accounts */
.conns { padding: 4px 16px; }
.conn { padding: 14px 0; border-bottom: 1px solid var(--line); }
.conn:last-child { border-bottom: 0; }
.conn-top { display: flex; align-items: center; gap: 12px; }
.conn-b { flex: 1; min-width: 0; }
.conn-n { font-weight: 700; }
.conn-s { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conn-s .acct { color: var(--text); font-weight: 600; }
.conn-note { font-size: 12px; color: var(--text-3); margin: 8px 0 0 46px; }
.conn-extra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0 46px; font-size: 13px; }
.conn-extra .input { height: 38px; flex: 1; min-width: 160px; }
/* composer: Also post to */
.xp { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 6px 14px 10px; }
.xp-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.xp-all { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.xp-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); cursor: pointer; }
.xp-row.off .pf { filter: grayscale(1); opacity: .5; }
.xp-row.off { cursor: default; }
a.xp-row.off { cursor: pointer; }
.xp-n { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.xp-n small { display: block; font-weight: 500; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-go { font-size: 13px; font-weight: 700; color: var(--accent); }
.xp-spec { margin: 10px 0 0; }
#xpWarn:empty { display: none; }
#xpWarn { margin-top: 6px; }
.tt-box { margin: 4px 0 2px; padding: 12px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line-2); }
.tt-who { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.tt-who svg { width: 18px; height: 18px; }
.tt-box select.input { height: 42px; }
.tt-allow { display: flex; gap: 18px; flex-wrap: wrap; }
.tt-allow .check { font-size: 14px; color: var(--text); align-items: center; }
.tt-allow .check input { margin-top: 0; }
.check.dis { opacity: .45; }
.tt-sw { display: flex; align-items: center; gap: 12px; justify-content: space-between; cursor: pointer; }
.tt-sw b { font-size: 14px; }
.tt-sw small { display: block; font-size: 12px; color: var(--text-3); }
.tt-disc { display: grid; gap: 10px; padding: 10px; border-radius: 10px; background: var(--bg-2); }
.tt-disc .check { color: var(--text); }
.tt-label { margin: 0; font-size: 13px; font-weight: 600; color: #f9a8d4; }
.tt-decl { margin: 0; font-size: 13px; color: var(--text-2); }
.tt-decl a { color: var(--text); text-decoration: underline; }
.up-grid .stack > .xp + * { margin-top: 12px; }
/* status chips on own posts */
.xstatus { margin-top: 8px; }
.xchips { display: flex; gap: 6px; flex-wrap: wrap; }
.xchip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.xchip svg { width: 14px; height: 14px; }
.xchip svg.x { width: 12px; height: 12px; opacity: .8; }
.xchip.q { color: #e4e4e7; }
.xchip.run { color: #fde68a; border-color: rgba(253,230,138,.35); }
.xchip.ok { color: #86efac; border-color: rgba(134,239,172,.4); }
.xchip.bad { color: #fda4af; border-color: rgba(253,164,175,.45); }
.xchip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }
.xfail { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: rgba(60,10,22,.78); border: 1px solid rgba(253,164,175,.35); font-size: 12px; color: #fecdd3; line-height: 1.35; }
.xfail span { flex: 1; min-width: 0; }
.xfail b { color: #fff; }
.xfail .btn.sm { height: 30px; padding: 0 12px; background: #fff; color: #111; border: 0; flex: none; }
