/*
 * Workspace (logged in): launcher with search, category chips and angular app
 * cards. Purple section accent; each card takes the tone of its category
 * (apps cyan, websites pink, games purple, streaming gold). Frames come from
 * home/cards.css, rendering from initPageGrid() in home-account.js.
 */
.home-workspace {
  --trace: #b69bff;
  --accent: #b69bff;
  --accent-rgb: 155, 107, 255;
  --focus: #29e0ff;
  --gold: #ffcf6b;
  --line: #ffffff1f;
}

.home-launch {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 36px;
  border: 1px solid transparent;
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), .09), transparent 45%),
    #0a0a0f;
}

/* Faint circuit grid in the top right, like the dialogs. */
.home-launch::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), .06) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgba(var(--accent-rgb), .06) 1px, transparent 1px) 0 0 / 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at 100% 0, #000, transparent 55%);
  mask-image: radial-gradient(ellipse at 100% 0, #000, transparent 55%);
}

.home-launch__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.home-launch__title {
  margin: 0;
  color: #f2f2f4;
  font: 800 clamp(22px, 2.6vw, 30px)/1.2 var(--home-heading);
  text-transform: uppercase;
}

.home-launch__lead {
  max-width: 36rem;
  margin: 10px 0 0;
  color: #a1a1ac;
  font-size: 15px;
  line-height: 1.6;
}

.home-launch__stats {
  margin: 0;
  color: var(--accent);
  font: 600 12px/1.5 var(--home-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Search */
.home-launch__search {
  position: relative;
  display: flex;
  align-items: center;
}

.home-launch__search > .material-symbols-outlined {
  position: absolute;
  left: 16px;
  color: #6f6b78;
  font-size: 22px;
  pointer-events: none;
  transition: color .2s;
}

.home-launch__search input {
  width: 100%;
  min-height: 52px;
  padding: 14px 7.5rem 14px 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 6, 9, .72);
  color: #f2f2f4;
  font: 400 15px/1.5 'Inter', system-ui, sans-serif;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.home-launch__search input::-webkit-search-cancel-button { display: none; }
.home-launch__search input::placeholder { color: #6f6b78; }
.home-launch__search input:hover { border-color: #ffffff38; }

.home-launch__search input:focus,
.home-launch__search input:focus-visible {
  outline: none;
  border-color: var(--focus);
  background: rgba(6, 6, 9, .9);
  box-shadow: 0 0 0 4px rgba(41, 224, 255, .12), 0 0 28px -8px rgba(41, 224, 255, .6);
}

.home-launch__search:focus-within > .material-symbols-outlined { color: var(--focus); }

.home-launch__kbd {
  position: absolute;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6f6b78;
  font: 500 11px/1.4 var(--home-mono);
  pointer-events: none;
}

.home-launch__kbd kbd {
  min-width: 22px;
  padding: 2px 6px;
  border: 1px solid #ffffff24;
  border-bottom-width: 2px;
  border-radius: 6px;
  color: #a1a1ac;
  font: inherit;
  text-align: center;
}

/* Category chips, like the project tabs */
.home-launch__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 30px;
}

.home-launch__chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff04;
  color: #a1a1ac;
  font: 600 13px/1.2 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}

.home-launch__chip span { color: #6f6b78; font: 500 11px var(--home-mono); }
.home-launch__chip:hover { color: #f2f2f4; border-color: #ffffff38; transform: translateY(-1px); }

.home-launch__chip.is-active {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), .55);
  background: rgba(var(--accent-rgb), .12);
}

.home-launch__chip.is-active span { color: var(--accent); }

/* Groups: "// GEMERKT 02" with a hairline */
.home-launch__group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: #96929f;
  font: 700 11px/1.4 var(--home-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-launch__group span { color: var(--accent); }
.home-launch__group::after { content: ''; flex: 1; height: 1px; background: #ffffff12; }
.home-launch__grid + .home-launch__group { margin-top: 34px; }

.home-launch__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 14px;
}

/* App card */
.home-app {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 18px 18px 14px;
  /* Transparent border: the frame in home/cards.css is drawn on top of it. */
  border: 1px solid transparent;
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), .09), transparent 60%),
    rgba(6, 6, 9, .6);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), background .25s;
}

.home-app:hover,
.home-app:focus-within {
  --edge: rgba(var(--accent-rgb), .6);
  transform: translateY(-3px);
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), .15), transparent 65%),
    rgba(6, 6, 9, .7);
}

.home-app__main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: inherit;
}

.home-app__main:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.home-app__icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
}

.home-app__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px #0008);
}

.home-app__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.home-app__title {
  overflow: hidden;
  color: #f2f2f4;
  font: 600 15px/1.3 'Inter', system-ui, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-app__host {
  overflow: hidden;
  color: #6f6b78;
  font: 500 11px/1.4 var(--home-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-app__open {
  align-self: flex-start;
  color: #6f6b78;
  font-size: 16px;
  transition: color .2s, transform .2s;
}

.home-app:hover .home-app__open { color: var(--accent); transform: translate(2px, -2px); }

.home-app__desc {
  display: -webkit-box;
  min-height: calc(2 * 1.55em);
  margin: 0;
  overflow: hidden;
  color: #a1a1ac;
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-app__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #ffffff10;
}

.home-app__tag {
  padding: 3px 8px;
  border: 1px solid rgba(var(--accent-rgb), .4);
  color: var(--accent);
  font: 600 10.5px/1.4 var(--home-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-app__actions { display: flex; gap: 6px; }

.home-app__action {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff04;
  color: #a1a1ac;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.home-app__action .material-symbols-outlined { font-size: 19px; }

.home-app__action:hover {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), .55);
  background: rgba(var(--accent-rgb), .1);
}

.home-app__pin:hover,
.home-app__pin.is-active {
  color: var(--gold);
  border-color: rgba(255, 207, 107, .5);
  background: rgba(255, 207, 107, .1);
}

.home-app__action:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Empty result */
.home-launch__empty {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 56px 20px;
  border: 1px dashed var(--line);
  color: #a1a1ac;
  font: 500 13px/1.6 var(--home-mono);
  text-align: center;
}

.home-launch__empty p { margin: 0; }

.home-launch__reset {
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid #ffffff2e;
  border-radius: 10px;
  background: #ffffff05;
  color: #f2f2f4;
  font: 650 13.5px 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}

.home-launch__reset:hover {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), .55);
  background: rgba(var(--accent-rgb), .1);
}

@media (hover: none) {
  .home-launch__kbd { display: none; }
  .home-launch__search input { padding-right: 16px; }
}

@media (max-width: 760px) {
  .home-launch { padding: 24px 16px; }
  .home-launch__kbd { display: none; }
  .home-launch__search input { padding-right: 16px; }
  .home-launch__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .home-app,
  .home-launch__chip { transition: none; }
  .home-app:hover,
  .home-app:focus-within { transform: none; }
}
