/* ==========================================================================
   一覧系ページ — YouTube 風デザイン
   body.yt-pages を持つページ（トップ / チャンネル一覧 / タイムシフト / ブックマーク /
   マイページ / チャンネル管理）に適用。共通部品は app.css にある。
   style.css・mypage.css・channel.css の既存ルールを上書きするため、
   セレクタは body.yt-pages から始める。
   ========================================================================== */

/* --------------------------------------------------------------------------
   トップ（ホーム）
   -------------------------------------------------------------------------- */
body.yt-pages .yt-home-grid,
body.yt-pages #select_app.yt-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  width: auto;
  margin: 0;
  padding: 0;
  text-align: left;
}

body.yt-pages .yt-home-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  min-height: 132px;
  padding: 20px;
  border-radius: 12px;
  background: var(--yt-tonal);
  color: var(--yt-text);
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

body.yt-pages .yt-home-card:hover {
  background: var(--yt-tonal-hover);
  color: var(--yt-text);
}

body.yt-pages .yt-home-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--yt-bg);
  color: var(--yt-text);
}

body.yt-pages .yt-home-card-icon svg {
  width: 24px;
  height: 24px;
}

body.yt-pages .yt-home-card-label {
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
}

/* 未ログイン時 */
body.yt-pages .yt-home-guest,
body.yt-pages #select_app.yt-home-guest {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: auto;
  margin: 0;
  padding: 96px 0;
  text-align: center;
}

body.yt-pages .yt-home-guest-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -1.5px;
  color: var(--yt-text);
}

body.yt-pages .yt-home-guest-logo .yt-logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--yt-red);
  box-shadow: 0 0 0 6px rgba(255, 0, 0, 0.18);
}

body.yt-pages .yt-home-guest-actions {
  display: flex;
  gap: 12px;
}

@media (max-width: 1030px) {
  body.yt-pages .yt-home-grid,
  body.yt-pages #select_app.yt-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.yt-pages .yt-home-card {
    gap: 24px;
    min-height: 120px;
    padding: 16px;
  }

  body.yt-pages .yt-home-guest-logo {
    font-size: 36px;
  }
}

/* --------------------------------------------------------------------------
   チャンネル一覧（配信者 / 視聴者）
   -------------------------------------------------------------------------- */
body.yt-channels #ch-list {
  width: auto;
  margin: 0;
  padding: 0;
}

/* style.css の #add-ch / #register-ch（白背景）を ID で上書き */
body.yt-channels #add-ch,
body.yt-channels #register-ch {
  height: 36px;
  padding: 0 16px 0 12px;
  border-radius: 18px;
  background: var(--yt-text);
  color: #fff;
  font-size: 14px;
  line-height: 36px;
}

body.yt-channels #add-ch:hover,
body.yt-channels #register-ch:hover {
  background: #272727;
  color: #fff;
}

body.yt-channels .channel-card {
  position: relative;
  margin: 0 0 4px;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: none;
  transition: background-color 0.15s ease;
}

body.yt-channels .channel-card:hover {
  background: var(--yt-tonal);
  box-shadow: none;
  transform: none;
}

body.yt-channels .channel-card a {
  display: block;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}

body.yt-channels .channel-card-content {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px;
}

body.yt-channels .channel-card:has(.channel-manage-link) .channel-card-content {
  padding-right: 72px;
}

body.yt-channels .host-avatar {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: var(--yt-avatar-bg);
  flex-shrink: 0;
}

body.yt-channels .host-avatar-live {
  border: none;
  box-shadow: 0 0 0 3px var(--yt-bg), 0 0 0 5px var(--yt-live);
}

body.yt-channels .host-avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

body.yt-channels .host-avatar-text {
  font-size: 36px;
  font-weight: 500;
  color: #fff;
}

body.yt-channels .live-indicator-dot {
  display: none;
}

body.yt-channels .channel-card-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
  flex: 1;
  min-width: 0;
}

body.yt-channels .channel-card-header {
  order: 1;
  flex-basis: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

body.yt-channels .channel-card-name {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
  color: var(--yt-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.yt-channels .live-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 4px;
  border-radius: 2px;
  background: var(--yt-live);
  flex-shrink: 0;
}

body.yt-channels .live-badge-dot {
  display: none;
}

body.yt-channels .live-badge span {
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  line-height: 18px;
}

body.yt-channels .type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
  color: var(--yt-text-2);
  flex-shrink: 0;
}

body.yt-channels .type-badge svg,
body.yt-channels .type-badge-live svg,
body.yt-channels .type-badge-rtc svg {
  width: 16px;
  height: 16px;
  color: var(--yt-text-2);
  stroke: currentColor;
}

body.yt-channels .channel-card-meta,
body.yt-channels .channel-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--yt-text-2);
  font-size: 13px;
  line-height: 18px;
}

body.yt-channels .channel-card-meta {
  order: 2;
}

body.yt-channels .channel-stats {
  order: 3;
}

body.yt-channels .host-name-container,
body.yt-channels .channel-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--yt-text-2);
}

body.yt-channels .host-name-container svg,
body.yt-channels .channel-stat-item svg {
  width: 14px;
  height: 14px;
  color: var(--yt-text-2);
}

body.yt-channels .host-name-container span,
body.yt-channels .channel-stat-item span,
body.yt-channels .more-hosts {
  color: var(--yt-text-2);
  font-size: 13px;
  font-weight: 400;
}

body.yt-channels .channel-card-description {
  order: 4;
  flex-basis: 100%;
  margin: 4px 0 0;
  color: var(--yt-text-2);
  font-size: 13px;
  line-height: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

body.yt-channels .channel-card-arrow {
  display: none;
}

/* チャンネル管理（歯車）ボタン */
body.yt-channels .channel-manage-link {
  position: absolute;
  top: 50%;
  right: 16px;
  bottom: auto;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border-radius: 50%;
  background: transparent;
  transform: none;
}

body.yt-channels .channel-manage-link:hover {
  background: var(--yt-tonal-hover);
  transform: none;
}

body.yt-channels .channel-manage-link svg,
body.yt-channels .channel-manage-link:hover svg {
  width: 22px;
  height: 22px;
  color: var(--yt-text);
}

@media (max-width: 1030px) {
  body.yt-channels .channel-card-content {
    gap: 16px;
    padding: 12px;
  }

  body.yt-channels .channel-card:has(.channel-manage-link) .channel-card-content {
    padding-right: 60px;
  }

  body.yt-channels .host-avatar {
    width: 56px;
    height: 56px;
  }

  body.yt-channels .host-avatar-text {
    font-size: 24px;
  }

  body.yt-channels .channel-card-name {
    font-size: 16px;
    line-height: 22px;
  }

  body.yt-channels .channel-card-meta,
  body.yt-channels .channel-stats,
  body.yt-channels .channel-card-description {
    font-size: 12px;
  }

  body.yt-channels .channel-manage-link {
    right: 8px;
  }
}

/* --------------------------------------------------------------------------
   動画グリッド（タイムシフト / ブックマーク）
   -------------------------------------------------------------------------- */
body.yt-videos #select-ch {
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  margin: 0 0 24px;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: transparent;
  border: none;
}

body.yt-videos #select-ch::-webkit-scrollbar {
  display: none;
}

body.yt-videos .ch-name-button {
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: auto;
  height: 32px;
  margin: 0;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  background: var(--yt-tonal);
  color: var(--yt-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 32px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  user-select: none;
  transition: background-color 0.15s ease;
}

body.yt-videos .ch-name-button:hover {
  background: var(--yt-tonal-hover);
  color: var(--yt-text);
}

body.yt-videos .ch-name-button:focus-visible {
  outline: 2px solid var(--yt-blue);
  outline-offset: 2px;
}

body.yt-videos .ch-name-button.selected-ch {
  background: var(--yt-text);
  color: #fff;
}

body.yt-videos #ch-container {
  width: auto;
  margin: 0;
  padding: 0;
}

body.yt-videos .archive-count-container {
  margin: 0 0 16px;
  padding: 0;
  text-align: left;
}

body.yt-videos .archive-total-count {
  color: var(--yt-text-2);
  font-size: 14px;
  font-weight: 400;
}

/* JS が選択中のグリッドに style.display = 'flex' を設定するため、grid ではなく flex で組む */
body.yt-videos .archive-grid-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 40px 16px;
  padding: 0;
}

/* チャンネル切り替えで読み込み中 */
body.yt-videos .archive-grid-container.is-loading {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

body.yt-videos .archive-empty {
  width: 100%;
}

body.yt-videos .archive-card {
  position: relative;
  width: calc((100% - 32px) / 3);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform: none;
  container-type: inline-size;
}

body.yt-videos .archive-card:hover {
  box-shadow: none;
  transform: none;
}

body.yt-videos .archive-card a {
  display: block;
  border-radius: 0;
  color: inherit;
  text-decoration: none;
}

body.yt-videos .archive-thumbnail-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #e5e5e5;
  overflow: hidden;
}

body.yt-videos .archive-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.2s ease;
}

body.yt-videos .archive-card:hover .archive-thumbnail-container {
  border-radius: 0;
  transition: border-radius 0.2s ease;
}

body.yt-videos .archive-thumbnail-placeholder {
  background: #e5e5e5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23909090' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='23 7 16 12 23 17 23 7'/%3E%3Crect x='1' y='5' width='15' height='14' rx='2' ry='2'/%3E%3C/svg%3E") center / 48px no-repeat;
}

body.yt-videos .archive-thumbnail-placeholder span {
  display: none;
}

body.yt-videos .archive-duration-badge {
  bottom: 8px;
  right: 8px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

body.yt-videos .archive-manager-badge {
  top: 8px;
  left: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

body.yt-videos .archive-card-info {
  padding: 12px 36px 0 0;
}

body.yt-videos .archive-channel-host-row {
  display: block;
  margin: 0;
  overflow: visible;
}

body.yt-videos .archive-channel-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  color: var(--yt-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  white-space: normal;
}

body.yt-videos .archive-separator {
  display: none;
}

body.yt-videos .archive-host-name,
body.yt-videos .archive-date {
  display: block;
  color: var(--yt-text-2);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 「︙」メニュー（サムネイル下の右端） */
body.yt-videos .archive-card .archive-menu-container {
  position: absolute;
  top: calc(56.25cqw + 6px);
  right: -8px;
  z-index: 3;
}

body.yt-videos .archive-card .menu-button {
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230f0f0f'%3E%3Ccircle cx='12' cy='5' r='1.8'/%3E%3Ccircle cx='12' cy='12' r='1.8'/%3E%3Ccircle cx='12' cy='19' r='1.8'/%3E%3C/svg%3E") center / 22px no-repeat;
  cursor: pointer;
}

body.yt-videos .archive-card .menu-button:hover {
  background-color: var(--yt-tonal-hover);
}

body.yt-videos .archive-card .menu-button div {
  display: none;
}

body.yt-videos .archive-menu {
  position: absolute;
  top: 40px;
  right: 0;
  height: 40px;
  min-width: 168px;
  margin: 0;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: var(--yt-bg);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  color: var(--yt-text);
  font-size: 14px;
  line-height: 40px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

body.yt-videos .archive-menu:hover {
  background: #f2f2f2;
}

body.yt-videos #load-more-container {
  display: flex;
  justify-content: center;
  padding: 32px 0 0;
}

body.yt-videos .load-more-btn.yt-btn {
  width: auto;
  padding: 0 24px;
  border: none;
  border-radius: 18px;
  background: var(--yt-tonal);
  color: var(--yt-text);
  font-size: 14px;
  box-shadow: none;
}

body.yt-videos .load-more-btn.yt-btn:hover {
  background: var(--yt-tonal-hover);
}

/* ブックマークが空 */
body.yt-videos .empty-bookmark-message {
  width: 100%;
  padding: 64px 16px;
  color: var(--yt-text-2);
}

body.yt-videos .empty-bookmark-message svg {
  width: 72px;
  height: 72px;
  margin-bottom: 8px;
  stroke: #909090;
}

body.yt-videos .empty-bookmark-message p {
  margin: 0;
  color: var(--yt-text);
  font-size: 18px;
  font-weight: 500;
}

body.yt-videos .empty-bookmark-message .empty-bookmark-sub {
  margin-top: 8px;
  color: var(--yt-text-2);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

/* ブックマーク解除の確認ダイアログ */
body.yt-videos .confirm-modal-container {
  max-width: 400px;
  padding: 24px 24px 16px;
  text-align: left;
}

body.yt-videos .confirm-modal-icon {
  display: none;
}

body.yt-videos .confirm-modal-title {
  margin-bottom: 12px;
}

body.yt-videos .confirm-modal-buttons {
  justify-content: flex-end;
  padding: 16px 0 0;
}

body.yt-videos .confirm-modal-btn {
  flex: 0 0 auto;
}

@media (min-width: 1400px) {
  body.yt-videos .archive-card {
    width: calc((100% - 48px) / 4);
  }
}

@media (max-width: 1030px) {
  body.yt-videos #select-ch {
    gap: 8px;
    margin: 0 -12px 16px;
    padding: 0 12px;
  }

  body.yt-videos .archive-grid-container {
    gap: 24px 12px;
  }

  body.yt-videos .archive-card {
    width: calc((100% - 12px) / 2);
  }
}

/* スマホ縦：1 列でサムネイルを大きく（YouTube モバイル風） */
@media (max-width: 600px) {
  body.yt-videos .archive-grid-container {
    gap: 20px;
  }

  body.yt-videos .archive-card {
    width: 100%;
  }

  body.yt-videos .archive-card-info {
    padding: 10px 36px 0 0;
  }

  body.yt-videos .archive-channel-name {
    font-size: 15px;
    line-height: 21px;
  }

  body.yt-videos .archive-host-name,
  body.yt-videos .archive-date {
    font-size: 12px;
    line-height: 18px;
  }

  body.yt-videos .archive-card .archive-menu-container {
    top: calc(56.25cqw + 4px);
  }
}

/* --------------------------------------------------------------------------
   マイページ
   -------------------------------------------------------------------------- */
body.yt-mypage {
  background: var(--yt-bg);
}

body.yt-mypage .profile-header {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 24px;
  row-gap: 8px;
  margin: 0 0 32px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  animation: none;
}

body.yt-mypage .profile-avatar {
  grid-row: 1 / span 2;
  width: 120px;
  height: 120px;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: var(--yt-avatar-bg);
  box-shadow: none;
}

body.yt-mypage .profile-avatar-text {
  color: #fff;
  font-size: 52px;
  font-weight: 500;
}

body.yt-mypage .profile-username {
  align-self: end;
  margin: 0;
  color: var(--yt-text);
  font-size: 36px;
  font-weight: 700;
  line-height: 44px;
  word-break: break-all;
}

body.yt-mypage .profile-role-badge {
  align-self: start;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  margin: 0;
  padding: 0 12px;
  border: none;
  border-radius: 14px;
  background: var(--yt-tonal);
  color: var(--yt-text);
  font-size: 13px;
  font-weight: 500;
}

body.yt-mypage .profile-role-badge svg {
  width: 16px;
  height: 16px;
  color: var(--yt-text);
}

body.yt-mypage .info-card {
  margin: 0 0 16px;
  padding: 0;
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  background: var(--yt-bg);
  box-shadow: none;
  overflow: hidden;
  animation: none;
}

body.yt-mypage .info-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--yt-border);
  background: transparent;
}

body.yt-mypage .info-card-header svg {
  width: 20px;
  height: 20px;
  color: var(--yt-text);
}

body.yt-mypage .info-card-title {
  color: var(--yt-text);
  font-size: 16px;
  font-weight: 500;
}

body.yt-mypage .info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 14px 24px;
  border-bottom: 1px solid var(--yt-border);
  border-radius: 0;
  background: transparent;
}

body.yt-mypage .info-item:last-child {
  border-bottom: none;
}

body.yt-mypage .info-item:hover {
  background: var(--yt-tonal);
}

body.yt-mypage .info-icon {
  width: 24px;
  height: 24px;
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: var(--yt-text-2);
  flex-shrink: 0;
}

body.yt-mypage .info-icon svg {
  width: 20px;
  height: 20px;
  color: var(--yt-text-2);
}

/* Google アカウント設定風：左にラベル、右に値 */
body.yt-mypage .info-content {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

body.yt-mypage .info-label {
  flex: 0 0 180px;
  margin: 0;
  color: var(--yt-text-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

body.yt-mypage .info-value {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--yt-text);
  font-size: 15px;
  font-weight: 400;
  word-break: break-all;
}

body.yt-mypage .info-value.empty {
  color: #909090;
  font-style: normal;
}

body.yt-mypage .logout-section {
  display: flex;
  justify-content: flex-start;
  margin: 24px 0 0;
  padding: 0;
  animation: none;
}

body.yt-mypage .logout-btn.yt-btn {
  width: auto;
  padding: 0 16px 0 12px;
  border: none;
  border-radius: 18px;
  background: var(--yt-tonal);
  color: var(--yt-text);
  box-shadow: none;
}

body.yt-mypage .logout-btn.yt-btn:hover {
  background: var(--yt-tonal-hover);
  color: var(--yt-text);
  transform: none;
}

body.yt-mypage .logout-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 1030px) {
  body.yt-mypage .profile-header {
    column-gap: 16px;
    row-gap: 6px;
    margin-bottom: 24px;
  }

  body.yt-mypage .profile-avatar {
    width: 72px;
    height: 72px;
  }

  body.yt-mypage .profile-avatar-text {
    font-size: 32px;
  }

  body.yt-mypage .profile-username {
    font-size: 24px;
    line-height: 30px;
  }

  body.yt-mypage .info-card-header,
  body.yt-mypage .info-item {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.yt-mypage .info-content {
    flex-direction: column;
    gap: 2px;
  }

  body.yt-mypage .info-label {
    flex-basis: auto;
    font-size: 12px;
  }
}

/* --------------------------------------------------------------------------
   チャンネル管理（YouTube のチャンネルページ風）
   -------------------------------------------------------------------------- */
body.yt-channel {
  min-height: 100vh;
  background: var(--yt-bg);
  color: var(--yt-text);
}

body.yt-channel .ctrl-header.yt-masthead {
  position: fixed;
  top: 0;
  padding: 0 16px;
  border-bottom: none;
}

body.yt-channel .ctrl-header-left.yt-masthead-start {
  gap: 12px;
}

body.yt-channel .ctrl-back-btn.yt-btn {
  padding: 0 14px 0 8px;
  font-size: 14px;
  color: var(--yt-text);
  background: transparent;
}

body.yt-channel .ctrl-back-btn.yt-btn:hover {
  background: var(--yt-tonal-hover);
}

body.yt-channel .ctrl-back-btn svg {
  width: 22px;
  height: 22px;
}

body.yt-channel .ctrl-logo.yt-logo {
  font-size: 20px;
}

body.yt-channel .ctrl-start-btn.yt-btn {
  padding: 0 16px 0 12px;
  border-radius: 18px;
  font-size: 14px;
  box-shadow: none;
}

body.yt-channel .ctrl-start-btn svg {
  width: 18px;
  height: 18px;
}

body.yt-channel .ctrl-channel-info {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1072px;
  margin: 0 auto;
  padding: calc(var(--yt-masthead-h) + 32px) 24px 24px;
  background: transparent;
  border: none;
  text-align: left;
}

body.yt-channel .yt-channel-avatar {
  width: 96px;
  height: 96px;
  font-size: 40px;
}

body.yt-channel .yt-channel-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

body.yt-channel .ctrl-channel-name {
  margin: 0;
  text-align: left;
  color: var(--yt-text);
  font-size: 32px;
  font-weight: 700;
  line-height: 40px;
  word-break: break-word;
}

body.yt-channel .ctrl-channel-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--yt-text-2);
  font-size: 14px;
  font-weight: 400;
}

body.yt-channel .ctrl-channel-type svg {
  width: 16px;
  height: 16px;
  color: var(--yt-text-2);
}

/* タブ（YouTube のチャンネルタブ風：下線） */
body.yt-channel .ctrl-tabs {
  display: flex;
  gap: 8px;
  max-width: 1072px;
  margin: 0 auto;
  padding: 0 24px;
  border-bottom: 1px solid var(--yt-border);
  background: transparent;
  overflow-x: auto;
  scrollbar-width: none;
  box-sizing: border-box;
}

body.yt-channel .ctrl-tabs::-webkit-scrollbar {
  display: none;
}

body.yt-channel .ctrl-tab {
  position: relative;
  flex-shrink: 0;
  height: 48px;
  padding: 0 12px;
  color: var(--yt-text-2);
  font-size: 16px;
  font-weight: 500;
  line-height: 48px;
}

body.yt-channel .ctrl-tab:hover {
  color: var(--yt-text);
}

body.yt-channel .ctrl-tab:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #909090;
}

body.yt-channel .ctrl-tab.active {
  height: 48px;
  color: var(--yt-text);
}

body.yt-channel .ctrl-tab.active::after {
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 0;
  background: var(--yt-text);
}

body.yt-channel .ctrl-main {
  max-width: 1072px;
  padding: 24px 24px 48px;
}

body.yt-channel .ctrl-section-title,
body.yt-channel .settings-section-header {
  margin: 0 0 12px;
  color: var(--yt-text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

body.yt-channel .settings-section-icon {
  color: var(--yt-text);
}

body.yt-channel .ctrl-card,
body.yt-channel .settings-card {
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  background: var(--yt-bg);
  box-shadow: none;
}

body.yt-channel .ctrl-card:hover {
  border-color: var(--yt-border);
}

body.yt-channel .ctrl-card + .ctrl-card {
  margin-top: 12px;
}

body.yt-channel .ctrl-member-item {
  border-radius: 8px;
}

body.yt-channel .ctrl-member-item:hover {
  background: var(--yt-tonal);
}

body.yt-channel .ctrl-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

body.yt-channel .ctrl-member-name {
  color: var(--yt-text);
  font-size: 14px;
  font-weight: 500;
}

body.yt-channel .ctrl-invite-title {
  color: var(--yt-text);
  font-size: 16px;
  font-weight: 500;
}

body.yt-channel .ctrl-invite-number {
  background: var(--yt-text);
  color: #fff;
}

body.yt-channel .ctrl-invite-desc,
body.yt-channel .settings-item-hint,
body.yt-channel .settings-item-desc {
  color: var(--yt-text-2);
}

body.yt-channel .ctrl-invite-value {
  border: none;
  border-radius: 8px;
  background: var(--yt-tonal);
  color: var(--yt-text);
}

body.yt-channel .ctrl-copy-btn.yt-btn {
  height: 32px;
  padding: 0 14px;
  border: none;
  border-radius: 16px;
  background: var(--yt-text);
  color: #fff;
  font-size: 13px;
  line-height: 32px;
}

body.yt-channel .ctrl-copy-btn.yt-btn:hover {
  background: #272727;
  color: #fff;
}

body.yt-channel .ctrl-copy-btn.copied {
  background: var(--yt-tonal-hover);
  color: var(--yt-text);
}

body.yt-channel .ctrl-form-label,
body.yt-channel .settings-item-label {
  color: var(--yt-text);
  font-weight: 500;
}

body.yt-channel .settings-form label:hover {
  background: transparent;
}

/* 入力欄（Django フォームのウィジェット含む） */
body.yt-channel .ctrl-form-input,
body.yt-channel .ctrl-form-textarea,
body.yt-channel .settings-item-input input,
body.yt-channel .settings-item-input textarea {
  border: 1px solid #ccc;
  border-radius: 8px;
  background: var(--yt-bg);
  color: var(--yt-text);
  font-family: inherit;
  font-size: 15px;
  box-shadow: none;
}

body.yt-channel .ctrl-form-input:hover,
body.yt-channel .ctrl-form-textarea:hover,
body.yt-channel .settings-item-input input:hover,
body.yt-channel .settings-item-input textarea:hover {
  border-color: #909090;
}

body.yt-channel .ctrl-form-input:focus,
body.yt-channel .ctrl-form-textarea:focus,
body.yt-channel .settings-item-input input:focus,
body.yt-channel .settings-item-input textarea:focus {
  outline: none;
  border-color: var(--yt-blue);
  box-shadow: 0 0 0 1px var(--yt-blue);
  background: var(--yt-bg);
}

body.yt-channel .settings-item-select select,
body.yt-channel .settings-item-select #id_type {
  border: 1px solid #ccc !important;
  border-radius: 8px !important;
  background-color: var(--yt-bg) !important;
  color: var(--yt-text) !important;
  font-family: inherit;
}

body.yt-channel .settings-item-select select:focus {
  border-color: var(--yt-blue) !important;
  box-shadow: 0 0 0 1px var(--yt-blue);
}

body.yt-channel .settings-item-icon {
  background: var(--yt-tonal);
  color: var(--yt-text);
}

body.yt-channel .settings-divider {
  background: var(--yt-border);
}

/* トグル（ON は青） */
body.yt-channel .toggle-switch input:checked + .toggle-slider,
body.yt-channel .toggle-switch input:checked + .toggle-slider:hover {
  background-color: var(--yt-blue);
}

body.yt-channel .toggle-switch:focus-within .toggle-slider {
  box-shadow: 0 0 0 3px rgba(6, 95, 212, 0.2);
}

body.yt-channel .ctrl-submit-btn.yt-btn,
body.yt-channel .settings-save-btn.yt-btn {
  padding: 0 20px 0 16px;
  border-radius: 18px;
  font-size: 14px;
  box-shadow: none;
  transform: none;
}

body.yt-channel .settings-save-btn.yt-btn:hover,
body.yt-channel .ctrl-submit-btn.yt-btn:hover {
  transform: none;
  box-shadow: none;
}

body.yt-channel .ctrl-coming-soon-title {
  color: var(--yt-text);
}

body.yt-channel .ctrl-coming-soon-desc,
body.yt-channel .ctrl-coming-soon-icon {
  color: var(--yt-text-2);
}

@media (max-width: 1030px) {
  body.yt-channel .ctrl-header.yt-masthead {
    padding: 0 8px 0 4px;
  }

  body.yt-channel .ctrl-header-left.yt-masthead-start {
    gap: 4px;
  }

  /* スマホでは「一覧に戻る」を矢印アイコンだけに */
  body.yt-channel .ctrl-back-btn.yt-btn {
    width: 40px;
    padding: 0;
    border-radius: 50%;
  }

  body.yt-channel .ctrl-back-btn span {
    display: none;
  }

  body.yt-channel .ctrl-logo.yt-logo {
    font-size: 18px;
  }

  body.yt-channel .ctrl-start-btn.yt-btn {
    height: 34px;
    padding: 0 14px 0 10px;
    font-size: 13px;
  }

  body.yt-channel .ctrl-channel-info {
    gap: 16px;
    padding: calc(var(--yt-masthead-h) + 20px) 16px 16px;
  }

  body.yt-channel .yt-channel-avatar {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }

  body.yt-channel .ctrl-channel-name {
    font-size: 22px;
    line-height: 28px;
  }

  body.yt-channel .ctrl-tabs {
    gap: 0;
    padding: 0 4px;
  }

  body.yt-channel .ctrl-tab {
    font-size: 14px;
  }

  body.yt-channel .ctrl-main {
    padding: 16px 16px 32px;
  }
}
