:root {
  --of: #00aff0;
  --of-dark: #0091c8;
  --bg: #f6f7f8;
  --card: #fff;
  --text: #16191c;
  --muted: #8a8f98;
  --line: #e8eaed;
  --shadow: 0 8px 24px rgba(22, 25, 28, .06);
  --radius: 14px;
  --dock: 0px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  padding-bottom: calc(var(--dock) + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(1120px, calc(100% - 24px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.verified { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--of); color: #fff; font-size: 10px; font-style: normal; }

.top { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 12px; height: 58px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; letter-spacing: -.03em; flex-shrink: 0; }
.logo b { color: var(--of); }
.top-search { flex: 1; min-width: 0; position: relative; }
.top-search input, .hero-search input {
  width: 100%; border: 1px solid var(--line); background: #f2f4f6; border-radius: 999px;
  padding: 10px 16px; font: inherit; outline: none; -webkit-appearance: none;
}
.top-search input:focus, .hero-search input:focus { border-color: var(--of); background: #fff; }
.suggest-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  margin: 0; padding: 6px; list-style: none; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  max-height: 360px; overflow: auto;
}
.suggest-list li {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer;
}
.suggest-list li:hover, .suggest-list li.is-on { background: #eef8fd; }
.suggest-list img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.suggest-list span { display: flex; flex-direction: column; min-width: 0; }
.suggest-list strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-list small { color: var(--muted); font-size: 12px; }
.crumbs { border-top: 1px solid var(--line); background: #fff; }
.crumbs-inner {
  display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center;
  list-style: none; margin: 0; padding: 8px 0; font-size: 13px; color: var(--muted);
}
.crumbs-inner li { display: flex; align-items: center; max-width: 100%; }
.crumbs-inner li + li::before { content: "›"; margin: 0 8px; color: #c4c8ce; }
.crumbs-inner a { color: var(--of); font-weight: 600; }
.crumbs-inner [aria-current="page"] {
  color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.tabs { border-top: 1px solid var(--line); background: #fff; }
.tabs-inner { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 8px 0; scrollbar-width: none; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px;
  color: #4b5158; background: #f2f4f6;
}
.tab.is-on, .tab:hover { background: var(--of); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--of); color: #fff; border: 0; border-radius: 999px;
  padding: 10px 18px; font: 700 14px/1 system-ui; cursor: pointer;
}
.btn:hover { background: var(--of-dark); }
.btn-block { width: 100%; height: 46px; }
.btn-sm { margin: 10px 12px 0; height: 36px; font-size: 13px; }

.hero { padding: 28px 0 12px; display: grid; gap: 16px; }
.kicker { color: var(--of); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin: 0 0 8px; }
.hero h1, .page-head h1, .empty-page h1 { margin: 0 0 8px; font-size: clamp(24px, 6vw, 42px); letter-spacing: -.03em; }
.lead { color: #4b5158; max-width: 640px; }
.hero-search { display: flex; gap: 8px; max-width: 560px; }
.hero-search .btn { min-width: 110px; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 22px 0 12px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head a { color: var(--of); font-weight: 600; }

.creator-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.creator-chip { flex: 0 0 auto; width: 72px; text-align: center; font-size: 12px; font-weight: 600; }
.creator-chip img { width: 60px; height: 60px; object-fit: cover; border-radius: 50%; margin: 0 auto 6px; border: 2px solid #fff; box-shadow: var(--shadow); }
.creator-chip span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); content-visibility: auto; contain-intrinsic-size: auto 480px; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 5; background: #1b1f24; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; transform: scale(1.22); }
img.lazy { opacity: 0; }
img.is-ready { opacity: 1; transition: opacity .22s ease; }
.lazy-bg { background-color: #dbe4ea; }
.play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.28));
}
.play i {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: rgba(0, 175, 240, .94);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.card-user { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 600; }
.card-user img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.card-user span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-user em { color: var(--muted); font-style: normal; font-size: 12px; }

.profile { margin-bottom: 8px; }
.profile-banner-wrap { height: 220px; overflow: hidden; background: #111; }
.profile-banner { height: 100%; background: #1b1f24 center/cover no-repeat; transform: scale(1.2); transform-origin: center 20%; }
.profile-body { display: grid; grid-template-columns: 132px 1fr; gap: 18px; margin-top: -58px; padding-bottom: 8px; position: relative; z-index: 2; }
.profile-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 4px solid #fff; background: #fff; }
.profile-main { padding-top: 70px; color: var(--text); }
.profile-name { margin: 0 0 4px; font-size: clamp(22px, 5vw, 28px); word-break: break-word; color: var(--text); }
.profile-user { margin: 2px 0 12px; color: var(--muted); }
.stats { display: flex; gap: 18px; margin-bottom: 12px; flex-wrap: wrap; }
.stats strong { display: block; font-size: 18px; }
.stats span { color: var(--muted); font-size: 13px; }
.bio { max-width: 62ch; overflow-wrap: anywhere; }

.user-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.user-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-align: center; padding-bottom: 14px; content-visibility: auto; contain-intrinsic-size: auto 260px; }
.user-cover { height: 84px; overflow: hidden; background: #dbe4ea center/cover no-repeat; transform: none; }
.cover-only { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 12px; background: #1b1f24; content-visibility: auto; contain-intrinsic-size: auto 420px; }
.cover-only img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; transform: scale(1.22); }
.cover-only span {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 1;
  color: #fff; font-weight: 800; font-size: 13px; text-shadow: 0 1px 8px rgba(0,0,0,.7);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-ava { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin: -36px auto 8px; border: 3px solid #fff; }
.user-card h3 { margin: 0; font-size: 16px; padding: 0 8px; }
.user-card p { margin: 2px 0 0; color: var(--muted); font-size: 13px; padding: 0 8px; overflow-wrap: anywhere; }

.post-page { padding-bottom: 24px; }
.post-card { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; background: var(--card); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); margin: 20px 0; }
.post-media { position: relative; display: block; margin: 0; background: #111; min-height: 360px; overflow: hidden; }
.post-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; min-height: 360px; transform: scale(1.22); }
.post-meta { padding: 24px 24px 24px 0; }
.author { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.author strong, .author em { display: block; }
.author em { color: var(--muted); font-style: normal; }
.post-meta h1 { font-size: clamp(20px, 4vw, 26px); margin: 0 0 12px; }
.post-text { margin: 0 0 12px; }
.tag { color: var(--of); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0 36px; }
.pg { min-width: 40px; min-height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-weight: 600; }
.pg.current { background: var(--of); color: #fff; border-color: var(--of); }
.pg.disabled { opacity: .4; }
.pg.dots { border: 0; background: none; }

.dir-links { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.dir-links a { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 700; }
.empty, .empty-page { text-align: center; padding: 48px 0; color: var(--muted); }
.page-head { padding-top: 20px; }

.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 32px; color: #4b5158; }
.foot-title { margin: 0 0 6px; font-size: 20px; color: var(--text); }
.foot-lead { margin: 0 0 14px; }
.nick-cloud { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 22px; }
.nick-cloud a {
  color: var(--of); font-weight: 700; font-size: 13px;
  background: #eef8fd; border-radius: 999px; padding: 5px 10px;
}
.nick-cloud a:hover { background: var(--of); color: #fff; }
.nick-more { background: var(--text) !important; color: #fff !important; }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-links a { color: var(--of); font-weight: 600; }

.dock { display: none; }

@media (max-width: 1100px) {
  .grid, .user-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .grid, .user-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .profile-body { grid-template-columns: 1fr; justify-items: start; }
  .profile-banner-wrap { height: 150px; }
  .profile-main { padding-top: 8px; }
  .profile-avatar { width: 92px; height: 92px; margin-top: 0; }
  .post-card { grid-template-columns: 1fr; }
  .post-meta { padding: 16px; }
  .hero-search { flex-direction: column; }
  .hero-search .btn { width: 100%; }
  .play i { width: 56px; height: 56px; }
  .logo span { font-size: 18px; }
}
@media (max-width: 720px) {
  :root { --dock: 58px; }
  .wrap { width: min(1120px, calc(100% - 16px)); }
  .top-inner { height: 54px; gap: 8px; }
  .hero { padding: 18px 0 8px; }
  .section-head { margin: 16px 0 10px; }
  .card-user { padding: 8px 10px; font-size: 13px; }
  .dock {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .dock a { text-align: center; font-weight: 800; font-size: 12px; padding: 10px 4px; color: #4b5158; border-radius: 10px; }
  .dock a.is-on { color: var(--of); background: #eef8fd; }
}
@media (max-width: 420px) {
  .grid, .user-grid { gap: 8px; }
  .tab { padding: 8px 12px; font-size: 13px; }
  .play i { width: 50px; height: 50px; }
}
