/* Aussehen dessen, was beim Applet „Little Boy“ über dem Bild liegt: Titel, Zähler, Ergebnis, Bedienfeld.
   Alle Maße hängen an der Breite des Bildes (1cqw = ein Hundertstel davon), damit die Teile mit dem Bild groß
   und klein werden; --lb ist ein Bildpunkt bei 960 Pixeln Bildbreite. */

/* Schrift des Titels wie im Unity-Original: Roboto Light (Apache-Lizenz 2.0, siehe CREDITS.md) */
@font-face {
  font-family: "Roboto Light";
  src: url("assets/fonts/roboto-light-latin.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}

.xk-stage { --lb: 1px; }
@supports (width: 1cqw) { .xk-stage { --lb: calc(100cqw / 960); } }

.xk-canvas.lb-turnable { cursor: grab; touch-action: pinch-zoom; }
.xk-canvas.lb-turning { cursor: grabbing; }

.lb-title, .lb-status { position: absolute; left: 0; margin: 0 calc(16 * var(--lb)); color: #fff; pointer-events: none; }
.lb-title { top: calc(8 * var(--lb)); font-family: "Roboto Light", "Roboto", "Segoe UI Light", "Segoe UI", system-ui, sans-serif; font-weight: 300; }
.lb-name { font-size: calc(36 * var(--lb)); line-height: 1.1; }
.lb-sub { font-size: calc(16 * var(--lb)); line-height: 1.2; margin-left: calc(2 * var(--lb)); }

/* über den Bildknöpfen des Baukastens unten links */
.lb-status { bottom: calc(var(--xk-icon) + 20px); font-family: "Roboto Light", "Roboto", "Segoe UI", system-ui, sans-serif; font-weight: 300; }
.lb-verdict { font-size: calc(36 * var(--lb)); line-height: 1.25; min-height: 1.25em; }
.lb-counter { font-size: max(11px, calc(18 * var(--lb))); font-variant-numeric: tabular-nums; }

.lb-panel {
  position: absolute; right: 0; bottom: 0; margin: 10px;
  display: grid; gap: calc(5 * var(--lb));
  padding: calc(7 * var(--lb)) calc(9 * var(--lb));
  font-size: max(9px, calc(11 * var(--lb)));
  color: #e6e8ec;
  background: rgba(16, 16, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
}
.lb-panel[hidden] { display: none; }
.lb-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: calc(6 * var(--lb)); }
.lb-panel button {
  padding: calc(4 * var(--lb)) calc(9 * var(--lb));
  font: inherit; font-size: 1.05em;
  color: inherit;
  background: #23262c;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 5px;
  cursor: pointer;
}
.lb-panel button:hover:not(:disabled) { border-color: #ffab0f; background: #2f333b; }
.lb-panel button:disabled { opacity: 0.4; cursor: default; }
/* der nächste sinnvolle Schritt ist hervorgehoben: erst Start, nach der Wertung Zurücksetzen */
.lb-panel .lb-start:not(:disabled), .lb-panel .lb-reset.lb-next { color: #101018; background: #ffab0f; border-color: #ffab0f; }
.lb-panel .lb-start:hover:not(:disabled), .lb-panel .lb-reset.lb-next:hover { background: #ffbe45; }
.lb-check { display: flex; align-items: center; gap: calc(6 * var(--lb)); cursor: pointer; }
.lb-check input { width: 1.15em; height: 1.15em; margin: 0; accent-color: #ffab0f; cursor: pointer; }
.lb-check input:disabled, .lb-check input:disabled + span { opacity: 0.4; cursor: default; }
.lb-slider { display: grid; grid-template-columns: 1fr auto; gap: calc(2 * var(--lb)) calc(6 * var(--lb)); align-items: center; }
.lb-slider > span { grid-column: 1 / -1; }
.lb-slider input { width: calc(110 * var(--lb)); min-width: 60px; margin: 0; accent-color: #ffab0f; cursor: pointer; }
.lb-slider output { min-width: 5.6em; text-align: right; font-variant-numeric: tabular-nums; }
.lb-panel :is(button, input):focus-visible { outline: 2px solid #ffab0f; outline-offset: 2px; }

/* Namensnennung des Hüllenmodells in der Leiste unter dem Bild, vor der Versionsnummer */
.xk-controls .lb-credit { margin-left: auto; color: #9aa2ad; font-size: 12px; }
.lb-credit a { color: inherit; }
.lb-credit a:is(:hover, :focus-visible) { color: #e6e8ec; }
.xk-controls .lb-credit + .xk-version { margin-left: 0; }

/* Schmales Bild (Handy im Hochformat): kein Untertitel, und vom Feld bleiben nur die beiden Knöpfe, damit das
   Modell zu sehen ist. Im Vollbild (Querformat) sind Schalter und Regler wieder da. */
@container (max-width: 560px) {
  .lb-sub { display: none; }
  .lb-panel { margin: 6px; padding: 5px 6px; }
  .lb-status { bottom: calc(var(--xk-icon) + 12px); }
}
@container (max-width: 480px) {
  .lb-check, .lb-slider { display: none; }
}
