:root {
  --bg: #0d0d10; --card: #1a1a21; --text: #f0f0f3; --muted: #9898a4;
  --accent: #ff7a1a; --accent2: #ffce7a; --tab-h: 60px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }

.m-top { position: sticky; top: 0; z-index: 20; padding: 14px 16px 10px;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
  display: flex; align-items: center; gap: 12px; }
.m-brand { font-size: 19px; font-weight: 800; white-space: nowrap; }
.m-search { flex: 1; background: #ffffff14; border: 1px solid #ffffff1c; color: var(--text);
  border-radius: 999px; padding: 9px 15px; font-size: 14px; outline: none; }
.m-search:focus { border-color: var(--accent); }

.m-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 12px; }
.m-chips::-webkit-scrollbar { display: none; }
.m-chips button { flex: 0 0 auto; background: #ffffff12; border: 0; color: var(--muted);
  padding: 7px 16px; border-radius: 999px; font-size: 14px; }
.m-chips button.on { background: var(--accent); color: #fff; font-weight: 700; }

.m-feed { padding: 4px 16px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mcard { cursor: pointer; }
.mcard .mp { position: relative; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden;
  display: flex; align-items: flex-end; padding: 10px; box-shadow: 0 6px 18px #0007; }
.mcard .mp .g { position: absolute; inset: 0; background: linear-gradient(0deg, #000c, transparent 55%); }
.mcard .mp .t { position: relative; z-index: 2; font-weight: 800; font-size: 16px; text-shadow: 0 2px 8px #000b; }
.mcard .mp .s { position: absolute; top: 8px; right: 8px; z-index: 2; background: #000000aa;
  color: var(--accent2); font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.mcard .sub { color: var(--muted); font-size: 12px; margin-top: 6px; }

.m-feed.list { grid-template-columns: 1fr; }
.m-feed.list .mcard { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: center; }
.m-feed.list .mp { aspect-ratio: 2/3; }
.m-feed.list .info h3 { margin: 0 0 6px; font-size: 16px; }
.m-feed.list .info p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rank-no { display: inline-block; min-width: 22px; color: var(--accent); font-weight: 800; }

/* 我的 */
.mine { padding: 24px 16px; }
.mine .avatar { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg,var(--accent),#ff4d4d);
  display: flex; align-items: center; justify-content: center; font-size: 34px; margin-bottom: 14px; }
.mine .rowitem { display: flex; justify-content: space-between; padding: 16px 4px; border-bottom: 1px solid #ffffff12; color: var(--text); }
.mine .rowitem span:last-child { color: var(--muted); }

/* sheet 详情 */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet[hidden] { display: none; }
.sheet-mask { position: absolute; inset: 0; background: #000b; }
.sheet-card { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  background: var(--bg); border-radius: 20px 20px 0 0; max-height: 90vh; overflow-y: auto;
  animation: up .25s ease; }
@keyframes up { from { transform: translateY(100%); } }
.s-hero { height: 220px; position: relative; display: flex; align-items: flex-end; padding: 18px; }
.s-hero .g { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg), transparent 65%); }
.s-hero h2 { position: relative; margin: 0; font-size: 26px; text-shadow: 0 2px 10px #000; }
.s-close { position: absolute; top: 12px; right: 14px; z-index: 3; background: #000000aa; border: 0;
  color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; }
.s-body { padding: 16px 18px 30px; }
.s-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.s-meta .b { background: #ffffff16; padding: 3px 9px; border-radius: 6px; font-size: 12px; }
.s-meta .b.score { color: var(--accent2); font-weight: 700; }
.s-play { width: 100%; border: 0; background: var(--accent); color: #fff; font-size: 16px;
  font-weight: 700; padding: 14px; border-radius: 12px; margin-bottom: 16px; }
.s-desc { color: #ccccd4; line-height: 1.8; }
.s-video { background: #000; border-radius: 12px; aspect-ratio: 16/9; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; color: var(--muted); margin-bottom: 16px; }
.s-video .big { font-size: 44px; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); max-width: 560px; margin: 0 auto;
  display: flex; background: #14141bee; backdrop-filter: blur(12px); border-top: 1px solid #ffffff12; }
.tabbar button { flex: 1; background: none; border: 0; color: var(--muted); font-size: 11px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.tabbar button span { font-size: 21px; }
.tabbar button.on { color: var(--accent); }

.empty { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 50px 0; }
