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

:root {
  /* tobi-ao-web.png — Mindest-Display mit object-fit:contain (Mindestbreite = 70 % Nav) */
  --tobiao-hero-img-w: 1000;
  --tobiao-hero-img-h: 976;
  --tobiao-nav-accent: #7fd20c;
  /* Social-Footer: 8px Glow (Hover gleiche Größe, Farbe siehe Accent) */
  --tobiao-social-size: 32px;
  --tobiao-social-size-hover: 40px;
  --tobiao-social-slot: 50px;
  --tobiao-social-col-gap: 2px;
  --tobiao-social-glow: drop-shadow(0 0 8px rgba(255, 255, 255, 0.95));
  --tobiao-social-glow-accent: drop-shadow(0 0 8px #bff04a);
  --tobiao-scrollbar-w: 0px;
  /* Overlay: gleiche Ruhe wie zuvor, ohne Grünstich — neutrale Grautöne */
  --tobiao-overlay-surface: #3d4042;
  --tobiao-overlay-head: #171819;
  --tobiao-overlay-border: rgba(255, 255, 255, 0.14);
  --tobiao-overlay-text: #c9cdd0;
  --tobiao-overlay-heading: #ffffff;
  --tobiao-overlay-marker: #7fd20c;
  --tobiao-overlay-pad-top: clamp(118px, 21vh, 224px);
  --tobiao-sb-track: #45484b;
  --tobiao-sb-thumb: #5f6368;
  --tobiao-sb-thumb-hover: #757a80;
}

/* Smartphone: Overlays etwas tiefer (mehr Abstand von oben) */
@media (orientation: portrait) and (max-width: 768px) {
  :root {
    --tobiao-overlay-pad-top: clamp(76px, 15vh, 148px);
  }
}

@media (orientation: landscape) and (max-height: 520px) and (max-width: 932px) {
  :root {
    --tobiao-overlay-pad-top: clamp(52px, 12vh, 112px);
  }
}

/* Grüner Radial unten — absolute am Seitenende (body position: relative), scrollt mit dem Footer auf allen Viewports. */
.tobiao-backdrop-bottom {
  position: absolute;
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(320px, 52vh);
  pointer-events: none;
  z-index: 1;
  overflow: visible;
  --tobiao-bot-glow-w: min(800px, 48vw);
  --tobiao-bot-glow-h: min(132px, 21vh);
  background-image: radial-gradient(
    ellipse 88% 95% at 50% 100%,
    rgba(127, 210, 11, 0.44) 0%,
    rgba(127, 210, 11, 0.14) 48%,
    rgba(127, 210, 11, 0.04) 65%,
    transparent 76%
  );
  background-size: var(--tobiao-bot-glow-w) var(--tobiao-bot-glow-h);
  background-position: center bottom;
  background-repeat: no-repeat;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Smartphone (≤932px): sehr schmale Ellipse; background-size > 100 % bis an die Ränder */
@media (max-width: 932px) {
  :root {
    --tobiao-social-col-gap: 2px;
    --tobiao-social-slot: clamp(42px, 10.5vw, 50px);
  }

  .tobiao-backdrop-bottom {
    height: min(290px, 48vh);
    overflow: visible;
    --tobiao-bot-glow-w: 135%;
    --tobiao-bot-glow-h: min(148px, 26vh);
    background-image: radial-gradient(
      ellipse 42% 100% at 50% 100%,
      rgba(127, 210, 11, 0.44) 0%,
      rgba(127, 210, 11, 0.14) 48%,
      rgba(127, 210, 11, 0.04) 65%,
      transparent 76%
    );
    background-size: var(--tobiao-bot-glow-w) var(--tobiao-bot-glow-h);
    background-position: center bottom;
  }

  .tobiao-backdrop-bottom::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: calc(100% - 24px);
    height: 1px;
    background: rgba(127, 210, 11, 0.5);
    transform: translateX(-50%);
  }
}

/* Smartphone Hochformat: grünes Leuchten deutlich breiter (nach Basis + ≤932-Block) */
@media (max-width: 932px) and (orientation: portrait) {
  .tobiao-backdrop-bottom {
    --tobiao-bot-glow-w: 155%;
    --tobiao-bot-glow-h: min(168px, 30svh);
    background-image: radial-gradient(
      ellipse 52% 100% at 50% 100%,
      rgba(127, 210, 11, 0.44) 0%,
      rgba(127, 210, 11, 0.14) 48%,
      rgba(127, 210, 11, 0.04) 65%,
      transparent 76%
    );
    background-size: var(--tobiao-bot-glow-w) var(--tobiao-bot-glow-h);
    background-position: center bottom;
  }
}

/* Smartphone Querformat: grüner Radial etwas nach oben */
@media (orientation: landscape) and (max-width: 932px) {
  .tobiao-backdrop-bottom {
    --tobiao-bot-glow-w: 118%;
    bottom: 0;
    background-position: center calc(100% - 22px);
  }
}

html {
  height: 100%;
  overflow-x: clip;
}

/* Scroll-Lock: JS setzt --tobiao-scrollbar-w (Messung vor body:fixed); kein html-padding — vermeidet Sprünge in Safari/Fx */
html.tobiao-overlay-open {
  overflow: hidden;
  overscroll-behavior: none;
  height: 100%;
}

body {
  margin: 0;
  position: relative;
  min-height: 100vh;
  min-height: min(100svh, 100dvh);
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow-x: clip;
}

body.tobiao-overlay-open .tobiao-backdrop-bottom {
  right: var(--tobiao-scrollbar-w, 0px);
}

.tobiao-stage {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 12px 32px;
  /* Container für Held-Min-Breite: 70 % entspricht 70 % Toolbar (width: 100 % dieser Fläche) */
  container-type: inline-size;
  container-name: tobiao-stage;
}

.tobiao-logo-wrap {
  position: relative;
  display: block;
  width: min(399px, 94%);
  margin: 16px auto 0;
  text-align: center;
  z-index: 2;
}

.tobiao-logo-wrap img {
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.tobiao-toolbar {
  margin: 14px auto 0;
  padding: 4px 14px;
  width: 100%;
  max-width: 100%;
  background: #7fd20c;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  align-items: center;
  z-index: 3;
  position: relative;
  /* Kein overflow auf der Nav — bei schmalem Fenster umbrechen statt eine Zeile erzwingen */
  overflow-x: visible;
  overflow-y: visible;
}

.tobiao-toolbar button {
  appearance: none;
  border: none;
  cursor: pointer;
  background: #7fd20c;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 7px 14px;
  flex: 1 1 200px;
  min-width: 200px;
  text-align: center;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.tobiao-toolbar button:hover {
  background: ghostwhite;
  color: #111;
}

.tobiao-toolbar button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.tobiao-social {
  display: grid;
  grid-template-columns: repeat(4, var(--tobiao-social-slot));
  column-gap: var(--tobiao-social-col-gap);
  row-gap: 0;
  justify-content: center;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 18px auto 0;
  padding: 0 8px;
  position: relative;
  z-index: 3;
  overflow: visible;
}

.tobiao-footer .tobiao-social {
  margin: 0 auto 10px;
  padding: 0;
  z-index: auto;
}

/* PNG mit Alpha: ~8px drop-shadow folgt nur dem Motiv; Normal weiß / Hover-Fokus-Tap #bff04a — kein box-shadow */
.tobiao-social__link {
  --tb-sb: 1;
  --tb-sc: 1;
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: var(--tobiao-social-slot);
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  overflow: visible;
  background: transparent;
}

.tobiao-social__link img {
  display: block;
  width: var(--tobiao-social-size);
  height: var(--tobiao-social-size);
  object-fit: contain;
  object-position: center;
  background-color: transparent;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center center;
  transition:
    transform 0.22s ease,
    -webkit-filter 0.22s ease,
    filter 0.22s ease;
  -webkit-filter: brightness(var(--tb-sb)) contrast(var(--tb-sc)) var(--tobiao-social-glow);
  filter: brightness(var(--tb-sb)) contrast(var(--tb-sc)) var(--tobiao-social-glow);
}

.tobiao-social__link:nth-child(1),
.tobiao-social__link:nth-child(3),
.tobiao-social__link:nth-child(4) {
  --tb-sb: 1.09;
  --tb-sc: 1.05;
}

.tobiao-social__link:hover,
.tobiao-social__link:focus-visible,
.tobiao-social__link:active {
  z-index: 1;
}

.tobiao-social__link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.tobiao-social__link:focus-visible img {
  -webkit-filter: brightness(var(--tb-sb)) contrast(var(--tb-sc)) var(--tobiao-social-glow-accent);
  filter: brightness(var(--tb-sb)) contrast(var(--tb-sc)) var(--tobiao-social-glow-accent);
  transform: translate3d(0, 0, 0) scale(calc(var(--tobiao-social-size-hover) / var(--tobiao-social-size)));
}

@media (hover: hover) {
  .tobiao-social__link:hover img {
    -webkit-filter: brightness(var(--tb-sb)) contrast(var(--tb-sc)) var(--tobiao-social-glow-accent);
    filter: brightness(var(--tb-sb)) contrast(var(--tb-sc)) var(--tobiao-social-glow-accent);
    transform: translate3d(0, 0, 0) scale(calc(var(--tobiao-social-size-hover) / var(--tobiao-social-size)));
  }
}

.tobiao-social__link:active img {
  -webkit-filter: brightness(var(--tb-sb)) contrast(var(--tb-sc)) var(--tobiao-social-glow-accent);
  filter: brightness(var(--tb-sb)) contrast(var(--tb-sc)) var(--tobiao-social-glow-accent);
  transform: translate3d(0, 0, 0) scale(calc(var(--tobiao-social-size-hover) / var(--tobiao-social-size)));
}

.tobiao-hero {
  position: relative;
  width: min(1000px, 100%);
  margin: 24px auto 0;
  z-index: 1;
  background: transparent;
}

.tobiao-hero__stack {
  position: relative;
  display: flow-root;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  line-height: 0;
  /* kein isolation: Safari/WebKit konnte Blur-Layer trotz z-index unter dem Held rendern */
  overflow: visible;
}

.tobiao-hero__img--base {
  display: block;
  /* width:auto + max-height: ohne object-fit wirkt wie „Gestauchel“ bei fester Pixelbreite */
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
  margin: 0 auto;
  vertical-align: top;
  background: transparent;
  position: relative;
  z-index: 0;
  transform: translateZ(0);
  backface-visibility: visible;
  /* Mindestbreite: 70 % der Stage (Fallback vw); mit Container-Queries: 100cqw statt Viewport */
  --tobiao-hero-min-w-fallback: calc(0.7 * max(0px, min(100vw, 1060px) - 24px));
  min-width: var(--tobiao-hero-min-w-fallback);
  min-height: calc(var(--tobiao-hero-min-w-fallback) * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w));
  max-height: max(
    0px,
    calc(100svh - clamp(200px, 34svh, 440px)),
    calc(var(--tobiao-hero-min-w-fallback) * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w))
  );
}

@supports (width: 1cqw) {
  .tobiao-hero__img--base {
    --tobiao-hero-min-w-fallback: calc(0.7 * max(0px, 100cqw - 24px));
    min-width: 70cqw;
    min-height: calc(70cqw * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w));
    max-height: max(
      0px,
      calc(100svh - clamp(200px, 34svh, 440px)),
      calc(70cqw * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w))
    );
  }
}

/* Kein separates 100dvh für das Held-<img>; dvh auf Smartphones beim Scroll inkonsistent */

/* Smartphone: Footer unter dem Bild (nicht über der Bildunterkante). */
@media (max-width: 932px) {
  .tobiao-footer {
    position: static;
    left: auto;
    bottom: auto;
    z-index: auto;
    transform: none;
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    margin-top: auto;
  }
}

/* Smartphone Hochformat: größere vertikale Reservierung (2×2-Toolbar, Logo, Footer, Safe Area). */
@media (max-width: 932px) and (orientation: portrait) {
  .tobiao-stage {
    padding-bottom: 20px;
  }

  .tobiao-logo-wrap {
    margin-top: 12px;
  }

  .tobiao-toolbar {
    margin-top: 10px;
  }

  .tobiao-hero {
    margin-top: 14px;
  }

  .tobiao-hero__img--base {
    max-height: max(
      0px,
      calc(100svh - clamp(300px, 48svh, 520px)),
      calc(var(--tobiao-hero-min-w-fallback) * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w))
    );
  }

  @supports (width: 1cqw) {
    .tobiao-hero__img--base {
      max-height: max(
        0px,
        calc(100svh - clamp(300px, 48svh, 520px)),
        calc(70cqw * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w))
      );
    }
  }
}

/* Smartphone Querformat: großzügiger; max-height nie unter Mindest-Display (70 % Nav × Seitenverhältnis) */
@media (orientation: landscape) and (max-width: 932px) {
  .tobiao-hero__img--base {
    min-height: max(
      300px,
      calc(var(--tobiao-hero-min-w-fallback) * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w))
    );
    max-height: max(
      min(96svh, calc(100svh - clamp(36px, 7svh, 72px))),
      calc(var(--tobiao-hero-min-w-fallback) * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w)),
      300px
    );
  }

  @supports (width: 1cqw) {
    .tobiao-hero__img--base {
      min-width: 70cqw;
      min-height: max(300px, calc(70cqw * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w)));
      max-height: max(
        min(96svh, calc(100svh - clamp(36px, 7svh, 72px))),
        calc(70cqw * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w)),
        300px
      );
    }
  }

  @supports not (width: 1svw) {
    .tobiao-hero__img--base {
      --tobiao-hero-min-w-fallback: calc(0.7 * max(0px, min(100vw, 1060px) - 24px));
      min-height: max(
        300px,
        calc(var(--tobiao-hero-min-w-fallback) * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w))
      );
      max-height: max(
        min(96vh, calc(100vh - clamp(36px, 7vh, 72px))),
        calc(var(--tobiao-hero-min-w-fallback) * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w)),
        300px
      );
    }
  }
}

/* Exakt gleiche Fläche wie das Basis-<img>; kein Grid (vermeidet Subpixel beim Opacity-Zap) */

/* Blur liegt in einem Wrapper: iOS animiert opacity auf <img> oft nicht; Events fehlen. */
.tobiao-hero__flash-sheet.tobiao-blurpeek-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 0;
  pointer-events: none;
  z-index: 2;
  transform: translateZ(0);
  backface-visibility: visible;
  overflow: visible;
  opacity: 0;
  /* JS setzt opacity mit !important während des Blitzes (WebKit überschreibt sonst gern) */
}

.tobiao-hero__flash-sheet .tobiao-hero__img--flash {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: contain;
  object-position: center top;
  vertical-align: top;
  pointer-events: none;
  transform: translateZ(0);
  backface-visibility: visible;
}

/* Transparente Augen-PNG über dem Blur-Blitz (z-index höher) */
.tobiao-hero__eyes-sheet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 0;
  pointer-events: none;
  z-index: 3;
  transform: translateZ(0);
  backface-visibility: visible;
  overflow: visible;
  opacity: 0;
}

.tobiao-hero__eyes-sheet .tobiao-hero__img--eyes {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: contain;
  object-position: center top;
  vertical-align: top;
  pointer-events: none;
  transform: translateZ(0);
  backface-visibility: visible;
}

@-webkit-keyframes tobiao-eyespeek {
  0%,
  100% {
    opacity: 0;
  }

  10%,
  90% {
    opacity: 1;
  }
}

@keyframes tobiao-eyespeek {
  0%,
  100% {
    opacity: 0;
  }

  10%,
  90% {
    opacity: 1;
  }
}

.tobiao-hero__eyes-sheet.is-tobiao-eyes-flash {
  will-change: opacity;
  -webkit-animation: tobiao-eyespeek 150ms cubic-bezier(0.4, 0, 0.6, 1) forwards;
  animation: tobiao-eyespeek 150ms cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .tobiao-hero__eyes-sheet.is-tobiao-eyes-flash {
    -webkit-animation: none;
    animation: none;
  }

  .tobiao-hero__eyes-sheet {
    will-change: auto;
  }
}

/* Nur Tablet (933–1366px): Verlauf + Footer am Viewport-Rand, vor dem Hero (nicht darunter). */
@media (min-width: 933px) and (max-width: 1366px) {
  .tobiao-stage {
    z-index: 1;
    padding-bottom: 0;
  }

  .tobiao-backdrop-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    opacity: 1;
    visibility: visible;
    z-index: 2;
    height: min(148px, 24vh);
    --tobiao-bot-glow-w: 100vw;
    --tobiao-bot-glow-h: min(148px, 24vh);
    background-position: center bottom;
    background-size: var(--tobiao-bot-glow-w) var(--tobiao-bot-glow-h);
    pointer-events: none;
  }

  .tobiao-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    width: 100%;
    max-width: none;
    margin: 0;
    transform: none;
    padding: 12px max(12px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-right, 0px));
    text-align: center;
    box-sizing: border-box;
    pointer-events: auto;
  }

  .tobiao-footer .tobiao-social {
    margin: 0 auto 8px;
    width: fit-content;
    max-width: 1060px;
  }

  .tobiao-footer p {
    max-width: 1060px;
    margin-left: auto;
    margin-right: auto;
  }

  .tobiao-hero {
    position: relative;
    z-index: 1;
    width: auto;
    max-width: none;
    margin: 18px auto 0;
    overflow: visible;
  }

  .tobiao-hero__stack {
    margin-inline: auto;
  }

  .tobiao-hero__img--base {
    --tobiao-hero-tablet-w: min(62cqw, 640px);
    /* Reserve oben (Logo/Nav) + unten (Footer/Verlauf) → Bild reicht bis in den Footer-Bereich */
    --tobiao-tablet-chrome-h: clamp(152px, 22svh, 252px);
    min-width: 0;
    width: auto;
    max-width: var(--tobiao-hero-tablet-w);
    min-height: 0;
    max-height: max(
      0px,
      calc(100svh - var(--tobiao-tablet-chrome-h)),
      calc(var(--tobiao-hero-tablet-w) * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w))
    );
    margin-inline: auto;
    object-position: center top;
  }

  @supports not (width: 1cqw) {
    .tobiao-hero__img--base {
      --tobiao-hero-tablet-w: min(62vw, 640px);
    }
  }
}

/* Desktop (≥1367px): Footer + Verlauf unten bündig (Seitenende / kurze Viewports). */
@media (min-width: 1367px) {
  .tobiao-backdrop-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(320px, 52vh);
    --tobiao-bot-glow-w: min(800px, 48vw);
    --tobiao-bot-glow-h: min(132px, 21vh);
  }

  .tobiao-footer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 3;
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    transform: none;
    flex-shrink: 0;
  }

  .tobiao-hero__img--base {
    width: auto;
    max-width: min(1000px, 100%);
    /* Kein 100dvh; max-height nie unter dem, was für 70 % Nav-Breite nötig ist */
    max-height: max(
      calc(100svh - clamp(268px, 31svh, 400px)),
      calc(var(--tobiao-hero-min-w-fallback) * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w))
    );
    margin-inline: auto;
  }

  @supports (width: 1cqw) {
    .tobiao-hero__img--base {
      max-height: max(
        calc(100svh - clamp(268px, 31svh, 400px)),
        calc(70cqw * var(--tobiao-hero-img-h) / var(--tobiao-hero-img-w))
      );
    }
  }
}

/* Ruhezustand: kein will-change (sonst eigener Compositor beim Ein/Aus-Zappen) */

/* Opacity nur auf dem Flash-Wrapper (einziger .tobiao-blurpeek-layer) */
@-webkit-keyframes tobiao-blurpeek {
  0% {
    opacity: 0;
  }

  28% {
    opacity: 1;
  }

  42% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes tobiao-blurpeek {
  0% {
    opacity: 0;
  }

  28% {
    opacity: 1;
  }

  42% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.tobiao-hero__flash-sheet.tobiao-blurpeek-layer.is-tobiao-blur-flash {
  will-change: opacity;
  -webkit-animation: tobiao-blurpeek 140ms cubic-bezier(0.35, 0, 0.55, 1) forwards;
  animation: tobiao-blurpeek 140ms cubic-bezier(0.35, 0, 0.55, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .tobiao-hero__flash-sheet.tobiao-blurpeek-layer.is-tobiao-blur-flash {
    -webkit-animation: none;
    animation: none;
  }

  .tobiao-hero__flash-sheet.tobiao-blurpeek-layer {
    will-change: auto;
  }
}

.tobiao-footer {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  margin-top: auto;
  padding: 12px calc(12px + env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px))
    calc(12px + env(safe-area-inset-left, 0px));
  text-align: center;
  font-size: 10px;
  line-height: 1.25;
  color: #858585;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.tobiao-footer a {
  color: #a3a3a3;
}

/* klangwerkMedia brand text gradient (orange → gold) */
.tobiao-kw-brand {
  background: linear-gradient(90deg, orange, gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.tobiao-footer__kw {
  position: relative;
  background: linear-gradient(90deg, orange, gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-decoration: none;
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  font-weight: inherit;
  font-style: inherit;
  vertical-align: baseline;
}

.tobiao-footer__kw::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, orange, gold);
  opacity: 0;
}

.tobiao-footer__kw:hover,
.tobiao-footer__kw:focus-visible {
  color: transparent;
  text-decoration: none;
  outline: none;
}

.tobiao-footer__kw:hover::after,
.tobiao-footer__kw:focus-visible::after {
  opacity: 1;
}

.tobiao-footer p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.tobiao-foot-imprint-btn {
  background: none;
  border: none;
  color: #a3a3a3;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  font-weight: inherit;
  vertical-align: baseline;
}

.tobiao-foot-imprint-btn:hover {
  color: #c0c0c0;
}

/* Overlays */
.tobiao-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--tobiao-overlay-pad-top) 14px 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}

.tobiao-overlay[aria-hidden='false'] {
  opacity: 1;
  visibility: visible;
}

.tobiao-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.tobiao-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(calc(100vh - var(--tobiao-overlay-pad-top) - 32px), 720px);
  margin-top: 0;
  display: flex;
  flex-direction: column;
  background: var(--tobiao-overlay-surface);
  border: 1px solid var(--tobiao-overlay-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65);
  color-scheme: dark;
}

.tobiao-overlay__panel--wide {
  width: min(720px, 100%);
  max-height: min(calc(100vh - var(--tobiao-overlay-pad-top) - 32px), 820px);
}

@media (orientation: portrait) and (max-width: 768px) {
  .tobiao-overlay__panel {
    max-height: min(calc(100vh - var(--tobiao-overlay-pad-top) - 36px), 716px);
  }

  .tobiao-overlay__panel--wide {
    max-height: min(calc(100vh - var(--tobiao-overlay-pad-top) - 36px), 816px);
  }
}

.tobiao-overlay__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--tobiao-overlay-head);
  border-bottom: 1px solid var(--tobiao-overlay-border);
}

.tobiao-overlay__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--tobiao-overlay-heading);
}

/* Punkt wie klangwerk.de (.h2__marker), Site-Akzent Grün */
.tobiao-overlay__title-marker {
  display: inline-block;
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--tobiao-overlay-marker);
  box-shadow: 0 0 16px rgba(127, 210, 12, 0.5);
  transform: translateY(-1px);
}

.tobiao-overlay__x {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.tobiao-overlay__x:hover {
  background: rgba(255, 255, 255, 0.16);
}

.tobiao-overlay__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 18px 22px;
  text-align: left;
  color: var(--tobiao-overlay-text);
  scrollbar-width: thin;
  scrollbar-color: var(--tobiao-sb-thumb) var(--tobiao-sb-track);
}

.tobiao-overlay__body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.tobiao-overlay__body::-webkit-scrollbar-track {
  background: var(--tobiao-sb-track);
  border-radius: 999px;
}

.tobiao-overlay__body::-webkit-scrollbar-thumb {
  background: var(--tobiao-sb-thumb);
  border-radius: 999px;
  border: 2px solid var(--tobiao-sb-track);
}

.tobiao-overlay__body::-webkit-scrollbar-thumb:hover {
  background: var(--tobiao-sb-thumb-hover);
}

.tobiao-overlay__body::-webkit-scrollbar-corner {
  background: var(--tobiao-sb-track);
}

.tobiao-overlay__body .impressum-h3 {
  font-size: 1rem;
  margin: 1rem 0 0.5rem;
  font-weight: 700;
  color: var(--tobiao-overlay-heading);
}

.tobiao-overlay__body .impressum-h3:first-child {
  margin-top: 0;
}

.tobiao-overlay__body .impressum-contact p {
  margin: 0;
}

.tobiao-overlay__body .impressum-contact a {
  color: #9fe06a;
}

.tobiao-overlay__body p {
  margin: 0.55rem 0 0;
}

.tobiao-overlay__body strong {
  color: #e8eeea;
}

.tobiao-about em {
  color: #dde4df;
}

.tobiao-overlay__body label {
  color: #dde4df;
}

.tobiao-overlay__body .tobiao-about {
  color: var(--tobiao-overlay-text);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.tobiao-about {
  text-align: justify;
}

.tobiao-about b {
  font-weight: 700;
}

/* Spotify */
.tobiao-spotify-iframe {
  display: block;
  width: 100%;
  height: min(560px, 62vh);
  min-height: 280px;
  border: 0;
  border-radius: 8px;
}

.tobiao-spotify-placeholder {
  background: rgba(255, 255, 255, 0.08);
  padding: 14px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.tobiao-spotify-placeholder code {
  font-size: 0.85em;
}

.tobiao-spotify-placeholder a {
  color: #9fe06a;
}

/* Contact */
.tobiao-contact-form label {
  display: block;
  margin-bottom: 0.75rem;
}

.tobiao-contact-form input[type='text'],
.tobiao-contact-form input[type='email'],
.tobiao-contact-form input[type='number'],
.tobiao-contact-form textarea {
  width: 100%;
  max-width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: #2f3234;
  color: #f0f4f1;
  font: inherit;
}

.tobiao-contact-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.tobiao-contact-form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.tobiao-contact-form button[type='submit'] {
  padding: 0.55rem 1.35rem;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  background: #7fd20c;
  color: #111;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tobiao-contact-form button[type='submit']:hover:not(:disabled) {
  background: #fff;
  color: #111;
}

.tobiao-contact-form button[type='submit']:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#tobiao-contact-msg {
  margin-top: 12px;
  font-size: 0.9rem;
}

#tobiao-contact-msg.tobiao-msg-ok {
  color: #9fe06a;
}

#tobiao-contact-msg.tobiao-msg-err {
  color: #ff8c8c;
}

@media (max-width: 768px) {
  .tobiao-footer .tobiao-social {
    padding-inline: clamp(12px, 4vw, 22px);
    /* Safe-Area nur im Footer-Padding, nicht doppelt über margin-bottom */
    margin-bottom: 10px;
  }

  .tobiao-social {
    padding-inline: clamp(8px, 3.5vw, 18px);
  }
}

@media (max-height: 430px) and (orientation: landscape) {
  .tobiao-footer .tobiao-social {
    padding-inline: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    margin-bottom: 10px;
  }
}

/* Hochformat ≤520px: 2×2-Grid (Ausnahme: kein eine-Zeile-Scroll) */
@media (max-width: 520px) and (orientation: portrait) {
  .tobiao-toolbar {
    margin: 8px auto 0;
    padding: 4px 8px;
    gap: 3px;
    flex-wrap: wrap;
    overflow-x: visible;
    overflow-y: visible;
    justify-content: center;
  }

  .tobiao-toolbar button {
    flex: 0 1 calc(50% - 6px);
    min-width: calc(50% - 6px);
    max-width: calc(50% - 6px);
    font-size: 14px;
  }

  .tobiao-toolbar button:nth-child(1),
  .tobiao-toolbar button:nth-child(3) {
    text-align: right;
    padding-inline: 10px;
  }

  .tobiao-toolbar button:nth-child(2),
  .tobiao-toolbar button:nth-child(4) {
    text-align: left;
    padding-inline: 10px;
  }
}

/* Querformat-Smartphone: alle vier Buttons in einer Zeile (Margins wie Standard) */
@media (orientation: landscape) and (max-width: 932px) and (max-height: 520px) {
  .tobiao-toolbar {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 3px;
  }

  .tobiao-toolbar button {
    flex: 1 1 0;
    min-width: 0;
    font-size: clamp(10px, 2.5vw, 13px);
    padding: 7px 5px;
  }
}
