.ch-hub {
  min-height: calc(100svh - 160px);
  display: grid;
  align-items: center;
}

.ch-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 860px;
  margin: 0 auto;
}

.ch-pick a.plan-card {
  color: inherit;
  text-decoration: none;
  gap: 14px;
}

.ch-pick a.plan-card .btn {
  margin-top: auto;
}

.channels-app {
  padding: 28px 0 80px;
}

.ch-wrap {
  width: min(1440px, calc(100% - 32px));
}

.ch-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.ch-intro h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 0 8px;
}

.ch-intro .lead {
  max-width: 52ch;
}

.ch-server-switch {
  margin: 0;
  flex-shrink: 0;
}

.ch-server-switch .switch-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.ch-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 16px;
}

.ch-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.ch-mode svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.ch-mode:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.ch-mode.active {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1406;
}

.ch-search {
  position: relative;
  margin-bottom: 20px;
}

.ch-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
}

.ch-search input {
  width: 100%;
  min-height: 56px;
  padding: 0 72px 0 48px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

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

.ch-search input:focus {
  border-color: rgba(232, 195, 106, 0.55);
  box-shadow: 0 0 0 4px rgba(232, 195, 106, 0.12);
}

.ch-search-hint {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  pointer-events: none;
}

.ch-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}

.ch-sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 108px);
  display: flex;
  flex-direction: column;
}

.ch-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ch-sidebar-close {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
}

.ch-cat-filter {
  margin: 0 12px 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.ch-cat-filter:focus {
  border-color: rgba(232, 195, 106, 0.45);
}

.ch-cat-scroll {
  overflow-y: auto;
  flex: 1;
  padding: 4px 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.ch-cat-divider {
  padding: 10px 12px 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.ch-cat {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.ch-cat:hover {
  background: rgba(255, 255, 255, 0.05);
}

.ch-cat.active {
  background: linear-gradient(90deg, rgba(232, 195, 106, 0.22), transparent);
  font-weight: 700;
}

.ch-cat.europe {
  border-left: 2px solid var(--blue);
  padding-left: 10px;
}

.ch-cat-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-cat-count {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 999px;
}

.ch-cat.active .ch-cat-count {
  background: rgba(232, 195, 106, 0.22);
  color: var(--gold-2);
}

.ch-stage {
  min-width: 0;
}

.ch-stage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.ch-stage-head h2 {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-count {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

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

.ch-card {
  position: relative;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ch-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 195, 106, 0.4);
  box-shadow: var(--shadow);
}

.ch-visual {
  aspect-ratio: 16 / 10;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  user-select: none;
}

.ch-visual.portrait {
  aspect-ratio: 2 / 3;
}

.ch-visual img,
.ch-visual .ch-img-slot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ch-visual.contain img,
.ch-visual.contain .ch-img-slot {
  object-fit: contain;
}

.ch-visual.contain .ch-img-slot img {
  object-fit: contain;
  padding: 0.75rem;
}

.ch-img-slot {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ch-img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shimmer {
  animation: ch-shimmer 1.2s ease-in-out infinite alternate;
}

@keyframes ch-shimmer {
  from { opacity: 0.45; }
  to { opacity: 0.9; }
}

.ch-more {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}

.ch-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.ch-ph {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(232, 195, 106, 0.35), rgba(76, 141, 255, 0.25));
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.ch-play {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.4);
  text-decoration: none;
  cursor: pointer;
}

.ch-card:hover .ch-play {
  background: rgba(0, 0, 0, 0.55);
}

.ch-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1406;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(232, 195, 106, 0.35);
}

.ch-play:hover .ch-play-btn {
  transform: scale(1.08);
}

.ch-play svg {
  width: 22px;
  height: 22px;
  margin-left: 2px;
  pointer-events: none;
}

.ch-body {
  padding: 10px 12px 12px;
}

.ch-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ch-meta {
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-rating {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold);
}

.ch-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 24px;
  color: var(--muted);
  text-align: center;
}

.ch-empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.hidden {
  display: none !important;
}

.ch-cat-hint,
.ch-mobile-toggle {
  display: none;
}

.ch-mobile-toggle {
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  position: sticky;
  top: 86px;
  z-index: 30;
}

.ch-mobile-toggle svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gold);
}

.ch-mobile-toggle .ch-chevron {
  margin-left: auto;
  color: var(--muted);
}

.ch-mobile-toggle span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  border: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ch-backdrop.visible {
  display: block;
  opacity: 1;
}

body.drawer-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .ch-pick {
    grid-template-columns: 1fr;
  }

  .ch-layout {
    display: block;
  }

  .ch-mobile-toggle,
  .ch-cat-hint {
    display: flex;
  }

  .ch-cat-hint {
    display: block;
    margin: 0 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
  }

  .ch-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: min(88vh, 720px);
    max-height: none;
    z-index: 1001;
    border-radius: 20px 20px 0 0;
    transform: translateY(110%);
    transition: transform 0.28s ease;
    margin: 0;
    pointer-events: none;
  }

  .ch-sidebar.open {
    transform: translateY(0);
    pointer-events: auto;
  }

  .ch-sidebar-close {
    display: grid;
    place-items: center;
  }

  .ch-cat-scroll {
    min-height: 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .ch-cat {
    min-height: 48px;
    font-size: 0.95rem;
  }

  .ch-play {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent 55%);
    align-items: flex-end;
    justify-content: flex-end;
    padding: 8px;
  }

  .ch-card:hover {
    transform: none;
  }

  .ch-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .ch-title {
    font-size: 0.72rem;
  }
}

@media (max-width: 600px) {
  .ch-search-hint {
    display: none;
  }

  .ch-mode {
    font-size: 0.82rem;
    padding: 0 8px;
  }

  .ch-mode svg {
    display: none;
  }

  .ch-search input {
    font-size: 16px;
  }
}
