:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --bg-soft: #12100e;
  --surface: #171a1f;
  --surface-2: #20242a;
  --surface-3: #2a261f;
  --text: #f5f1e8;
  --muted: #aaa397;
  --line: #33363b;
  --amber: #f0b35a;
  --teal: #79d7c5;
  --rose: #ff8b94;
  --green: #8fd17f;
  --blue: #8bb8ff;
  --bad: #ff7a7a;
  --shadow: rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(240, 179, 90, 0.15), transparent 360px),
    linear-gradient(180deg, #12100e 0, #0b0d10 420px, #0b0d10 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(240, 179, 90, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 179, 90, 0.95), rgba(121, 215, 197, 0.82)),
    #171a1f;
  box-shadow: 0 12px 34px rgba(240, 179, 90, 0.18);
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 11px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid #0b0d10;
}

.brand strong,
.brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav a,
.text-link,
.wide-action,
.tab-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 26, 31, 0.86);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--text);
  font-weight: 700;
}

.top-nav .nav-primary,
.wide-action {
  background: var(--amber);
  border-color: var(--amber);
  color: #130f08;
}

.speed-shell {
  max-width: 1080px;
}

.speed-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 179, 90, 0.12), rgba(121, 215, 197, 0.08)),
    var(--surface);
}

.speed-hero h1 {
  margin: 4px 0 8px;
  font-size: 34px;
  letter-spacing: 0;
}

.speed-hero p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.speed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.speed-card {
  min-height: 168px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 26, 31, 0.9);
}

.speed-card h2 {
  margin: 4px 0 18px;
  font-size: 18px;
  letter-spacing: 0;
}

.speed-card strong {
  display: block;
  font-size: 30px;
  letter-spacing: 0;
}

.speed-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.speed-card[data-state="ok"] {
  border-color: rgba(143, 209, 127, 0.48);
}

.speed-card[data-state="bad"] {
  border-color: rgba(255, 122, 122, 0.58);
}

.speed-card[data-state="running"] {
  border-color: rgba(139, 184, 255, 0.5);
}

.speed-card[data-state="pending"] {
  border-color: rgba(240, 179, 90, 0.5);
}

.speed-summary-block {
  margin-top: 14px;
}

.speed-summary {
  min-height: 68px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 13, 16, 0.38);
  color: var(--text);
  line-height: 1.7;
}

.cn-watch-shell {
  max-width: 1180px;
}

.cn-watch-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(121, 215, 197, 0.14), rgba(240, 179, 90, 0.08)),
    var(--surface);
}

.cn-watch-hero h1 {
  margin: 4px 0 8px;
  font-size: 34px;
  letter-spacing: 0;
}

.cn-watch-hero p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.cn-watch-section {
  margin-top: 14px;
}

.domestic-status-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.domestic-status-panel article {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 26, 31, 0.9);
  padding: 16px;
}

.domestic-status-panel span,
.domestic-status-panel strong {
  display: block;
}

.domestic-status-panel span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.domestic-status-panel strong {
  margin-top: 10px;
  color: var(--teal);
  font-size: 22px;
  letter-spacing: 0;
}

.cn-watch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cn-watch-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(23, 26, 31, 0.92);
}

.cn-watch-cover {
  position: relative;
  min-height: 220px;
  width: 100%;
  border: 0;
  background: var(--surface-2);
  color: inherit;
  display: block;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.cn-watch-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cn-watch-cover span {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 8px;
  background: rgba(11, 13, 16, 0.82);
  border: 1px solid rgba(121, 215, 197, 0.48);
  color: var(--teal);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.cn-watch-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  min-width: 0;
}

.cn-watch-body h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.cn-watch-body strong {
  color: var(--muted);
  line-height: 1.45;
}

.cn-watch-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.cn-watch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cn-watch-meta span {
  border: 1px solid rgba(121, 215, 197, 0.35);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.cn-watch-body .wide-action {
  margin-top: auto;
  width: fit-content;
}

button.wide-action {
  cursor: pointer;
}

.hero-section {
  min-height: 430px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.hero-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 13, 16, 0.92) 0%, rgba(11, 13, 16, 0.72) 42%, rgba(11, 13, 16, 0.16) 100%),
    var(--poster-bg);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-art::before,
.poster-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.10), transparent 36%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 16px);
  mix-blend-mode: screen;
  opacity: 0.38;
}

.hero-art.has-image::before {
  background:
    linear-gradient(90deg, rgba(11, 13, 16, 0.94) 0%, rgba(11, 13, 16, 0.74) 44%, rgba(11, 13, 16, 0.34) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 36%);
  mix-blend-mode: normal;
  opacity: 1;
}

.hero-art::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -10%;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  width: min(680px, 100%);
  min-height: 430px;
  padding: 34px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

.hero-title {
  margin: 0;
  font-size: 54px;
  line-height: 1.02;
  max-width: 11em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.badge.good {
  border-color: rgba(143, 209, 127, 0.55);
  color: var(--green);
}

.badge.warn {
  border-color: rgba(240, 179, 90, 0.6);
  color: var(--amber);
}

.badge.cn {
  border-color: rgba(121, 215, 197, 0.6);
  color: var(--teal);
}

.badge.bad {
  border-color: rgba(255, 122, 122, 0.55);
  color: var(--bad);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--amber);
  background: var(--amber);
  color: #130f08;
  font-weight: 900;
  cursor: pointer;
}

.hero-button.secondary {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.control-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
}

.search-box {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 26, 31, 0.92);
  padding: 0 14px;
}

.search-icon {
  width: 15px;
  height: 15px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  position: relative;
  flex: 0 0 auto;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  background: var(--muted);
  transform: rotate(45deg);
  border-radius: 2px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-box input::placeholder {
  color: #8d867b;
}

.view-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tab-button {
  cursor: pointer;
}

.tab-button.active {
  border-color: var(--teal);
  background: rgba(121, 215, 197, 0.16);
  color: var(--teal);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.main-column,
.side-column {
  display: grid;
  gap: 18px;
}

.section-block,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 26, 31, 0.86);
}

.section-block {
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h1,
.section-heading h2,
.side-panel h2 {
  margin: 0;
  font-size: 24px;
}

.text-link {
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
}

.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.anime-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #14171b;
  overflow: hidden;
  cursor: default;
  text-align: left;
  padding: 0;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  transition: transform 150ms ease, border-color 150ms ease;
}

.anime-card:hover,
.anime-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(240, 179, 90, 0.7);
  outline: 0;
}

.poster-art {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--poster-bg);
  overflow: hidden;
}

.poster-play {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background: rgba(11, 13, 16, 0.72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.poster-play::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 12px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid var(--amber);
}

.poster-image,
.detail-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-art.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 22%, rgba(0, 0, 0, 0.68) 100%);
}

.poster-title {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  color: #fff7ea;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.12;
  word-break: break-word;
}

.card-body {
  min-height: 118px;
  padding: 12px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 10px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 16px;
  line-height: 1.35;
}

.card-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.mini-action {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.mini-action.primary {
  border-color: var(--amber);
  background: var(--amber);
  color: #130f08;
}

.schedule-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.schedule-card {
  min-height: 128px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.schedule-card h3 {
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.35;
}

.schedule-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.side-panel {
  padding: 16px;
}

.compact-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.compact-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.compact-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--poster-bg);
}

.compact-item strong,
.compact-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-item strong {
  font-size: 14px;
}

.compact-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.request-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.wide-action {
  width: 100%;
}

.wide-action.secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
  color: var(--text);
}

.ops-summary {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.ops-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.ops-row:last-child {
  border-bottom: 0;
}

.ops-row span {
  color: var(--muted);
}

.ops-row strong {
  text-align: right;
}

.empty-state,
.loading-block {
  min-height: 180px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
  color: var(--muted);
}

.loading-block {
  padding: 34px;
}

.empty-state strong,
.loading-block strong {
  color: var(--text);
  font-size: 22px;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.55);
}

.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 21;
  width: min(460px, 100%);
  height: 100vh;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #111317;
  box-shadow: -24px 0 50px var(--shadow);
}

.icon-button {
  position: sticky;
  top: 12px;
  left: 100%;
  z-index: 2;
  display: block;
  width: 40px;
  height: 40px;
  margin: 12px 12px 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
}

.icon-button::before,
.icon-button::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 19px;
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.icon-button::before { transform: rotate(45deg); }
.icon-button::after { transform: rotate(-45deg); }

.detail-hero {
  min-height: 260px;
  margin-top: -52px;
  background: var(--poster-bg);
  position: relative;
  overflow: hidden;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0, rgba(17, 19, 23, 0.2) 35%, #111317 100%);
}

.detail-body {
  padding: 0 20px 28px;
  position: relative;
  z-index: 1;
}

.detail-body h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.12;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.episode-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.episode-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
}

.episode-row span {
  color: var(--muted);
}

body.detail-open {
  overflow: hidden;
}

.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.player-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.player-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #0b0d10;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.5);
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 86px;
  padding: 18px 18px 14px;
}

.player-header h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

.player-header span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.player-header .icon-button {
  position: relative;
  top: auto;
  left: auto;
  flex: 0 0 auto;
  margin: 0;
}

.video-stage {
  background: #000;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.player-video {
  display: block;
  width: 100%;
  max-height: min(68vh, 720px);
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
}

.line-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.line-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}

.line-button.active {
  border-color: rgba(121, 215, 197, 0.7);
  background: rgba(121, 215, 197, 0.16);
  color: var(--teal);
}

.player-episodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  padding: 0 18px 18px;
}

.player-episode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.player-episode.active {
  border-color: rgba(240, 179, 90, 0.72);
  background: rgba(240, 179, 90, 0.12);
}

.player-episode span {
  color: var(--muted);
  font-size: 12px;
}

body.player-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .side-column {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .speed-grid {
    grid-template-columns: 1fr;
  }

  .cn-watch-grid {
    grid-template-columns: 1fr;
  }

  .domestic-status-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 22px, 1320px);
    padding-top: 12px;
  }

  .site-header,
  .control-bar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header,
  .section-heading {
    display: flex;
  }

  .top-nav,
  .view-tabs {
    justify-content: stretch;
  }

  .top-nav a,
  .tab-button {
    flex: 1 1 0;
  }

  .control-bar {
    grid-template-columns: 1fr;
  }

  .hero-section,
  .hero-content {
    min-height: 390px;
  }

  .hero-content {
    padding: 24px;
  }

  .hero-title {
    font-size: 36px;
  }

  .anime-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-column {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    grid-template-columns: 1fr;
  }

  .player-shell {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .player-header,
  .player-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .player-header {
    min-height: 0;
  }

  .player-toolbar .text-link {
    width: 100%;
  }

  .line-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .line-button {
    padding: 0 8px;
  }

  .speed-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .speed-hero h1 {
    font-size: 30px;
  }

  .cn-watch-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .cn-watch-hero h1 {
    font-size: 30px;
  }

  .cn-watch-card {
    grid-template-columns: 112px 1fr;
  }

  .cn-watch-cover {
    min-height: 190px;
  }

  .cn-watch-body {
    padding: 14px;
  }

  .cn-watch-body h3 {
    font-size: 18px;
  }
}

@media (max-width: 430px) {
  .anime-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 31px;
  }

  .cn-watch-card {
    grid-template-columns: 1fr;
  }

  .cn-watch-cover {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .domestic-status-panel {
    grid-template-columns: 1fr;
  }

  .player-episodes {
    grid-template-columns: 1fr;
  }
}
