/* comic-pop · site 8 · 熔岩夕照 · cp- 版式 + 暗场色板 */
:root {
  --cp-red: #e11d48;
  --cp-red-dark: #9f1239;
  --cp-blue: #ea580c;
  --cp-blue-dark: #d97706;
  --cp-gold: #f59e0b;
  --cp-gold-dark: #d97706;
  --cp-bg: #12080c;
  --cp-surface: #241018;
  --cp-surface-2: #2e1520;
  --cp-text: #fff1f2;
  --cp-muted: #c4a4a8;
  --cp-line: rgba(244, 63, 94, 0.28);
  --cp-shadow: 0 16px 48px rgba(225, 29, 72, 0.18);
  color-scheme: dark;
}

body.cp-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(720px 280px at 100% -5%, rgba(37, 99, 235, 0.08), transparent 55%),
    radial-gradient(640px 260px at 0% 0%, rgba(220, 38, 38, 0.07), transparent 52%),
    var(--cp-bg) !important;
  color: var(--cp-text) !important;
  font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
  line-height: 1.55;
}

body.cp-body a {
  color: var(--cp-blue);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.cp-body a:hover { color: var(--cp-red); }
body.cp-body img { display: block; max-width: 100%; height: auto; }
body.cp-body button { font: inherit; cursor: pointer; }

/* ── 头部：彩色顶栏 + 内联搜索 + 圆角分类胶囊 ── */
.cp-top {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--cp-surface);
  box-shadow: 0 4px 24px rgba(28, 25, 23, 0.08);
}

.cp-top__ribbon {
  height: 5px;
  background: linear-gradient(90deg, var(--cp-red) 0%, var(--cp-red) 42%, var(--cp-blue) 42%, var(--cp-blue) 100%);
}

.cp-top__row {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
}

.cp-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--cp-text) !important;
  font-weight: 900;
}

.cp-logo__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cp-red), var(--cp-red-dark));
  color: #fff;
  font-size: 18px;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
}

.cp-logo__name {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.cp-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 8px;
}

.cp-nav a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--cp-muted) !important;
  font-weight: 800;
  font-size: 0.88rem;
  background: transparent;
}

.cp-nav a:hover,
.cp-nav a[aria-current="page"] {
  color: #fff !important;
  background: var(--cp-blue);
}

.cp-search {
  display: flex;
  align-items: stretch;
  margin-left: auto;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid var(--cp-blue);
  background: var(--cp-surface);
  min-width: 200px;
  max-width: 280px;
  flex: 1;
}

.cp-search input {
  flex: 1;
  min-width: 0;
  padding: 9px 14px;
  border: 0;
  background: transparent;
  color: var(--cp-text);
  outline: none;
  font-size: 0.92rem;
}

.cp-search input::placeholder { color: var(--cp-muted); }

.cp-hotlink {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cp-gold), #fde047);
  color: var(--cp-text) !important;
  font-weight: 900;
  font-size: 0.86rem;
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.4);
}

.cp-hotlink:hover { color: var(--cp-red-dark) !important; transform: translateY(-1px); }

.cp-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 2px solid var(--cp-line);
  border-radius: 10px;
  background: var(--cp-surface);
}

.cp-burger span {
  display: block;
  height: 2px;
  background: var(--cp-text);
  border-radius: 2px;
}

.cp-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 18px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cp-chips::-webkit-scrollbar { display: none; }

.cp-chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--cp-surface-2);
  color: var(--cp-muted) !important;
  font-weight: 800;
  font-size: 0.84rem;
  border: 2px solid transparent;
}

.cp-chip:hover {
  color: var(--cp-blue) !important;
  border-color: var(--cp-blue);
  background: #fff;
}

.cp-chip--fire {
  background: linear-gradient(135deg, var(--cp-red), var(--cp-red-dark));
  color: #fff !important;
  border-color: transparent;
}

.cp-chip--fire:hover { color: #fff !important; opacity: 0.92; }

/* ── 按钮 ── */
.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 900;
  border: 0;
  font-size: 0.92rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cp-btn--red {
  background: linear-gradient(135deg, var(--cp-red), var(--cp-red-dark));
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.32);
}

.cp-btn--red:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(220, 38, 38, 0.38);
  color: #fff !important;
}

.cp-btn--blue {
  background: var(--cp-blue);
  color: #fff !important;
  padding: 9px 18px;
  font-weight: 800;
}

.cp-btn--blue:hover { background: var(--cp-blue-dark); color: #fff !important; }

.cp-btn--outline {
  background: transparent;
  color: var(--cp-blue) !important;
  border: 2px solid var(--cp-blue);
}

.cp-btn--outline:hover { background: rgba(37, 99, 235, 0.08); }

.cp-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

/* ── 首页：焦点横幅 + 热播横滑 + 分类网格 + 四列最新 ── */
.cp-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 40px;
  padding: 28px;
  border-radius: 20px;
  background: linear-gradient(125deg, #fff 0%, #fef2f2 45%, #eff6ff 100%);
  border: 3px solid var(--cp-red);
  box-shadow: var(--cp-shadow);
}

.cp-spotlight__tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--cp-gold);
  color: var(--cp-text);
  font-size: 0.76rem;
  font-weight: 900;
}

.cp-spotlight h1 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  line-height: 1.15;
  font-weight: 950;
  color: var(--cp-red);
}

.cp-spotlight__desc {
  margin: 0 0 20px;
  color: var(--cp-muted);
  font-size: 1rem;
  max-width: 460px;
}

.cp-spotlight__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cp-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 200px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--cp-red) #fef2f2;
}

.cp-rail::-webkit-scrollbar { height: 6px; }
.cp-rail::-webkit-scrollbar-thumb { background: var(--cp-red); border-radius: 999px; }

.cp-rail--hot { grid-auto-columns: minmax(180px, 220px); }
.cp-rail--peek { grid-auto-columns: minmax(140px, 170px); }
.cp-rail--peek .cp-card:nth-child(n+4) { display: none; }
.cp-rail--related { grid-auto-columns: minmax(150px, 190px); }

.cp-block { margin-bottom: 44px; }

.cp-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.cp-block__head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.32rem;
  font-weight: 950;
  color: var(--cp-text);
}

.cp-block__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.cp-block__dot--red { background: var(--cp-red); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25); }
.cp-block__dot--blue { background: var(--cp-blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }
.cp-block__dot--gold { background: var(--cp-gold); box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.35); }

.cp-block__head a {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--cp-blue) !important;
}

.cp-grid--4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.cp-grid--3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* 分类片库网格（home CATEGORY_TILES + categories 页） */
.cp-catgrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.cp-catgrid--full { grid-template-columns: repeat(3, minmax(0, 1fr)); }

body.cp-body .category-tile,
body.cp-body .overview-card {
  display: block;
  padding: 18px;
  border-radius: 16px;
  background: var(--cp-surface);
  border: 2px solid var(--cp-line);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.cp-body .category-tile:nth-child(5n+1),
body.cp-body .overview-card:nth-child(3n+1) { border-color: var(--cp-red); background: #fef2f2; }

body.cp-body .category-tile:nth-child(5n+2),
body.cp-body .overview-card:nth-child(3n+2) { border-color: var(--cp-blue); background: #eff6ff; }

body.cp-body .category-tile:nth-child(5n+3),
body.cp-body .overview-card:nth-child(3n+3) { border-color: var(--cp-gold-dark); background: #fefce8; }

body.cp-body .category-tile:nth-child(5n+4) { border-color: var(--cp-blue); background: #eff6ff; }
body.cp-body .category-tile:nth-child(5n+5) { border-color: var(--cp-red); background: #fef2f2; }

body.cp-body .category-tile:hover,
body.cp-body .overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--cp-shadow);
}

body.cp-body .category-tile strong,
body.cp-body .overview-main strong {
  display: block;
  font-size: 1rem;
  font-weight: 950;
  color: var(--cp-text);
  margin-bottom: 6px;
}

body.cp-body .category-tile span,
body.cp-body .overview-main span {
  display: block;
  color: var(--cp-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

body.cp-body .overview-links {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--cp-line);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--cp-blue);
}

/* HOME_SECTIONS 区块 */
body.cp-body .section-block { margin-bottom: 44px; }

body.cp-body .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

body.cp-body .section-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 950;
  color: var(--cp-text);
}

body.cp-body .section-head a {
  font-weight: 800;
  color: var(--cp-blue) !important;
}

body.cp-body .section-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 8px;
  background: var(--cp-red);
  color: #fff;
  font-size: 0.85rem;
}

body.cp-body .movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

/* ── 卡片：3:4 竖版 + 正红热门角标 + 蓝色播放圆钮 ── */
.cp-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--cp-surface);
  border: 2px solid transparent;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.cp-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--cp-blue);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.18);
}

.cp-card__link { color: inherit !important; display: block; }
.cp-card__link:hover { color: inherit !important; }

.cp-card__frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #fef2f2, #eff6ff);
}

.cp-card__frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.cp-card:hover .cp-card__frame img { transform: scale(1.07); }

.cp-card__badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  padding: 5px 12px 5px 10px;
  background: linear-gradient(135deg, var(--cp-red), var(--cp-red-dark));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  border-radius: 0 0 12px 0;
  box-shadow: 2px 2px 8px rgba(220, 38, 38, 0.35);
}

.cp-card__play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cp-blue);
  color: #fff;
  font-size: 0.75rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cp-card:hover .cp-card__play {
  opacity: 1;
  transform: scale(1);
}

.cp-card__type {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(28, 25, 23, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
}

.cp-card__body { padding: 10px 12px 14px; }

.cp-card__body h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 900;
  color: var(--cp-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cp-card__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--cp-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.cp-card__meta span:first-child { color: var(--cp-red); }

.cp-card--compact {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
}

.cp-card--compact .cp-card__frame img { aspect-ratio: 3 / 4; height: 100%; }
.cp-card--compact .cp-card__play,
.cp-card--compact .cp-card__type { display: none; }
.cp-card--compact .cp-card__body { padding: 12px 14px; }

/* ── 分类页：顶栏筛选 + 三列网格 ── */
.cp-pagehead {
  margin-bottom: 28px;
  padding: 26px 28px;
  border-radius: 18px;
  background: linear-gradient(110deg, var(--cp-red), var(--cp-blue));
  color: #fff;
}

.cp-pagehead--soft {
  background: linear-gradient(110deg, #fff 0%, #fef2f2 50%, #eff6ff 100%);
  color: var(--cp-text);
  border: 2px solid var(--cp-line);
}

.cp-pagehead__label {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--cp-gold);
  color: var(--cp-text);
  font-size: 0.76rem;
  font-weight: 900;
}

.cp-pagehead h1 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 950;
}

.cp-pagehead p {
  margin: 0;
  opacity: 0.92;
  max-width: 620px;
}

.cp-pagehead--soft p { color: var(--cp-muted); opacity: 1; }

.cp-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cp-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.cp-pagehead .cp-crumb { color: rgba(255, 255, 255, 0.8); margin-bottom: 0; }
.cp-pagehead .cp-crumb a { color: #fff !important; }
.cp-pagehead--soft .cp-crumb { color: var(--cp-muted); }
.cp-pagehead--soft .cp-crumb a { color: var(--cp-blue) !important; }
.cp-crumb a { color: var(--cp-blue) !important; }

.cp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--cp-surface);
  border: 2px solid var(--cp-blue);
  box-shadow: var(--cp-shadow);
}

.cp-toolbar__field {
  display: grid;
  gap: 5px;
  min-width: 140px;
}

.cp-toolbar__field--grow { flex: 1; min-width: 200px; }

.cp-toolbar__field span {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--cp-red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cp-toolbar__field input,
.cp-toolbar__field select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--cp-line);
  border-radius: 10px;
  background: var(--cp-bg);
  color: var(--cp-text);
  font-weight: 600;
  outline: none;
}

.cp-toolbar__field input:focus,
.cp-toolbar__field select:focus { border-color: var(--cp-blue); }

.cp-empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--cp-muted);
  font-weight: 800;
  border-radius: 14px;
  background: var(--cp-surface);
  border: 2px dashed var(--cp-line);
}

/* ── 播放页：全宽播放器 + 下方信息横排 ── */
.cp-watch { margin-bottom: 32px; }

.cp-watch__screen {
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  border: 3px solid var(--cp-red);
  box-shadow: 0 24px 56px rgba(28, 25, 23, 0.22);
  margin-bottom: 20px;
}

.cp-watch__screen video,
#movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  display: block;
}

.cp-watch__info {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  border-radius: 16px;
  background: var(--cp-surface);
  border: 2px solid var(--cp-blue);
}

.cp-watch__thumb {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--cp-red);
}

.cp-watch__thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.cp-watch__meta h1 {
  margin: 0 0 12px;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  line-height: 1.3;
  font-weight: 950;
  color: var(--cp-red);
}

.cp-facts {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-facts li {
  display: inline-flex;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--cp-surface-2);
  font-size: 0.82rem;
}

.cp-facts em {
  color: var(--cp-muted);
  font-style: normal;
  font-weight: 700;
}

.cp-facts strong { color: var(--cp-text); font-weight: 900; }

.cp-watch__desc {
  margin: 0 0 16px;
  color: var(--cp-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cp-story {
  margin-bottom: 36px;
  padding: 24px 28px;
  border-radius: 16px;
  background: var(--cp-surface);
  border-left: 5px solid var(--cp-red);
  box-shadow: var(--cp-shadow);
}

.cp-story h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 950;
  color: var(--cp-blue);
}

.cp-story p {
  margin: 0;
  color: var(--cp-muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ── 页脚：三色条带 + 双列信息 ── */
.cp-foot {
  margin-top: 24px;
  background: var(--cp-surface);
  border-top: 3px solid var(--cp-red);
}

.cp-foot__bands {
  display: flex;
  height: 4px;
}

.cp-foot__bands span:nth-child(1) { flex: 1; background: var(--cp-red); }
.cp-foot__bands span:nth-child(2) { flex: 1; background: var(--cp-blue); }
.cp-foot__bands span:nth-child(3) { flex: 1; background: var(--cp-gold); }

.cp-foot__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 18px 24px;
}

.cp-foot__brand a {
  font-size: 1.2rem;
  font-weight: 950;
  color: var(--cp-red) !important;
}

.cp-foot__brand p {
  margin: 10px 0 0;
  color: var(--cp-muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.cp-foot__about { font-size: 0.84rem !important; }

.cp-foot__links {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 28px;
  margin-top: 28px;
}

.cp-foot__col h4 {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 950;
  color: var(--cp-blue);
}

.cp-foot__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cp-foot__col li a {
  color: var(--cp-muted) !important;
  font-weight: 700;
  font-size: 0.86rem;
}

.cp-foot__col li a:hover { color: var(--cp-red) !important; }

.cp-foot__col--wide p {
  margin: 0;
  color: var(--cp-muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.cp-foot__bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--cp-line);
  color: var(--cp-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.cp-foot__bar a { color: var(--cp-blue) !important; }

/* 图片加载失败 */
body.cp-body .image-off { opacity: 0.35; }

@media (prefers-reduced-motion: reduce) {
  body.cp-body a,
  .cp-card,
  .cp-btn,
  .category-tile,
  .overview-card { transition: none; }
  .cp-card:hover .cp-card__frame img { transform: none; }
}

@media (max-width: 1100px) {
  .cp-grid--4,
  body.cp-body .movie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cp-catgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cp-foot__links { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .cp-top__row { flex-wrap: wrap; }
  .cp-nav {
    display: none;
    order: 5;
    width: 100%;
    flex-direction: column;
    padding: 12px 0 4px;
    border-top: 2px solid var(--cp-line);
    margin-left: 0;
  }
  .cp-nav.open { display: flex; }
  .cp-search { order: 3; max-width: none; width: 100%; margin-left: 0; }
  .cp-hotlink { order: 2; }
  .cp-burger { display: flex; margin-left: auto; order: 4; }
  .cp-spotlight { grid-template-columns: 1fr; padding: 22px; }
  .cp-grid--4,
  .cp-grid--3,
  body.cp-body .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-catgrid,
  .cp-catgrid--full { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-watch__info { grid-template-columns: 1fr; }
  .cp-watch__thumb { max-width: 160px; }
  .cp-toolbar { flex-direction: column; }
  .cp-toolbar__field { min-width: 0; width: 100%; }
}

@media (max-width: 520px) {
  .cp-main { padding: 18px 14px 48px; }
  .cp-grid--4,
  .cp-grid--3,
  body.cp-body .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cp-catgrid,
  .cp-catgrid--full { grid-template-columns: 1fr; }
  .cp-foot__links { grid-template-columns: 1fr; gap: 20px; }
  .cp-chip { padding: 6px 12px; font-size: 0.8rem; }
  .cp-rail { grid-auto-columns: minmax(130px, 160px); }
}
