/* ==========================================
   KH MENU FONT
   ========================================== */
@font-face {
  font-family: "KHMenu";
  src: url("KHMenuItalic.woff2") format("woff2"),
       url("KHMenuItalic.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ==========================================
   1. GLOBAL STYLES & BACKGROUND
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  font-family: "KHMenu", Arial, sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  background-image: url('background.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden !important;
  position: relative;
}

/* Use KHMenu for ALL site text */
html, body,
button, input, select, textarea,
h1, h2, h3, h4, h5, h6,
p, span, a, li, label {
  font-family: "KHMenu" !important;
  font-style: normal;
}
/* ==========================================
   2. TOTAL NATIVE CURSOR WIPEOUT
   ========================================== */
html, body, * {
  cursor: none !important;
}
a, button, input, select, textarea {
  cursor: none !important;
}
/* ==========================================
   3. CINEMATIC INTRO SCREEN & GRAPHICS
   ========================================== */
#intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff; 
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease-in-out; 
}
.intro-centered, .intro-scroll-down, .intro-slide-right {
  position: absolute;
  opacity: 0;
  transition: opacity 0.4s ease-in-out; 
  pointer-events: none;
}
.intro-centered {
  max-width: 80%;
  max-height: 70vh;
  object-fit: contain;
}
.intro-scroll-down {
  right: 10%;
  top: -10%; 
  max-height: 80vh;
  transition: opacity 0.4s ease-in-out, transform 2.5s linear;
}
.intro-scroll-down.scrolling-active {
  transform: translateY(15vh); 
}
.intro-slide-right {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%); 
  max-height: 70vh;
  transition: opacity 0.4s ease-in-out, transform 2.5s linear;
}
.intro-slide-right.sliding-active {
  transform: translate(-30%, -50%); 
}
.start-prompt {
  font-family: "KHMenu", Arial, sans-serif;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 4px;
  color: #1a1a1a;
  animation: promptBlink 2.5s infinite ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001; 
}
@keyframes promptBlink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}
/* ==========================================
   4. ANIMATED CUSTOM CURSOR STYLE
   ========================================== */
#custom-cursor {
  width: 32px;
  height: 32px;
  background-image: url('/cursor.png');
  background-size: contain;
  background-repeat: no-repeat;
  position: fixed;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  animation: pulseOpacity 2s infinite ease-in-out;
}

@keyframes pulseOpacity {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0.3; }
}

@keyframes menuCursorGlow {
  0%, 100% {
    opacity: 0.9;
  }

  50% {
    opacity: 0.5;
  }
}

#custom-cursor.menu-hover {
  animation: menuCursorGlow 2s infinite ease-in-out !important;
}

/* 🟢 UPDATED SECONDARY CURSOR STATE */
#custom-cursor.secondary {
  background-image: url('cursor2.png') !important; /* Update filename here */
  opacity: 1 !important; 
  animation: slowDrift 1s infinite ease-in-out !important; 
}

/* 🪄 PURE HORIZONTAL SLOW DRIFT TIMELINE */
@keyframes slowDrift {
  0%, 100% {
    /* Starts perfectly centered on your mouse pointer */
    transform: translate(-50%, -50%);
  }
  50% {
    /* 🟢 Changes the horizontal position, but freezes the vertical plane at -50% */
    transform: translate(-30%, -50%); 
  }
} /* 🟢 THIS WAS THE MISSING CLOSING BRACE THAT WAS BREAKING EVERYTHING! */

/* ==========================================
   KINGDOM HEARTS MENU SELECTION
   ========================================== */

.kh-menu-btn {
  position: relative;

  width: 100%;
  height: 46px;

  padding: 0 0 0 50px;

  background: transparent;
  border: none;

  /* Soft muted silver-gray like unselected KH2 text */
  color: rgba(178, 184, 195, 0.78);

  font-family: "KHMenu", Arial, sans-serif;
  font-size: 23px;
  font-style: italic;
  font-weight: normal;

  letter-spacing: 1.5px;
  text-align: left;

  cursor: none;

  transition:
    color 0.16s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    text-shadow 0.16s ease;
}


/* ==========================================
   KH2 SELECTION SQUARE
   ========================================== */

.kh-menu-btn::before {
  content: "";

  position: absolute;

  left: 5px;
  top: 50%;

  width: 17px;
  height: 17px;

  transform: translateY(-50%);

  /* Flat light gray when unselected */
  background: rgba(168, 174, 185, 0.95);

  border: none;
  border-radius: 1px;

  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45);

  transition:
    background 0.16s ease,
    box-shadow 0.18s ease;
}


/* ==========================================
   KH2 THIN SELECTION LINE
   ========================================== */

.kh-menu-btn::after {
  content: "";

  position: absolute;

  left: 5px;
  top: calc(50% + 10px);

  width: calc(100% - 5px);
  height: 1.5px;

  background: #000000;

  opacity: 0;

  transform: scaleX(0);
  transform-origin: left center;

  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.12s ease;
}


/* ==========================================
   KH2 SELECTION BAR
   Always visible — gray when idle, blue + checker when selected
   ========================================== */

.kh2-selection-bar {
  position: absolute;

  left: 42%;
  top: 50%;
  width: 58%;
  height: 18px;

  transform: translateY(-50%) scaleX(1);
  transform-origin: left center;

  /* Idle: gray only */
  background: linear-gradient(
    90deg,
    rgba(120, 125, 135, 0) 0%,
    rgba(110, 115, 125, 0.18) 18%,
    rgba(100, 105, 115, 0.42) 45%,
    rgba(90, 95, 105, 0.72) 75%,
    rgba(75, 80, 90, 0.88) 100%
  );

  box-shadow: none;
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;

  transition:
    background 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.18s ease;
}

/* Checker pattern — diagonal scroll when selected */
.kh2-selection-bar::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.14) 25%,
      transparent 25%,
      transparent 75%,
      rgba(255, 255, 255, 0.14) 75%
    ),
    linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.14) 25%,
      transparent 25%,
      transparent 75%,
      rgba(255, 255, 255, 0.14) 75%
    );

  background-size: 12px 12px, 12px 12px;
  background-position: 0 0, 6px 6px;
  background-repeat: repeat, repeat;

  opacity: 0; /* hidden while idle */
  mix-blend-mode: soft-light;
  pointer-events: none;

  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    black 14%,
    black 86%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    black 14%,
    black 86%,
    transparent 100%
  );

  transition: opacity 0.28s ease;
}

/* Classic diagonal checker scroll */
@keyframes kh2CheckerScroll {
  from {
    background-position: 0 0, 6px 6px;
  }
  to {
    background-position: 12px 12px, 18px 18px;
  }
}

/* Dead-end red flash */
.kh-menu-btn .kh2-selection-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 70, 70, 0) 0%,
    rgba(255, 80, 80, 0.03) 8%,
    rgba(255, 75, 75, 0.12) 18%,
    rgba(255, 70, 70, 0.28) 30%,
    rgba(255, 65, 65, 0.52) 43%,
    rgba(245, 50, 50, 0.75) 58%,
    rgba(225, 30, 30, 0.92) 75%,
    rgba(190, 15, 15, 1) 100%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease-in, opacity 0.42s ease-out;
}

.kh-menu-btn.dead-end-flash .kh2-selection-bar::after {
  opacity: 1;
  transition: opacity 0.22s ease-in;
}

/* ==========================================
   SELECTED / HOVERED MENU ITEM
   ========================================== */

.kh-menu-btn:hover,
.kh-menu-btn.active {
  /* Selected text goes pure black with a soft white halo, just like KH2 */
  color: #000000;

  transform: translateX(6px);

  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.9),
    0 0 6px rgba(255, 255, 255, 0.35);
}


/* ==========================================
   SELECTED BLACK SQUARE
   ========================================== */

.kh-menu-btn:hover::before,
.kh-menu-btn.active::before {
  width: 17px;
  height: 17px;

  background: #000000;

  box-shadow:
    0 0 4px rgba(0, 0, 0, 0.5);
}


/* ==========================================
   SELECTED THIN LINE
   ========================================== */

.kh-menu-btn:hover::after,
.kh-menu-btn.active::after {
  opacity: 1;

  transform: scaleX(1);
}


/* ==========================================
   SELECTED / HIGHLIGHTED BAR
   ========================================== */

.kh-menu-btn:hover .kh2-selection-bar,
.kh-menu-btn.active .kh2-selection-bar {
  background: linear-gradient(
    90deg,
    rgba(40, 160, 255, 0) 0%,
    rgba(50, 175, 255, 0.14) 12%,
    rgba(60, 190, 255, 0.38) 28%,
    rgba(55, 185, 255, 0.68) 50%,
    rgba(35, 160, 245, 0.9) 75%,
    rgba(15, 125, 225, 1) 100%
  );


  opacity: 1;
}

/* Checker diagonal scroll when selected */
.kh-menu-btn:hover .kh2-selection-bar::before,
.kh-menu-btn.active .kh2-selection-bar::before {
  opacity: 0.8;
  animation: kh2CheckerScroll 3s linear infinite;
}


/* ==========================================
   KEEP MENU TEXT ABOVE THE BLUE BAR
   ========================================== */

.kh-menu-btn {
  isolation: isolate;
}

.kh-menu-btn .kh2-selection-bar {
  z-index: -1;
}


/* ==========================================
   FOCUS
   ========================================== */

.kh-menu-btn:focus {
  outline: none;
}


/* ==========================================
   MENU SPACING
   ========================================== */

.kh-menu-container {
  position: absolute;

  left: 50%;
  transform: translateX(-50%);

  top: 58vh;

  width: 21.5vw;
  max-width: 410px;
  min-width: 330px;

  display: flex;
  flex-direction: column;

  align-items: flex-start;

  /* Tighter vertical spacing like the real KH2 title menu */
  gap: 2px;

  z-index: 10;
}

/* ==========================================
   6. UNIFIED SUBMENU OVERLAYS & MODALS
   KH2-STYLE GAME MENU PANELS
   ========================================== */

#kh-submenu-overlay,
#kh-commissions-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;

  background:
    radial-gradient(
      ellipse at center,
      rgba(10, 35, 90, 0.16) 0%,
      rgba(0, 0, 0, 0.58) 70%,
      rgba(0, 0, 0, 0.72) 100%
    );

  z-index: 5000;
  display: none;
  opacity: 0;

  justify-content: center;
  align-items: center;

  transition: opacity 0.3s ease-in-out;
}

/* ==========================================
   COMMISSION IMAGE LIGHTBOX
   ========================================== */

#image-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 11000;

  display: none;
  justify-content: center;
  align-items: center;

  padding: 40px;
  cursor: none;
}

#image-lightbox.active {
  display: flex;
}

#lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;

  object-fit: contain;

  border-radius: 6px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.9),
    0 0 25px rgba(73, 181, 255, 0.15);

  cursor: none;
  animation: lightboxOpen 0.2s ease-out;
}

@keyframes lightboxOpen {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Make commission images look clickable */
.kh-slider-img {
  cursor: none;
  transition: transform 0.2s ease;
}

.kh-slider-img:hover {
  transform: scale(1.02);
}

/* ==========================================
   KH2 ANGLED POPUP TITLE PLATE
   ========================================== */

.kh-modal-header-container {
  position: absolute;

  top: 8.5vh;
  left: 50%;
  transform: translateX(-50%);

  width: 480px;
  min-width: 0;

  padding: 11px 50px 10px;

  text-align: center;

  /* Deep blue → slightly lighter blue gradient like the NEW GAME tab */
  background:
    linear-gradient(
      180deg,
      #0a1440 0%,
      #06102e 45%,
      #030a1c 100%
    );

  border: 2px solid #1e3d9e;

  clip-path: polygon(
    3.5% 0%,
    96.5% 0%,
    100% 50%,
    96.5% 100%,
    3.5% 100%,
    0% 50%
  );

  /* Strong rim lighting */
  box-shadow:
    0 0 0 1px rgba(60, 120, 255, 0.35),
    0 0 12px rgba(40, 100, 255, 0.55),
    0 6px 22px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(120, 170, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4);

  z-index: 3;
}

/* Thin bright blue accent line */
.kh-modal-header-container::after {
  content: "";

  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 3px;

  height: 2px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(70, 140, 255, 0.95) 12%,
    rgba(100, 180, 255, 1) 50%,
    rgba(70, 140, 255, 0.95) 88%,
    transparent
  );

  opacity: 0.95;
}

.kh-modal-header {
  font-family: "KHMenu", Arial, sans-serif;

  font-size: 24px;
  font-weight: normal;

  color: #f0f4ff;

  letter-spacing: 3.5px;
  line-height: 1.1;

  margin: 0 0 1px;

  text-shadow:
    0 1px 3px #000000,
    0 0 10px rgba(100, 160, 255, 0.3);
}

.kh-modal-instruction {
  font-family: "KHMenu", Arial, sans-serif;

  font-size: 13px;
  font-weight: normal;

  color: #7a8eb8;

  letter-spacing: 1.6px;
  line-height: 1.15;
}

/* ==========================================
   KH2 MAIN POPUP PANEL
   ========================================== */

.kh-modal-box {
  width: 680px;
  min-height: 420px;

  position: relative;

  /* Deep blue → slightly lighter blue vertical gradient */
  background:
    linear-gradient(
      180deg,
      rgba(8, 16, 48, 0.97) 0%,
      rgba(4, 10, 32, 0.98) 40%,
      rgba(2, 6, 22, 0.99) 100%
    );

  border: 2px solid rgba(45, 80, 170, 0.95);
  border-radius: 18px;

  padding: 88px 60px 48px;

  display: flex;
  flex-direction: column;
  align-items: center;

  /* Strong rim lighting like the reference */
  box-shadow:
    0 0 0 1px rgba(60, 120, 255, 0.25),
    0 0 20px rgba(30, 80, 200, 0.4),
    0 22px 55px rgba(0, 0, 0, 0.92),
    inset 0 1px 0 rgba(100, 160, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    inset 0 0 30px rgba(10, 30, 90, 0.25);

  overflow: hidden;
}

/* Blue horizontal KH2 divider */
.kh-modal-box::before {
  content: "";

  position: absolute;

  left: 7%;
  right: 7%;
  top: 67px;

  height: 3px;

  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 34, 190, 0.35) 4%,
    #0712a8 18%,
    #0b20e5 50%,
    #0712a8 82%,
    rgba(0, 34, 190, 0.35) 96%,
    transparent 100%
  );

  box-shadow:
    0 0 5px rgba(0, 45, 255, 0.55);

  opacity: 0.9;
}

/* A second, very subtle inner frame */
.kh-modal-box::after {
  content: "";

  position: absolute;

  inset: 9px;

  border: 1px solid rgba(50, 75, 150, 0.16);
  border-radius: 17px;

  pointer-events: none;
}

/* ==========================================
   7. TWITTER / CHOICE MENU
   ========================================== */

/* "Select Your Path." style subtitle with fading blue bar behind it */
.kh-modal-subtitle {
  position: relative;

  width: 100%;
  text-align: center;

  font-family: "KHMenu", Arial, sans-serif;
  font-size: 20px;
  font-weight: normal;
  letter-spacing: 1.8px;
  color: #c8d6f0;

  margin: 0 0 22px;
  padding: 8px 0 10px;

  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.9),
    0 0 8px rgba(80, 140, 255, 0.25);

  z-index: 1;
}

/* Gentle blue rectangle that fades out behind the subtitle */
.kh-modal-subtitle::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;

  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(25, 70, 190, 0.45) 12%,
    rgba(40, 100, 230, 0.65) 50%,
    rgba(25, 70, 190, 0.45) 88%,
    transparent 100%
  );

  /* Fade the bar upward so it softens into the letters */
  mask-image: linear-gradient(
    180deg,
    transparent 0%,
    black 35%,
    black 70%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    black 35%,
    black 70%,
    transparent 100%
  );

  pointer-events: none;
  z-index: -1;
}

.kh-modal-options {
  width: 100%;

  display: flex;
  flex-direction: column;

  gap: 11px;

  margin-bottom: 27px;
}

/* KH2-style selectable capsules — rebuilt to match the mockup */
.kh-sub-btn {
  position: relative;

  width: 100%;
  min-height: 54px;

  padding: 11px 32px;

  /* Very dark unselected — almost pure black with subtle depth */
  background:
    linear-gradient(
      180deg,
      #0e0e12 0%,
      #07070a 45%,
      #030305 100%
    );

  border: 2px solid #1a1c24;
  border-radius: 30px;

  color: rgba(210, 218, 230, 0.88);

  font-family: "KHMenu", Arial, sans-serif;
  font-size: 21px;
  font-weight: normal;

  letter-spacing: 2.5px;
  text-align: center;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5);

  transition:
    color 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.14s ease;
}

/* Soft top gloss */
.kh-sub-btn::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 3px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

/* Selected / hover — dark maroon interior, bright pulsing red ring */
.kh-sub-btn.active,
.kh-sub-btn:hover {
  color: #ffffff;

  /* Dark maroon-to-black interior; the vivid color lives in the ring, not the fill */
  background:
    linear-gradient(
      180deg,
      #3d0c0c 0%,
      #260707 45%,
      #150404 100%
    );

  border-color: #5c1414;

  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 150, 150, 0.15),
    inset 0 -2px 5px rgba(0, 0, 0, 0.5);

  transform: scale(1.02);
}

/* Thick bright red outline ring for the selected button. Replaces the
   thin top-gloss line while active/hovered, and breathes between
   ~100% and ~30% opacity like the KH2 menu selection glow. */
.kh-sub-btn.active::before,
.kh-sub-btn:hover::before {
  content: "";
  position: absolute;
  inset: -4px;
  height: auto;
  background: transparent;
  border: 3px solid #ff3232;
  border-radius: inherit;
  box-shadow:
    0 0 8px 2px rgba(255, 40, 40, 0.85),
    0 0 20px 6px rgba(255, 30, 30, 0.45);
  pointer-events: none;
  animation: khSelectRingPulse 1.8s ease-in-out infinite;
}

@keyframes khSelectRingPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Soft selection orb — warm but not neon */
.kh-sub-btn.active::after,
.kh-sub-btn:hover::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);

  width: 9px;
  height: 9px;
  border-radius: 50%;

  background: radial-gradient(
    circle at 30% 30%,
    #f0e0c0 0%,
    #d09040 40%,
    #a05020 75%,
    #602010 100%
  );

  box-shadow:
    0 0 4px rgba(200, 140, 60, 0.8),
    0 0 9px rgba(160, 80, 30, 0.6);

  pointer-events: none;
}

/* ==========================================
   TWITTER DESCRIPTION
   ========================================== */

.kh-modal-description {
  width: 100%;

  min-height: 70px;

  margin-top: 4px;
  padding-top: 14px;

  position: relative;

  border-top: 1px solid rgba(40, 80, 180, 0.35);

  text-align: center;

  font-family: "KHMenu", Arial, sans-serif;
  font-weight: normal;

  letter-spacing: 1px;
}

.kh-modal-description p {
  margin: 4px 0;

  font-size: 17px;

  text-shadow:
    1px 1px 3px rgba(0, 0, 0, 0.95);
}

.kh-modal-description p#desc-main-text {
  color: #4ec0ff;
}

.kh-modal-description p#desc-secret-text {
  color: #fff04a;
}

/* ==========================================
   8. COMMISSIONS PANEL
   ========================================== */

.kh-commissions-box {
  width: 900px;
  min-height: 535px;

  position: relative;

  background:
    linear-gradient(
      180deg,
      rgba(8, 16, 48, 0.97) 0%,
      rgba(4, 10, 32, 0.98) 40%,
      rgba(2, 6, 22, 0.99) 100%
    );

  border: 2px solid rgba(45, 80, 170, 0.95);
  border-radius: 18px;

  padding: 92px 45px 40px;

  display: flex;
  flex-direction: row;

  gap: 32px;

  box-shadow:
    0 0 0 1px rgba(60, 120, 255, 0.25),
    0 0 20px rgba(30, 80, 200, 0.4),
    0 22px 55px rgba(0, 0, 0, 0.92),
    inset 0 1px 0 rgba(100, 160, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    inset 0 0 30px rgba(10, 30, 90, 0.25);

  overflow: hidden;
}

/* Top KH2 divider for commissions panel */
.kh-commissions-box::before {
  content: "";

  position: absolute;

  left: 5%;
  right: 5%;
  top: 59px;

  height: 3px;

  background: linear-gradient(
    90deg,
    transparent,
    #0712a8 18%,
    #0b20e5 50%,
    #0712a8 82%,
    transparent
  );

  box-shadow:
    0 0 5px rgba(0, 45, 255, 0.55);
}

/* Subtle inner frame */
.kh-commissions-box::after {
  content: "";

  position: absolute;

  inset: 9px;

  border: 1px solid rgba(50, 75, 150, 0.16);
  border-radius: 17px;

  pointer-events: none;
}

/* ==========================================
   COMMISSION COLUMNS
   ========================================== */

.kh-commissions-left {
  flex: 1;

  display: flex;
  flex-direction: column;
  align-items: center;

  min-width: 0;
}

.kh-commissions-title {
  font-family: "KHMenu", Arial, sans-serif;

  font-size: 20px;
  font-weight: normal;

  color: #dce6ff;

  letter-spacing: 3px;

  margin-bottom: 15px;

  text-shadow:
    0 1px 3px #000000;
}

/* KH2-style image window */
.kh-image-slider-window {
  width: 100%;
  height: 360px;

  overflow-x: hidden;
  overflow-y: auto;

  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 8, 0.9),
      rgba(3, 8, 25, 0.8)
    );

  border: 1px solid rgba(40, 63, 125, 0.75);
  border-radius: 10px;

  padding: 10px;

  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.9),
    0 0 7px rgba(0, 35, 150, 0.18);

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 15px;
}

/* Image scaling */
.kh-slider-img {
  width: 100%;
  height: 300px;

  object-fit: contain;

  border-radius: 4px;

  pointer-events: auto;

  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.65);

  flex-shrink: 0;

  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.kh-slider-img:hover {
  transform: scale(1.02);

  filter:
    drop-shadow(0 0 5px rgba(60, 130, 255, 0.22));
}

/* ==========================================
   COMMISSION DIVIDER
   ========================================== */

.kh-commissions-divider {
  width: 2px;

  background: linear-gradient(
    180deg,
    transparent,
    rgba(48, 75, 150, 0.9) 15%,
    rgba(48, 75, 150, 0.9) 85%,
    transparent
  );

  box-shadow:
    0 0 4px rgba(0, 35, 150, 0.35);
}

/* ==========================================
   COMMISSION PRICE SHEET
   ========================================== */

.kh-commissions-right {
  flex: 1.2;

  display: flex;
  flex-direction: column;

  justify-content: flex-start;

  font-family: "KHMenu", Arial, sans-serif;
  font-weight: normal;

  gap: 14px;

  min-width: 0;

  padding-top: 37px;
}

.kh-price-item {
  font-size: 20px;

  color: #e8ecf5;

  letter-spacing: 1.2px;

  text-shadow:
    1px 1px 3px rgba(0, 0, 0, 0.95),
    0 0 6px rgba(0, 0, 0, 0.4);

  margin: 0;
}

.kh-price-item.cyan {
  color: #4ec0ff;
  text-shadow:
    1px 1px 3px rgba(0, 0, 0, 0.95),
    0 0 8px rgba(40, 150, 255, 0.35);
}

.kh-price-item.yellow {
  color: #fff04a;
  text-shadow:
    1px 1px 3px rgba(0, 0, 0, 0.95),
    0 0 8px rgba(255, 220, 40, 0.3);
}

/* ==========================================
   TERMS OF SERVICE KH2 BUTTON
   ========================================== */

.kh-tos-btn {
  margin-top: auto;

  position: relative;

  background:
    linear-gradient(
      180deg,
      #0e0e12 0%,
      #07070a 45%,
      #030305 100%
    );

  border: 2px solid #1a1c24;
  border-radius: 30px;

  color: rgba(210, 218, 230, 0.88);

  font-family: "KHMenu", Arial, sans-serif;
  font-size: 17px;
  font-weight: normal;

  letter-spacing: 2px;

  padding: 11px 22px;

  width: 100%;

  text-align: center;

  transition:
    color 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.14s ease;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5);
}

.kh-tos-btn:hover,
.kh-tos-btn.active {
  color: #ffffff;

  background:
    linear-gradient(
      180deg,
      #3d0c0c 0%,
      #260707 45%,
      #150404 100%
    );

  border-color: #5c1414;

  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 150, 150, 0.15),
    inset 0 -2px 5px rgba(0, 0, 0, 0.5);

  transform: scale(1.02);
}

.kh-tos-btn.active::before,
.kh-tos-btn:hover::before {
  content: "";
  position: absolute;
  inset: -4px;
  height: auto;
  background: transparent;
  border: 3px solid #ff3232;
  border-radius: inherit;
  box-shadow:
    0 0 8px 2px rgba(255, 40, 40, 0.85),
    0 0 20px 6px rgba(255, 30, 30, 0.45);
  pointer-events: none;
  animation: khSelectRingPulse 1.8s ease-in-out infinite;
}

/* ==========================================
   COMMISSION SCROLLBAR
   ========================================== */

.kh-image-slider-window::-webkit-scrollbar {
  width: 9px;
}

.kh-image-slider-window::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.45);
}

.kh-image-slider-window::-webkit-scrollbar-thumb {
  background:
    linear-gradient(
      180deg,
      #162a72 0%,
      #2949ad 100%
    );

  border-radius: 8px;

  border: 2px solid rgba(0, 0, 0, 0.35);
}

.kh-image-slider-window::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(
      180deg,
      #2949ad 0%,
      #49b5ff 100%
    );
}

.kh-image-slider-window {
  scrollbar-width: thin;
  scrollbar-color: #2949ad rgba(0, 0, 0, 0.45);
}

#desc-main-text {
  color: #ffffff;
}

/* ==========================================
   10. RESPONSIVE SAFETY
   ========================================== */

@media (max-width: 950px) {
  .kh-menu-container {
    width: min(340px, calc(100vw - 40px));
    margin-left: 20px;
  }

  .kh-modal-header-container {
    width: 440px;
  }

  .kh-modal-box {
    width: calc(100vw - 70px);
    max-height: 88vh;
    overflow-y: auto;
    padding-left: 55px;
    padding-right: 55px;
  }

  .kh-commissions-box {
    width: calc(100vw - 50px);
    max-height: 90vh;
    overflow-y: auto;
  }
}

@media (max-width: 700px) {
  .kh-menu-container {
    width: calc(100vw - 30px);
    margin: 100px 15px 0;
  }

  .kh-menu-btn {
    font-size: 19px;
    font-family: "KHMenu", Arial, sans-serif;
    font-style: normal;
  }

  .kh-modal-header-container {
    top: 25px;

    width: calc(100vw - 40px);

    padding: 8px 20px;
  }

  .kh-modal-header {
    font-size: 19px;
  }

  .kh-modal-instruction {
    font-size: 13px;
  }

  .kh-modal-box {
    width: calc(100vw - 30px);
    min-height: 0;

    max-height: 86vh;

    padding: 88px 22px 30px;

    border-radius: 20px;
  }

  .kh-modal-options {
    gap: 9px;
    margin-bottom: 20px;
  }

  .kh-sub-btn {
    min-height: 50px;
    font-size: 18px;
    padding: 10px 15px;
  }

  .kh-modal-description p {
    font-size: 15px;
  }

  .kh-commissions-box {
    width: calc(100vw - 30px);

    max-height: 88vh;

    padding: 82px 20px 25px;

    flex-direction: column;

    gap: 20px;

    border-radius: 20px;
  }

  .kh-commissions-box::before {
    top: 53px;
  }

  .kh-commissions-divider {
    width: 100%;
    height: 2px;
  }

  .kh-commissions-right {
    padding-top: 0;
  }

  .kh-price-item {
    font-size: 17px;
  }

  .kh-tos-btn {
    font-size: 16px;
  }

  .kh-image-slider-window {
    height: 300px;
  }
}

/* ==========================================
   INTRO -> MENU CURSOR ARRIVAL
   ========================================== */

#custom-cursor.intro-arriving {
  animation: none !important;
  transition: none !important;
}
/* ==========================================
   KINGDOM HEARTS TITLE LOGO
   ========================================== */

.kh-title-logo {
  position: absolute;

  left: 50%;
  transform: translateX(-50%);

  /*
     Scales with screen width while staying within
     sensible minimum and maximum sizes.
  */
  width: 41.67vw;
  max-width: 800px;
  min-width: 550px;
  height: auto;

  /*
     Keep the logo at a consistent visual distance
     from the menu.
  */
  top: 10vh;

  z-index: 5;
  pointer-events: none;
}


/* ==========================================
   TITLE MENU POSITION
   ========================================== */

.kh-menu-btn.new-option {
  position: relative;
}

.new-badge {
  position: absolute;
  top: 5px;
  right: -25px;

  width: 75px;
  height: auto;

  z-index: 20;
  pointer-events: none;

  animation: newBadgePulse 2s ease-in-out infinite;
}

@keyframes newBadgePulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.45;
  }
}
/* ==========================================
   GAME SETTINGS PAGE
   ========================================== */

.kh-settings-page {
  overflow: hidden !important;
  color: #f2f4ff;
}

.settings-title-plate {
  position: absolute;
  top: 4vh;
  left: 0;
  width: 40vw;
  min-width: 500px;
  height: 52px;
  padding: 8px 55px 8px 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(180deg, #0a173e 0%, #020719 55%, #01030b 100%);
  border: 2px solid #1645a6;
  border-left: none;
  border-radius: 0 28px 28px 0;
  color: #f3f6ff;
  font-size: 29px;
  letter-spacing: 2px;
  text-shadow: 0 1px 2px #000, 0 0 6px rgba(73,181,255,.18);
  box-shadow: 0 0 10px rgba(30,90,255,.35), 0 6px 18px rgba(0,0,0,.75), inset 0 0 12px rgba(30,90,255,.16);
  z-index: 4;
}

.settings-title-icon {
  color: #49b5ff;
  font-size: 27px;
  line-height: 1;
  text-shadow: 0 0 7px rgba(73,181,255,.5);
}

.settings-title-line {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(4vh + 51px);
  height: 2px;
  background: linear-gradient(90deg, #0a2e86 0%, #1d69df 42%, #49b5ff 58%, #164aa8 80%, transparent 100%);
  box-shadow: 0 0 5px rgba(35,100,255,.55);
  opacity: .85;
}

.settings-layout {
  position: absolute;
  top: 14vh;
  left: 5vw;
  right: 8vw;
  bottom: 13vh;
  display: grid;
  grid-template-columns: 340px minmax(420px, 700px);
  gap: 40px;
  align-items: start;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.settings-nav-btn {
  position: relative;
  min-height: 43px;
  padding: 7px 22px;
  text-align: left;
  color: rgba(245,247,255,.88);
  background: linear-gradient(180deg, #080b12 0%, #010205 100%);
  border: 2px solid #1b2d56;
  border-radius: 0 18px 18px 0;
  font-family: "KHMenu", Arial, sans-serif;
  font-size: 19px;
  letter-spacing: 1px;
  box-shadow: 0 3px 7px rgba(0,0,0,.7), inset 0 1px 2px rgba(255,255,255,.08);
  transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.settings-nav-btn::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 2px;
  height: 1px;
  background: rgba(255,255,255,.18);
}

.settings-nav-btn.active,
.settings-nav-btn:hover {
  color: #fff;
  background: linear-gradient(180deg, #164d9d 0%, #08255c 48%, #03132f 100%);
  border-color: #49b5ff;
  box-shadow: 0 0 5px rgba(73,181,255,.9), 0 0 13px rgba(30,105,255,.45), inset 0 0 8px rgba(73,181,255,.18);
  transform: translateX(8px);
}

.settings-sound-panel {
  position: relative;
  min-height: 560px;
  padding: 0 36px 35px;
  border-left: 2px solid rgba(35,100,210,.85);
  box-shadow: -1px 0 0 rgba(0,20,80,.45);
}

.settings-sound-panel::before {
  content: "";
  position: absolute;
  left: -6px;
  top: -8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #49b5ff;
  box-shadow: 0 0 6px rgba(73,181,255,.7);
}

.settings-sound-panel::after {
  content: "♫";
  position: absolute;
  left: -250px;
  bottom: -5px;
  color: rgba(10,25,60,.58);
  font-size: 250px;
  line-height: 1;
  pointer-events: none;
}

.settings-sound-panel h1 {
  margin: 0 0 13px;
  color: #49b5ff;
  font-size: 22px;
  letter-spacing: 2px;
  font-weight: normal;
}

.settings-divider {
  width: 100%;
  height: 2px;
  margin-bottom: 25px;
  background: linear-gradient(90deg, transparent, #1645a6 8%, #49b5ff 50%, #1645a6 92%, transparent);
  box-shadow: 0 0 5px rgba(30,105,255,.5);
}

.volume-row {
  margin-bottom: 27px;
}

.volume-row label {
  display: block;
  margin-bottom: 8px;
  color: #49b5ff;
  font-size: 17px;
  letter-spacing: 1px;
}

.volume-control {
  display: grid;
  grid-template-columns: 72px minmax(250px, 1fr);
  align-items: center;
  gap: 10px;
  max-width: 610px;
  min-height: 48px;
  padding: 7px 12px 7px 14px;
  background: rgba(0,0,0,.56);
  border: 2px solid #14326e;
  border-radius: 28px;
  box-shadow: inset 0 0 9px rgba(0,25,80,.45), 0 2px 6px rgba(0,0,0,.55);
}

.volume-control output {
  color: #aab4c8;
  font-size: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.volume-control input[type="range"] {
  width: 100%;
  height: 26px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}

.volume-control input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: #102d72;
  border: 1px solid #2c5fbd;
  box-shadow: inset 0 0 4px rgba(0,0,0,.8);
}

.volume-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 8px;
  height: 21px;
  margin-top: -7px;
  background: #e7eaf2;
  border: none;
  box-shadow: 0 0 4px rgba(255,255,255,.45);
}

.volume-control input[type="range"]::-moz-range-track {
  height: 8px;
  background: #102d72;
  border: 1px solid #2c5fbd;
  box-shadow: inset 0 0 4px rgba(0,0,0,.8);
}

.volume-control input[type="range"]::-moz-range-thumb {
  width: 8px;
  height: 21px;
  background: #e7eaf2;
  border: none;
  border-radius: 0;
}

.settings-description {
  margin: 145px 0 20px;
  color: #f2f4ff;
  font-size: 19px;
  text-align: center;
  letter-spacing: 1px;
  text-shadow: 2px 2px 3px #000;
}

.settings-reset {
  position: relative;

  display: block;
  margin: 0 auto;
  min-height: 48px;
  padding: 11px 34px;
  color: rgba(210, 218, 230, 0.88);

  background:
    linear-gradient(
      180deg,
      #0e0e12 0%,
      #07070a 45%,
      #030305 100%
    );

  border: 2px solid #1a1c24;
  border-radius: 26px;

  font-family: "KHMenu", Arial, sans-serif;
  font-size: 17px;
  letter-spacing: 2px;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5);

  transition:
    color 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.14s ease;
}

.settings-reset:hover,
.settings-reset.controller-focus {
  color: #ffffff;

  background:
    linear-gradient(
      180deg,
      #3d0c0c 0%,
      #260707 45%,
      #150404 100%
    );

  border-color: #5c1414;

  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 150, 150, 0.15),
    inset 0 -2px 5px rgba(0, 0, 0, 0.5);

  transform: scale(1.02);
}

.settings-reset:hover::before,
.settings-reset.controller-focus::before {
  content: "";
  position: absolute;
  inset: -4px;
  height: auto;
  background: transparent;
  border: 3px solid #ff3232;
  border-radius: inherit;
  box-shadow:
    0 0 8px 2px rgba(255, 40, 40, 0.85),
    0 0 20px 6px rgba(255, 30, 30, 0.45);
  pointer-events: none;
  animation: khSelectRingPulse 1.8s ease-in-out infinite;
}

.settings-back {
  position: relative;

  min-height: 48px;
  padding: 11px 34px;
  color: rgba(210, 218, 230, 0.88);

  background:
    linear-gradient(
      180deg,
      #0e0e12 0%,
      #07070a 45%,
      #030305 100%
    );

  border: 2px solid #1a1c24;
  border-radius: 26px;

  font-family: "KHMenu", Arial, sans-serif;
  font-size: 17px;
  letter-spacing: 2px;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5);

  transition:
    color 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.14s ease;
}

.settings-back:hover,
.settings-back.controller-focus {
  color: #ffffff;

  background:
    linear-gradient(
      180deg,
      #3d0c0c 0%,
      #260707 45%,
      #150404 100%
    );

  border-color: #5c1414;

  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 150, 150, 0.15),
    inset 0 -2px 5px rgba(0, 0, 0, 0.5);

  transform: scale(1.02);
}

.settings-back:hover::before,
.settings-back.controller-focus::before {
  content: "";
  position: absolute;
  inset: -4px;
  height: auto;
  background: transparent;
  border: 3px solid #ff3232;
  border-radius: inherit;
  box-shadow:
    0 0 8px 2px rgba(255, 40, 40, 0.85),
    0 0 20px 6px rgba(255, 30, 30, 0.45);
  pointer-events: none;
  animation: khSelectRingPulse 1.8s ease-in-out infinite;
}

.settings-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  border-top: 2px solid rgba(25,75,155,.8);
  color: #f2f4ff;
  font-size: 17px;
  letter-spacing: 1px;
  background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.55));
  box-shadow: 0 -4px 14px rgba(0,0,0,.4);
}

#settings-cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  background: url('cursor.png') center / contain no-repeat;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 3px rgba(255,255,255,.25));
}

/* ==========================================
   11. SHARED SUBPAGE CONTAINER
   Used by about.html and tos.html so both pages
   share one definition instead of duplicating it.
   ========================================== */

.kh-subpage-container {
  max-width: 780px;
  max-height: 75vh;
  overflow-y: auto;

  margin: 60px auto;
  padding: 40px;

  background: linear-gradient(
    180deg,
    rgba(8, 16, 48, 0.96) 0%,
    rgba(4, 10, 32, 0.97) 40%,
    rgba(2, 6, 22, 0.98) 100%
  );

  border-radius: 18px;

  box-shadow:
    0 0 0 1px rgba(60, 120, 255, 0.25),
    0 0 20px rgba(30, 80, 200, 0.35),
    0 22px 55px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(100, 160, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45),
    inset 0 0 30px rgba(10, 30, 90, 0.2);

  border: 2px solid rgba(45, 80, 170, 0.9);

  color: #ffffff;
  font-family: "KHMenu", Arial, sans-serif;
  line-height: 1.6;

  scrollbar-width: thin;
  scrollbar-color: #49b5ff rgba(0, 0, 0, 0.4);
}

.kh-subpage-container::-webkit-scrollbar {
  width: 10px;
}

.kh-subpage-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
}

.kh-subpage-container::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1c3d73 0%, #49b5ff 100%);
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.3);
}

.kh-subpage-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #49b5ff 0%, #a4ccf4 100%);
  box-shadow: 0 0 8px rgba(73, 181, 255, 0.6);
}

.kh-subpage-container h1 {
  text-align: center;
  color: #49b5ff;
  letter-spacing: 3px;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.kh-subpage-container h2 {
  color: #a4ccf4;
  margin-top: 30px;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.kh-subpage-container p,
.kh-subpage-container li {
  color: #e0e0e0;
  font-size: 15px;
}

.kh-subpage-container ul {
  padding-left: 25px;
}

.kh-subpage-intro {
  text-align: center;
  color: #a4ccf4;
  margin-bottom: 30px;
}

.kh-subpage-outro {
  margin-top: 40px;
  text-align: center;
  color: #ffff3e;
}

/* Shared "return to main site" button used on about/tos pages */
.back-btn {
  position: relative;

  display: block;
  margin: 40px auto 0;

  min-height: 54px;
  padding: 13px 40px;

  background:
    linear-gradient(
      180deg,
      #0e0e12 0%,
      #07070a 45%,
      #030305 100%
    );

  border: 2px solid #1a1c24;
  border-radius: 30px;

  color: rgba(210, 218, 230, 0.88);

  font-family: "KHMenu", Arial, sans-serif;
  font-size: 20px;
  font-weight: normal;
  letter-spacing: 2.5px;

  text-align: center;

  transition:
    color 0.14s ease,
    background 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.14s ease;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -2px 4px rgba(0, 0, 0, 0.5);
}

.back-btn:hover,
.back-btn.controller-focus {
  color: #ffffff;

  background:
    linear-gradient(
      180deg,
      #3d0c0c 0%,
      #260707 45%,
      #150404 100%
    );

  border-color: #5c1414;

  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 150, 150, 0.15),
    inset 0 -2px 5px rgba(0, 0, 0, 0.5);

  transform: scale(1.02);
}

.back-btn:hover::before,
.back-btn.controller-focus::before {
  content: "";
  position: absolute;
  inset: -4px;
  height: auto;
  background: transparent;
  border: 3px solid #ff3232;
  border-radius: inherit;
  box-shadow:
    0 0 8px 2px rgba(255, 40, 40, 0.85),
    0 0 20px 6px rgba(255, 30, 30, 0.45);
  pointer-events: none;
  animation: khSelectRingPulse 1.8s ease-in-out infinite;
}

@media (max-width: 850px) {
  .kh-subpage-container {
    width: calc(100vw - 30px);
    max-height: 82vh;
    margin: 30px auto;
    padding: 25px;
  }
}

@media (max-width: 900px) {
  .settings-layout {
    left: 4vw;
    right: 4vw;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
  }

  .settings-title-plate {
    width: 55vw;
    min-width: 360px;
    font-size: 23px;
  }

  .settings-sound-panel {
    padding-left: 24px;
    padding-right: 15px;
  }

  .settings-description {
    margin-top: 80px;
  }
}

@media (max-width: 700px) {
  .settings-title-plate {
    top: 4vh;
    width: 82vw;
    min-width: 0;
    height: 46px;
    padding-left: 24px;
    font-size: 19px;
  }

  .settings-title-line {
    top: calc(4vh + 45px);
  }

  .settings-layout {
    top: 14vh;
    left: 15px;
    right: 15px;
    bottom: 70px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
  }

  .settings-nav {
    width: 100%;
    gap: 6px;
  }

  .settings-nav-btn {
    min-height: 40px;
    font-size: 16px;
  }

  .settings-sound-panel {
    min-height: 500px;
    border-left: none;
    border-top: 2px solid rgba(35,100,210,.85);
    padding: 20px 5px 25px;
  }

  .settings-sound-panel::before {
    display: none;
  }

  .settings-sound-panel::after {
    display: none;
  }

  .volume-control {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .settings-description {
    margin-top: 55px;
  }

  .settings-footer {
    font-size: 14px;
  }
}
