@font-face { font-family: "Grenze Gotisch"; src: url(fonts/grenze-gotisch-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url(fonts/playfair-display-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(fonts/cormorant-garamond-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; overflow: hidden; background: #03061a; }
body {
  color: #fff6dc;
  font: 600 clamp(1.1rem, 4.9vw, 1.4rem)/1.32 "Cormorant Garamond", Georgia, serif;
  -webkit-text-size-adjust: 100%;
  text-shadow: 0 1px 8px rgba(5, 10, 36, .9);
}

/* Handy-Seite: auf breiten Bildschirmen bleibt es eine schmale Spalte in der Mitte. */
#himmel { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: min(100%, 30rem); height: 100%; }
main {
  position: relative; height: 100%; max-width: 30rem; margin: 0 auto; overflow-y: auto; text-align: center;
  padding: max(1.1rem, env(safe-area-inset-top)) 1.5rem 0;
}

.ober { font-size: .7em; letter-spacing: .34em; text-transform: uppercase; color: #f6c948; padding-left: .34em; }
h1 {
  font: 700 clamp(2.5rem, 14vw, 4.2rem)/1.05 "Grenze Gotisch", Georgia, serif;
  color: #ffe9a8; text-shadow: 0 0 22px rgba(255, 200, 80, .45), 0 2px 8px rgba(5, 10, 36, .9);
}
section { margin-top: 2vh; }
section p + p { margin-top: 1vh; }
.gruss { font-size: 1.3em; color: #fff; }

.sternknopf {
  display: inline-flex; flex-direction: column; align-items: center; gap: .4rem; margin-top: 1.4vh;
  background: none; border: 0; padding: .2rem 1rem; color: inherit; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.sternknopf svg {
  width: clamp(4.6rem, 17vh, 9.5rem); height: auto;
  filter: drop-shadow(0 0 14px rgba(255, 205, 90, .85)); animation: puls 2.4s ease-in-out infinite;
}
@keyframes puls { 50% { transform: scale(1.08); filter: drop-shadow(0 0 28px rgba(255, 220, 130, 1)); } }

.sternknopf span, .knopf {
  font: 700 1.25em/1 "Grenze Gotisch", Georgia, serif; letter-spacing: .02em; text-shadow: none;
  color: #2a1a05; background: linear-gradient(#fff0b8, #f0b93a); border: 0; border-radius: 99px;
  padding: .55em 1.5em .62em; box-shadow: 0 0 18px rgba(255, 200, 80, .5), 0 3px 0 #a8741a;
}
.knopf { cursor: pointer; touch-action: manipulation; }
.knopf:disabled { opacity: .55; }
.textknopf {
  display: block; margin: 1.6vh auto 0; background: none; border: 0; padding: .4em .8em; cursor: pointer;
  color: #dfe6ff; font: inherit; font-size: .92em; text-decoration: underline; text-underline-offset: .2em; text-shadow: inherit;
}
:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: 99px; }

.countdown { margin-top: 1.6vh; font-size: .9em; color: #dfe6ff; }

/* Der Name selbst wird auf dem Himmel (Canvas) genau in diesem Feld gezeichnet. */
#namensplatz { height: clamp(4.6rem, 15vh, 8rem); margin: .6vh 0 1vh; }
.psst { font-size: 1.1em; margin-bottom: 2.2vh; }
#danach { opacity: 0; visibility: hidden; transition: opacity .9s ease; }
#ergebnis.fertig #danach { opacity: 1; visibility: visible; }
.nur-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

#probe {
  position: fixed; z-index: 3; top: max(.5rem, env(safe-area-inset-top)); left: .5rem;
  font: 700 .8rem/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; text-shadow: none;
  color: #2a1a05; background: #ffd966; border-radius: 4px; padding: .3em .55em; transform: rotate(-6deg);
}

#bild {
  position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 1.2rem; background: rgba(3, 6, 26, .94); text-align: center;
}
#bild img {
  max-width: 82%; max-height: 62vh; border-radius: 14px; box-shadow: 0 0 0 2px #f6c948, 0 10px 40px #000;
  -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto;
}
#bildtipp { max-width: 24rem; font-size: .95em; }

@media (prefers-reduced-motion: reduce) {
  .sternknopf svg { animation: none; }
  #danach { transition: none; }
}
