.home-mobile-nav {
  display: none;
}

/* Final mobile home composition. Keep this after the legacy mobile rules. */
@media (max-width: 640px) {
  body:has(#homepage) {
    --nav-height: calc(132px + var(--home-safe-top));
    --home-mobile-shelf-height: 0px;
  }

  body:has(#homepage) #navbar {
    height: var(--nav-height);
    padding: calc(10px + var(--home-safe-top)) calc(13px + var(--home-safe-right)) 0 calc(13px + var(--home-safe-left));
    background: rgba(19, 19, 19, 0.96);
  }

  body:has(#homepage) #nav-logo {
    position: absolute;
    top: calc(9px + var(--home-safe-top));
    left: 50%;
    width: 78px;
    height: 52px;
    padding: 0;
    transform: translateX(-50%);
  }

  body:has(#homepage) #nav-logo img {
    width: 78px;
    max-height: 50px;
  }

  body:has(#homepage) .nav-menu-button {
    position: fixed;
    top: calc(17px + var(--home-safe-top));
    right: auto;
    left: calc(14px + var(--home-safe-left));
    z-index: 155;
  }

  body:has(#homepage) #nav-right-content {
    top: calc(15px + var(--home-safe-top));
    right: calc(14px + var(--home-safe-right));
  }

  body:has(#homepage) #livebutton {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  body:has(#homepage) #searchbar {
    top: calc(70px + var(--home-safe-top));
    left: calc(13px + var(--home-safe-left));
    width: calc(100% - 26px - var(--home-safe-left) - var(--home-safe-right));
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9px;
    padding: 0 16px 0 42px;
    background: rgba(44, 44, 44, 0.64);
    font-size: 16px;
  }

  body:has(#homepage) #sidebar,
  body:has(#homepage) #sidetoggle {
    display: none !important;
  }

  body:has(#homepage) #contentwrapper {
    padding-top: var(--nav-height);
  }

  body:has(#homepage) #contentwrapper2 {
    min-height: calc(100dvh - var(--nav-height));
  }

  body:has(#homepage) #homepage {
    padding: 14px calc(13px + var(--home-safe-right)) 30px calc(13px + var(--home-safe-left));
    background: transparent;
  }

  body:has(#homepage) #homepage-row1 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "featured"
      "recent"
      "trending";
    gap: 22px;
    margin: 0 0 24px;
    overflow: visible;
  }

  body:has(#homepage) .home-featured-section {
    min-height: 178px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 13px;
    background:
      repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px),
      rgba(35, 35, 35, 0.68);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    overflow: hidden;
  }

  body:has(#homepage) .home-featured-section > .sectiontext {
    display: block;
    margin: 0;
    color: #eee;
    font-size: 21px;
  }

  body:has(#homepage) .home-featured-section .streamsection,
  body:has(#homepage) #featured-streams {
    width: 100%;
    min-height: 128px;
  }

  body:has(#homepage) #featured-streams {
    align-items: center;
    justify-content: center;
  }

  body:has(#homepage) #featured-streams > .center,
  body:has(#homepage) #featured-streams > .empty-stream-row {
    width: 100%;
    min-height: 112px;
    border: 0;
    background: transparent;
    font-size: 15px;
  }

  body:has(#homepage) .home-mobile-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
    margin: 0 4px 10px;
  }

  body:has(#homepage) .home-mobile-section-heading .sectiontext,
  body:has(#homepage) .home-mobile-section-heading #editorschoicetext {
    display: block;
    margin: 0;
    color: #eee;
    text-align: left;
    font-size: 21px;
    line-height: 1.2;
  }

  body:has(#homepage) .home-mobile-view-all {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #e43636;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
  }

  body:has(#homepage) .home-mobile-view-all .material-icons {
    color: #cfcfcf;
    font-size: 23px;
  }

  body:has(#homepage) #homepage-row2 {
    width: 100%;
    margin: 0;
  }

  body:has(#homepage) #recent-streams:has(.empty-stream-row) {
    min-width: 100%;
  }

  body:has(#homepage) #recent-streams .empty-stream-row {
    position: relative;
    box-sizing: border-box;
    justify-content: flex-start;
    width: 100%;
    min-height: 66px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    padding: 0 18px 0 58px;
    background:
      repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px),
      rgba(35, 35, 35, 0.68);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
    text-align: left;
    font-size: 14px;
  }

  body:has(#homepage) #recent-streams .empty-stream-row::before {
    content: "schedule";
    position: absolute;
    left: 18px;
    color: #797979;
    font: 31px/1 "Material Icons";
  }

  body:has(#homepage) .home-trending-section .streamsection-right,
  body:has(#homepage) .home-trending-section .streamplayer-s {
    width: 100%;
  }

  body:has(#homepage) .home-trending-section .streamplayer-s {
    box-sizing: border-box;
    height: 150px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    background-color: rgba(35, 35, 35, 0.68);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  }

  body:has(#homepage) .home-trending-section .streamplayer-s.is-empty {
    background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px) !important;
  }

  body:has(#homepage) .mobile-stream-empty {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    padding: 24px;
    color: #9b9b9b;
    text-align: center;
    font-size: 15px;
  }

  body:has(#homepage) .streamplayer-s.is-empty .mobile-stream-empty {
    display: grid;
  }

  body:has(#homepage) #liveicon {
    top: 10px;
    right: 10px;
    width: 23px;
    height: 23px;
  }
}

@media (max-width: 640px) {
  body:has(#homepage) {
    --nav-height: calc(132px + var(--home-safe-top));
    --home-mobile-shelf-height: 0px;
  }

  body:has(#homepage) #navbar {
    height: var(--nav-height);
    padding: calc(10px + var(--home-safe-top)) calc(13px + var(--home-safe-right)) 0 calc(13px + var(--home-safe-left));
    background: rgba(19, 19, 19, 0.96);
  }

  body:has(#homepage) #nav-logo {
    position: absolute;
    top: calc(9px + var(--home-safe-top));
    left: 50%;
    width: 78px;
    height: 52px;
    transform: translateX(-50%);
    padding: 0;
  }

  body:has(#homepage) #nav-logo img {
    width: 78px;
    max-height: 50px;
  }

  body:has(#homepage) #nav-right-content {
    top: calc(15px + var(--home-safe-top));
    right: calc(14px + var(--home-safe-right));
    gap: 10px;
  }

  body:has(#homepage) .nav-menu-button {
    position: fixed;
    top: calc(17px + var(--home-safe-top));
    left: calc(14px + var(--home-safe-left));
    z-index: 155;
  }

  body:has(#homepage) #livebutton {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  body:has(#homepage) .nav-notif-button {
    width: 34px;
    height: 34px;
  }

  body:has(#homepage) .nav-notif-icon {
    width: 28px;
    height: 28px;
  }

  body:has(#homepage) #searchbar {
    top: calc(70px + var(--home-safe-top));
    left: calc(13px + var(--home-safe-left));
    width: calc(100% - 26px - var(--home-safe-left) - var(--home-safe-right));
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9px;
    padding: 0 16px 0 42px;
    background: rgba(44, 44, 44, 0.64);
    font-size: 16px;
  }

  body:has(#homepage) #searchbar::placeholder {
    color: #aaa;
  }

  body:has(#homepage) #sidebar,
  body:has(#homepage) #sidetoggle {
    display: none !important;
  }

  body:has(#homepage) #contentwrapper {
    padding-top: var(--nav-height);
  }

  body:has(#homepage) #contentwrapper2 {
    min-height: calc(100dvh - var(--nav-height));
  }

  body:has(#homepage) #homepage {
    padding: 14px calc(13px + var(--home-safe-right)) 30px calc(13px + var(--home-safe-left));
    background: transparent;
  }

  body:has(#homepage) #homepage-row1 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "featured"
      "recent"
      "trending";
    gap: 22px;
    margin: 0 0 24px;
    overflow: visible;
  }

  body:has(#homepage) .home-featured-section {
    min-height: 178px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 13px;
    background:
      repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px),
      rgba(35, 35, 35, 0.68);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    overflow: hidden;
  }

  body:has(#homepage) .home-featured-section > .sectiontext {
    margin: 0;
    color: #eee;
    font-size: 21px;
  }

  body:has(#homepage) .home-featured-section .streamsection,
  body:has(#homepage) #featured-streams {
    width: 100%;
    min-height: 128px;
  }

  body:has(#homepage) #featured-streams {
    align-items: center;
    justify-content: center;
  }

  body:has(#homepage) #featured-streams > .center {
    width: 100%;
    min-height: 112px;
    border: 0;
    background: transparent;
    font-size: 15px;
  }

  body:has(#homepage) .home-mobile-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
    margin: 0 4px 10px;
  }

  body:has(#homepage) .home-mobile-section-heading .sectiontext,
  body:has(#homepage) .home-mobile-section-heading #editorschoicetext {
    display: block;
    margin: 0;
    color: #eee;
    text-align: left;
    font-size: 21px;
    line-height: 1.2;
  }

  body:has(#homepage) .home-mobile-view-all {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #e43636;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
  }

  body:has(#homepage) .home-mobile-view-all .material-icons {
    color: #cfcfcf;
    font-size: 23px;
  }

  body:has(#homepage) .home-recent-section,
  body:has(#homepage) .home-trending-section {
    min-width: 0;
  }

  body:has(#homepage) #homepage-row2 {
    margin: 0;
  }

  body:has(#homepage) #recent-streams:has(.empty-stream-row) {
    min-width: 100%;
  }

  body:has(#homepage) #recent-streams .empty-stream-row {
    position: relative;
    box-sizing: border-box;
    justify-content: flex-start;
    width: 100%;
    min-height: 66px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    padding: 0 18px 0 58px;
    background:
      repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px),
      rgba(35, 35, 35, 0.68);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
    text-align: left;
    font-size: 14px;
  }

  body:has(#homepage) #recent-streams .empty-stream-row::before {
    content: "schedule";
    position: absolute;
    left: 18px;
    color: #797979;
    font: 31px/1 "Material Icons";
  }

  body:has(#homepage) .streamsection-right,
  body:has(#homepage) .home-trending-section .streamplayer-s {
    width: 100%;
  }

  body:has(#homepage) .home-trending-section .streamplayer-s {
    box-sizing: border-box;
    height: 150px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    background-color: rgba(35, 35, 35, 0.68);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  }

  body:has(#homepage) .home-trending-section .streamplayer-s.is-empty {
    background-image:
      repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px) !important;
  }

  body:has(#homepage) .mobile-stream-empty {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    padding: 24px;
    color: #9b9b9b;
    text-align: center;
    font-size: 15px;
  }

  body:has(#homepage) .streamplayer-s.is-empty .mobile-stream-empty {
    display: grid;
  }

  body:has(#homepage) #liveicon {
    top: 10px;
    right: 10px;
    width: 23px;
    height: 23px;
  }
}

@media (max-width: 640px) {
  html:has(#homepage),
  body:has(#homepage) {
    width: 100%;
    min-width: 0;
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    background-color: #151515;
  }

  body:has(#homepage) {
    --home-safe-top: env(safe-area-inset-top, 0px);
    --home-safe-right: env(safe-area-inset-right, 0px);
    --home-safe-bottom: env(safe-area-inset-bottom, 0px);
    --home-safe-left: env(safe-area-inset-left, 0px);
    --nav-height: calc(116px + var(--home-safe-top));
    --home-mobile-shelf-height: 176px;
    --home-mobile-nav-content-height: 68px;
    --home-mobile-nav-height: calc(var(--home-mobile-nav-content-height) + var(--home-safe-bottom));
    min-height: 100vh;
    min-height: 100dvh;
  }

  body:has(#homepage) #navbar {
    height: var(--nav-height);
    padding: calc(8px + var(--home-safe-top)) calc(14px + var(--home-safe-right)) 0 calc(14px + var(--home-safe-left));
    align-items: flex-start;
  }

  body:has(#homepage) #nav-logo {
    width: 92px;
    height: 48px;
    padding-left: 0;
  }

  body:has(#homepage) #nav-logo img {
    width: 82px;
  }

  body:has(#homepage) #nav-right-content {
    top: calc(11px + var(--home-safe-top));
    right: calc(12px + var(--home-safe-right));
    gap: 10px;
  }

  body:has(#homepage) #livebutton {
    position: relative;
    top: auto;
    right: auto;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
  }

  body:has(#homepage) #livetext,
  body:has(#homepage) .nav-user-button {
    display: none;
  }

  body:has(#homepage) .nav-notif-button,
  body:has(#homepage) .nav-menu-button {
    width: 36px;
    height: 36px;
  }

  body:has(#homepage) .nav-notif-icon {
    width: 29px;
    height: 29px;
  }

  body:has(#homepage) #searchbar {
    top: calc(66px + var(--home-safe-top));
    left: calc(14px + var(--home-safe-left));
    width: calc(100% - 28px - var(--home-safe-left) - var(--home-safe-right));
    height: 40px;
    transform: none;
    border-radius: 7px;
    padding: 0 14px;
    background: rgba(190, 190, 190, 0.2);
    color: #d8d8d8;
  }

  body:has(#homepage) #searchbar::placeholder {
    color: #9c9c9c;
  }

  body:has(#homepage) #searchListContainer,
  body:has(#homepage) #notificationListContainer {
    position: fixed;
    top: calc(108px + var(--home-safe-top));
    right: calc(14px + var(--home-safe-right));
    left: calc(14px + var(--home-safe-left)) !important;
    width: auto !important;
  }

  body:has(#homepage) #sidebar {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    bottom: auto;
    left: 0;
    z-index: 95;
    display: flex;
    width: 100%;
    height: var(--home-mobile-shelf-height);
    transform: none !important;
    background: rgba(25, 25, 25, 0.98);
    overflow: hidden;
  }

  body:has(#homepage) #sidebar-tabs {
    flex: 0 0 48px;
    height: 48px;
    background: transparent;
  }

  body:has(#homepage) #tab-container-left,
  body:has(#homepage) #tab-container-right {
    width: 50%;
  }

  body:has(#homepage) #tab-container-right {
    order: 1;
  }

  body:has(#homepage) #tab-container-left {
    order: 2;
  }

  body:has(#homepage) .sidebar-tab {
    font-size: 16px;
  }

  body:has(#homepage) #tab-line-active {
    display: none;
  }

  body:has(#homepage) .sidebar-tab-button {
    border-bottom: 3px solid transparent;
  }

  body:has(#homepage) .sidebar-tab-button.is-active {
    border-bottom-color: #c83232;
  }

  body:has(#homepage) #sidebar-tabs > #hr-sidebartabs {
    display: none;
  }

  body:has(#homepage) #sidebar-tabs-content {
    flex: 1 1 auto;
    width: 100%;
    overflow: hidden;
  }

  body:has(#homepage) #trending-tab,
  body:has(#homepage) #catagories-tab {
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body:has(#homepage) #trending-tab::-webkit-scrollbar,
  body:has(#homepage) #catagories-tab::-webkit-scrollbar {
    display: none;
  }

  body:has(#homepage) #sidebar-tabs-content #hr-sidebartabs {
    display: none;
  }

  body:has(#homepage) .sidetab-name-and-viewers,
  body:has(#homepage) .sidetab-name-and-viewers-trending {
    display: inline-flex;
    vertical-align: top;
    flex-direction: column;
    justify-content: center;
    width: 118px;
    height: 116px;
    min-height: 0;
    gap: 7px;
    padding: 10px 8px;
    text-align: center;
    scroll-snap-align: start;
    white-space: normal;
  }

  body:has(#homepage) .sidetab-name-and-viewers-trending {
    flex-direction: row;
    align-items: center;
  }

  body:has(#homepage) .sidebar-catagoryname {
    min-height: 40px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-size: 16px;
    line-height: 1.2;
  }

  body:has(#homepage) .sidetab-name-and-viewers .viewercount-and-icon {
    justify-content: center;
  }

  body:has(#homepage) .sidebar-ad-gallery,
  body:has(#homepage) #sidetoggle {
    display: none !important;
  }

  body:has(#homepage) #contentwrapper {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: calc(var(--nav-height) + var(--home-mobile-shelf-height));
    padding-left: 0 !important;
  }

  body:has(#homepage) #contentwrapper2 {
    width: 100%;
    min-height: calc(100vh - var(--nav-height) - var(--home-mobile-shelf-height));
    min-height: calc(100dvh - var(--nav-height) - var(--home-mobile-shelf-height));
    padding-bottom: calc(var(--home-mobile-nav-height) + 18px);
  }

  body:has(#homepage) #homepage {
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    padding: 22px calc(14px + var(--home-safe-right)) 30px calc(14px + var(--home-safe-left));
    background: rgba(0, 0, 0, 0.12);
    overflow: hidden;
  }

  body:has(#homepage) .sectiontext,
  body:has(#homepage) #editorschoicetext {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.2;
  }

  body:has(#homepage) #row-1-titles {
    display: block;
  }

  body:has(#homepage) #editorschoicetext {
    display: none;
  }

  body:has(#homepage) #row-1-content {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(112px, 0.8fr);
    gap: 10px;
    width: 100%;
  }

  body:has(#homepage) #featured-streams {
    display: flex;
    width: 100%;
    min-height: 176px;
  }

  body:has(#homepage) #featured-streams .empty-stream-row {
    width: 100%;
    min-height: 176px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    background: rgba(32, 32, 32, 0.5);
    text-align: center;
  }

  body:has(#homepage) #featured-streams .stream {
    width: 100%;
    max-width: none;
  }

  body:has(#homepage) #featured-streams .stream > a {
    width: 100%;
    height: 126px;
    margin: 0;
  }

  body:has(#homepage) #featured-streams .streamname,
  body:has(#homepage) #featured-streams .streamername-and-viewers {
    margin-right: 0;
    margin-left: 0;
  }

  body:has(#homepage) .streamsection-right {
    width: 100%;
  }

  body:has(#homepage) .streamplayer-s {
    width: 100%;
    height: 176px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
  }

  body:has(#homepage) #homepage-row2,
  body:has(#homepage) #homepage-row3,
  body:has(#homepage) #homepage-row4 {
    width: 100%;
    margin-bottom: 24px;
    overflow: visible;
  }

  body:has(#homepage) #homepage-row1 {
    margin-bottom: 28px;
  }

  body:has(#homepage) #content-scroll-container-streams1,
  body:has(#homepage) #content-scroll-container-catagory,
  body:has(#homepage) #content-scroll-favourite-container-catagory {
    width: 100%;
    overflow: visible;
  }

  body:has(#homepage) #homepage-row2 .streamsection,
  body:has(#homepage) #homepage-row3 .streamsection,
  body:has(#homepage) #homepage-row4 .streamsection {
    width: 100%;
  }

  body:has(#homepage) .streams-nowrap {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body:has(#homepage) .streams-nowrap::-webkit-scrollbar {
    display: none;
  }

  body:has(#homepage) #recent-streams .stream {
    flex: 0 0 210px;
    scroll-snap-align: start;
  }

  body:has(#homepage) #recent-streams:has(.empty-stream-row) {
    width: 100%;
  }

  body:has(#homepage) #recent-streams .empty-stream-row {
    justify-content: flex-start;
    min-height: 48px;
  }

  body:has(#homepage) #top-categories,
  body:has(#homepage) #favourite-categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body:has(#homepage) #top-categories::-webkit-scrollbar,
  body:has(#homepage) #favourite-categories::-webkit-scrollbar {
    display: none;
  }

  body:has(#homepage) #top-categories .catagory,
  body:has(#homepage) #favourite-categories .catagory {
    flex: 0 0 146px;
    width: 146px;
    scroll-snap-align: start;
  }

  body:has(#homepage) .catagory > a {
    width: 146px;
    height: 218px;
    margin: 0;
    border-radius: 8px;
    background-position: 0 204px, center, center;
  }

  body:has(#homepage) .catagoryname {
    margin: 8px 0 4px;
    font-size: 18px;
    line-height: 1.15;
  }

  body:has(#homepage) .viewercount-homepage-categories {
    font-size: 14px;
  }

  body:has(#homepage) .favourite-catagories {
    min-height: 0;
  }

  body:has(#homepage) .left-scroll-btn,
  body:has(#homepage) .right-scroll-btn,
  body:has(#homepage) .left-scroll-btn-cat,
  body:has(#homepage) .right-scroll-btn-cat {
    display: none;
  }

  body:has(#homepage) footer.row.center {
    display: none;
  }

  body:has(#homepage) .home-mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 150;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: var(--home-mobile-nav-height);
    padding-right: var(--home-safe-right);
    padding-bottom: var(--home-safe-bottom);
    padding-left: var(--home-safe-left);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(22, 22, 22, 0.96);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  body:has(#homepage) .home-mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    color: #9f9f9f;
    font-size: 11px;
    text-decoration: none;
  }

  body:has(#homepage) .home-mobile-nav .material-icons {
    font-size: 26px;
  }

  body:has(#homepage) .home-mobile-nav a.is-active {
    color: #e43b3b;
  }

  @media (display-mode: standalone) {
    body:has(#homepage) {
      overscroll-behavior-y: none;
    }

    body:has(#homepage) #navbar,
    body:has(#homepage) .home-mobile-nav {
      -webkit-user-select: none;
      user-select: none;
    }
  }
}

@media (max-width: 640px) {
  html body:has(#homepage) {
    --nav-height: calc(132px + var(--home-safe-top));
    --home-mobile-shelf-height: 0px;
  }

  html body:has(#homepage) #navbar {
    height: var(--nav-height);
    padding: calc(10px + var(--home-safe-top)) calc(13px + var(--home-safe-right)) 0 calc(13px + var(--home-safe-left));
  }

  html body:has(#homepage) #nav-logo {
    position: absolute;
    top: calc(9px + var(--home-safe-top));
    left: 50%;
    width: 78px;
    height: 52px;
    padding: 0;
    transform: translateX(-50%);
  }

  html body:has(#homepage) #nav-logo img {
    width: 78px;
    max-height: 50px;
  }

  html body:has(#homepage) .nav-menu-button {
    position: fixed;
    top: calc(17px + var(--home-safe-top));
    right: auto;
    left: calc(14px + var(--home-safe-left));
    z-index: 155;
  }

  html body:has(#homepage) #nav-right-content {
    top: calc(15px + var(--home-safe-top));
    right: calc(14px + var(--home-safe-right));
  }

  html body:has(#homepage) #searchbar {
    top: calc(70px + var(--home-safe-top));
    left: calc(13px + var(--home-safe-left));
    width: calc(100% - 26px - var(--home-safe-left) - var(--home-safe-right));
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9px;
    padding: 0 16px 0 42px;
    background: rgba(44, 44, 44, 0.64);
    font-size: 16px;
  }

  html body:has(#homepage) #sidebar,
  html body:has(#homepage) #sidetoggle {
    display: none !important;
  }

  html body:has(#homepage) #contentwrapper {
    padding-top: var(--nav-height);
  }

  html body:has(#homepage) #contentwrapper2 {
    min-height: calc(100dvh - var(--nav-height));
  }

  html body:has(#homepage) #homepage {
    padding: 14px calc(13px + var(--home-safe-right)) 30px calc(13px + var(--home-safe-left));
    background: transparent;
  }

  html body:has(#homepage) #homepage-row1 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "featured" "recent" "trending";
    gap: 22px;
    margin: 0 0 24px;
    overflow: visible;
  }

  html body:has(#homepage) .home-featured-section {
    position: relative;
    min-height: 178px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 13px;
    background:
      repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px),
      rgba(35, 35, 35, 0.68);
    overflow: hidden;
  }

  html body:has(#homepage) .home-featured-section::after {
    content: "";
    position: absolute;
    top: 13px;
    right: 13px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f10f18;
    box-shadow: 0 0 8px rgba(241, 15, 24, 0.42);
  }

  html body:has(#homepage) .home-featured-section > .sectiontext {
    display: block;
    margin: 0;
    font-size: 21px;
  }

  html body:has(#homepage) .home-featured-section .streamsection,
  html body:has(#homepage) #featured-streams {
    width: 100%;
    min-height: 128px;
  }

  html body:has(#homepage) #featured-streams > .center,
  html body:has(#homepage) #featured-streams > .empty-stream-row {
    width: 100%;
    min-height: 112px;
    border: 0;
    background: transparent;
    font-size: 15px;
  }

  html body:has(#homepage) .home-mobile-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
    margin: 0 4px 10px;
  }

  html body:has(#homepage) .home-mobile-section-heading .sectiontext,
  html body:has(#homepage) .home-mobile-section-heading #editorschoicetext {
    display: block;
    margin: 0;
    font-size: 21px;
    line-height: 1.2;
  }

  html body:has(#homepage) .home-mobile-view-all {
    display: inline-flex;
  }

  html body:has(#homepage) #homepage-row2 {
    width: 100%;
    margin: 0;
  }

  html body:has(#homepage) #recent-streams:has(.empty-stream-row) {
    min-width: 100%;
  }

  html body:has(#homepage) #recent-streams .empty-stream-row {
    box-sizing: border-box;
    width: 100%;
    min-height: 66px;
    border-radius: 13px;
    padding: 0 18px 0 58px;
    background:
      repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px),
      rgba(35, 35, 35, 0.68);
  }

  html body:has(#homepage) .home-trending-section .streamplayer-s {
    width: 100%;
    height: 150px;
    margin: 0;
    border-radius: 13px;
  }

  html body:has(#homepage) .home-trending-section .streamplayer-s.is-empty {
    background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px) !important;
  }

  html body:has(#homepage) .streamplayer-s.is-empty .mobile-stream-empty {
    display: grid;
  }
}

@media (max-width: 640px) {
  html body:has(#homepage) {
    --nav-height: calc(112px + var(--home-safe-top));
  }

  html body:has(#homepage) #navbar {
    height: var(--nav-height);
    padding-top: calc(4px + var(--home-safe-top));
  }

  html body:has(#homepage) #nav-logo {
    top: calc(3px + var(--home-safe-top));
    width: 64px;
    height: 42px;
  }

  html body:has(#homepage) #nav-logo img {
    width: 64px;
    max-height: 40px;
  }

  html body:has(#homepage) .nav-menu-button {
    top: calc(9px + var(--home-safe-top));
    left: calc(15px + var(--home-safe-left));
    width: 30px;
    height: 30px;
  }

  html body:has(#homepage) .nav-menu-icon {
    gap: 4px;
    width: 26px;
    height: 26px;
  }

  html body:has(#homepage) .nav-menu-icon span {
    width: 26px;
    height: 3px;
  }

  html body:has(#homepage) #nav-right-content {
    top: calc(8px + var(--home-safe-top));
    right: calc(15px + var(--home-safe-right));
    gap: 9px;
  }

  html body:has(#homepage) #livebutton {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
  }

  html body:has(#homepage) .nav-notif-button {
    width: 29px;
    height: 29px;
  }

  html body:has(#homepage) .nav-notif-icon {
    width: 24px;
    height: 24px;
  }

  html body:has(#homepage) #searchbar {
    top: calc(55px + var(--home-safe-top));
    height: 43px;
  }

  html body:has(#homepage) #dropdownmenu,
  html body:has(#homepage) #dropdownmenu[hidden].is-closing {
    position: fixed;
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    z-index: 300;
    display: flex;
    box-sizing: border-box;
    width: min(82vw, 300px);
    min-height: 100dvh;
    max-height: none;
    padding: calc(58px + var(--home-safe-top)) 14px calc(22px + var(--home-safe-bottom));
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 0 8px 8px 0;
    background:
      repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px),
      rgba(24, 24, 24, 0.985);
    box-shadow: 18px 0 38px rgba(0, 0, 0, 0.48);
    transform: translateX(-104%);
    opacity: 0;
    overflow-x: hidden;
    overflow-y: auto;
    transition:
      transform 280ms cubic-bezier(0.22, 0.8, 0.25, 1),
      opacity 180ms ease;
    pointer-events: none;
  }

  html body:has(#homepage) #dropdownmenu.is-mobile-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  html body:has(#homepage) #dropdownmenu[hidden]:not(.is-closing) {
    display: none;
  }

  html body:has(#homepage) #dropdownmenu .dropdownmenu-link,
  html body:has(#homepage) #dropdownmenu .dropdownmenu-link-live,
  html body:has(#homepage) #dropdownmenu .dropdownmenu-button {
    width: 100%;
    min-height: 48px;
    margin: 0 0 8px;
    border-radius: 6px;
  }

  html body:has(#homepage) #dropdownmenu .dropdown-inner {
    justify-content: flex-start;
    gap: 13px;
    width: 100%;
    padding: 0 14px;
    font-size: 16px;
  }

  html body:has(#homepage) #dropdownmenu .material-icons {
    width: 24px;
    font-size: 22px;
    text-align: center;
  }

  html body:has(#homepage).mobile-nav-drawer-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  html body:has(#homepage).mobile-nav-drawer-open .nav-menu-button {
    z-index: 310;
  }
}

@media (max-width: 640px) {
  html:has(#homepage),
  body:has(#homepage),
  body:has(#homepage) * {
    scrollbar-width: none;
  }

  html:has(#homepage)::-webkit-scrollbar,
  body:has(#homepage)::-webkit-scrollbar,
  body:has(#homepage) *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  html body:has(#homepage) #homepage-row1 {
    grid-template-areas:
      "trending"
      "featured"
      "recent";
  }

  html body:has(#homepage) .home-featured-section {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  html body:has(#homepage) .home-featured-section::after {
    display: none;
  }

  html body:has(#homepage) .home-featured-section > .home-mobile-section-heading {
    display: flex;
  }

  html body:has(#homepage) .home-featured-section .streamsection,
  html body:has(#homepage) #featured-streams {
    width: 100%;
    min-height: 66px;
  }

  html body:has(#homepage) #featured-streams {
    position: relative;
    box-sizing: border-box;
    align-items: center;
    justify-content: flex-start;
    min-height: 66px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    background:
      repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px),
      rgba(35, 35, 35, 0.68);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
    overflow: hidden;
  }

  html body:has(#homepage) #featured-streams > .center,
  html body:has(#homepage) #featured-streams > .empty-stream-row {
    position: relative;
    box-sizing: border-box;
    justify-content: flex-start;
    width: 100%;
    min-height: 66px;
    padding: 0 18px 0 58px;
    text-align: left;
    font-size: 14px;
  }

  html body:has(#homepage) #featured-streams > .center::before,
  html body:has(#homepage) #featured-streams > .empty-stream-row::before {
    content: "videocam_off";
    position: absolute;
    left: 18px;
    color: #797979;
    font: 29px/1 "Material Icons";
  }

  html body:has(#homepage) #featured-streams {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  html body:has(#homepage) #featured-streams .stream,
  html body:has(#homepage) #recent-streams .stream {
    flex: 0 0 210px;
    width: 210px;
    max-width: 210px;
    scroll-snap-align: start;
  }

  html body:has(#homepage) #featured-streams .stream > a,
  html body:has(#homepage) #recent-streams .stream > a {
    width: 200px;
    height: 115px;
    margin: 7.3px;
    border-radius: 10px;
  }

  html body:has(#homepage) #featured-streams .streamname,
  html body:has(#homepage) #recent-streams .streamname {
    max-width: 200px;
    margin-left: 7px;
  }

  html body:has(#homepage) #featured-streams .streamername-and-viewers,
  html body:has(#homepage) #recent-streams .streamername-and-viewers {
    margin-right: 7px;
    margin-left: 7px;
  }

  html body:has(#homepage) #featured-streams:has(.empty-stream-row) {
    min-height: 66px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    background:
      repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 3px, transparent 3px 7px),
      rgba(35, 35, 35, 0.68);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  }
}

/* Keep the Home bottom navigation identical to the Live mobile navigation. */
@media (max-width: 640px) {
  body:has(#homepage) {
    --home-mobile-nav-content-height: 74px;
  }

  body:has(#homepage) .home-mobile-nav {
    height: calc(74px + var(--home-safe-bottom));
    padding: 8px 5px var(--home-safe-bottom);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(18, 18, 18, 0.98);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.28);
  }

  body:has(#homepage) .home-mobile-nav a {
    gap: 2px;
    color: #aaa;
    font-size: 11px;
  }

  body:has(#homepage) .home-mobile-nav .material-icons {
    font-size: 28px;
  }

  body:has(#homepage) .home-mobile-nav a.is-active {
    color: #ef4141;
  }
}
