/* 艾瑞德动漫 — 设计系统 v3（B站风格）
   品牌粉 #FB7299 · 卡片化 · 圆角 · 柔和阴影 · 移动端底部导航 */
:root {
  --background: #f4f5f7; --surface: #fff; --text: #18191c; --muted: #9499a0;
  --line: #eef0f3; --soft: #f6f7f8;
  --accent: #fb7299; --accent-deep: #e84c7a; --accent-soft: #fff0f5;
  --blue: #00aeec; --teal: #178c85;
  --r-s: 6px; --r-m: 10px; --r-l: 14px;
  --shadow-card: 0 2px 12px rgba(24,25,28,.05);
  --shadow-hover: 0 8px 24px rgba(24,25,28,.12);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text); background: var(--background); font-synthesis: none; letter-spacing: 0;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
button, input, select { font: inherit; letter-spacing: 0; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, input, select { border: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; background: none; }
button:disabled { cursor: default; opacity: .6; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
img { display: block; width: 100%; }
h1, h2, h3, p { margin: 0; }
svg { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.8; }
.page-width { width: min(1440px, calc(100% - 64px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- 头部 ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 64px; display: flex; align-items: center; gap: 36px; }
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark { background: linear-gradient(135deg, var(--accent), #ff9db8); color: #fff; width: 36px; height: 36px; display: grid; place-items: center; font-size: 28px; line-height: 1; border-radius: 9px; font-weight: 750; box-shadow: 0 3px 10px rgba(251,114,153,.35); }
.brand strong { font-size: 22px; font-weight: 750; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav button { position: relative; padding: 8px 16px; font-size: 15px; white-space: nowrap; border-radius: 999px; color: #535861; transition: background .15s, color .15s; }
.main-nav button:hover { background: var(--soft); color: var(--text); }
.main-nav button.active { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.search-box { margin-left: auto; display: flex; align-items: center; gap: 8px; width: 250px; min-width: 160px; height: 38px; padding: 0 14px; background: var(--soft); border: 1px solid transparent; border-radius: 999px; color: #738091; transition: background .15s, border-color .15s, box-shadow .15s; }
.search-box:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(251,114,153,.14); }
.search-box input { min-width: 0; width: 100%; background: transparent; outline: none; color: var(--text); font-size: 13px; }
.search-box input::placeholder { color: #9299a4; }
.library-button { display: flex; align-items: center; gap: 7px; padding: 8px 16px; white-space: nowrap; font-size: 14px; border-radius: 999px; color: #535861; transition: background .15s, color .15s; }
.library-button:hover { background: var(--soft); }
.library-button small { color: var(--accent); font-size: 12px; font-weight: 600; }
.library-button.active { color: var(--accent); background: var(--accent-soft); }

/* ---------- 筛选栏 ---------- */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 16px; }
.category-nav { display: flex; gap: 8px; overflow-x: auto; min-width: 0; scrollbar-width: none; padding: 2px 0; }
.category-nav::-webkit-scrollbar { display: none; }
.category-nav button { white-space: nowrap; padding: 6px 16px; font-size: 13px; border-radius: 999px; background: #fff; color: #535861; box-shadow: var(--shadow-card); transition: all .15s; }
.category-nav button:hover { color: var(--accent); }
.category-nav button.active { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(251,114,153,.35); }
.filter-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.filter-controls select { color: #596372; font-size: 12px; background: #fff; padding: 7px 10px; border-radius: 8px; cursor: pointer; box-shadow: var(--shadow-card); }
.load-notice { padding: 12px 0; color: var(--muted); }
.load-notice.error { display: flex; align-items: center; gap: 16px; color: var(--accent); }

/* ---------- 布局 ---------- */
.catalog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.main-content { min-width: 0; }

/* ---------- 轮播焦点图 ---------- */
.featured { height: 320px; position: relative; border-radius: var(--r-l); overflow: hidden; isolation: isolate; background: #2b3138; box-shadow: var(--shadow-card); }
.featured-media { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: 50% 30%; z-index: -2; transition: transform 6s linear; }
.featured:hover .featured-media { transform: scale(1.04); }
.featured::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,20,26,.86), rgba(14,20,26,.32) 58%, transparent 82%), linear-gradient(rgba(14,20,26,0) 62%, rgba(14,20,26,.5)); z-index: -1; }
.featured-copy { padding: 40px 40px 0; color: #fff; max-width: 62%; }
.featured h1 { font-size: 38px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.featured-copy p { margin-top: 10px; font-size: 13px; color: #e6e9ee; }
.featured-score { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 3px 10px; background: rgba(251,114,153,.92); border-radius: 999px; font-size: 13px; font-weight: 700; }
.featured-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.primary-button, .outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 10px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.3; transition: all .18s; }
.primary-button { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(251,114,153,.4); }
.primary-button:hover { background: var(--accent-deep); transform: translateY(-1px); }
.outline-button { border: 1px solid #d8dde3; background: #fff; color: #525b68; }
.outline-button:hover { border-color: var(--accent); color: var(--accent); }
.featured .outline-button { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.08); color: #fff; backdrop-filter: blur(4px); }
.featured .outline-button:hover { background: rgba(255,255,255,.18); border-color: #fff; color: #fff; }
.featured-tabs { position: absolute; bottom: 14px; left: 40px; right: 30px; display: flex; gap: 10px; color: #dfe4ea; overflow: hidden; }
.featured-tabs button { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(20,24,28,.4); backdrop-filter: blur(6px); white-space: nowrap; max-width: 220px; transition: background .15s; }
.featured-tabs button:hover { background: rgba(20,24,28,.62); }
.featured-tabs button.active { background: rgba(251,114,153,.92); color: #fff; font-weight: 600; }
.featured-tabs button .tab-cover { width: 30px; height: 40px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.featured-tabs button span.tab-txt { overflow: hidden; text-overflow: ellipsis; }

/* ---------- 区块标题 ---------- */
.catalog-section { margin-top: 26px; }
.section-heading { min-height: 30px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-heading h2 { font-size: 20px; font-weight: 750; line-height: 1.35; display: flex; align-items: center; gap: 9px; }
.section-heading h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(var(--accent), #ffb3c7); }
.heading-group { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.heading-group > span, .section-note { font-size: 12px; color: var(--muted); font-weight: 400; }
.text-button { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 12px; padding: 3px 0; white-space: nowrap; }
.text-button:hover { color: var(--accent); }
.text-button svg { width: 15px; height: 15px; }

/* ---------- 番剧卡片 ---------- */
.anime-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px 14px; }
.anime-card { min-width: 0; }
.poster-button { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; overflow: hidden; border-radius: var(--r-m); background: #e9edf1; box-shadow: var(--shadow-card); transition: transform .22s ease, box-shadow .22s ease; }
.poster-button img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.poster-button:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.poster-button:hover img { transform: scale(1.05); }
.poster-button::after { content: ""; position: absolute; inset: auto 0 0; height: 34%; background: linear-gradient(transparent, rgba(0,0,0,.6)); pointer-events: none; }
.poster-play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 1; }
.poster-play::before { content: ""; width: 46px; height: 46px; border-radius: 50%; background: rgba(251,114,153,.94); box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.poster-play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-42%, -50%); border: 8px solid transparent; border-left: 13px solid #fff; }
.poster-button:hover .poster-play { opacity: 1; }
.cover-unavailable { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; font-size: 12px; color: #697586; }
.episode-label { position: absolute; z-index: 1; right: 7px; bottom: 7px; padding: 2px 8px; background: rgba(0,0,0,.58); backdrop-filter: blur(3px); color: #fff; font-size: 11px; border-radius: 999px; max-width: calc(100% - 14px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.saved-indicator { position: absolute; z-index: 1; top: 7px; right: 7px; display: grid; place-items: center; width: 26px; height: 26px; background: var(--accent); color: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(251,114,153,.5); }
.saved-indicator svg { width: 14px; height: 14px; }
.anime-title { display: block; text-align: left; font-size: 14px; font-weight: 550; line-height: 1.45; max-width: 100%; padding: 8px 2px 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anime-title:hover { color: var(--accent); }
.anime-meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 24px; }
.load-more-wrap button { padding: 10px 28px; background: #fff; color: #6e7784; border-radius: 999px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow-card); transition: all .15s; }
.load-more-wrap button:hover { color: var(--accent); box-shadow: var(--shadow-hover); }

/* ---------- 开放动画 ---------- */
.open-section { margin-top: 30px; }
.open-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.open-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16/9; padding: 0; border-radius: var(--r-m); overflow: hidden; background: var(--soft); box-shadow: var(--shadow-card); transition: transform .22s, box-shadow .22s; }
.open-thumb img { height: 100%; object-fit: cover; }
.open-thumb:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.open-card button.anime-title { font-size: 13px; }

/* ---------- 侧栏卡片 ---------- */
.sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; position: sticky; top: 84px; }
.sidebar > section { background: #fff; border-radius: var(--r-l); padding: 18px; box-shadow: var(--shadow-card); }
.sidebar .section-heading { margin-bottom: 10px; }
.sidebar .section-heading h2 { font-size: 17px; }
.week-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-top: 8px; }
.week-tabs button { font-size: 11px; color: #78818e; padding: 7px 0; white-space: nowrap; border-radius: 8px; transition: all .15s; }
.week-tabs button:hover { background: var(--soft); }
.week-tabs button.active { color: #fff; background: var(--accent); font-weight: 600; }
.schedule-date { color: #9ba2ac; font-size: 10px; margin: 8px 0 0; min-height: 15px; }
.schedule-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 6px; border-radius: 8px; font-size: 13px; text-align: left; transition: background .15s; }
.schedule-row:hover { background: var(--soft); }
.schedule-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-row time { color: #78818e; font-size: 11px; flex-shrink: 0; }
.schedule-row:hover span { color: var(--accent); }
.hot-list { margin: 0; padding: 0; list-style: none; }
.hot-list li + li { border-top: 1px solid var(--line); }
.rank-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 4px; text-align: left; min-width: 0; border-radius: 8px; transition: background .15s; }
.rank-button:hover { background: var(--soft); }
.rank-number { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: #eef0f3; color: #8b93a0; font-size: 12px; font-weight: 800; font-style: italic; flex: 0 0 auto; }
.hot-list li:nth-child(1) .rank-number { background: linear-gradient(135deg, #ff5c79, var(--accent)); color: #fff; }
.hot-list li:nth-child(2) .rank-number { background: linear-gradient(135deg, #ff8a3d, #ffa940); color: #fff; }
.hot-list li:nth-child(3) .rank-number { background: linear-gradient(135deg, #ffb64d, #ffd666); color: #fff; }
.rank-cover { height: 46px; width: 35px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.rank-name { font-size: 13px; min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.rank-score { margin-left: auto; color: var(--accent); font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.history-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 6px; text-align: left; font-size: 12px; border-radius: 8px; transition: background .15s; }
.history-row:hover { background: var(--soft); }
.history-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-row small { color: var(--muted); flex-shrink: 0; }
.empty-state { padding: 36px 16px; text-align: center; color: var(--muted); grid-column: 1/-1; }
.empty-state svg { width: 28px; height: 28px; margin: 0 auto 9px; display: block; }
.empty-state p { font-size: 13px; }
.sidebar .empty-state { padding: 16px 0; text-align: left; }
.empty-state .text-button { margin-top: 10px; color: var(--accent); }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 40px; padding: 24px 26px; background: #fff; border-radius: var(--r-l) var(--r-l) 0 0; color: var(--muted); font-size: 11px; box-shadow: var(--shadow-card); }
.site-footer > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.site-footer strong { color: #616b78; font-size: 13px; }
.site-footer p { margin-top: 8px; }
.footer-links { display: flex; align-items: center; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.footer-links a:hover, .footer-links button:hover { color: var(--accent); }

/* ---------- 弹窗 ---------- */
dialog { padding: 0; border: 0; color: var(--text); background: #fff; border-radius: var(--r-l); box-shadow: 0 24px 80px rgba(15,20,27,.35); }
dialog::backdrop { background: rgba(15,20,27,.66); backdrop-filter: blur(3px); }
.watch-dialog { width: min(1120px, calc(100% - 32px)); max-height: calc(100svh - 48px); overflow: auto; }
.dialog-heading { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); z-index: 2; border-radius: var(--r-l) var(--r-l) 0 0; }
.dialog-heading h2 { font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; }
.dialog-heading > div > span { font-size: 11px; color: var(--muted); }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; color: #738091; transition: background .15s; }
.icon-button:hover { background: var(--soft); color: var(--text); }
.watch-dialog-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.watch-primary { min-width: 0; }
.player-shell { aspect-ratio: 16/9; position: relative; background: #15191e; color: #fff; overflow: hidden; display: grid; place-items: center; }
.player-shell > video, .player-shell > iframe { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; border: 0; }
.player-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.external-player { position: relative; text-align: center; padding: 20px; }
.external-player > svg { display: block; width: 40px; height: 40px; margin: 0 auto 12px; color: #fff; }
.external-player h3 { font-size: 19px; }
.external-player p { margin: 6px 0 18px; font-size: 12px; color: #c2c8d1; }
.playback-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: 11px; color: #838b98; }
.playback-bar label { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.playback-bar select { background: var(--soft); border-radius: 6px; color: #586474; padding: 4px; font-size: 11px; }
.watch-detail { min-width: 0; border-left: 1px solid var(--line); padding: 20px; }
.detail-actions { margin-bottom: 18px; }
.detail-actions button { width: 100%; font-size: 13px; }
.detail-actions button.saved { color: var(--accent); border-color: #ffb3c7; background: var(--accent-soft); }
.watch-detail h3 { font-size: 14px; margin-bottom: 10px; }
.source-choices { display: flex; flex-direction: column; gap: 8px; }
.source-choice { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; text-align: left; font-size: 12px; transition: all .15s; }
.source-choice:hover { border-color: #ffb3c7; }
.source-choice.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.source-choice span { min-width: 0; overflow-wrap: anywhere; }
.source-choice svg { width: 14px; height: 14px; }
.source-note { font-size: 11px; line-height: 1.7; color: #9198a3; margin-top: 10px; }
.player-info { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.8; color: #697582; }
.player-info .description { margin-top: 10px; max-height: 160px; overflow-y: auto; }
.credit { font-size: 11px; margin-top: 14px; }
.credit a { color: var(--teal); }
.episode-panel { padding: 16px 18px; }
.episode-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.episode-heading h3 { font-size: 14px; }
.episode-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.episode-link { border: 1px solid var(--line); border-radius: 8px; padding: 7px 2px; text-align: center; font-size: 11px; line-height: 1.4; color: #687382; transition: all .15s; }
.episode-link:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.episode-link small { display: block; font-size: 9px; color: #a2a8b1; }
.episode-note { color: var(--muted); font-size: 12px; }
.sources-dialog { width: min(520px, calc(100% - 32px)); max-height: 80svh; }
.source-status { padding: 16px 22px; }
.source-status-row { border-bottom: 1px solid var(--line); padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.source-status-row small { color: var(--teal); font-size: 11px; }
.source-status-row small.stale { color: #b27c2a; }
.sources-dialog p { color: var(--muted); font-size: 11px; margin-top: 14px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 11px 20px; background: rgba(36,43,51,.94); color: #fff; font-size: 13px; border-radius: 999px; z-index: 60; box-shadow: 0 8px 28px rgba(0,0,0,.25); backdrop-filter: blur(6px); }

/* ---------- 移动端底部导航 ---------- */
.bottom-nav { display: none; }

/* ---------- 响应式 ---------- */
@media (min-width: 1600px) { .page-width { width: min(1440px, calc(100% - 96px)); } }
@media (max-width: 1200px) {
  .header-inner { gap: 22px; } .main-nav button { padding: 8px 12px; } .search-box { width: 200px; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; }
  .anime-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 13px; }
  .library-button span { display: none; }
}
@media (max-width: 940px) {
  .page-width { width: calc(100% - 40px); }
  .header-inner { gap: 16px; } .main-nav button { font-size: 13px; padding: 7px 10px; }
  .search-box { width: 170px; min-width: 130px; }
  .catalog-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; }
  .anime-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 12px; }
  .featured { height: 260px; } .featured-copy { padding: 30px 28px 0; max-width: 82%; }
  .featured h1 { font-size: 30px; } .featured-tabs { left: 28px; }
  .sidebar { position: static; } .rank-cover { display: none; }
  .open-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .page-width { width: calc(100% - 24px); }
  .header-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 12px; padding: 10px 0 0; min-height: 0; }
  .brand strong { font-size: 19px; } .brand-mark { width: 30px; height: 30px; font-size: 23px; border-radius: 8px; }
  .brand { gap: 8px; } .library-button { grid-column: 2; grid-row: 1; align-self: center; } .library-button span { display: inline; font-size: 12px; }
  .main-nav { display: none; }
  .search-box { grid-column: 1/-1; grid-row: 2; width: 100%; height: 36px; margin: 10px 0 12px; }
  .filter-bar { margin: 12px 0 14px; flex-wrap: wrap; gap: 8px; }
  .category-nav { width: 100%; gap: 7px; } .category-nav button { font-size: 12px; padding: 5px 13px; }
  .filter-controls { justify-content: flex-end; width: 100%; }
  .catalog-layout { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .featured { height: 218px; border-radius: var(--r-m); } .featured-copy { padding: 24px 20px 0; max-width: 92%; }
  .featured h1 { font-size: 26px; } .featured-copy p { font-size: 11px; max-width: 90%; }
  .featured-score { font-size: 11px; padding: 2px 9px; }
  .featured-actions { gap: 8px; margin-top: 16px; } .featured-actions button { font-size: 12px; padding: 8px 14px; min-height: 36px; }
  .featured-tabs { gap: 8px; left: 14px; right: 12px; bottom: 10px; }
  .featured-tabs button { font-size: 11px; padding: 4px 10px 4px 4px; max-width: 130px; }
  .featured-tabs button .tab-cover { width: 22px; height: 28px; }
  .anime-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px 10px; }
  .anime-title { font-size: 13px; } .anime-meta { font-size: 11px; } .episode-label { font-size: 10px; }
  .section-heading h2 { font-size: 18px; } .heading-group { gap: 8px; } .heading-group > span { font-size: 11px; }
  .sidebar { gap: 12px; }
  .sidebar > section { padding: 14px; border-radius: var(--r-m); }
  .week-tabs button { font-size: 10px; padding: 6px 0; }
  .schedule-row { font-size: 12px; padding: 10px 4px; }
  .rank-button { padding: 8px 2px; gap: 8px; }
  .rank-number { width: 20px; height: 20px; font-size: 11px; } .rank-name { font-size: 12px; }
  .site-footer { margin-top: 26px; padding: 18px; border-radius: 0; }
  .site-footer > div:first-child { flex-wrap: wrap; }
  .watch-dialog { width: 100%; max-width: 100%; max-height: 100svh; height: 100svh; border-radius: 0; }
  .dialog-heading { border-radius: 0; padding: 13px 15px; } .dialog-heading h2 { font-size: 17px; }
  .watch-dialog-body { grid-template-columns: minmax(0,1fr); }
  .watch-detail { border-left: 0; border-top: 1px solid var(--line); padding: 15px; }
  .detail-actions { margin-bottom: 15px; } .detail-actions button { width: auto; }
  .source-choices { flex-direction: row; flex-wrap: wrap; gap: 7px; } .source-choice { min-height: 34px; font-size: 11px; padding: 7px 11px; }
  .player-info { margin-top: 14px; padding-top: 12px; } .player-info .description { max-height: none; }
  .episode-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .playback-bar { padding: 9px 12px; font-size: 10px; }
  .toast { bottom: 84px; }
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: rgba(255,255,255,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 11px; color: #7d848e; position: relative; }
  .bottom-nav button svg { width: 21px; height: 21px; }
  .bottom-nav button.active { color: var(--accent); }
  .bottom-nav button.active::before { content: ""; position: absolute; top: 0; width: 18px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
}
@media (max-width: 370px) {
  .brand strong { font-size: 17px; } .library-button span { font-size: 11px; }
  .anime-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .featured h1 { font-size: 23px; } .featured-tabs { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
