/* Spatial bento layout: varied translucent cards, color reveal, monochrome company footer */
:root {
  --sp-radius-xl: 34px;
  --sp-radius-lg: 22px;
  --sp-ink: #14161b;
  --sp-ink-2: rgba(20, 22, 27, 0.6);
  --sp-window: rgba(255, 255, 255, 0.55);
  --sp-window-border: rgba(255, 255, 255, 0.72);
  --sp-glass: rgba(255, 255, 255, 0.62);
  --sp-glass-strong: rgba(255, 255, 255, 0.9);
  --sp-glass-border: rgba(255, 255, 255, 0.82);
  --sp-card: rgba(255, 255, 255, 0.28);
  --sp-card-border: rgba(255, 255, 255, 0.55);
  --sp-hairline: rgba(20, 22, 27, 0.12);
  --sp-shadow: 0 40px 100px -30px rgba(30, 35, 50, 0.45), 0 8px 24px -12px rgba(30, 35, 50, 0.25);
  --sp-accent: #0a84ff;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }

html {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Inter, Roboto, sans-serif;
}

button, input, select, textarea { font-family: inherit; }

body {
  height: 100dvh;
  margin: 0;
  padding: clamp(8px, 1.6vw, 22px);
  display: grid;
  place-items: center;
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Inter, Roboto, sans-serif;
  color: var(--sp-ink);
  background:
    radial-gradient(1200px 700px at 12% 8%, #c9d6e8 0%, transparent 55%),
    radial-gradient(1000px 760px at 88% 12%, #e9d9c8 0%, transparent 52%),
    radial-gradient(900px 800px at 50% 100%, #b9c4b3 0%, transparent 58%),
    linear-gradient(150deg, #dfe4ea 0%, #cfd6dd 45%, #c3cabf 100%);
  background-attachment: fixed;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.ambient {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 22% 26%, rgba(180, 205, 235, 0.85), transparent 70%),
    radial-gradient(34% 38% at 78% 22%, rgba(240, 214, 190, 0.85), transparent 70%),
    radial-gradient(40% 44% at 62% 82%, rgba(176, 196, 170, 0.8), transparent 72%);
  filter: blur(60px) saturate(120%);
}

.spotlight {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--spot-x, 50%) var(--spot-y, 40%), rgba(244, 255, 191, 0.26) 0%, rgba(244, 255, 191, 0.1) 40%, rgba(244, 255, 191, 0) 78%);
  transition: opacity 0.3s ease;
}

html.is-spotlight-active .spotlight { opacity: 0.95; }

.spatial-window {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1720px, 100%);
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--sp-radius-xl);
  background: var(--sp-window);
  border: 1px solid var(--sp-window-border);
  box-shadow: var(--sp-shadow);
  backdrop-filter: blur(46px) saturate(150%);
  -webkit-backdrop-filter: blur(46px) saturate(150%);
  isolation: isolate;
}

.spatial-window::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(260px circle at var(--spot-x, 50%) var(--spot-y, 40%), rgba(244, 255, 191, 0.22) 0%, rgba(244, 255, 191, 0.08) 42%, rgba(244, 255, 191, 0) 78%);
  transition: opacity 0.3s ease;
}

html.is-spotlight-active .spatial-window::before { opacity: 0.95; }

/* ---- Floating icon rail ---- */
.rail {
  position: absolute;
  left: clamp(14px, 1.6vw, 22px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border-radius: 999px;
  background: var(--sp-glass);
  border: 1px solid var(--sp-glass-border);
  box-shadow: 0 18px 40px -22px rgba(25, 30, 45, 0.55);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}

.rail-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--sp-ink-2);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.rail-btn svg { width: 20px; height: 20px; }
.rail-btn:hover { background: var(--sp-glass-strong); color: var(--sp-ink); transform: scale(1.05); }
.rail-btn.is-active {
  background: var(--sp-glass-strong);
  color: var(--sp-ink);
  box-shadow: 0 6px 16px -8px rgba(25, 30, 45, 0.5);
}
.rail-divider { width: 22px; height: 1px; background: var(--sp-hairline); margin: 3px 0; }

.theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

/* ---- Stage ---- */
.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-left: clamp(74px, 7vw, 94px);
  padding: clamp(16px, 2.2vw, 30px) clamp(18px, 2.6vw, 36px) clamp(14px, 1.8vw, 24px);
  overflow: hidden;
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 22px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--sp-hairline);
}

.stage-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.stage-title h1 {
  margin: 0;
  color: var(--sp-ink-2);
  font-family: "SF Pro Display", "Arial Black", "Helvetica Neue", Inter, sans-serif;
  font-size: clamp(0.8rem, 2.4vw, 2.2rem);
  font-weight: 900;
  -webkit-text-stroke: 0.35px currentColor;
  letter-spacing: -0.045em;
  line-height: 0.9;
  text-transform: uppercase;
  white-space: nowrap;
  transform: scaleY(0.88);
  transform-origin: left center;
}

.stage-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sp-ink);
  text-decoration: none;
  border-radius: 14px;
  transition: opacity 0.2s ease;
}

.stage-brand:hover { opacity: 0.75; }

.stage-brand img {
  width: 42px;
  height: 42px;
  padding: 2px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(20, 22, 27, 0.05);
  box-shadow: 0 3px 10px -8px rgba(25, 30, 45, 0.35);
  object-fit: contain;
  display: block;
}

.stage-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.rail-btn.columns-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--sp-ink-2);
}

.rail-btn.columns-toggle svg { width: 20px; height: 20px; }
.rail-btn.columns-toggle:hover { background: var(--sp-glass-strong); color: var(--sp-ink); transform: scale(1.05); }

.columns-label {
  position: absolute;
  right: 1px;
  bottom: 1px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--sp-glass-strong);
  color: var(--sp-ink);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(300px, 58vw);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sp-glass);
  border: 1px solid var(--sp-glass-border);
  box-shadow: 0 14px 30px -24px rgba(25, 30, 45, 0.5);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.search-bar svg { width: 17px; height: 17px; flex: none; color: var(--sp-ink-2); }

.search-bar input {
  width: 100%;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--sp-ink);
  font-size: 0.84rem;
  font-weight: 500;
}

.search-bar input::placeholder { color: var(--sp-ink-2); opacity: 0.72; }
.search-bar input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-bar input:focus-visible { outline: none; }

/* ---- Segmented filters ---- */
.dock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--sp-glass);
  border: 1px solid var(--sp-glass-border);
  box-shadow: 0 14px 30px -24px rgba(25, 30, 45, 0.5);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.dock-item {
  border: 0;
  padding: 8px 15px;
  border-radius: 999px;
  background: transparent;
  color: var(--sp-ink-2);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.dock-item:hover { color: var(--sp-ink); }
.dock-item.is-active {
  background: var(--sp-glass-strong);
  color: var(--sp-ink);
  box-shadow: 0 6px 16px -8px rgba(25, 30, 45, 0.5);
}

/* ---- Sections ---- */
.section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: clamp(10px, 1.4vw, 18px);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(20px, 2.4vw, 30px);
  min-width: 0;
}

.section-head h2 {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--sp-ink-2);
}

.section-count {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--sp-ink-2);
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
}

.category-filter {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  gap: 7px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-filter::-webkit-scrollbar { display: none; }

.category-chip {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--sp-card-border);
  background: var(--sp-card);
  color: var(--sp-ink-2);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover { color: var(--sp-ink); background: var(--sp-glass); }
.category-chip.is-active {
  background: var(--sp-ink);
  border-color: transparent;
  color: #ffffff;
}

/* ---- Masonry gallery of vertical cards ---- */
.app-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(20, 22, 27, 0.2) transparent;
}

.masonry {
  column-count: 3;
  column-gap: clamp(10px, 1.2vw, 16px);
}


.tile-app--full {
  column-span: all;
  width: 100%;
}

.tile-app {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 250px;
  margin: 0 0 clamp(10px, 1.2vw, 16px);
  padding: 14px 16px;
  break-inside: avoid;
  border-radius: var(--sp-radius-lg);
  background: var(--sp-card);
  border: 1px solid var(--sp-card-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 14px 30px -26px rgba(25, 30, 45, 0.55);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}

.app-grid::-webkit-scrollbar { width: 8px; }
.app-grid::-webkit-scrollbar-track { background: transparent; }
.app-grid::-webkit-scrollbar-thumb {
  background: rgba(20, 22, 27, 0.18);
  border-radius: 999px;
}
html.dark .app-grid::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); }

.tile-app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--tile-grad, radial-gradient(circle at 0% 0%, #2563eb 0%, #22d3ee 42%, rgba(34, 211, 238, 0) 78%));
  opacity: 0;
  transition: opacity 0.28s ease;
}

.tile-app:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 44px -26px rgba(25, 30, 45, 0.6);
}

.tile-app:hover::before,
.tile-app:focus-within::before { opacity: 0.32; }
.tile-app:focus-visible { outline: 3px solid rgba(10, 132, 255, 0.7); outline-offset: 3px; }

.tile-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.tile-link:focus-visible {
  outline: 3px solid rgba(10, 132, 255, 0.7);
  outline-offset: -3px;
}

.tile-app:nth-child(6n + 1) { --tile-grad: radial-gradient(circle at 0% 0%, #2563eb 0%, #22d3ee 42%, rgba(34, 211, 238, 0) 78%); }
.tile-app:nth-child(6n + 2) { --tile-grad: radial-gradient(circle at 0% 0%, #db2777 0%, #f472b6 42%, rgba(244, 114, 182, 0) 78%); }
.tile-app:nth-child(6n + 3) { --tile-grad: radial-gradient(circle at 0% 0%, #d97706 0%, #fbbf24 42%, rgba(251, 191, 36, 0) 78%); }
.tile-app:nth-child(6n + 4) { --tile-grad: radial-gradient(circle at 0% 0%, #059669 0%, #34d399 42%, rgba(52, 211, 153, 0) 78%); }
.tile-app:nth-child(6n + 5) { --tile-grad: radial-gradient(circle at 0% 0%, #7c3aed 0%, #a78bfa 42%, rgba(167, 139, 250, 0) 78%); }
.tile-app:nth-child(6n + 0) { --tile-grad: radial-gradient(circle at 0% 0%, #ea580c 0%, #fb923c 42%, rgba(251, 146, 60, 0) 78%); }

.tile-logo,
.tile-copy { position: relative; z-index: 1; }

.tile-logo {
  flex: none;
  align-self: center;
  margin-top: clamp(0px, 1.6vh, 18px);
  width: 110px;
  height: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 10px 22px -16px rgba(25, 30, 45, 0.55);
  transition: transform 0.28s ease;
}

.tile-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile-app:hover .tile-logo { transform: translateY(-1px) scale(1.04); }

.tile-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-width: 0;
  margin-top: auto;
}

.tile-name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--sp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.22s ease;
}

.tile-desc {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--sp-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0;
  max-height: 0;
  transition: opacity 0.2s ease, max-height 0.25s ease, color 0.22s ease;
}


.tile-app:hover .tile-name,
.tile-app:focus-within .tile-name { color: var(--sp-ink); text-shadow: none; }

.tile-app:hover .tile-desc,
.tile-app:focus-within .tile-desc {
  opacity: 1;
  max-height: 3em;
  color: var(--sp-ink-2);
  text-shadow: none;
}

.tile-category {
  align-self: flex-start;
  max-width: 100%;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--sp-ink-2);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.tile-app:hover .tile-category,
.tile-app:focus-within .tile-category {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--sp-ink);
}

.tile-fav {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.55);
  color: var(--sp-ink-2);
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.tile-fav svg { width: 16px; height: 16px; }
.tile-fav:hover {
  background: var(--sp-glass-strong);
  border-color: rgba(255, 255, 255, 0.9);
  color: var(--sp-ink);
  transform: scale(1.06);
}
.tile-fav.is-fav {
  background: #ffffff;
  border-color: #ffffff;
  color: #f5a623;
}
.tile-fav.is-fav svg { fill: currentColor; }

/* Bigger type on the largest variants */

/* ---- Monochrome company footer inside the frame ---- */
.company-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: clamp(10px, 1.4vw, 16px);
  border-top: 1px solid var(--sp-hairline);
  text-align: center;
}

.footer-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(20, 22, 27, 0.42);
}

.company-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 3.4vw, 44px);
  flex: 0 1 auto;
}

.company-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  opacity: 0.62;
  filter: grayscale(1) contrast(1.15);
  text-decoration: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.company-logo:hover { opacity: 1; transform: translateY(-1px); filter: grayscale(0) contrast(1); }

.company-logo img {
  display: block;
  max-height: 100%;
  width: auto;
  max-width: 170px;
  object-fit: contain;
}

.empty-state {
  margin: 40px 0;
  text-align: center;
  color: var(--sp-ink-2);
  font-weight: 500;
}

.filter-empty {
  margin: 24px 0;
  text-align: center;
  color: var(--sp-ink-2);
  font-size: 0.86rem;
  font-weight: 500;
}

[hidden] { display: none !important; }

/* ---- Dark theme ---- */
html.dark body {
  color: #f2f4f8;
  background:
    radial-gradient(1200px 700px at 12% 8%, #23304a 0%, transparent 55%),
    radial-gradient(1000px 760px at 88% 12%, #3a2f28 0%, transparent 52%),
    radial-gradient(900px 800px at 50% 100%, #243027 0%, transparent 58%),
    linear-gradient(150deg, #151921 0%, #10131a 55%, #0c0f14 100%);
}

html.dark .ambient {
  background:
    radial-gradient(38% 42% at 22% 26%, rgba(48, 84, 130, 0.55), transparent 70%),
    radial-gradient(34% 38% at 78% 22%, rgba(120, 84, 56, 0.45), transparent 70%),
    radial-gradient(40% 44% at 62% 82%, rgba(48, 78, 58, 0.45), transparent 72%);
  filter: blur(70px) saturate(120%);
}

html.dark .spotlight,
html.dark .spatial-window::before {
  background: radial-gradient(260px circle at var(--spot-x, 50%) var(--spot-y, 40%), rgba(216, 235, 159, 0.14) 0%, rgba(216, 235, 159, 0.05) 45%, rgba(216, 235, 159, 0) 78%);
}

html.dark .spatial-window {
  background: rgba(20, 23, 30, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
}

html.dark .rail,
html.dark .dock,
html.dark .search-bar {
  background: rgba(32, 36, 46, 0.66);
  border-color: rgba(255, 255, 255, 0.12);
}

html.dark .search-bar svg { color: rgba(240, 244, 250, 0.6); }
html.dark .search-bar input { color: #f4f6fa; }
html.dark .search-bar input::placeholder { color: rgba(240, 244, 250, 0.5); }
html.dark .columns-label { background: rgba(255, 255, 255, 0.16); color: #ffffff; }

html.dark .rail-btn,
html.dark .dock-item { color: rgba(240, 244, 250, 0.62); }
html.dark .rail-btn:hover,
html.dark .dock-item:hover { color: #fff; }
html.dark .rail-btn.is-active,
html.dark .dock-item.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
html.dark .rail-btn:hover { background: rgba(255, 255, 255, 0.12); }
html.dark .rail-divider { background: rgba(255, 255, 255, 0.16); }
html.dark .stage-brand { color: #f4f6fa; }
html.dark .stage-head { border-bottom-color: rgba(255, 255, 255, 0.14); }
html.dark .stage-title h1 { color: rgba(240, 244, 250, 0.55); }
html.dark .section-head h2,
html.dark .section-count { color: rgba(240, 244, 250, 0.6); }

html.dark .tile-app {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px -26px rgba(0, 0, 0, 0.7);
}

html.dark .tile-name { color: #f4f6fa; }
html.dark .tile-desc { color: rgba(244, 246, 250, 0.6); }
html.dark .tile-fav {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(244, 246, 250, 0.7);
}
html.dark .tile-fav:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}
html.dark .tile-fav.is-fav {
  background: #ffffff;
  border-color: #ffffff;
  color: #f5a623;
}
html.dark .section-count {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

html.dark .category-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(240, 244, 250, 0.65);
}
html.dark .category-chip:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
html.dark .category-chip.is-active { background: #f4f6fa; border-color: transparent; color: #14161b; }

html.dark .tile-category {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(244, 246, 250, 0.72);
}

html.dark .tile-app:hover .tile-name,
html.dark .tile-app:focus-within .tile-name,
html.dark .tile-app:hover .tile-desc,
html.dark .tile-app:focus-within .tile-desc,
html.dark .tile-app:hover .tile-category,
html.dark .tile-app:focus-within .tile-category {
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.22);
}
html.dark .tile-app:hover .tile-category,
html.dark .tile-app:focus-within .tile-category {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}
html.dark .company-footer { border-top-color: rgba(255, 255, 255, 0.14); }
html.dark .footer-label { color: rgba(240, 244, 250, 0.45); }
html.dark .company-logo {
  opacity: 0.72;
  filter: grayscale(1) brightness(0) invert(1);
}
html.dark .company-logo:hover { opacity: 1; filter: none; }

/* ---- Responsive ---- */
@media (max-width: 1280px) {
}

@media (max-width: 1080px) {
}

@media (max-width: 900px) {
  }

@media (max-width: 760px) {
  body { padding: 0; place-items: stretch; }
  .ambient,
  .spotlight { display: none; }
  .spatial-window {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }
  .rail {
    position: static;
    transform: none;
    width: fit-content;
    margin: 12px auto 0;
    flex-direction: row;
  }
  .rail-divider { width: 1px; height: 22px; margin: 0 3px; }
  .stage { margin-left: 0; padding: 14px 14px 16px; }
  .stage-head { align-items: flex-start; margin-bottom: 22px; }
  .stage-brand img { width: 38px; height: 38px; padding: 2px; }
  .stage-tools { width: 100%; justify-content: space-between; }
}

@media (max-width: 620px) {
  .stage-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .stage-tools { flex-direction: column; align-items: stretch; }
  .search-bar { width: 100%; min-width: 0; }
  .dock { width: 100%; justify-content: center; }
  .tile-app { height: 200px; }
  .tile-logo { width: 84px; height: 84px; padding: 7px; border-radius: 22px; }
  .tile-copy { gap: 3px; }
  .company-footer { gap: 6px; }
  .company-logos { gap: 18px 26px; }
  .company-logo { height: 42px; }
}

@media (max-width: 420px) {
  .dock-item { padding: 7px 10px; font-size: 0.76rem; }
  .masonry { column-gap: 9px; }
  .tile-app {
    height: 180px;
    padding: 11px 12px;
    gap: 7px;
    margin-bottom: 9px;
  }
  .tile-logo { width: 68px; height: 68px; padding: 6px; border-radius: 18px; }
  .tile-name { font-size: 0.9rem; }
  .company-logo { height: 38px; }
}

@media (max-height: 760px) {
  .stage { padding-top: 12px; padding-bottom: 12px; }
  .tile-app { height: 215px; }
  .stage-head { margin-bottom: 16px; }
  .stage-brand img { width: 36px; height: 36px; padding: 2px; }
  .section-head { margin-bottom: 16px; }
  .tile-app { padding: 11px 13px; gap: 7px; }
  .tile-logo {
    width: 80px;
    height: 80px;
    padding: 6px;
    border-radius: 20px;
    margin-top: 0;
  }
  .company-footer { padding-top: 8px; }
  .company-logo { height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile-app, .tile-logo, .company-logo, .rail-btn, .dock-item, .tile-fav { transition: none; }
  .tile-app:hover { transform: none; }
  .tile-app:hover .tile-logo, .company-logo:hover { transform: none; }
}
