:root {
  --launcher-bg: #070b13;
  --launcher-ink: #f4f6fb;
  --launcher-muted: #a9b2c5;
  --launcher-gold: #f3b946;
  --launcher-blue: #72a7ff;
  --launcher-violet: #b39aff;
  --launcher-glass: rgba(25, 34, 50, 0.62);
  --launcher-line: rgba(174, 198, 235, 0.22);
}

.launcher-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--launcher-ink);
  background:
    radial-gradient(circle at 50% 54%, rgba(48, 83, 133, 0.17), transparent 38%),
    radial-gradient(circle at 72% 50%, rgba(243, 185, 70, 0.08), transparent 30%),
    var(--launcher-bg);
  isolation: isolate;
}

body:not(.legacy-mode) {
  overflow-x: hidden;
}

.launcher-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.025), transparent 36%, rgba(114, 167, 255, 0.025));
  z-index: -1;
}

body:not(.legacy-mode) .app-shell {
  display: none;
}

body.legacy-mode .launcher-shell {
  display: none;
}

body.legacy-mode .app-shell {
  display: grid;
}

.launcher-header {
  min-height: 96px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 18px clamp(22px, 3vw, 44px);
}

.launcher-brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 0;
  padding: 0;
  color: var(--launcher-ink);
  background: transparent;
  font-size: clamp(17px, 1.7vw, 24px);
  font-weight: 720;
  letter-spacing: -0.02em;
}

.launcher-brand img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(243, 185, 70, 0.22);
}

.launcher-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #d7deeb;
  background: rgba(18, 24, 36, 0.48);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.launcher-breadcrumb .material-symbols-rounded {
  color: var(--launcher-gold);
}

.launcher-icon-button {
  justify-self: end;
  width: 54px;
  height: 54px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--launcher-ink);
  background: rgba(27, 35, 51, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.launcher-icon-button:hover,
.launcher-icon-button:focus-visible {
  color: var(--launcher-gold);
  border-color: rgba(243, 185, 70, 0.6);
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 26px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
}

.launcher-main {
  position: relative;
  flex: 1;
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 18px clamp(18px, 3vw, 46px) 126px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.launcher-greeting {
  min-height: 58px;
  margin: 0 auto 8px;
  color: #cbd5e7;
  font-size: clamp(28px, 3.3vw, 48px);
  font-weight: 500;
  letter-spacing: -0.035em;
  text-align: center;
}

.launcher-shell[data-level="2"] .launcher-greeting,
.launcher-shell[data-level="3"] .launcher-greeting,
.launcher-shell[data-level="4"] .launcher-greeting {
  display: none;
}

.launcher-level {
  width: 100%;
}

.launcher-level[hidden] {
  display: none !important;
}

.launcher-level-one {
  position: relative;
  min-height: 620px;
  display: grid;
  place-items: center;
}

.focus-carousel {
  position: relative;
  width: min(1180px, calc(100vw - 150px));
  height: 560px;
  perspective: 1200px;
}

.focus-card {
  --card-x: 0px;
  --card-scale: 0.8;
  --card-rotate: 0deg;
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 1;
  width: 400px;
  height: 520px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 21px;
  padding: 38px 32px;
  overflow: hidden;
  color: var(--launcher-ink);
  border: 1px solid rgba(148, 185, 237, 0.5);
  border-radius: 52px;
  background: linear-gradient(145deg, rgba(45, 60, 86, 0.72), rgba(15, 23, 36, 0.72));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(30, 92, 170, 0.18),
    0 30px 60px rgba(0, 0, 0, 0.32),
    0 0 32px rgba(67, 137, 238, 0.12);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  transform: translate(calc(-50% + var(--card-x)), -50%) scale(var(--card-scale)) rotateY(var(--card-rotate));
  transform-origin: center;
  transition: transform 420ms cubic-bezier(0.22, 0.8, 0.25, 1), opacity 320ms ease, border-color 320ms ease, box-shadow 320ms ease;
  opacity: 0.72;
}

.focus-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.12), transparent 30%, transparent 72%, rgba(85, 143, 226, 0.09));
}

.focus-card[data-position="active"] {
  --card-x: 0px;
  --card-scale: 1;
  --card-rotate: 0deg;
  z-index: 5;
  opacity: 1;
  border-color: rgba(243, 185, 70, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 32px 70px rgba(0, 0, 0, 0.42),
    0 0 36px rgba(243, 185, 70, 0.24);
}

.focus-card[data-position="left"] {
  --card-x: -390px;
  --card-scale: 0.72;
  --card-rotate: 8deg;
  z-index: 3;
}

.focus-card[data-position="right"] {
  --card-x: 330px;
  --card-scale: 0.72;
  --card-rotate: -8deg;
  z-index: 3;
}

.focus-card[data-position="far"] {
  --card-x: 500px;
  --card-scale: 0.56;
  --card-rotate: -11deg;
  z-index: 2;
  opacity: 0.54;
}

.focus-card[data-position="far"] > .focus-icon,
.focus-card[data-position="far"] > .memory-graph,
.focus-card[data-position="far"] > strong {
  transform: translateX(78px);
}

.focus-card[data-position="far"] > .focus-description {
  display: none;
}

.focus-card:hover,
.focus-card:focus-visible {
  opacity: 1;
  border-color: rgba(118, 174, 255, 0.9);
}

.focus-card:active {
  transition-duration: 90ms;
  filter: brightness(1.12);
}

.focus-card[data-position="active"]:active {
  --card-scale: 0.97;
}

.focus-icon {
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 34px;
  color: #8ec0ff;
  background: rgba(69, 112, 176, 0.18);
  font-size: 78px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 28px rgba(0, 0, 0, 0.22);
}

.focus-card[data-position="active"] .focus-icon {
  color: #ffcf66;
  background: rgba(243, 185, 70, 0.16);
}

.focus-card > strong {
  position: relative;
  z-index: 2;
  font-size: 39px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.focus-description {
  position: relative;
  z-index: 2;
  max-width: 280px;
  color: var(--launcher-muted);
  font-size: 18px;
  line-height: 1.45;
  text-align: center;
}

.focus-open {
  position: relative;
  z-index: 2;
  min-width: 220px;
  min-height: 58px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 5px;
  border: 1px solid rgba(255, 225, 154, 0.7);
  border-radius: 999px;
  color: #fff8e9;
  background: rgba(243, 185, 70, 0.62);
  font-size: 22px;
  font-weight: 720;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 24px rgba(243, 185, 70, 0.22);
}

.focus-card[data-position="active"] .focus-open {
  display: inline-flex;
}

.memory-graph {
  position: relative;
  z-index: 2;
  width: 190px;
  height: 190px;
  filter: drop-shadow(0 0 14px rgba(179, 154, 255, 0.38));
}

.focus-card:not([data-position="active"]) .memory-graph {
  width: 160px;
  height: 190px;
}

.carousel-arrow {
  position: absolute;
  top: 49%;
  z-index: 8;
  width: 64px;
  height: 64px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(114, 167, 255, 0.72);
  border-radius: 50%;
  color: var(--launcher-ink);
  background: rgba(19, 29, 46, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 22px rgba(80, 145, 238, 0.25);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateY(-50%);
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  color: var(--launcher-gold);
  border-color: var(--launcher-gold);
}

.carousel-arrow-left {
  left: 8px;
}

.carousel-arrow-right {
  right: -42px;
}

.launcher-depth {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 8px 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #848ea2;
  background: rgba(19, 25, 37, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  transform: translateX(-50%);
}

.launcher-depth > span:not(.material-symbols-rounded) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 620;
  white-space: nowrap;
}

.launcher-depth b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd4e3;
}

.launcher-depth .is-active {
  color: var(--launcher-gold);
}

.launcher-depth .is-active b {
  color: #2b1d03;
  background: var(--launcher-gold);
}

.launcher-choice-level,
.launcher-detail {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding-top: 22px;
}

.launcher-level-heading {
  display: grid;
  grid-template-columns: 130px 1fr 130px;
  align-items: center;
  margin-bottom: 34px;
}

.launcher-level-heading > div {
  text-align: center;
}

.launcher-level-heading p,
.launcher-level-heading h2 {
  margin: 0;
}

.launcher-level-heading p {
  color: var(--launcher-muted);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.launcher-level-heading h2 {
  margin-top: 5px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.launcher-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  color: var(--launcher-ink);
  background: rgba(22, 29, 42, 0.58);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.launcher-choice-grid {
  display: grid;
  gap: 18px;
}

.launcher-choice-grid-eight {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.launcher-choice-grid-sixteen {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.launcher-choice {
  position: relative;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 23px;
  overflow: hidden;
  border: 1px solid var(--launcher-line);
  border-radius: 28px;
  color: var(--launcher-ink);
  background: var(--launcher-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 18px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.launcher-choice-grid-sixteen .launcher-choice {
  min-height: 106px;
  gap: 9px;
  padding: 14px 16px;
  border-radius: 22px;
}

.launcher-choice-grid-sixteen .launcher-choice .material-symbols-rounded:not(.choice-arrow) {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 27px;
}

.launcher-choice-grid-sixteen .launcher-choice small {
  display: none;
}

.launcher-choice:hover,
.launcher-choice:focus-visible {
  border-color: rgba(114, 167, 255, 0.78);
  background: rgba(36, 49, 72, 0.75);
  transform: translateY(-4px);
}

.launcher-choice:active {
  transform: translateY(0) scale(0.98);
}

.launcher-choice .material-symbols-rounded {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #9dc6ff;
  background: rgba(91, 141, 239, 0.16);
  font-size: 31px;
}

.launcher-choice strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.launcher-choice small {
  display: block;
  margin-top: 7px;
  color: var(--launcher-muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
}

.launcher-choice .choice-arrow {
  position: absolute;
  top: 21px;
  right: 19px;
  color: #7d899e;
  font-size: 22px;
}

.launcher-detail-card {
  max-width: 820px;
  min-height: 330px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid rgba(172, 198, 237, 0.22);
  border-radius: 36px;
  color: var(--launcher-ink);
  background: rgba(24, 32, 48, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), 0 28px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.launcher-detail-card h3 {
  margin: 0 0 12px;
  font-size: 28px;
}

.launcher-detail-card p {
  margin: 0 0 18px;
  color: var(--launcher-muted);
  font-size: 17px;
}

.launcher-detail-facts {
  display: grid;
  gap: 11px;
  margin: 24px 0;
}

.launcher-detail-facts div {
  padding: 15px 17px;
  border-left: 3px solid var(--launcher-gold);
  border-radius: 0 14px 14px 0;
  background: rgba(255, 255, 255, 0.045);
}

.launcher-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.launcher-detail-actions button,
.launcher-detail-actions a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--launcher-ink);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  text-decoration: none;
}

.launcher-search-dialog {
  width: min(700px, calc(100vw - 30px));
  max-height: min(720px, calc(100vh - 60px));
  margin: 10vh auto auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  color: var(--launcher-ink);
  background: rgba(18, 24, 36, 0.88);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(26px) saturate(145%);
  -webkit-backdrop-filter: blur(26px) saturate(145%);
}

.launcher-search-dialog::backdrop {
  background: rgba(2, 5, 10, 0.66);
  backdrop-filter: blur(6px);
}

.launcher-search-card {
  padding: 20px;
}

.launcher-search-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(7, 11, 19, 0.7);
}

.launcher-search-row input {
  min-width: 0;
  min-height: 52px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--launcher-ink);
  background: transparent;
  font-size: 18px;
}

.launcher-search-close {
  width: 44px;
  height: 44px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: var(--launcher-muted);
  background: rgba(255, 255, 255, 0.07);
}

.launcher-search-results {
  max-height: 520px;
  display: grid;
  gap: 8px;
  margin-top: 14px;
  overflow: auto;
}

.launcher-search-result {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--launcher-ink);
  background: transparent;
  text-align: left;
}

.launcher-search-result:hover,
.launcher-search-result:focus-visible {
  border-color: rgba(114, 167, 255, 0.45);
  background: rgba(255, 255, 255, 0.055);
}

.launcher-search-result small {
  display: block;
  color: var(--launcher-muted);
}

@media (max-width: 1050px) {
  .focus-carousel {
    width: calc(100vw - 100px);
  }

  .focus-card[data-position="left"] {
    --card-x: -315px;
    --card-scale: 0.62;
  }

  .focus-card[data-position="right"] {
    --card-x: 315px;
    --card-scale: 0.62;
  }

  .focus-card[data-position="far"] {
    --card-x: 390px;
    --card-scale: 0.44;
  }
}

@media (max-width: 760px) {
  .launcher-header {
    min-height: 76px;
    grid-template-columns: 1fr auto;
    padding: 12px 15px;
  }

  .launcher-brand span,
  .launcher-breadcrumb {
    display: none;
  }

  .launcher-brand img {
    width: 46px;
    height: 46px;
  }

  .launcher-main {
    padding: 10px 12px 104px;
  }

  .launcher-greeting {
    min-height: 44px;
    font-size: 29px;
  }

  .launcher-level-one {
    min-height: 540px;
  }

  .focus-carousel {
    width: calc(100vw - 26px);
    height: 505px;
    overflow: hidden;
  }

  .focus-card {
    width: min(320px, 76vw);
    height: 430px;
    border-radius: 40px;
  }

  .focus-card[data-position="left"] {
    --card-x: -245px;
    --card-scale: 0.43;
  }

  .focus-card[data-position="right"] {
    --card-x: 245px;
    --card-scale: 0.43;
  }

  .focus-card[data-position="far"] {
    --card-x: 0px;
    --card-scale: 0.2;
    opacity: 0;
    pointer-events: none;
  }

  .focus-icon {
    width: 112px;
    height: 112px;
    font-size: 66px;
  }

  .focus-card > strong {
    font-size: 34px;
  }

  .carousel-arrow {
    top: auto;
    bottom: 20px;
    width: 54px;
    height: 54px;
  }

  .carousel-arrow-left {
    left: calc(50% - 82px);
  }

  .carousel-arrow-right {
    right: calc(50% - 82px);
  }

  .launcher-depth {
    bottom: 14px;
    min-height: 56px;
    gap: 9px;
    padding: 7px 14px;
  }

  .launcher-depth > span:not(.material-symbols-rounded) {
    font-size: 12px;
  }

  .launcher-depth b {
    width: 28px;
    height: 28px;
  }

  .launcher-depth .material-symbols-rounded {
    font-size: 16px;
  }

  .launcher-level-heading {
    grid-template-columns: 90px 1fr 90px;
    margin-bottom: 20px;
  }

  .launcher-back {
    gap: 2px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .launcher-choice-grid-eight,
  .launcher-choice-grid-sixteen {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .launcher-choice,
  .launcher-choice-grid-sixteen .launcher-choice {
    min-height: 142px;
    padding: 17px;
    border-radius: 22px;
  }

  .launcher-choice strong {
    font-size: 17px;
  }

  .launcher-choice small {
    display: none;
  }

  .launcher-detail-card {
    min-height: 280px;
    border-radius: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .focus-card,
  .launcher-choice {
    transition: none;
  }
}
