/* ==========================================================================
   Kompass v4: Home-Kacheln, Band, Akademie, Hörbuch-Player
   ========================================================================== */

/* ---------- Home ---------- */
.home-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.home-head .sp { min-width: 0; }
.home-head .h1 { margin-top: 4px; font-size: clamp(26px, 4.2vw, 40px); overflow-wrap: anywhere; }
.home-kpis { display: flex; gap: 6px; flex: none; }
.home-kpis span { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.home-kpis svg { width: 16px; height: 16px; color: var(--dawn); }
.home-kpis .c svg { color: var(--cyan); }

.home-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(170px, 1fr)); gap: 14px; }
.home-grid .ht.big { grid-column: span 2; grid-row: span 2; }

.ht { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 16px; border-radius: 22px; border: 1px solid var(--line); color: #eef2ff; min-height: 0; transition: transform 200ms var(--ease-out), border-color 200ms ease; }
.ht > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 700ms var(--ease-out); }
.ht::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(6, 10, 21, 0.94) 8%, rgba(6, 10, 21, 0.55) 55%, rgba(6, 10, 21, 0.2)); }
.ht.lock > img { filter: grayscale(0.7) brightness(0.7); }
@media (hover: hover) { .ht:hover { border-color: var(--line-2); } .ht:hover > img { transform: scale(1.04); } }
.ht:active { transform: scale(0.985); }
.ht-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ht-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(10, 16, 34, 0.55); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ht-ic svg { width: 19px; height: 19px; }
.ht-badge { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 800; background: rgba(10, 16, 34, 0.6); border: 1px solid rgba(255, 255, 255, 0.16); white-space: nowrap; }
.ht-badge svg { width: 13px; height: 13px; }
.ht-badge.hot { background: linear-gradient(135deg, var(--dawn-2), var(--dawn)); color: #1b0f0a; border-color: transparent; }
.ht-badge.ok { background: rgba(56, 217, 230, 0.2); border-color: rgba(56, 217, 230, 0.4); }
.ht-in { min-width: 0; }
.ht-ey { font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #aebcff; }
.ht-t { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; margin-top: 4px; }
.ht.big .ht-t { font-size: clamp(24px, 3vw, 34px); }
.ht-l { font-size: 13.5px; color: #c9d1ee; margin-top: 4px; line-height: 1.4; }
.ht.big .ht-l { font-size: 15px; }
.ht-cd { font-variant-numeric: tabular-nums; color: #fff; }
.ht-bar { display: flex; gap: 5px; margin-top: 12px; max-width: 280px; }
.ht-bar i { flex: 1; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.18); }
.ht-bar i.on { background: linear-gradient(90deg, var(--cyan), var(--primary)); }
.ht-bar i.now { background: var(--dawn); }

/* Band mit wechselnden Gedanken/Hinweisen */
.band { position: relative; margin-top: 14px; height: 96px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(120deg, rgba(91, 124, 255, 0.14), rgba(56, 217, 230, 0.06) 60%, var(--surface)); overflow: hidden; touch-action: pan-y; user-select: none; }
.band-it { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 12px 56px 18px 20px; color: var(--text); opacity: 0; transform: translateY(8px); transition: opacity 900ms ease, transform 900ms var(--ease-out); pointer-events: none; }
.band-it.on { opacity: 1; transform: none; pointer-events: auto; }
.band-ey { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.band-ey svg { width: 14px; height: 14px; }
.band-t { font-size: 15.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.band-t.q { font-family: var(--serif, Georgia, serif); font-weight: 500; font-size: 17px; }
.band-go { position: absolute; right: 16px; top: 50%; translate: 0 -50%; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; }
.band-go svg { width: 16px; height: 16px; }
.band-prog { position: absolute; left: 20px; right: 20px; bottom: 9px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.band-prog i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--cyan), var(--primary)); transform-origin: left; animation: bandfill var(--band-ms, 25s) linear; }
@keyframes bandfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .band-it { transition: opacity 300ms ease; transform: none; } }

@media (max-width: 860px) {
  .home-head { margin-bottom: 14px; }
  .home-kpis span { height: 30px; padding: 0 9px; font-size: 13px; }
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(160px, 24svh) repeat(2, minmax(126px, 18.5svh)); gap: 10px; }
  .home-grid .ht.big { grid-column: span 2; grid-row: span 1; }
  .ht { padding: 12px; border-radius: 18px; }
  .ht-ic { width: 32px; height: 32px; border-radius: 10px; }
  .ht-ic svg { width: 16px; height: 16px; }
  .ht-t { font-size: 16px; }
  .ht.big .ht-t { font-size: 22px; }
  .ht-l { font-size: 12.5px; }
  .ht.big .ht-l { font-size: 13.5px; }
  .ht-bar { margin-top: 8px; }
  .band { height: 88px; margin-top: 10px; }
  .band-it { padding: 10px 50px 16px 16px; }
  .band-t { font-size: 14px; } .band-t.q { font-size: 15.5px; }
}
@media (max-width: 360px) {
  .home-kpis span:nth-child(2) { display: none; }
  .ht-l { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---------- Akademie ---------- */
.aka-tile.locked { opacity: 0.62; }
.aka-tile.locked > img { filter: grayscale(0.6); }
.aka-tile.done .pill.ok { background: rgba(56, 217, 230, 0.18); }
.daybar.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.daybar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mission-run { margin-bottom: 16px; border-color: rgba(255, 154, 92, 0.35); background: linear-gradient(135deg, rgba(255, 154, 92, 0.08), var(--surface)); }
.mission-run .small { color: var(--text-2); }
.mission-dots { display: inline-flex; gap: 5px; }
.mission-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); }
.mission-dots i.on { background: var(--dawn); border-color: var(--dawn); }
.check-card, .mission-card { margin-top: 22px; }
.mission-card { border-color: rgba(255, 154, 92, 0.4); background: linear-gradient(135deg, rgba(255, 154, 92, 0.1), var(--surface)); }
.opt { width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 15.5px; line-height: 1.4; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; }
@media (hover: hover) { .opt:hover { border-color: var(--primary); } }
.opt.on { border-color: var(--cyan); background: rgba(56, 217, 230, 0.1); font-weight: 600; }
.opt-fb { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--grad-soft); border-left: 3px solid var(--cyan); font-size: 15px; line-height: 1.5; }


/* Listen-Block im Kurstext */
.list-block { margin: 18px 0; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.list-block .list-title { font-weight: 800; margin-bottom: 8px; }
.list-block ul { margin: 0; padding-left: 20px; }
.list-block li { margin: 5px 0; line-height: 1.5; }

/* Home: kurze Texte bleiben einzeilig, kleine Bildschirme ohne Scrollen */
.ht-ey { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht:not(.big) .ht-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ht:not(.big) .ht-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-head .eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) and (max-height: 760px) {
  .home-head { margin-bottom: 10px; }
  .home-head .h1 { font-size: 26px; }
  .home-grid { grid-template-rows: minmax(140px, 23svh) repeat(2, minmax(108px, 17.5svh)); gap: 8px; }
  .ht:not(.big) .ht-ic { display: none; }
  .ht:not(.big) .ht-top { position: absolute; top: 10px; right: 10px; }
  .ht:not(.big) { justify-content: flex-end; }
  .ht.big .ht-l { font-size: 12.5px; }
  .band { height: 84px; margin-top: 8px; }
  .band-t { -webkit-line-clamp: 2; font-size: 13.5px; } .band-t.q { font-size: 14.5px; }
}
@media (max-width: 400px) { .home-head .dl { display: none; } }

/* Pop-ups: Schließen-Kreuz immer sichtbar */
.sheet-x { position: sticky; top: -8px; float: right; z-index: 3; width: 38px; height: 38px; margin: -8px -8px 6px 10px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.sheet-x svg { width: 18px; height: 18px; }
.sheet-x:active { transform: scale(0.92); }
@media (max-width: 560px) { .sheet { padding: 20px 18px; max-height: calc(100dvh - 40px); } }

/* Videoraum */
.room { display: flex; flex-direction: column; gap: 18px; border-color: rgba(255, 154, 92, 0.35); background: linear-gradient(135deg, rgba(255, 154, 92, 0.08), var(--surface)); }
.room-top { display: flex; align-items: center; gap: 14px; }
.room-wait { text-align: center; padding: 10px 0; }
.room-wait .countdown { margin-top: 6px; }
.room-tips { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.room-tips li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-2); }
.room-tips svg { width: 16px; height: 16px; color: var(--cyan); flex: none; margin-top: 3px; }
.chip svg { width: 15px; height: 15px; margin-right: 4px; vertical-align: -2px; }
