:root {
    --pink: #ec4b8c;
    --pink-dark: #c93370;
    --pink-soft: #ffe6f0;
    --pink-line: #ffd0e2;
    --bg: #f5f6f8;
    --card: #ffffff;
    --ink: #22242a;
    --ink-2: #5a5f6a;
    --ink-3: #8f95a1;
    --radius: 14px;
    --shadow: 0 4px 16px rgba(34, 36, 42, 0.06);
    --max: 1100px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  a { color: inherit; text-decoration: none; }
  img { display: block; max-width: 100%; }
  ul { list-style: none; }

  /* 顶部栏 */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #f0e3ea;
  }
  .topbar-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
  .brand img { height: 32px; width: auto; border-radius: 8px; }
  .brand-name { font-size: 17px; font-weight: 700; color: var(--pink-dark); white-space: nowrap; }
  .search-box {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--pink-soft);
    border: 1px solid var(--pink-line);
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--ink-3);
    font-size: 13px;
  }
  .search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 13px;
    color: var(--ink);
    font-family: inherit;
  }
  .search-box input::placeholder { color: #bf8aa5; }
  .top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
  .icon-btn {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--pink-soft);
    color: var(--pink-dark);
    font-size: 14px;
    line-height: 1;
  }

  /* 通用容器 */
  .wrap { max-width: var(--max); margin: 0 auto; padding: 0 14px; }
  section { margin-top: 22px; }
  .sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
  }
  .sec-head h2 { font-size: 18px; letter-spacing: .2px; }
  .sec-head .more { font-size: 12px; color: var(--pink-dark); white-space: nowrap; }
  .hint { font-size: 12px; color: var(--ink-3); }

  /* 轮播 */
  .banner {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #2a1e26;
  }
  .slides { display: flex; transition: transform .45s ease; touch-action: pan-y; }
  .slide { position: relative; flex: 0 0 100%; }
  .slide img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
  .slide-cap {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 44px 16px 16px;
    background: linear-gradient(to top, rgba(20,10,16,.88), rgba(20,10,16,0));
    color: #fff;
  }
  .slide-cap h3 { font-size: 17px; margin-bottom: 6px; }
  .badges { display: flex; flex-wrap: wrap; gap: 6px; }
  .badge {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.32);
  }
  .badge.solid { background: var(--pink); border-color: var(--pink); }
  .dots {
    display: flex; justify-content: center; gap: 6px;
    padding: 10px 0 2px;
  }
  .dot { width: 7px; height: 7px; border-radius: 50%; background: #e3c6d4; border: 0; padding: 0; cursor: pointer; }
  .dot.on { background: var(--pink); width: 18px; border-radius: 999px; }

  /* 分类导航 */
  .cats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px 10px;
    box-shadow: var(--shadow);
  }
  .cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ink-2);
    text-align: center;
  }
  .cat-ico {
    width: 42px; height: 42px;
    border-radius: 14px;
    display: grid; place-items: center;
    background: var(--pink-soft);
    color: var(--pink-dark);
    font-size: 16px;
  }

  /* 推荐列表 */
  .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .drama-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
  }
  .cover {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--pink-soft);
  }
  .cover img { width: 100%; height: 100%; object-fit: cover; }
  .cover .corner {
    position: absolute; top: 8px; left: 8px;
    font-size: 11px;
    background: rgba(236,75,140,.94);
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
  }
  .drama-body { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
  .drama-title {
    font-size: 14px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .drama-meta { font-size: 11px; color: var(--ink-3); display: flex; gap: 6px; flex-wrap: wrap; }
  .drama-desc {
    font-size: 12px;
    color: var(--ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-ops { display: flex; gap: 6px; margin-top: auto; }
  .op {
    flex: 1;
    font-size: 11px;
    text-align: center;
    padding: 6px 0;
    border-radius: 999px;
    background: var(--pink-soft);
    color: var(--pink-dark);
    border: 1px solid var(--pink-line);
    cursor: pointer;
    font-family: inherit;
  }
  .op.primary { background: var(--pink); color: #fff; border-color: var(--pink); }

  /* AI 横滑 */
  .hscroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hscroll::-webkit-scrollbar { display: none; }
  .hcard {
    flex: 0 0 150px;
    scroll-snap-align: start;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
  }
  .hcard .cover { aspect-ratio: 3 / 4; }
  .hcard-info { padding: 8px 10px 12px; }
  .hcard-info h3 { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hcard-info p { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

  /* 每日更新 */
  .updates {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 6px 14px;
  }
  .update-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #f1e2ea;
    position: relative;
  }
  .update-row:last-child { border-bottom: none; }
  .update-row img {
    width: 58px; height: 78px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--pink-soft);
  }
  .update-txt { min-width: 0; flex: 1; }
  .update-txt .t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .update-txt .s { font-size: 12px; color: var(--pink-dark); margin-top: 3px; }
  .update-txt .b { font-size: 11px; color: var(--ink-3); margin-top: 2px; }

  /* 排行榜 */
  .rank {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  .rank-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #f6eef2;
  }
  .rank-row:last-child { border-bottom: none; }
  .rank-no {
    width: 26px; text-align: center;
    font-size: 17px; font-weight: 800;
    color: var(--ink-3);
    flex-shrink: 0;
  }
  .rank-row.top .rank-no { color: var(--pink); }
  .rank-row img { width: 46px; height: 62px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
  .rank-info { min-width: 0; flex: 1; }
  .rank-info .t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rank-info .s { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
  .tag {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--pink-soft);
    color: var(--pink-dark);
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 缓存卡片 */
  .cache-card {
    background: linear-gradient(135deg, #ffe9f2, #fff5f9);
    border: 1px solid var(--pink-line);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .cache-ico {
    width: 48px; height: 48px;
    border-radius: 16px;
    background: #fff;
    display: grid; place-items: center;
    color: var(--pink);
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(236,75,140,.14);
  }
  .cache-txt { flex: 1; min-width: 0; }
  .cache-txt h2 { font-size: 16px; }
  .cache-txt p { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
  .btn {
    display: inline-block;
    background: var(--pink);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(236,75,140,.25);
  }
  .btn.ghost { background: #fff; color: var(--pink-dark); border: 1px solid var(--pink-line); box-shadow: none; }

  /* 下载区 */
  .download {
    background: linear-gradient(135deg, #ec4b8c, #f77aa8);
    border-radius: 18px;
    padding: 24px 18px;
    color: #fff;
    text-align: center;
    box-shadow: 0 8px 24px rgba(236,75,140,.24);
  }
  .download h2 { font-size: 19px; margin-bottom: 8px; }
  .download p { font-size: 13px; opacity: .92; margin-bottom: 16px; }
  .download .btn { background: #fff; color: var(--pink-dark); box-shadow: 0 4px 14px rgba(120,10,50,.18); }

  /* 截图墙 */
  .shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .shots img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--pink-soft); }

  /* 页脚 */
  footer {
    margin-top: 30px;
    padding: 22px 14px calc(22px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #ebe4e8;
    text-align: center;
    color: var(--ink-3);
    font-size: 11px;
    line-height: 1.9;
  }
  footer a { color: var(--ink-3); }
  footer .ft-name { color: var(--ink-2); font-size: 12px; margin-bottom: 4px; }

  /* 底部导航 */
  .tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: rgba(255,255,255,.98);
    border-top: 1px solid #f0e3ea;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 16px rgba(34,36,42,.05);
  }
  .tabbar-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px 4px;
  }
  .tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: var(--ink-3);
    padding: 3px 0;
  }
  .tab-ico { font-size: 17px; line-height: 1.2; }
  .tab.on { color: var(--pink); font-weight: 600; }

  /* 断点 */
  @media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .hcard { flex: 0 0 180px; }
    .shots { grid-template-columns: repeat(5, 1fr); gap: 10px; }
    .slide img { aspect-ratio: 16 / 9; }
    section { margin-top: 30px; }
    .sec-head h2 { font-size: 20px; }
    .topbar-inner { padding: 12px 20px; }
    .brand-name { font-size: 19px; }
    .download { padding: 34px 24px; }
    .download h2 { font-size: 24px; }
  }
  @media (min-width: 1024px) {
    .grid-2 { grid-template-columns: repeat(4, 1fr); }
    .hcard { flex: 0 0 200px; }
    body { padding-bottom: 0; }
    .tabbar { position: static; box-shadow: none; border-top: 1px solid #f0e3ea; margin-top: 26px; }
    .tabbar-inner { padding: 10px 0; }
    .layout {
      display: grid;
      grid-template-columns: 1fr 320px;
      gap: 20px;
      align-items: start;
    }
    .aside-sticky { position: sticky; top: 76px; }
  }