/* Gemeinsames Aussehen der Exoplaneten-Applets: Zeichenfläche und Bedienleiste */
.xk-root {
  max-width: 900px;
  color: #e6e8ec;
  background: #101018;   /* eigene dunkle Fläche: die Bedienleiste bleibt auch auf hellen Seiten lesbar */
  border-radius: 4px;
  overflow: hidden;
  font: 14px/1.4 "DejaVu Sans", "Segoe UI", system-ui, Arial, sans-serif;
}
.xk-canvas {
  display: block;
  width: 100%;
  background: #000;
  touch-action: pan-y;
  user-select: none;
}
.xk-canvas.xk-draggable { cursor: ew-resize; }
.xk-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 8px 12px 9px;
}
.xk-controls button {
  min-width: 6.5em;
  padding: 4px 12px;
  font: inherit;
  color: inherit;
  background: #23262c;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  cursor: pointer;
}
.xk-controls button:hover { background: #2f333b; border-color: #ffab0f; }
.xk-hint { color: #9aa2ad; font-size: 13px; }
/* Versionsnummer des Applets, klein am rechten Ende der Bedienleiste */
.xk-version { margin-left: auto; color: #6f7783; font-size: 12px; font-variant-numeric: tabular-nums; }
/* Schieberegler mit Namen davor und Wert dahinter */
.xk-slider { display: inline-flex; align-items: center; gap: 8px; }
.xk-slider input[type="range"] { width: 150px; margin: 0; accent-color: #ffab0f; cursor: pointer; }
.xk-slider output { min-width: 2.6em; font-variant-numeric: tabular-nums; }
/* Auswahl: Name davor, dann Knöpfe ohne Lücke, der gewählte hervorgehoben */
.xk-choice { display: inline-flex; align-items: center; }
.xk-choice > span { margin-right: 8px; }
.xk-choice button { min-width: 0; border-radius: 0; margin-left: -1px; }
.xk-choice button:first-of-type { border-radius: 5px 0 0 5px; margin-left: 0; }
.xk-choice button:last-of-type { border-radius: 0 5px 5px 0; }
.xk-choice button:disabled { opacity: 0.35; cursor: default; }
.xk-choice button[aria-pressed="true"] { position: relative; background: #ffab0f; border-color: #ffab0f; color: #101018; font-weight: 600; }
/* Knöpfe und Meldungen, die über dem Bild liegen. Die quadratischen Knöpfe werden mit dem Bild kleiner. */
.xk-stage { position: relative; container-type: inline-size; --xk-icon: 42px; }
@supports (width: 1cqw) { .xk-stage { --xk-icon: clamp(20px, 4.4cqw, 42px); } }
.xk-icon {
  width: var(--xk-icon); height: var(--xk-icon); padding: calc(0.14 * var(--xk-icon));
  color: inherit;
  background: rgba(16, 16, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  cursor: pointer;
}
.xk-icon img, .xk-icon svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.xk-icon img { object-fit: contain; }
.xk-icon:hover { border-color: #ffab0f; }
.xk-icon:disabled { opacity: 0.35; cursor: default; border-color: rgba(255, 255, 255, 0.25); }
.xk-icon[aria-pressed="true"] { border-color: #ffab0f; box-shadow: 0 0 0 1px #ffab0f; background: rgba(60, 44, 12, 0.9); }
/* Spalte der Auswahlen oben rechts im Bild */
.xk-icon-column { position: absolute; right: 0; margin: 10px; display: flex; flex-direction: column; gap: calc(0.33 * var(--xk-icon)); }
.xk-icon-choice { display: flex; flex-direction: column; gap: calc(0.14 * var(--xk-icon)); }
/* … oder als Zeilen untereinander (Shell.iconPlace mit rows) */
.xk-icon-column.xk-rows { gap: calc(0.14 * var(--xk-icon)); }
.xk-icon-column.xk-rows .xk-icon-choice { flex-direction: row; }
/* einzelner Umschaltknopf am rechten Rand */
.xk-icon-toggle { position: absolute; right: 0; margin: 0 10px; transform: translateY(-50%); }
/* Schieberegler im Bild, unten rechts: Name oben, darunter Regler und Wert */
.xk-slider-drawing {
  position: absolute; right: 0; bottom: 0; margin: 10px;
  display: grid; grid-template-columns: 1fr auto; gap: 1px 8px;
  padding: 5px 10px 6px;
  font-size: 13px;
  background: rgba(16, 16, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
}
.xk-slider-drawing > span { grid-column: 1 / -1; }
.xk-slider-drawing input[type="range"] { width: min(150px, 34cqw); }
/* Schmales Bild: Die Knopfspalte reicht bis unten, der Regler rückt links neben sie. Auf einem Handy im
   Hochformat ist für ihn kein Platz mehr; im Vollbild (Querformat) ist er wieder da. */
@container (max-width: 560px) {
  .xk-slider-drawing { right: calc(var(--xk-icon) + 8px); margin: 6px 10px; padding: 3px 8px 4px; font-size: 11px; }
}
@container (max-width: 480px) {
  .xk-slider-drawing { display: none; }
}
/* Knopf zum Anhalten im Bild, unten links */
.xk-pause { position: absolute; left: 0; bottom: 0; margin: 10px; padding: calc(0.21 * var(--xk-icon)); }
.xk-pause svg { fill: currentColor; }
.xk-pause[aria-pressed="true"] { background: rgba(16, 16, 24, 0.85); }
/* Vollbild-Knopf im Bild, unten links (neben dem Knopf zum Anhalten, wenn der auch im Bild liegt) */
.xk-fullscreen { position: absolute; left: 0; bottom: 0; margin: 10px; padding: calc(0.2 * var(--xk-icon)); }
.xk-fullscreen.xk-beside-pause { left: calc(var(--xk-icon) + 8px); }
/* Im Vollbild füllt das Applet den Schirm: so breit wie möglich, ohne dass Bild und Leiste die Höhe sprengen. */
.xk-root:fullscreen {
  max-width: none; width: 100vw; height: 100vh; border-radius: 0; background: #000;
  display: flex; flex-direction: column; justify-content: center;
}
.xk-root:fullscreen > .xk-stage, .xk-root:fullscreen > .xk-canvas, .xk-root:fullscreen > .xk-controls {
  width: min(100vw, calc((100vh - 48px) * var(--xk-aspect))); margin-left: auto; margin-right: auto; box-sizing: border-box;
}
.xk-toast {
  position: absolute; left: 50%; transform: translateX(-50%);
  margin-top: 12px; padding: 6px 14px; max-width: 80%;
  background: rgba(16, 16, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  text-align: center;
  opacity: 0; transition: opacity 0.25s;
  pointer-events: none;
}
.xk-toast.xk-shown { opacity: 1; }
