:root {
  --bg: #005538;
  --fg: #f5f1e9;
  --accent: #fff17a;
  --muted: color-mix(in srgb, var(--fg) 62%, var(--bg));
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
}

.wall {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
  padding: 3.2vh 3.4vw 3vh;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.wall.idle {
  cursor: none;
}

.wall-q {
  margin: 0;
  font-size: clamp(1.6rem, 3.6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.005em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

.wall-stage {
  position: relative;
  min-height: 0;
  margin: 2vh 0;
}

.wall-cloud {
  position: absolute;
  inset: 0;
}

.wall-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4vw;
}

.wall-empty-text {
  max-width: 34vw;
}

.wall-empty-title {
  margin: 0 0 1.2vh;
  font-size: clamp(1.4rem, 3vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.005em;
}

.wall-empty-url {
  margin: 0;
  font-size: clamp(1rem, 1.9vw, 2.2rem);
  font-weight: 700;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.qr-card {
  background: #fff;
  border-radius: 1.4vh;
  padding: 1vh;
  line-height: 0;
  flex: none;
}

.qr-card img {
  display: block;
  width: 16vh;
  height: 16vh;
  image-rendering: pixelated;
}

.qr-card--big {
  border-radius: 2.4vh;
  padding: 2vh;
}

.qr-card--big img {
  width: min(46vh, 36vw);
  height: min(46vh, 36vw);
}

.wall-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3vw;
  min-height: 16vh;
}

.wall-stats {
  display: flex;
  gap: 2.6vw;
  align-items: baseline;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.35vw, 1.6rem);
}

.wall-stats p {
  margin: 0;
}

.wall-stats strong {
  color: var(--fg);
  font-weight: 700;
  font-size: 1.5em;
  font-variant-numeric: tabular-nums;
  margin-right: 0.15em;
}

.wall-closed {
  color: var(--fg);
  font-weight: 700;
}

.wall-join {
  display: flex;
  align-items: center;
  gap: 1.6vw;
  text-align: right;
}

.wall-join-text {
  display: flex;
  flex-direction: column;
}

.wall-join-label {
  color: var(--muted);
  font-size: clamp(0.85rem, 1.2vw, 1.4rem);
}

.wall-join-url {
  font-weight: 700;
  font-size: clamp(1rem, 1.7vw, 2.1rem);
  letter-spacing: -0.01em;
}

.wall-fs {
  position: fixed;
  top: 14px;
  right: 14px;
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--fg) 14%, var(--bg));
  color: var(--fg);
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.wall:not(.idle) .wall-fs {
  opacity: 1;
}

.wall-fs:focus-visible {
  opacity: 1;
  outline: 3px solid var(--accent);
}

.wall-offline {
  position: fixed;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--fg) 14%, var(--bg));
  font-weight: 700;
}

/* Hochformat/Handy: Fußzeile kompakter */
@media (max-aspect-ratio: 1/1) {
  .wall-empty {
    flex-direction: column;
    text-align: center;
  }
  .wall-empty-text {
    max-width: 80vw;
  }
  .qr-card--big img {
    width: min(60vw, 40vh);
    height: min(60vw, 40vh);
  }
  .wall-join .qr-card {
    display: none;
  }
}
