/* =========================================================
   URMENSCH 2.0 – Stylesheet
   Farben & Maße zentral als Variablen – hier anpassen.
   ========================================================= */
:root {
  --black: #000;
  --ink: #0b0b0b;
  --line: #1f1f1f;
  --yellow: #ffd21f;
  --white: #f4f4f1;
  --grey: #8a8a85;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 28px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* ausgeblendete Elemente immer verstecken */
html { -webkit-text-size-adjust: 100%; background: var(--black); }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  font-family: var(--font); color: var(--white); background: var(--black);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }

/* Textmarker-Effekt: gelb hinterlegt, schwarze Schrift */
mark {
  color: var(--black); padding: 0 .18em; margin: 0 -.04em;
  background: linear-gradient(100deg, transparent .2em, var(--yellow) .2em, var(--yellow) calc(100% - .15em), transparent calc(100% - .15em)) no-repeat 0 55% / 0% 88%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation: marker 1s .5s var(--ease) forwards;
  transition: color .5s var(--ease);
}
@keyframes marker { to { background-size: 100% 88%; } }

/* ---------- Logo ---------- */
.brand { display: flex; justify-content: center; padding: clamp(1.6rem, 6vw, 2.6rem) 1.25rem clamp(.9rem, 3vw, 1.4rem); }
.brand-link { display: flex; flex-direction: column; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark { width: clamp(88px, 24vw, 120px); height: auto; animation: fadeIn 1s var(--ease) both; transition: width .5s var(--ease); }
.brand-word { width: clamp(160px, 44vw, 220px); height: auto; animation: fadeIn 1s .15s var(--ease) both; transition: width .5s var(--ease); }
body:not([data-view="start"]) .brand-mark { width: 64px; }
body:not([data-view="start"]) .brand-word { width: 140px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Kachel-Raster ---------- */
.tiles {
  width: min(var(--max), 100% - 2rem); margin: 0 auto;
  display: grid; gap: 1rem; grid-template-columns: 1fr; align-content: start;
}

.tile {
  --x: 50%; --y: 100%;
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; border-radius: var(--radius);
  background: var(--ink); border: 1px solid var(--line);
  text-decoration: none; color: var(--white);
  -webkit-tap-highlight-color: transparent;
  animation: fadeIn .9s .25s var(--ease) both;
  transition: transform .6s var(--ease), border-color .6s var(--ease);
}
/* gelbe Füllung – wächst kreisförmig vom Zeiger / Finger aus */
.tile[href]::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--yellow);
  clip-path: circle(0% at var(--x) var(--y));
  transition: clip-path .75s var(--ease);
}
.tile.is-active::before { clip-path: circle(150% at var(--x) var(--y)); }
.tile.is-active { border-color: var(--yellow); color: var(--black); }
.tile[href]:active { transform: scale(.985); }
@media (hover: hover) {
  .tile[href]:hover { transform: translateY(-3px); }
}

/* Motiv */
.tile-art { position: relative; aspect-ratio: 16 / 10; container-type: size; }

/* =========================================================
   STROMZÄHLER (Motiv der Startkachel)
   Alle Maße in cqh = % der Höhe der Bildfläche → skaliert automatisch.
   Zyklus: 5 s. Letzte Ziffer läuft einmal durch, danach fallen die Taler.
   ========================================================= */
.meter { position: absolute; left: 50%; top: 9%; height: 58cqh; aspect-ratio: .98; transform: translateX(-50%); }
.meter-body {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 5cqh 5cqh 4cqh; border-radius: 5cqh;
  background: linear-gradient(160deg, #1b1b1b, #0c0c0c 70%);
  border: 1px solid #2c2c2c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2cqh 6cqh -2cqh rgba(0, 0, 0, .8);
  transition: background .6s var(--ease), border-color .6s var(--ease);
}
.meter-head { display: flex; align-items: center; justify-content: space-between; }
.meter-label { font: 700 3.6cqh/1 var(--font); letter-spacing: .18em; color: var(--grey); transition: color .6s var(--ease); }
.led { width: 2.6cqh; height: 2.6cqh; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 2cqh rgba(255, 210, 31, .8); animation: led 2.5s ease-in-out infinite; }
@keyframes led { 50% { opacity: .35; box-shadow: none; } }

.meter-display {
  display: flex; justify-content: center; gap: .9cqh;
  padding: 2.4cqh 2cqh; border-radius: 2.4cqh; background: #000; border: 1px solid #222;
  box-shadow: inset 0 1cqh 2cqh rgba(0, 0, 0, .9);
}
.meter-display .d {
  position: relative; overflow: hidden; display: block;
  width: 5.4cqh; height: 8cqh; border-radius: 1cqh; background: #151515;
  font: 700 6cqh/8cqh var(--font); text-align: center; color: var(--white);
  font-variant-numeric: tabular-nums;
}
.meter-display .dec { color: var(--black); background: var(--yellow); }
.strip { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; }
.strip b { display: block; height: 8cqh; font-weight: 700; }
/* Mechanisches Rollenzählwerk: Ziffer steht, dann rollt sie flüssig nach oben.
   Schnelle Rolle: 0,5 s pro Ziffer (0,325 s stehen, 0,175 s rollen).
   Langsame Rolle: 5 s pro Ziffer, rollt exakt gleichzeitig mit dem Übergang 9 → 0 der schnellen Rolle. */
.roll-fast .strip { animation: roll-fast 5s linear infinite; }
.roll-slow .strip { animation: roll-slow 50s linear infinite; }
@keyframes roll-fast {
  0%, 6.5% { transform: translateY(0cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  10%, 16.5% { transform: translateY(-8cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  20%, 26.5% { transform: translateY(-16cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  30%, 36.5% { transform: translateY(-24cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  40%, 46.5% { transform: translateY(-32cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  50%, 56.5% { transform: translateY(-40cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  60%, 66.5% { transform: translateY(-48cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  70%, 76.5% { transform: translateY(-56cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  80%, 86.5% { transform: translateY(-64cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  90%, 96.5% { transform: translateY(-72cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  100% { transform: translateY(-80cqh); }
}
@keyframes roll-slow {
  0%, 9.65% { transform: translateY(0cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  10%, 19.65% { transform: translateY(-8cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  20%, 29.65% { transform: translateY(-16cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  30%, 39.65% { transform: translateY(-24cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  40%, 49.65% { transform: translateY(-32cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  50%, 59.65% { transform: translateY(-40cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  60%, 69.65% { transform: translateY(-48cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  70%, 79.65% { transform: translateY(-56cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  80%, 89.65% { transform: translateY(-64cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  90%, 99.65% { transform: translateY(-72cqh); animation-timing-function: cubic-bezier(.45, 0, .25, 1); }
  100% { transform: translateY(-80cqh); }
}

/* „Ferraris-Scheibe“: wandernde Markierung = laufender Verbrauch */
.meter-disc { position: relative; height: 1.6cqh; border-radius: 1cqh; background: #050505; border: 1px solid #222; overflow: hidden; }
.meter-disc i { position: absolute; top: 0; bottom: 0; width: 22%; border-radius: inherit; background: linear-gradient(90deg, transparent, var(--yellow), transparent); animation: disc 2.5s linear infinite; }
@keyframes disc { from { left: -25%; } to { left: 100%; } }

/* Ausgabe-Schlitz unten */
.meter-slot { align-self: center; width: 40%; height: 1.4cqh; border-radius: 1cqh; background: #000; box-shadow: inset 0 .4cqh .8cqh rgba(0, 0, 0, 1), 0 0 0 1px #262626; animation: slot 5s ease-out infinite; }
@keyframes slot { 0%, 30% { box-shadow: inset 0 .4cqh .8cqh #000, 0 0 2cqh rgba(255, 210, 31, .45), 0 0 0 1px #3a3214; } 45%, 100% { box-shadow: inset 0 .4cqh .8cqh #000, 0 0 0 1px #262626; } }

/* Goldtaler */
.coins { position: absolute; z-index: 1; left: 50%; bottom: 0; width: 0; height: 0; }
.coin {
  position: absolute; left: -5cqh; top: -10cqh; width: 10cqh; height: 10cqh; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff6c8 0 8%, #ffd84a 22%, #e0a810 58%, #9c6c00 100%);
  box-shadow: inset 0 0 0 .7cqh rgba(255, 236, 150, .55), inset 0 0 0 1.3cqh rgba(150, 100, 0, .35), 0 .6cqh 1.6cqh rgba(0, 0, 0, .5);
  opacity: 0; animation: coin 5s cubic-bezier(.45, 0, .7, 1) infinite;
}
.coin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%); background-size: 250% 100%; animation: shine 5s ease-in-out infinite; }
.coin:nth-child(1) { --dx: -12cqh; --r: -24deg; }
.coin:nth-child(2) { --dx: 1cqh;  --r: 18deg;  animation-delay: .16s; }
.coin:nth-child(3) { --dx: 13cqh; --r: 30deg;  animation-delay: .32s; }
.coin:nth-child(2)::after { animation-delay: .16s; }
.coin:nth-child(3)::after { animation-delay: .32s; }
@keyframes coin {
  0%   { opacity: 0; transform: translate(0, 0) rotate(0) scaleX(1); }
  4%   { opacity: 1; }
  14%  { transform: translate(calc(var(--dx) * .4), 12cqh) rotate(calc(var(--r) * .5)) scaleX(.72); }
  26%  { opacity: 1; transform: translate(var(--dx), 26cqh) rotate(var(--r)) scaleX(1); }
  36%, 100% { opacity: 0; transform: translate(var(--dx), 32cqh) rotate(var(--r)) scaleX(.9); }
}
@keyframes shine { 0%, 6% { background-position: 120% 0; } 26%, 100% { background-position: -40% 0; } }

/* Kachel gelb (Hover / Antippen) */
.tile.is-active .meter-body { background: linear-gradient(160deg, #141414, #000 70%); border-color: rgba(0, 0, 0, .5); }
.tile.is-active .meter-label { color: #8a8a85; }
.tile.is-active .coin { box-shadow: inset 0 0 0 .7cqh rgba(255, 236, 150, .55), inset 0 0 0 1.3cqh rgba(150, 100, 0, .35), 0 0 0 .35cqh #000, 0 .6cqh 1.6cqh rgba(0, 0, 0, .35); }

@keyframes turn { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes spark { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* Text */
.tile-text { padding: 0 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 1.1rem; }
.kicker { margin: 0; font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--grey); transition: color .6s var(--ease); }
.tile-title { margin: 0; font-size: clamp(2rem, 8.6vw, 3.6rem); line-height: 1.04; font-weight: 800; letter-spacing: -.035em; }
.tile.is-active .kicker { color: rgba(0, 0, 0, .6); }
.tile.is-active mark { color: var(--yellow); background-image: linear-gradient(100deg, transparent .2em, var(--black) .2em, var(--black) calc(100% - .15em), transparent calc(100% - .15em)); }

.tile-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.3rem 1.05rem 1.5rem; border-radius: 999px;
  background: var(--yellow); color: var(--black); font-weight: 700; font-size: 1.02rem;
  transition: background .6s var(--ease), color .6s var(--ease);
}
.tile-cta svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
.tile.is-active .tile-cta { background: var(--black); color: var(--yellow); }
.tile.is-active .tile-cta svg { transform: translateX(5px); }

.aff-star { font-weight: 700; margin-left: .05em; }

/* Platzhalter für künftige Kacheln */
.tile-soon {
  min-height: 120px; align-items: center; justify-content: center;
  background: transparent; border: 1px dashed #262626;
  color: #3c3c3a; font-size: .74rem; letter-spacing: .24em; text-transform: uppercase;
}


/* =========================================================
   SEITEN-WECHSEL
   ========================================================= */
main { flex: 1; display: flex; flex-direction: column; }
/* Ausgeblendete Kacheln (Attribut „hidden“) zuverlässig verstecken */
.tiles [hidden] { display: none !important; }
/* Startseite: Kachel mittig zwischen Logo und Footer */
#view-start { flex: 1; display: flex; flex-direction: column; justify-content: center; }
#view-start[hidden] { display: none; }
#view-start .tiles { padding-bottom: clamp(.5rem, 3vh, 2rem); }
.view { animation: viewIn .6s var(--ease) both; }
.view[hidden] { display: none; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }

/* =========================================================
   PANEL (Stromcheck & Ergebnis)
   ========================================================= */
.panel {
  width: min(560px, 100% - 2rem); margin: 0 auto;
  background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.8rem;
}
.back { display: inline-block; color: var(--grey); text-decoration: none; font-size: .88rem; margin-bottom: 1.1rem; transition: color .3s; }
.back:hover { color: var(--yellow); }
.panel-title { margin: 0 0 .4rem; font-size: clamp(1.9rem, 8vw, 2.6rem); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; }
.panel-sub { margin: 0 0 1.8rem; color: var(--grey); font-size: .95rem; }

.field { margin-bottom: 1.5rem; }
.field label, .label { display: block; font-weight: 600; font-size: .98rem; margin-bottom: .6rem; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.label-row .label { margin: 0; }
.opt { font-weight: 400; color: var(--grey); font-size: .85rem; margin-left: .3rem; }

input[type="text"] {
  width: 100%; font: 600 1.2rem/1 var(--font); color: var(--white); background: var(--black);
  border: 1.5px solid #2c2c2c; border-radius: 16px; padding: 1.05rem 1.1rem;
  transition: border-color .3s, box-shadow .3s; -webkit-appearance: none; appearance: none;
}
input[type="text"]::placeholder { color: #4a4a47; font-weight: 500; }
input[type="text"]:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 210, 31, .14); }
.input-unit { position: relative; }
.input-unit input { padding-right: 6.5rem; }
.input-unit span { position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--grey); font-size: .9rem; pointer-events: none; }
.hint { margin: .5rem 0 0; font-size: .82rem; color: var(--grey); }
.error { display: none; margin: .5rem 0 0; font-size: .84rem; color: #ff8a73; }
.field.invalid .error { display: block; }
.field.invalid input { border-color: #ff8a73; }

/* Umschalter Personen / kWh */
.switch { display: inline-flex; background: var(--black); border: 1px solid #2a2a2a; border-radius: 999px; padding: 3px; }
.switch-btn { font: 600 .78rem var(--font); color: var(--grey); background: none; border: 0; padding: .45rem .8rem; border-radius: 999px; cursor: pointer; transition: background .35s var(--ease), color .35s; }
.switch-btn.is-on { background: var(--white); color: var(--black); }

/* Personen-Kacheln */
.persons { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.person { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.person input { position: absolute; opacity: 0; pointer-events: none; }
.person span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  aspect-ratio: 1 / 1.02; border-radius: 16px; background: #1b1b1b; border: 1.5px solid transparent;
  font-size: 1.5rem; font-weight: 700;
  transition: background .4s var(--ease), color .4s var(--ease), transform .3s var(--ease), border-color .3s;
}
.person svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.person:hover span { border-color: #3a3a3a; }
.person input:checked + span { background: var(--yellow); color: var(--black); transform: scale(1.03); }
.person input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 3px; }
.person:active span { transform: scale(.96); }

/* Haupt-Schaltfläche */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  width: 100%; display: flex; align-items: center; justify-content: center; gap: .7rem;
  font: 800 1.08rem/1 var(--font); letter-spacing: -.01em; text-decoration: none;
  color: var(--black); background: var(--yellow); border: 0; border-radius: 18px;
  padding: 1.25rem 1.2rem; cursor: pointer; margin-top: .6rem;
  transition: transform .3s var(--ease), box-shadow .4s var(--ease);
  box-shadow: 0 10px 30px -12px rgba(255, 210, 31, .55);
  -webkit-tap-highlight-color: transparent;
}
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-100%); }
.cta:hover::after { animation: sheen 1s var(--ease); }
.cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(255, 210, 31, .7); }
.cta:active { transform: scale(.98); }
.cta svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.cta:hover svg { transform: translateX(4px); }
@keyframes sheen { to { transform: translateX(100%); } }
.micro { text-align: center; color: var(--grey); font-size: .8rem; margin: 1rem 0 0; }

/* =========================================================
   ERGEBNIS
   ========================================================= */
.result { text-align: center; }
.result .back { float: left; }
.result .panel-title { clear: both; }
.gauge { width: min(220px, 62vw); margin: .4rem auto 0; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.g-track { fill: none; stroke: #1f1f1f; stroke-width: 12; }
.g-ticks { fill: none; stroke: #2a2a2a; stroke-width: 6; stroke-dasharray: 1.2 9; transform-origin: 120px 120px; animation: turn 50s linear infinite; }
.g-fill {
  fill: none; stroke: var(--yellow); stroke-width: 12; stroke-linecap: round;
  stroke-dasharray: 0 100; transform: rotate(-90deg); transform-origin: 120px 120px;
  filter: drop-shadow(0 0 10px rgba(255, 210, 31, .5));
  transition: stroke-dasharray 1.8s var(--ease);
}
.g-bolt { fill: var(--yellow); transform-origin: 120px 120px; animation: pulse 2.4s ease-in-out infinite; opacity: 0; transition: opacity .6s .3s; }
.result.play .g-bolt { opacity: 1; }

.stat-main { margin: .9rem 0 1.6rem; }
.stat-main .num { font-size: clamp(2.6rem, 12vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-main .unit { margin-left: .4rem; color: var(--grey); font-weight: 600; }
.stat-note { margin: .35rem 0 0; font-size: .8rem; color: var(--grey); }

.bars { text-align: left; display: grid; gap: 1.3rem; margin-bottom: 1.6rem; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .55rem; font-size: .92rem; }
.bar-head strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.bar-head .q { color: var(--yellow); font-size: 1.3rem; }
.bar { height: 14px; border-radius: 999px; background: #1b1b1b; overflow: hidden; position: relative; }
.bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--yellow); transition: width 1.6s .3s var(--ease); }
.bar-unknown { border: 1.5px dashed #3a3a3a; background: transparent; }
.bar-unknown i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 210, 31, .35), transparent); transform: translateX(-100%); animation: scan 2.2s ease-in-out infinite; }
@keyframes scan { to { transform: translateX(100%); } }

.teaser { font-size: 1.02rem; color: var(--white); margin: 0 auto 1.4rem; max-width: 26em; }
.cta-big { padding: 1.45rem 1.2rem; font-size: clamp(1rem, 4.6vw, 1.15rem); white-space: nowrap; animation: glow 2.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 14px 44px -10px rgba(255, 210, 31, .85); } }
.ad-note { font-size: .76rem; color: var(--grey); margin: 1rem auto 0; max-width: 32em; line-height: 1.5; }
.ad { display: inline-block; font-weight: 700; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--black); background: var(--yellow); padding: .15em .5em; border-radius: 4px; margin-right: .3em; }

@media (min-width: 700px) {
  .panel { padding: 2.4rem 2.4rem 2.6rem; }
}

/* ---------- Footer ---------- */
.footer {
  width: min(var(--max), 100% - 2rem); margin: 3.5rem auto 0;
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); display: grid; gap: 1rem; justify-items: center; text-align: center;
  font-size: .8rem; color: var(--grey);
}
.footer a { text-decoration: none; transition: color .3s; }
.footer a:hover { color: var(--yellow); }
.social a { font-weight: 600; color: var(--white); letter-spacing: .04em; }
.disclosure { margin: 0; max-width: 46em; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.4rem; }

/* Hinweis, wenn ein Link noch fehlt */
.toast {
  position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom)); z-index: 10;
  transform: translate(-50%, 150%); padding: .75rem 1.2rem; border-radius: 999px;
  background: var(--white); color: var(--black); font-size: .88rem; font-weight: 600;
  opacity: 0; visibility: hidden; transition: transform .5s var(--ease), opacity .4s, visibility .4s; pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- Unterseiten ---------- */
.legal { width: min(720px, 100% - 2.5rem); margin: 0 auto; padding-bottom: 4rem; flex: 1; }
.legal h1 { font-size: clamp(2rem, 7vw, 3rem); letter-spacing: -.03em; margin: 0 0 1rem; }
.legal h2 { font-size: 1.15rem; margin: 2.2rem 0 .6rem; }
.legal p, .legal li { color: #c9c9c4; }
.legal .todo { background: var(--yellow); color: var(--black); padding: 0 .3em; }
.legal .contact { font-style: normal; line-height: 1.7; color: var(--white); }
.legal .contact a, .legal a:not(.back) { color: var(--yellow); }
.legal ul { padding-left: 1.2rem; }
.legal strong { color: var(--white); }
.legal-links a[aria-current] { color: var(--yellow); }
.legal .back { display: inline-block; margin-bottom: 2rem; color: var(--yellow); text-decoration: none; font-weight: 600; }

/* ---------- Tablet & Desktop ---------- */
@media (min-width: 700px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .tile-hero { grid-column: 1 / -1; }
  .tile-soon { min-height: 180px; }
}
@media (min-width: 700px) and (max-width: 899px) {
  .tile-hero .tile-art { aspect-ratio: 16 / 7; }
  .tile-hero .tile-text { padding: 0 2.5rem 2.5rem; }
}
@media (min-width: 900px) {
  .tile-hero { flex-direction: row-reverse; align-items: stretch; min-height: 440px; }
  .tile-hero .tile-art { flex: 0 0 36%; aspect-ratio: auto; }
  .tile-hero .meter { top: 16%; height: 52cqh; }
  .tile-hero .tile-text { flex: 1; justify-content: center; padding: 3.5rem 0 3.5rem 3.5rem; gap: 1.6rem; }
  .tile-hero .tile-title { font-size: clamp(3rem, 5.2vw, 4.4rem); }
  .tile-hero .tile-cta { align-self: flex-start; min-width: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  mark { background-size: 100% 88%; }
}


/* =========================================================
   STROMCHECK-KARTE auf der Startseite (Formular direkt sichtbar)
   ========================================================= */
.check-card { width: 100%; max-width: 600px; justify-self: center; }
.tiles .check-card { grid-column: 1 / -1; }
.check-card .tile-art { aspect-ratio: 16 / 10; }
.check-form { padding: 0 1.4rem 1.6rem; }
.check-head { text-align: center; margin-bottom: 1.6rem; }
.check-head .kicker { margin-bottom: .7rem; }
.check-card .tile-title { font-size: clamp(1.9rem, 8vw, 2.7rem); }
.check-form .field { margin-bottom: 1.25rem; }
.check-form .persons { gap: .5rem; }
.check-form .person span { aspect-ratio: auto; height: clamp(66px, 18vw, 82px); gap: .3rem; font-size: 1.3rem; }
.check-form .person svg { width: 22px; height: 22px; }
.check-form .cta { margin-top: .4rem; }

@media (min-width: 700px) {
  .check-form { padding: 0 2.4rem 2.4rem; }
}
/* Desktop: Karte bleibt einspaltig & zentriert (Zähler oben, Eingaben darunter) */
@media (min-width: 900px) {
  .tile-hero.check-card { flex-direction: column; align-items: stretch; min-height: 0; }
  .tile-hero.check-card .tile-art { flex: none; aspect-ratio: 16 / 8; }
  .tile-hero.check-card .meter { top: 9%; height: 58cqh; }
}

/* =========================================================
   MOBIL-OPTIMIERUNG (Smartphones bis 699 px Breite)
   Ziel: Zähler, alle Eingaben und Button ohne Scrollen sichtbar.
   ========================================================= */
@media (max-width: 699px) {
  /* Logo kompakt in einer Zeile */
  .brand { padding: max(.6rem, env(safe-area-inset-top)) 1rem .55rem; }
  .brand-link { flex-direction: row; gap: .5rem; }
  .brand-mark, body:not([data-view="start"]) .brand-mark { width: 36px; }
  .brand-word, body:not([data-view="start"]) .brand-word { width: 112px; }

  .tiles { width: calc(100% - 1.25rem); }
  #view-start { justify-content: flex-start; }
  #view-start .tiles { padding-bottom: 0; }

  /* Karte: Zähler links, Überschrift rechts, Formular darunter */
  .check-card { display: grid; grid-template-columns: 42% 1fr; border-radius: 24px; }
  .check-card .check-form { display: contents; }
  .check-card .tile-art { grid-column: 1; grid-row: 1; aspect-ratio: auto; height: 164px; }
  .check-card .meter { top: 7%; height: 60cqh; }
  .check-card .check-head { grid-column: 2; grid-row: 1; align-self: center; text-align: left; margin: 0; padding: .4rem 1rem 0 0; }
  .check-card .check-head .kicker { margin-bottom: .4rem; font-size: .62rem; }
  .check-card .tile-title { font-size: clamp(1.3rem, 6.2vw, 1.7rem); line-height: 1.08; }
  .check-card .field, .check-card .cta, .check-card .micro { grid-column: 1 / -1; margin-left: 1rem; margin-right: 1rem; }

  .check-card .field { margin-bottom: .8rem; }
  .check-card .field label, .check-card .label { font-size: .9rem; margin-bottom: .4rem; }
  .check-card .label-row { margin-bottom: .4rem; }
  .check-card input[type="text"] { padding: .85rem 1rem; font-size: 1.1rem; border-radius: 14px; }
  .check-card .switch-btn { padding: .4rem .7rem; }
  .check-card .person span { height: 58px; flex-direction: row; gap: .45rem; font-size: 1.25rem; border-radius: 14px; }
  .check-card .person svg { width: 20px; height: 20px; }
  .check-card .cta { width: auto; margin-top: .2rem; padding: 1.05rem 1rem; border-radius: 16px; }
  .check-card .micro { margin-top: .55rem; margin-bottom: .9rem; font-size: .72rem; }

  .footer { margin-top: 2rem; }

  /* Ergebnisseite kompakt */
  .panel { width: calc(100% - 1.25rem); padding: 1rem 1rem 1.2rem; }
  .result .back { margin-bottom: .5rem; }
  .result .panel-title { font-size: clamp(1.5rem, 7vw, 1.9rem); margin-bottom: .2rem; }
  .result .panel-sub { margin-bottom: .6rem; }
  .result .panel-sub { margin-bottom: .9rem; }
  .gauge { float: left; width: 96px; margin: 0 .9rem .8rem .2rem; }
  .stat-main { text-align: left; min-height: 96px; display: flex; flex-wrap: wrap; align-content: center; align-items: baseline; margin: 0 0 .8rem; }
  .stat-main .num { font-size: 2.2rem; }
  .stat-main .stat-note { flex-basis: 100%; }
  .bars, .teaser { clear: both; }
  .bar-row .stat-note { font-size: .74rem; }
  .bars { gap: .9rem; margin-bottom: 1rem; }
  .teaser { font-size: .95rem; margin-bottom: 1rem; }
  .cta-big { padding: 1.2rem 1rem; }
}

/* Niedrige Bildschirme (z. B. iPhone SE mit Browserleiste) */
@media (max-width: 699px) and (max-height: 600px) {
  .brand { padding-top: max(.45rem, env(safe-area-inset-top)); padding-bottom: .4rem; }
  .check-card .tile-art { height: 140px; }
  .check-card .field { margin-bottom: .6rem; }
}

/* Sehr kleine Bildschirme: Bedienbarkeit vor Kompaktheit */
@media (max-width: 349px) {
  .check-card { grid-template-columns: 1fr; }
  .check-card .tile-art { grid-column: 1; height: 150px; }
  .check-card .check-head { grid-column: 1; grid-row: 2; text-align: center; padding: 0 1rem .8rem; }
  .check-card .person span { flex-direction: column; gap: .15rem; font-size: 1.1rem; }
}
