/* Barlow Condensed (SIL OFL 1.1, assets/fonts/OFL-BarlowCondensed.txt) – nur für das Teilen-Bild, selbst gehostet. */
@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/BarlowCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("../assets/fonts/BarlowCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/Outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Passion One";
  src: url("../assets/fonts/PassionOne-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html, body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #1a2430;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: "Outfit", "Trebuchet MS", "Segoe UI", sans-serif;
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  width: 100dvw;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

#game canvas {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
}

#hud-overlay {
  display: none;
  position: fixed;
  top: auto;
  right: auto;
  left: 50%;
  bottom: calc(12px + var(--legal-footer-h, 32px));
  transform: translateX(-50%);
  z-index: 20;
  pointer-events: auto;
  background: rgba(36, 48, 64, 0.92);
  border: 3px solid #1f2933;
  border-radius: 14px;
  padding: 8px 12px;
  color: #fff;
  font-family: "Outfit", "Trebuchet MS", sans-serif;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  align-items: center;
}
#hud-overlay.visible {
  display: flex;
}
#hud-overlay label {
  white-space: nowrap;
}
#nickname-input {
  width: 8.5em;
  border: 2px solid #1f2933;
  border-radius: 8px;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #1f2933;
  background: #f4f7fa;
}
#nickname-input:focus {
  outline: 2px solid #ff6b1a;
  border-color: #ff6b1a;
}

#legal-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35em 0.55em;
  min-height: 32px;
  padding: 6px 10px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  background: rgba(26, 36, 48, 0.92);
  color: #f4f7fa;
  font-family: "Outfit", "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: auto;
  -webkit-user-select: auto;
}
#legal-footer a,
#legal-footer button {
  color: #f4f7fa;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
#legal-footer a:focus,
#legal-footer button:focus {
  outline: 2px solid #ff6b1a;
  outline-offset: 2px;
}

#privacy-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(26, 36, 48, 0.72);
  pointer-events: auto;
  touch-action: auto;
  user-select: text;
  -webkit-user-select: text;
}
#privacy-overlay.open {
  display: flex;
}
#privacy-overlay[hidden] {
  display: none !important;
}
.privacy-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(80dvh, 640px);
  overflow: auto;
  background: #f4f7fa;
  color: #1f2933;
  border: 3px solid #1f2933;
  border-radius: 16px;
  padding: 20px 20px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
.privacy-dialog h2 {
  font-family: "Passion One", "Outfit", sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  padding-right: 4.5em;
  line-height: 1.2;
}
.privacy-dialog p {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
#privacy-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 2px solid #1f2933;
  border-radius: 10px;
  background: #ff6b1a;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
}
#privacy-close:focus {
  outline: 2px solid #2e86ab;
  outline-offset: 2px;
}

#reward-card {
  display: none;
  position: fixed;
  z-index: 25;
  pointer-events: auto;
  touch-action: auto;
  user-select: text;
  -webkit-user-select: text;
}
#reward-card.open {
  display: flex;
  flex-direction: column;
}
#reward-card[hidden] {
  display: none !important;
}
#reward-card .reward-panel {
  width: 100%;
  max-height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(36, 48, 64, 0.96);
  border: 3px solid #1f2933;
  border-radius: 14px;
  padding: 14px 14px 8px;
  color: #f4f7fa;
  text-align: center;
  box-sizing: border-box;
}
#reward-headline {
  font-family: "Passion One", "Outfit", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  color: #8ee0b0;
  margin: 0 0 6px;
}
#reward-body,
#reward-locked-rest {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
}
#reward-body strong,
.reward-code {
  color: #ff8c42;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.reward-code-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.reward-code {
  display: inline-block;
  font-size: 22px;
  background: #1a2430;
  border: 2px solid #1f2933;
  border-radius: 8px;
  padding: 4px 10px;
}
#reward-copy {
  border: 2px solid #1f2933;
  border-radius: 10px;
  background: #2e86ab;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 8px 14px;
  min-height: 40px;
  cursor: pointer;
}
#reward-copy:focus,
.reward-cta:focus {
  outline: 2px solid #ff8c42;
  outline-offset: 2px;
}
.reward-fineprint {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: #d6dde6;
  margin: 6px 0 0;
  text-align: left;
}
.reward-terms {
  margin: 10px 0 0;
}
.reward-terms summary {
  display: inline-block;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #c5e8f7;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 6px 10px;
  list-style: none;
}
.reward-terms summary::-webkit-details-marker {
  display: none;
}
.reward-terms summary::after {
  content: " \25BE";
}
.reward-terms[open] summary::after {
  content: " \25B4";
}
.reward-locked-title {
  font-size: 17px;
  font-weight: 800;
  margin: 2px 0 0;
}
#reward-card.is-locked .reward-fineprint {
  margin-bottom: 0;
}
.reward-cta {
  display: inline-block;
  background: #ff6b1a;
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  border: 3px solid #1f2933;
  border-radius: 12px;
  padding: 11px 18px;
  box-shadow: 0 3px 0 #1f2933;
}
@media (max-height: 760px) {
  #reward-headline {
    font-size: 18px;
  }
  #reward-body,
  #reward-locked-rest {
    font-size: 13px;
  }
  .reward-code {
    font-size: 16px;
  }
}

/* Ton-Schalter: runder Button links über der Fußzeile, Panel mit Musik/Effekte. */
#legal-footer #sound-toggle {
  position: absolute;
  left: max(8px, env(safe-area-inset-left));
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #f4f7fa;
  background: #ff6b1a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
#legal-footer {
  padding-left: 50px;
  padding-right: 10px;
}
#sound-toggle .ico-off { display: none; }
#legal-footer #sound-toggle.is-off { background: #5c6570; }
#sound-toggle.is-off .ico-on { display: none; }
#sound-toggle.is-off .ico-off { display: block; }
#sound-toggle:focus-visible { outline: 3px solid #2e86ab; outline-offset: 2px; }
#sound-panel {
  position: fixed;
  left: max(10px, env(safe-area-inset-left));
  bottom: calc(var(--legal-footer-h, 32px) + 8px);
  z-index: 36;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: rgba(36, 48, 64, 0.97);
  border: 3px solid #1f2933;
  border-radius: 14px;
}
#sound-panel[hidden] { display: none; }
#sound-panel button {
  min-width: 150px;
  min-height: 44px;
  border: 2px solid #1f2933;
  border-radius: 10px;
  font-family: "Outfit", "Trebuchet MS", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: #5c6570;
  cursor: pointer;
}
#sound-panel button[aria-pressed="true"] { background: #2e86ab; }

/* Namensnennung Musik (CC BY 4.0) – eigene, kleine Zeile in der Fußzeile */
#legal-footer .music-credit {
  flex-basis: 100%;
  margin: 0;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
  opacity: 0.85;
  text-align: center;
}
#legal-footer .music-credit a {
  font-weight: 600;
}

/* 0.5.0: Rabattstaffel – Fortschrittszeile, kompaktere Karte */
.reward-progress {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffd27a;
  margin: 0 0 8px;
}
#reward-card.is-triple #reward-headline {
  color: #ffd27a;
}
#reward-card .reward-panel {
  padding: 10px 12px 4px;
}
.reward-code-row {
  margin: 0 0 6px;
}
.reward-cta {
  font-size: 15px;
  padding: 8px 16px;
}
.reward-terms {
  margin: 4px 0 0;
}
@media (max-height: 700px) {
  #reward-headline { font-size: 17px; margin-bottom: 4px; }
  .reward-progress { font-size: 12px; margin-bottom: 6px; }
  #reward-copy { min-height: 34px; padding: 5px 12px; }
  .reward-cta { padding: 6px 14px; }
  .reward-terms summary { padding: 4px 10px; }
}
