/* main menu */

.menu-header {
  display: none;
  padding: 24px 20px 10px;
  box-sizing: border-box;
}

.menu-copy {
  text-align: center;
  margin-bottom: 16px;
}

.menu-kicker {
  display: block;
  color: #64707d;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 6px;
}

.menu-title {
  margin: 0;
  color: #203040;
  font-family: "WiiContb", sans-serif;
  font-size: clamp(30px, 7vw, 50px);
  line-height: 1.05;
}

.menu-subtitle {
  margin: 8px auto 0;
  max-width: 34rem;
  color: #506070;
  font-size: 15px;
  line-height: 1.5;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: #16222e;
  text-decoration: none;
  font-family: "WiiContb", sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.08);
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-link:active,
.mobile-nav-link:hover {
  transform: translateY(-1px);
}

.ds-mobile-shell {
  display: none;
}

body.channel-splash {
  background-color: black;
}

.splash-screen,
.splash-bar,
.splash-bar *,
.border,
.border *,
.screen-message,
.screen-message * {
  cursor: url(../images/cursor.png), auto !important;
}

.main-menu {
  margin: 0;
  transition:
    transform 900ms,
    opacity 400ms,
    background-color 900ms,
    visibility 900ms;
  opacity: 1;
  visibility: visible;
  background-image: url(../images/bg-pattern.png);
  background-color: lightgrey;
  width: 100%;
  height: 100vh;
}

.main-menu.channel-splash {
  transform: scale(4);
  opacity: 0;
  background-color: black;
  background-image: none !important;
  visibility: hidden;
}

.social-mobile-hub {
  display: none;
}

.top-section {
  height: calc(100% - 219px);
  padding: 80px;
  padding-top: 3vh;
  padding-bottom: 0;
  box-sizing: border-box;
  position: relative;
}

.channel-icon.with-disc {
  overflow: visible;
}

.channel-icon.with-disc .disc-slot {
  --disc-size: clamp(90px, calc(var(--channel-height) * 0.9), 170px);
  position: absolute;
  top: 50%;
  left: calc(var(--disc-size) * -0.42);
  width: var(--disc-size);
  height: var(--disc-size);
  transform: translateY(-50%);
  border-radius: 50%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.social-with-disc {
  overflow: hidden;
}

.social-with-disc .disc-slot {
  --disc-size: calc(11.1vw - 30px);
  left: auto;
  right: 8px;
  top: 8px;
  transform: none;
}

.social-with-disc .disc-slot img {
  animation-duration: 8.5s;
}

.social-with-disc .channel-preview,
.social-with-disc .channel-hover-image {
  padding: 0;
  object-fit: cover;
}

.social-with-disc .hover {
  background-size: cover;
  background-position: center;
}

.service-lucacraft {
  background: none;
}

.social-profile-channel {
  overflow: hidden;
}

.social-profile-channel::before {
  position: absolute;
  inset: 0;
  content: "";
  z-index: 1;
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f7 100%);
  -webkit-clip-path: polygon(
    2% 7%,
    6% 2%,
    52% 1%,
    95% 3%,
    98% 8%,
    100% 49%,
    98% 92%,
    95% 97%,
    50% 99%,
    5% 97%,
    2% 93%,
    0 50%
  );
  clip-path: polygon(
    2% 7%,
    6% 2%,
    52% 1%,
    95% 3%,
    98% 8%,
    100% 49%,
    98% 92%,
    95% 97%,
    50% 99%,
    5% 97%,
    2% 93%,
    0 50%
  );
  pointer-events: none;
}

.social-profile-channel .disc-slot {
  --disc-size: clamp(82px, calc(var(--channel-height) * 0.82), 152px);
  left: 2px;
  top: 8px;
  transform: none;
  z-index: 2;
  transition:
    transform 260ms ease,
    left 260ms ease,
    top 260ms ease;
}

.social-profile-channel .disc-slot img {
  animation-duration: 8.5s;
  object-fit: cover;
  filter: drop-shadow(0 2px 5px rgba(70, 70, 70, 0.18));
}

.social-profile-channel .profile-name {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  color: #111111;
  text-align: center;
  font-family: "WiiContb", sans-serif;
  font-size: clamp(18px, 2.15vw, 30px);
  letter-spacing: 0.02em;
  opacity: 1;
  transform: translate(-50%, -50%);
  transition:
    opacity 220ms ease,
    transform 260ms ease,
    top 260ms ease,
    font-size 260ms ease;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.social-profile-channel .hover {
  background-image: none;
}

.social-profile-channel:hover .disc-slot {
  --disc-size: clamp(62px, calc(var(--channel-height) * 0.62), 122px);
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  z-index: 4;
}

.social-profile-channel:hover .profile-name {
  opacity: 1;
  left: 50%;
  top: 79%;
  transform: translate(-50%, -50%);
  font-size: clamp(16px, 1.8vw, 25px);
}

.channel-icon.with-disc .disc-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 50%;
  animation: disc-spin 7s linear infinite;
  filter: drop-shadow(0 2px 4px rgba(70, 70, 70, 0.14));
}

.channel-icon.with-disc:hover .disc-slot img {
  animation-play-state: running !important;
}

@keyframes disc-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.bottom-section {
  height: 219px;
  background: #d2d6db;
  background-image: url(../images/bottom-bg.png);
}

.col {
  width: 24%;
  height: 100%;
  display: inline-block;
  box-sizing: border-box;
}

.col.first {
  margin-left: 20px;
}

.channels {
  position: relative;
  z-index: 2;
}

.channel-icon {
  --channel-width: 20.2vw;
  --channel-height: 11.1vw;
  --channel-pad-y: clamp(12px, 1.8vh, 22px);
  --channel-pad-x: clamp(14px, 1.8vw, 26px);
  display: block;
  width: var(--channel-width);
  height: var(--channel-height);
  margin-top: 2vh;
  position: relative;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.channel-icon.blank {
  background-image: url(../images/channel-spritesheet.png);
  background-size: calc(100% * 3) 100%;
}

.channel-icon.blank:before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  content: "";
  background-image: url(../images/channel-wiilogo.png);
  background-size: 100% 100%;
  pointer-events: none;
}

.channel-icon:after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  content: "";
  background-image: url(../images/channel-border.png);
  background-size: 100% 100%;
  z-index: 4;
  pointer-events: none;
}

.channel-icon .channel-hover-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 250ms ease;
  z-index: 2;
  will-change: opacity;
  backface-visibility: hidden;
  pointer-events: none;
  box-sizing: border-box;
  padding: var(--channel-pad-y) var(--channel-pad-x);
  object-fit: contain;
  object-position: center;
  -webkit-clip-path: polygon(
    2% 7%,
    6% 2%,
    52% 1%,
    95% 3%,
    98% 8%,
    100% 49%,
    98% 92%,
    95% 97%,
    50% 99%,
    5% 97%,
    2% 93%,
    0 50%
  );
  clip-path: polygon(
    2% 7%,
    6% 2%,
    52% 1%,
    95% 3%,
    98% 8%,
    100% 49%,
    98% 92%,
    95% 97%,
    50% 99%,
    5% 97%,
    2% 93%,
    0 50%
  );
}

.channel-icon.occupied:hover .channel-hover-image {
  opacity: 1;
}

.channel-icon.occupied .hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  content: "";
  background-image: url(../images/channel-hover.png);
  background-size: 100% 100%;
  z-index: 3;
  opacity: 0;
  transition: 400ms ease;
  transform: scale(0.94);
}

.channel-icon.occupied .hover:hover {
  display: block;
  opacity: 1;
  transform: scale(1.02);
}

.channel-splash .channel-icon.blank {
  background-position: 0 0 !important;
}

.channel-splash .channel-icon.occupied .hover {
  display: none !important;
}

.channel-icon .channel-preview {
  display: inherit;
  width: inherit;
  height: inherit;
  box-sizing: border-box;
  padding: var(--channel-pad-y) var(--channel-pad-x);
  object-fit: contain;
  object-position: center;
  position: relative;
  z-index: 1;
  opacity: 1;
  transition:
    opacity 250ms ease,
    transform 250ms ease,
    filter 250ms ease;
  animation: channel-cover-idle 4.8s ease-in-out infinite;
  transform-origin: center center;
  will-change: transform, filter;
  backface-visibility: hidden;
  filter: drop-shadow(0 4px 6px rgba(90, 90, 90, 0.16));
  /* TODO: does not work in Edge/IE11 and has shoddy browser support */
  -webkit-clip-path: polygon(
    2% 7%,
    6% 2%,
    52% 1%,
    95% 3%,
    98% 8%,
    100% 49%,
    98% 92%,
    95% 97%,
    50% 99%,
    5% 97%,
    2% 93%,
    0 50%
  );
  clip-path: polygon(
    2% 7%,
    6% 2%,
    52% 1%,
    95% 3%,
    98% 8%,
    100% 49%,
    98% 92%,
    95% 97%,
    50% 99%,
    5% 97%,
    2% 93%,
    0 50%
  );
}

.channel-icon.occupied:hover .channel-preview {
  animation-play-state: paused;
  transform: scale(1.01);
  opacity: 0;
  filter: drop-shadow(0 5px 7px rgba(90, 90, 90, 0.18));
}

.service-homeassistant .channel-preview,
.service-homeassistant .channel-hover-image {
  background-color: #18bcf2;
}

.service-truenas .channel-preview,
.service-truenas .channel-hover-image {
  background-color: #000000;
}

.service-frigate .channel-preview {
  background-color: #000000;
}

.service-frigate .channel-hover-image {
  background-color: #ffffff;
}

.service-instagram .channel-preview,
.service-instagram .channel-hover-image {
  background-color: #ffffff;
}

.service-github .channel-preview,
.service-github .channel-hover-image {
  background-color: #f2f5f3;
}

.service-proxmox .channel-preview,
.service-proxmox .channel-hover-image {
  background-color: #ffffff;
}

.service-jellyfin .channel-preview,
.service-jellyfin .channel-hover-image {
  background-color: #000b25;
}

.service-arcane .channel-preview,
.service-arcane .channel-hover-image {
  background-color: #000000;
}

.service-dallh2o {
  background: none;
}

.domain-home-channel::before {
  position: absolute;
  inset: 0;
  content: "";
  z-index: 1;
  background: radial-gradient(
    circle at 50% 30%,
    #2a3649 0%,
    #10151f 62%,
    #080b12 100%
  );
  -webkit-clip-path: polygon(
    2% 7%,
    6% 2%,
    52% 1%,
    95% 3%,
    98% 8%,
    100% 49%,
    98% 92%,
    95% 97%,
    50% 99%,
    5% 97%,
    2% 93%,
    0 50%
  );
  clip-path: polygon(
    2% 7%,
    6% 2%,
    52% 1%,
    95% 3%,
    98% 8%,
    100% 49%,
    98% 92%,
    95% 97%,
    50% 99%,
    5% 97%,
    2% 93%,
    0 50%
  );
  pointer-events: none;
}

.domain-home-channel {
  overflow: hidden;
}

.domain-home-channel .domain-mark {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.46);
  pointer-events: none;
  transition: font-size 260ms ease;
  font-size: clamp(38px, 3.1vw, 62px);
  letter-spacing: 0.02em;
}

.domain-home-channel .domain-mark .base {
  display: inline-block;
}

.domain-home-channel .domain-mark .suffix {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  margin-left: 0;
  opacity: 0;
  transition:
    width 300ms steps(4, end),
    margin-left 180ms ease,
    opacity 140ms ease;
}

.domain-home-channel .disc-slot {
  --disc-size: clamp(74px, calc(var(--channel-height) * 0.78), 140px);
  left: 8px;
  top: 8px;
  transform: none;
  z-index: 2;
}

.domain-home-channel .disc-slot img {
  animation-duration: 8.5s;
}

.domain-home-channel:hover .domain-mark {
  font-size: clamp(28px, 2.35vw, 46px);
}

.domain-home-channel:hover .domain-mark .suffix {
  width: 4.1ch;
  margin-left: 0.08em;
  opacity: 1;
}

@keyframes channel-cover-idle {
  0% {
    transform: scale(1) translateX(0);
    filter: drop-shadow(0 4px 6px rgba(90, 90, 90, 0.16));
  }
  35% {
    transform: scale(1.03) translateX(-0.3%);
    filter: drop-shadow(0 5px 7px rgba(90, 90, 90, 0.18));
  }
  65% {
    transform: scale(1.015) translateX(0.35%);
    filter: drop-shadow(0 6px 8px rgba(90, 90, 90, 0.2));
  }
  100% {
    transform: scale(1) translateX(0);
    filter: drop-shadow(0 4px 6px rgba(90, 90, 90, 0.16));
  }
}

.bottom-title {
  background-image: url(../images/bottom-title.png);
  width: 1200px;
  height: 220px;
  margin-left: auto;
  margin-right: auto;
}

.left-button {
  position: absolute;
  bottom: 42px;
  left: 0;
  background-image: url(../images/left-button.png);
  width: 185px;
  height: 135px;
  background-size: 100% 100%;
}

.wii-button {
  background-image: url(../images/wii-button.png);
  width: 100px;
  height: 105px;
  position: absolute;
  bottom: 60px;
  left: 60px;
  background-size: 100% 100%;
}

.right-button {
  position: absolute;
  bottom: 42px;
  right: 0;
  background-image: url(../images/right-button.png);
  width: 185px;
  height: 135px;
  background-size: 100% 100%;
}

.mail-button {
  background-image: url(../images/mail-button.png);
  width: 100px;
  height: 105px;
  position: absolute;
  bottom: 57px;
  right: 43px;
  background-size: 100% 100%;
  z-index: 999;
}

.mail-button.social-link-button::after {
  content: "Social";
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  color: #535b64;
  font-family: "WiiContb", sans-serif;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.wii-button.social-back-button {
  left: auto;
  right: 43px;
  bottom: 57px;
  z-index: 999;
}

.wii-button.social-back-button::after {
  content: "Back";
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  color: #535b64;
  font-family: "WiiContb", sans-serif;
  font-size: 16px;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.corner-button {
  transition: 300ms;
}

.corner-button:hover {
  transform: scale(1.1);
}

.date {
  position: absolute;
  color: #84868a;
  font-family: "WiiContb", sans-serif;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 0);
  font-size: 40px;
  letter-spacing: -1px;
}

/* channel splash screen */

.splash-screen {
  position: absolute;
  box-sizing: border-box;
  height: 80vh;
  width: 100%;
  position: absolute;
  top: -80vh;
  left: 0;
  padding: clamp(20px, 3.8vh, 52px) clamp(28px, 5.4vw, 88px);
  background-origin: content-box;
  background-clip: border-box;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transition:
    opacity 500ms ease,
    transform 500ms ease;
  opacity: 0;
  transform: scale(0.3);
}

.channel-splash .splash-screen {
  top: 0;
  opacity: 1;
  transform: scale(1);
}

.splash-screen.custom-domain-splash {
  background-image: none !important;
  background-color: #0a0d13 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.splash-screen.custom-profile-splash {
  background-image: none !important;
  background-color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.custom-splash-content {
  width: min(94vw, 1700px);
  text-align: center;
  position: relative;
}

.domain-repeat-wrap {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}

.domain-repeat-track {
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.22);
  font-size: clamp(36px, 6.4vw, 120px);
  letter-spacing: 0.02em;
  line-height: 1.05;
  animation: domain-scroll 11s linear infinite;
  margin: 6px 0;
}

.domain-repeat-track.reverse {
  animation-direction: reverse;
  color: rgba(255, 255, 255, 0.15);
}

.domain-home-label {
  color: #ffffff;
  font-size: clamp(54px, 8.6vw, 158px);
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.profile-splash-content {
  width: min(92vw, 1400px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 4vw, 64px);
}

.profile-splash-avatar {
  width: clamp(120px, 18vw, 240px);
  height: clamp(120px, 18vw, 240px);
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
  flex: 0 0 auto;
}

.profile-splash-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-splash-copy {
  color: #111111;
  font-family: "WiiContb", sans-serif;
  font-size: clamp(38px, 6vw, 90px);
  line-height: 1;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.profile-splash-typing {
  min-height: 1.1em;
  padding-right: 0.15em;
}

.profile-splash-typing::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.8em;
  margin-left: 0.12em;
  background: #111111;
  vertical-align: -0.05em;
  animation: typing-cursor 1s steps(1) infinite;
}

@keyframes typing-cursor {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes domain-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-26%);
  }
}

/* TODO: splash bar animation comes from top for some reason in IE11 */

.splash-bar {
  height: 20vh;
  box-sizing: border-box;
  background-color: lightgrey;
  transition:
    bottom 500ms ease,
    opacity 500ms ease;
  border-top: solid 2px black;
  background-image: url(../images/splash-bar.png);
  position: absolute;
  z-index: 99;
  width: 100%;
  bottom: -20vh;
  left: 0;
  opacity: 0;
}

.channel-splash .splash-bar {
  bottom: 0;
  opacity: 1;
}

.border-topleft {
  background-image: url(../images/border-topleft.png);
  width: 306px;
  height: 230px;
  top: 0;
  left: 0;
  position: absolute;
  z-index: 9991;
}

.border-topright {
  background-image: url(../images/border-topright.png);
  width: 306px;
  height: 230px;
  top: 0;
  right: 0;
  position: absolute;
  z-index: 9992;
}

.border-bottomleft {
  background-image: url(../images/border-bottomleft.png);
  width: 306px;
  height: 230px;
  bottom: 0;
  left: 0;
  position: absolute;
  z-index: 9993;
}

.border-bottomright {
  background-image: url(../images/border-bottomright.png);
  width: 306px;
  height: 230px;
  bottom: 0;
  right: 0;
  position: absolute;
  z-index: 9994;
}

.border {
  display: none;
}

.channel-splash .border {
  display: block;
}

.splash-buttons {
  width: 50%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding-top: 4.1vh;
  height: 20vh;
  box-sizing: border-box;
}

/* changes for channel -> menu transition */

.splash-switch .main-menu {
  transition: transform 400ms;
}

.splash-switch .splash-screen {
  top: 0;
}

/* buttons */

.btn {
  background-image: url(../images/btn-texture.png);
  background-size: auto 100%;
  height: 5vw;
  width: 15vw;
  display: inline-block;
  position: relative;
  margin-left: 4.5vw;
  margin-right: 4.5vw;
  text-decoration: none;
  line-height: 100%;
  font-family: "WiiContb", sans-serif;
  color: #474747 !important;
  font-size: 2.2vw;
  line-height: calc(4.5vw + 5px);
  cursor:
    url(../images/cursor.png), auto !important; /* TODO: does not work in IE11, buggy in Chrome OS */
  transform: scale(1);
  transition: 150ms ease;
}

.btn:hover {
  transform: scale(1.1);
}

.btn:before {
  background-image: url(../images/btn-left.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  height: 5vw;
  width: 2.2vw;
  display: inline-block;
  content: "";
  position: absolute;
  left: -2.2vw;
}

.btn:after {
  background-image: url(../images/btn-right.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  height: 5vw;
  width: 2.2vw;
  display: inline-block;
  content: "";
  position: absolute;
  right: -2.2vw;
}

/* Unsupported display */

.screen-message {
  display: none;
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-family: sans-serif;
  top: 20px;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  text-align: center;
}

.screen-message.hidden {
  visibility: none;
  top: 100vh;
}

.screen-message p {
  margin-top: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

@media only screen and (max-height: 469px),
  screen and (max-width: 1220px),
  screen and (width: 1280px) and (height: 1024px) {
  .screen-message {
    display: block !important;
  }
}

/* SFX */

.sfx {
  display: none;
}

/* Animation */

.channel-icon.blank {
  -webkit-animation: play 0.3s steps(3) infinite;
  -moz-animation: play 0.3s steps(3) infinite;
  -ms-animation: play 0.3s steps(3) infinite;
  -o-animation: play 0.3s steps(3) infinite;
  animation: play 0.3s steps(3) infinite;
}

@-webkit-keyframes play {
  from {
    background-position-x: 0px;
  }
  to {
    background-position-x: calc(100% * 3 - 1px);
  }
}

@-moz-keyframes play {
  from {
    background-position-x: 0px;
  }
  to {
    background-position-x: calc(100% * 3 - 1px);
  }
}

@-ms-keyframes play {
  from {
    background-position-x: 0px;
  }
  to {
    background-position-x: calc(100% * 3 - 1px);
  }
}

@-o-keyframes play {
  from {
    background-position-x: 0px;
  }
  to {
    background-position-x: calc(100% * 3 - 1px);
  }
}

@keyframes play {
  from {
    background-position-x: 0px;
  }
  to {
    background-position-x: calc(100% * 3 - 1px);
  }
}

/* mini mode */

@media only screen and (max-height: 718px) {
  .top-section {
    height: calc(100% - 130px);
  }

  .bottom-section {
    height: 130px;
    background-image: url(../images/mini-bottom-bg.png);
  }

  .left-button-container {
    transform: scale(0.6);
    transform-origin: left;
  }

  .right-button-container {
    transform: scale(0.6);
    transform-origin: right;
  }

  .left-button,
  .right-button {
    bottom: 180px;
  }

  .corner-button {
    bottom: 197px;
  }

  .bottom-title {
    transform-origin: top;
    transform: scale(0.65);
  }

  .date {
    font-size: 22px;
    bottom: 17px;
  }
}

@media only screen and (max-height: 826px) {
  .top-section {
    padding-top: 1em !important;
  }
}

@media only screen and (max-height: 640px) {
  .channels {
    transform: scale(0.9);
  }
}

/*
@media only screen and (max-height: 600px) {
  .channels {
    transform: scale(0.8);
		transform-origin: top;
  }
}

@media only screen and (max-height: 524px) {
  .channels {
    transform: scale(0.7);
		transform-origin: top;
  }
} */

/* widescreen fixes */

@media only screen and (min-width: 1720px) {
  .top-section {
    transform: scale(0.9);
    padding-top: 0em !important;
  }
}

/******************/
/*    testing     */
/* needs 2b moved */
/******************/

.channels {
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
}

@media only screen and (min-width: 1920px) {
  .channel-icon {
    --channel-width: 387px;
    --channel-height: 213px;
  }
}

@media only screen and (max-height: 47vw) {
  .channel-icon {
    --channel-width: min(40vh, 439px);
    --channel-height: min(22.5vh, 247px);
  }
}

.ds-lower-screen {
  position: relative;
}

.ds-selection-dialog,
.ds-carousel,
.ds-arrow-btn {
  position: relative;
  z-index: 3;
}

.ds-channel-card {
  flex: 0 0 38%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  max-height: 150px;
  scroll-snap-align: center;
  border-radius: 18px;
  border: 2px solid var(--ds-card-border, var(--wii-card-blue-border));
  background:
    radial-gradient(
      circle at 78% 12%,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0) 43%
    ),
    var(--ds-card-bg-solid, var(--wii-card-blue-soft));
  color: #183046;
  text-decoration: none;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 8px 16px rgba(30, 68, 97, 0.2);
  transform: translateY(0) scale(0.96);
  transition:
    transform 280ms cubic-bezier(0.2, 0.75, 0.22, 1),
    box-shadow 280ms cubic-bezier(0.2, 0.75, 0.22, 1),
    filter 220ms ease,
    opacity 220ms ease;
  scroll-snap-stop: always;
  opacity: 0.82;
  filter: saturate(0.94);
  will-change: transform, box-shadow, opacity;
}

.ds-channel-card.is-active {
  transform: translateY(-6px) scale(1);
  opacity: 1;
  filter: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 16px 30px rgba(30, 87, 127, 0.3);
}

.ds-channel-card.is-prev,
.ds-channel-card.is-next {
  transform: translateY(0) scale(0.9);
  opacity: 0.68;
  filter: saturate(0.8) blur(0.2px);
}

.ds-channel-card.is-far {
  transform: translateY(0) scale(0.86);
  opacity: 0.5;
  filter: saturate(0.7);
}

@media only screen and (max-width: 900px), (pointer: coarse) {
  body,
  html {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .main-menu {
    min-height: 100vh;
    height: auto;
  }

  .menu-header {
    display: block;
  }

  .menu-copy,
  .mobile-nav {
    display: none;
  }

  .menu-header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 18px 14px 18px;
  }

  .ds-mobile-shell {
    --wii-top-blue-deep: #1f79b8;
    --wii-top-blue-mid: #33a9df;
    --wii-top-blue-light: #83d6fb;
    --wii-card-blue-soft: #d7eefb;
    --wii-card-blue-mid: #b9def3;
    --wii-card-blue-border: #6fb2da;
    display: block;
    max-width: 760px;
    /* make sure the shell can center correctly on narrow viewports */
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 10px 6px 22px;
    perspective: 1200px;
  }

  .ds-top-shell,
  .ds-bottom-shell {
    border-radius: 28px;
    border: 3px solid #303b49;
    background: linear-gradient(170deg, #dbe5ef 0%, #adb9c8 48%, #8f9aaa 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.72),
      0 14px 26px rgba(17, 28, 42, 0.28);
    position: relative;
  }

  .ds-top-shell {
    height: 250px;
    padding: 14px 14px 16px;
    overflow: hidden;
  }

  .ds-speaker {
    position: absolute;
    top: 14px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: repeating-radial-gradient(
      circle,
      #687384 0 1px,
      #8c97a8 2px 4px
    );
    opacity: 0.9;
  }

  /* remove the decorative speaker circles on small screens */
  .ds-speaker {
    display: none;
  }

  .ds-speaker.left {
    left: 14px;
  }

  .ds-speaker.right {
    right: 14px;
  }

  .ds-top-screen {
    height: 100%;
    max-height: 100%;
    border-radius: 22px;
    padding: 16px;
    background:
      radial-gradient(
        circle at 24% 12%,
        rgba(255, 255, 255, 0.42) 0%,
        rgba(255, 255, 255, 0) 48%
      ),
      linear-gradient(
        160deg,
        var(--wii-top-blue-deep) 0%,
        var(--wii-top-blue-mid) 58%,
        var(--wii-top-blue-light) 100%
      );
    border: 2px solid #1f3141;
    color: #eff8ff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    contain: paint;
  }

  .ds-top-preview {
    position: absolute;
    inset: 0;
    background: transparent;
    border-radius: inherit;
    overflow: hidden;
    clip-path: inset(0 round 22px);
    opacity: 0;
    transition: opacity 220ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ds-top-preview-img {
    display: block;
    width: 86%;
    height: 86%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
    padding: 0;
    box-sizing: border-box;
    transform-origin: center;
  }

  .ds-top-screen.has-preview .ds-top-preview {
    opacity: 1;
  }

  .ds-top-screen.has-preview .ds-top-preview-img {
    animation: ds-preview-float 3.8s ease-in-out infinite;
  }

  .ds-top-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(4, 16, 28, 0.08) 0%,
      rgba(7, 25, 40, 0.26) 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms ease;
  }

  .ds-top-screen.has-preview::after {
    opacity: 1;
  }

  .ds-top-screen > * {
    position: relative;
    z-index: 1;
  }

  .ds-brand {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    color: rgba(232, 246, 255, 0.82);
  }

  .ds-title {
    margin: 0;
    font-size: clamp(28px, 7vw, 42px);
    line-height: 1;
    letter-spacing: 0.02em;
  }

  .ds-hint {
    margin: 0;
    font-size: 14px;
    color: rgba(230, 245, 255, 0.9);
  }

  .ds-top-screen.has-preview {
    justify-content: center;
    text-align: center;
    padding: 0;
    background: var(--ds-top-app-bg, #1b4a68);
  }

  .ds-top-screen.has-preview .ds-brand {
    display: none;
  }

  .ds-top-screen.has-preview .ds-title {
    display: none;
  }

  .ds-top-screen.has-preview .ds-hint {
    display: none;
  }

  .ds-top-screen.has-preview::after {
    opacity: 0;
  }

  .ds-hinge {
    margin: 6px auto;
    width: 84%;
    min-height: 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, #8f9cab 0%, #6e7a89 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .ds-hinge span {
    width: 30px;
    height: 5px;
    border-radius: 999px;
    background: rgba(22, 38, 56, 0.45);
  }

  .ds-bottom-shell {
    height: 275px;
    padding: 14px 10px;
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 6px;
  }

  .ds-lower-screen {
    height: 100%;
    border-radius: 20px;
    border: 2px solid #212d3a;
    background:
      radial-gradient(
        circle at 80% 12%,
        rgba(255, 255, 255, 0.38) 0%,
        rgba(255, 255, 255, 0) 38%
      ),
      linear-gradient(155deg, #eef9ff 0%, #d7eefb 44%, #c2e4f7 100%);
    padding: 10px 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .ds-selection-dialog {
    margin: 0 14px 8px;
    min-height: 34px;
    border-radius: 999px;
    border: 1px solid #8bc4e6;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), #dff1fc);
    color: #1b547a;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      0 2px 5px rgba(25, 88, 126, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    text-align: center;
  }

  .ds-selection-name {
    font-family: "WiiContb", sans-serif;
    font-size: 18px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .ds-carousel {
    height: calc(100% - 22px);
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 31%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 14px 4px;
  }

  .ds-carousel::before,
  .ds-carousel::after {
    content: "";
    /* match the scroll-padding-inline so the edge gap centers correctly */
    flex: 0 0 calc(31% - 6px);
    height: 1px;
  }

  .ds-carousel::-webkit-scrollbar {
    display: none;
  }

  .ds-channel-card {
    flex: 0 0 38%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    max-height: 150px;
    scroll-snap-align: center;
    border-radius: 18px;
    border: 2px solid var(--ds-card-border, var(--wii-card-blue-border));
    background:
      radial-gradient(
        circle at 78% 12%,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0) 43%
      ),
      var(--ds-card-bg-solid, var(--wii-card-blue-soft));
    color: #183046;
    text-decoration: none;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.85),
      0 8px 16px rgba(30, 68, 97, 0.2);
    transform: translateY(0) scale(0.96);
    transition:
      transform 280ms cubic-bezier(0.2, 0.75, 0.22, 1),
      box-shadow 280ms cubic-bezier(0.2, 0.75, 0.22, 1),
      filter 220ms ease,
      opacity 220ms ease;
    /* prevent browser from skipping snap points on fast flings */
    scroll-snap-stop: always;
    opacity: 0.82;
    filter: saturate(0.94);
    will-change: transform, box-shadow, opacity;
  }

  .ds-card-preview {
    margin: 0;
    height: 100%;
    min-height: 0;
    border-radius: 12px;
    border: 2px solid var(--ds-card-border, #9cc6e1);
    background:
      radial-gradient(
        circle at 25% 18%,
        rgba(255, 255, 255, 0.28) 0%,
        rgba(255, 255, 255, 0) 46%
      ),
      var(--ds-card-bg-solid, var(--wii-card-blue-mid));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .ds-card-preview img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    object-position: center;
    padding: 0;
    box-sizing: border-box;
  }

  .ds-channel-card strong,
  .ds-card-desc,
  .ds-channel-card .ds-card-kicker {
    display: none;
  }

  .ds-channel-card.is-active {
    transform: translateY(-6px) scale(1);
    opacity: 1;
    filter: none;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      0 16px 30px rgba(30, 87, 127, 0.3);
  }

  .ds-channel-card.is-prev,
  .ds-channel-card.is-next {
    transform: translateY(0) scale(0.9);
    opacity: 0.68;
    filter: saturate(0.8) blur(0.2px);
  }

  .ds-channel-card.is-far {
    transform: translateY(0) scale(0.86);
    opacity: 0.5;
    filter: saturate(0.7);
  }

  .ds-channel-card strong {
    font-size: clamp(20px, 5.7vw, 30px);
    line-height: 1;
    margin-bottom: 6px;
  }

  .ds-card-desc {
    font-size: 13px;
    line-height: 1.25;
    color: #3a5d7d;
  }

  .ds-channel-card .ds-card-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    margin-bottom: 8px;
    color: #5a86aa;
  }

  .ds-carousel-dots {
    min-height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding-top: 4px;
  }

  .ds-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(66, 96, 120, 0.32);
    border: 0;
    padding: 0;
  }

  .ds-dot.active {
    background: #2e7eb2;
    box-shadow: 0 0 0 2px rgba(68, 152, 207, 0.24);
  }

  @keyframes ds-preview-float {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-2px);
    }
  }

  .ds-arrow-btn {
    width: 34px;
    height: 72px;
    border-radius: 18px;
    border: 2px solid #6d7d8f;
    background: linear-gradient(180deg, #ecf4fa 0%, #cfdbe6 100%);
    color: #3a4f63;
    font-size: 20px;
    line-height: 1;
    padding: 0;
  }

  .ds-arrow-btn:active {
    transform: translateY(1px);
  }

  .top-section {
    height: auto;
    padding: 18px 16px 0;
  }

  .channels {
    display: none;
  }

  .social-mobile-hub {
    display: block;
    width: min(94vw, 760px);
    margin: 0 auto 16px;
    padding: 10px 6px;
  }

  .social-mobile-top {
    border-radius: 24px;
    border: 2px solid #3a6789;
    background:
      radial-gradient(
        circle at 82% 12%,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0) 42%
      ),
      linear-gradient(160deg, #1e4d74 0%, #2b8cc4 100%);
    color: #f4fbff;
    text-align: center;
    padding: 14px 12px 12px;
    box-shadow: 0 10px 18px rgba(9, 30, 47, 0.24);
  }

  .social-mobile-avatar-wrap {
    width: 88px;
    height: 88px;
    margin: 0 auto 8px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.75);
    overflow: hidden;
    box-shadow: 0 8px 14px rgba(12, 34, 52, 0.34);
  }

  .social-mobile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .social-mobile-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    opacity: 0.9;
  }

  .social-mobile-title {
    margin: 2px 0 4px;
    font-family: "WiiContb", sans-serif;
    font-size: clamp(30px, 8vw, 38px);
    line-height: 1;
  }

  .social-mobile-copy {
    margin: 0;
    font-size: 13px;
    opacity: 0.96;
  }

  .social-mobile-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .social-mobile-card {
    border-radius: 18px;
    border: 2px solid #89badc;
    background:
      radial-gradient(
        circle at 84% 14%,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0) 44%
      ),
      linear-gradient(165deg, #ffffff 0%, #d8ecfa 100%);
    min-height: 112px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.92),
      0 8px 14px rgba(17, 57, 84, 0.18);
    text-decoration: none;
    color: #1f4e71;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .social-mobile-card-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
    color: #5d87ab;
  }

  .social-mobile-card strong {
    font-family: "WiiContb", sans-serif;
    font-size: 30px;
    line-height: 1;
  }

  .social-mobile-card-copy {
    font-size: 13px;
    color: #456a88;
  }

  .social-mobile-menu .top-section,
  .social-mobile-menu .bottom-section,
  .social-mobile-menu .splash-screen,
  .social-mobile-menu .splash-bar,
  .social-mobile-menu .border {
    display: none;
  }

  .bottom-section,
  .splash-screen,
  .splash-bar,
  .border {
    display: none;
  }

  .main-menu.channel-splash {
    transform: none;
  }

  .screen-message {
    display: none !important;
  }
}
