@charset "UTF-8";
/*!
 * malves.css
 * Slide-first CSS framework für Vollbild-Kiosk- und Lern-Apps.
 * Teil des tilia-css-Projekts.
 *
 * Farben — Option C Petrol:
 *   Light  --accent: #0369a7   Dark  --accent: #38bdf8
 *
 * Font: Playwrite DE Grund (self-hosted, OFL-Lizenz)
 *   Font-Dateien unter  dist/fonts/playwrite/  ablegen.
 *   Download-Anleitung: siehe _variables.scss
 */
@font-face {
  font-family: "Playwrite DE Grund";
  src: url("fonts/playwrite/PlaywriteDEGrund-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playwrite DE Grund";
  src: url("fonts/playwrite/PlaywriteDEGrund-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
:root {
  --malves-font: 'Playwrite DE Grund', 'Comic Sans MS', cursive, sans-serif;
  --malves-radius: 1rem;
  --malves-radius-sm: 0.5rem;
  --malves-bar-h: 40px;
  --malves-header-h: 32px;
  --malves-anim-dur: 0.45s;
  --bg: #f0f7fb;
  --surface: #ffffff;
  --border: rgba(0, 0, 0, 0.09);
  --text: #0f1c28;
  --text-sub: rgba(15, 28, 40, 0.50);
  --accent: #0369a7;
  --accent-hover: #025d94;
  --accent-bg: rgba(3, 105, 151, 0.08);
  --accent-text: #ffffff;
  --bar-bg: rgba(240, 247, 251, 0.97);
  --bar-border: rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    color-scheme: dark;
    --bg: #0b0f1e;
    --surface: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.12);
    --text: #e8ecf4;
    --text-sub: rgba(232, 236, 244, 0.55);
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --accent-bg: rgba(56, 189, 248, 0.12);
    --accent-text: #0b0f1e;
    --bar-bg: rgba(11, 15, 30, 0.96);
    --bar-border: rgba(255, 255, 255, 0.10);
  }
  :root:not([data-theme=light]) img, :root:not([data-theme=light]) video {
    opacity: 0.85;
  }
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #0b0f1e;
  --surface: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8ecf4;
  --text-sub: rgba(232, 236, 244, 0.55);
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-bg: rgba(56, 189, 248, 0.12);
  --accent-text: #0b0f1e;
  --bar-bg: rgba(11, 15, 30, 0.96);
  --bar-border: rgba(255, 255, 255, 0.10);
}
:root[data-theme=dark] img, :root[data-theme=dark] video {
  opacity: 0.85;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

textarea,
select,
input,
button {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: inherit;
}

img,
video {
  max-width: 100%;
  height: auto;
}

[x-cloak] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--malves-font);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.malves-app {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

.malves-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 4rem;
}

.slide-title {
  font-size: clamp(0.75rem, 1.4vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}

.malves-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem;
  height: var(--malves-header-h);
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
}
.malves-header__title {
  flex: 1 1 auto;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.malves-header__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-sub);
  flex-shrink: 0;
  white-space: nowrap;
}
.malves-header__btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--malves-radius-sm);
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1.5;
}
.malves-header__btn:hover {
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.25);
}

.malves-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 2rem;
  height: var(--malves-bar-h);
  background: var(--bar-bg);
  border-top: 1px solid var(--bar-border);
}
.malves-bar__clock {
  font-size: 1.85rem;
  font-weight: 100;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-width: 5ch;
  line-height: 1;
}
.malves-bar__date {
  font-size: 0.82rem;
  color: var(--text-sub);
  white-space: nowrap;
  line-height: 1.4;
  margin-top: 0.1rem;
}
.malves-bar__spacer {
  flex: 1;
}
.malves-bar__label {
  font-size: 0.82rem;
  color: var(--text-sub);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.malves-prog {
  flex: 0 1 200px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.malves-prog__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.malves-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.malves-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}
.malves-dot.on {
  background: var(--accent);
  transform: scale(1.3);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--malves-radius);
  padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1.5rem, 3.5vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
.card__label {
  font-size: clamp(0.7rem, 1.1vw, 0.9rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-sub);
}
.card__value {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.card__sub {
  font-size: clamp(0.75rem, 1.1vw, 0.95rem);
  color: var(--accent);
  font-weight: 500;
}
.card__hint {
  font-size: clamp(0.75rem, 1.1vw, 0.95rem);
  color: var(--text-sub);
  font-style: italic;
}

.card-grid {
  display: flex;
  gap: clamp(0.75rem, 2vw, 2rem);
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 1400px;
}

.slide-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.slide-arrow {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--malves-radius-sm);
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.88;
  transition: opacity 0.15s;
  user-select: none;
  line-height: 1;
}
.slide-arrow:hover {
  opacity: 1;
}

.slide-dots {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.slide-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.slide-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

.flip-card {
  aspect-ratio: 1;
  cursor: pointer;
  perspective: 600px;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.35s;
  border-radius: var(--malves-radius-sm);
}
.flip-card.flipped .flip-card-inner, .flip-card.matched .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card.matched {
  opacity: 0.55;
  cursor: default;
}
.flip-card-front, .flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--malves-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.flip-card-front {
  background: var(--accent);
}
.flip-card-back {
  transform: rotateY(180deg);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.3rem;
}
.flip-card-back img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.flip-card-back .card-word {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  padding: 0.3rem;
}

.wm-card {
  aspect-ratio: 1;
  cursor: pointer;
  perspective: 600px;
}
.wm-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.35s;
  border-radius: var(--malves-radius-sm);
}
.wm-card.hidden .wm-card-inner {
  transform: rotateY(180deg);
}
.wm-card-front, .wm-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--malves-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wm-card-front {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.3rem;
}
.wm-card-front img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.wm-card-back {
  transform: rotateY(180deg);
  background: var(--accent);
}

.malves-btn {
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--malves-radius-sm);
  background: var(--accent-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.5;
}
.malves-btn:hover {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.malves-btn--primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.malves-btn--primary:hover {
  opacity: 0.88;
}
.malves-btn:disabled, .malves-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.malves-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--text-sub);
  background: var(--bg);
  z-index: 50;
}

.malves-login {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 40;
}
.malves-login__box {
  text-align: center;
  padding: 2.5rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--malves-radius);
  background: var(--surface);
  max-width: 22rem;
  width: 90%;
}
.malves-login__box h1, .malves-login__box h2 {
  color: var(--text);
  font-weight: 400;
  margin-bottom: 0.3rem;
}
.malves-login__subtitle {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.malves-login__btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.8rem;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--malves-radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.15s;
}
.malves-login__btn:hover {
  opacity: 0.88;
}
.malves-login__error {
  margin-top: 0.8rem;
  color: var(--accent);
  font-size: 0.88rem;
}
