/* Tagnora Design-Tokens – zentrale Quelle fuer Farben, Schrift, Abstaende, Ecken, Materialien und Bewegung.
   Stil angelehnt an iOS (Human Interface Guidelines), aber eigene Farben/Icons, keine Apple-Assets.
   Dunkel ist die Grundbelegung; appearance.js setzt data-theme="light" fuer Hell (oder System = hell). */
:root {
  /* Farben (dunkel) */
  --bg: #000000;            /* gruppierter Hintergrund */
  --panel: #1c1c1e;         /* Karten, Leisten */
  --panel-2: #2c2c2e;       /* Zellen, Eingabefelder */
  --fill: rgba(118, 118, 128, .24); /* Tasten-/Feldfuellung */
  --line: #38383a;          /* Trennlinien */
  --text: #ffffff;
  --muted: #98989f;
  --accent: #67e8f9;        /* Tagnora-Cyan */
  --on-accent: #062a30;     /* Text auf Akzentflaeche */
  --accent-2: #a78bfa;
  --warn: #ffd60a;
  --danger: #ff6961;
  --ok: #30d158;
  --bar: rgba(28, 28, 30, .72); /* transluzente Leisten */
  --seg-on: #636366;        /* gewaehltes Segment */
  --select-bg: #2c2c2e;     /* Auswahlfeld (deckend) */
  --select-option-bg: #1c1c1e; /* aufgeklappte Optionen */
  --shadow: 0 8px 30px rgba(0, 0, 0, .45);

  /* Schrift: System-Font-Stack (SF Pro wird nicht eingebunden, das Geraet liefert ihn) */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --fs-large-title: 34px;
  --fs-title1: 28px;
  --fs-title2: 22px;
  --fs-title3: 20px;
  --fs-body: 17px;
  --fs-callout: 16px;
  --fs-footnote: 13px;
  --fs-caption: 12px;

  /* Ecken */
  --radius: 14px;           /* Karten (12-16) */
  --radius-btn: 10px;
  --radius-sheet: 20px;

  /* Abstaende: 4er-Raster */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;

  /* Materialien, Bedienung, Bewegung */
  --blur: saturate(180%) blur(20px);
  --touch: 44px;            /* Mindestgroesse von Tippzielen */
  --nav-h: 56px;            /* Hoehe der Tab Bar (ohne Safe Area) */
  --sidebar-w: 232px;
  --sidebar-w-min: 72px;
  --ease-spring: cubic-bezier(.32, 1.25, .5, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --dur: 260ms;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2f2f7;
  --panel: #ffffff;
  --panel-2: #f2f2f7;
  --fill: rgba(118, 118, 128, .12);
  --line: #d1d1d6;
  --text: #000000;
  --muted: #6c6c70;
  --accent: #0e7490;        /* Petrol: auf Weiss ausreichend Kontrast (AA) */
  --on-accent: #ffffff;
  --accent-2: #6d28d9;
  --warn: #a15c00;
  --danger: #d70015;
  --ok: #248a3d;
  --bar: rgba(249, 249, 249, .78);
  --seg-on: #ffffff;
  --select-bg: #ffffff;
  --select-option-bg: #ffffff;
  --shadow: 0 8px 30px rgba(15, 23, 42, .14);
  color-scheme: light;
}

/* PC (macOS-/iPadOS-Stil): etwas kompaktere Grundschrift wie in Desktop-Apps */
@media (min-width: 1200px) and (pointer: fine) {
  :root { --fs-body: 15px; --fs-callout: 14px; --fs-large-title: 28px; }
}

/* Reduzierte Bewegung: keine Federn, keine Uebergaenge */
@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}
