/* ---------------------------------------------------------------------------
   Endspurt-Los: Ansicht fuers Handy
   --------------------------------------------------------------------------- */

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.seite {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 6vw, 2.5rem) clamp(1.25rem, 5vw, 2rem) 2.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: clamp(1.5rem, 5vw, 2.25rem);
}

.kopf {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.kopf .zeichen {
  width: 2.75rem;
  height: 2.75rem;
}

.titel {
  font-size: clamp(2rem, 10.5vw, 3rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: nowrap;
}

/* «Endspurt» steht in Alga, bleibt aber in derselben Zeile wie «-Los». */
.titel .alga {
  font-size: 1.12em;
  letter-spacing: -0.005em;
}

.lead {
  color: var(--grau);
  font-size: 1.0625rem;
  line-height: 1.5;
  max-width: 24rem;
}

.kopf .pille {
  height: 14px;
  width: 7.5rem;
}

/* --- Formular ----------------------------------------------------------- */

.feld {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.feld label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--grau);
}

.feld input {
  font: inherit;
  font-size: 1.25rem;
  font-weight: 500;
  padding: 0.9rem 1.05rem;
  border: 2px solid #E4E4E4;
  border-radius: 14px;
  background: var(--weiss);
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s ease;
}

.feld input:focus {
  border-color: var(--schwarz);
  outline: none;
}

.feld input::placeholder {
  color: #B5B5B5;
  font-weight: 400;
}

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1.05rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 500;
  border: 0;
  border-radius: 999px;
  background: var(--schwarz);
  color: var(--weiss);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.knopf:active {
  transform: scale(0.985);
}

.knopf[disabled] {
  opacity: 0.4;
  cursor: default;
}

.knopf--leise {
  background: transparent;
  color: var(--grau);
  border: 2px solid #E4E4E4;
}

.hinweis {
  font-size: 0.9375rem;
  color: var(--grau);
  min-height: 1.4em;
  line-height: 1.4;
}

.hinweis--warnung {
  color: #9A3B14;
  font-weight: 500;
}

/* --- Die Los-Karte ------------------------------------------------------ */

.karte {
  position: relative;
  /* Beim Rubbeln darf nichts markiert werden, sonst faerbt sich der Spruch
     blau, sobald der Finger oder die Maus ueber die Karte zieht. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  background: var(--weiss);
  border-radius: 26px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.karte__deko {
  height: 12px;
  background-image: var(--verlauf);
}

.karte__inhalt {
  position: relative;
  padding: 1.75rem 1.5rem 1.9rem;
  min-height: 19rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.karte__spruch {
  font-size: clamp(1.4rem, 6.2vw, 1.9rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.karte__fuss {
  margin-top: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.karte__fuss .pille {
  height: 10px;
  width: 3.5rem;
  flex: none;
}

.karte__fuss span {
  font-size: 0.875rem;
  color: var(--grau);
}

/* Die Rubbelschicht liegt als Canvas ueber dem Spruch. */
.rubbel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* touch-action: none haelt die Seite still, waehrend gerubbelt wird. */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  cursor: grab;
  transition: opacity 0.45s ease;
}

.rubbel:active {
  cursor: grabbing;
}

.rubbel--weg {
  opacity: 0;
  pointer-events: none;
}

.karte--offen .karte__spruch {
  animation: auftauchen 0.5s ease both;
}

@keyframes auftauchen {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* --- Zustaende ---------------------------------------------------------- */

[hidden] {
  display: none !important;
}

.bereich {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.abschluss {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 2.25rem 0;
}

.abschluss .pille {
  height: 16px;
  width: 9rem;
}

.abschluss h2 {
  font-size: clamp(1.75rem, 8vw, 2.4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.abschluss p {
  color: var(--grau);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.fuss {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.8125rem;
  color: #9A9A9A;
}
