/* =========================================================================
   Wiederverwendbare Bausteine (entsprechen den Figma-Komponenten)
   ========================================================================= */

/* ---------- Glas: halbtransparent, Weichzeichner, helle Lichtkante oben links */
.glas {
  position: relative;
  background: rgba(255, 255, 255, var(--glas-deckkraft, 0.6));
  -webkit-backdrop-filter: blur(var(--glas-blur)) saturate(140%);
  backdrop-filter: blur(var(--glas-blur)) saturate(140%);
  box-shadow: var(--glas-schatten, var(--schatten-glas));
  border-radius: var(--radius, 20px);
  isolation: isolate;
}
.glas::before {                       /* 1px Verlaufskante wie in Figma */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--glas-kante);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glas { background: rgba(255, 255, 255, 0.92); }
}
@media (prefers-reduced-transparency: reduce) {
  .glas { background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Symbole */
.symbol { width: var(--g, 18px); height: var(--g, 18px); stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Tage-Karussell (Mitte groß, nach außen kleiner und blasser) */
.karussell {
  position: relative; display: flex; justify-content: center; align-items: center; gap: 6px;
  min-height: 65px; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.karussell__tag {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px var(--px, 10px); border-radius: 20px; color: #fff;
  transition: opacity var(--dauer) var(--weich), transform var(--dauer) var(--weich), background-color var(--dauer) var(--weich), padding var(--dauer) var(--weich);
}
.karussell__tag:hover:not(.ist-gewaehlt) { opacity: 1 !important; }
.karussell__kurz { font-weight: 500; font-size: var(--fs-kurz, 12px); line-height: 1.2; transition: font-size var(--dauer) var(--weich); }
.karussell__zahl { font-weight: 700; font-size: var(--fs-zahl, 20px); line-height: 1.2; transition: font-size var(--dauer) var(--weich); }
.karussell__tag[data-abstand="1"] { --px: 10px; --fs-kurz: 12px; --fs-zahl: 20px; opacity: .85; }
.karussell__tag[data-abstand="2"] { --px: 8px;  --fs-kurz: 10px; --fs-zahl: 17px; opacity: .55; }
.karussell__tag[data-abstand="3"] { --px: 6px;  --fs-kurz: 9px;  --fs-zahl: 15px; opacity: .22; gap: 0; }
.karussell__tag.ist-gewaehlt {
  --px: 18px; --fs-kurz: 13px; --fs-zahl: 22px;
  padding-top: 10px; padding-bottom: 10px;
  background: #fff; color: var(--ink); opacity: 1;
  box-shadow: 0 4px 14px rgba(13, 38, 31, 0.14);
}
.karussell__tag.ist-gewaehlt .karussell__kurz { color: var(--mut); }
.karussell__tag.ist-heute:not(.ist-gewaehlt) .karussell__zahl { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- Jetzt (groß, auf dem Verlauf) */
.jetzt { display: flex; flex-direction: column; align-items: center; text-align: center; color: #fff; }
.jetzt__marke { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }
.jetzt__punkt { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.jetzt__punkt.pulsiert { animation: puls 2.4s var(--weich) infinite; }
@keyframes puls { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } 60% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } }
.jetzt__titel { margin-top: 8px; font-weight: 700; font-size: 40px; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; max-width: 100%; }
.jetzt__titel--lang { font-size: 32px; }
.jetzt__titel--sehrlang { font-size: 26px; line-height: 1.25; }
.jetzt__titel-knopf { font: inherit; color: inherit; text-align: inherit; letter-spacing: inherit; border-radius: 12px; }
.jetzt__titel-knopf:hover { opacity: .92; }
.jetzt__fortschritt { margin-top: 8px; width: 240px; max-width: 70%; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.jetzt__fortschritt > i { display: block; height: 100%; width: var(--p, 0%); border-radius: 3px; background: #fff; transition: width 1s linear; }
.jetzt__detail { font-weight: 500; font-size: 15px; color: rgba(255,255,255,.9); }

/* ---------- Kacheln (Raum / Ende / Danach) */
.kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.kachel { --glas-deckkraft: .6; --radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px 6px; text-align: center; }
.kachel__wert { font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.kachel__wert--klein { font-size: 17px; }
.kachel__name { font-weight: 500; font-size: 13px; line-height: 1.25; color: var(--mut); }

/* ---------- Abschnittskopf „Heute“ */
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-bottom: 4px; }
.abschnitt-kopf__titel { font-weight: 700; font-size: 22px; line-height: 1.2; }
.abschnitt-kopf__info { font-weight: 600; font-size: 13px; color: var(--mut); text-align: right; }

/* ---------- Zeitachse: Stunde, Vorbei, Pause, Frei */
.zeitachse { display: flex; flex-direction: column; gap: 14px; }
.vorbei {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.5);
  color: var(--mut); font-size: 12px; transition: background-color .2s;
}
.vorbei:hover { background: rgba(255,255,255,.8); }
.vorbei__zeit { font-weight: 600; white-space: nowrap; }
.vorbei__titel { font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vorbei__punkt { width: 6px; height: 6px; border-radius: 50%; background: var(--fach); }

.stunde { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; min-height: 78px; width: 100%; text-align: left; }
.stunde__zeit { display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0; }
.stunde__beginn { font-weight: 700; font-size: 14px; line-height: 1.2; color: var(--ink); }
.stunde__ende { font-weight: 500; font-size: 13px; line-height: 1.2; color: var(--mut); }
.stunde__karte {
  position: relative; display: flex; gap: 10px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(color-mix(in srgb, var(--fach) 13%, transparent), color-mix(in srgb, var(--fach) 13%, transparent)), rgba(255,255,255,.85);
  box-shadow: inset 0 0 0 1px #fff, var(--schatten-karte);
  transition: transform .2s var(--weich), box-shadow .2s var(--weich);
}
.stunde:hover .stunde__karte { transform: translateY(-1px); box-shadow: inset 0 0 0 1px #fff, 0 8px 22px rgba(13,38,38,.09); }
.stunde.ist-jetzt .stunde__karte { box-shadow: inset 0 0 0 1.5px var(--fach), var(--schatten-karte); }
.stunde__balken { width: 4px; border-radius: 2px; background: var(--fach); flex-shrink: 0; }
.stunde__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stunde__titel { font-weight: 600; font-size: 15px; line-height: 1.25; color: var(--ink); hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.stunde__info { font-weight: 500; font-size: 12px; line-height: 1.3; color: var(--mut); }
.stunde__hinweis { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-weight: 600; font-size: 11px; color: #8A4B12; background: rgba(208, 138, 58, .18); }

.luecke { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; padding: 4px 0; }
.luecke__text { padding: 4px 12px; font-weight: 600; font-size: 12px; color: var(--mut); }
.luecke--frei .luecke__text { padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--gestrichelt); }

.leer-hinweis { padding: 22px 18px; border-radius: 20px; background: rgba(255,255,255,.6); text-align: center; }
.leer-hinweis__titel { font-weight: 700; font-size: 18px; }
.leer-hinweis__text { margin-top: 4px; font-weight: 500; font-size: 14px; color: var(--mut); text-wrap: balance; }

/* ---------- Woche (Handy: Liste nach Tagen) */
.woche-tag { display: flex; flex-direction: column; gap: 10px; }
.woche-tag + .woche-tag { margin-top: 10px; }
.woche-tag__kopf { font-weight: 600; font-size: 13px; color: var(--mut); }
.woche-tag__kopf b { color: var(--ink); font-weight: 700; }
.woche-tag__leer { font-weight: 500; font-size: 13px; color: var(--mut); padding: 2px 0 2px 54px; }

/* ---------- Steuerung unten: Tag | Woche + Kurs */
.umschalter { --glas-deckkraft: .85; --radius: 999px; --glas-schatten: var(--schatten-leiste); display: inline-flex; gap: 2px; padding: 5px; }
.umschalter__knopf { padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--mut); transition: background-color var(--dauer) var(--weich), color var(--dauer) var(--weich); }
.umschalter__knopf:hover:not([aria-pressed="true"]) { color: var(--ink); }
.umschalter__knopf[aria-pressed="true"] { background: var(--gruen); color: #fff; }
.kursknopf { --glas-deckkraft: .85; --radius: 999px; --glas-schatten: var(--schatten-leiste); display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px 12px 18px; font-weight: 600; font-size: 15px; color: var(--ink); transition: transform .2s var(--weich); }
.kursknopf:hover { transform: translateY(-1px); }
.kursknopf .symbol { stroke-width: 2.2; }

/* ---------- Hauptknopf / Nebenknopf */
.hauptknopf {
  display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%;
  padding: 16px 24px; border-radius: 999px; background: var(--gruen); color: #fff;
  font-weight: 600; font-size: 16px; box-shadow: var(--schatten-knopf);
  transition: transform .2s var(--weich), opacity .2s, box-shadow .2s;
}
.hauptknopf:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(26, 51, 46, 0.3); }
.hauptknopf:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.nebenknopf { display: flex; justify-content: center; width: 100%; padding: 14px 24px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(15,26,23,.15); font-weight: 600; font-size: 16px; color: var(--ink); background: transparent; transition: background-color .2s; }
.nebenknopf:hover { background: rgba(15,26,23,.04); }

/* ---------- Listen (Studiengänge, Menü) */
.liste { background: rgba(255,255,255,.95); border-radius: 20px; padding: 0 4px; box-shadow: var(--schatten-liste); }
.liste--menue { background: #fff; border-radius: 18px; padding: 0 2px; box-shadow: none; }
.eintrag {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--linie); transition: background-color .15s;
}
.eintrag:last-child { border-bottom: 0; }
.eintrag:hover { background: rgba(106,144,135,.06); }
.eintrag.ist-gewaehlt { background: var(--salbei-ton); border-radius: 14px; }
.eintrag__kuerzel { flex: 0 0 52px; padding: 6px 0; border-radius: 10px; background: var(--salbei-ton); color: var(--gruen); font-weight: 700; font-size: 13px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eintrag__name { flex: 1; min-width: 0; font-weight: 500; font-size: 15px; line-height: 1.25; color: var(--ink); }
.eintrag__pfeil { --g: 18px; color: var(--mut-hell); }
.eintrag__symbolkasten { flex: 0 0 36px; height: 36px; border-radius: 11px; background: var(--salbei-ton); color: var(--gruen); display: grid; place-items: center; }
.eintrag__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eintrag__titel { font-weight: 600; font-size: 15px; color: var(--ink); }
.eintrag__detail { font-weight: 500; font-size: 12px; color: var(--mut); }
.eintrag--menue { gap: 14px; }

/* ---------- Gruppen-Knöpfe */
.gruppen-abschnitt { display: flex; flex-direction: column; gap: 8px; }
.gruppen-abschnitt__titel { font-weight: 700; font-size: 12px; color: var(--mut); text-transform: uppercase; letter-spacing: .01em; }
.gruppen-abschnitt__titel span { text-transform: none; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 12px 18px; border-radius: 14px; background: rgba(255,255,255,.95);
  box-shadow: inset 0 0 0 1px rgba(15,26,23,.1);
  font-weight: 600; font-size: 14px; color: var(--ink);
  transition: background-color .2s var(--weich), color .2s var(--weich), transform .15s;
}
.chip:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(15,26,23,.18); }
.chip[aria-pressed="true"] { background: var(--gruen); color: #fff; box-shadow: none; }
.chip--leer { background: transparent; color: var(--mut); box-shadow: inset 0 0 0 1px var(--gestrichelt); border: 0; }
.mehr-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--mut); }
.mehr-link .symbol { --g: 14px; transition: transform .2s; }
.mehr-link[aria-expanded="true"] .symbol { transform: rotate(90deg); }

/* ---------- Suche */
.suche { --glas-deckkraft: .85; --radius: 18px; display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.suche .symbol { color: var(--mut); }
.suche input { flex: 1; min-width: 0; padding: 14px 0; border: 0; background: transparent; font-weight: 500; font-size: 15px; color: var(--ink); outline: none; }
.suche input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; cursor: pointer;
  background: no-repeat center/16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5A55' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E"); }
.suche input::placeholder { color: var(--mut); opacity: 1; }
.suche:focus-within { box-shadow: 0 0 0 2px rgba(47,75,68,.5), var(--schatten-glas); }

/* ---------- Schalter + Häkchen */
.schalter { position: relative; width: 48px; height: 28px; border-radius: 14px; background: #C9D3D0; flex-shrink: 0; transition: background-color .25s var(--weich); }
.schalter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform .25s var(--weich); }
.schalter[aria-checked="true"] { background: var(--gruen); }
.schalter[aria-checked="true"]::after { transform: translateX(20px); }
.haken { width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px #9AAAA5; display: grid; place-items: center; flex-shrink: 0; color: #fff; transition: background-color .15s; }
.haken .symbol { --g: 14px; stroke-width: 3; opacity: 0; }
[aria-checked="true"] > .haken { background: var(--gruen); box-shadow: none; }
[aria-checked="true"] > .haken .symbol { opacity: 1; }

/* ---------- Blatt (von unten) */
.blatt-huelle { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.blatt-huelle__dunkel { position: absolute; inset: 0; background: rgba(11, 20, 18, .45); opacity: 0; transition: opacity var(--dauer) var(--weich); }
.blatt {
  position: relative; width: 100%; max-width: 480px; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 12px 20px calc(34px + env(safe-area-inset-bottom));
  background: rgba(246, 248, 247, .97); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  border-radius: 32px 32px 0 0; transform: translateY(100%); transition: transform var(--dauer) var(--weich);
}
.blatt-huelle.ist-offen .blatt-huelle__dunkel { opacity: 1; }
.blatt-huelle.ist-offen .blatt { transform: translateY(0); }
.blatt__griff { width: 40px; height: 5px; border-radius: 3px; background: rgba(15,26,23,.18); flex-shrink: 0; }
.blatt__titel { align-self: stretch; font-weight: 700; font-size: 22px; }
.blatt__abschnitt { align-self: stretch; display: flex; flex-direction: column; gap: 8px; }
.blatt__label { font-weight: 700; font-size: 12px; color: var(--mut); text-transform: uppercase; }
.blatt__fuss { font-weight: 500; font-size: 11px; color: var(--mut); text-align: center; }
.aktueller-kurs { align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; background: var(--salbei-ton); }
.aktueller-kurs__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aktueller-kurs__titel { font-weight: 700; font-size: 18px; }
.aktueller-kurs__info { font-weight: 500; font-size: 13px; color: var(--mut); }
.pillenknopf { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px; background: var(--gruen); color: #fff; font-weight: 600; font-size: 14px; flex-shrink: 0; transition: transform .2s var(--weich); }
.pillenknopf:hover { transform: translateY(-1px); }
.pillenknopf .symbol { --g: 16px; }
.symbolkreis { width: 56px; height: 56px; border-radius: 18px; background: rgba(106,144,135,.16); color: var(--gruen); display: grid; place-items: center; }
.symbolkreis .symbol { --g: 26px; }

/* Details-Blatt */
.details__art { align-self: stretch; font-weight: 700; font-size: 12px; color: var(--mut); text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.details__art i { width: 10px; height: 10px; border-radius: 50%; background: var(--fach); }
.details__titel { align-self: stretch; font-weight: 700; font-size: 26px; line-height: 1.2; margin-top: -8px; }
.details__zeit { align-self: stretch; font-weight: 500; font-size: 15px; color: var(--mut); margin-top: -8px; }
.zeilen { align-self: stretch; background: #fff; border-radius: 18px; padding: 0 16px; }
.zeile { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--linie); font-size: 14px; }
.zeile:last-child { border-bottom: 0; }
.zeile__name { color: var(--mut); font-weight: 500; }
.zeile__wert { font-weight: 600; text-align: right; }
.naechste { align-self: stretch; display: flex; flex-direction: column; gap: 6px; }
.naechste li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.7); font-size: 13px; }
.naechste li span:first-child { font-weight: 600; }
.naechste li span:last-child { color: var(--mut); font-weight: 500; }

/* ---------- Hinweise: Banner, Toast, Laden */
.banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.85); box-shadow: inset 0 0 0 1px rgba(208,138,58,.45); font-weight: 500; font-size: 13px; line-height: 1.35; color: var(--ink); }
.banner .symbol { color: #B26B1F; margin-top: 1px; }
.banner button { margin-left: auto; font-weight: 700; color: var(--gruen); white-space: nowrap; }
.toast {
  position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); z-index: 80; transform: translate(-50%, 20px);
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--weich); white-space: nowrap;
}
.toast.ist-sichtbar { opacity: 1; transform: translate(-50%, 0); }
.platzhalter { border-radius: 16px; background: linear-gradient(90deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.9) 50%, rgba(255,255,255,.55) 100%); background-size: 200% 100%; animation: schimmer 1.4s linear infinite; }
@keyframes schimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.stand { font-weight: 500; font-size: 12px; color: var(--mut); }
