:root {
  /* THE G — ocean teal */
  --bg: #ffffff; --bg2: #f5f9fa; --panel: #ffffff; --hover: #edf4f6; --line: #d6e2e6; --line2: #e9f0f2;
  --text: #0b1a20; --muted: #5f747c; --link: #0a6c78; --accent: #0b8f95; --accent-hover: #087479; --accent-soft: rgba(11,143,149,.1);
  --danger: #e5484d; --ok: #12a26b; --warn: #e8a317;
  --blue: #1a8cff; --gold: #e2a400;
  --brand: linear-gradient(135deg, #14d1c1 0%, #0aa5c7 50%, #1d4ed8 100%);
  --brand-soft: linear-gradient(135deg, rgba(20,209,193,.12), rgba(29,78,216,.12));
  --radius: 12px; --shadow: 0 10px 34px rgba(4,40,52,.14);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #04090c; --bg2: #08131a; --panel: #0b161d; --hover: #122129; --line: #1f3540; --line2: #152831;
    --text: #eef6f8; --muted: #8fa6ae; --link: #7fe3d9; --accent: #12a8a8; --accent-hover: #0f9393; --accent-soft: rgba(20,209,193,.12);
    --shadow: 0 10px 34px rgba(0,0,0,.6); }
}
::selection { background: rgba(20,209,193,.3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
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 { display: block; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.bold { font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg.icon { width: 24px; height: 24px; flex: none; }

/* ── Buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: 10px; font-weight: 600; background: var(--hover); white-space: nowrap; transition: background .15s, opacity .15s; }
.btn:hover { background: var(--line2); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.linkbtn { color: var(--accent); font-weight: 600; }
.linkbtn:hover { color: var(--accent-hover); }
.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 80px; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 26px; transition: .2s; cursor: pointer; }
.switch i::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::before { transform: translateX(18px); }

/* ── Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; border-right: 1px solid var(--line); padding: 8px 12px 20px; display: flex; flex-direction: column; background: var(--bg); z-index: 20; }
.logo { display: flex; align-items: center; gap: 10px; padding: 26px 12px 22px; font-size: 28px; font-weight: 900; letter-spacing: -.5px; line-height: 1; }
.logo .mark { width: 32px; height: 32px; flex: none; display: block; border-radius: 28%; background: linear-gradient(45deg, #14d1c1 0%, #0aa5c7 50%, #1d4ed8 100%); box-shadow: 0 3px 10px rgba(10,165,199,.35); }
.logo .mark svg { width: 100%; height: 100%; display: block; }
.logo .word { display: inline-flex; align-items: baseline; gap: 5px; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo .word small { font-size: .42em; font-weight: 800; letter-spacing: .22em; transform: translateY(-.15em); }
.nav a, .nav button { display: flex; align-items: center; gap: 16px; padding: 12px; margin: 2px 0; border-radius: 8px; font-size: 16px; width: 100%; text-align: left; position: relative; }
.nav a:hover, .nav button:hover { background: var(--hover); }
.nav a.active { font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.nav a.active .avatar { box-shadow: 0 0 0 2px var(--accent); }
.nav .avatar { width: 24px; height: 24px; }
.nav .dot { position: absolute; left: 28px; top: 7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.nav .admin-link { color: var(--text); }
.sidebar .bottom { margin-top: auto; }
.main { flex: 1; margin-left: 244px; min-width: 0; }
.page { max-width: 935px; margin: 0 auto; padding: 30px 20px 80px; }
.page.narrow { max-width: 630px; }
.page.wide { max-width: 1200px; }
.mobile-top, .mobile-bottom { display: none; }
.announcement { background: var(--brand); color: #fff; text-align: center; padding: 8px 16px; font-weight: 600; font-size: 13px; }

@media (max-width: 1263px) { .sidebar { width: 72px; } .sidebar .label, .logo .word { display: none; } .logo { padding: 26px 8px 22px; } .main { margin-left: 72px; } .nav a, .nav button { justify-content: center; } .nav .dot { left: 26px; } }
@media (max-width: 767px) {
  .sidebar { display: none; } .main { margin-left: 0; }
  .mobile-top { display: flex; position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 14px; align-items: center; gap: 14px; }
  .mobile-top .logo { padding: 0; font-size: 22px; }
  .mobile-bottom { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--bg); border-top: 1px solid var(--line); justify-content: space-around; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); }
  .mobile-bottom a, .mobile-bottom button { padding: 6px 12px; position: relative; }
  .mobile-bottom .dot { position: absolute; right: 6px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
  .page { padding: 12px 0 90px; }
  .hide-mobile { display: none !important; }
}

/* ── Avatars & badges */
.avatar { border-radius: 50%; object-fit: cover; background: var(--line2); flex: none; width: 32px; height: 32px; }
.avatar.xs { width: 24px; height: 24px; } .avatar.md { width: 44px; height: 44px; } .avatar.lg { width: 56px; height: 56px; } .avatar.xl { width: 150px; height: 150px; }
.avatar-fallback { display: grid; place-items: center; color: #fff; font-weight: 700; background: var(--brand); }
.ring { padding: 2px; border-radius: 50%; background: var(--brand); display: inline-block; flex: none; }
.ring.seen { background: var(--line); }
.ring > .avatar { border: 2px solid var(--bg); }
.badge { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-left: 4px; flex: none; }
.badge.lg { width: 20px; height: 20px; vertical-align: -3px; }
.uname { font-weight: 600; display: inline-flex; align-items: center; }
.role-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 2px 6px; border-radius: 4px; background: var(--hover); color: var(--muted); margin-left: 6px; }

/* ── Feed */
.feed-wrap { display: flex; gap: 64px; justify-content: center; }
.feed { width: 100%; max-width: 470px; }
.right-rail { width: 320px; padding-top: 12px; }
@media (max-width: 1159px) { .right-rail { display: none; } }
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 8px 4px 16px; margin-bottom: 8px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story-chip { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 70px; flex: none; font-size: 12px; }
.story-chip .avatar { width: 62px; height: 62px; }
.story-chip .ellipsis { max-width: 70px; }
.story-chip .add { position: relative; }
.story-chip .add .plus { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; border: 2px solid var(--bg); font-weight: 700; font-size: 15px; line-height: 1; }

.post { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 18px; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 8px 4px 10px; }
.post-head .meta { line-height: 1.2; min-width: 0; }
.post-head .loc { font-size: 12px; }
.media { position: relative; background: #000; border-radius: 4px; overflow: hidden; border: 1px solid var(--line2); aspect-ratio: 1 / 1; user-select: none; }
.media .track { display: flex; height: 100%; transition: transform .3s ease; }
.media .track img { width: 100%; height: 100%; object-fit: cover; flex: none; }
.media .nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.85); color: #111; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.media .nav-arrow.prev { left: 10px; } .media .nav-arrow.next { right: 10px; }
.media .dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; }
.media .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
.media .dots i.on { background: #fff; }
.media .count { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 12px; }
.heart-burst { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.heart-burst svg { width: 100px; height: 100px; fill: #fff; filter: drop-shadow(0 4px 18px rgba(0,0,0,.35)); animation: burst .8s ease forwards; }
@keyframes burst { 0% { transform: scale(0); opacity: 0; } 15% { transform: scale(1.2); opacity: 1; } 30% { transform: scale(.95); } 45%,80% { transform: scale(1); opacity: 1; } 100% { transform: scale(0); opacity: 0; } }
.actions { display: flex; align-items: center; gap: 14px; padding: 10px 2px 6px; }
.actions button:hover { opacity: .6; }
.actions .liked svg { fill: var(--danger); stroke: var(--danger); animation: pop .3s; }
@keyframes pop { 50% { transform: scale(1.25); } }
.likes-line { font-weight: 600; padding: 0 2px; }
.caption { padding: 4px 2px 0; white-space: pre-wrap; word-wrap: break-word; }
.caption a.tag, .caption a.mention, .comment a.tag, .comment a.mention { color: var(--link); }
.view-comments { color: var(--muted); padding: 6px 2px 0; display: block; }
.preview-c { padding: 2px; }
.time { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .2px; padding: 6px 2px 0; }
.add-comment { display: flex; gap: 8px; padding-top: 8px; }
.add-comment input { flex: 1; border: 0; background: transparent; outline: none; padding: 4px 2px; }
.add-comment button { color: var(--accent); font-weight: 600; }
.add-comment button:disabled { opacity: .4; }

.rail-me { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.rail-title { display: flex; justify-content: space-between; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.user-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.user-row .who { flex: 1; min-width: 0; line-height: 1.25; }
.footer-links { color: var(--muted); font-size: 12px; margin-top: 30px; line-height: 1.8; }

/* ── Grid (profile / explore) */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tile { position: relative; aspect-ratio: 1; background: var(--line2); overflow: hidden; display: block; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .ov { position: absolute; inset: 0; background: rgba(0,0,0,.35); color: #fff; display: flex; align-items: center; justify-content: center; gap: 24px; font-weight: 700; opacity: 0; transition: opacity .15s; }
.tile:hover .ov { opacity: 1; }
.tile .ov span { display: flex; align-items: center; gap: 6px; }
.tile .ov svg { fill: #fff; stroke: #fff; width: 20px; height: 20px; }
.tile .multi { position: absolute; top: 8px; right: 8px; color: #fff; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.tile .hidden-tag { position: absolute; left: 6px; top: 6px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.explore-grid { grid-template-columns: repeat(3, 1fr); }
.explore-grid .tile:nth-child(10n + 3), .explore-grid .tile:nth-child(10n + 6) { grid-row: span 2; aspect-ratio: auto; }

/* ── Profile */
.profile-head { display: flex; gap: 70px; padding: 10px 40px 40px; align-items: flex-start; }
.profile-head .info { flex: 1; min-width: 0; }
.profile-head .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.profile-head .top h2 { margin: 0 12px 0 0; font-size: 20px; font-weight: 400; display: inline-flex; align-items: center; }
.profile-head .stats { display: flex; gap: 38px; margin-bottom: 16px; font-size: 16px; }
.profile-head .stats b { font-weight: 600; }
.profile-head .bio { white-space: pre-wrap; }
.profile-head .site { color: var(--link); font-weight: 600; }
.tabs { display: flex; justify-content: center; gap: 60px; border-top: 1px solid var(--line); margin-bottom: 4px; }
.tabs a { display: flex; align-items: center; gap: 6px; padding: 16px 0; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border-top: 1px solid transparent; margin-top: -1px; }
.tabs a.on { color: var(--text); border-top-color: var(--text); }
.tabs svg { width: 12px; height: 12px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 22px; margin: 12px 0 8px; }
.empty .circle { width: 64px; height: 64px; border: 2px solid var(--text); border-radius: 50%; display: grid; place-items: center; margin: 0 auto; color: var(--text); }
@media (max-width: 767px) {
  .profile-head { gap: 22px; padding: 10px 16px 20px; }
  .profile-head .avatar.xl { width: 80px; height: 80px; }
  .profile-head .stats { gap: 18px; font-size: 14px; }
  .grid { gap: 2px; }
}

/* ── Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border-radius: 14px; width: 100%; max-width: 400px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: rise .18s ease; }
@keyframes rise { from { transform: scale(1.04); opacity: 0; } }
.modal.lg { max-width: 920px; } .modal.md { max-width: 560px; }
.modal-head { display: flex; align-items: center; justify-content: center; position: relative; padding: 12px 44px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; min-height: 44px; }
.modal-head .x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.modal-head .left { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }
.modal-head .right { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }
.modal-body { overflow-y: auto; padding: 16px; }
.menu-list button, .menu-list a { display: block; width: 100%; text-align: center; padding: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.menu-list > :first-child { border-top: 0; }
.menu-list .danger { color: var(--danger); font-weight: 700; }
.close-floating { position: fixed; top: 14px; right: 18px; color: #fff; z-index: 101; }
.close-floating svg { width: 30px; height: 30px; }

/* ── Post detail */
.detail { display: flex; height: min(88vh, 760px); }
.detail .media { flex: 1 1 auto; aspect-ratio: auto; border-radius: 0; border: 0; min-width: 0; display: flex; align-items: center; }
.detail .media .track { width: 100%; }
.detail .side { width: 400px; flex: none; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--panel); }
.detail .side .post-head { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.detail .comments { flex: 1; overflow-y: auto; padding: 14px; }
.comment { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.comment .body { flex: 1; min-width: 0; word-wrap: break-word; white-space: pre-wrap; }
.comment .sub { display: flex; gap: 12px; color: var(--muted); font-size: 12px; margin-top: 4px; }
.comment .sub button { color: var(--muted); font-weight: 600; font-size: 12px; }
.detail .foot { border-top: 1px solid var(--line); padding: 6px 14px 12px; }
@media (max-width: 860px) { .detail { flex-direction: column; height: 88vh; } .detail .media { flex: 0 0 auto; aspect-ratio: 1; } .detail .side { width: 100%; flex: 1; min-height: 0; border-left: 0; } }

/* ── Create */
.dropzone { border: 2px dashed var(--line); border-radius: 12px; padding: 60px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.create-grid { display: flex; gap: 16px; }
.create-grid .preview { flex: 1; min-width: 0; }
.create-grid .form { width: 300px; flex: none; }
.thumbs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.thumbs .t { position: relative; }
.thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.thumbs .t button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: #000c; color: #fff; font-size: 12px; line-height: 1; }
@media (max-width: 700px) { .create-grid { flex-direction: column; } .create-grid .form { width: auto; } }

/* ── Stories viewer */
.story-viewer { position: fixed; inset: 0; z-index: 200; background: #111; display: grid; place-items: center; }
.story-frame { position: relative; width: min(420px, 100vw); height: min(746px, 100vh); background: #000; border-radius: 10px; overflow: hidden; }
.story-frame img { width: 100%; height: 100%; object-fit: cover; }
.story-frame .sbars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.story-frame .sbars i { flex: 1; height: 2px; background: rgba(255,255,255,.35); border-radius: 2px; overflow: hidden; }
.story-frame .sbars i b { display: block; height: 100%; width: 0; background: #fff; }
.story-frame .who { position: absolute; top: 22px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; color: #fff; z-index: 2; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.story-frame .tapl, .story-frame .tapr { position: absolute; top: 0; bottom: 0; width: 40%; z-index: 1; }
.story-frame .tapl { left: 0; } .story-frame .tapr { right: 0; }
.story-frame .story-foot { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; display: flex; gap: 10px; z-index: 2; background: linear-gradient(transparent, rgba(0,0,0,.5)); }
.story-frame .story-foot input { flex: 1; background: transparent; border: 1px solid rgba(255,255,255,.6); border-radius: 22px; padding: 10px 16px; color: #fff; outline: none; }
.story-frame .story-foot input::placeholder { color: rgba(255,255,255,.8); }
.story-frame .story-foot button { color: #fff; }

/* ── Messages */
.dm { display: flex; height: 100vh; }
.dm .list { width: 360px; border-right: 1px solid var(--line); display: flex; flex-direction: column; flex: none; }
.dm .list header { padding: 30px 20px 12px; display: flex; align-items: center; justify-content: space-between; font-size: 20px; font-weight: 700; }
.dm .list .items { overflow-y: auto; flex: 1; }
.dm .conv { display: flex; gap: 12px; align-items: center; padding: 10px 20px; }
.dm .conv:hover, .dm .conv.on { background: var(--hover); }
.dm .conv .who { flex: 1; min-width: 0; }
.dm .conv .unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.dm .thread { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dm .thread header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dm .msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.bubble { max-width: 70%; padding: 9px 14px; border-radius: 20px; background: var(--hover); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: linear-gradient(135deg, #0aa5c7, #1d6fd8); color: #fff; }
.msg-time { align-self: center; color: var(--muted); font-size: 11px; margin: 10px 0 4px; }
.dm .compose { padding: 14px 18px; }
.dm .compose form { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 24px; padding: 6px 8px 6px 18px; }
.dm .compose input { flex: 1; border: 0; background: transparent; outline: none; padding: 6px 0; }
.dm .blank { flex: 1; display: grid; place-items: center; text-align: center; }
@media (max-width: 767px) { .dm { height: calc(100vh - 110px); } .dm .list { width: 100%; } .dm.has-thread .list { display: none; } .dm:not(.has-thread) .thread { display: none; } }

/* ── Notifications */
.notif { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; }
.notif.unread { background: var(--accent-soft); }
.notif .txt { flex: 1; min-width: 0; }
.notif .thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; }
.notif .sys { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; flex: none; }
.section-title { font-weight: 700; font-size: 16px; margin: 18px 12px 8px; }

/* ── Verified */
.verified-hero { text-align: center; padding: 36px 20px 10px; }
.verified-hero .big-badge { width: 76px; height: 76px; margin: 0 auto 16px; }
.verified-hero h1 { font-size: 30px; margin: 0 0 10px; letter-spacing: -.5px; }
.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 28px 0; }
.perk { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--panel); }
.perk h4 { margin: 10px 0 6px; font-size: 15px; }
.perk .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--hover); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.plan { border: 2px solid var(--line); border-radius: 14px; padding: 18px; text-align: left; background: var(--panel); position: relative; }
.plan.on { border-color: var(--accent); }
.plan .price { font-size: 26px; font-weight: 800; margin: 6px 0 2px; }
.plan .save { position: absolute; top: -10px; right: 14px; background: var(--ok); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--panel); margin-bottom: 16px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; background: var(--hover); }
.status-pill.ok { background: rgba(31,157,85,.14); color: var(--ok); }
.status-pill.warn { background: rgba(232,163,23,.16); color: #b07800; }
.status-pill.bad { background: rgba(237,73,86,.13); color: var(--danger); }
.demo-note { font-size: 12px; color: var(--muted); background: var(--hover); border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.compare { width: 100%; border-collapse: collapse; margin-top: 8px; }
.compare td, .compare th { padding: 10px 8px; border-bottom: 1px solid var(--line2); text-align: left; }
.compare th { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ── Admin */
.admin { display: flex; min-height: 100vh; }
.admin-nav { width: 220px; flex: none; border-right: 1px solid var(--line); padding: 26px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-nav h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 0 12px 14px; display: flex; align-items: center; gap: 8px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-weight: 500; }
.admin-nav a:hover { background: var(--hover); }
.admin-nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.admin-nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.admin-main { flex: 1; min-width: 0; padding: 28px 32px 80px; }
.admin-main h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.3px; }
.admin-main .sub { color: var(--muted); margin-bottom: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--panel); }
.stat .k { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.stat .v { font-size: 28px; font-weight: 800; margin-top: 6px; letter-spacing: -.5px; }
.stat .d { font-size: 12px; color: var(--ok); font-weight: 600; margin-top: 2px; }
.stat.alert .v { color: var(--danger); }
.chart-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--panel); margin-bottom: 16px; }
.chart-card h3 { margin: 0 0 14px; font-size: 15px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.bars .b i { display: block; width: 100%; max-width: 34px; background: linear-gradient(180deg, #14d1c1, #0a8fc7); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars .b i:hover::after { content: attr(data-v); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); font-size: 11px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; margin-bottom: 4px; font-style: normal; }
.bars .b span { font-size: 10px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar .input { max-width: 320px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { padding: 7px 12px; font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--accent); color: #fff; }
.table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; background: var(--panel); }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
table.t td { padding: 10px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: var(--bg2); }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.queue-item { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--panel); margin-bottom: 12px; display: flex; gap: 16px; }
.queue-item .thumb { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; flex: none; background: var(--line2); }
.queue-item .body { flex: 1; min-width: 0; }
.queue-item .acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin-top: 10px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.admin-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.admin-post { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.admin-post img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.admin-post .b { padding: 10px; font-size: 12px; }
.admin-post.is-hidden img { opacity: .35; }
@media (max-width: 860px) { .admin { flex-direction: column; } .admin-nav { width: auto; height: auto; position: static; display: flex; overflow-x: auto; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); } .admin-nav h2 { display: none; } .admin-main { padding: 18px 14px 90px; } }

/* ── Auth */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 40px; padding: 30px 16px; }
.auth .art { width: 400px; height: 580px; border-radius: 32px; background: var(--brand); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.auth .art .waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; }
.auth .art .tag { position: absolute; left: 32px; bottom: 40px; color: #fff; font-size: 34px; font-weight: 900; line-height: 1.05; letter-spacing: -.5px; text-shadow: 0 2px 12px rgba(0,0,0,.2); }
.auth .art .tag small { display: block; font-size: 14px; font-weight: 600; letter-spacing: 0; opacity: .9; margin-top: 10px; }
.auth .art .ph { position: absolute; border-radius: 18px; background-size: cover; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
@media (max-width: 860px) { .auth .art { display: none; } }
.auth .box { width: 350px; }
.auth .panel { border: 1px solid var(--line); padding: 38px 36px 26px; text-align: center; margin-bottom: 12px; background: var(--panel); border-radius: 18px; box-shadow: 0 2px 14px rgba(4,40,52,.05); }
.auth .panel .logo { justify-content: center; padding: 0 0 28px; font-size: 44px; }
.auth .panel .logo .mark { width: 46px; height: 46px; }
.auth .panel .input { margin-bottom: 10px; font-size: 14px; padding: 11px 12px; }
.auth .err { color: var(--danger); margin: 10px 0; font-size: 13px; }
.auth .switcher { border: 1px solid var(--line); padding: 20px; text-align: center; background: var(--panel); border-radius: 18px; }
.auth .hint { font-size: 12px; color: var(--muted); margin-top: 14px; text-align: left; background: var(--hover); padding: 10px; border-radius: 6px; line-height: 1.6; }
.auth .hint code { font-weight: 700; }

/* ── Search panel */
.search-box { position: relative; margin-bottom: 18px; }
.search-box .input { padding-left: 38px; background: var(--hover); border-color: transparent; }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.tag-ico { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 18px; font-weight: 700; flex: none; }

#toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 300; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--muted); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Video & Reels */
.media video { width: 100%; height: 100%; object-fit: cover; flex: none; background: #000; display: block; }
.media.is-reel { aspect-ratio: 4 / 5; }
.detail .media video { object-fit: contain; height: 100%; }
.detail .media.is-reel { aspect-ratio: auto; }
.sound-btn { position: absolute; right: 12px; bottom: 12px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; z-index: 2; }
.sound-btn svg { width: 16px; height: 16px; }
.reel-tag { position: absolute; top: 12px; right: 12px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); z-index: 2; }
.reel-tag svg { width: 22px; height: 22px; }
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile .views { position: absolute; left: 8px; bottom: 8px; color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 4px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.tile .views svg { fill: #fff; }
.reels-grid .tile { aspect-ratio: 9 / 16; }
.reel-preview { width: 260px; max-width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; border-radius: 10px; }

.reels { height: 100vh; overflow-y: auto; scroll-snap-type: y mandatory; display: flex; flex-direction: column; align-items: center; scrollbar-width: none; overscroll-behavior: contain; }
.reels::-webkit-scrollbar { display: none; }
.reel { height: 100vh; flex: none; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: flex-end; justify-content: center; gap: 16px; padding: 24px 0; width: 100%; }
.reel-end { align-items: center; }
.reel-stage { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: calc(100vw - 340px); background: #000; border-radius: 8px; overflow: hidden; cursor: pointer; }
.reel-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-stage .sound-btn { top: 14px; right: 14px; bottom: auto; }
.reel-paused { position: absolute; inset: 0; display: none; place-items: center; color: #fff; pointer-events: none; }
.reel-paused svg { width: 72px; height: 72px; opacity: .85; filter: drop-shadow(0 2px 12px rgba(0,0,0,.4)); }
.reel-stage.paused .reel-paused { display: grid; }
.reel-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 16px 16px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); cursor: default; }
.reel-info a, .reel-info .uname { color: #fff; }
.reel-info .avatar { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.4); }
.reel-follow { border: 1px solid rgba(255,255,255,.7); border-radius: 8px; padding: 3px 10px; font-weight: 600; font-size: 13px; color: #fff; }
.reel-caption { margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.reel-caption a { color: #fff; font-weight: 600; }
.reel-meta { margin-top: 8px; opacity: .9; display: flex; align-items: center; gap: 4px; }
.reel-meta svg { fill: #fff; }
.reel-actions { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-bottom: 6px; width: 48px; }
.reel-actions > div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.reel-actions button:hover { opacity: .6; }
.reel-actions .liked svg { fill: var(--danger); stroke: var(--danger); animation: pop .3s; }
.reel-mini .avatar { border-radius: 6px; border: 2px solid var(--text); }
.reel-stage .heart-burst { z-index: 3; }
@media (max-width: 767px) {
  .reels { height: calc(100dvh - 106px); }
  .reel { height: calc(100dvh - 106px); padding: 0; position: relative; }
  .reel-stage { height: 100%; width: 100%; aspect-ratio: auto; max-width: none; border-radius: 0; }
  .reel-actions { position: absolute; right: 8px; bottom: 90px; color: #fff; z-index: 3; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
  .reel-mini { display: none; }
  .reel-info { padding-right: 70px; }
}

.verif-name { cursor: pointer; border-radius: 6px; }
.verif-name:hover h2 { opacity: .75; }
.verif-line { display: block; margin: 2px 0; text-align: left; }
.verif-line:hover { text-decoration: underline; }

/* ── THE G brand touches */
.sidebar { background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%); }
.stat { position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); opacity: .8; }
.card, .perk, .plan, .stat, .chart-card, .table-wrap, .queue-item { border-radius: 16px; }
.verified-hero h1 { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.empty .circle { border-color: var(--accent); color: var(--accent); }
.status-pill.ok { background: rgba(18,162,107,.13); }
.post { border-bottom-color: var(--line2); }
.media { border-radius: 12px; }
.feed .post-head .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line); }
.rail-me .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #0aa5c7; }
.btn.primary { box-shadow: 0 2px 8px rgba(11,143,149,.25); }
.brand-strip { height: 3px; background: var(--brand); }

.mobile-top .logo .word { display: inline-flex; }
.mobile-top .logo .mark { width: 28px; height: 28px; }

/* ── Home page */
.landing { min-height: 100vh; background: radial-gradient(1200px 600px at 85% -10%, rgba(20,209,193,.18), transparent 60%), radial-gradient(900px 500px at -10% 20%, rgba(29,78,216,.12), transparent 60%), var(--bg); }
.land-nav { display: flex; align-items: center; gap: 10px; max-width: 1160px; margin: 0 auto; padding: 18px 24px; }
.land-nav .logo { padding: 0; }
.land-nav .logo .word { display: inline-flex !important; }
.btn.lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.land-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; max-width: 1160px; margin: 0 auto; padding: 40px 24px 70px; }
.land-kicker { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: .5px; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 20px; margin-bottom: 18px; }
.land-copy h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; letter-spacing: -2px; margin: 0 0 18px; font-weight: 900; }
.land-copy h1 span { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.land-copy p { font-size: 18px; color: var(--muted); max-width: 520px; margin: 0 0 26px; line-height: 1.55; }
.land-visual { position: relative; height: 560px; display: grid; place-items: center; }
.phone { width: 270px; height: 540px; border-radius: 42px; background: #0b1a20; padding: 10px; box-shadow: 0 30px 80px rgba(4,40,52,.35); position: relative; z-index: 2; }
.phone-screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #fff; color: #0b1a20; }
.ph-top { padding: 14px 14px 6px; }
.ph-top .logo { padding: 0; font-size: 18px; } .ph-top .logo .mark { width: 22px; height: 22px; } .ph-top .logo .word { display: inline-flex !important; }
.ph-stories { display: flex; gap: 8px; padding: 6px 12px 10px; }
.ph-stories .ring img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.ph-post { font-size: 12px; }
.ph-post img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.ph-av { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); }
.ph-actions { display: flex; gap: 12px; padding: 10px; } .ph-actions svg { width: 20px; height: 20px; }
.float { position: absolute; width: 150px; aspect-ratio: 9/16; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); border: 4px solid var(--bg); }
.float.f1 { left: 4%; top: 60px; transform: rotate(-8deg); } .float.f2 { right: 2%; bottom: 40px; transform: rotate(7deg); }
.land-features { max-width: 1160px; margin: 0 auto; padding: 10px 24px 70px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.feat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.feat h3 { margin: 14px 0 6px; font-size: 17px; } .feat p { margin: 0; line-height: 1.5; }
.land-cta { max-width: 1112px; margin: 0 auto 50px; border-radius: 28px; background: var(--brand); color: #fff; text-align: center; padding: 56px 24px; }
.land-cta h2 { font-size: 36px; margin: 0 0 8px; letter-spacing: -1px; } .land-cta p { margin: 0 0 22px; opacity: .9; font-size: 17px; }
.land-white { background: #fff; color: #0b6f7a; } .land-white:hover { background: #eefafa; }
.land-foot { max-width: 1160px; margin: 0 auto; padding: 22px 24px 36px; display: flex; align-items: center; gap: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.land-foot .logo { padding: 0; font-size: 20px; } .land-foot .logo .mark { width: 24px; height: 24px; } .land-foot .logo .word { display: inline-flex !important; }
.auth .panel a.logo { display: flex; }
@media (max-width: 900px) {
  .land-hero { grid-template-columns: 1fr; padding-top: 20px; text-align: left; }
  .land-visual { height: 480px; } .phone { transform: scale(.88); }
  .float { width: 110px; } .land-features { grid-template-columns: 1fr; }
  .land-nav .btn.ghost { display: none; }
}
