/* Navigation: Bereiche in der Seitenleiste, Reiter oben, weiche Wechsel (seit 22.10.2026 für alle). */

/* weicher Wechsel zwischen Seiten desselben Ursprungs – fühlt sich wie umschaltbare Flächen an */
@view-transition { navigation: auto; }
.ui-new main { view-transition-name: fsm-main; }
.ui-new .side, .ui-new .topbar { view-transition-name: none; }
::view-transition-old(fsm-main) { animation: 140ms ease-out both ui-fade-out; }
::view-transition-new(fsm-main) { animation: 200ms ease-out both ui-fade-in; }
@keyframes ui-fade-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes ui-fade-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(fsm-main), ::view-transition-new(fsm-main) { animation: none; } }

/* ---------- Seitenleiste: 6 Bereiche statt 18 Einträge ---------- */
.ui-new .side-groups { gap: 6px; }
.ui-new .side-groups a { padding: 13px 12px; font-size: 15px; white-space: nowrap; }
.ui-new .side-groups a span { overflow: hidden; text-overflow: ellipsis; }
.ui-new .side-groups a em { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); color: var(--dim); font: 700 11px/18px "Instrument Sans", sans-serif; text-align: center; }
.ui-new .side-groups a.on em { background: rgba(127, 194, 65, .18); color: var(--lime); }
/* Download hervorgehoben, damit man ihn sofort findet */
.ui-new .side-groups a.nav-download { color: var(--lime); border-color: rgba(127, 194, 65, .45); background: rgba(127, 194, 65, .08); }
.ui-new .side-groups a.nav-download svg { stroke: var(--lime); }
.ui-new .side-groups a.nav-download:hover, .ui-new .side-groups a.nav-download.on { background: rgba(127, 194, 65, .2); color: var(--ink); }

/* ---------- Reiter innerhalb eines Bereichs ---------- */
.sub-tabs { display: flex; gap: 6px; margin: 0 0 22px; padding: 5px; border-radius: 12px; background: rgba(7, 11, 8, .72); border: 1px solid var(--line); backdrop-filter: blur(6px); overflow-x: auto; scrollbar-width: none; position: sticky; top: 8px; z-index: 5; }
.sub-tabs::-webkit-scrollbar { display: none; }
.sub-tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 8px; color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: none; transition: background .15s, color .15s; }
.sub-tabs a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sub-tabs a:hover { color: var(--ink); background: var(--panel); }
.sub-tabs a.on { color: #0b100d; background: var(--lime); box-shadow: 0 0 18px var(--lime-glow); }
.sub-tabs a.on svg { stroke: #0b100d; }

/* ---------- Meine Höfe: Kästen in Reitern ---------- */
.k-tabs { margin: 0 0 18px; }
.k-tabs button { padding: 9px 16px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: italic 700 13px "Instrument Sans", sans-serif; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.k-tabs button:hover { color: var(--ink); }
.k-tabs button.on { background: linear-gradient(135deg, var(--lime), #4ea52f); color: #0d1a06; }
.k-tabs button small { margin-left: 4px; opacity: .7; font-style: normal; }
.ui-new [data-k][hidden] { display: none !important; }
.ui-new .k-farms { order: -1; }

/* ---------- Kopfleiste: auf dem Handy ein Menü-Knopf ---------- */
.tb-more { display: none; cursor: pointer; }
.tb-more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 1000px) {
  .ui-new .tb-more { display: inline-flex; }
  .ui-new .topbar-tools:not(.open) > :not(.tb-more):not(.search) { display: none; }
  .ui-new .topbar-tools.open .tb-more { border-color: var(--lime); color: var(--lime); }
}

/* ---------- Handy: Bereiche als Leiste unten, Beschriftung klein darunter ---------- */
@media (max-width: 1000px) {
  .ui-new .side-groups { display: flex; gap: 2px; }
  .ui-new .side-groups a { flex-direction: column; gap: 3px; padding: 7px 9px; font-size: 10.5px; }
  .ui-new .side-groups a span { display: block; white-space: nowrap; }
  .ui-new .side-groups a em { display: none; }
  .sub-tabs { top: 4px; }
}
@media (max-width: 560px) {
  .ui-new .side-groups a span { display: none; }
  .sub-tabs a { padding: 8px 12px; font-size: 13px; }
}
