:root { --bg: #000; --ink: #f5f5f5; --mute: #a8a8a8; --line: #1f1f1f; --blue: #0095f6; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.ig { height: 100%; display: flex; flex-direction: column; }
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 44px 16px 6px; flex: none; }
.wordmark { font-family: "Grand Hotel", "Brush Script MT", cursive; font-size: 33px; letter-spacing: -.3px; line-height: 1; padding-top: 4px; }
.ico { position: relative; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
.ico svg { width: 26px; height: 26px; }
.ico .dot { position: absolute; top: 2px; right: 1px; width: 8px; height: 8px; border-radius: 50%; background: #ff3040; border: 2px solid #000; }

/* scroll area */
.main { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 96px; }

/* stories */
.stories ul { list-style: none; margin: 0; padding: 6px 12px 10px; display: flex; gap: 12px; overflow-x: auto; }
.stories li { flex: none; }
.stories a { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; width: 76px; }
.stories b { font-weight: 400; color: #e8e8e8; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ring { width: 76px; height: 76px; border-radius: 50%; padding: 2.5px; background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); display: block; }
.ring img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2.5px solid #000; }

/* posts */
.feed { display: flex; flex-direction: column; }
.post { padding-bottom: 8px; margin-bottom: 8px; }
.post header { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.15; }
.who a { font-weight: 600; font-size: 14px; }
.who small { color: #c9c9c9; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.follow { background: transparent; color: var(--ink); border: 1px solid #555; border-radius: 8px; padding: 6px 14px; font: 600 13px inherit; }
.dots { font-weight: 700; letter-spacing: 1px; padding-left: 4px; }
.media { position: relative; display: block; aspect-ratio: 4/5; background: #111; overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .badge { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 4px 9px; border-radius: 999px; }
.media .play { position: absolute; top: 12px; right: 12px; color: #fff; font-size: 14px; }
.media .mute { position: absolute; bottom: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.media.video::after { content: ""; position: absolute; left: 12px; bottom: 12px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20a8 8 0 0 1 16 0z'/%3E%3C/svg%3E") center/14px no-repeat; }
.dotsrow { display: flex; justify-content: center; gap: 4px; padding: 10px 0 0; }
.dotsrow i { width: 6px; height: 6px; border-radius: 50%; background: #444; }
.dotsrow i.on { background: var(--blue); }
.cta { display: flex; justify-content: space-between; align-items: center; background: var(--blue); color: #fff; padding: 12px 14px; font-weight: 600; }
.actions { display: flex; align-items: center; gap: 16px; padding: 10px 14px 6px; font-size: 14px; }
.actions .a { display: inline-flex; align-items: center; gap: 5px; font-size: 22px; line-height: 1; }
.actions .a.c, .actions .a:not(:first-child) { font-size: 14px; }
.actions svg { width: 24px; height: 24px; }
.actions .save { margin-left: auto; display: inline-flex; }
.likes { padding: 0 14px; font-size: 14px; }
.likes b { font-weight: 600; }
.cap { margin: 3px 0 0; padding: 0 14px; font-size: 14px; }
.cap a { font-weight: 600; margin-right: 4px; }
.time { padding: 4px 14px 0; color: var(--mute); font-size: 12px; }

/* units */
.unit-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px 10px; font-weight: 600; font-size: 15px; }
.unit-head a { color: var(--blue); font-weight: 500; font-size: 13px; }
.reels-unit { padding: 6px 0 14px; }
.reels-row { display: flex; gap: 3px; padding: 0 0 0 14px; overflow-x: auto; }
.reel { flex: none; width: 118px; aspect-ratio: 9/16; position: relative; border-radius: 6px; overflow: hidden; background: #111; }
.reel img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel b { position: absolute; left: 8px; bottom: 8px; color: #fff; font-size: 12px; font-weight: 500; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.people-unit { padding: 6px 0 14px; }
.people-row { display: flex; gap: 8px; padding: 0 14px; overflow-x: auto; }
.person { flex: none; width: 150px; border: 1px solid #262626; border-radius: 10px; padding: 16px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; text-align: center; }
.person img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.person b { font-weight: 600; }
.person small { color: var(--mute); font-size: 11px; }
.person button { background: var(--blue); color: #fff; border: 0; border-radius: 8px; padding: 7px 0; width: 100%; font-weight: 600; margin-top: 4px; }
.threads-card { margin: 4px 14px; border: 1px solid #262626; border-radius: 12px; padding: 18px 16px; display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; align-items: center; }
.tlogo { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #000; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; }
.threads-card b { font-size: 14px; }
.threads-card p { margin: 0; color: var(--mute); font-size: 13px; }
.threads-card a { color: var(--blue); }
.caught-up { text-align: center; padding: 26px 16px 10px; display: flex; flex-direction: column; gap: 6px; color: var(--mute); font-size: 13px; }
.caught-up .check { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #ff3040; color: #ff3040; display: flex; align-items: center; justify-content: center; margin: 0 auto 4px; font-weight: 700; }
.caught-up b { color: var(--ink); font-size: 15px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 14px; font-weight: 600; padding: 10px 14px 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #262626; }

/* floating pill tab bar */
.tabbar { position: fixed; left: 14px; right: 14px; bottom: 16px; height: 62px; border-radius: 999px; background: rgba(28,28,30,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: flex; align-items: center; justify-content: space-around; padding: 0 8px; box-shadow: 0 8px 30px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.08); z-index: 5; }
.tab { position: relative; width: 52px; height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: #fff; }
.tab.active { background: rgba(255,255,255,.14); width: 76px; }
.tab svg { width: 26px; height: 26px; }
.tab .me { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1.5px solid #fff; }
.tab .dot { position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: #ff3040; }

.reelpost { aspect-ratio: 9/16; max-height: 560px; }
.rb-off .caught-up, .rb-off .divider { display: none; }

.ring.ad { background: #555; }
.stories .sp { display: block; font-size: 9px; color: var(--mute); margin-top: -3px; }
