/* hipking – Startseite: Splashscreen und senkrechter Slider
   Paket 2 */

/* ---------------------------------------------------------- Grundlage */
html, body { height: 100%; overflow: hidden; }

body.start {
  margin: 0;
  overflow: hidden;
}

/* ---------------------------------------------------------- Splashscreen */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: var(--bg);
  transition: opacity .45s ease, visibility .45s ease;
}
.splash.weg {
  opacity: 0;
  visibility: hidden;
}
.splash .wortmarke {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}
.splash .balken {
  width: 7rem;
  height: 3px;
  background: var(--rand);
  overflow: hidden;
}
.splash .balken i {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--akzent);
  animation: laufen 1.1s ease-in-out infinite;
}
@keyframes laufen {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* ---------------------------------------------------------- Bedienleiste */
.leiste {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem max(.8rem, env(safe-area-inset-left)) .7rem max(.8rem, env(safe-area-inset-right));
  pointer-events: none;
}
.leiste > * { pointer-events: auto; }
.leiste .wort {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  padding: .4rem .7rem;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  border-radius: var(--rund);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leiste .knoepfe { display: flex; gap: .4rem; flex: 0 0 auto; }
.leiste .b {
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
}

/* ---------------------------------------------------------- Slider */
.slider {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.slider::-webkit-scrollbar { display: none; }

.panel {
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  /* Flex mit margin:auto statt justify-content:center – so wird der obere
     Rand des Inhalts bei sehr grosser Schrift nicht abgeschnitten. */
  display: flex;
  flex-direction: column;
  padding: 5rem 1.25rem 4.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* Die zwei Welten */
.panel-hipking {
  --bg:        #f4f4f2;
  --flaeche:   #ffffff;
  --rand:      #d6d6d1;
  --text:      #18181b;
  --leise:     #65656d;
  --akzent:    #1d4ed8;
  --akzent-kontrast: #ffffff;
  background: var(--bg);
  color: var(--text);
}
:root[data-thema="dunkel"] .panel-hipking {
  --bg:      #101012;
  --flaeche: #1a1a1e;
  --rand:    #34343c;
  --text:    #f2f2f4;
  --leise:   #a0a0aa;
  --akzent:  #6ea8fe;
  --akzent-kontrast: #0b1220;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) .panel-hipking {
    --bg:      #101012;
    --flaeche: #1a1a1e;
    --rand:    #34343c;
    --text:    #f2f2f4;
    --leise:   #a0a0aa;
    --akzent:  #6ea8fe;
    --akzent-kontrast: #0b1220;
  }
}

.panel-cave {
  --bg:        #1b1714;
  --flaeche:   #262019;
  --rand:      #4a4138;
  --text:      #f5efe6;
  --leise:     #b6a894;
  --akzent:    #d99a3a;
  --akzent-kontrast: #1a1613;
  background: var(--bg);
  color: var(--text);
}
:root[data-thema="dunkel"] .panel-cave { --bg: #120f0d; --flaeche: #1c1714; }
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) .panel-cave { --bg: #120f0d; --flaeche: #1c1714; }
}

/* ---------------------------------------------------------- Inhalt */
.inhalt {
  width: 100%;
  max-width: 30rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  margin: auto;
}

/* Platzhalter fürs Logo – exakt quadratisch, Zeichen exakt mittig */
.wappen {
  width: 5.5rem;
  height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--akzent);
  color: var(--akzent-kontrast);
  border-radius: var(--rund);
  flex: 0 0 auto;
}
.wappen img { display: block; width: 100%; height: 100%; object-fit: contain; }

.inhalt h1 {
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.inhalt .zeile {
  margin: 0;
  color: var(--leise);
  font-size: 1.05rem;
  max-width: 24rem;
}
.inhalt .merkmale {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem .5rem;
}
.inhalt .merkmale li {
  border: 1px solid var(--rand);
  border-radius: 999px;
  padding: .25rem .8rem;
  font-size: .85rem;
  color: var(--leise);
}
.inhalt .b {
  width: 100%;
  max-width: 22rem;
  min-height: 3.2rem;
  font-size: 1.05rem;
  background: var(--akzent);
  border-color: var(--akzent);
  color: var(--akzent-kontrast);
}
.inhalt .b:hover { filter: brightness(1.08); }

/* ---------------------------------------------------------- Wechselhinweis */
.wechsel {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  background: none;
  border: 0;
  color: var(--leise);
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  padding: .5rem 1rem;
}
.wechsel svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  animation: wippen 1.8s ease-in-out infinite;
}
@keyframes wippen {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(.3rem); }
}
.panel-cave .wechsel svg { animation-name: wippen-hoch; }
@keyframes wippen-hoch {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-.3rem); }
}

/* ---------------------------------------------------------- Punkte */
.punkte {
  position: fixed;
  right: max(.7rem, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.punkte button {
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.punkte button::before {
  content: "";
  display: block;
  width: .6rem;
  height: .6rem;
  border-radius: 999px;
  background: currentColor;
  opacity: .35;
  transition: opacity .2s ease, transform .2s ease;
}
.punkte button[aria-current="true"]::before {
  opacity: 1;
  transform: scale(1.5);
}

/* ---------------------------------------------------------- Rücksicht */
@media (prefers-reduced-motion: reduce) {
  .slider { scroll-behavior: auto; }
  .wechsel svg, .splash .balken i { animation: none; }
}

@media (max-height: 34rem) {
  .panel { padding: 4.2rem 1.25rem 3.6rem; }
  .wappen { width: 4rem; height: 4rem; font-size: 1.8rem; }
  .inhalt h1 { font-size: 1.7rem; }
  .wechsel { display: none; }
}
