/* Startseite, Raumauswahl und Hauptnavigation */
.home-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.home-icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-design=weltraum] .welt-navigation {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 44px);
  padding: 10px max(20px, calc((100% - 1220px) / 2));
  background: #100d1a;
  border-color: #30263d;
}

.welt-navigation .home-marke {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.04em;
  white-space: nowrap;
  text-decoration: none;
}

html[data-design=weltraum] .welt-navigation nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-width: 0;
}

html[data-design=weltraum] .welt-navigation nav :is(a, button) {
  min-height: 44px;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 600 14px/1.25 var(--font);
  text-decoration: none;
  cursor: pointer;
}

html[data-design=weltraum] .welt-navigation nav :is([aria-current=page], :hover) {
  background: #241a32;
  color: #ffe9f9;
}

html[data-design=weltraum] .welt-navigation nav a[aria-current]::after { content: none; }

.home-konto-profil {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.home-konto-profil .konto-name {
  max-width: 15ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.welt-navigation .konto-hinweis { display: none; }
.home-nav-konto { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.home-nav-konto #btn-musik-stumm { position: static; flex: none; width: 36px; height: 36px; }

#view-join.home {
  min-height: calc(100dvh - 68px);
  padding: 0;
  gap: 0;
  background: #100d1a;
  animation: none;
}

.home-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 20px;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 42px;
}

.home-spielen {
  isolation: isolate;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  min-height: 450px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 64px);
  border: 1px solid #42324e;
  border-radius: 24px;
  background: radial-gradient(ellipse at 85% 36%, #402040, transparent 68%), #191327;
}

.home-spielen::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 25%;
  background: url('/studio-mikrofon.webp') 68% 52% / cover no-repeat;
  mask-image: linear-gradient(to right, transparent, #000 40%);
  pointer-events: none;
}

.home-titel { max-width: min(590px, 58%); }
.home-titel h1 {
  margin: 10px 0 13px;
  color: #fff7fb;
  font-size: clamp(48px, 5.1vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.065em;
}
.home-titel h1 span { color: #f8a1d6; }

.home-titel p {
  max-width: 44ch;
  margin: 0;
  color: #d4c8dc;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
}

.home-titel .home-kategorie {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f4b5e0;
  font-size: 13px;
  font-weight: 700;
}
.home-kategorie .home-icon { width: 17px; height: 17px; }

.home-profil {
  display: grid;
  gap: 5px;
  width: min(100%, 330px);
}
.home-profilbild {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  text-align: start;
  cursor: pointer;
}
.home-profilbild:focus-visible { outline: 2px solid var(--pink); outline-offset: 6px; }
.home-profilbild:hover #home-profil-name { color: var(--pink); }
#home-profil-avatar, #home-profil-avatar-bild { display: flex; }
#home-profil-avatar { position: relative; }
#home-profil-statuspunkt {
  position: absolute;
  inset: auto 2px 2px auto;
  z-index: 1;
  width: clamp(15px, 1.4vw, 19px);
  aspect-ratio: 1;
  border: 3px solid #21182b;
  border-radius: 50%;
  background: #f2ca63;
}
#home-profil-statuspunkt[data-status="online"] { background: #43d891; }
#home-profil-statuspunkt[data-status="problem"] { background: #fe707e; }
.home-profilbild .spieler-bild {
  --home-bildgroesse: clamp(68px, 6.5vw, 88px);
  width: var(--home-bildgroesse) !important;
  height: var(--home-bildgroesse) !important;
  font-size: clamp(24px, 2.6vw, 34px) !important;
}
.home-profil-inhalt { display: grid; justify-items: start; gap: 9px; min-width: 0; }
#home-profil-name { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.16; }
.home-marken:empty { display: none; }
.home-marken { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.home-status { color: var(--muted); font-size: 12px; }

.home-name {
  display: grid;
  gap: 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}
html[data-design=weltraum] .home :is(#join-name, #join-code) {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #62506d;
  background: #100d1ce8;
  font-size: 16px;
}
.home #join-code { letter-spacing: .12em; text-transform: uppercase; }
#home-name-beitritt { margin-top: 16px; }

.home-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.home-aktionen .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 17px;
  font-size: 15px;
  font-weight: 700;
}
.home-aktionen .btn::before { content: none; }
.home-aktionen .home-beitreten { background: #21182e; border-color: #6d557c; }
.home-aktionen .home-icon { width: 19px; height: 19px; }

.home-lokal-bereich {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}
.home-lokal-bereich:not(:has(> a:not([hidden]))) { display: none; }
.home-untere-reihe {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.6fr);
  gap: 16px;
}
.home[data-seite=freunde] .home-untere-reihe { grid-template-columns: minmax(0, 1fr); }
.home-werkzeuge { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.home-kachel {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--stroke);
  border-radius: 13px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.home-kachel:hover { background: var(--panel-2); border-color: #93699c; }
.home-kachel > .home-icon { width: 16px; color: #ed9ad4; }
.home-kachel-text { flex: 1; display: grid; gap: 3px; min-width: 0; }
.home-kachel-text strong { font-size: 15px; color: var(--text); }
.home-kachel-text > span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.home-beta {
  margin-left: 5px;
  padding: 2px 6px;
  background: #352346;
  border-radius: 5px;
  color: #f4c7ff;
  font-size: 11px;
}
.home-iconbox, .home-mini-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 39px;
  height: 39px;
  border-radius: 9px;
  background: #302039;
  color: #f5abe2;
  font-size: 21px;
}

.home .home-freunde, .home-panel {
  min-width: 0;
  margin: 0;
  padding: clamp(16px, 2.2vw, 26px);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--panel);
}
.home .home-freunde h2, .home-panel h2 {
  margin: 0;
  font-size: 20px;
  color: var(--text);
}
.home .home-gastkarte h2 { margin-top: 12px; }
.home .home-freunde p, .home-panel p { font-size: 14px; color: var(--muted); line-height: 1.55; }
.home .freunde-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.home .freunde-kopf p { margin: 4px 0 0; }
.home .freunde-kopf .btn { margin-left: auto; }
.home .start-freunde-liste { display: grid; gap: 0; }
.home .freund-karte {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  border-top: 1px solid var(--stroke);
  border-radius: 0;
  background: none;
}
.home .freund-info { min-width: 0; }
.home .freund-karte:has(.ist-online) .freund-info > span { color: var(--green); }

.home .home-support {
  display: block;
  width: 100%;
  margin: 0;
  padding: 16px 20px;
  background: #1b1425;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  text-align: left;
}
.home-support-link { position: relative; display: block; padding-right: 32px; color: var(--text); text-decoration: none; }
.home-support-link:hover h2 { color: #ffc1e8; }
.home-support h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 16px; }
.home-support h2 .home-icon { width: 18px; color: #f5a6d8; }
.home-support p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.home-support-link > .home-icon { position: absolute; right: 0; top: calc(50% - 10px); width: 18px; color: #f5a6d8; }
.home .unterstuetzen-knoepfe { justify-content: flex-start; margin-top: 12px; }

.home-seitentitel h1 { margin: 12px 0 5px; font-size: clamp(32px, 5vw, 50px); }
.home-seitentitel p { margin: 0; color: var(--muted); font-size: 16px; }
.home-zurueck {
  min-height: 40px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: #f5b0e1;
  font: 650 14px var(--font);
  cursor: pointer;
}
.home-raeume { display: grid; align-items: start; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 16px; }
.home-panel .field, .home-panel .toggle { margin: 16px 0; }
.home-panel .field span { font-size: 13px; color: var(--text); }
.home .raum-liste { max-height: 60vh; overflow: auto; margin-bottom: 18px; }
.home .raum { width: 100%; }

.home-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px max(20px, calc((100% - 1220px) / 2));
  border-top: 1px solid var(--stroke);
  color: var(--muted);
  font-size: 13px;
}
.home .legal-footer { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; border: 0; font-size: inherit; }
.home .legal-footer a, .home .legal-footer button { color: var(--muted); }
.home .legal-footer :is(a, button):hover { color: var(--text); }

.home .home-dialog { padding: 24px; width: min(500px, calc(100vw - 24px)); }
.home-dialog h2 { font-size: 23px; }
.home-dialog p { color: var(--muted); font-size: 14px; }
.home-dialog::backdrop { background: #080611cf; backdrop-filter: blur(5px); }
#home-erstellen-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; justify-content: normal; }
#home-erstellen-form > :is(h2, p, .field) { margin: 0; line-height: 1.5; }
#home-erstellen-form input { width: 100%; min-width: 0; }
#home-erstellen-form > button { width: 100%; min-height: 48px; margin-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
  #view-lobby.lobby-vom-start:not(.view-raus) { animation: lobby-vom-start-ein 180ms ease-out; }
  @keyframes lobby-vom-start-ein { from { opacity: .65; } to { opacity: 1; } }
}
.home-dialog > form[method=dialog] { margin-bottom: 4px; }
.home-dialog-schliessen {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 25px var(--font);
  cursor: pointer;
}
.home-dialog-schliessen:hover { background: var(--panel-2); color: var(--text); }
.home .rueckkehr { margin: 0; }

@media (max-width: 820px) {
  html[data-design=weltraum] .welt-navigation { flex-wrap: wrap; }
  html[data-design=weltraum] .welt-navigation nav { order: 3; flex-basis: 100%; }
  .home-spielen { min-height: 0; }
  .home-titel { max-width: 66%; }
  .home-spielen::before { inset-inline-start: 22%; }
  .home-raeume, .home-untere-reihe, .home-lokal-bereich { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 550px) {
  html[data-design=weltraum] .welt-navigation { padding: 8px 12px; gap: 4px 8px; }
  html[data-design=weltraum] .welt-navigation nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 4px; }
  html[data-design=weltraum] .welt-navigation nav :is(a, button) { padding: 8px 6px; font-size: 13px; }
  .home-content { width: calc(100% - 24px); padding-block: 14px 26px; gap: 12px; }
  .home-spielen { padding: 19px; border-radius: 16px; gap: 16px; }
  .home-spielen::before {
    inset: 0 0 auto 37%;
    height: 220px;
    background-position: 71% center;
    opacity: .5;
    mask-image: linear-gradient(to right, transparent, #000 62%), linear-gradient(#000 44%, transparent);
    mask-composite: intersect;
  }
  .home-titel { max-width: 100%; }
  .home-titel h1 { font-size: clamp(38px, 10.5vw, 58px); }
  .home-titel p { max-width: 31ch; }
  .home-aktionen { width: 100%; }
  .home-aktionen .btn { flex: 1 1 100%; }
  .home-werkzeuge { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .home-kachel { padding: 12px; }
  .home-footer { padding: 16px 12px 24px; }
}
