:root {
  color-scheme: dark;
  --bg: #080d14;
  --bg-deep: #04070d;
  --panel: rgba(10, 14, 21, 0.74);
  --panel-strong: rgba(8, 11, 17, 0.86);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f6f2ea;
  --muted: rgba(246, 242, 234, 0.58);
  --accent: #ff7a00;
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.38);
  --radius-xl: 36px;
  --radius-lg: 30px;
  --radius-md: 22px;
  --font-display: "DIN Alternate", "Avenir Next Condensed", "Avenir Next", "Segoe UI Variable", sans-serif;
  --font-body: "Avenir Next", "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: linear-gradient(180deg, #0a0e14 0%, #06090e 100%);
  overflow-x: hidden;
}

button,
iframe,
input,
img {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
}

.ambient {
  display: none;
}

.ambient--one {
  top: -8rem;
  right: -4rem;
  width: 26rem;
  height: 26rem;
  background: rgba(255, 122, 0, 0.11);
  animation: float-one 18s ease-in-out infinite;
}

.ambient--two {
  bottom: -10rem;
  left: -6rem;
  width: 26rem;
  height: 26rem;
  background: rgba(72, 181, 255, 0.1);
  animation: float-two 22s ease-in-out infinite;
}

.grid-mask {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 95%);
  pointer-events: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

.eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(246, 242, 234, 0.56);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ff9c42);
  color: #10151b;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  box-shadow: 0 14px 30px rgba(255, 122, 0, 0.18);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(255, 122, 0, 0.25);
}

.button--ghost {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.button--danger {
  background: linear-gradient(135deg, #f75a3d, #ff8d67);
  color: #fff7f3;
}

.launcher {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100dvh;
  min-height: 100vh;
  margin: 0;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(0.75rem, env(safe-area-inset-right))
    max(1.2rem, env(safe-area-inset-bottom))
    max(0.75rem, env(safe-area-inset-left));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
}

.launcher__bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.9rem;
  padding: 0 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(8, 11, 17, 0.66);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.brand-chip__dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #58a6ff, #ff7a00);
  box-shadow: 0 0 16px rgba(88, 166, 255, 0.45);
}

.brand-chip__label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(246, 242, 234, 0.82);
}

.launcher__fullscreen {
  min-height: 2.9rem;
}

.launcher__stage {
  width: 100%;
  display: grid;
  min-height: 0;
  align-content: stretch;
  justify-items: stretch;
  padding: 0.25rem 0 0;
}

.apps-grid {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 5.8rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 178px));
  grid-auto-rows: 178px;
  justify-content: space-evenly;
  align-content: space-evenly;
  gap: 1rem 1.2rem;
  padding: 0;
}

.launch-tile {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.95rem;
  width: 178px;
  min-height: 178px;
  padding: 1rem 0.85rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012)),
    var(--tile-surface, linear-gradient(160deg, rgba(255, 122, 0, 0.12), rgba(255, 255, 255, 0.02)));
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
  color: var(--text);
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  animation: tile-rise 480ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.launch-tile::before {
  content: "";
  position: absolute;
  inset: auto -12% -24% auto;
  width: 6.2rem;
  height: 6.2rem;
  border-radius: 999px;
  background: var(--tile-glow, rgba(255, 122, 0, 0.28));
  filter: blur(24px);
  opacity: 0.55;
}

.launch-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.launch-tile:hover,
.launch-tile:focus-visible {
  transform: translateY(-2px) scale(1);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.26);
}

.launch-tile__logo {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
}

.launch-tile__logo-image {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.24));
}

.launch-tile__logo--icon svg {
  width: 42px;
  height: 42px;
  color: var(--tile-accent, var(--accent));
}

.launch-tile__name {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 0.96rem;
  letter-spacing: 0.03em;
}

.launcher__error {
  grid-column: 1 / -1;
  min-height: 8rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(8, 11, 17, 0.72);
  color: var(--muted);
  text-align: center;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: none;
  background: rgba(4, 6, 8, 0.68);
  backdrop-filter: blur(18px);
}

.viewer[data-open="true"] {
  display: block;
}

.viewer__shell {
  position: relative;
  width: 100%;
  height: 100%;
}

.viewer__chrome {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  left: max(0.75rem, env(safe-area-inset-left));
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.viewer__meta,
.viewer__actions {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(7, 10, 14, 0.84), rgba(7, 10, 14, 0.66));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.viewer__meta {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 12rem;
  padding: 0.65rem 0.9rem 0.75rem;
  border-radius: 1.2rem;
}

.viewer__meta .eyebrow {
  margin-bottom: 0;
}

.viewer__meta h2 {
  font-size: 1.7rem;
}

.viewer__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.45rem;
  border-radius: 999px;
}

.viewer__actions .button {
  min-height: 2.7rem;
  padding: 0 1rem;
  font-size: 0.92rem;
}

.viewer__shell[data-chrome="hidden"] .viewer__chrome {
  transform: translateY(-1rem);
  opacity: 0;
  pointer-events: none;
}

.viewer__peek {
  position: absolute;
  top: 50%;
  right: max(0.55rem, env(safe-area-inset-right));
  z-index: 3;
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: translate(0.6rem, -50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.viewer__shell[data-chrome="hidden"] .viewer__peek {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.viewer__peek-button {
  min-width: 3.3rem;
  min-height: 3.3rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(7, 10, 14, 0.78);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.viewer__stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #050709;
}

.viewer__stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #050709;
}

.viewer__empty {
  position: absolute;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  text-align: center;
  color: var(--text);
  background: rgba(8, 10, 14, 0.82);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  transform: translate(-50%, 1rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.viewer__empty::before {
  content: "";
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.viewer__empty[data-state="visible"] {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

@keyframes tile-rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }

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

@keyframes float-one {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(-2rem, 2rem, 0);
  }
}

@keyframes float-two {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(2rem, -2rem, 0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .launcher {
    padding-inline: max(0.5rem, env(safe-area-inset-left)) max(0.5rem, env(safe-area-inset-right));
  }

  .launcher__bar {
    gap: 0.75rem;
  }

  .launcher__stage {
    padding-top: 0.5rem;
  }

  .apps-grid {
    min-height: calc(100vh - 5.3rem);
    grid-template-columns: repeat(auto-fit, minmax(152px, 152px));
    grid-auto-rows: 152px;
    gap: 0.8rem;
  }

  .launch-tile {
    width: 152px;
    min-height: 152px;
    border-radius: 24px;
  }

  .launch-tile__logo {
    width: 68px;
    height: 68px;
    border-radius: 24px;
  }

  .launch-tile__logo-image {
    width: 46px;
    height: 46px;
  }

  .viewer__chrome {
    align-items: stretch;
  }

  .viewer__meta,
  .viewer__actions {
    width: 100%;
    border-radius: 1.2rem;
  }

  .viewer__peek {
    top: auto;
    right: max(0.85rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    transform: translateY(0.8rem);
  }

  .viewer__shell[data-chrome="hidden"] .viewer__peek {
    transform: translateY(0);
  }

  .viewer__actions {
    justify-content: stretch;
  }

  .viewer__actions .button {
    width: 100%;
  }
}