/* iPad und Mac (ab 760 px): breitere Seite, zwei Spalten, Sheets als Karte in der Mitte.
   Ab 1100 px (iPad quer, Mac): Navigation als Seitenleiste links. Eingebunden per <link media>, auf dem iPhone ohne Wirkung.
   „html …“ vor jeder Regel: diese Datei wird vor dem Haupt-CSS geladen und soll trotzdem gewinnen. */
@media (min-width: 760px) {
  html .screen { max-width: 1040px; padding: calc(var(--safe-t) + 44px) 32px calc(var(--safe-b) + 130px); }
  html h1 { font-size: 58px; }
  html .top { margin-bottom: 20px; }
  html .top .date { font-size: 17px; }

  /* Heute, Klausuren: Hauptspalte + Seitenspalte */
  html .cols { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 0 26px; align-items: start; }
  html .col-side > :first-child, html .col-side > :first-child > :first-child { margin-top: 0; }
  html .col-side .art, html .col-side [data-art]:empty { margin-top: 0; }
  html .col-side > * + * { margin-top: 16px; }
  html .col-side .fact { margin-top: 16px; }
  html .col-side .game { margin-top: 16px; }
  html .col-side > h2.sec:first-child { margin-top: 0; }
  html .hero h2 { font-size: 36px; }
  #app[data-view="klausuren"] .cols { display: block; }

  /* Einspaltige Ansichten bleiben angenehm schmal */
  #app[data-view="morgen"], #app[data-view="extras-sub"] { max-width: 720px; }
  #app[data-view="extras"] { max-width: 900px; }

  /* Woche: mehr Platz für das Raster */
  html .ev b { font-size: 15px; }
  html .ev span { font-size: 11.5px; }
  html .days .day b { font-size: 22px; }

  /* Extras-Übersicht: Kacheln in einer Reihe */
  html .tiles { grid-template-columns: repeat(4, 1fr); }
  html .stats { gap: 12px; }

  /* Sheets (Details, Bearbeiten, Frido, Timer) als Karte in der Mitte */
  html dialog.sheet { inset: 0; margin: auto; width: min(600px, calc(100% - 64px)); max-height: min(86dvh, 860px); border-radius: var(--r-xl); padding: 14px 26px 26px; background-size: 100% 100%, auto; }
  html dialog.sheet[open] { animation: pop .26s cubic-bezier(.2, .8, .2, 1); }
  html dialog.sheet .grab { display: none; }
  html dialog.frido-sheet { height: min(760px, 86dvh); }
  html .dock { width: min(580px, calc(100% - 64px)); bottom: calc(var(--safe-b) + 20px); }
  html .fr-bubble { width: 320px; }

  /* Spiele-Center */
  html body.spiel .screen { max-width: 860px; }
  html .sp-tiles { grid-template-columns: repeat(2, 1fr); }
  html .sp-tiles.small { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 980px) {
  #app[data-view="klausuren"] .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(8px); } }

/* Mac und iPad quer: Navigation als Seitenleiste */
@media (min-width: 1100px) {
  html .scroller { padding-left: 120px; }
  html .dock { left: 28px; top: 50%; bottom: auto; transform: translateY(-50%); width: auto; flex-direction: column; gap: 14px; }
  html .tabbar { flex: none; width: 88px; height: auto; grid-template-columns: none; grid-auto-rows: 70px; padding: 6px; border-radius: 30px; }
  html .tab { border-radius: 24px; font-size: 11px; }
  html .fr-bubble { right: auto; left: calc(100% + 16px); bottom: 0; border-radius: 20px 20px 20px 6px; transform-origin: 0 100%; }
  html .screen { padding-bottom: calc(var(--safe-b) + 60px); }
  html body.spiel .scroller { padding-left: 0; }
}
