/* ITAHUKA Video Platform v5.0.14 — Fullscreen Mac Dock
   Mobile/touch public experience: the player is the fixed full-viewport base;
   top, bottom and action menus behave like compact responsive macOS-style
   docks and auto-hide after inactivity. */

@media (max-width: 1180px), (pointer: coarse) {
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock {
    --it-v514-vh: 100dvh;
    --it-v514-safe-top: env(safe-area-inset-top, 0px);
    --it-v514-safe-right: env(safe-area-inset-right, 0px);
    --it-v514-safe-bottom: env(safe-area-inset-bottom, 0px);
    --it-v514-safe-left: env(safe-area-inset-left, 0px);
    --it-v514-dock-bg: rgba(8, 10, 16, .48);
    --it-v514-dock-bg-strong: rgba(8, 10, 16, .72);
    --it-v514-dock-border: rgba(255,255,255,.13);
    --it-v514-dock-shadow: 0 20px 50px rgba(0,0,0,.34);
    --it-v514-accent: var(--it-theme-accent, #ef233c);
    width: 100vw !important;
    height: var(--it-v514-vh) !important;
    min-height: var(--it-v514-vh) !important;
    margin: 0 !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    background: #000 !important;
    touch-action: manipulation;
  }

  html:has(body.it-fullscreen-mac-dock) {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    background: #000 !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .site-content.public-content,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .page-space,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .page-space > .container,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-canvas-root {
    position: fixed !important;
    inset: 0 !important;
    z-index: 0 !important;
    width: 100vw !important;
    height: var(--it-v514-vh) !important;
    min-width: 100vw !important;
    min-height: var(--it-v514-vh) !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    background: #000 !important;
  }

  /* The live/playback player is always the permanent page background. */
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-unified-video-base,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-fullscreen-player-root,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-live-player-card,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .broadcast-watch-player-card,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-overlay-media-shell,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-overlay-stage {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1 !important;
    width: 100vw !important;
    height: var(--it-v514-vh) !important;
    min-width: 100vw !important;
    min-height: var(--it-v514-vh) !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    background: #000 !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .itahuka-linear-player,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .itahuka-player-stage,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .itahuka-provider-host,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-overlay-stage-media,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-overlay-player,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-overlay-poster,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-unified-video-poster {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background-color: #000 !important;
    background-position: center !important;
    background-size: cover !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .itahuka-provider-host iframe,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-unified-video-frame,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock iframe.mobile-overlay-player {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: max(100vw, calc(var(--it-v514-vh) * 16 / 9)) !important;
    height: max(var(--it-v514-vh), calc(100vw * 9 / 16)) !important;
    min-width: 100vw !important;
    min-height: var(--it-v514-vh) !important;
    max-width: none !important;
    max-height: none !important;
    transform: translate3d(-50%, -50%, 0) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock video,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .itahuka-player-stage video {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    background: #000 !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock[data-video-fit="contain"] .itahuka-provider-host iframe,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock[data-video-fit="contain"] .it-unified-video-frame,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock[data-video-fit="contain"] iframe.mobile-overlay-player {
    width: 100vw !important;
    height: min(var(--it-v514-vh), calc(100vw * 9 / 16)) !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  /* Remove normal page framing from all unified mobile routes. */
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .site-header.yt-header,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .site-footer,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .global-live-alert,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .broadcast-home-alert,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .channel-page-head,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .flash-wrap {
    display: none !important;
  }

  /* macOS-like top dock. */
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-head {
    position: fixed !important;
    top: calc(10px + var(--it-v514-safe-top)) !important;
    right: max(10px, var(--it-v514-safe-right)) !important;
    left: max(10px, var(--it-v514-safe-left)) !important;
    z-index: 6400 !important;
    width: auto !important;
    max-width: none !important;
    padding: 7px !important;
    border: 1px solid var(--it-v514-dock-border) !important;
    border-radius: 22px !important;
    background: var(--it-v514-dock-bg) !important;
    box-shadow: var(--it-v514-dock-shadow) !important;
    backdrop-filter: blur(22px) saturate(1.25) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.25) !important;
    transform: translate3d(0,0,0) !important;
    opacity: 1 !important;
    transition: opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1) !important;
    pointer-events: none !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-head > *,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-head a,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-head button {
    pointer-events: auto !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-row {
    display: grid !important;
    grid-template-columns: 42px minmax(90px, auto) auto auto 42px !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-back,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-kebab,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-pill {
    min-width: 38px !important;
    min-height: 38px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 15px !important;
    background: rgba(255,255,255,.055) !important;
    color: #fff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
    transition: transform .18s ease, background .18s ease !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-back:hover,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-kebab:hover,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-back:focus-visible,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-kebab:focus-visible {
    transform: translateY(-2px) scale(1.08) !important;
    background: rgba(255,255,255,.11) !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-brand {
    min-width: 0 !important;
    padding: 0 7px !important;
    overflow: hidden !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-title-row {
    margin-top: 6px !important;
    padding: 6px 10px !important;
    border-radius: 15px !important;
    background: rgba(0,0,0,.18) !important;
    border: 1px solid rgba(255,255,255,.06) !important;
  }

  /* Responsive floating Mac dock at bottom. */
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav {
    position: fixed !important;
    inset: auto auto calc(10px + var(--it-v514-safe-bottom)) 50% !important;
    z-index: 6500 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    gap: clamp(3px, 1vw, 8px) !important;
    width: max-content !important;
    max-width: calc(100vw - var(--it-v514-safe-left) - var(--it-v514-safe-right) - 20px) !important;
    min-height: 66px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 7px 8px !important;
    overflow: visible !important;
    border: 1px solid var(--it-v514-dock-border) !important;
    border-radius: 24px !important;
    background: var(--it-v514-dock-bg) !important;
    box-shadow: var(--it-v514-dock-shadow) !important;
    backdrop-filter: blur(24px) saturate(1.3) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.3) !important;
    transform: translate3d(-50%,0,0) !important;
    transform-origin: center bottom !important;
    opacity: 1 !important;
    transition: opacity .2s ease, transform .25s cubic-bezier(.2,.8,.2,1) !important;
    scrollbar-width: none !important;
  }
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav::-webkit-scrollbar { display: none !important; }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a {
    position: relative !important;
    flex: 0 0 auto !important;
    display: grid !important;
    place-items: center !important;
    gap: 0 !important;
    width: clamp(48px, 8vw, 58px) !important;
    height: clamp(48px, 8vw, 58px) !important;
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 1px solid rgba(255,255,255,.075) !important;
    border-radius: 17px !important;
    background: rgba(255,255,255,.035) !important;
    color: rgba(255,255,255,.82) !important;
    text-decoration: none !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.045) !important;
    transform: translate3d(0,0,0) scale(1) !important;
    transform-origin: center bottom !important;
    transition: transform .16s cubic-bezier(.2,.9,.2,1.2), background .16s ease, color .16s ease, border-color .16s ease !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a > span {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 100% !important;
    font-size: clamp(21px, 4.2vw, 27px) !important;
    line-height: 1 !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a > b {
    position: absolute !important;
    bottom: calc(100% + 9px) !important;
    left: 50% !important;
    z-index: 3 !important;
    display: block !important;
    width: max-content !important;
    max-width: 130px !important;
    padding: 6px 9px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 9px !important;
    background: rgba(5,7,11,.86) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.28) !important;
    backdrop-filter: blur(14px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate3d(-50%,8px,0) scale(.94) !important;
    transition: opacity .15s ease, transform .15s ease !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a:hover,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a:focus-visible,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a.is-dock-pressed {
    z-index: 2 !important;
    color: #fff !important;
    background: rgba(255,255,255,.11) !important;
    border-color: rgba(255,255,255,.18) !important;
    transform: translate3d(0,-8px,0) scale(1.18) !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a:hover > b,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a:focus-visible > b,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a.is-dock-pressed > b {
    opacity: 1 !important;
    transform: translate3d(-50%,0,0) scale(1) !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a.active,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a[aria-current="page"] {
    color: #fff !important;
    background: color-mix(in srgb, var(--it-v514-accent) 72%, rgba(8,10,16,.42)) !important;
    border-color: color-mix(in srgb, var(--it-v514-accent) 72%, rgba(255,255,255,.18)) !important;
    box-shadow: 0 10px 26px color-mix(in srgb, var(--it-v514-accent) 26%, transparent), inset 0 1px 0 rgba(255,255,255,.15) !important;
  }

  /* Right action rail is a vertical mini dock. */
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-live-action-group {
    position: fixed !important;
    top: 50% !important;
    right: calc(10px + var(--it-v514-safe-right)) !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 6350 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: auto !important;
    height: auto !important;
    padding: 6px !important;
    border: 1px solid var(--it-v514-dock-border) !important;
    border-radius: 22px !important;
    background: var(--it-v514-dock-bg) !important;
    box-shadow: var(--it-v514-dock-shadow) !important;
    backdrop-filter: blur(22px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.2) !important;
    transform: translate3d(0,-50%,0) !important;
    opacity: 1 !important;
    transition: opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1) !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-live-action {
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    border-radius: 15px !important;
    background: rgba(255,255,255,.04) !important;
    transform: scale(1) !important;
    transition: transform .16s ease, background .16s ease !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-live-action:hover,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-live-action:focus-visible {
    background: rgba(255,255,255,.11) !important;
    transform: translateX(-4px) scale(1.12) !important;
  }

  /* Auto-hide all menu docks, while preserving the player and content overlays. */
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock.is-mac-dock-hidden .mobile-bottom-nav {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate3d(-50%, calc(100% + 34px), 0) scale(.96) !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock.is-mac-dock-hidden .mobile-live-overlay-head {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate3d(0, calc(-100% - 24px), 0) scale(.98) !important;
  }

  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock.is-mac-dock-hidden .it-live-action-group {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate3d(calc(100% + 30px), -50%, 0) scale(.96) !important;
  }

  .it-mac-dock-reveal-zone {
    position: fixed;
    z-index: 6499;
    pointer-events: auto;
    background: transparent;
  }
  .it-mac-dock-reveal-zone--top {
    top: 0;
    right: 0;
    left: 0;
    height: max(12px, var(--it-v514-safe-top));
  }
  .it-mac-dock-reveal-zone--bottom {
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(14px + var(--it-v514-safe-bottom));
  }
  .it-mac-dock-reveal-zone--right {
    top: 28%;
    right: 0;
    bottom: 28%;
    width: max(10px, var(--it-v514-safe-right));
  }

  /* Keep content overlays above the player but below menu docks. */
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-live-overlay-shell,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-live-overlay-tray,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-community-chat,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-live-chat-column,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-v509-heat-field,
  body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-floaters {
    z-index: 2000 !important;
  }

  /* Touch screens: show label only on active/pressed item, keeping the dock compact. */
  @media (hover: none) {
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a > b {
      display: none !important;
    }
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a.is-dock-pressed > b {
      display: block !important;
    }
  }

  /* Landscape iPad/tablet dock is narrower and more Mac-like. */
  @media (orientation: landscape) and (min-width: 700px) {
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav {
      width: max-content !important;
      max-width: min(72vw, 760px) !important;
      min-height: 60px !important;
      padding: 6px 8px !important;
      border-radius: 22px !important;
    }
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a {
      width: 50px !important;
      height: 50px !important;
    }
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-head {
      right: max(18px, var(--it-v514-safe-right)) !important;
      left: max(18px, var(--it-v514-safe-left)) !important;
    }
  }

  @media (max-width: 430px) {
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav {
      gap: 2px !important;
      width: calc(100vw - var(--it-v514-safe-left) - var(--it-v514-safe-right) - 16px) !important;
      max-width: none !important;
    }
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a {
      flex: 1 1 0 !important;
      width: auto !important;
      min-width: 46px !important;
      height: 50px !important;
    }
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-viewers {
      display: none !important;
    }
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-row {
      grid-template-columns: 40px minmax(80px,1fr) auto 40px !important;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav,
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-bottom-nav a,
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .mobile-live-overlay-head,
    body[data-theme="itahuka-mobile-live-overlay"].it-fullscreen-mac-dock .it-live-action-group {
      transition-duration: .01ms !important;
    }
  }
}
