:root {
    --bg: #0d0d10;
    --bg-elev: #17171d;
    --card: #1e1e26;
    --line: #2a2a34;
    --text: #ececf1;
    --text-dim: #9b9ba8;
    --accent: #e8344e;
    --accent-2: #ff8a4c;
    --gold: #f5c542;
    --silver: #c7ccd4;
    --bronze: #c98b56;
    --radius: 16px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  img { max-width: 100%; display: block; }
  a { color: inherit; text-decoration: none; }

  .wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 18px; }

  /* ---------- Header ---------- */
  .site-header {
    position: sticky; top: 0; z-index: 80;
    background: rgba(13,13,16,.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .header-inner {
    display: flex; align-items: center; gap: 18px;
    height: 62px;
  }
  .brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  .brand img { height: 34px; width: auto; border-radius: 8px; }
  .brand-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; white-space: nowrap; }
  .nav {
    display: flex; align-items: center; gap: 4px;
    overflow-x: auto; scrollbar-width: none;
    flex: 1;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    font-size: 14px; color: var(--text-dim); padding: 7px 12px;
    border-radius: 999px; white-space: nowrap; transition: color .2s, background .2s;
  }
  .nav a:hover { color: var(--text); background: var(--bg-elev); }

  .dl-group { display: flex; gap: 8px; flex-shrink: 0; }
  .btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 600; padding: 9px 16px;
    border-radius: 999px; border: none; cursor: pointer;
    transition: transform .18s ease, box-shadow .25s ease, filter .2s ease;
    white-space: nowrap;
  }
  .btn:active { transform: scale(.96); }
  .btn-android {
    color: #fff;
    background: linear-gradient(135deg, #3ddc84, #12a55a);
    box-shadow: 0 5px 18px rgba(18,165,90,.35);
  }
  .btn-ios {
    color: #fff;
    background: linear-gradient(135deg, #ff5f6d, #d81f3d);
    box-shadow: 0 5px 18px rgba(216,31,61,.4);
  }
  .btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

  /* ---------- Hero ---------- */
  .hero {
    position: relative;
    padding: 58px 0 46px;
    background:
      radial-gradient(900px 420px at 78% -8%, rgba(232,52,78,.28), transparent 65%),
      radial-gradient(700px 380px at 8% 0%, rgba(255,138,76,.14), transparent 60%);
    overflow: hidden;
  }
  .hero-grid {
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center;
  }
  .hero-tag {
    display: inline-block; font-size: 12px; letter-spacing: 1px;
    color: var(--accent-2); border: 1px solid rgba(255,138,76,.45);
    padding: 4px 12px; border-radius: 999px; margin-bottom: 18px;
  }
  .hero h1 {
    font-size: 40px; line-height: 1.25; font-weight: 800; letter-spacing: -.5px;
    margin-bottom: 16px;
  }
  .hero h1 .hl {
    background: linear-gradient(100deg, #ff6a7f, #ffb347);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .hero p.lead { font-size: 16px; color: var(--text-dim); max-width: 480px; margin-bottom: 26px; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
  .hero-actions .btn { padding: 12px 24px; font-size: 15px; }
  .hero-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--text-dim); }
  .hero-meta span::before { content: "·"; margin-right: 8px; color: var(--accent); }
  .hero-meta span:first-child::before { display: none; }

  .hero-visual { position: relative; display: flex; justify-content: center; }
  .poster-stack { position: relative; width: 100%; max-width: 400px; aspect-ratio: 3/4; }
  .poster-stack img {
    position: absolute; border-radius: 14px; border: 1px solid var(--line);
    box-shadow: 0 18px 44px rgba(0,0,0,.6);
    object-fit: cover; height: 82%;
    transition: transform .5s cubic-bezier(.2,.7,.3,1);
  }
  .poster-stack img:nth-child(1) { left: 0; top: 12%; width: 46%; transform: rotate(-7deg); z-index: 2; }
  .poster-stack img:nth-child(2) { left: 27%; top: 2%; width: 50%; z-index: 3; }
  .poster-stack img:nth-child(3) { right: 0; top: 14%; width: 46%; transform: rotate(7deg); z-index: 2; }
  .poster-stack:hover img:nth-child(1) { transform: rotate(-10deg) translateY(-8px); }
  .poster-stack:hover img:nth-child(3) { transform: rotate(10deg) translateY(-8px); }
  .poster-stack:hover img:nth-child(2) { transform: translateY(-10px) scale(1.03); }

  /* ---------- Section base ---------- */
  section { padding: 46px 0; }
  .sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
  .sec-head h2 {
    font-size: 25px; font-weight: 800; letter-spacing: -.3px;
    background: linear-gradient(95deg, #ffffff 10%, #ff8a8a 60%, #ffb347 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .sec-head h2.plain { background: none; color: var(--text); -webkit-text-fill-color: var(--text); }
  .sec-head p { font-size: 13.5px; color: var(--text-dim); }

  .reveal { opacity: 1; transform: translateY(0); transition: transform .6s ease, opacity .6s ease; }
  .reveal.pre { opacity: .001; transform: translateY(24px); }

  /* ---------- Rankings ---------- */
  .rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .rank-panel {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 20px 18px;
  }
  .rank-panel h3 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
  .rank-panel h3 .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
  .rank-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
  .rank-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 8px; border-radius: 10px; transition: background .2s;
  }
  .rank-item:hover { background: rgba(255,255,255,.04); }
  .rank-badge {
    width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 12px; font-weight: 700;
    background: #2c2c38; color: var(--text-dim);
  }
  .rank-badge.g { background: linear-gradient(140deg,#ffe08a,#d99b10); color: #3a2600; }
  .rank-badge.s { background: linear-gradient(140deg,#f0f3f8,#9aa4b2); color: #2a2f38; }
  .rank-badge.b { background: linear-gradient(140deg,#e3b28a,#a9662f); color: #331a05; }
  .rank-title { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rank-heat { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
  .rank-trend { font-size: 12px; font-weight: 700; width: 16px; text-align: center; }
  .rank-trend.up { color: #48d47f; }
  .rank-trend.down { color: #ff6b6b; }

  /* ---------- Recommend cards ---------- */
  .hscroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin; scroll-snap-type: x mandatory; }
  .hscroll::-webkit-scrollbar { height: 6px; }
  .hscroll::-webkit-scrollbar-thumb { background: #33333f; border-radius: 99px; }
  .drama-card {
    flex: 0 0 190px; scroll-snap-align: start;
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
    transform-style: preserve-3d;
  }
  .drama-card:hover { transform: translateY(-6px); box-shadow: 0 16px 34px rgba(0,0,0,.55); }
  .drama-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
  .drama-body { padding: 11px 12px 14px; }
  .drama-body h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .match { font-size: 12px; color: var(--accent-2); }
  .card-note { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

  /* ---------- Category wall ---------- */
  .cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .cat-item {
    background: var(--bg-elev); border: 1px solid var(--line);
    border-radius: 14px; padding: 18px 14px; cursor: pointer;
    transition: transform .25s, border-color .25s, background .25s;
  }
  .cat-item:hover { transform: translateY(-4px); border-color: rgba(232,52,78,.55); background: #1d1d26; }
  .cat-icon { font-size: 22px; margin-bottom: 8px; }
  .cat-item strong { display: block; font-size: 14.5px; margin-bottom: 3px; }
  .cat-item small { font-size: 12px; color: var(--text-dim); }

  /* ---------- Finished / high score ---------- */
  .finish-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .finish-card {
    position: relative; border-radius: 14px; overflow: hidden;
    border: 1px solid var(--line); background: var(--card);
    transition: transform .3s ease;
  }
  .finish-card:hover { transform: translateY(-5px); }
  .finish-card img { aspect-ratio: 3/4; object-fit: cover; width: 100%; }
  .finish-card .score {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0,0,0,.68); border: 1px solid rgba(245,197,66,.6);
    color: var(--gold); font-size: 12px; font-weight: 700;
    padding: 2px 8px; border-radius: 999px;
  }
  .finish-card .ep {
    position: absolute; bottom: 44px; right: 10px;
    background: rgba(232,52,78,.9); color: #fff; font-size: 11px;
    padding: 2px 8px; border-radius: 999px;
  }
  .finish-name { padding: 10px 12px; font-size: 13.5px; font-weight: 600; }

  /* ---------- Welfare ---------- */
  .welfare {
    background: linear-gradient(115deg, #2a1118, #341a10 70%, #221019);
    border: 1px solid rgba(232,52,78,.35);
    border-radius: 20px; padding: 26px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  }
  .welfare h3 { font-size: 19px; margin-bottom: 6px; }
  .welfare p { font-size: 13.5px; color: var(--text-dim); }
  .countdown {
    font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 800;
    color: var(--gold); letter-spacing: 1px;
  }
  .checkin-board {
    margin-top: 18px; display: none; grid-template-columns: repeat(7, 1fr); gap: 8px;
  }
  .checkin-board.open { display: grid; }
  .day-cell {
    background: #23232d; border: 1px solid var(--line); border-radius: 10px;
    text-align: center; padding: 10px 4px; font-size: 12px; color: var(--text-dim);
  }
  .day-cell.done { border-color: rgba(72,212,127,.6); color: #48d47f; background: rgba(72,212,127,.08); }

  /* ---------- Calendar ---------- */
  .week-bar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
  .day-col { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; }
  .day-col h4 { font-size: 13px; margin-bottom: 10px; color: var(--accent-2); }
  .day-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
  .day-col li { font-size: 12px; color: var(--text-dim); line-height: 1.4; }
  .day-col li b { display: block; color: var(--text); font-size: 12.5px; font-weight: 600; }
  .sub-btn {
    margin-top: 6px; font-size: 11px; padding: 3px 9px; border-radius: 999px;
    border: 1px solid var(--line); background: transparent; color: var(--text-dim);
    cursor: pointer; transition: all .2s;
  }
  .sub-btn.on { background: rgba(232,52,78,.16); border-color: var(--accent); color: #ff8a9a; }

  /* ---------- Actors ---------- */
  .actor-strip { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; }
  .actor-card {
    flex: 0 0 200px; background: var(--card); border: 1px solid var(--line);
    border-radius: 14px; overflow: hidden;
  }
  .actor-card img { aspect-ratio: 1/1; object-fit: cover; width: 100%; }
  .actor-body { padding: 12px; }
  .actor-body h4 { font-size: 14.5px; }
  .actor-body small { display: block; font-size: 12px; color: var(--text-dim); margin: 4px 0 8px; }
  .follow-btn {
    width: 100%; font-size: 12.5px; padding: 6px; border-radius: 999px;
    border: 1px solid rgba(232,52,78,.6); background: transparent; color: #ff8a9a;
    cursor: pointer; transition: all .2s;
  }
  .follow-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }

  /* ---------- Meme wall ---------- */
  .meme-grid { columns: 3; column-gap: 14px; }
  .meme-card {
    break-inside: avoid; margin-bottom: 14px; border-radius: 14px; overflow: hidden;
    position: relative; border: 1px solid var(--line); background: var(--card);
  }
  .meme-card img { width: 100%; object-fit: cover; }
  .meme-quote { padding: 12px 13px; font-size: 13px; color: var(--text); }
  .meme-src {
    max-height: 0; overflow: hidden; opacity: 0;
    font-size: 11.5px; color: var(--text-dim); padding: 0 13px;
    transition: max-height .3s ease, opacity .3s ease, padding .3s ease;
  }
  .meme-card:hover .meme-src { max-height: 40px; opacity: 1; padding: 0 13px 12px; }

  /* ---------- Upcoming ---------- */
  .up-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .up-card {
    border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    background: var(--card); position: relative;
  }
  .up-card img { aspect-ratio: 3/4; object-fit: cover; width: 100%; opacity: .92; }
  .up-info { padding: 12px 14px 15px; }
  .up-info h4 { font-size: 14.5px; margin-bottom: 5px; }
  .up-info small { font-size: 12px; color: var(--text-dim); display: block; margin-bottom: 9px; }

  /* ---------- Community ---------- */
  .review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .review-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
  .review-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#e8344e,#ff8a4c); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
  .review-top b { font-size: 13.5px; }
  .stars { font-size: 12px; color: var(--gold); letter-spacing: 1px; }
  .review-card p { font-size: 13px; color: var(--text-dim); }
  .review-foot { margin-top: 12px; font-size: 12px; color: var(--text-dim); display: flex; justify-content: space-between; }
  .write-btn { margin-top: 18px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--text); cursor: pointer; }

  /* ---------- Stats ---------- */
  .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .stat-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px; padding: 20px 16px; text-align: center; }
  .stat-num { font-size: 27px; font-weight: 800; color: var(--accent-2); font-variant-numeric: tabular-nums; }
  .stat-label { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; }

  /* ---------- FAQ ---------- */
  .faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
  .faq-item { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
  .faq-q { width: 100%; text-align: left; background: none; border: none; color: var(--text); font-size: 14.5px; padding: 15px 16px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
  .faq-a { max-height: 0; overflow: hidden; transition: max-height .32s ease; font-size: 13.5px; color: var(--text-dim); padding: 0 16px; }
  .faq-item.open .faq-a { max-height: 200px; padding-bottom: 15px; }
  .faq-q .sign { color: var(--accent); transition: transform .3s; }
  .faq-item.open .sign { transform: rotate(45deg); }

  /* ---------- Footer ---------- */
  .site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; margin-top: 30px; }
  .footer-inner { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
  .footer-inner p, .footer-inner a, .footer-inner time { font-size: 12px; color: #6a6a78; }
  .footer-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }
  .footer-links a { color: #7c7c8c; }
  .footer-links a:hover { color: var(--text-dim); }

  .toast {
    position: fixed; inset: 0; z-index: 200; display: none;
    background: rgba(0,0,0,.6); padding: 20px;
  }
  .toast.open { display: grid; place-items: center; }
  .toast-box { background: #1c1c24; border: 1px solid var(--line); border-radius: 16px; padding: 22px; max-width: 340px; width: 100%; }
  .toast-box p { font-size: 13.5px; color: var(--text-dim); margin-bottom: 14px; }
  .toast-box .link-row { display: flex; gap: 8px; }
  .toast-box input { flex: 1; background: #101016; border: 1px solid var(--line); color: var(--text); font-size: 12.5px; padding: 9px 10px; border-radius: 9px; }

  /* ---------- Responsive ---------- */
  @media (max-width: 1024px) {
    .hero h1 { font-size: 33px; }
    .cat-grid, .finish-grid { grid-template-columns: repeat(3, 1fr); }
    .meme-grid { columns: 2; }
    .review-grid, .up-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .week-bar { grid-template-columns: repeat(4, 1fr); }
    .nav { display: none; }
  }
  @media (max-width: 768px) {
    .hero { padding: 38px 0 30px; }
    .hero-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero h1 { font-size: 27px; }
    .hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
    .rank-grid { grid-template-columns: 1fr; }
    .cat-grid, .finish-grid { grid-template-columns: repeat(2, 1fr); }
    .meme-grid { columns: 1; }
    .review-grid, .up-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .week-bar { grid-template-columns: repeat(2, 1fr); }
    .header-inner { height: 56px; gap: 10px; }
    .brand-name { font-size: 15px; }
    .brand img { height: 28px; }
    .dl-group .btn { padding: 7px 12px; font-size: 12.5px; }
    .welfare { flex-direction: column; align-items: flex-start; }
    .countdown { font-size: 19px; }
    section { padding: 34px 0; }
    .sec-head h2 { font-size: 21px; }
  }