/* OnlyTanks: only tanks. */
:root {
  --blue: #00aff0;
  --blue-strong: #0095cc;
  --blue-fill: #007fb0; /* behind white text: 4.5:1 */
  --blue-fill-hover: #006f9a;
  --blue-text: #0075a3; /* blue text and focus rings on light backgrounds */
  --blue-soft: rgba(0, 175, 240, 0.12);
  --blue-softer: rgba(0, 175, 240, 0.06);
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f7f8;
  --text: #242529;
  --muted: #626d79;
  --line: rgba(138, 150, 163, 0.25);
  --green: #35d063;
  --danger: #ff5a6e;
  --shadow: 0 8px 30px rgba(20, 30, 40, 0.18);
  --nav-w: 260px;
  --rail-w: 392px;
  --head-h: 56px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416;
    --surface: #1b1c1f;
    --surface-2: #222327;
    --text: #f1f2f4;
    --muted: #8a96a3;
    --blue-text: #00aff0;
    --line: rgba(138, 150, 163, 0.22);
    --blue-soft: rgba(0, 175, 240, 0.18);
    --blue-softer: rgba(0, 175, 240, 0.09);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 8px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--blue-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
svg.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--blue-text); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { position: fixed; left: 12px; top: 12px; z-index: 2000; padding: 10px 18px; border-radius: 999px; background: var(--bg); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

@view-transition { navigation: auto; }

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 600px) var(--rail-w);
  max-width: 1254px;
  margin: 0 auto;
  min-height: 100vh;
}
.main { border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 0; padding-bottom: 80px; }

/* Left nav */
.sidenav { position: sticky; top: 0; height: 100vh; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-size: 25px; letter-spacing: -0.4px; padding: 6px 10px 14px; line-height: 1; }
.logo:hover { text-decoration: none; }
.logo svg { width: 38px; height: 38px; flex: none; }
.logo .w1 { font-weight: 300; }
.logo .w2 { font-weight: 800; color: var(--blue); font-style: italic; }
.nav-link { display: flex; align-items: center; gap: 16px; padding: 11px 12px; border-radius: 999px; color: var(--text); font-size: 17px; }
.nav-link:hover { background: var(--blue-softer); color: var(--blue-text); text-decoration: none; }
.nav-link[aria-current="page"] { font-weight: 700; }
.nav-link[aria-current="page"] svg.i { stroke-width: 2.4; }
.nav-link { position: relative; }
.nav-link .dot { position: absolute; left: 25px; top: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--blue-fill); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); box-sizing: content-box; }
.nav-post { margin-top: 14px; }
.nav-foot { margin-top: auto; padding: 16px 12px 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 0 20px; height: 44px; font-size: 14px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; background: none; white-space: nowrap; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue-fill); color: #fff; }
.btn-primary:hover { background: var(--blue-fill-hover); }
.btn-outline { border-color: var(--blue-text); color: var(--blue-text); }
.btn-outline:hover { background: var(--blue-softer); }
.btn-wide { width: 100%; }
.btn-split { justify-content: space-between; padding: 0 22px; height: 48px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12px; }
.btn svg.i { width: 20px; height: 20px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.icon-btn:hover { background: var(--blue-softer); color: var(--blue-text); }
.round-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--blue-text); }
.round-btn:hover { background: var(--blue-softer); border-color: var(--blue-text); }

/* Page head */
.page-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; height: var(--head-h); padding: 0 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 19px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.2px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-head .icon-btn { color: var(--text); margin-left: -8px; }
.topbar, .tabbar { display: none; }

/* Avatars */
.avatar { position: relative; display: block; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.online::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 22%; height: 22%; min-width: 10px; min-height: 10px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg); }
.avatar.lg { width: 100px; height: 100px; border: 3px solid var(--bg); }
.avatar.sm { width: 36px; height: 36px; }
.verified { width: 17px; height: 17px; flex: none; vertical-align: -3px; margin-left: 3px; color: var(--text); }
.name { color: var(--text); font-weight: 600; }
.handle { color: var(--muted); font-size: 14px; }

/* Composer */
.composer { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 8px solid var(--surface-2); }
.composer button.fake-input { flex: 1; text-align: left; border: 0; background: none; color: var(--muted); font-size: 16px; padding: 10px 0; }
.composer .tools { display: flex; color: var(--muted); }

/* Stories */
.stories { display: flex; gap: 14px; padding: 14px 16px; overflow-x: auto; border-bottom: 8px solid var(--surface-2); scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; width: 72px; text-align: center; color: var(--text); font-size: 12px; }
.story:hover { text-decoration: none; }
.story .ring { display: block; width: 68px; height: 68px; margin: 0 auto 5px; padding: 3px; border-radius: 50%; background: conic-gradient(from 200deg, var(--blue), #7fe0ff, var(--blue)); }
.story .ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); }
.story span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Posts */
.post { padding: 14px 0 6px; border-bottom: 1px solid var(--line); }
.post-head { display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.post-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.post-who .name, .post-who .handle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-head time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.post-text { padding: 10px 16px 12px; font-size: 16px; white-space: pre-line; overflow-wrap: anywhere; }
.post-text .tag { color: var(--blue-text); }
.pinned { display: flex; align-items: center; gap: 6px; padding: 0 16px 8px 76px; margin-top: -4px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.pinned svg.i { width: 14px; height: 14px; }

.post-media { position: relative; background: #0d1114; overflow: hidden; }
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; border: 0; padding: 0; margin: 0; background: none; cursor: zoom-in; aspect-ratio: var(--ar, 4 / 3); overflow: hidden; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.car-btn { position: absolute; top: 50%; translate: 0 -50%; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(15, 20, 25, 0.55); color: #fff; display: grid; place-items: center; z-index: 2; }
.car-btn:hover { background: rgba(15, 20, 25, 0.8); }
.car-btn.prev { left: 10px; }
.car-btn.next { right: 10px; }
.car-btn[disabled] { opacity: 0; pointer-events: none; }
.car-count { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(15, 20, 25, 0.6); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.car-dots { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.car-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); }
.car-dots i.on { background: #fff; }

/* Locked posts */
.lock { display: none; }
.is-locked .carousel { filter: blur(26px) saturate(1.15) brightness(0.92); transform: scale(1.18); pointer-events: none; overflow: hidden; }
.is-locked .car-btn, .is-locked .car-count, .is-locked .car-dots { display: none; }
.is-locked .lock { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; color: #fff; text-align: center; background: rgba(10, 18, 24, 0.18); }
.lock .lock-icon { width: 56px; height: 56px; stroke-width: 1.4; opacity: 0.95; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4)); }
.lock .lock-box { width: min(100%, 420px); border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 8px; padding: 12px; background: rgba(10, 18, 24, 0.35); backdrop-filter: blur(6px); display: grid; gap: 10px; }
.lock .lock-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 600; }
.lock .lock-meta span { display: inline-flex; align-items: center; gap: 5px; }
.lock .lock-meta svg.i { width: 16px; height: 16px; }
.lock .lock-meta .price { margin-left: auto; }
.unlocking .carousel { transition: filter 0.7s ease, transform 0.7s ease; }

.post-actions { display: flex; align-items: center; gap: 2px; padding: 6px 8px 0; }
.post-actions .act { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 8px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }
.post-actions .act:hover { color: var(--blue-text); background: var(--blue-softer); }
.post-actions .spacer { flex: 1; }
.act[aria-pressed="true"] { color: var(--blue-text); }
.act[data-like][aria-pressed="true"] { color: var(--danger); }
.act[aria-pressed="true"] svg.i { fill: currentColor; }
.act.pop svg.i { animation: pop 0.35s ease; }
@keyframes pop { 40% { transform: scale(1.35); } }
.post-stats { padding: 2px 16px 10px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.post-stats b { color: var(--text); font-weight: 600; }

.comments { padding: 0 16px 12px; display: grid; gap: 10px; }
.comment { display: flex; gap: 10px; font-size: 14px; }
.comment .bubble { background: var(--surface-2); border-radius: 14px; padding: 7px 12px; }
.comment .bubble b { display: block; font-size: 13px; }
.comment-form { display: flex; gap: 8px; }
.comment-form input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.comment-form input:focus { border-color: var(--blue-text); }

/* Profile */
.cover { position: relative; height: 190px; background: var(--surface-2); overflow: hidden; }
.cover > img { width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 55%); }
.cover-bar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 6px; padding: 8px 8px; color: #fff; }
.cover-bar .icon-btn { color: #fff; }
.cover-bar .icon-btn:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.cover-bar .who { flex: 1; min-width: 0; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.cover-bar h1 { font-size: 19px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-bar .verified { color: #fff; }
.cover-stats { display: flex; gap: 14px; font-size: 13px; opacity: 0.95; }
.cover-stats span { display: inline-flex; align-items: center; gap: 4px; }
.cover-stats svg.i { width: 15px; height: 15px; }
.profile-row { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 16px; margin-top: -50px; position: relative; z-index: 3; }
.profile-actions { display: flex; gap: 8px; padding-bottom: 4px; }
.profile-id { padding: 8px 16px 0; }
.profile-id h2 { font-size: 19px; font-weight: 600; }
.profile-id .status { color: var(--muted); font-size: 14px; }
.bio { padding: 10px 16px 0; white-space: pre-line; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 16px 0; padding: 0; }
.specs > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.specs dt { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); }
.specs dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; }
.level { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 7px; overflow: hidden; }
.level i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.sub-box { margin: 16px 0 0; padding: 14px 16px 16px; border-top: 8px solid var(--surface-2); border-bottom: 8px solid var(--surface-2); display: grid; gap: 10px; }
.sub-box h3 { font-size: 14px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); }
.sub-box ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.sub-box li { display: flex; gap: 8px; align-items: flex-start; }
.sub-box li svg.i { width: 18px; height: 18px; color: var(--blue-text); margin-top: 1px; }
[data-sub].is-on { background: none; border-color: var(--line); color: var(--muted); }
[data-sub].is-on:hover { background: var(--blue-softer); border-color: var(--blue-text); color: var(--blue-text); }

.tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; background: var(--bg); }
.tabs button { flex: 1; height: 48px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 14px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.tabs button:hover { color: var(--blue-text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding-top: 3px; }
.media-grid .cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--surface-2); overflow: hidden; cursor: zoom-in; }
.media-grid .cell img { width: 100%; height: 100%; object-fit: cover; }
.media-grid .cell.is-locked img { filter: blur(16px) brightness(0.9); transform: scale(1.25); }
.media-grid .cell .cell-lock { display: none; }
.media-grid .cell.is-locked .cell-lock { display: grid; place-items: center; position: absolute; inset: 0; color: #fff; }
.media-grid .cell.is-locked { cursor: pointer; }

/* Right rail */
.rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 8px 12px 24px 24px; display: flex; flex-direction: column; gap: 18px; scrollbar-width: none; }
.search { position: relative; }
.search input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px 0 44px; background: var(--bg); color: var(--text); font: inherit; font-size: 15px; }
.search input:focus { border-color: var(--blue-text); }
.search svg.i { position: absolute; left: 14px; top: 10px; color: var(--muted); }
.rail h2 { font-size: 15px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; justify-content: space-between; }
.rail h2 a { font-size: 12px; }
.sugg { display: grid; gap: 10px; }
.sugg-card { position: relative; display: block; height: 124px; border-radius: 8px; overflow: hidden; color: #fff; background: #223; }
.sugg-card:hover { text-decoration: none; }
.sugg-card > img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.sugg-card:hover > img { transform: scale(1.04); }
.sugg-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 65%), linear-gradient(to right, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18) 78%); }
.sugg-card .free { position: absolute; z-index: 2; top: 10px; left: 10px; background: rgba(15, 20, 25, 0.6); font-size: 11px; font-weight: 700; letter-spacing: 0.5px; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.sugg-card .who { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 12px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.sugg-card .avatar { width: 62px; height: 62px; border: 2px solid #fff; }
.sugg-card .avatar.online::after { border-color: #fff; }
.sugg-card .n { font-weight: 600; font-size: 17px; line-height: 1.2; }
.sugg-card .verified { color: #fff; }
.sugg-card .h { font-size: 14px; opacity: 0.9; }
.rail-foot { font-size: 12px; color: var(--muted); line-height: 1.7; }
.rail-foot a { color: var(--muted); }
.no-results { color: var(--muted); font-size: 14px; padding: 6px 2px; }

/* Directory */
.dir { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
.dir .sugg-card { height: 170px; }
.section-note { padding: 14px 16px; color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--line); }

/* Lists: notifications, messages */
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; }
a.list-item:hover, button.list-item:hover { background: var(--blue-softer); text-decoration: none; }
.list-item .body { flex: 1; min-width: 0; }
.list-item .body p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item.wrap .body p { white-space: normal; }
.list-item time, .list-item .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.list-item .unread { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); flex: none; }
.list-item.active { background: var(--blue-soft); }

.chat { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.chatting .main { padding-bottom: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 78%; padding: 9px 14px; border-radius: 18px; background: var(--surface-2); align-self: flex-start; white-space: pre-line; overflow-wrap: anywhere; animation: rise 0.2s ease; }
.msg.me { align-self: flex-end; background: var(--blue-fill); color: #fff; }
.msg.typing { color: var(--muted); font-style: italic; }
.msg-day { align-self: center; color: var(--muted); font-size: 12px; margin: 8px 0; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; background: var(--bg); color: var(--text); font: inherit; }
.chat-form input:focus { border-color: var(--blue-text); }

/* Prose pages */
.prose { padding: 20px 16px 8px; display: grid; gap: 14px; font-size: 16px; line-height: 1.6; }
.prose h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.25; margin-top: 6px; }
.prose h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin-top: 10px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.prose figure { margin: 4px -16px; }
.prose figure img { width: 100%; height: auto; }
.prose figcaption { padding: 6px 16px 0; font-size: 13px; color: var(--muted); }
.empty { padding: 60px 24px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.empty .big { font-size: 64px; font-weight: 800; letter-spacing: -2px; color: var(--blue-text); line-height: 1; }

/* Dialogs */
dialog { border: 0; padding: 0; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); width: min(92vw, 440px); max-height: 90vh; }
dialog::backdrop { background: rgba(10, 15, 20, 0.6); }
dialog[open] { animation: dlg 0.18s ease; }
@keyframes dlg { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 0; }
.dlg-head h2 { flex: 1; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.dlg-body { padding: 14px 18px 4px; display: grid; gap: 12px; }
.dlg-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.dlg-body li { display: flex; gap: 10px; }
.dlg-body li svg.i { width: 20px; height: 20px; color: var(--blue-text); margin-top: 1px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 18px; flex-wrap: wrap; }
.dlg-cover { height: 96px; position: relative; overflow: hidden; }
.dlg-cover img { width: 100%; height: 100%; object-fit: cover; }
.dlg-who { display: flex; align-items: flex-end; gap: 12px; padding: 0 18px; margin-top: -34px; position: relative; }
.dlg-who .avatar { width: 76px; height: 76px; border: 3px solid var(--surface); }
.dlg-who .avatar.online::after { border-color: var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: none; font-weight: 600; font-size: 14px; }
.chip:hover { border-color: var(--blue-text); color: var(--blue-text); }
.chip[aria-pressed="true"] { background: var(--blue-fill); border-color: var(--blue-fill); color: #fff; }
.gate { text-align: center; width: min(92vw, 420px); }
.gate .dlg-body { padding: 28px 24px 8px; justify-items: center; }
.gate h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; }
.gate .logo { padding: 0; font-size: 24px; }
.gate .dlg-foot { justify-content: center; flex-direction: column; align-items: stretch; padding: 12px 24px 24px; }
.gate .leave { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 6px; }
.gate .leave:hover { color: var(--blue-text); }
.gate::backdrop { background: rgba(10, 15, 20, 0.72); backdrop-filter: blur(14px); }

.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; border-radius: 0; background: rgba(8, 10, 12, 0.96); color: #fff; }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox .lb-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; }
.lightbox .lb-top .icon-btn { color: #fff; }
.lightbox .lb-stage { min-height: 0; display: grid; place-items: center; position: relative; padding: 0 8px; }
.lightbox .lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; min-height: 0; border-radius: 2px; }
.lightbox .lb-cap { padding: 12px 18px 20px; text-align: center; font-size: 14px; color: rgba(255, 255, 255, 0.8); max-width: 760px; margin: 0 auto; }
.lightbox .car-btn { width: 44px; height: 44px; }

.toasts { position: fixed; left: 50%; bottom: 28px; translate: -50% 0; z-index: 1000; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { background: #1d2227; color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); animation: toast 0.25s ease; text-align: center; }
.toast.out { opacity: 0; transition: opacity 0.3s; }
@keyframes toast { from { opacity: 0; transform: translateY(12px); } }
.drop { position: fixed; z-index: 999; pointer-events: none; font-size: 22px; animation: drop 1.1s ease-in forwards; }
@keyframes drop { from { transform: translateY(0) scale(0.6); opacity: 1; } to { transform: translateY(-140px) scale(1.2); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .app { grid-template-columns: 76px minmax(0, 600px) minmax(0, 340px); max-width: 1040px; }
  .sidenav { padding: 14px 10px; align-items: center; }
  .sidenav .logo > span, .nav-foot, .nav-post .t { display: none; }
  .nav-link span.t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sidenav .logo { padding: 6px 0 14px; }
  .nav-link { padding: 12px; }
  .nav-post { width: 48px; height: 48px; padding: 0; }
  .rail { padding-left: 18px; padding-right: 8px; }
}
@media (max-width: 920px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); max-width: 680px; }
  .rail { display: none; }
}
@media (max-width: 640px) {
  :root { --head-h: 52px; }
  .app { display: block; }
  .sidenav { display: none; }
  .main { border: 0; padding-bottom: 84px; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 0; }
  .topbar .logo { padding: 4px 4px; font-size: 22px; }
  .topbar .logo svg { width: 32px; height: 32px; }
  .has-cover .topbar { display: none; }
  .tabbar { display: flex; position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--line); }
  .tabbar a { flex: 1; display: grid; place-items: center; color: var(--text); position: relative; }
  .tabbar a[aria-current="page"] { color: var(--blue-text); }
  .tabbar a .dot { position: absolute; top: 9px; left: calc(50% + 4px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--blue-fill); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
  .dir { grid-template-columns: 1fr; }
  .toasts { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .chat { height: calc(100vh - 56px - env(safe-area-inset-bottom)); height: calc(100dvh - 56px - env(safe-area-inset-bottom)); }
  .chatting .topbar { display: none; }
  .cover { height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}

/* ---------- Additions ---------- */
.btn-ghost { border-color: rgba(255, 255, 255, 0.7); color: #fff; background: rgba(255, 255, 255, 0.06); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }
.lock .btn { height: 40px; font-size: 13px; white-space: normal; line-height: 1.15; }
.slide.video { cursor: default; background: #000; }
.slide.video video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.is-locked .slide.video video { object-fit: cover; }
.media-grid .cell { display: block; }
.media-grid .cell-badge { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(15, 20, 25, 0.6); color: #fff; display: grid; place-items: center; }
.media-grid .cell-badge svg.i { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.media-grid .cell.is-locked .cell-badge { display: none; }
.rail .sugg-card.more { display: none; }
.rail .searching .sugg-card.more { display: block; }
.sugg-card[hidden] { display: none !important; }
.avatar > svg { width: 100%; height: 100%; display: block; }
.hl { animation: hl 1.6s ease; }
@keyframes hl { 0%, 30% { background: var(--blue-soft); } }

.sugg-card .verified, .cover-bar .verified { --vcheck: #1d2227; }
.verified .ck { fill: none; stroke: var(--vcheck, var(--bg)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dlg-who > div { padding-top: 40px; min-width: 0; }
.dlg-who h2 { font-size: 18px; }
.nav-link .t { white-space: nowrap; }
.rail::-webkit-scrollbar { display: none; }

/* ---------- Review fixes ---------- */
dialog:not([open]) { display: none; }
@supports (background: color-mix(in srgb, red 50%, blue)) {
  .page-head { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
  .tabbar { background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); }
}
.slide { position: relative; }
/* The photo covers an inset outline, so the ring is drawn on top of it. */
.slide:focus-visible, .media-grid .cell:focus-visible { outline: none; }
.slide:focus-visible::after, .media-grid .cell:focus-visible::after { content: ""; position: absolute; inset: 0; z-index: 1; border: 4px solid #00aff0; box-shadow: inset 0 0 0 2px #fff; pointer-events: none; }
.slide.video video:focus-visible { outline: 4px solid #00aff0; outline-offset: -4px; border-radius: 0; }
.cover-bar :focus-visible, .post-media :focus-visible, .lightbox :focus-visible, .sugg-card :focus-visible { outline-color: #fff; }
.sugg-card:focus-visible, .story:focus-visible { outline-offset: 3px; }
.lightbox .lb-stage img.loading { opacity: 0; }
.main-foot { display: none; padding: 24px 16px 8px; text-align: center; font-size: 12px; color: var(--muted); }
@media (max-width: 920px) { .main-foot { display: block; } }
@media (max-width: 400px) {
  .btn { white-space: normal; height: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; text-align: center; line-height: 1.2; }
  .btn-sm { min-height: 34px; }
  .btn-split { text-align: left; }
  .lock .lock-icon { display: none; }
  .is-locked .lock { padding: 10px; gap: 8px; }
  .lock .lock-box { padding: 8px; gap: 8px; }
}
