/* News-App im Design von Study (iOS, Liquid Glass, Karten mit Farbverlauf), Akzentfarbe Rot.
   Schrift: SF Pro über die Systemschrift; SF Pro darf nicht als Webfont eingebettet werden. */
:root {
  color-scheme: light dark;
  --hg: #f2f2f7; --karte: #ffffff; --karte-2: #f2f2f7; --text: #000000;
  --leise: rgba(60, 60, 67, .6); --rand: rgba(60, 60, 67, .18); --fuellung: rgba(118, 118, 128, .12);
  --segment: #ffffff; --haupt: #ff3b30; --haupt-zart: rgba(255, 59, 48, .12); --orange: #c93400;
  --schatten-karte: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 28px -14px rgba(0, 0, 0, .18);
  --glas: rgba(255, 255, 255, .62); --glas-knopf: rgba(255, 255, 255, .55);
  --lg-kante: rgba(255, 255, 255, .7); --lg-kante2: rgba(255, 255, 255, .3); --lg-rand: rgba(0, 0, 0, .08);
  --lg-schatten: 0 10px 30px -10px rgba(0, 0, 0, .22); --aktiv-tab: rgba(0, 0, 0, .06);
  --leuchten: rgba(255, 59, 48, .16); --leuchten-2: rgba(255, 149, 0, .10);
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  /* Farbtöne der Karten (wie die Fächer in Study) */
  --t-hersteller: rgba(255, 59, 48, .16); --t-ki: rgba(191, 90, 242, .16); --t-konflikte: rgba(255, 149, 0, .16);
  --t-graz: rgba(52, 199, 89, .16); --t-welt: rgba(10, 132, 255, .14); --t-wirtschaft: rgba(48, 176, 199, .16);
  --t-maerkte: rgba(255, 204, 0, .16); --t-videos: rgba(255, 59, 48, .14); --t-x: rgba(142, 142, 147, .16);
}
@media (prefers-color-scheme: dark) {
  :root {
    --hg: #000000; --karte: #1c1c1e; --karte-2: #2c2c2e; --text: #ffffff;
    --leise: rgba(235, 235, 245, .6); --rand: rgba(84, 84, 88, .65); --fuellung: rgba(118, 118, 128, .24);
    --segment: #636366; --haupt: #ff453a; --haupt-zart: rgba(255, 69, 58, .2); --orange: #ff9f0a;
    --schatten-karte: 0 0 transparent;
    --glas: rgba(40, 40, 44, .62); --glas-knopf: rgba(255, 255, 255, .09);
    --lg-kante: rgba(255, 255, 255, .28); --lg-kante2: rgba(255, 255, 255, .1); --lg-rand: rgba(255, 255, 255, .08);
    --lg-schatten: 0 12px 32px -10px rgba(0, 0, 0, .6); --aktiv-tab: rgba(255, 255, 255, .1);
    --leuchten: rgba(255, 69, 58, .22); --leuchten-2: rgba(255, 159, 10, .10);
    --t-hersteller: rgba(255, 69, 58, .2); --t-ki: rgba(191, 90, 242, .2); --t-konflikte: rgba(255, 159, 10, .18);
    --t-graz: rgba(48, 209, 88, .16); --t-welt: rgba(10, 132, 255, .18); --t-wirtschaft: rgba(64, 200, 224, .16);
    --t-maerkte: rgba(255, 214, 10, .14); --t-videos: rgba(255, 69, 58, .18); --t-x: rgba(152, 152, 157, .16);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--hg); overflow-x: clip; }
body { margin: 0; background: var(--hg); color: var(--text); font: 17px/1.4 var(--sf); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; overflow-x: clip; padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }
body, button, input, select, textarea { font-family: var(--sf); }
/* Farbiges Leuchten oben, wie in Study */
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 70% at 85% 0%, var(--leuchten), transparent 70%),
              radial-gradient(50% 60% at 5% 0%, var(--leuchten-2), transparent 70%); }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
a { color: var(--haupt); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
.klein { font-size: 13px; color: var(--leise); text-transform: uppercase; font-weight: 600; letter-spacing: .02em; }
.leise { color: var(--leise); font-size: 15px; }
.fehler { color: var(--haupt); font-size: 15px; }
.hinweis { color: var(--leise); font-size: 13px; padding: 2px 4px 14px; }

/* Leiste oben: Glas-Knöpfe, kleiner Titel in der Mitte */
.leiste { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 8px; padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; }
.leiste::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--hg) 40%, transparent); }
.leiste strong { font-size: 17px; font-weight: 600; }
.leiste > :last-child { justify-self: end; }
.pille { justify-self: start; font-size: 13px; color: var(--leise); padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  background: var(--glas-knopf); box-shadow: inset 0 0 0 .5px var(--lg-rand); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.rund { width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; color: var(--haupt);
  background: var(--glas-knopf); box-shadow: inset 0 0 0 .5px var(--lg-rand), inset 1px 1.5px 0 -.5px var(--lg-kante);
  backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); }
.rund svg { width: 20px; height: 20px; }
.rund.dreht svg { animation: drehen 1s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }

main { max-width: 680px; margin: 0 auto; padding: 4px 16px calc(env(safe-area-inset-bottom) + 110px); }
.held { padding: 6px 4px 18px; }
.held h1 { font-size: 34px; font-weight: 700; line-height: 1.12; letter-spacing: -.025em; }
.held .klein { margin-bottom: 6px; }
.held p { margin: 6px 0 0; color: var(--leise); font-size: 16px; }
.held p b { color: var(--haupt); font-weight: 600; }

/* Karten mit Farbverlauf (wie Study) */
.karte { background: linear-gradient(135deg, var(--ton, transparent), var(--karte) 65%), var(--karte);
  border-radius: 16px; padding: 14px 0 6px; margin: 0 0 16px; box-shadow: var(--schatten-karte); overflow: hidden; }
.karte-kopf { display: flex; justify-content: space-between; align-items: baseline; padding: 0 16px 6px; }
.karte-kopf h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--leise); }
.text-knopf { color: var(--haupt); font-size: 15px; font-weight: 500; }
.k-hersteller { --ton: var(--t-hersteller); } .k-ki { --ton: var(--t-ki); } .k-konflikte { --ton: var(--t-konflikte); }
.k-graz { --ton: var(--t-graz); } .k-welt { --ton: var(--t-welt); } .k-wirtschaft { --ton: var(--t-wirtschaft); }
.k-maerkte { --ton: var(--t-maerkte); } .k-videos { --ton: var(--t-videos); } .k-x { --ton: var(--t-x); }
.liste { overflow: hidden; }
.eintrag { display: block; width: 100%; text-align: left; padding: 11px 16px; position: relative; color: var(--text); }
.eintrag + .eintrag::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--rand); }
.eintrag:active { background: var(--fuellung); }
.eintrag .t { font-weight: 600; font-size: 16px; line-height: 1.3; }
.eintrag .a { color: var(--leise); font-size: 15px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eintrag .m { color: var(--leise); font-size: 13px; margin-top: 4px; }
.eintrag.gelesen .t { color: var(--leise); font-weight: 500; }
.punkt { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--haupt); margin-right: 6px; vertical-align: 1px;
  box-shadow: 0 0 8px var(--haupt); }
.marke { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--fuellung); margin-right: 6px; }
.marke.warn { background: var(--orange); color: #000; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; }
.chips.frei { margin: 0 -16px; padding: 0 16px 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--fuellung); font-size: 15px; font-weight: 500; }
.chip.aktiv { background: var(--haupt); color: #fff; box-shadow: 0 6px 18px -8px var(--haupt); }
.leer { color: var(--leise); padding: 8px 16px 12px; font-size: 15px; }
.lade { color: var(--leise); text-align: center; padding: 26px; font-size: 15px; }

/* Videos */
.video { display: flex; gap: 12px; align-items: flex-start; }
.video img { width: 128px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; flex: none; background: var(--fuellung); }
.video .t { -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.player { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 14px; background: #000; }
.segment { display: flex; background: var(--fuellung); border-radius: 10px; padding: 2px; margin: 14px 0; }
.segment button { flex: 1; padding: 7px 0; border-radius: 8px; font-size: 14px; font-weight: 500; }
.segment button.aktiv { background: var(--segment); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); font-weight: 600; }

/* Texte (Märkte, Artikel, Zusammenfassungen) */
.text { padding: 2px 16px 10px; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.text h2, .text h3, .text h4 { font-size: 18px; margin: 16px 0 6px; }
.text ul, .text ol { padding-left: 22px; margin: 6px 0; }
.text li { margin: 3px 0; }
.text p { margin: 8px 0; }
.text blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--rand); color: var(--leise); }
.text table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 6px 0; font-variant-numeric: tabular-nums; }
.text td, .text th { padding: 7px 4px; border-bottom: .5px solid var(--rand); text-align: left; vertical-align: top; }
.text th { color: var(--leise); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.k-maerkte .text > h2:first-child, .k-maerkte .text > h3:first-child { display: none; }
.vor { white-space: pre-wrap; font-size: 15px; line-height: 1.55; }

/* Tweets */
.tweet .tx { white-space: pre-wrap; font-size: 15px; margin-top: 4px; overflow-wrap: anywhere; }
.tweet .zitat { border-left: 3px solid var(--rand); padding-left: 10px; margin-top: 6px; color: var(--leise); font-size: 14px; }

/* Formulare und Knöpfe */
.feld { display: flex; gap: 8px; padding: 0 0 14px; }
.karte .feld { padding: 4px 16px 12px; }
input[type=search], input[type=text], input[type=password], select {
  font: inherit; flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px; border: 0; background: var(--fuellung); color: var(--text); outline: none; }
input:focus { box-shadow: 0 0 0 2px var(--haupt-zart); }
.knopf { display: inline-flex; align-items: center; justify-content: center; background: var(--haupt); color: #fff; border-radius: 999px;
  padding: 11px 20px; font-weight: 600; box-shadow: 0 8px 22px -10px var(--haupt); }
.knopf.zweit { background: var(--fuellung); color: var(--haupt); box-shadow: none; }
.zeile { display: flex; justify-content: space-between; align-items: center; padding: 11px 16px; gap: 10px; position: relative; width: 100%; text-align: left; }
.zeile + .zeile::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--rand); }
.zeile .rechts { color: var(--leise); font-size: 15px; }
.zeile .entf { color: var(--haupt); font-size: 15px; }
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fuellung);
  position: relative; transition: background .2s; flex: none; margin: 0; }
input[type=checkbox]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15); transition: transform .2s; }
input[type=checkbox]:checked { background: #34c759; }
input[type=checkbox]:checked::after { transform: translateX(20px); }

/* Schwebende Tab-Leiste aus Glas (wie Study) */
.tabs { position: fixed; z-index: 6; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 10px);
  width: min(calc(100% - 24px), 440px); height: 64px; padding: 6px; border-radius: 999px; display: flex; justify-content: space-between;
  background: var(--glas); backdrop-filter: blur(24px) saturate(2) contrast(.94); -webkit-backdrop-filter: blur(24px) saturate(2) contrast(.94);
  box-shadow: inset 0 0 0 .5px var(--lg-rand), inset 1px 1.5px 0 -.5px var(--lg-kante), inset -1px -1px 0 -.5px var(--lg-kante2), var(--lg-schatten); }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; font-weight: 600; color: var(--text); border-radius: 999px; transition: background .2s, color .2s; }
.tabs svg { width: 24px; height: 24px; }
.tabs button.aktiv { color: var(--haupt); background: var(--aktiv-tab); }

/* Blatt (Artikel, Video, Quelle) */
.blatt { position: fixed; inset: 0; z-index: 10; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-end; }
.blatt-innen { background: var(--hg); width: 100%; max-width: 680px; margin: 0 auto; height: calc(100% - env(safe-area-inset-top) - 10px);
  border-radius: 16px 16px 0 0; display: flex; flex-direction: column; animation: hoch .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes hoch { from { transform: translateY(60px); opacity: .5; } }
.blatt-kopf { display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; padding: 12px 16px 8px; font-weight: 600; text-align: center; }
.blatt-kopf span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.blatt-kopf .text-knopf { justify-self: start; font-weight: 600; }
.blatt-inhalt { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 20px calc(env(safe-area-inset-bottom) + 30px); }
.blatt-inhalt h1 { font-size: 26px; line-height: 1.2; margin: 8px 0 8px; }
.blatt-inhalt .text { padding: 0; font-size: 17px; }
.blatt-inhalt .karte { padding: 4px 0; }
.blatt-inhalt .karte .text { padding: 10px 16px; font-size: 16px; }
.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }

/* Anmeldung (wie Study) */
.anmeldung { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.anmeldung form { width: 100%; max-width: 360px; text-align: center; }
.anmeldung .logo { width: 76px; height: 76px; border-radius: 18px; display: block; margin: 0 auto 14px; }
.anmeldung h1 { font-size: 30px; font-weight: 700; }
.anmeldung .leise { margin: 4px 0 22px; }
.anmeldung .karte { padding: 16px; text-align: left; }
.anmeldung label { display: block; font-size: 13px; color: var(--leise); margin: 0 0 6px 2px; }
.anmeldung input { width: 100%; margin-bottom: 14px; }
.anmeldung .knopf { width: 100%; }
.anmeldung .fehler { margin: 12px 0 0; text-align: center; }
