.horen-audio-player {
  position: sticky;
  top: calc(var(--zd-exam-header-height, 8rem) + 0.7rem);
  z-index: 35;
  width: min(100%, 49rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  margin: 0 auto 0.85rem;
  border: 1px solid rgba(55, 112, 166, 0.2);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.45rem 0.65rem;
  box-shadow: 0 10px 30px rgba(30, 58, 82, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.horen-audio-player.hidden {
  display: none;
}

.horen-audio-player__art {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  border-radius: 0.72rem;
  background: linear-gradient(145deg, #eaf3fb, #f5f8fb);
  color: #3770a6;
}

.horen-audio-player__art svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke-width: 1.8;
}

.horen-audio-player__body {
  min-width: 0;
}

.horen-audio-player__heading,
.horen-audio-player__controls {
  display: flex;
  align-items: center;
}

.horen-audio-player__heading {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.3rem;
}

.horen-audio-player__heading div > span,
.horen-audio-player__heading div > strong {
  display: block;
}

.horen-audio-player__heading div > span {
  color: #718093;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.horen-audio-player__heading div > strong {
  overflow: hidden;
  margin-top: 0.1rem;
  color: #1f2933;
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#horen-audio-part {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf4fa;
  padding: 0.22rem 0.48rem;
  color: #3770a6;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.horen-audio-player__controls {
  gap: 0.45rem;
}

#horen-audio-toggle,
#horen-audio-mute {
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #3770a6;
  color: #fff;
  cursor: pointer;
}

#horen-audio-mute.is-secondary {
  width: 1.72rem;
  height: 1.72rem;
  background: #eef2f5;
  color: #5e6c78;
}

#horen-audio-toggle svg,
#horen-audio-mute svg {
  width: 0.85rem;
  height: 0.85rem;
  stroke-width: 2;
}

#horen-audio-seek {
  --audio-played: 0%;
  --audio-buffered: 0%;
  min-width: 4rem;
  height: 0.8rem;
  flex: 1 1 auto;
  margin: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  direction: ltr;
}

#horen-audio-seek::-webkit-slider-runnable-track {
  height: 0.28rem;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #3770a6 0 var(--audio-played),
    #aeb8c4 var(--audio-played) var(--audio-buffered),
    #e8edf1 var(--audio-buffered) 100%
  );
}

#horen-audio-seek::-moz-range-track {
  height: 0.28rem;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #3770a6 0 var(--audio-played),
    #aeb8c4 var(--audio-played) var(--audio-buffered),
    #e8edf1 var(--audio-buffered) 100%
  );
}

#horen-audio-seek::-webkit-slider-thumb {
  width: 0.75rem;
  height: 0.75rem;
  margin-top: -0.235rem;
  border: 2px solid #fff;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: #3770a6;
  box-shadow: 0 1px 5px rgba(30, 58, 82, 0.28);
}

#horen-audio-seek::-moz-range-thumb {
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #3770a6;
  box-shadow: 0 1px 5px rgba(30, 58, 82, 0.28);
}

.horen-audio-player.is-buffering #horen-audio-toggle svg {
  animation: horen-audio-spin 0.85s linear infinite;
}

@keyframes horen-audio-spin {
  to { transform: rotate(360deg); }
}

#horen-audio-time {
  min-width: 5rem;
  color: #718093;
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  text-align: end;
}

#horen-audio-element {
  display: none;
}

.horen-volume-control {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.horen-volume-control__popover {
  position: absolute;
  right: -0.3rem;
  bottom: calc(100% + 0.45rem);
  width: 6.8rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(55, 112, 166, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(30, 58, 82, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.3rem) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 160ms ease, transform 160ms ease;
}

/* Keep a continuous hover path between the icon and its floating slider. */
.horen-volume-control__popover::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -0.6rem;
  height: 0.65rem;
}

.horen-volume-control:hover .horen-volume-control__popover,
.horen-volume-control:focus-within .horen-volume-control__popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

#horen-audio-volume {
  width: 100%;
  height: 1.2rem;
  display: block;
  margin: 0;
  accent-color: #3770a6;
  cursor: pointer;
  direction: ltr;
}

@media (max-width: 640px) {
  .horen-audio-player {
    top: calc(var(--zd-exam-header-height, 7.85rem) + 0.45rem);
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0.5rem 0.58rem;
  }

  .horen-audio-player__art {
    display: none;
  }

  .horen-audio-player__controls {
    gap: 0.38rem;
  }

  #horen-audio-time {
    min-width: 4.45rem;
    font-size: 0.53rem;
  }

  .horen-volume-control__popover {
    right: -0.45rem;
  }
}

.horen-callout {
  background: linear-gradient(180deg, #fef08a, #fde047);
  color: #0f172a;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.horen-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 1rem;
  margin: 1rem 0;
}

.horen-table {
  width: 100%;
  min-width: 400px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.horen-table th,
.horen-table td {
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 0.45rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}

.horen-table th {
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .horen-table th,
  .horen-table td {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
  }
  .horen-table th {
    font-size: 0.7rem;
  }
}

.horen-topic {
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
}

.horen-topic + .horen-topic {
  margin-top: 1.25rem;
}

.horen-results {
  margin-top: 2rem;
}

.horen-result-card {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 1rem;
  padding: 1rem;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.horen-result-card h3 {
  margin: 0;
  font-size: 1rem;
}

.horen-radio-group {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.horen-radio-group input {
  accent-color: #0f766e;
}

.horen-table input[type="radio"] {
  accent-color: #0f766e;
  width: 18px;
  height: 18px;
}

.horen-topic-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: #475569;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#part-cards {
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 768px) {
  #part-cards {
    flex-wrap: nowrap;
    justify-content: center;
  }
}

.horen-page header {
  padding-bottom: 1rem;
}

@media (max-width: 767px) {
  .horen-page header {
    overflow: visible;
  }
}

.hide-aussage-topic-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topic-check-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 185px;
  border: 2px solid #b45309;
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  color: #111827;
  border-radius: 9999px;
  padding: 0.62rem 1.35rem;
  font-size: 0.76rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow:
    0 14px 28px rgba(245, 158, 11, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.topic-check-btn:not(:disabled) {
  animation: topic-check-glow 2.6s ease-in-out infinite;
}

.topic-check-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #facc15 0%, #f59e0b 100%);
  border-color: #92400e;
  box-shadow:
    0 18px 34px rgba(245, 158, 11, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  transform: translateY(-1px);
  filter: saturate(1.06);
}

.topic-check-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(245, 158, 11, 0.28),
    0 18px 34px rgba(245, 158, 11, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.topic-check-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow:
    0 10px 18px rgba(245, 158, 11, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.topic-check-btn:disabled {
  opacity: 1;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #f59e0b;
  color: #92400e;
  box-shadow: none;
  animation: none;
  cursor: not-allowed;
}

.topic-comment {
  border: 1px solid #c026d3;
  background: linear-gradient(135deg, rgba(249, 168, 212, 0.5), rgba(216, 180, 254, 0.58));
  color: #111827;
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-line;
  box-shadow: 0 8px 18px rgba(168, 85, 247, 0.16);
}

@keyframes topic-check-glow {
  0%, 100% {
    box-shadow:
      0 14px 28px rgba(245, 158, 11, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.52);
  }
  50% {
    box-shadow:
      0 20px 38px rgba(245, 158, 11, 0.44),
      inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
}

#horen-footer {
  z-index: 50;
}

@media (max-width: 767px) {
  #horen-footer {
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
  }
  #horen-footer .w-full {
    flex-wrap: wrap;
  }
  #horen-footer .flex.items-center.gap-3 {
    width: 100%;
  }
  #horen-footer .flex.items-center.gap-2 {
    width: 100%;
    gap: 6px;
  }
  #horen-footer img {
    height: 24px;
  }
  #horen-progress {
    font-size: 8px;
  }
  #horen-footer button {
    padding: 6px 12px;
    font-size: 8px;
    min-width: auto;
    flex: 1;
  }
}

/* Shared Lesen word/translation tools, with a compact single action per statement. */
.horen-statement-reading .zd-reading-toolbar{margin:0 0 7px;padding:0;border:0;justify-content:flex-end;gap:6px}
.horen-statement-reading .zd-reading-action{min-height:28px;padding:5px 8px;font-size:11px;transform:none}
.horen-statement-reading [data-zd-reading-content]{display:block}
.horen-statement-reading .zd-reading-translation{margin-top:10px;font-size:14px}
.horen-statement-reading .zd-word-token{font-size:inherit;line-height:inherit}
/* Keep statements and their translation action visible without horizontal panning. */
.horen-table{min-width:0;table-layout:fixed}
.horen-table th:first-child,.horen-table td:first-child{width:40px}
.horen-table th:nth-child(2),.horen-table td:nth-child(2),.horen-table th:nth-child(3),.horen-table td:nth-child(3){width:78px;text-align:center}
.horen-table td:last-child{white-space:normal;overflow-wrap:anywhere}
@media(max-width:600px){.horen-table th:first-child,.horen-table td:first-child{width:28px}.horen-table th:nth-child(2),.horen-table td:nth-child(2),.horen-table th:nth-child(3),.horen-table td:nth-child(3){width:48px}.horen-table th{font-size:9px;letter-spacing:.02em;padding:8px 3px}.horen-table td{padding:8px 5px}.horen-table td:last-child{padding:10px 8px}.horen-statement-reading .zd-reading-action{font-size:10px;padding:5px 6px}.horen-statement-reading .zd-reading-action-icon{width:12px;height:12px}}

/* The transcript stays above exam navigation, with space reserved in the page. */
.horen-audio-player__heading > div:first-child { min-width: 0; flex: 1; }
.horen-audio-player__heading > div:first-child > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.horen-audio-player__heading-actions { display: flex; flex-shrink: 0; align-items: center; gap: .55rem; }
.horen-subtitle-toggle { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 32px; margin: 0; padding: .3rem .6rem; border: 1px solid #dde5ed; border-radius: 999px; background: #fff; color: #708094; font-family: "Inter", system-ui, sans-serif; font-size: .65rem; line-height: 1; font-weight: 600; cursor: pointer; transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease; }
.horen-subtitle-toggle__icon { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 18px; border: 1.25px solid currentColor; border-radius: 4px; font-size: 9px; font-weight: 750; letter-spacing: -.04em; }
.horen-subtitle-toggle__indicator { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .25; }
.horen-subtitle-toggle:hover { background: #f2f6fb; border-color: #b5cce0; color: #3770a6; }
.horen-subtitle-toggle[aria-pressed="true"] { background: #eef5fc; color: #3770a6; border-color: #c8dced; }
.horen-subtitle-toggle[aria-pressed="true"] .horen-subtitle-toggle__indicator { opacity: 1; box-shadow: 0 0 0 2px #3770a612; }
.horen-subtitle-toggle:focus-visible { outline: 2px solid currentColor !important; outline-offset: 3px; }
/* Two-line caption strip. Extra reading space opens only when requested. */
.horen-subtitle-dock { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--zd-exam-footer-height, 4.25rem) + env(safe-area-inset-bottom) + 6px); width: min(72rem, calc(100% - 32px)); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; background: #fff; color: #222; border: 1px solid #d7d7d7; border-radius: 12px; box-shadow: 0 4px 18px #0001; }
.horen-subtitle-dock[hidden], .horen-subtitle-toggle[hidden], .horen-subtitle-expand[hidden] { display: none !important; }
.horen-subtitle-heading { order: 2; display: flex; align-items: center; gap: 4px; color: #666; }
.horen-subtitle-position { width: 58px; text-align: center; white-space: nowrap; font-size: 11px; font-variant-numeric: tabular-nums; }
.horen-subtitle-passages { order: 1; display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 6px; align-items: center; min-width: 0; }
.horen-subtitle-body { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; max-height: min(32dvh, 18rem); }
.horen-subtitle-reading { display: grid; grid-template-columns: minmax(0, 1fr) 36px; column-gap: 6px; align-items: center; }
.horen-subtitle-dock .zd-reading-toolbar { grid-column: 2; grid-row: 1; display: block; margin: 0; padding: 0; border: 0; min-height: 0; }
.horen-subtitle-text { grid-column: 1; grid-row: 1; margin: 0; font-size: calc(1.06rem * var(--font-scale, 1)); line-height: 1.5; max-height: 3em; overflow: hidden; overflow-wrap: anywhere; text-align: left; user-select: text; }
.horen-subtitle-dock:is(.is-expanded, :has(.zd-reading-translation:not([hidden]), .zd-reading-error)) .horen-subtitle-text { max-height: none; }
.horen-subtitle-dock .zd-reading-translation { grid-column: 1 / -1; margin: 6px 0 0; padding: 8px 10px; }
.horen-subtitle-dock .zd-reading-translation-body { margin-top: 5px; }
.horen-subtitle-dock .zd-reading-error { grid-column: 1 / -1; }
.horen-subtitle-dock .zd-reading-toolbar:has(.zd-reading-error) { display: contents; }
.horen-subtitle-dock button { cursor: pointer; }
.horen-subtitle-dock button:disabled { opacity: .35; cursor: default; }
.horen-subtitle-dock :is(.horen-subtitle-prev, .horen-subtitle-next, .horen-subtitle-close, .horen-subtitle-expand, .zd-translation-button) { display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 8px; color: #52626f; background: transparent; flex-shrink: 0; transform: none; }
.horen-subtitle-dock :is(.horen-subtitle-prev, .horen-subtitle-next, .horen-subtitle-close, .horen-subtitle-expand, .zd-translation-button):hover:not(:disabled) { color: #1f2933; background: #edf2f6; }
.horen-subtitle-dock .zd-translation-button.is-active { color: #3770a6; background: #edf4fa; }
.horen-subtitle-dock .zd-translation-button > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.horen-subtitle-dock .zd-translation-button[disabled] { opacity: .55; }
.horen-subtitle-dock .zd-translation-button[disabled]::after { content: ""; position: absolute; width: 23px; height: 23px; border: 1px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: horen-subtitle-spin .8s linear infinite; }
.horen-subtitle-dock svg { width: 18px; height: 18px; }
.horen-subtitle-next svg { transform: rotate(180deg); }
.horen-subtitle-dock :is(.horen-subtitle-expand, .horen-subtitle-close) svg { width: 16px; height: 16px; }
.horen-subtitle-status { display: flex; gap: 8px; align-items: center; margin: 3px 0; font: 13px/1.5 "Inter", system-ui, sans-serif; }
.horen-subtitle-retry { border: 1px solid #aaa; background: #f6f6f6; color: #222; border-radius: 8px; min-height: 32px; padding: .25rem .6rem; font: inherit; font-size: 12px; }
.horen-subtitle-spinner { width: 16px; height: 16px; border: 2px solid #ccc; border-top-color: #333; border-radius: 50%; animation: horen-subtitle-spin .8s linear infinite; flex-shrink: 0; }
@keyframes horen-subtitle-spin { to { transform: rotate(360deg); } }
body:has(.horen-subtitle-dock:not([hidden])) .zd-exam-header[data-exam-module="horen"] ~ main { padding-bottom: calc(var(--zd-exam-footer-height, 4.25rem) + var(--horen-subtitle-height, 0px) + 2rem) !important; }
body:has(.horen-subtitle-dock:not([hidden])) .community-floating-btn { bottom: calc(var(--zd-exam-footer-height, 4.25rem) + var(--horen-subtitle-height, 0px) + 1rem) !important; }
html[data-zd-theme="dark"] .horen-subtitle-dock { background: #1c1c1c; color: #f5f5f5; border-color: #555; box-shadow: 0 4px 18px #0004; }
html[data-zd-theme="dark"] .horen-subtitle-heading { color: #bbb; }
html[data-zd-theme="dark"] .horen-subtitle-dock :is(.horen-subtitle-prev, .horen-subtitle-next, .horen-subtitle-close, .horen-subtitle-expand, .zd-translation-button) { color: #ddd !important; background: transparent !important; border: 0 !important; }
html[data-zd-theme="dark"] .horen-subtitle-dock :is(.horen-subtitle-prev, .horen-subtitle-next, .horen-subtitle-close, .horen-subtitle-expand, .zd-translation-button):hover:not(:disabled), html[data-zd-theme="dark"] .horen-subtitle-dock .zd-translation-button.is-active { color: #fff !important; background: #333 !important; }
html[data-zd-theme="dark"] .horen-subtitle-toggle { background: transparent; color: #aaa; border-color: #4c4c4c; }
html[data-zd-theme="dark"] .horen-subtitle-toggle:is(:hover, [aria-pressed="true"]) { background: #303030; color: #fff; border-color: #777; }
html[data-zd-theme="dark"] .horen-subtitle-toggle__indicator { box-shadow: none !important; }
html[data-zd-theme="dark"] #horen-audio-volume { accent-color: #eee; }
@media (max-width: 640px) {
  .horen-audio-player__heading-actions { gap: .35rem; }
  .horen-subtitle-toggle { min-width: 40px; min-height: 36px; padding: .35rem; gap: .3rem; }
  .horen-subtitle-toggle__label { display: none; }
  .horen-subtitle-dock { width: calc(100% - 16px); grid-template-columns: minmax(0, 1fr) 32px; gap: 4px; padding: 5px; border-radius: 10px; }
  .horen-subtitle-heading { flex-direction: column; gap: 0; }
  .horen-subtitle-position { display: none; }
  .horen-subtitle-passages { grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 2px; }
  .horen-subtitle-reading { grid-template-columns: minmax(0, 1fr) 32px; column-gap: 2px; }
  .horen-subtitle-dock :is(.horen-subtitle-prev, .horen-subtitle-next, .horen-subtitle-close, .horen-subtitle-expand, .zd-translation-button) { width: 32px; height: 32px; min-height: 32px; }
  .horen-subtitle-text { font-size: calc(1rem * var(--font-scale, 1)); }
}
@media (prefers-reduced-motion: reduce) { .horen-subtitle-spinner, .horen-subtitle-dock .zd-translation-button[disabled]::after { animation: none; } }

.horen-loading, .horen-load-error { border: 1px solid #e0e5e7; border-radius: 16px; background: #fff; padding: 20px; }
.horen-loading__label { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; color: #697780; font: 500 14px/1.5 "Inter", system-ui, sans-serif; }
.horen-loading__spinner { width: 18px; height: 18px; border: 2px solid #dce3e8; border-top-color: #536a80; border-radius: 50%; animation: horen-audio-spin .8s linear infinite; }
.horen-loading__title { width: min(260px, 60%); height: 24px; border-radius: 6px; margin-bottom: 20px; background: #edf0f3; }
.horen-loading__row { height: 58px; margin-top: 10px; border-radius: 8px; background: linear-gradient(90deg, #f3f5f6 20%, #e9eef1 50%, #f3f5f6 80%); background-size: 200% 100%; animation: horen-loading-shimmer 1.5s ease-in-out infinite; }
@keyframes horen-loading-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.horen-load-error { color: #394650; font: 14px/1.5 "Inter", system-ui, sans-serif; }
.horen-load-retry { min-height: 40px; border: 1px solid #bdcbd7; border-radius: 9px; padding: 8px 16px; background: #edf4fa; color: #305e85; font: inherit; cursor: pointer; }
.horen-audio-player.is-preparing .horen-audio-player__art { position: relative; }
.horen-audio-player.is-preparing .horen-audio-player__art svg { opacity: 0; }
.horen-audio-player.is-preparing .horen-audio-player__art::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid #3770a633; border-top-color: #3770a6; border-radius: 50%; animation: horen-audio-spin .8s linear infinite; }
html[data-zd-theme="dark"] :is(.horen-loading, .horen-load-error) { background: #1c1c1c; color: #eee; border-color: #444; }
html[data-zd-theme="dark"] .horen-loading__label { color: #bbb; }
html[data-zd-theme="dark"] .horen-loading__title { background: #333; }
html[data-zd-theme="dark"] .horen-loading__row { background-image: linear-gradient(90deg, #282828 20%, #333 50%, #282828 80%); }
html[data-zd-theme="dark"] .horen-load-retry { background: #333; color: #eee; border-color: #555; }
html[data-zd-theme="dark"] .horen-audio-player.is-preparing .horen-audio-player__art::after, html[data-zd-theme="dark"] .horen-loading__spinner { border-color: #555; border-top-color: #eee; }
@media (prefers-reduced-motion: reduce) { .horen-loading__spinner, .horen-loading__row, .horen-audio-player.is-preparing .horen-audio-player__art::after { animation: none; } }

/* This page has its own content loader; optional background downloads do not block it. */
body:has(.zd-exam-header[data-exam-module="horen"]) .zd-data-loader { display: none; }

.horen-audio-recovery { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#horen-audio-retry { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; border: 1px solid #c8dced; border-radius: 999px; padding: 5px 10px; background: #eef5fc; color: #3770a6; font: 600 12px/1.4 Inter,system-ui,sans-serif; cursor: pointer; }
#horen-audio-retry[hidden] { display: none; }
#horen-audio-retry svg { width: 14px; height: 14px; }
html[data-zd-theme="dark"] #horen-audio-retry { background: #303030; color: #fff; border-color: #777; }

.horen-audio-recovery:has(#horen-audio-status.sr-only):has(#horen-audio-retry[hidden]) { display: none; }
