/* ITAHUKA Video Platform v5.0.6 — mobile Home header and Schedule refinement.
   Loaded after v5.0.5. These rules are mobile/PWA and touch-tablet only. */

@media (max-width: 1180px), (max-width: 1600px) and (any-pointer: coarse) {
  /* Balanced three-zone app header: menu | centered identity | actions. */
  .site-header.yt-header .nav-shell {
    grid-template-columns: minmax(52px,1fr) auto minmax(92px,1fr) !important;
    gap: 0 !important;
    padding-inline: max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right)) !important;
  }
  .site-header.yt-header .header-left { display: contents !important; }
  .site-header.yt-header .menu-button {
    grid-column: 1 !important;
    justify-self: start !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  .site-header.yt-header .brand.yt-brand {
    grid-column: 2 !important;
    justify-self: center !important;
    width: auto !important;
    max-width: min(42vw,190px) !important;
    height: 50px !important;
    gap: 8px !important;
  }
  .site-header.yt-header .brand-logo-image,
  .site-header.yt-header .brand-logo-image img {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }
  .site-header.yt-header .site-logo-text {
    display: block !important;
    min-width: 0 !important;
  }
  .site-header.yt-header .site-logo-text strong {
    display: block !important;
    color: var(--it-app-text) !important;
    font-size: 18px !important;
    font-weight: 950 !important;
    letter-spacing: -.025em !important;
  }
  .site-header.yt-header .account-links {
    grid-column: 3 !important;
    justify-self: end !important;
    min-width: 0 !important;
    gap: 3px !important;
  }
  .site-header.yt-header .sign-in-button {
    width: auto !important;
    min-width: 68px !important;
    padding: 0 12px !important;
    border: 1px solid var(--it-app-border) !important;
    border-radius: 999px !important;
    background: var(--it-app-surface) !important;
    color: var(--it-app-text) !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
  }
  .site-header.yt-header .sign-in-button span { display: none !important; }

  /* Home/channel identity: no overlap, full-width subscription action. */
  .home-page .channel-page-head { padding-top: 4px !important; }
  .home-page .channel-profile-row {
    width: 100% !important;
    max-width: 760px !important;
    min-height: 0 !important;
    margin-inline: auto !important;
    padding: 13px 16px 12px !important;
    grid-template-columns: 62px minmax(0,1fr) !important;
    grid-template-rows: auto auto !important;
    column-gap: 13px !important;
    row-gap: 11px !important;
  }
  .home-page .channel-avatar-large {
    grid-row: 1 !important;
    align-self: center !important;
    width: 62px !important;
    height: 62px !important;
    min-width: 62px !important;
  }
  .home-page .channel-profile-copy { align-self: center !important; }
  .home-page .channel-profile-copy h1 {
    font-size: clamp(21px,3.4vw,26px) !important;
    line-height: 1.08 !important;
  }
  .home-page .channel-stats {
    max-width: 100% !important;
    font-size: 13px !important;
  }
  .home-page .subscribe-pill {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 48px !important;
    border-color: var(--it-app-accent) !important;
    background: var(--it-app-accent) !important;
    color: #fff !important;
    border-radius: 14px !important;
    font-size: 15px !important;
  }
  .home-page .subscribe-pill.subscribed {
    border-color: var(--it-app-border) !important;
    background: var(--it-app-surface-alt) !important;
    color: var(--it-app-text) !important;
  }
  .home-page .channel-tabs {
    padding-inline: 7px !important;
    border-top: 0 !important;
  }
  .home-page .channel-tabs a {
    min-width: 78px !important;
    min-height: 50px !important;
  }
  .home-page .channel-feature,
  .home-page .content-section {
    margin-top: 12px !important;
  }

  /* Schedule: one coherent mobile agenda with a full-width World Time rail. */
  .schedule-public-page .schedule-page {
    width: min(100%,980px) !important;
    max-width: 980px !important;
    margin-inline: auto !important;
    padding: 14px clamp(12px,2.5vw,22px) 26px !important;
  }
  .schedule-public-page .schedule-page-head {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: end !important;
    gap: 14px !important;
  }
  .schedule-public-page .schedule-timezone {
    width: auto !important;
    min-width: 210px !important;
    max-width: 290px !important;
  }
  .schedule-public-page .schedule-week-navigation {
    grid-template-columns: 42px minmax(0,1fr) 42px !important;
  }
  .schedule-public-page .schedule-week-arrow {
    width: 42px !important;
    min-width: 42px !important;
  }
  .schedule-public-page .schedule-dashboard {
    width: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    align-items: start !important;
    gap: 12px !important;
  }
  .schedule-public-page .schedule-list-panel {
    order: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }
  .schedule-public-page .schedule-now-column {
    order: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .schedule-public-page .schedule-now-column:empty { display: none !important; }
  .schedule-public-page .schedule-now-panel,
  .schedule-public-page .schedule-auto-card { display: none !important; }
  .schedule-public-page .schedule-world-panel {
    order: 2 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    float: none !important;
  }
  .schedule-public-page .schedule-day-list {
    min-height: 0 !important;
    padding: 4px 12px 8px 18px !important;
  }
  .schedule-public-page .schedule-day-list::before { left: 80px !important; }
  .schedule-public-page .schedule-list-row {
    min-height: 76px !important;
    grid-template-columns: 64px minmax(0,1fr) minmax(92px,auto) !important;
    gap: 12px !important;
    padding-block: 8px !important;
  }
  .schedule-public-page .schedule-list-row::before { left: 54px !important; }
  .schedule-public-page .schedule-list-row > time {
    color: var(--it-app-text) !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    line-height: 1.2 !important;
  }
  .schedule-public-page .schedule-list-copy h3 {
    font-size: 15px !important;
    line-height: 1.25 !important;
  }
  .schedule-public-page .schedule-row-action {
    min-width: 92px !important;
    max-width: 116px !important;
    min-height: 42px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    font-size: 10px !important;
    font-weight: 900 !important;
  }
  .schedule-public-page .schedule-world-grid {
    width: 100% !important;
    padding: 10px 12px 12px !important;
    grid-auto-columns: minmax(122px,1fr) !important;
  }
  .schedule-public-page .schedule-world-clock {
    min-height: 82px !important;
  }
}

@media (max-width: 720px) {
  .site-header.yt-header .nav-shell {
    grid-template-columns: 48px minmax(0,1fr) auto !important;
    padding-inline: 8px !important;
  }
  .site-header.yt-header .brand.yt-brand {
    max-width: 154px !important;
    gap: 7px !important;
  }
  .site-header.yt-header .brand-logo-image,
  .site-header.yt-header .brand-logo-image img {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
  }
  .site-header.yt-header .site-logo-text strong { font-size: 17px !important; }
  .site-header.yt-header .mobile-search-button { width: 42px !important; min-width: 42px !important; }
  .site-header.yt-header .sign-in-button { min-width: 62px !important; padding-inline: 9px !important; }

  .home-page .channel-profile-row {
    grid-template-columns: 58px minmax(0,1fr) !important;
    padding-inline: 13px !important;
  }
  .home-page .channel-avatar-large {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
  }
  .home-page .channel-tabs a { min-width: 72px !important; padding-inline: 9px !important; }

  .schedule-public-page .schedule-page-head {
    grid-template-columns: minmax(0,1fr) !important;
    gap: 10px !important;
  }
  .schedule-public-page .schedule-timezone {
    width: 100% !important;
    max-width: none !important;
  }
  .schedule-public-page .schedule-week-navigation {
    grid-template-columns: 40px minmax(0,1fr) 40px !important;
  }
  .schedule-public-page .schedule-week-arrow {
    width: 40px !important;
    min-width: 40px !important;
  }
  .schedule-public-page .schedule-week-strip button {
    flex-basis: 70px !important;
    min-width: 70px !important;
  }
  .schedule-public-page .schedule-list-row {
    min-height: 88px !important;
    grid-template-columns: 54px minmax(0,1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 6px 10px !important;
    align-items: center !important;
    padding: 9px 4px 9px 0 !important;
  }
  .schedule-public-page .schedule-day-list::before { left: 69px !important; }
  .schedule-public-page .schedule-list-row::before { left: 47px !important; }
  .schedule-public-page .schedule-list-row > time { grid-row: 1 / 3 !important; }
  .schedule-public-page .schedule-list-copy { grid-column: 2 !important; }
  .schedule-public-page .schedule-row-action {
    grid-column: 2 !important;
    justify-self: start !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 36px !important;
    padding-inline: 10px !important;
  }
  .schedule-public-page .schedule-world-grid {
    grid-auto-columns: minmax(116px,42vw) !important;
  }
}

@media (max-width: 390px) {
  .site-header.yt-header .site-logo-text strong { font-size: 16px !important; }
  .site-header.yt-header .brand.yt-brand { max-width: 142px !important; }
  .site-header.yt-header .account-links { gap: 0 !important; }
  .site-header.yt-header .sign-in-button { min-width: 58px !important; padding-inline: 7px !important; font-size: 12px !important; }
}
