/* =========================================================
   Shell aus dem Entwurf: Kopfzeile, Tab-Leiste, Ansichten,
   Suche und Chips. 1:1 aus design-draft/index.html.
   ========================================================= */

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1rem calc(var(--tab-h) + 5rem);
}
/* Schlanke Kopfzeile: Pokéball, Wortmarke, Konto. Kein Balken, der den
   Bildschirm frisst – der Himmel scheint durch. */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.25rem 0.4rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-title);
}
.brand img {
  width: 26px;
  height: 26px;
  animation: spin 14s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.brand__mark {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(23, 48, 63, 0.35);
}
.avatar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(23, 48, 63, 0.1);
}
.avatar__dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}

/* ---------- Tabs ---------- */
.tabs {
  position: fixed;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 0.25rem;
  padding: 0.4rem;
  width: min(560px, calc(100% - 1.5rem));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 40px rgba(23, 48, 63, 0.18);
}
.tab {
  position: relative;
  flex: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.5rem 0.25rem 0.45rem;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.66rem;
  color: var(--muted);
  transition: color 0.25s ease, background 0.25s ease;
}
.tab svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab[aria-selected="true"] {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent);
}
/* display: grid schlaegt sonst das hidden-Attribut - bei leerem Team
   stuende sichtbar eine "0" auf dem Team-Tab. */
.badge[hidden] {
  display: none;
}
.badge {
  position: absolute;
  top: 2px;
  right: 12px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.62rem;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ---------- Ansichten ---------- */
.view {
  display: none;
  animation: rise 0.35s ease both;
}
.view[data-active] {
  display: block;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.4rem 0 0.75rem;
}
h2 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
}
.hint {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Suche + Filter ---------- */
.search {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.search input {
  flex: 1;
  border: 1px solid rgba(23, 48, 63, 0.1);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font: inherit;
  font-size: 0.95rem;
  box-shadow: 0 4px 16px rgba(23, 48, 63, 0.07);
}
.search input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-filter {
  border: 1px solid rgba(23, 48, 63, 0.1);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 0 1.1rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}
.chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.75rem 0 0.25rem;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  box-shadow: 0 2px 10px rgba(23, 48, 63, 0.07);
  transition: transform 0.15s ease;
}
.chip:active { transform: scale(0.95); }
.chip[aria-pressed="true"] {
  color: #fff;
  background: var(--chip, var(--accent));
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .shell { padding-bottom: 3rem; }
  /* Am Desktop schwebt dieselbe Leiste oben in der Mitte – zwischen
     Logo (links) und Konto (rechts), im selben Band. */
  .tabs {
    top: 1rem;
    bottom: auto;
    width: auto;
    padding: 0.35rem;
  }
  .tab {
    flex: 0 0 auto;
    grid-auto-flow: column;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
  }
  .badge { top: -4px; right: 4px; }
  .topbar { padding: 1.1rem 0.25rem; gap: 2rem; }
}
