/* Reference-led visual layer. Local SVG icons; no external fonts or assets. */
:root {
  --bg: #070708;
  --panel: #111013;
  --text: #f3efe8;
  --muted: #aaa49b;
  --brand: #dfc28f;
  --accent: #c4a16a;
  --gold: var(--brand);
  --line: #f3efe816;
  --ui-quiet: #ffffff05;
  --ui-border: #f3efe81c;
}

body {
  background: radial-gradient(ellipse at 18% 15%, #6a1f2710, transparent 34%),
    radial-gradient(ellipse at 85% 48%, #c4a16a08, transparent 30%), var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.ui-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  vertical-align: -3px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}
.ui-icon.is-filled { fill: currentColor; }
button, .button { gap: 7px; font-size: 13px; font-weight: 500; }
button .ui-icon, .button .ui-icon { width: 16px; height: 16px; }
button, .button, input, select, textarea { border-radius: 8px; }
button, .button { background: #181719; border-color: var(--ui-border); }
button:hover, .button:hover { background: #222023; border-color: #f3efe836; }
.primary {
  color: #211a10;
  border-color: #d8ba83;
  background: linear-gradient(125deg, #dfc38d, #c6a368);
  box-shadow: inset 0 1px 0 #ffffff20;
  font-weight: 600;
}
.primary:hover { color: #211a10; background: #e5cb99; border-color: #e5cb99; }
.quiet { background: #08080970; border-color: #ffffff26; }
.small { font-size: 12px; }
input, select, textarea { background: #101012; border-color: #f3efe820; font-size: 13px; }
input::placeholder, textarea::placeholder { color: #736e67; }
input:hover, select:hover, textarea:hover { border-color: #f3efe839; }
:focus-visible { outline: 2px solid #dfc28fbf; outline-offset: 3px; }

/* Header matches the reference's compact floating chrome. */
.topbar {
  border-color: #f3efe814;
  background: linear-gradient(112deg, #ffffff06, transparent 25%), #0a0a0ce8;
  box-shadow: 0 6px 24px #00000020;
}
.brand { font-size: 19px; letter-spacing: -.6px; font-weight: 700; gap: 9px; }
.brand-mark {
  width: 29px;
  height: 30px;
  border-radius: 8px;
  background: #d6ba83;
  color: #1b160e;
  box-shadow: inset 0 1px 0 #ffffff26;
}
.brand-mark:before { display: none; content: none; }
.brand-mark .ui-icon { width: 17px; height: 17px; fill: currentColor; stroke-width: 1; }
.nav a { font-weight: 550; }
.nav a:hover { background: #ffffff05; }
.nav a.active { color: var(--brand); background: #c4a16a17; }
.nav-icon { width: 20px; margin-right: 7px; font-size: inherit; line-height: 1; }
.nav-icon .ui-icon { width: 19px; height: 19px; vertical-align: -3px; }
.nav-label { min-width: 0; }
.search { border-color: #f3efe816; background: #ffffff05; }
.search:focus-within { border-color: #c4a16a77; background: #ffffff08; }
.search button { width: 32px; height: 32px; padding: 7px; color: #bcb5aa; }
.search button .ui-icon { width: 18px; height: 18px; stroke-width: 1.35; }
.notify-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 34px;
  position: relative;
  color: #bdb6ab;
}
.notify-link:hover { color: var(--text); }
.notify-link .ui-icon { width: 19px; height: 19px; }
.notify-link .badge { position: absolute; right: -3px; top: -1px; line-height: 16px; min-width: 16px; text-align: center; }
.avatar { background: #c7aa76; color: #241e15; font-size: 13px; font-weight: 600; }
.avatar.green { background: #61958a; color: #071c17; }
.avatar.orange { background: #c58e59; color: #29190b; }
.personal-menu summary { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.personal-menu summary:after { display: none; content: none; }
.personal-menu .icon-menu { display: none; }
.personal-menu .icon-chevron { width: 13px; height: 13px; transition: transform .15s ease; }
.personal-menu[open] .icon-chevron { transform: rotate(180deg); }
.personal-popover { border-color: #f3efe821; background: #141315; padding: 7px; border-radius: 12px; }
.personal-popover .nav a { display: flex; align-items: center; font-weight: 450; padding: 10px; }
.sync-label { color: #8c867d; padding-top: 11px; }

/* One content hierarchy for all channels. */
h1 { letter-spacing: -.8px; font-size: 30px; font-weight: 650; }
h2, h3 { font-weight: 600; }
.eyebrow { letter-spacing: 1.8px; font-size: 9px; color: #bca374; font-weight: 600; }
.section-head {
  min-height: 34px;
  padding: 0 1px 7px;
  margin: 22px 0 9px;
  gap: 14px;
  align-items: center;
}
.section-head h2, .home-catalog h2 { color: var(--brand); font-size: 18px; font-weight: 650; letter-spacing: -.2px; }
.section-head a { color: #a39c91; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.section-head a:hover { color: var(--brand); }
.section-head a .ui-icon { width: 14px; height: 14px; }
.home-catalog { margin-top: 18px; }
.home-catalog .section-head { margin: 0 0 8px; }
.home-manga { margin-top: 26px; }
.home-manga .section-head { margin-top: 0; }
.home-resume { margin: 14px 0 18px; }
.home-resume .section-head { margin-top: 0; }
.home-resume .section-head h2 { font-size: 15px; }
.home-resume.is-guest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border: 1px solid #f3efe80e;
  border-radius: 8px;
  background: #ffffff03;
  color: #9d978d;
  font-size: 12px;
}
.home-resume.is-guest p, .home-resume.is-guest h2 { margin: 0; }
.home-resume .resume-prompt { display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; }
.home-resume .resume-prompt > button { margin-left: auto; }
.home-resume .resume-prompt > .ui-icon { width: 16px; height: 16px; color: #8f877a; }
.home-resume.is-guest button { padding: 4px 10px; font-size: 11px; }
.home-resume .list-row { padding: 10px 0; border-color: #ffffff0b; }
.home-resume .list-row img { width: 42px; height: 54px; border-radius: 5px; }
.home-resume .list-body h3 { font-size: 13px; }
.home-resume .list-body p { font-size: 11px; margin: 3px 0 0; }
.home-resume .list-row .actions { padding-left: 0; width: auto; }
.home-shortcuts { border-top: 1px solid #ffffff0d; margin-top: 28px; padding-top: 18px; gap: 23px; }
.home-shortcuts a { color: #9d968a; font-size: 12px; }
.home-shortcuts a:hover { color: var(--brand); }

/* Give story art one caption. Embedded SVG footer text is outside the crop. */
.grid { gap: 14px 11px; }
.poster { border-color: #dfc28f25; background: #141315; }
.poster img {
  position: absolute;
  top: -17%;
  left: 0;
  width: 100%;
  height: 190%;
  object-fit: cover;
  object-position: center top;
}
.poster:after { inset: 58% 0 0; background: linear-gradient(transparent, #000000a8); }
.card-copy { background: #0c0c0de0; border-color: #dfc28f1d; padding: 9px 8px 8px; gap: 3px; }
.card h3 { font-weight: 600; font-size: 12px; line-height: 1.55; }
.card p { color: #99938b; font-size: 11px; line-height: 1.6; }
.card .release-meta { color: #716d66; font-size: 10px; }
.card:hover .poster { border-color: #c4a16a77; }
.card:hover h3 { color: #ead4aa; }
.favorite {
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  padding: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #080809a6;
  border: 1px solid #ffffff21;
  border-radius: 50%;
  color: #eee8de;
  backdrop-filter: blur(5px);
}
.favorite .ui-icon { width: 15px; height: 15px; }
.favorite[aria-pressed="true"] { color: var(--brand); border-color: #c4a16a66; background: #18130dc7; }
.episode-count { top: 9px; left: 8px; font-size: 10px; color: #eee8de; background: #09090ab3; padding: 2px 5px; border-radius: 4px; font-weight: 450; }
.score { left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; color: #edd4a4; font-size: 11px; font-weight: 550; }
.score .ui-icon { width: 12px; height: 12px; }

.hero { border-color: #dfc28f24; box-shadow: 0 18px 48px #0000005c; }
.hero:after { background: linear-gradient(90deg, #080809ed, #080809b8 35%, #08080910 80%), linear-gradient(0deg, #0808097d, transparent 70%); }
.hero-content { bottom: 34px; }
.hero h1 { font-weight: 650; letter-spacing: -1px; }
.hero .pills { gap: 7px; }
.pill { border-color: #ffffff1a; background: #ffffff08; font-size: 11px; }
.pill .ui-icon { width: 12px; height: 12px; color: #dfc28f; }
.hero p { color: #c3bdb2; line-height: 1.7; }
.hero .actions button, .hero .actions .button { height: 38px; font-size: 12px; }
.hero-bottom button { width: 4px; height: 4px; background: #ffffff55; }
.hero-bottom button.selected { width: 17px; height: 4px; }
.tonight-heading h2 { font-weight: 600; }
.tonight-heading a { display: inline-flex; align-items: center; gap: 4px; }
.tonight-heading a .ui-icon { width: 13px; height: 13px; }
.tonight-card { border-color: #dfc28f29; }
.tonight-card img { height: 190%; top: -17%; object-position: center top; }
.tonight-copy strong { font-weight: 550; }
.tonight-copy span { display: flex; align-items: center; gap: 3px; color: #c9b180; }
.tonight-copy .ui-icon { width: 10px; height: 10px; }

/* Tabs, filters and deeper screens share the same quiet controls. */
.tabs { gap: 3px; }
.tabs button, .tabs .button { border-color: transparent; background: transparent; color: #a8a195; font-size: 12px; padding: 7px 12px; box-shadow: none; }
.tabs button:hover, .tabs .button:hover { color: var(--text); background: #ffffff05; }
.tabs .selected, .tabs button.selected, .tabs .button.primary { color: var(--brand); background: #c4a16a19; border-color: #c4a16a29; }
.filters { margin: 20px 0; gap: 10px; }
.filters input, .filters select, .filters button { min-height: 42px; }
.notice { color: #bfb6a7; border-color: #c4a16a25; background: #1b1813; font-size: 12px; line-height: 1.8; }
.panel { background: #101012; border-color: #f3efe819; box-shadow: none; }
.panel h3 { font-size: 16px; font-weight: 550; }
.banner { background: linear-gradient(110deg, #c4a16a0d, transparent 65%), #111012; border-color: #c4a16a26; }
.profile-nav { border-bottom: 1px solid #ffffff10; gap: 5px; padding-bottom: 1px; margin: 23px 0; }
.profile-nav a { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 13px; color: #9d968b; background: transparent; font-size: 13px; }
.profile-nav a.active { border-color: #c4a16a; color: var(--brand); background: transparent; }
.profile-nav a:hover { color: #e6d3b0; }
.ranking-row { background: #111013; border-color: #ffffff17; border-radius: 10px; }
.ranking-top { border-color: #c4a16a55; }
.ranking-copy h2 { font-weight: 600; font-size: 17px; }
.ranking-copy p { color: #a19b90; }
.ranking-metric { font-weight: 500; color: #d8bf91; }
.ranking-row .rank-num { font-variant-numeric: tabular-nums; }
.ranking-metric .button { background: #ffffff04; border-color: #ffffff1a; color: #ded8ce; }
.player { border-color: #ffffff1a; border-radius: 12px; overflow: hidden; }
.player-tools { background: #101012; color: #aaa298; border-top: 1px solid #ffffff0b; }
.detail-heading h1 { font-size: 28px; font-weight: 600; }
.episode-grid a { background: #171618; border-color: #ffffff13; font-size: 12px; }
.episode-grid a.active { background: #c4a16a18; color: var(--brand); border-color: #c4a16a60; }
.list-row { border-color: #ffffff0e; }
.list-row .ui-icon { width: 16px; height: 16px; }
.notification-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; margin: 0 8px 0 1px; background: #6e6961; }
.notification-dot.is-unread { background: var(--brand); box-shadow: 0 0 0 3px #c4a16a12; }
.post { background: #111012; border-color: #ffffff17; }
.post .actions button { background: transparent; border-color: #ffffff17; }
.post .actions [data-action="post-like"][aria-pressed="true"] { color: var(--brand); background: #c4a16a19; border-color: #c4a16a4b; box-shadow: none; }
.modal { border-color: #ffffff21; background: #151416; border-radius: 14px; box-shadow: 0 24px 90px #0009; }
.modal h2 { font-weight: 600; letter-spacing: -.5px; }
.modal .brand-mark { margin-bottom: 18px; }
.modal button[data-action="modal-close"] { width: 32px; height: 32px; padding: 7px; background: transparent; border-color: transparent; color: #a9a297; }
.modal button[data-action="modal-close"]:hover { background: #ffffff0a; color: var(--text); }
.footer { border-color: #ffffff0c; color: #7e786f; line-height: 1.9; }
.footer .ui-icon { width: 13px; height: 13px; }
.footer a { display: inline-flex; gap: 5px; align-items: center; }

@media (min-width: 900px) and (max-width: 1120px) {
  .topbar { gap: 10px; }
  .personal-menu .menu-label, .personal-menu .icon-chevron { display: none; }
  .personal-menu .icon-menu { display: inline-block; width: 19px; height: 19px; }
  .personal-menu summary { padding: 9px 2px; }
  .nav a { font-size: 13px; padding-left: 7px; padding-right: 7px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 25px; height: 27px; }
}

@media (max-width: 899px) {
  :root { --bg: #0d0c0b; --panel: #161513; --text: #f4efe7; --muted: #ada699; --brand: #e6c384; }
  body { background: #0d0c0b; font-size: 13px; }
  .topbar { box-shadow: none; background: transparent; padding: 9px 16px 8px; row-gap: 8px; }
  .brand { font-size: 18px; font-weight: 650; }
  .brand-mark { width: 25px; height: 27px; border-radius: 7px; }
  .brand-mark .ui-icon { width: 15px; height: 15px; }
  .top-actions { gap: 7px; }
  .top-actions button { font-size: 11px; padding: 7px 10px; }
  .notify-link { width: 25px; height: 30px; }
  .notify-link .ui-icon { width: 19px; height: 19px; }
  .avatar { width: 30px; height: 30px; font-size: 12px; }
  .personal-menu summary { font-size: 11px; gap: 3px; }
  .personal-menu .menu-label, .personal-menu .icon-chevron { display: inline-block; }
  .personal-menu .icon-menu { display: none; }
  .search { height: 37px; border-radius: 10px; }
  .search button { height: 29px; width: 30px; padding: 6px; }
  .nav-main { gap: 3px; }
  .nav-main a { font-size: 12px; font-weight: 550; padding: 7px 10px; }
  .nav-main a.active { background: #f4efe7; color: #0d0c0b; }
  .page { padding-top: 10px; padding-bottom: 100px; }
  .hero { border-radius: 12px; }
  .hero-content { left: 22px; bottom: 26px; }
  .hero h1 { font-size: 28px; letter-spacing: -.6px; }
  .hero .actions .button, .hero .actions button { height: 35px; font-size: 11px; }
  .hero .actions .ui-icon { width: 14px; height: 14px; }
  .hero-bottom { right: 14px; bottom: 12px; }
  .tonight { margin-top: 13px; }
  .tonight-heading h2 { font-size: 15px; }
  .tonight-copy strong { font-size: 11px; }
  .tonight-card.featured strong { font-size: 14px; }
  .tonight-copy span { font-size: 9px; }
  .tonight-copy .ui-icon { width: 9px; height: 9px; }
  .section-head { margin: 20px 0 9px; min-height: 30px; padding: 0 0 6px; gap: 9px; }
  .section-head h2, .home-catalog h2 { font-size: 16px; }
  .section-head a { font-size: 10px; }
  .section-head a .ui-icon { width: 12px; height: 12px; }
  .home-catalog { margin-top: 17px; }
  .home-manga { margin-top: 23px; }
  .home-resume { margin: 12px 0 16px; }
  .home-resume.is-guest { padding: 8px 10px; font-size: 10px; gap: 7px; }
  .home-resume.is-guest button { font-size: 10px; padding: 4px 9px; }
  .home-resume .list-row .actions { width: auto; padding: 0; }
  .home-resume .list-body { flex: 1; min-width: 90px; }
  .home-shortcuts { gap: 15px; padding-top: 16px; margin-top: 22px; }
  .home-shortcuts a { font-size: 11px; }
  .grid { gap: 13px 8px; }
  .card-copy { padding: 7px 6px; gap: 2px; }
  .card h3 { font-size: 12px; font-weight: 550; }
  .card p { font-size: 10px; }
  .card .release-meta { font-size: 9px; }
  .episode-count { left: 6px; top: 8px; font-size: 9px; padding: 1px 4px; }
  .favorite { right: 5px; top: 5px; width: 26px; height: 26px; padding: 5px; }
  .favorite .ui-icon { width: 14px; height: 14px; }
  .score { font-size: 10px; left: 6px; bottom: 7px; gap: 3px; }
  .score .ui-icon { width: 11px; height: 11px; }
  .tabs button, .tabs .button { font-size: 11px; padding: 7px 10px; }
  .filters { gap: 9px; margin: 17px 0; }
  .filters input, .filters select, .filters button { min-height: 41px; font-size: 12px; }
  .profile-nav { margin: 18px 0; column-gap: 2px; row-gap: 0; }
  .profile-nav a { font-size: 11px; padding: 9px 10px; }
  .ranking-copy h2 { font-size: 15px; }
  .ranking-metric { font-size: 12px; }
  .detail-heading h1 { font-size: 23px; }
  .modal { padding: 26px 22px; }
  .mobile-bottom {
    height: 60px;
    border-color: #ffffff13;
    background: linear-gradient(180deg, #1a1816f5, #11100ffa);
    padding: 8px 4px 7px;
    box-shadow: 0 5px 25px #0005;
  }
  .mobile-bottom a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #9f9789; font-size: 10px; line-height: 1.2; }
  .mobile-bottom a .nav-icon { width: 22px; height: 22px; margin: 0; display: flex; align-items: center; justify-content: center; }
  .mobile-bottom a .nav-icon .ui-icon { width: 21px; height: 21px; stroke-width: 1.6; }
  .mobile-bottom a .nav-label { margin: 0; font-size: 10px; line-height: 1.2; display: block; }
  .mobile-bottom a.active { color: #e6c384; }
  .footer { font-size: 10px; }
}

@media (max-width: 350px) {
  .topbar { padding-left: 12px; padding-right: 12px; }
  .hero-content { left: 17px; bottom: 24px; }
  .hero h1 { font-size: 25px; }
  .home-resume.is-guest { justify-content: flex-start; }
  .section-head { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .ui-icon, .card img { transition: none; }
}

/* Confirmed blend: 51ebc chrome and hero, Huangguo's quieter content surfaces. */
.page, .topbar { max-width: 1440px; }
.grid { row-gap: 23px; column-gap: 16px; }
.grid .poster { aspect-ratio: 3/4; border: 0; border-radius: 11px; }
.grid .card-copy { padding: 9px 1px 0; border: 0; border-radius: 0; background: transparent; gap: 3px; }
.grid .card h3 { font-size: 13px; line-height: 1.55; font-weight: 550; }
.grid .card p { font-size: 11px; color: #9f988d; }
.grid .card .release-meta { color: #79746b; font-size: 10px; }
.grid .score { padding: 2px 5px; border-radius: 4px; background: #08080986; }
.grid--home { grid-template-columns: repeat(8, minmax(0,1fr)); }
.grid--channel { grid-template-columns: repeat(7, minmax(0,1fr)); }
.grid--manga { grid-template-columns: repeat(6, minmax(0,1fr)); }
.home-manga { margin-top: 30px; }
.home-resume.is-guest { border: 0; border-bottom: 1px solid #ffffff0d; border-radius: 0; background: transparent; padding: 9px 2px 12px; }
.channel-tabs { margin: 22px 0 20px; padding: 0; column-gap: 24px; border-bottom: 1px solid #ffffff13; }
.channel-tabs .button { position: relative; padding: 9px 1px 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; font-size: 14px; font-weight: 500; box-shadow: none; }
.channel-tabs .button:hover { color: #eee4d1; background: transparent; }
.channel-tabs .button.primary { color: var(--brand); border-bottom-color: var(--brand); background: transparent; box-shadow: none; }
.filters { grid-template-columns: minmax(180px,1.4fr) repeat(3,minmax(100px,1fr)) auto; padding: 16px 0; border-bottom: 1px solid #ffffff0e; }
.ranking-row { grid-template-columns: 32px 84px minmax(0,1fr) 150px; padding: 20px 4px; gap: 20px; margin: 0; border: 0; border-bottom: 1px solid #ffffff13; border-radius: 0; background: transparent; }
.ranking-top { background: linear-gradient(90deg,#c4a16a06,transparent 45%); border-bottom-color: #c4a16a27; }
.ranking-row > a { position: relative; display: block; overflow: hidden; width: 84px; height: 112px; border-radius: 8px; }
.ranking-row .ranking-cover { position: absolute; top: -17%; left: 0; width: 100%; height: 190%; object-fit: cover; object-position: center top; border-radius: 0; }
.ranking-copy h2 { font-size: 18px; font-weight: 550; }
.ranking-copy p { margin: 7px 0; line-height: 1.75; }
.ranking-metric { text-align: right; font-weight: 500; }
.ranking-row .rank-num { color: #8a8275; font-size: 24px; font-weight: 500; }
.ranking-top .rank-num { color: var(--brand); }
.ranking-metric .button { border-color: #ffffff21; background: transparent; }

@media (min-width:1280px) {
  :root { --gutter: clamp(48px,5.5vw,96px); }
}
@media (min-width:900px) and (max-width:1279px) {
  .grid--home, .grid--channel, .grid--manga { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .grid { column-gap: 13px; row-gap: 21px; }
  .ranking-row { gap: 16px; }
}
@media (min-width:600px) and (max-width:899px) {
  .grid--home, .grid--channel { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .grid--manga { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width:899px) {
  .filters { grid-template-columns: 1fr 1fr; padding: 12px 0; gap: 10px; }
  .channel-tabs { margin: 17px 0 16px; column-gap: 23px; }
  .channel-tabs .button { font-size: 13px; padding-bottom: 10px; }
  .grid { column-gap: 10px; row-gap: 18px; }
  .grid .poster { border-radius: 9px; }
  .grid .card-copy { padding-top: 8px; gap: 2px; }
  .grid .card h3 { font-size: 12px; }
  .grid .card p { font-size: 10px; }
  .grid .card .release-meta { font-size: 9px; }
  .home-manga { margin-top: 26px; }
  .ranking-row { grid-template-columns: 24px 64px minmax(0,1fr); gap: 11px; padding: 16px 0; }
  .ranking-row > a { width: 64px; height: 86px; }
  .ranking-copy h2 { font-size: 15px; }
  .ranking-metric { grid-column: 2/4; text-align: left; }
}
@media (max-width:599px) {
  .grid--home, .grid--channel, .grid--manga { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width:350px) {
  .grid--home, .grid--channel, .grid--manga { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters { grid-template-columns: 1fr; }
}

/* Detail pages introduce a story before entering the player. */
.detail-intro { display: flex; align-items: center; gap: 24px; margin-bottom: 26px; }
.detail-cover { width: clamp(120px, 18vw, 210px); aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; }
.detail-heading { min-width: 0; }
.detail-heading h1 { margin: 12px 0; }
.detail-page > aside { align-self: start; }
.video-start { margin: 14px 0; }
.video-start[hidden] { display: none; }
form[data-form="filters"] { grid-template-columns: minmax(150px,1.4fr) repeat(4,minmax(90px,1fr)) auto; }
@media (max-width:900px) {
  form[data-form="filters"] { grid-template-columns: 1fr 1fr; }
}
@media (max-width:599px) {
  .detail-intro { align-items: flex-start; gap: 16px; }
  .detail-cover { width: 104px; }
  .detail-heading h1 { font-size: 23px; }
  .detail-heading .actions { padding-top: 12px; }
}
@media (max-width:350px) {
  form[data-form="filters"] { grid-template-columns: 1fr; }
}

/* Huangguo homepage order: hero, announcement strip, popular tags, content. */
.home-announcements { display:flex; align-items:center; gap:14px; min-width:0; margin:20px 0 22px; padding:9px 12px; border:1px solid #dfc28f26; border-radius:9px; background:#dfc28f08; }
.announcement-label { display:flex; align-items:center; gap:7px; flex-shrink:0; padding-right:14px; border-right:1px solid #dfc28f30; color:var(--brand); font-size:13px; font-weight:650; }
.announcement-label .ui-icon { width:18px; height:18px; }
.announcement-window { min-width:0; flex:1; overflow:hidden; }
.announcement-track { display:flex; width:max-content; animation:home-announcement-scroll 42s linear infinite; }
.announcement-items { display:flex; flex-shrink:0; gap:26px; padding-right:26px; }
.announcement-item { display:inline-flex; align-items:center; gap:12px; white-space:nowrap; color:#b8b0a3; font-size:12px; }
.announcement-item a { display:inline-flex; align-items:center; gap:4px; color:var(--brand); }
.announcement-item a:hover { color:#fff0cd; }
.announcement-item .ui-icon { width:12px; height:12px; }
.announcement-separator { font-size:7px; color:#8c7756; }
.announcement-toggle { flex-shrink:0; gap:4px; border:0; padding:5px 6px; border-radius:5px; background:transparent; color:#a89d89; font-size:11px; }
.announcement-toggle .ui-icon { width:13px; height:13px; }
.home-announcements[data-paused="true"] .announcement-track,
.home-announcements:has(a:focus-visible) .announcement-track,
.home-announcements:has(button:focus-visible) .announcement-track { animation-play-state:paused; }
.home-announcements:has(a:focus-visible) .announcement-window { overflow-x:auto; }
.home-announcements:has(a:focus-visible) .announcement-track { animation:none; transform:none; }
.home-announcements:has(a:focus-visible) .announcement-items[aria-hidden="true"] { display:none; }
@media (hover:hover) { .home-announcements:hover .announcement-track { animation-play-state:paused; } }
@keyframes home-announcement-scroll { from { transform:translateX(0); } to { transform:translateX(-50%); } }
.home-popular-tags { margin:0 0 24px; }
.popular-tags-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:13px; }
.popular-tags-heading h2 { margin:0; font-size:19px; font-weight:650; }
.popular-tags-heading > a { display:inline-flex; align-items:center; gap:5px; font-size:11px; color:var(--muted); }
.popular-tag-list { display:flex; flex-wrap:wrap; gap:10px; }
.popular-tag-list a { padding:7px 20px; border:1px solid #ffffff12; border-radius:7px; background:#141313; color:#c6bfb1; font-size:13px; line-height:1.5; }
.popular-tag-list a:hover { color:var(--brand); border-color:#dfc28f66; background:#dfc28f0d; }
@media (max-width:599px) {
 .home-announcements { gap:8px; margin:14px 0 18px; padding:8px; }
 .announcement-label { gap:4px; padding-right:8px; font-size:12px; }
 .announcement-label .ui-icon { width:16px; height:16px; }
 .announcement-item { font-size:12px; }
 .announcement-toggle { padding:5px 2px; }
 .home-popular-tags { margin-bottom:18px; }
 .popular-tags-heading { margin-bottom:10px; }
 .popular-tags-heading h2 { font-size:17px; }
 .popular-tag-list { gap:8px; }
 .popular-tag-list a { flex:0 0 calc((100% - 24px)/4); padding:7px 4px; text-align:center; font-size:12px; }
}
@media (prefers-reduced-motion:reduce) {
 .announcement-track { animation:none; transform:none; }
 .announcement-window { overflow-x:auto; }
 .announcement-items[aria-hidden="true"], .announcement-toggle { display:none; }
}

/* Star community: author-led journal cards and a readable article column. */
.community-blog-header { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:8px 0 26px; }
.community-blog-header h1 { margin:8px 0 9px; font-size:34px; }
.community-blog-header p { margin:0; color:var(--muted); font-size:14px; }
.community-toolbar { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:0 0 16px; border-bottom:1px solid var(--line); }
.community-categories { display:flex; align-items:center; gap:26px; flex-wrap:wrap; }
.community-categories a { padding:11px 1px; color:#a9a294; border-bottom:2px solid transparent; font-weight:550; font-size:15px; }
.community-categories a.selected { color:var(--brand); border-color:var(--brand); }
.community-article-search { display:flex; gap:8px; width:min(360px,40%); }
.community-article-search input { padding:9px 12px; font-size:12px; }
.community-article-search button { white-space:nowrap; }
.community-result-count { margin:18px 0; color:#847e73; font-size:12px; }
.community-blog-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.community-article-card { min-width:0; border:1px solid #ffffff13; border-radius:13px; overflow:hidden; background:#111013; transition:border-color .18s ease,background .18s ease; }
.community-article-card:hover { border-color:#dfc28f50; background:#151315; }
.community-card-link { display:block; height:100%; }
.community-card-image { position:relative; height:166px; overflow:hidden; background:#18171a; }
.community-card-image img { width:100%; height:100%; object-fit:cover; object-position:center 41%; opacity:.8; }
.community-card-image::after { content:""; position:absolute; inset:0; background:linear-gradient(0deg,#11101382,transparent 70%); }
.community-card-image > span { position:absolute; z-index:1; bottom:12px; left:22px; background:#080808b0; color:#e6d5b2; padding:3px 9px; border:1px solid #dfc28f32; border-radius:5px; font-size:11px; }
.community-card-copy { padding:22px; }
.community-byline { display:flex; align-items:center; gap:9px; flex-wrap:wrap; color:#928c82; font-size:11px; line-height:1.6; }
.community-byline .avatar { width:25px; height:25px; font-size:11px; border:1px solid #dfc28f20; }
.community-card-copy h2 { margin:15px 0 12px; font-size:20px; line-height:1.6; letter-spacing:0; font-weight:600; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
.community-card-copy > p { margin:0 0 24px; color:#a39d92; font-size:13px; line-height:1.9; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.community-card-meta { display:flex; align-items:center; justify-content:space-between; gap:14px; font-size:11px; color:#7f796f; }
.community-card-meta span { display:inline-flex; align-items:center; gap:5px; }
.community-card-meta span:last-child { color:#c8b183; }
.community-pagination { display:flex; justify-content:center; align-items:center; gap:8px; flex-wrap:wrap; margin-top:32px; }
.community-pagination .button, .community-pagination button { min-width:35px; }
.community-page-jump { display:flex; justify-content:center; align-items:center; gap:10px; margin:18px 0 36px; }
.community-page-jump label { display:flex; gap:8px; align-items:center; margin:0; font-size:12px; color:var(--muted); }
.community-page-jump input[type=number] { width:65px; padding:6px 8px; }
.community-faq { border-top:1px solid var(--line); padding-top:27px; margin-top:30px; }
.community-faq h2 { font-size:19px; margin-bottom:20px; }
.community-faq details { border-bottom:1px solid var(--line); padding:15px 0; color:#bdb5a7; font-size:13px; }
.community-faq summary { cursor:pointer; color:#d9d0bd; }
.community-faq p { margin:13px 0 0; max-width:850px; line-height:1.9; }
.community-active-filters { margin-bottom:0; }
.community-reading { max-width:1040px; margin-inline:auto; }
.community-breadcrumb { display:flex; gap:11px; align-items:center; margin:0 0 28px; color:#8e877b; font-size:12px; }
.community-article { max-width:840px; margin-inline:auto; }
.community-article h1 { margin:19px 0; font-size:34px; line-height:1.5; letter-spacing:0; }
.community-category-badge { display:inline-block; border:1px solid #dfc28f3a; color:var(--brand); background:#dfc28f0a; padding:4px 10px; border-radius:5px; font-size:12px; }
.community-article-lead { border-left:2px solid #c4a16a66; margin:28px 0 36px; padding:6px 0 6px 20px; font-size:16px; color:#c4bbac; line-height:1.95; }
.community-article-body h2 { margin:34px 0 15px; font-size:23px; line-height:1.6; }
.community-article-body p { margin:0 0 18px; font-size:15px; line-height:2.15; color:#b6b0a5; }
.community-article .filter-list { margin:34px 0; }
.community-related-work { display:flex; align-items:center; gap:22px; padding:22px; border:1px solid #dfc28f27; background:#151310; border-radius:11px; max-width:840px; margin:30px auto; }
.community-related-work > img { width:87px; height:116px; object-fit:cover; border-radius:7px; flex-shrink:0; }
.community-related-work h2 { margin:7px 0; font-size:22px; }
.community-related-work p { margin:0 0 12px; font-size:12px; }
.community-reading-actions { display:flex; gap:10px; flex-wrap:wrap; max-width:840px; margin:24px auto; }
.community-article-neighbors { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:25px; max-width:840px; margin:30px auto 44px; border-top:1px solid var(--line); padding-top:24px; }
.community-article-neighbors a:last-child { text-align:right; }
.community-article-neighbors small { display:block; color:#847d70; margin-bottom:10px; }
.community-article-neighbors strong { display:block; font-size:14px; line-height:1.8; color:#c9c0ae; }
.community-related-articles { border-top:1px solid var(--line); padding-top:28px; margin-top:36px; }
.community-related-articles > h2 { font-size:21px; margin-bottom:22px; }
.community-related-articles .community-card-image { height:130px; }
@media (max-width:899px) {
 .community-blog-header { gap:16px; align-items:flex-start; flex-direction:column; margin-bottom:20px; }
 .community-toolbar { align-items:stretch; flex-direction:column; gap:13px; }
 .community-categories { gap:24px; }
 .community-article-search { width:100%; max-width:480px; }
 .community-blog-grid { gap:17px; }
 .community-card-copy { padding:17px; }
 .community-card-copy h2 { font-size:18px; }
 .community-card-image { height:142px; }
 .community-reading { width:100%; }
 .community-article h1 { font-size:28px; }
}
@media (max-width:599px) {
 .community-blog-header h1 { font-size:28px; }
 .community-blog-header p { font-size:12px; }
 .community-blog-grid { grid-template-columns:minmax(0,1fr); }
 .community-categories a { font-size:14px; }
 .community-card-image { height:150px; }
 .community-card-copy h2 { margin:13px 0 10px; font-size:19px; }
 .community-card-copy > p { font-size:12px; margin-bottom:19px; }
 .community-article h1 { font-size:26px; margin:16px 0; }
 .community-article-lead { font-size:14px; padding-left:14px; margin:23px 0 29px; }
 .community-article-body h2 { font-size:21px; }
 .community-article-body p { font-size:14px; line-height:2.05; }
 .community-related-work { gap:15px; padding:15px; }
 .community-related-work > img { width:70px; height:94px; }
 .community-related-work h2 { font-size:19px; }
 .community-article-neighbors { gap:17px; }
 .community-article-neighbors strong { font-size:12px; }
}
@media (prefers-reduced-motion:reduce) { .community-article-card { transition:none; } }
/* Continuous viewing keeps a long catalog inside the player column. */
.episode-navigation { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 16px; padding:12px; border:1px solid var(--line); border-radius:10px; }
.episode-position { text-align:center; font-size:14px; }
.episode-position .muted { display:block; margin-top:4px; font-size:11px; }
.episode-navigation button:disabled { opacity:.4; cursor:default; }
.episode-grid-bounded { max-height:320px; overflow-y:auto; overscroll-behavior:contain; padding:3px; }
.episode-jump { display:flex; align-items:center; gap:12px; margin:0 0 14px; font-size:13px; }
.episode-jump select { flex:1; min-width:0; }
@media(max-width:600px) { .episode-navigation { gap:6px; padding:10px 6px; } .episode-navigation .small { padding:8px; } .episode-grid-bounded { max-height:250px; } }

/* Discovery dimensions and the fixed homepage topic entry. */
.channel-filter-panel{position:relative;margin:0 0 30px;padding:0;border:1px solid #51452f;border-radius:16px;background:#10100f;color:#d4cfc5}
.channel-filter-panel>summary{position:absolute;right:20px;top:20px;z-index:1;list-style:none;cursor:pointer;padding:9px 14px;border:1px solid #34322f;border-radius:10px;background:#191918;font-size:12px;color:#bcb4a5}
.channel-filter-panel>summary::-webkit-details-marker{display:none}.channel-filter-panel>summary span{display:flex;align-items:center;gap:8px}.channel-filter-panel[open]>summary .filter-collapsed,.channel-filter-panel:not([open])>summary .filter-expanded{display:none}.channel-filter-panel[open]>summary .ui-icon{transform:rotate(180deg)}
.channel-filter-panel:not([open]){min-height:80px}.channel-filter-panel:not([open]):before{content:'分类与状态';display:block;padding:28px;color:var(--gold);font-size:15px;font-weight:600}
.channel-filter-row{display:grid;grid-template-columns:60px minmax(0,1fr);gap:18px;align-items:start;padding:22px 26px}.channel-filter-row:first-child{padding-right:160px}.channel-filter-row+.channel-filter-row{border-top:1px solid #24231f}.channel-filter-row>strong{padding:11px 0;color:var(--gold);font-size:15px}
.channel-filter-options{display:flex;flex-wrap:wrap;gap:9px 11px;min-width:0}.channel-filter-chip{display:inline-flex;align-items:center;justify-content:center;min-width:86px;min-height:42px;padding:9px 22px;border:1px solid #292824;border-radius:10px;background:#141413;color:#d2cec6;font-size:14px;line-height:1.5;transition:background .15s,border-color .15s}.channel-filter-chip:hover{border-color:#857046;color:#ead7aa}.channel-filter-chip.selected{border-color:#c6ab70;background:linear-gradient(135deg,#c9ae77,#b49967);box-shadow:inset 0 1px 0 #f1dfad66;color:#211c12;font-weight:650}.channel-filter-chip:focus-visible,.channel-filter-panel>summary:focus-visible{outline:2px solid #ead7aa;outline-offset:3px}
@media(max-width:700px){.channel-filter-panel{margin-bottom:22px;border-radius:12px}.channel-filter-panel>summary{top:13px;right:13px;padding:7px 10px}.channel-filter-row{grid-template-columns:1fr;gap:10px;padding:17px}.channel-filter-row:first-child{padding-right:17px;padding-top:20px}.channel-filter-row>strong{padding:0 120px 0 0;font-size:14px;min-height:30px}.channel-filter-row+.channel-filter-row>strong{padding:0;min-height:0}.channel-filter-options{gap:8px}.channel-filter-chip{min-width:65px;min-height:38px;padding:8px 14px;font-size:13px}.channel-filter-panel:not([open]):before{padding:25px 17px}}
.type-badge{display:inline-flex;align-items:center;border:1px solid #78603a;border-radius:5px;padding:2px 7px;font-size:11px;line-height:1.4;color:#edce94;background:#312719;font-weight:500}
.home-topic-feature{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:22px 0;padding:22px 26px;border:1px solid #665334;border-radius:12px;background:linear-gradient(110deg,#292318,#171716)}
.home-topic-feature h2{margin:7px 0;font-size:22px}.home-topic-feature p{margin:0;color:#aaa294;font-size:13px}
.work-metadata{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}.work-metadata div{display:grid;gap:5px}.work-metadata dt{color:#a99f8d;font-size:12px}.work-metadata dd{margin:0;font-size:13px}
@media(max-width:600px){.home-topic-feature{padding:18px;align-items:flex-start;flex-direction:column}.work-metadata{grid-template-columns:1fr}.channel-tabs{display:flex;flex-wrap:wrap;gap:7px}.channel-tabs .button{padding:9px 12px}}
