/* Handy-Schicht (05.10.2026).

   WARUM. Auf dem Handy stand das Dashboard nur gestaucht da: sechs Knoepfe
   in der Kopfzeile, auf jeder Seite zuerst ein Werbeblock (Kicker, Slogan,
   Erklaertext, Illustration, Kacheln), zwei schwebende Elemente ueber dem
   Inhalt, Reiter zum Seitwaertsschieben, Fusstexte. Jonas: "Das Tool soll
   schnell, einfach und sofort verstaendlich sein."

   REGEL. Ein Bildschirm, eine Frage. Oben nur der Titel, dann sofort der
   Inhalt. Was es doppelt gibt, faellt auf dem Handy weg: Die Kugel und die
   Idee-Karte machen dasselbe wie "Festhalten" in der Leiste, der
   Menue-Knopf dasselbe wie "Mehr". Leitfaden, Suche und Animationen liegen
   im Blatt "Mehr" (huelle.js).

   Gilt nur unter 760 px; der Desktop bleibt unberuehrt. Wird als letzte
   Stildatei geladen, deshalb reicht meist die gleiche Spezifitaet. */
.of2-blatt-extra, .of2-am-computer { display: none; }
@media (max-width: 760px) {

  /* ---------------------------------------------------------- Kopfzeile */
  .topbar { gap: 10px; padding-inline: 16px; }
  .topbar .breadcrumb { min-width: 0; }
  .topbar .breadcrumb strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 19px; }
  .topbar .mobile-menu, .topbar .workspace-motion, .topbar .workspace-search-open,
  .topbar .top-actions > a.button { display: none !important; }

  /* ---------------------------------------------- Seitenkopf und Buehne */
  /* Der Titel steht schon oben; Slogan und Erklaertext kosten den ersten Bildschirm. */
  .view > .page-head { margin: 0; padding: 0; min-height: 0; }
  .view > .page-head .eyebrow, .view > .page-head h1, .view > .page-head > div > p,
  .view > .page-head > p { display: none; }
  /* Die Hauptaktion der Seite als runder Knopf ueber der Leiste. */
  .view > .page-head .head-actions .button.primary:not([data-ge-ablage]) {
    position: fixed; z-index: 58; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    width: 54px; height: 54px; padding: 0; border-radius: 18px; font-size: 0; gap: 0; justify-content: center;
    box-shadow: 0 10px 24px rgb(0 0 0 / .18); }
  .view > .page-head .head-actions .button.primary:not([data-ge-ablage]) svg { width: 22px; height: 22px; margin: 0; }
  .view > .page-head .head-actions .button.primary:not([data-ge-ablage])::before {
    content: "+"; font-size: 28px; line-height: 1; font-weight: 400; }
  .view > .page-head .head-actions .button.primary:not([data-ge-ablage]):has(svg)::before { content: none; }
  .view > .page-head .head-actions:has(.button.primary:not([data-ge-ablage])) > :not(.button.primary) { display: none; }

  .bu { display: block; min-height: 0; padding: 14px 16px; margin-bottom: 14px; border-radius: 18px; }
  .bu__modell, .bu__kicker, .bu__satz { display: none !important; }
  .bu h2 { margin: 0 0 10px; font-size: 17px; line-height: 1.3; letter-spacing: -.2px; }
  .bu__text > :has(> .bu-kachel) { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    gap: 6px; margin: 0; }
  .bu .bu-kachel { min-height: 0; padding: 8px 10px; border-radius: 12px; }
  .bu .bu-kachel .bu-zahl { font-size: 18px; line-height: 1.2; }
  .bu .bu-kachel span { font-size: 11px; line-height: 1.25; }

  .page-footer { display: none; }

  /* Erklaersaetze der Bausteine, die nur beschreiben, was man gerade sieht. */
  .ws__kicker, .ws__satz, .na__kopf > div > p, .na__satz, .na-spalte__satz, .board__satz, .sammel__satz { display: none; }
  .ws__kopf h2 { font-size: 20px; line-height: 1.25; }
  .ws__fluss { display: none; }
  .rn-satz { display: none; }
  /* Ein einzelner Unterreiter ("Entwuerfe 2") ist keine Auswahl. */
  .content-section-tabs:has(> :only-child) { display: none; }
  .rn-kopf h2, .cb-kopf h2 { font-size: 19px; line-height: 1.25; margin-bottom: 10px; }

  /* -------------------------------------------------------------- Reiter */
  /* Bis drei Reiter: gleich breit, alle sichtbar, kein Seitwaertsschieben. */
  .of2-reiter { overflow: visible; margin: 0 0 14px; }
  .of2-reiter button { flex: 1 1 0; min-width: 0; justify-content: center; padding: 9px 6px; font-size: 13px; }
  .of2-reiter button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  /* Kurzname, wo der volle nicht in ein Drittel passt (REITER in huelle.js). */
  .of2-reiter button span[data-kurz] { font-size: 0; }
  .of2-reiter button span[data-kurz]::before { content: attr(data-kurz); font-size: 13px; }
  .of2-reiter--viele button span[data-kurz] { font-size: inherit; }
  .of2-reiter--viele button span[data-kurz]::before { content: none; }
  .of2-reiter .of2-sym { display: none; }
  /* Mehr als drei: eine Zeile mit dem aktiven Bereich, Tippen klappt die Liste auf (huelle.js). */
  .of2-reiter--viele { flex-direction: column; gap: 2px; }
  .of2-reiter--viele .of2-reiter__linie { display: none; }
  .of2-reiter--viele button { flex: none; justify-content: flex-start; padding: 11px 14px; font-size: 14.5px; border-radius: 10px; }
  .of2-reiter--viele button[aria-selected=true] { background: var(--panel2, var(--soft)); font-weight: 650; }
  .of2-reiter--viele button[aria-selected=true]::after { content: ""; margin-left: auto; width: 8px; height: 8px;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg);
    transition: transform .2s; }
  .of2-reiter--viele.of2-reiter--offen button[aria-selected=true]::after { transform: translateY(2px) rotate(-135deg); }
  .of2-reiter--viele:not(.of2-reiter--offen) button:not([aria-selected=true]) { display: none; }
  .of2-reiter--viele button[aria-selected=true] { order: -1; }

  /* ------------------------------------------------- Schwebende Elemente */
  /* Kugel = "Festhalten" in der Leiste. Die Antwortkarte der Kugel bleibt. */
  .ao-knopf { display: none !important; }
  .ao { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); align-items: stretch; }
  .ao-karte { width: auto; }
  /* Leitfaden nur auf Abruf (Mehr -> Einrichtung), dann als Blatt von unten. */
  .lf.lf--klein, .lf-launcher { display: none !important; }
  .lf { left: 0; right: 0; bottom: 0; width: auto; z-index: 75; max-height: 82vh; border-radius: 22px 22px 0 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }

  /* ---------------------------------------------------- Blatt "Mehr" */
  /* Das ganze Blatt scrollt, nicht nur die Liste: sonst nehmen Profil und Rechtliches die halbe Hoehe. */
  html body .sidebar .nav-scroll { flex: none; overflow: visible; }
  .sidebar { overflow-y: auto; overscroll-behavior: contain; }
  .sidebar { inset: auto 0 0 0; width: auto; max-height: 84vh; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border: 0; border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; transform: translateY(105%);
    box-shadow: 0 -12px 40px rgb(0 0 0 / .18); }
  body.nav-open .sidebar { transform: none; }
  .sidebar::before { content: ""; flex: none; display: block; width: 42px; height: 5px; margin: 0 auto 12px; border-radius: 3px;
    background: color-mix(in srgb, var(--muted) 45%, transparent); }
  .sidebar .brand { display: none; }
  .sidebar .theme-switch { order: 3; margin: 10px 0 0; }
  .sidebar .side-foot { order: 4; }
  .sidebar .rechtsfuss { order: 5; }
  html body .sidebar .nav-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  html body .sidebar .nav-group > p, html body .sidebar .nav-group > summary { grid-column: 1 / -1; margin: 0; padding: 0 2px; }
  html body .sidebar .nav-link { position: relative; flex-direction: column; justify-content: center; gap: 6px; min-height: 76px;
    margin: 0; padding: 10px 4px; border-radius: 16px; text-align: center; font-size: 12.5px; line-height: 1.2;
    background: color-mix(in srgb, var(--muted) 9%, transparent); }
  html body .sidebar .nav-link.active { background: color-mix(in srgb, var(--accent) 16%, transparent); }
  html body .sidebar .nav-link svg { width: 22px; height: 22px; margin: 0; }
  html body .sidebar .nav-link .count { position: absolute; top: 6px; right: 8px; margin: 0; }
  .of2-blatt-extra { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
  .of2-blatt-extra button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 64px;
    padding: 8px 4px; border: 1px solid var(--line); border-radius: 16px; background: none; color: var(--text); font: inherit;
    font-size: 12.5px; line-height: 1.2; cursor: pointer; }
  .of2-blatt-extra .of2-sym { width: 20px; height: 20px; }
  .of2-blatt-extra small { color: var(--muted); font-size: 11px; }

  /* Kurze Auswahl (Standard, 05.10.2026): nur was man unterwegs braucht, ein
     Raster ohne Gruppen. Heute, Content und Postfach stehen schon in der
     Leiste. "Alle Bereiche" zeigt den Rest gruppiert (huelle.js, .of2-alle).
     Hell/Dunkel und "Leiste anpassen" gehoeren in die Einstellungen. */
  .sidebar .theme-switch, .sidebar .la-stift { display: none; }
  .sidebar:not(.of2-alle) .nav-scroll { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
    align-content: start; margin-bottom: 14px; }
  html body .sidebar:not(.of2-alle) .nav-group, .sidebar:not(.of2-alle) .of2-blatt-extra { display: contents; }
  html body .sidebar:not(.of2-alle) .nav-group > p, html body .sidebar:not(.of2-alle) .nav-more { display: none; }
  html body .sidebar:not(.of2-alle) .nav-link { display: none; }
  html body .sidebar:not(.of2-alle) :is(.nav-link[href="#chat"], .nav-link[href="#tasks"], .nav-link[href="#calendar"],
    .nav-link[href="#community"]),
  html body .sidebar:not(.of2-alle) .nav-link.active:not([href="#home"]):not([href="#content"]):not([href="#mail"]) { display: flex; }
  .sidebar:not(.of2-alle) .of2-blatt-extra button { order: 1; }
  .sidebar:not(.of2-alle) .of2-blatt-extra [data-of2-extra=alle] { order: 2; }
  .of2-blatt-extra [data-of2-extra=alle] { border-style: dashed; }
  .sidebar:not(.of2-alle) .of2-blatt-extra [data-of2-extra=alle] { grid-column: 1 / -1; flex-direction: row; min-height: 48px; }

  .of2-am-computer { display: block; margin: 22px 4px 8px; color: var(--muted); font-size: 12.5px; text-align: center; }
  /* Ganze Seite nur am Computer (huelle.js, GANZ_AM_COMPUTER). */
  .of2-ganz-pc { display: grid; justify-items: center; gap: 8px; margin: 24px 0; padding: 28px 22px; text-align: center;
    border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
  .of2-ganz-pc .of2-sym { width: 28px; height: 28px; color: var(--accent); }
  .of2-ganz-pc h2 { margin: 4px 0 0; font-size: 17px; line-height: 1.3; }
  .of2-ganz-pc p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
  .of2-ganz-pc a { margin-top: 10px; padding: 11px 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent, #fff);
    font-weight: 600; font-size: 14px; text-decoration: none; }

  /* ------------------------------------------------------- Seite Heute */
  .heute__idee { display: none; }
  /* 06.10.2026: Radar-Saetze unterwegs unverstaendlich -- oben steht der Tageshinweis. */
  .heute__tipp:not([hidden]) ~ .heute__lage { display: none; }
  /* Leere Zeilen (dran, idee) ans Ende, sonst doppelter Abstand vor den Knoepfen. */
  html[data-route=home] .heute { grid-template-areas: "kopf" "zahlen" "verlauf" "schnell" "dran"; }
  .heute__kopf h1 { font-size: 25px; line-height: 1.15; letter-spacing: -.5px; }
  .heute__kicker { margin-bottom: 4px; }
  .heute__zahlen { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .heute__zahl::before, .heute__zahl::after { display: none; }
  .heute__zahl { min-height: 0; padding: 9px 8px; border-radius: 12px; }
  .heute__zahl b { font-size: 18px; line-height: 1.2; }
  .heute__zahl span { font-size: 10.5px; line-height: 1.25; }

  /* Plattform-Anteile (Jonas' Screenshot 05.10.): Kurve lag ueber den Namen, "44 %" brach um. */
  .lifetime-hero { min-height: 0; padding: 18px; }
  .lifetime-hero > svg { position: relative; inset: auto; bottom: auto; display: block; height: 64px; margin: 6px -18px 14px; width: calc(100% + 36px); }
  html body .lifetime-composition { position: static; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
  html body .lifetime-composition > span { grid-template-columns: 20px minmax(0, 1fr) auto; font-size: 13px; }
  html body .lifetime-composition em { white-space: nowrap; }

  /* --------------------------------------------------------- Postfach */
  /* Konten und Ordner als eine Zeile zum Wischen statt als Wolke. */
  .p2__konten, .p2__ordner { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none;
    margin-inline: -4px; padding: 2px 4px 6px; }
  .p2__konten::-webkit-scrollbar, .p2__ordner::-webkit-scrollbar { display: none; }
  .p2__konten > *, .p2__ordner > * { flex: none; }
  .p2__konten .p2-zeile, .p2__ordner .p2-zeile { white-space: nowrap; }

  /* ----------------------------------------------------- Automatiken */
  /* Schalter oben rechts, die Wochenzahl unter den Text: sonst blieb fuer den Text eine Wortbreite. */
  .au2-zeile { grid-template-columns: 36px minmax(0, 1fr) auto; align-items: start; }
  .au2-text { grid-column: 2; grid-row: 1; }
  .au2-rechts { grid-column: 3; grid-row: 1; }
  .au2-lief { grid-column: 2 / -1; grid-row: 2; justify-items: start; text-align: left; display: flex; gap: 6px; align-items: baseline; }
  .au2-takt { white-space: nowrap; }
  /* Ohne Schalter steht rechts nur ein Hinweis ("stuendlich") -- der geht mit unter den Text. */
  .au2-zeile:not(:has(.au2-schalter)) .au2-text { grid-column: 2 / -1; }
  .au2-zeile:not(:has(.au2-schalter)) .au2-rechts { grid-column: 2 / -1; grid-row: 3; justify-content: flex-start; }

  /* ------------------------------------------------------- Kalender */
  /* "+ Neu" steht im Kalender selbst; der runde Knopf waere doppelt. */
  html[data-route=calendar] .view > .page-head .head-actions { display: none; }

  /* --------------------------------------------------------- Assistent */
  /* "Wo soll ich nachsehen?": sieben Schalter als kompakte Kacheln, an = eingefaerbt. */
  .a3d-wo__raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .a3d-kachel { min-height: 0; padding: 10px 12px; gap: 10px; }
  .a3d-kachel__text > :not(b) { display: none; }
  .a3d-kachel__schalter { display: none; }
}
