.eshop-pulse.fade-out {
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Full-page orange pulse effect for Beats button */
.eshop-pulse {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  overflow: visible;
}
.eshop-pulse-center {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 152, 0, 0.25) 0%,
    rgba(255, 152, 0, 0.1) 60%,
    rgba(255, 152, 0, 0) 100%
  );
  transform: scale(0);
  animation: eshop-pulse-center-anim 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes eshop-pulse-center-anim {
  to {
    transform: scale(8);
    opacity: 0;
  }
}
.eshop-pulse-ring {
  position: absolute;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 152, 0, 0.32);
  background: none;
  transform: scale(0.9);
  opacity: 0.55;
  animation: eshop-pulse-ring-anim 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes eshop-pulse-ring-anim {
  to {
    transform: scale(6.5);
    opacity: 0;
  }
}
/* Orange ripple effect for Beats button */
.hm-UtilityButton-eshop {
  position: relative;
  overflow: hidden;
}
.eshop-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 152, 0, 0.35);
  pointer-events: none;
  transform: scale(0);
  animation: eshop-ripple-anim 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}
@keyframes eshop-ripple-anim {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}
/* Nintendo-style blue outline for selected/focused GameLauncher */
.hm-GameLauncher:focus,
.hm-GameLauncher.selected {
  outline: 4px solid var(--accent-color, #00b7c1) !important;
  outline-offset: 0px !important;
  box-shadow: 0 0 0 6px #b6eaff44 !important;
  z-index: 2;
}
@media (max-width: 900px) {
  #settings-modal {
    min-width: 0;
    max-width: 98vw !important;
    width: 98vw;
    min-height: 0;
    max-height: 98vh;
    height: auto;
    flex-direction: column;
    border-radius: 10px;
  }
  .settings-nav {
    flex-direction: row;
    width: 100%;
    border-radius: 10px 10px 0 0;
    padding: 0 0 0 0;
    box-shadow: none;
    gap: 0;
    overflow-x: auto;
  }
  .settings-nav-item {
    flex: 1 1 0;
    font-size: 17px;
    padding: 14px 0;
    border-left: none;
    border-bottom: 4px solid transparent;
    border-radius: 0;
    text-align: center;
  }
  .settings-nav-item.active {
    background: linear-gradient(180deg, #e0e6f7 60%, #f5f5f5 100%);
    border-left: none;
    border-bottom: 4px solid var(--accent-color, #00b7c1);
    box-shadow: 0 2px 0 0 #b6eaff44;
  }
  .settings-panel {
    border-radius: 0 0 10px 10px;
    min-width: 0;
    padding: 24px 10px 24px 10px;
  }
}

@media (max-width: 600px) {
  #settings-modal {
    min-width: 0;
    max-width: 100vw !important;
    width: 100vw;
    min-height: 0;
    max-height: 100vh;
    height: auto;
    border-radius: 0;
    box-shadow: none;
  }
  .settings-nav {
    border-radius: 0;
    padding: 0;
  }
  .settings-panel {
    border-radius: 0;
    padding: 16px 2vw 16px 2vw;
    min-width: 0;
    gap: 14px;
  }
  .settings-panel-title {
    font-size: 20px;
    margin-bottom: 10px;
  }
  .theme-row {
    font-size: 16px;
    padding: 10px 0;
  }
  .theme-row .theme-swatch {
    width: 22px;
    height: 22px;
  }
  .theme-row .theme-label {
    font-size: 16px;
  }
  .theme-row .theme-radio {
    width: 16px;
    height: 16px;
  }
}
/* Nintendo Switch-style settings modal redesign */
#settings-modal {
  display: flex;
  flex-direction: row;
  min-width: 720px;
  min-height: 440px;
  max-width: 9800px !important;
  max-height: 92vh;
  background: none;
  box-shadow: none;
  padding: 0;
}
.settings-nav {
  width: 180px;
  background: #f5f5f5;
  border-radius: 12px 0 0 12px;
  display: flex;
  flex-direction: column;
  padding: 24px 0 24px 0;
  gap: 2px;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.07);
}
.settings-nav-item {
  font-size: 20px;
  padding: 12px 28px;
  color: #222;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.settings-nav-item.active {
  background: linear-gradient(90deg, #e0e6f7 60%, #f5f5f5 100%);
  color: var(--accent-color, #00b7c1);
  border-left: 4px solid var(--accent-color, #00b7c1);
  font-weight: 600;
  box-shadow: 0 0 0 2px #b6eaff44;
}
.settings-panel {
  flex: 1;
  background: #fff;
  border-radius: 0 12px 12px 0;
  padding: 32px 36px 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 260px;
}
.settings-panel-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--accent-color, #00b7c1);
}
.theme-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 0 16px 0;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.13s;
}
.theme-row:last-child {
  border-bottom: none;
}
.theme-row.selected {
  background: linear-gradient(90deg, #e0f7fa 60%, #fff 100%);
  color: var(--accent-color, #00b7c1);
  font-weight: 600;
}
.theme-row .theme-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid #bbb;
  margin-right: 8px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.theme-row[data-theme="dark"] .theme-swatch {
  background: #181a1b;
  border-color: #222;
}
.theme-row .theme-label {
  font-size: 20px;
  font-weight: 500;
}
.theme-row .theme-radio {
  margin-left: auto;
  accent-color: var(--accent-color, #00b7c1);
  width: 22px;
  height: 22px;
}
/* Settings Modal Styles */
.settings-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}
.settings-tab {
  background: var(--bg-color, #f5f5f5);
  color: var(--accent-color, #222);
  border: none;
  border-radius: 6px 6px 0 0;
  padding: 8px 22px;
  font-size: 17px;
  font-family: var(--semibold-font-family, inherit);
  cursor: pointer;
  opacity: 0.85;
  transition: background 0.18s, color 0.18s;
}
.settings-tab.active {
  background: var(--accent-color, #222);
  color: #fff;
  opacity: 1;
}
.settings-tab-content {
  padding: 8px 0 0 0;
}
.theme-options {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}
.theme-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  cursor: pointer;
}
.theme-radio input[type="radio"] {
  accent-color: var(--accent-color, #222);
  width: 18px;
  height: 18px;
}
@media (max-width: 480px) {
  .hm-UtilityNavigation {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 0 1vw;
  }
  .hm-UtilityButton-newsfeed,
  .hm-UtilityButton-eshop,
  .hm-UtilityButton-garally,
  .hm-UtilityButton-keyconfig,
  .hm-UtilityButton-setting,
  .hm-UtilityButton-music,
  .hm-UtilityButton-power {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    flex: 0 0 auto;
    padding: 0;
  }
  .hm-UtilityButton_Icon {
    width: 20px;
    height: 20px;
    min-width: 16px;
    min-height: 16px;
    max-width: 24px;
    max-height: 24px;
  }
}
/* Utility button icon scaling and reduced padding/gap */
@media (max-width: 1200px) {
  .hm-UtilityNavigation {
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0 2vw;
  }
  .hm-UtilityButton-newsfeed,
  .hm-UtilityButton-eshop,
  .hm-UtilityButton-garally,
  .hm-UtilityButton-keyconfig,
  .hm-UtilityButton-setting,
  .hm-UtilityButton-music,
  .hm-UtilityButton-power {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    max-width: 64px;
    max-height: 64px;
    flex: 0 0 auto;
    padding: 0;
  }
  .hm-UtilityButton_Icon {
    width: 40px;
    height: 40px;
    min-width: 32px;
    min-height: 32px;
    max-width: 48px;
    max-height: 48px;
  }
}

@media (max-width: 800px) {
  .hm-UtilityNavigation {
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0 1vw;
  }
  .hm-UtilityButton-newsfeed,
  .hm-UtilityButton-eshop,
  .hm-UtilityButton-garally,
  .hm-UtilityButton-keyconfig,
  .hm-UtilityButton-setting,
  .hm-UtilityButton-music,
  .hm-UtilityButton-power {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
    margin-left: 0 !important; /* remove large left margins from desktop rule */
    flex: 0 0 auto;
    padding: 0;
  }
  .hm-UtilityButton_Icon {
    width: 28px;
    height: 28px;
    min-width: 22px;
    min-height: 22px;
    max-width: 32px;
    /* Disable hover/focus grow effect on very small screens to avoid edge clipping */
    .hm-UtilityButton-newsfeed:hover,
    .hm-UtilityButton-eshop:hover,
    .hm-UtilityButton-garally:hover,
    .hm-UtilityButton-keyconfig:hover,
    .hm-UtilityButton-setting:hover,
    .hm-UtilityButton-music:hover,
    .hm-UtilityButton-power:hover,
    .hm-UtilityButton-newsfeed:focus,
    .hm-UtilityButton-eshop:focus,
    .hm-UtilityButton-garally:focus,
    .hm-UtilityButton-keyconfig:focus,
    .hm-UtilityButton-setting:focus,
    .hm-UtilityButton-music:focus,
    .hm-UtilityButton-power:focus {
      transform: none !important;
    }
    max-height: 32px;

    /* Ensure margin-left spacing removed at slightly larger small-screen breakpoint too */
    @media (max-width: 800px) {
      .hm-UtilityButton-eshop,
      .hm-UtilityButton-garally,
      .hm-UtilityButton-keyconfig,
      .hm-UtilityButton-setting,
      .hm-UtilityButton-music,
      .hm-UtilityButton-power {
        margin-left: 0 !important;
      }
      .hm-UtilityNavigation {
        width: 100% !important;
      }
    }
  }
}
/* Responsive utility belt and buttons */
@media (max-width: 1200px) {
  .hm-UtilityNavigation {
    gap: 14px;
    margin-top: 36px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
  .hm-UtilityButton-newsfeed,
  .hm-UtilityButton-eshop,
  .hm-UtilityButton-garally,
  .hm-UtilityButton-keyconfig,
  .hm-UtilityButton-setting,
  .hm-UtilityButton-music,
  .hm-UtilityButton-power {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    max-width: 64px;
    max-height: 64px;
    flex: 0 0 auto;
  }
}

@media (max-width: 800px) {
  .hm-UtilityNavigation {
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
  .hm-UtilityButton-newsfeed,
  .hm-UtilityButton-eshop,
  .hm-UtilityButton-garally,
  .hm-UtilityButton-keyconfig,
  .hm-UtilityButton-setting,
  .hm-UtilityButton-music,
  .hm-UtilityButton-power {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
    flex: 0 0 auto;
  }
}
/* Page fade overlay for seamless transitions */
#page-fade-overlay {
  position: fixed;
  inset: 0;
  background: #ebebeb;
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  transition: opacity 0.44s cubic-bezier(0.4, 0.2, 0.2, 1);
}
#page-fade-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
/* Animated arrow popup for profile avatars */
.profile-arrow-popup {
  position: absolute;
  left: 120px;
  top: -12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  padding: 8px 20px 8px 16px; /* reduced padding */
  font-size: 14px; /* smaller text */
  color: #222;
  font-family: var(--semibold-font-family);
  z-index: 10;
  pointer-events: auto;
  user-select: none;
  min-width: 120px; /* smaller min width */
  min-height: 32px; /* smaller min height */
  max-width: 80vw;
  max-height: 64px;
  @media (max-width: 600px) {
    .profile-arrow-popup {
      left: 4vw;
      right: 2vw;
      min-width: 60px;
      max-width: 70vw;
      padding: 6px 10px 6px 10px;
      font-size: 13px;
    }
    .profile-arrow-text {
      font-size: 12px;
      padding: 0 8px;
      box-sizing: border-box;
      word-break: break-word;
    }
    .profile-arrow-anim {
      font-size: 22px;
    }

    .profile-arrow-close {
      position: absolute;
      top: 24px;
      right: 8px;
      background: none;
      border: none;
      font-size: 18px;
      color: #888;
      cursor: pointer;
      opacity: 0.7;
      transition: opacity 0.18s;
      z-index: 11;
    }
  }
}

.profile-arrow-text {
  font-size: 13px;
  color: #00b7c1;
  font-family: var(--semibold-font-family);
  opacity: 0.9;
  text-align: center;
  word-break: break-word;
  padding: 6px 0px;
  box-sizing: border-box;
}

.profile-arrow-anim {
  font-size: 20px; /* smaller arrow */
  color: #00b7c1;
  font-weight: bold;
  display: flex;
  align-items: center;
  animation: arrow-slide 2.8s cubic-bezier(0.6, 0.1, 0.3, 1) infinite;
  transform: translateX(0);
  text-shadow: 0 0 2px #00b7c1, 0 1px 6px #222;
  margin: 0;
}
/* Profile arrow close button */
.profile-arrow-close {
  position: absolute;
  top: 30px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: #888;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.18s;
  z-index: 11;
}
.profile-arrow-close:hover {
  opacity: 1;
  color: #00b7c1;
}
@keyframes arrow-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}
@keyframes arrow-slide {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-14px);
  }
}
/* Volume Slider Popup Styles */
.volume-popup {
  position: absolute;
  z-index: 9999;
  min-width: 180px;
  max-width: 96vw;
  min-height: 50px;
  max-height: 50px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18);
  border: 3px solid #00b7c1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.4, 0.2, 0.2, 1);
  display: flex;
  justify-content: center;
  margin-top: 0;
  margin-left: 0;
}
.volume-popup.active {
  opacity: 1;
  pointer-events: auto;
}
.volume-popup-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 16px 8px 16px; /* even less vertical padding */
  width: 100%;
}
.volume-popup-title {
  color: #fff;
  font-size: 22px;
  font-family: var(--semibold-font-family);
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}
.volume-slider {
  width: 140px;
  height: 8px;
  background: linear-gradient(90deg, #00b7c1 0%, #27c1d1 100%);
  border-radius: 2px; /* Less round, more rectangular */
  outline: none;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 2px; /* Less round, more rectangular */
  background: #fff;
  border: 3px solid #8d8e8e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: border 0.2s;
  position: relative;
  top: -5px;
}
.volume-slider:focus::-webkit-slider-thumb {
  border-color: var(--highlight-top-color);
}
.volume-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background: #fff;
  border: 3px solid #00b7c1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: border 0.2s;
  position: relative;
  top: 0px;
}
.volume-slider:focus::-moz-range-thumb {
  border-color: var(--highlight-top-color);
}
.volume-slider::-ms-thumb {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background: #fff;
  border: 3px solid #00b7c1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: border 0.2s;
  position: relative;
  top: 0px;
}
.volume-slider:focus::-ms-thumb {
  border-color: var(--highlight-top-color);
}
.volume-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, #00b7c1 0%, #27c1d1 100%);
}
.volume-slider::-ms-fill-lower {
  background: #00b7c1;
}
.volume-slider::-ms-fill-upper {
  background: #27c1d1;
}
/* Volume Slider Modal Styles */
.volume-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0.2, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.volume-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.volume-modal {
  background: #222;
  border-radius: 18px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
  padding: 36px 48px 32px 48px;
  min-width: 320px;
  max-width: 96vw;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.volume-modal-title {
  color: #fff;
  font-size: 26px;
  font-family: var(--semibold-font-family);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}
.volume-slider {
  width: 220px;
  accent-color: #00b7c1;
  height: 6px;
  border-radius: 6px;
  background: #444;
  margin-top: 8px;
}
/* TOSHIBA Font (Eurostile Black) for Watermark */
@font-face {
  font-family: "EurostileBlack";
  src: url("../fonts/eurostile-black.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}
/* Watermark - SUPEREARECORDS */
.site-watermark {
  position: fixed;
  right: 40px;
  bottom: 80px; /* above footer height */
  z-index: 100;
  font-size: 16px;
  color: #888;
  font-family: "EurostileBlack", var(--semibold-font-family);
  opacity: 0.7;
  pointer-events: none;
  letter-spacing: 1px;
}
.power-dim-icon {
  font-size: 54px;
  font-weight: bold;
  color: #00b7c1;
  margin-right: 18px;
  vertical-align: middle;
  text-shadow: 0 0 8px #00b7c1, 0 2px 8px #222;
  letter-spacing: 0.5px;
  position: relative;
  top: -6px;
}
/* Power Dim Icon Styling */
.power-dim-icon {
  font-size: 54px;
  font-weight: bold;
  color: #00b7c1;
  margin-right: 18px;
  vertical-align: middle;
  text-shadow: 0 0 8px #00b7c1, 0 2px 8px #222;
  letter-spacing: 0.5px;
}
/* Nintendo-style Power Dim Menu */
.power-dim-menu {
  background: #222;
  border-radius: 18px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
  padding: 48px 64px 32px 64px;
  min-width: 420px;
  max-width: 96vw;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.power-dim-title {
  color: #fff;
  font-size: 32px;
  font-family: var(--semibold-font-family);
  margin-bottom: 32px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.power-dim-buttons {
  display: flex;
  gap: 32px;
  margin-bottom: 28px;
}

.power-dim-btn {
  font-size: 24px;
  font-family: var(--semibold-font-family);
  padding: 18px 48px;
  border-radius: 0px;
  border: 3px solid #00b7c1;
  background: #181818;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
  outline: none;
  position: relative;
  min-width: 220px;
  min-height: 56px;
  margin: 0 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.power-dim-btn:focus {
  border-color: var(--highlight-top-color);
  box-shadow: 0 0 0 4px var(--highlight-top-color),
    0 2px 8px rgba(0, 0, 0, 0.18);
}
.power-dim-btn.exit {
  border-color: #00b7c1;
  background: #181818;
}
.power-dim-btn.exit:hover,
.power-dim-btn.exit:focus {
  background: #00b7c1;
  color: #fff;
  border-color: var(--highlight-top-color);
}
.power-dim-btn.cancel {
  border-color: #555;
  background: #222;
}
.power-dim-btn.cancel:hover,
.power-dim-btn.cancel:focus {
  background: #555;
  color: #fff;
  border-color: var(--highlight-top-color);
}
.power-dim-desc {
  color: #bbb;
  font-size: 18px;
  margin-top: 8px;
  text-align: center;
}
/* Power Dim Overlay (Sleep Mode) */
.power-dim-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0.2, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.power-dim-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.power-dim-message {
  color: #fff;
  font-size: 38px;
  font-family: var(--semibold-font-family);
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 18px;
  padding: 48px 64px 32px 64px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
}
/* Smooth profile switch fade animation */
.profile-fade {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transition: opacity 0.32s cubic-bezier(0.4, 0.2, 0.2, 1),
    transform 0.32s cubic-bezier(0.4, 0.2, 0.2, 1);
}
/* Fade grid tiles smoothly */
.hm-GameList > * {
  opacity: 1;
  transition: opacity 0.32s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.profile-fade > * {
  opacity: 0;
  pointer-events: none;
}
.hm-GameList {
  transition: opacity 0.32s cubic-bezier(0.4, 0.2, 0.2, 1),
    transform 0.32s cubic-bezier(0.4, 0.2, 0.2, 1);
}
/* Type Selector Styles */
.hm-TypeSelector {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: center;
  margin: 32px 0 24px 0;
}
.hm-TypeSelectorBtn {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  color: var(--main-color);
  font-family: var(--semibold-font-family);
  font-size: 20px;
  padding: 10px 32px;
  outline: none;
  border: 2px solid var(--accent-color);
  transition: background 0.2s, color 0.2s, border 0.2s;
  cursor: pointer;
  opacity: 1;
}
.hm-TypeSelectorBtn.selected {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--highlight-top-color);
  opacity: 1;
}
.hm-TypeSelectorBtn.greyed {
  opacity: 0.5;
}
:root {
  --bg-color: #ebebeb;
  --main-color: #2e2e2e;
  --accent-color: #00b7c1;
  --highlight-top-color: #6afbe6;
  --highlight-bottom-color: #27c1d1;
  --main-font-family: "a-otf-ud-shin-go-pr6n", sans-serif;
  --semibold-font-family: "fot-udkakugo-large-pr6n", sans-serif;
  --number-font-family: "din-2014", sans-serif;

  /* General Reset & Base Styles */
  html,
  body {
    margin: 0;
    padding: 0;
    min-width: 320px;
    min-height: 100vh;
    font-family: var(--main-font-family);
    font-size: 24px;
    background: var(--bg-color);
    overflow-x: hidden;
    overflow-y: auto;
    user-select: none;
  }

  button,
  a {
    background: none;
    border: none;
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    outline: none;
    user-select: none;
    cursor: pointer;
  }

  /* Home Menu Layout */
  .hm-HomeMenu {
    min-width: 320px;
    min-height: 100vh;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    background: var(--bg-color);
    user-select: none;
    overflow-x: auto;
    overflow-y: auto;
  }

  /* Header */
  .hm-Header {
    width: 100vw;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 36px 64px;
    box-sizing: border-box;
    flex-shrink: 0;
  }

  .hm-UserList {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-right: auto;
  }

  .hm-UserList_User {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
  }

  .hm-UserList_UserIcon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #fff, 0 1px 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 80ms ease;
  }

  .hm-UserList_User:focus > .hm-UserList_UserIcon {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--highlight-top-color),
      0 1px 1px 7px rgba(0, 0, 0, 0.1);
    animation: hm-UserList_UserIcon_highlight 1s ease-in-out infinite;
  }

  @keyframes hm-UserList_UserIcon_highlight {
    0%,
    100% {
      box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--highlight-top-color),
        0 1px 1px 7px rgba(0, 0, 0, 0.1);
    }
    50% {
      box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--highlight-bottom-color),
        0 1px 1px 7px rgba(0, 0, 0, 0.1);
    }
  }

  .hm-GlobalStatus {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: auto;
  }

  .hm-TimeStatus {
    color: var(--main-color);
    font-family: var(--number-font-family);
    font-weight: 500;
    font-size: 24px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
  }

  .hm-WifiStatus {
    width: 26px;
    height: 26px;
    margin-left: 12px;
    display: flex;
    align-items: center;
  }

  .hm-WifiStatus_Icon {
    width: 100%;
    height: 100%;
  }

  .hm-BatteryStatus {
    width: 20px;
    height: 10px;
    background: var(--main-color);
    box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--main-color);
    position: relative;
    margin-left: 20px;
  }
  .hm-BatteryStatus::after {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(100% + 4px);
    transform: translateY(-50%);
    width: 3px;
    height: 6px;
    background: var(--main-color);
  }

  /* Main Body */
  .hm-Body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none;
  }

  .hm-GameList {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(246px, 1fr));
    gap: 32px 16px;
    padding: 4vw 6vw 6vw 6vw;
    overflow-y: auto;
    user-select: none;
    justify-items: center;
    align-items: start;
  }
  @media (max-width: 1200px) {
    .hm-Header {
      padding: 24px 32px;
      font-size: 20px;
    }
    .hm-GameList {
      gap: 24px 10px;
      padding: 4vw 3vw 6vw 3vw;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    .hm-GameLauncher {
      width: 180px;
      height: 180px;
    }
    .hm-UtilityButton-newsfeed,
    .hm-UtilityButton-eshop,
    .hm-UtilityButton-garally,
    .hm-UtilityButton-keyconfig,
    .hm-UtilityButton-setting,
    .hm-UtilityButton-music,
    .hm-UtilityButton-power {
      width: 64px;
      height: 64px;
    }
  }

  @media (max-width: 800px) {
    .hm-Header {
      padding: 12px 8px;
      font-size: 16px;
    }
    .hm-GameList {
      gap: 12px 6px;
      padding: 2vw 1vw 4vw 1vw;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    .hm-GameLauncher {
      width: 120px;
      height: 120px;
    }
    .hm-UtilityButton-newsfeed,
    .hm-UtilityButton-eshop,
    .hm-UtilityButton-garally,
    .hm-UtilityButton-keyconfig,
    .hm-UtilityButton-setting,
    .hm-UtilityButton-music,
    .hm-UtilityButton-power {
      width: 44px;
      height: 44px;
    }
    .hm-Footer {
      height: 48px;
      font-size: 12px;
      padding: 0 8px;
    }
  }

  .hm-GameLauncher,
  .hm-GameLauncher,
  .hm-GameLauncher-placeholder {
    width: 246px;
    height: 246px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
    border-radius: 0px; /* Less round corners */
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s ease-in-out;
    user-select: none;
  }

  .hm-GameLauncher:focus {
    box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--highlight-top-color),
      0 1px 1px 7px rgba(0, 0, 0, 0.1);
    animation: hm-GameLauncher_Highlight 1s ease-in-out infinite;
  }
  .hm-GameLauncher:hover {
    transform: scale(1.1);
    z-index: 1;
  }

  @keyframes hm-GameLauncher_Highlight {
    0%,
    100% {
      box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--highlight-top-color),
        0 1px 1px 7px rgba(0, 0, 0, 0.1);
    }
    50% {
      box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--highlight-bottom-color),
        0 1px 1px 7px rgba(0, 0, 0, 0.1);
    }
  }

  .hm-GameLauncher_Title {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 24px;
    color: var(--accent-color);
    opacity: 0;
    transition: opacity 120ms ease;
    user-select: none;
  }
  .hm-GameLauncher:focus > .hm-GameLauncher_Title {
    opacity: 1;
  }
  .hm-GameLauncher_Thumbnail {
    width: 100%;
    height: 100%;
    border-radius: 0px; /* Match button corners */
    object-fit: cover;
    user-select: none;
  }
  .hm-GameLauncher-placeholder {
    border: 3px solid rgba(255, 255, 255, 0.5);
    background: #f5f5f5;
  }

  /* Utility Navigation */
  .hm-UtilityNavigation {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-top: 56px;
    user-select: none;
  }

  .hm-UtilityButton-newsfeed,
  .hm-UtilityButton-eshop,
  .hm-UtilityButton-garally,
  .hm-UtilityButton-keyconfig,
  .hm-UtilityButton-setting,
  .hm-UtilityButton-music,
  .hm-UtilityButton-power {
    width: 88px;
    height: 88px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease-in-out;
    user-select: none;
  }
  .hm-UtilityButton-newsfeed:hover,
  .hm-UtilityButton-eshop:hover,
  .hm-UtilityButton-garally:hover,
  .hm-UtilityButton-keyconfig:hover,
  .hm-UtilityButton-setting:hover,
  .hm-UtilityButton-music:hover,
  .hm-UtilityButton-power:hover {
    transform: scale(1.1);
    z-index: 1;
  }
  .hm-UtilityButton-newsfeed:focus,
  .hm-UtilityButton-eshop:focus,
  .hm-UtilityButton-garally:focus,
  .hm-UtilityButton-keyconfig:focus,
  .hm-UtilityButton-setting:focus,
  .hm-UtilityButton-music:focus,
  .hm-UtilityButton-power:focus {
    box-shadow: 0 0 0 4px var(--highlight-top-color),
      0 1px 1px 4px rgba(0, 0, 0, 0.1);
    animation: hm-UtilityButton_Highlight 1s ease-in-out infinite;
  }
  @keyframes hm-UtilityButton_Highlight {
    0%,
    100% {
      box-shadow: 0 0 0 4px var(--highlight-top-color),
        0 1px 1px 4px rgba(0, 0, 0, 0.1);
    }
    50% {
      box-shadow: 0 0 0 4px var(--highlight-bottom-color),
        0 1px 1px 4px rgba(0, 0, 0, 0.1);
    }
  }
  .hm-UtilityButton_Icon {
    width: 60px;
    height: 60px;
    user-select: none;
  }
  .hm-UtilityButton-newsfeed::after,
  .hm-UtilityButton-eshop::after,
  .hm-UtilityButton-garally::after,
  .hm-UtilityButton-keyconfig::after,
  .hm-UtilityButton-setting::after,
  .hm-UtilityButton-music::after,
  .hm-UtilityButton-power::after {
    content: attr(aria-label);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-color);
    font-size: 20px;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 120ms ease;
    pointer-events: none;
  }
  .hm-UtilityButton-newsfeed:focus::after,
  .hm-UtilityButton-eshop:focus::after,
  .hm-UtilityButton-garally:focus::after,
  .hm-UtilityButton-keyconfig:focus::after,
  .hm-UtilityButton-setting:focus::after,
  .hm-UtilityButton-music:focus::after,
  .hm-UtilityButton-power:focus::after {
    opacity: 1;
  }

  /* Footer */
  .hm-Footer {
    margin: auto 32px 0 32px;
    padding: 0 24px;
    height: 72px;
    border-top: 1px solid var(--main-color);
    display: flex;
    flex-direction: row;
    align-items: center;
    user-select: none;
  }
  .hm-ControllerStatus {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-right: auto;
  }
  .hm-ControllerStatus_ControllerType {
    width: 66px;
    height: 36px;
  }
  .hm-KeyGuideList {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: auto;
  }
  .hm-KeyGuide {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }
  .hm-KeyGuide + .hm-KeyGuide {
    margin-left: 16px;
  }
  .hm-KeyGuide_Icon {
    width: 32px;
    height: 32px;
    user-select: none;
  }
  .hm-KeyGuide_Text {
    font-family: var(--semibold-font-family);
    font-size: 16px;
    letter-spacing: 0.4px;
    transform: translateY(-1px);
    user-select: none;
  }

  html,
  body {
    margin: 0;
    font-family: var(--main-font-family);
    font-size: 24px;
  }

  button {
    background-color: transparent;
    border: 0 none;
    margin: 0;
    padding: 0;
    font: inherit;
  }

  .hm-HomeMenu {
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    display: flex;
    flex-flow: column nowrap;
  }

  .hm-Header {
    width: 100vw;
    display: flex;
    flex-flow: row nowrap;
    padding: 36px 64px;
    box-sizing: border-box;
    flex-shrink: 0;
  }

  .hm-UserList {
    margin-left: 0;
    margin-right: auto;
    display: flex;
    flex-flow: row nowrap;
  }

  .hm-UserList_User {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    outline: none;
    position: relative;
  }

  .hm-UserList_User::after {
    content: attr(title);
    position: absolute;
    top: calc(100% + 8px);
    font-size: 20px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 120ms ease;
    color: var(--accent-color);
  }

  .hm-UserList_User:first-of-type::after {
    left: -12px;
  }

  .hm-UserList_User:nth-of-type(2)::after {
    left: -32px;
  }

  .hm-UserList_User:focus::after {
    opacity: 1;
  }

  .hm-UserList_User + .hm-UserList_User {
    margin-left: 12px;
  }

  .hm-UserList_UserIcon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #fff, 0 1px 1px 3px rgba(0, 0, 0, 0.1);
    transform-origin: center center;
    transition: transform 80ms ease;
  }

  .hm-UserList_User:focus > .hm-UserList_UserIcon {
    transform: scale(1.1);
    box-shadow: 0 0 0 calc(3px / 1.1) #fff,
      0 0 0 calc(4px + 3px / 1.1) var(--highlight-top-color),
      0 calc(1px / 1.1) calc(1px / 1.1) calc(4px + 3px / 1.1) rgba(0, 0, 0, 0.1);
    animation: hm-UserList_UserIcon_highlight 1s ease-in-out infinite;
  }

  @keyframes hm-UserList_UserIcon_highlight {
    0% {
      box-shadow: 0 0 0 calc(3px / 1.1) #fff,
        0 0 0 calc(4px + 3px / 1.1) var(--highlight-top-color),
        0 calc(1px / 1.1) calc(1px / 1.1) calc(4px + 3px / 1.1)
          rgba(0, 0, 0, 0.1);
    }
    50% {
      box-shadow: 0 0 0 calc(3px / 1.1) #fff,
        0 0 0 calc(4px + 3px / 1.1) var(--highlight-bottom-color),
        0 calc(1px / 1.1) calc(1px / 1.1) calc(4px + 3px / 1.1)
          rgba(0, 0, 0, 0.1);
    }
    100% {
      box-shadow: 0 0 0 calc(3px / 1.1) #fff,
        0 0 0 calc(4px + 3px / 1.1) var(--highlight-top-color),
        0 calc(1px / 1.1) calc(1px / 1.1) calc(4px + 3px / 1.1)
          rgba(0, 0, 0, 0.1);
    }
  }

  .hm-GlobalStatus {
    margin-left: auto;
    margin-right: 0;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
  }

  .hm-TimeStatus {
    color: var(--main-color);
    font-family: var(--number-font-family);
    display: flex;
    flex-flow: row nowrap;
    font-weight: 500;
  }

  .hm-TimeStatus_Time {
    font-size: 24px;
    letter-spacing: 2px;
    line-height: 24px;
  }
  /* Removed empty .hm-TimeStatus_Time_Hour rule */
  .ht-TimeStatus_Time_Separator {
    vertical-align: 2px;
  }
  /* Removed empty .hm-TimeStatus_Time_Minute rule */

  .hm-TimeStatus + .hm-WifiStatus {
    margin-left: 12px;
  }

  .hm-WifiStatus {
    width: 26px;
    height: 26px;
    display: flex;
    transform: translateY(-1px);
  }

  .hm-WifiStatus_Icon {
    width: 100%;
    height: 100%;
  }

  .hm-WifiStatus + .hm-BatteryStatus {
    margin-left: 20px;
  }

  .hm-BatteryStatus {
    width: 20px;
    height: 10px;
    background-color: var(--main-color);
    box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--main-color);
    position: relative;
  }
  .hm-BatteryStatus::after {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(100% + 4px);
    transform: translateY(-50%);
    width: 3px;
    height: 6px;
    background-color: var(--main-color);
  }

  .hm-Body {
    flex-grow: 1;
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: center;
  }

  .hm-GameList {
    box-sizing: border-box;
    width: 100%;
    padding: 10vw 8vw 4vw 8vw;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    overflow-x: auto; /* allow horizontal scroll */
    overflow-y: hidden;
    scroll-snap-type: x proximity; /* subtle snap */
    -webkit-overflow-scrolling: touch; /* momentum on iOS */
    scrollbar-width: none; /* Firefox hide */
    gap: 16px; /* ensure consistent spacing when using gap-aware browsers */
  }
  .hm-GameList::-webkit-scrollbar {
    display: none;
  }
  /* Drag cursor feedback */
  /* Only show grabbing cursor on touch devices */
  @media (pointer: coarse) {
    .hm-GameList.is-dragging {
      cursor: grabbing;
    }
  }
  @media (pointer: fine) {
    .hm-GameList.is-dragging {
      cursor: default;
    }
  }
  .hm-GameList.is-dragging .hm-GameLauncher {
    pointer-events: none;
  }

  .hm-GameLauncher {
    width: 246px;
    height: 246px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    flex-shrink: 0;
    outline: none;
    position: relative;
    transition: transform 0.3s ease-in-out; /* Smooth transition for scaling */
  }

  .hm-GameLauncher:focus {
    box-shadow: 0 0 0 3px #fff, 0 0 0 calc(4px + 3px) var(--highlight-top-color),
      0 1px 1px calc(4px + 3px) rgba(0, 0, 0, 0.1);
    animation: hm-GameLauncher_Highlight 1s ease-in-out infinite;
  }

  .hm-GameLauncher:hover {
    transform: scale(1.1); /* Grows to 110% of its original size */
    transition: transform 0.3s ease-in-out; /* Smooth animation */
    z-index: 1; /* Ensures it appears above other elements */
  }

  @keyframes hm-GameLauncher_Highlight {
    0% {
      box-shadow: 0 0 0 3px #fff,
        0 0 0 calc(4px + 3px) var(--highlight-top-color),
        0 1px 1px calc(4px + 3px) rgba(0, 0, 0, 0.1);
    }
    50% {
      box-shadow: 0 0 0 3px #fff,
        0 0 0 calc(4px + 3px) var(--highlight-bottom-color),
        0 1px 1px calc(4px + 3px) rgba(0, 0, 0, 0.1);
    }
    100% {
      box-shadow: 0 0 0 3px #fff,
        0 0 0 calc(4px + 3px) var(--highlight-top-color),
        0 1px 1px calc(4px + 3px) rgba(0, 0, 0, 0.1);
    }
  }

  .hm-GameLauncher + .hm-GameLauncher {
    margin-left: 16px;
  }

  .hm-GameLauncher_Title {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 24px;
    color: var(--accent-color);
    user-select: none;
    opacity: 0;
    transition: opacity 120ms ease;
  }

  .hm-GameLauncher:focus > .hm-GameLauncher_Title {
    opacity: 1;
  }

  .hm-GameLauncher-placeholder {
    width: 246px;
    height: 246px;
    box-sizing: border-box;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
  }

  .hm-GameLauncher + .hm-GameLauncher-placeholder,
  .hm-GameLauncher-placeholder + .hm-GameLauncher-placeholder {
    margin-left: 16px;
  }

  .hm-UtilityNavigation {
    flex-shrink: 0;
    display: flex;
    flex-flow: row nowrap;
  }

  .hm-GameList + .hm-UtilityNavigation {
    margin-top: 56px;
  }

  .hm-UtilityButton-newsfeed,
  .hm-UtilityButton-eshop,
  .hm-UtilityButton-garally,
  .hm-UtilityButton-keyconfig,
  .hm-UtilityButton-setting,
  .hm-UtilityButton-music,
  .hm-UtilityButton-power {
    width: 88px;
    height: 88px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    position: relative;
  }

  .hm-UtilityButton-newsfeed::after,
  .hm-UtilityButton-eshop::after,
  .hm-UtilityButton-garally::after,
  .hm-UtilityButton-keyconfig::after,
  .hm-UtilityButton-setting::after,
  .hm-UtilityButton-music::after,
  .hm-UtilityButton-power::after {
    content: attr(aria-label);
    display: block;
    white-space: nowrap;
    position: absolute;
    top: calc(100% + 8px);
    color: var(--accent-color);
    font-size: 20px;
    opacity: 0;
    transition: opacity 120ms ease;
  }

  .hm-UtilityButton-newsfeed:focus,
  .hm-UtilityButton-eshop:focus,
  .hm-UtilityButton-garally:focus,
  .hm-UtilityButton-keyconfig:focus,
  .hm-UtilityButton-setting:focus,
  .hm-UtilityButton-music:focus,
  .hm-UtilityButton-power:focus {
    box-shadow: 0 0 0 4px var(--highlight-top-color),
      0 1px 1px 4px rgba(0, 0, 0, 0.1);
    animation: hm-UtilityButton_Highlight 1s ease-in-out infinite;
  }

  .hm-UtilityButton-newsfeed:focus::after,
  .hm-UtilityButton-eshop:focus::after,
  .hm-UtilityButton-garally:focus::after,
  .hm-UtilityButton-keyconfig:focus::after,
  .hm-UtilityButton-setting:focus::after,
  .hm-UtilityButton-music:focus::after,
  .hm-UtilityButton-power:focus::after {
    opacity: 1;
  }

  @keyframes hm-UtilityButton_Highlight {
    0% {
      box-shadow: 0 0 0 4px var(--highlight-top-color),
        0 1px 1px 4px rgba(0, 0, 0, 0.1);
    }
    50% {
      box-shadow: 0 0 0 4px var(--highlight-bottom-color),
        0 1px 1px 4px rgba(0, 0, 0, 0.1);
    }
    100% {
      box-shadow: 0 0 0 4px var(--highlight-top-color),
        0 1px 1px 4px rgba(0, 0, 0, 0.1);
    }
  }

  .hm-UtilityButton-eshop,
  .hm-UtilityButton-garally,
  .hm-UtilityButton-keyconfig,
  .hm-UtilityButton-setting,
  .hm-UtilityButton-music,
  .hm-UtilityButton-power {
    margin-left: 20px;
  }

  /* Removed empty utility button rulesets */

  .hm-UtilityButton_Icon {
    width: calc(100% - 28px);
    height: calc(100% - 28px);
  }

  .hm-Footer {
    margin: auto 32px 0 32px;
    padding: 0 24px;
    height: 72px;
    border-top: 1px solid var(--main-color);
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
  }
  .hm-ControllerStatus {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    margin-left: 0;
    margin-right: auto;
  }
  /* .hm-ControllerStatus_BatteryStatus {

} */
  .hm-ControllerStatus_ControllerType {
    width: 66px;
    height: 36px;
  }
  .hm-KeyGuideList {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    margin-left: auto;
    margin-right: 0;
  }
  .hm-KeyGuide {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
  }
  .hm-KeyGuide + .hm-KeyGuide {
    margin-left: 16px;
  }
  .hm-KeyGuide_Icon {
    width: 32px;
    height: 32px;
  }
  .hm-KeyGuide_Text {
    font-family: var(--semibold-font-family);
    font-size: 16px;
    transform: translateY(-1px);
    letter-spacing: 0.4px;
  }
  .hm-KeyGuide_Icon + .hm-KeyGuide_Text {
    margin-left: 4px;
  }

  /* Base rule for all utility buttons */
  .hm-UtilityButton-newsfeed,
  .hm-UtilityButton-eshop,
  .hm-UtilityButton-garally,
  .hm-UtilityButton-keyconfig,
  .hm-UtilityButton-setting,
  .hm-UtilityButton-music,
  .hm-UtilityButton-power {
    width: 88px;
    height: 88px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    position: relative;
    transition: transform 0.3s ease-in-out; /* Smooth transition for scaling */
    user-select: none;
  }

  /* Hover rule for all utility buttons */
  .hm-UtilityButton-newsfeed:hover,
  .hm-UtilityButton-eshop:hover,
  .hm-UtilityButton-garally:hover,
  .hm-UtilityButton-keyconfig:hover,
  .hm-UtilityButton-setting:hover,
  .hm-UtilityButton-music:hover,
  .hm-UtilityButton-power:hover {
    transform: scale(1.1); /* Grow to 110% of size */
    z-index: 1; /* Ensures the hovered button appears above others */
  }
}

/* Active avatar highlight (profile selection) */
.hm-UserList_User.active-profile .hm-UserList_UserIcon {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px #fff, 0 0 0 7px var(--highlight-top-color),
    0 1px 1px 7px rgba(0, 0, 0, 0.1);
}

/* Modal Overlay */
.app-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  box-sizing: border-box;
  /* Raised so modal overlays (including page-fade) can't cover it */
  z-index: 2200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.4, 0.2, 0.2, 1);
}
.app-modal.hidden {
  opacity: 0;
  pointer-events: none;
}
.app-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.app-modal__dialog {
  background: #fff;
  width: min(960px, 100%);
  max-height: calc(100vh - 120px);
  overflow: auto;
  border-radius: 4px;
  padding: 32px 36px 40px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
  position: relative;
}
.app-modal__title {
  margin: 0 0 20px;
  font-size: 32px;
  font-family: var(--semibold-font-family);
  color: var(--accent-color);
}
.app-modal__body {
  font-size: 16px;
  line-height: 1.5;
}
.app-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 32px;
  line-height: 1;
  color: var(--accent-color);
  cursor: pointer;
  background: none;
  border: none;
}

/* Modal content specifics */
.modal-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
/* Contact Form Styles */
.contact-form {
  font-family: var(--main-font-family);
  font-size: 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-form label {
  font-family: var(--semibold-font-family);
  font-size: 18px;
  margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
  font-family: var(--main-font-family);
  font-size: 18px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 0;
  box-sizing: border-box;
}
.contact-form textarea {
  min-height: 80px;
  resize: vertical;
}
.contact-form button[type="submit"] {
  margin-top: 8px;
}
.modal-links a {
  text-decoration: none;
  color: var(--accent-color);
  font-weight: 600;
  position: relative;
}
.modal-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: var(--highlight-top-color);
  transition: width 0.25s ease;
}
.modal-links a:hover::after {
  width: 100%;
}
.modal-beats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mb-item {
  display: flex;
  gap: 14px;
  background: #f9f9f9;
  border-radius: 12px;
  padding: 10px 12px;
}
.mb-thumb {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  background: #ddd center/cover no-repeat;
  flex-shrink: 0;
}
.mb-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mb-title {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mb-tags {
  font-size: 12px;
  color: #555;
}
.mb-item audio {
  width: 100%;
  height: 30px;
}
.mb-na {
  font-size: 12px;
  padding: 4px 6px;
  background: #ececec;
  border-radius: 6px;
  display: inline-block;
}
.modal-footer {
  margin-top: 8px;
  text-align: right;
}
.btn-link {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
}
.btn-link:hover {
  text-decoration: underline;
}
.embed-wrapper iframe {
  width: 100%;
}
