@charset "utf-8";

/* Warm Orange Portal Design System — 1200px Centered Big-Search 3-Tier Header + 4:3 Gallery */
:root {
  --brand: #f25c2a;
  --brand-hover: #d94819;
  --brand-soft: #fff1eb;
  --brand-soft-2: #ffd4c2;
  --bg-page: #f7f5f0;
  --bg-surface: #ffffff;
  --bg-subtle: #f2efe9;
  --ink-1: #1f1d1a;
  --ink-2: #59544e;
  --ink-3: #8f8982;
  --ink-inv: #ffffff;
  --border: #e8e2d9;
  --border-strong: #d6cdc0;
  --shadow-sm: 0 2px 10px rgba(31, 29, 26, .05);
  --shadow-brand: 0 8px 24px rgba(242, 92, 42, .16);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --content-max: 1200px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "SimSun", Georgia, serif;
  --reader-font: 19px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  font: 14px/1.6 var(--font-sans);
  background: var(--bg-page);
  color: var(--ink-1);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .15s, background .15s, border-color .15s, transform .15s; }
a:hover { color: var(--brand); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
img { display: block; max-width: 100%; object-fit: cover; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 200; background: var(--brand); color: var(--ink-inv); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }

.cms-icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; flex: none; display: inline-block; }
.cms-icon-img { object-fit: contain; border-radius: 3px; }

/* 1200px Centered Container */
.amber-wrap { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 16px; }

/* 3-Tier Classic Warm Portal Header */
.amber-top-head { background: var(--bg-surface); border-bottom: 1px solid var(--border); }
.amber-top-inner {
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.amber-brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 19px; font-weight: 900; color: var(--ink-1); white-space: nowrap; flex: none;
}
.amber-brand img { max-height: 34px; max-width: 148px; object-fit: contain; }
.amber-brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #ff8a4c);
  color: var(--ink-inv); display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; flex: none;
}

.amber-big-search {
  flex: 1; max-width: 580px; height: 42px;
  display: flex; align-items: center; padding: 3px 4px 3px 16px;
  border-radius: var(--radius-pill); border: 2px solid var(--brand); background: var(--bg-surface);
  transition: box-shadow .15s;
}
.amber-big-search:focus-within { box-shadow: 0 0 0 3px var(--brand-soft-2); }
.amber-big-search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 14px; outline: none; }
.amber-big-search button {
  height: 32px; padding: 0 18px; border: 0; border-radius: var(--radius-pill);
  background: var(--brand); color: var(--ink-inv); font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px; flex: none;
}
.amber-big-search button:hover { background: var(--brand-hover); }

.amber-mobile-actions { display: none; align-items: center; gap: 8px; flex: none; }
.amber-icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-subtle); color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.amber-icon-btn svg { width: 17px; height: 17px; }

/* Tier 2: Full-Width Vibrant Warm Orange Channel Strip */
.amber-nav-bar {
  position: sticky; top: 0; z-index: 40;
  background: var(--brand); box-shadow: 0 3px 12px rgba(242, 92, 42, .22);
}
.amber-nav-inner {
  height: 46px; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.amber-nav-inner::-webkit-scrollbar { display: none; }
.amber-nav-inner a {
  padding: 5px 15px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, .92); white-space: nowrap;
}
.amber-nav-inner a:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.amber-nav-inner a[data-current="是"] { background: #fff; color: var(--brand); }

/* Tier 3: Sub-Column Bar (sticky on PC & Mobile) */
.amber-subbar { position: sticky; top: 46px; z-index: 39; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.amber-subbar-inner {
  display: flex; align-items: center; gap: 6px; padding: 8px 16px;
  overflow-x: auto; scrollbar-width: none;
}
.amber-subbar-inner::-webkit-scrollbar { display: none; }
.amber-subbar a {
  padding: 4px 12px; border-radius: var(--radius-pill); font-size: 12.5px; color: var(--ink-2);
  background: var(--bg-subtle); border: 1px solid transparent; white-space: nowrap;
}
.amber-subbar a:hover { border-color: var(--brand-soft-2); color: var(--brand); background: var(--brand-soft); }
.amber-subbar a[data-current="是"] { background: var(--brand); color: var(--ink-inv); font-weight: 700; }

/* Main Stage */
.amber-main { padding-top: 16px; padding-bottom: 42px; min-height: 70vh; }

.amber-crumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px; font-size: 12.5px; color: var(--ink-3);
}
.amber-crumbs [aria-current="page"] { color: var(--ink-1); font-weight: 600; }

/* Notice Bar */
.amber-notice {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  padding: 9px 14px; border-radius: var(--radius-md);
  background: var(--brand-soft); border: 1px solid var(--brand-soft-2); font-size: 13px; color: var(--ink-2);
}
.amber-notice-badge {
  padding: 2px 8px; border-radius: 5px; background: var(--brand); color: var(--ink-inv);
  font-size: 11px; font-weight: 800; flex: none;
}
.amber-notice-links { display: flex; flex-wrap: wrap; gap: 12px; min-width: 0; }
.amber-notice-links a { color: var(--ink-1); font-weight: 600; }
.amber-notice-links a:hover { color: var(--brand); }

/* Unified APP Icon Ads */
.amber-app-ads {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px 8px; margin-bottom: 12px; padding: 12px;
  border-radius: var(--radius-md); background: var(--bg-surface); border: 1px solid var(--border);
}
.amber-app-ads[data-ad-tiered]:not([data-ad-ready]),
.amber-text-ads[data-ad-tiered]:not([data-ad-ready]),
.ad-banner-slot[data-ad-pc-limit]:not([data-ad-ready]),
.ad-float-bar:not([data-ad-ready]) { opacity: 0; }
.amber-app-item {
  position: relative; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 5px; min-width: 0;
}
.amber-app-icon {
  position: relative; width: 56px; height: 56px; border-radius: 14px;
  overflow: hidden; border: 1px solid var(--border); background: var(--bg-subtle); flex: none;
}
.amber-app-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.amber-app-item[data-ad-level="9"] .amber-app-icon::after {
  content: "荐"; position: absolute; right: 0; top: 0;
  padding: 1px 4px; font-size: 10px; font-weight: 800; line-height: 1.2;
  background: var(--brand); color: var(--ink-inv); border-radius: 0 0 0 6px;
}
.amber-app-item strong { font-size: 12px; font-weight: 600; line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amber-app-item small { font-size: 11px; color: var(--ink-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Unified Highlighted Text Ads */
.amber-text-ads { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin-bottom: 14px; }
.amber-text-ad {
  display: block; text-align: center; min-width: 0;
  padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 700; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px solid transparent;
}
.amber-text-ad:hover { transform: translateY(-1px); }
.amber-text-ad:nth-child(5n+1) { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.amber-text-ad:nth-child(5n+2) { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.amber-text-ad:nth-child(5n+3) { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.amber-text-ad:nth-child(5n+4) { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.amber-text-ad:nth-child(5n+5) { color: #7e22ce; background: #faf5ff; border-color: #e9d5ff; }

/* Unified Banner Ads (6.4:1 proportional; PC 3-col, Mobile 1-col) */
.ad-banner-slot {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.ad-banner-slot:has(> .ad-banner-item:only-child) {
  grid-template-columns: minmax(0, 760px); justify-content: center;
}
.ad-banner-slot:has(> .ad-banner-item:nth-child(2):last-child),
.ad-banner-slot:has(> .ad-banner-item:nth-child(4):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ad-banner-item {
  position: relative; display: block; width: 100%; aspect-ratio: 6.4 / 1;
  border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-surface);
}
.ad-banner-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-banner-item:hover { border-color: var(--brand); }
.ad-slot-ctrl {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  padding: 2px 8px; border: 0; border-radius: 999px;
  background: rgba(31, 29, 26, .74); color: #fff; font-size: 11px; line-height: 1.4;
}

/* Floating Banner Host: PC top-right 360px (fits right wing of 1200px stage), Mobile top(9)+bottom(8) */
.ad-float-host { display: contents; }
.ad-float-bar {
  position: fixed; z-index: 45;
  padding: 8px; border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(31, 29, 26, .18);
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
}
.ad-float-bar--pc-corner {
  top: 124px; right: 16px; left: auto; transform: none;
  width: 360px; max-width: calc(100vw - 32px); padding: 10px;
}
.ad-float-bar--pc-corner .ad-float-grid {
  display: flex; flex-direction: column; gap: 8px; width: 100%;
  max-height: calc(100vh - 156px); overflow-y: auto;
}
.ad-float-bar--top { top: 100px; left: 50%; transform: translateX(-50%); }
.ad-float-bar--bottom { bottom: 12px; left: 50%; transform: translateX(-50%); }
.ad-float-grid { display: grid; grid-template-columns: 1fr; gap: 6px; width: 100%; }
.ad-float-item { position: relative; width: 100%; }
.ad-float-bar .ad-banner-item { border-radius: var(--radius-sm); }
.ad-float-close {
  position: absolute; top: 4px; right: 4px; z-index: 4;
  min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px; background: rgba(31, 29, 26, .74); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.ad-float-close:disabled { opacity: .78; cursor: not-allowed; background: rgba(31, 29, 26, .54); }
.ad-float-close:not(:disabled):hover { background: var(--brand); }

/* Panels & Section Heads */
.amber-panel {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.amber-section { margin-bottom: 24px; }
.amber-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px;
}
.amber-section-head h1, .amber-section-head h2 {
  margin: 0; font-size: 18px; font-weight: 800; color: var(--ink-1);
  display: inline-flex; align-items: center; gap: 8px;
}
.amber-section-head h2::before {
  content: ""; width: 4px; height: 17px; border-radius: 2px; background: var(--brand); flex: none;
}
.amber-more { font-size: 13px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.amber-more:hover { color: var(--brand); }

/* Home Spotlight (Left 70% 2x2 4:3 Picks + Right 30% Today 10 Quick List) */
.amber-spot {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; margin-bottom: 22px; align-items: stretch;
}
.amber-spot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.amber-spot-card {
  display: grid; grid-template-columns: 152px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 10px; border-radius: var(--radius-md); background: var(--bg-surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); min-width: 0;
}
.amber-spot-card:hover { border-color: var(--brand); box-shadow: var(--shadow-brand); }
.amber-spot-cover {
  position: relative; width: 152px; aspect-ratio: 4 / 3; border-radius: 7px; overflow: hidden;
  background: var(--bg-subtle); flex: none;
}
.amber-spot-cover img { width: 100%; height: 100%; transition: transform .28s ease; }
.amber-spot-card:hover .amber-spot-cover img { transform: scale(1.04); }
.amber-spot-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.amber-spot-info h3 { margin: 0; font-size: 14.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amber-spot-meta { font-size: 11.5px; color: var(--brand); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amber-spot-desc {
  margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.amber-quick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.amber-quick-list li a {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center;
  padding: 5px 6px; border-radius: var(--radius-sm); font-size: 13px;
}
.amber-quick-list li a:hover { background: var(--brand-soft); color: var(--brand); }
.amber-quick-list b {
  width: 20px; height: 20px; border-radius: 5px; background: var(--bg-subtle); color: var(--ink-3);
  font-size: 11px; display: inline-flex; align-items: center; justify-content: center;
}
.amber-quick-list li:nth-child(1) b { background: var(--brand); color: #fff; }
.amber-quick-list li:nth-child(2) b { background: #fb923c; color: #fff; }
.amber-quick-list li:nth-child(3) b { background: #fdba74; color: #7c2d12; }
.amber-quick-list strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amber-quick-list small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

/* Two-Column Editorial Layout (Article) */
.amber-list-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.amber-list-main { min-width: 0; }
.amber-list-side { position: sticky; top: 58px; }

/* Filter Deck */
.amber-filter-deck {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px;
}
.amber-filter-row { display: flex; align-items: center; }
.amber-filter-label { display: none; }
.amber-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.amber-chip {
  padding: 4px 11px; border-radius: var(--radius-pill); font-size: 12.5px;
  color: var(--ink-2); background: var(--bg-subtle); border: 1px solid transparent; white-space: nowrap;
}
.amber-chip:hover { color: var(--brand); border-color: var(--brand-soft-2); background: var(--brand-soft); }
.amber-chip[data-current="是"] { background: var(--brand); color: var(--ink-inv); font-weight: 700; }
.amber-chip[data-direction="倒序"]::after { content: " ↓"; }
.amber-filter-more { display: none; }

/* Detail Header Card (Desktop 2-col -> Mobile 3-Band) */
.amber-detail-head {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.amber-detail-cover {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-subtle);
}
.amber-detail-cover img { width: 100%; height: 100%; }
.amber-detail-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.amber-detail-top { display: flex; flex-direction: column; gap: 8px; }
.amber-detail-top h1 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.3; }
.amber-meta-pills { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--ink-2); }
.amber-meta-pills span, .amber-meta-pills a {
  padding: 3px 10px; border-radius: var(--radius-pill); background: var(--bg-subtle); border: 1px solid var(--border);
}
.amber-meta-pills a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.amber-detail-desc { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.75; }
.amber-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.amber-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 700;
  border: 1px solid var(--border-strong); background: var(--bg-surface); color: var(--ink-1);
}
.amber-btn:hover { border-color: var(--brand); color: var(--brand); }
.amber-btn--primary { background: var(--brand); border-color: var(--brand); color: var(--ink-inv); }
.amber-btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--ink-inv); }

/* Neighbors & Pagination */
.amber-neighbors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.amber-neighbor {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px;
  border-radius: var(--radius-md); background: var(--bg-surface); border: 1px solid var(--border); min-width: 0;
}
.amber-neighbor:hover { border-color: var(--brand); }
.amber-neighbor--next { text-align: right; }
.amber-neighbor small { font-size: 11.5px; color: var(--ink-3); }
.amber-neighbor strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.amber-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 22px 0 8px; }
.amber-pager a, .amber-pager span {
  min-width: 34px; height: 34px; padding: 0 11px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
  background: var(--bg-surface); border: 1px solid var(--border); color: var(--ink-2);
}
.amber-pager a:hover { border-color: var(--brand); color: var(--brand); }
.amber-pager [data-current="是"] { background: var(--brand); border-color: var(--brand); color: var(--ink-inv); }

/* Search Box & Hot Words */
.amber-search-box {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 18px;
}
.amber-search-box h1 { margin: 0 0 12px; font-size: 19px; font-weight: 800; }
.amber-search-bar { display: flex; gap: 8px; }
.amber-search-bar input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong); background: var(--bg-surface); outline: none;
}
.amber-search-bar input:focus { border-color: var(--brand); }
.amber-search-bar button {
  height: 42px; padding: 0 22px; border: 0; border-radius: var(--radius-md);
  background: var(--brand); color: var(--ink-inv); font-weight: 800;
}
.amber-hot-wrap { margin-top: 14px; }
.amber-hot-title { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; font-weight: 600; }
.amber-hot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.amber-hot-word {
  padding: 5px 12px; border-radius: var(--radius-pill); font-size: 13px;
  background: var(--bg-subtle); border: 1px solid var(--border); color: var(--ink-2);
}
.amber-hot-word:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* Rank Hub (sticky inside amber-subbar) */
.amber-rank-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 8px 16px;
}
.amber-rank-models, .amber-rank-periods { display: flex; flex-wrap: wrap; gap: 6px; }
.amber-rank-models a, .amber-rank-periods button {
  padding: 6px 12px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg-subtle); color: var(--ink-2);
}
.amber-rank-models a[data-current="是"], .amber-rank-periods button.on {
  background: var(--brand); border-color: var(--brand); color: var(--ink-inv);
}
.amber-rank-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
}
.amber-rank-item {
  position: relative; grid-column: span 3;
  display: grid; grid-template-columns: 28px 54px minmax(0, 1fr); gap: 11px; align-items: center;
  padding: 10px 13px; border-radius: var(--radius-md); background: var(--bg-surface);
  border: 1px solid var(--border); transition: border-color .15s, box-shadow .15s;
}
.amber-rank-item:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.amber-rank-item:nth-child(-n+3) {
  grid-column: span 2;
  grid-template-columns: 92px minmax(0, 1fr); gap: 13px; align-items: stretch;
  padding: 13px; overflow: hidden;
}
.amber-rank-no {
  width: 26px; height: 26px; border-radius: 6px; background: var(--bg-subtle); color: var(--ink-3);
  font-weight: 800; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center;
}
.amber-rank-item:nth-child(-n+3) .amber-rank-no {
  position: absolute; top: 0; left: 0; z-index: 3;
  width: auto; height: auto; padding: 2px 9px 3px 8px; border-radius: 0 0 10px 0;
  font-size: 11px; font-weight: 900; color: #fff;
}
.amber-rank-item:nth-child(1) .amber-rank-no { background: linear-gradient(135deg, #f59e0b, #d97706); }
.amber-rank-item:nth-child(2) .amber-rank-no { background: linear-gradient(135deg, #94a3b8, #64748b); }
.amber-rank-item:nth-child(3) .amber-rank-no { background: linear-gradient(135deg, #d97757, #9a3412); }
.amber-rank-cover { width: 54px; aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: var(--bg-subtle); }
.amber-rank-item:nth-child(-n+3) .amber-rank-cover { width: 92px; aspect-ratio: 3 / 4; border-radius: 7px; }
.amber-rank-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.amber-rank-body h3 { margin: 0; font-size: 14.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amber-rank-item:nth-child(-n+3) .amber-rank-body h3 { font-size: 15.5px; }
.amber-rank-meta { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amber-rank-desc {
  margin: 0; font-size: 12px; color: var(--ink-2); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.amber-rank-item:nth-child(-n+3) .amber-rank-desc {
  white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}

.amber-empty {
  margin: 0; padding: 32px 16px; text-align: center; color: var(--ink-3);
  background: var(--bg-surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-md);
}
.amber-prose { font-size: 14.5px; line-height: 1.85; color: var(--ink-2); }
.amber-prose p { margin: 0 0 12px; }

/* Footer */
.amber-footer { border-top: 1px solid var(--border); background: var(--bg-surface); padding: 24px 0 32px; color: var(--ink-3); font-size: 12.5px; }
.amber-friends { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px; }
.amber-friends strong { color: var(--ink-1); }
.amber-footer-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }
.amber-disclaimer { margin: 0; line-height: 1.6; }

/* Dialogs & Bottom Sheet */
.amber-drawer, .amber-sheet {
  padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--bg-surface); color: var(--ink-1); width: min(420px, calc(100vw - 24px)); max-height: 84vh;
}
.amber-drawer::backdrop, .amber-sheet::backdrop { background: rgba(31, 29, 26, .58); backdrop-filter: blur(4px); }
.amber-drawer-head, .amber-sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.amber-drawer-close {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-subtle); color: var(--ink-1);
}
.amber-drawer-body, .amber-sheet-body { padding: 14px 16px; overflow-y: auto; max-height: calc(84vh - 60px); }
.amber-drawer-group { margin-bottom: 14px; }
.amber-drawer-group h3 { margin: 0 0 8px; font-size: 13px; color: var(--brand); }
.amber-drawer-links { display: flex; flex-wrap: wrap; gap: 8px; }
.amber-drawer-links a {
  padding: 5px 11px; border-radius: var(--radius-sm); background: var(--bg-subtle);
  border: 1px solid var(--border); font-size: 13px; color: var(--ink-2);
}
.amber-drawer-links a[data-current="是"] { background: var(--brand); border-color: var(--brand); color: var(--ink-inv); font-weight: 700; }

.amber-sheet-tools { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.amber-sheet-tools select {
  flex: 1; height: 34px; padding: 0 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-subtle);
}
.amber-sheet-tools button {
  height: 34px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg-subtle); font-size: 12.5px;
}
.amber-sheet-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--ink-2);
}
.amber-sheet-pager button {
  padding: 5px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg-subtle);
}

.amber-bottom-nav { display: none; }
.amber-back-top {
  position: fixed; right: 18px; bottom: 22px; z-index: 38;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--brand-soft-2); background: var(--bg-surface); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.amber-back-top:hover { background: var(--brand); color: var(--ink-inv); }

@media (max-width: 1023px) {
  .amber-spot, .amber-list-layout { grid-template-columns: 1fr; }
  .amber-list-side { position: static; }
  .ad-banner-slot,
  .ad-banner-slot:has(> .ad-banner-item:nth-child(2):last-child),
  .ad-banner-slot:has(> .ad-banner-item:nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body { padding-bottom: 62px; }
  .amber-crumbs { display: none; }
  .amber-top-head { position: sticky; top: 0; z-index: 41; }
  .amber-top-inner { height: 52px; gap: 10px; }
  .amber-big-search, .amber-top-quick, .amber-nav-bar { display: none; }
  .amber-mobile-actions { display: flex; }
  .amber-subbar { position: sticky; top: 52px; z-index: 39; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); }
  .amber-spot-grid { grid-template-columns: 1fr; }
  .amber-spot-card { grid-template-columns: 112px minmax(0, 1fr); gap: 10px; }
  .amber-spot-cover { width: 112px; }

  .amber-app-ads { grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); gap: 10px 6px; padding: 10px 8px; }
  .amber-app-ads[data-ad-cols="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .amber-app-icon { width: 48px; height: 48px; border-radius: 12px; }
  .amber-text-ads { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .amber-text-ads:has(> .amber-text-ad:only-child) { grid-template-columns: 1fr; }
  .amber-text-ad { padding: 6px 8px; font-size: 12px; }
  .ad-banner-slot,
  .ad-banner-slot:has(> .ad-banner-item:only-child),
  .ad-banner-slot:has(> .ad-banner-item:nth-child(2):last-child),
  .ad-banner-slot:has(> .ad-banner-item:nth-child(4):last-child) {
    grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px;
  }
  .ad-float-bar { left: 8px; right: 8px; width: auto; transform: none; padding: 4px; }
  .ad-float-bar--top { top: 96px; }
  .ad-float-bar--bottom { bottom: 64px; }
  .ad-float-close { top: 4px; right: 4px; }

  /* Mobile 3-Band Detail Card */
  .amber-detail-head { grid-template-columns: 116px minmax(0, 1fr); gap: 12px 14px; padding: 14px; }
  .amber-detail-info { display: contents; }
  .amber-detail-top { align-self: center; }
  .amber-detail-top h1 { font-size: 18px; }
  .amber-detail-extra { grid-column: 1 / -1; padding-top: 10px; border-top: 1px dashed var(--border); }
  .amber-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Mobile single-line centered neighbors */
  .amber-neighbors { grid-template-columns: 1fr; gap: 8px; }
  .amber-neighbor, .amber-neighbor--next {
    flex-direction: row; align-items: center; justify-content: center; text-align: center; gap: 4px; padding: 10px 12px;
  }
  .amber-neighbor small::after { content: "："; }

  .amber-filter-row { display: flex; }
  .amber-filter-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .amber-filter-chips::-webkit-scrollbar { display: none; }
  .amber-filter-row.is-collapsed { display: none; }
  .amber-filter-more {
    display: inline-flex; justify-content: center; width: 100%; padding: 6px;
    border-radius: var(--radius-sm); border: 1px dashed var(--border-strong);
    background: var(--bg-subtle); color: var(--brand); font-size: 12.5px; font-weight: 700;
  }

  .amber-hot-list { flex-direction: column; align-items: center; gap: 6px; }
  .amber-hot-word { background: transparent; border: 0; padding: 4px 10px; font-size: 15px; }
  .amber-hot-word:nth-child(6n+1) { color: #f25c2a; }
  .amber-hot-word:nth-child(6n+2) { color: #e11d48; }
  .amber-hot-word:nth-child(6n+3) { color: #d97706; }
  .amber-hot-word:nth-child(6n+4) { color: #059669; }
  .amber-hot-word:nth-child(6n+5) { color: #0284c7; }
  .amber-hot-word:nth-child(6n+6) { color: #7c3aed; }

  .amber-rank-top { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 16px; }
  .amber-rank-models { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .amber-rank-models::-webkit-scrollbar { display: none; }
  .amber-rank-models a { flex: none; }
  .amber-rank-periods { display: grid; grid-template-columns: repeat(4, 1fr); }
  .amber-rank-list { grid-template-columns: 1fr; gap: 9px; }
  .amber-rank-item, .amber-rank-item:nth-child(-n+3) { grid-column: auto; }
  .amber-rank-item { grid-template-columns: 24px 46px minmax(0, 1fr); gap: 9px; padding: 9px 10px; }
  .amber-rank-item:nth-child(-n+3) { grid-template-columns: 78px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .amber-rank-cover { width: 46px; }
  .amber-rank-item:nth-child(-n+3) .amber-rank-cover { width: 78px; }
  .amber-rank-desc { display: none; }
  .amber-rank-item:nth-child(-n+3) .amber-rank-desc { display: -webkit-box; font-size: 11.5px; }

  .amber-bottom-nav {
    position: fixed; inset: auto 0 0 0; z-index: 42; height: 56px;
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex; align-items: stretch;
  }
  .amber-bottom-nav a, .amber-bottom-nav button {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 0; background: transparent; color: var(--ink-3); font-size: 11px;
  }
  .amber-bottom-nav svg { width: 19px; height: 19px; }
  .amber-bottom-nav em { font-style: normal; }
  .amber-bottom-nav .amber-bnav-ch:nth-of-type(n+4) { display: none; }
  .amber-bottom-nav [data-current="是"] { color: var(--brand); font-weight: 700; }
  .amber-back-top { bottom: 68px; right: 12px; }
}

/* Lock cover aspect-ratio against intrinsic image expansion */
.vod-poster,
.comic-poster,
.comic-banner-card,
.novel-cover,
.person-avatar,
.person-work-poster,
.article-lead,
.article-thumb,
.topic-cover,
.topic-hero-cover,
.amber-spot-cover,
.amber-detail-cover,
.amber-rank-cover,
.ad-banner-item {
  position: relative;
  overflow: hidden;
}
.vod-poster > img,
.comic-poster > img,
.comic-banner-card > img,
.novel-cover > img,
.person-avatar > img,
.person-work-poster > img,
.article-lead > img,
.article-thumb > img,
.topic-cover > img,
.topic-hero-cover > img,
.amber-spot-cover > img,
.amber-detail-cover > img,
.amber-rank-cover > img,
.ad-banner-item > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
