/* GPTGenie · Umfrage „Neuer Name und neues Logo“ (js/survey.js).
   Fläche und Abdunklung wie die anderen Fenster (Variablen aus ios.css, hell/dunkel automatisch).
   PC: Fenster in der Mitte. Handy: Blatt von unten. Leistungsmodus/weniger Bewegung: Szenen stehen still. */

html.ggs-lock, html.ggs-lock body { overflow: hidden; }

.ggs-ov {
  position: fixed; inset: 0; z-index: 9950;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: var(--ios-scrim, rgba(0,0,0,0.5));
  opacity: 0;
  transition: opacity .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.ggs-ov.gg-open { opacity: 1; }
.ggs-ov.gg-out { opacity: 0; pointer-events: none; }

.ggs-sheet {
  --ggs-acc: var(--ios-tint, rgb(var(--a-a855f7,168,85,247)));
  --ggs-line: var(--ios-sep, rgba(84,84,88,0.55));
  position: relative;
  display: flex; flex-direction: column;
  width: min(640px, 100%);
  max-height: min(88vh, 800px);
  max-height: min(88dvh, 800px);
  overflow: hidden;
  background: var(--ios-sheet, #1c1c1e);
  color: var(--ios-label, #fff);
  border-radius: var(--ios-radius, 34px);
  box-shadow: var(--ios-shadow, 0 30px 80px -20px rgba(0,0,0,0.7));
  font-family: var(--ios-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  text-align: left;
  transform: translateY(16px) scale(.96);
  opacity: 0;
  transition: transform .45s cubic-bezier(.32,1.26,.54,1), opacity .25s ease;
}
.ggs-ov.gg-open .ggs-sheet { transform: none; opacity: 1; }
.ggs-ov.gg-out .ggs-sheet { transform: translateY(12px) scale(.97); opacity: 0; transition-duration: .25s; }
/* farbiger Schein oben */
.ggs-sheet::before {
  content: ''; position: absolute; inset: -120px -60px auto; height: 280px; pointer-events: none;
  background:
    radial-gradient(closest-side at 28% 62%, rgba(var(--a-a855f7,168,85,247),0.24), transparent),
    radial-gradient(closest-side at 76% 50%, rgba(255,61,139,0.16), transparent);
}
.ggs-sheet > * { position: relative; }

.ggs-grab { display: none; }
/* Kopfzeile scrollt nicht mit: Enddatum (Seite 2) links, X rechts. So schwebt nichts über dem Scrollbereich
   (auf manchen Windows-PCs zeichnete Chrome sonst das Schild unten noch einmal) */
.ggs-head { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 18px 16px 4px 24px; }
.ggs-head-l { flex: 1; min-width: 0; }
.ggs-sheet .ggs-head-l > * { display: none; }
.ggs-sheet[data-step="1"] .ggs-h1 { display: inline-block; }
.ggs-sheet[data-step="2"] .ggs-h2 { display: flex; }
.ggs-sheet[data-step="2"] .ggs-h2[hidden] { display: none; }
.ggs-x {
  flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; cursor: pointer;
  background: var(--ios-circle, #3a3a3c); color: var(--ios-circle-ink, rgba(255,255,255,0.88));
  box-shadow: var(--ios-circle-shadow, none);
}

.ggs-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 24px 10px;
  scrollbar-width: thin;
}
.ggs-step { display: none; }
.ggs-sheet[data-step="1"] .ggs-s1,
.ggs-sheet[data-step="2"] .ggs-s2,
.ggs-sheet[data-step="3"] .ggs-s3 { display: block; animation: ggsStepIn .4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes ggsStepIn { from { opacity: 0; } to { opacity: 1; } }   /* nur Deckkraft: keine eigene Grafik-Ebene im Scrollbereich */

/* ── Kopf ── */
.ggs-title {
  margin: 0;
  font-size: 26px; line-height: 1.13; font-weight: 800; letter-spacing: -0.03em;
  color: var(--ios-label, #fff);
}
.ggs-lead { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--ios-label2, rgba(var(--a-ebebf5,235,235,245),0.6)); }
.ggs-center { text-align: center; margin-left: 0; margin-right: 0; }

/* ── Vorschau ── */
.ggs-stage {
  position: relative;
  margin: 18px 0 6px;
  padding: 12px 12px 10px;
  border-radius: 24px;
  background: var(--ios-group, #2c2c2e);
}
.ggs-svg { display: block; width: 100%; height: auto; border-radius: 16px; }
/* Farben auf dem Papier stehen in js/survey.js (SVG-<style>): Papier bleibt auch im hellen Modus hell */
.ggs-scene { opacity: 0; transition: opacity .35s ease; }
.ggs-scene.ggs-on { opacity: 1; }
.ggs-draw, .ggs-draw2 { stroke-dasharray: 1; stroke-dashoffset: 1; }
.ggs-scene .ggs-caret, .ggs-scene .ggs-arrow, .ggs-scene .ggs-lbl, .ggs-scene .ggs-fx, .ggs-scene .ggs-dot,
.ggs-scene .ggs-bubble, .ggs-scene .ggs-ai, .ggs-scene .ggs-typed { opacity: 0; }

/* Szene 1: getippt → Handschrift */
.ggs-on .ggs-typed { animation: ggsFade .4s ease .1s both; }
.ggs-on .ggs-caret { animation: ggsCaret .7s steps(1) .2s 3, ggsCaretOut .1s 2.3s forwards; }
.ggs-on .ggs-arrow { animation: ggsDrop .5s cubic-bezier(.2,.8,.2,1) 1.2s both; }
/* Szene 2: Koordinatensystem */
.ggs-on .ggs-draw { animation: ggsDraw .9s ease-out .2s forwards; }
.ggs-on .ggs-draw + .ggs-draw { animation-delay: .5s; }
.ggs-on .ggs-dot { animation: ggsFade .3s ease 1.1s both; }
.ggs-on .ggs-lbl { animation: ggsFade .4s ease 1.2s both; }
.ggs-on .ggs-draw2 { animation: ggsDraw 1.6s cubic-bezier(.45,.1,.45,1) 1.4s forwards; }
.ggs-on .ggs-fx { animation: ggsFade .5s ease 2.9s both; }
/* Szene 3: KI-Hilfe */
.ggs-on .ggs-bubble { animation: ggsPop .45s cubic-bezier(.3,1.4,.5,1) .2s both; }
.ggs-on .ggs-ai { animation: ggsFade .3s ease 1s both; }
.ggs-on .ggs-typing circle { animation: ggsBlink 1s ease-in-out 1s 2; }
.ggs-on .ggs-typing circle:nth-child(2) { animation-delay: 1.15s; }
.ggs-on .ggs-typing circle:nth-child(3) { animation-delay: 1.3s; }
.ggs-on .ggs-typing { animation: ggsFadeOut .2s ease 2.4s forwards; }

@keyframes ggsFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ggsFadeOut { to { opacity: 0; } }
@keyframes ggsCaret { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes ggsCaretOut { to { opacity: 0; } }
@keyframes ggsDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes ggsDraw { to { stroke-dashoffset: 0; } }
@keyframes ggsPop { from { opacity: 0; transform: translateY(6px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes ggsBlink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.ggs-bubble, .ggs-arrow { transform-box: fill-box; transform-origin: 50% 50%; }

.ggs-soon {
  padding: 4px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  color: #fff; background: linear-gradient(135deg, #ff3d8b, rgb(var(--a-a855f7,168,85,247)));
}
.ggs-ends {
  display: flex; align-items: center; gap: 7px; width: fit-content;
  padding: 6px 12px; border-radius: 100px;
  font-size: 13px; font-weight: 650;
  color: var(--ios-tint-ink, rgb(var(--a-c084fc,192,132,252))); background: var(--ios-tint-fill, rgba(var(--a-a855f7,168,85,247),0.2));
}
.ggs-ends[hidden] { display: none; }
.ggs-ends-c { margin: 12px auto 0; }
.ggs-cap { margin: 10px 4px 0; min-height: 20px; text-align: center; font-size: 14px; font-weight: 700; color: var(--ios-label, #fff); }
.ggs-dots { display: flex; justify-content: center; gap: 4px; margin-top: 4px; }
.ggs-dots button {
  width: 28px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center;
}
.ggs-dots button::before {
  content: ''; width: 7px; height: 7px; border-radius: 4px;
  background: var(--ios-label3, rgba(var(--a-ebebf5,235,235,245),0.3));
  transition: width .3s ease, background .3s ease;
}
.ggs-dots button[aria-selected="true"]::before { width: 20px; background: var(--ggs-acc); }

/* Ruhig: Szenen stehen fertig da, man blättert selbst */
html.gg-perf .ggs-scene * { animation: none !important; }
html.gg-perf .ggs-scene .ggs-typed, html.gg-perf .ggs-scene .ggs-arrow, html.gg-perf .ggs-scene .ggs-lbl,
html.gg-perf .ggs-scene .ggs-fx, html.gg-perf .ggs-scene .ggs-dot, html.gg-perf .ggs-scene .ggs-bubble, html.gg-perf .ggs-scene .ggs-ai { opacity: 1; }
html.gg-perf .ggs-draw, html.gg-perf .ggs-draw2 { stroke-dashoffset: 0; }
html.gg-perf .ggs-caret, html.gg-perf .ggs-typing { opacity: 0 !important; }
@media (prefers-reduced-motion: reduce) {
  .ggs-scene * { animation: none !important; }
  .ggs-scene .ggs-typed, .ggs-scene .ggs-arrow, .ggs-scene .ggs-lbl, .ggs-scene .ggs-fx, .ggs-scene .ggs-dot, .ggs-scene .ggs-bubble, .ggs-scene .ggs-ai { opacity: 1; }
  .ggs-draw, .ggs-draw2 { stroke-dashoffset: 0; }
  .ggs-caret, .ggs-typing { opacity: 0 !important; }
  .ggs-sheet, .ggs-step { transition: opacity .2s ease !important; animation: none !important; transform: none !important; }
}

/* ── Bald als App (App Store, Google Play) ── */
.ggs-store {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 2px; padding: 11px 12px;
  border-radius: 18px;
  background: var(--ios-tint-fill, rgba(var(--a-a855f7,168,85,247),0.2));
  animation: ggsPop .5s .15s cubic-bezier(.32,1.26,.54,1) both;
}
.ggs-store-ic {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(145deg, #ff3d8b, rgb(var(--a-a855f7,168,85,247)));
}
.ggs-store-t { flex: 1; min-width: 0; }
.ggs-store-t b { display: block; font-size: 15px; font-weight: 750; color: var(--ios-label, #fff); }
.ggs-store-t small { display: block; margin-top: 1px; font-size: 13px; color: var(--ios-label2, rgba(var(--a-ebebf5,235,235,245),0.6)); }
.ggs-store-b { flex: none; display: flex; gap: 6px; }
.ggs-store-b span {
  padding: 5px 10px; border-radius: 100px; white-space: nowrap;
  font-size: 12px; font-weight: 700;
  color: var(--ios-tint-ink, rgb(var(--a-c084fc,192,132,252)));
  background: var(--ios-sheet, #1c1c1e);
}
@media (max-width: 480px) {
  .ggs-store { flex-wrap: wrap; row-gap: 9px; }
  .ggs-store-b { width: 100%; padding-left: 50px; }
}
html.gg-perf .ggs-store { animation: none; }
@media (prefers-reduced-motion: reduce) { .ggs-store { animation: none; } }

/* ── Funktionen ── */
.ggs-feats { list-style: none; margin: 16px 0 4px; padding: 0; display: grid; gap: 2px; }
.ggs-feats li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 2px; }
.ggs-feats li + li { border-top: 0.5px solid var(--ggs-line); }
.ggs-fi {
  flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(145deg, rgb(var(--a-a855f7,168,85,247)), #ff3d8b);
}
.ggs-feats b { display: block; font-size: 15px; font-weight: 700; color: var(--ios-label, #fff); }
.ggs-feats small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: var(--ios-label2, rgba(var(--a-ebebf5,235,235,245),0.6)); }

/* ── Fragen ── */
.ggs-q { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; color: var(--ios-label, #fff); }
.ggs-qsub { margin: 4px 0 12px; font-size: 14px; color: var(--ios-label2, rgba(var(--a-ebebf5,235,235,245),0.6)); }
.ggs-names { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ggs-names > .ggs-opt:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* ungerade Anzahl: „Eigene Idee“ über die ganze Breite */
.ggs-opt {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 13px 12px; min-height: 60px;
  border: 0; border-radius: 18px; cursor: pointer; text-align: left;
  font: inherit; color: var(--ios-label, #fff);
  background: var(--ios-group, #2c2c2e);
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow .2s ease, transform .15s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.ggs-opt:active { transform: scale(.97); }
.ggs-opt.ggs-sel { box-shadow: inset 0 0 0 2px var(--ggs-acc); background: var(--ios-tint-fill, rgba(var(--a-a855f7,168,85,247),0.2)); }
.ggs-opt-t b { display: block; font-size: 15.5px; font-weight: 750; }
.ggs-opt-t small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--ios-label2, rgba(var(--a-ebebf5,235,235,245),0.6)); }
.ggs-radio {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--ios-label3, rgba(var(--a-ebebf5,235,235,245),0.3));
  transition: box-shadow .2s ease, background .2s ease;
}
.ggs-sel .ggs-radio { background: var(--ggs-acc); box-shadow: inset 0 0 0 5px var(--ggs-acc), inset 0 0 0 10px #fff; }
.ggs-other {
  width: 100%; box-sizing: border-box; margin-top: 8px;
  padding: 13px 14px; border-radius: 14px; border: 0;
  font: inherit; font-size: 16px; color: var(--ios-label, #fff);
  background: var(--ios-group, #2c2c2e);
  box-shadow: inset 0 0 0 2px var(--ggs-acc);
  outline: none;
}
.ggs-other::placeholder { color: var(--ios-label3, rgba(var(--a-ebebf5,235,235,245),0.3)); }
.ggs-err { min-height: 18px; margin: 12px 0 0; font-size: 13.5px; font-weight: 600; color: var(--ios-red, #ff453a); text-align: center; }
.ggs-err:empty { min-height: 0; margin: 0; }

/* ── Danke + Ergebnis ── */
.ggs-done-ic {
  width: 62px; height: 62px; margin: 6px auto 14px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, rgb(var(--a-a855f7,168,85,247)), #ff3d8b);
  animation: ggsPop .5s cubic-bezier(.3,1.4,.5,1) both;
}
.ggs-s3 .ggs-title { margin: 0; }
.ggs-results { margin-top: 16px; }
.ggs-results h4 { margin: 18px 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ios-label2, rgba(var(--a-ebebf5,235,235,245),0.6)); }
.ggs-bar { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; margin-bottom: 11px; font-size: 14.5px; }
.ggs-bar-l { font-weight: 650; }
.ggs-bar-l em { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 1px 7px; margin-left: 4px; border-radius: 100px; color: var(--ios-tint-ink, rgb(var(--a-c084fc,192,132,252))); background: var(--ios-tint-fill, rgba(var(--a-a855f7,168,85,247),0.2)); }
.ggs-bar-p { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ios-label2, rgba(var(--a-ebebf5,235,235,245),0.6)); }
.ggs-bar-track { grid-column: 1 / -1; height: 9px; border-radius: 5px; overflow: hidden; background: var(--ios-fill, rgba(118,118,128,0.24)); }
.ggs-bar-fill { display: block; height: 100%; width: var(--p); border-radius: 5px; background: var(--ios-label3, rgba(var(--a-ebebf5,235,235,245),0.3)); transform-origin: left; animation: ggsGrow .9s cubic-bezier(.2,.8,.2,1) calc(.15s + var(--i) * 70ms) both; }
.ggs-me .ggs-bar-fill { background: linear-gradient(90deg, rgb(var(--a-a855f7,168,85,247)), #ff3d8b); }
@keyframes ggsGrow { from { transform: scaleX(0); } }

/* ── Fuß ── */
.ggs-foot { display: flex; gap: 10px; padding: 12px 20px 20px; border-top: 0.5px solid var(--ggs-line); }
.ggs-btn {
  flex: 1; min-height: 50px; padding: 0 18px; border: 0; border-radius: 100px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700;
  transition: transform .15s ease, opacity .2s ease, filter .2s ease;
}
.ggs-btn:active { transform: scale(.97); }
.ggs-btn[hidden] { display: none; }
.ggs-ghost { flex: 0 0 auto; color: var(--ios-label, #fff); background: var(--ios-fill, rgba(118,118,128,0.24)); }
.ggs-main { color: #fff; background: linear-gradient(180deg, rgb(var(--a-b86bff,184,107,255)), rgb(var(--a-9333ea,147,51,234))); box-shadow: 0 8px 22px -8px rgba(var(--a-9333ea,147,51,234),0.7); }
.ggs-main.ggs-dim { opacity: .5; }
.ggs-main:disabled { opacity: .6; cursor: default; }
.ggs-sheet button:focus-visible, .ggs-other:focus-visible { outline: 2px solid var(--ggs-acc); outline-offset: 2px; }

/* ── Handy: Blatt von unten ── */
@media (max-width: 560px) {
  .ggs-ov { align-items: flex-end; padding: 0; }
  .ggs-sheet {
    width: 100%;
    max-height: 92vh; max-height: 92dvh;
    border-radius: 28px 28px 0 0;
    transform: translateY(100%); opacity: 1;
    transition: transform .42s cubic-bezier(.32,.72,0,1);
  }
  .ggs-ov.gg-open .ggs-sheet { transform: none; }
  .ggs-ov.gg-out .ggs-sheet { transform: translateY(100%); opacity: 1; transition-duration: .3s; }
  .ggs-grab { display: block; width: 38px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--ios-label3, rgba(var(--a-ebebf5,235,235,245),0.3)); }
  .ggs-head { padding: 10px 14px 2px 18px; }
  .ggs-scroll { padding: 8px 18px 8px; }
  .ggs-title { font-size: 23px; }
  .ggs-foot { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
  .ggs-opt { padding: 11px 10px; gap: 9px; }
}
@media (max-width: 360px) {
  .ggs-names { grid-template-columns: 1fr; }
}
