/* Fragebogen-Oberfläche */

body.app {
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(222, 207, 164, .55), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(199, 156, 189, .22), transparent 60%),
    var(--cream);
  background-attachment: fixed;
}

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(249, 244, 234, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1040px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.topbar img { height: 48px; width: auto; display: block; }
.welcome-head { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: center; margin-bottom: 26px; }
.welcome-head h1 { margin: 0; }
.welcome-portrait { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.welcome-portrait img { width: 190px; height: 190px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 4px solid #fff; box-shadow: var(--shadow); }
.welcome-portrait .sig { font-family: "Gistesy", cursive; font-size: 38px; color: var(--plum); line-height: 1; margin-top: 4px; }
.welcome-portrait small { font-size: 14px; color: var(--muted); max-width: 230px; line-height: 1.45; }
.progress-wrap { flex: 1; max-width: 420px; display: none; }
.progress-wrap.on { display: block; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.progress-label b { color: var(--plum); font-weight: 600; }
.progress { height: 6px; background: var(--sand-soft); border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--plum)); border-radius: 6px; transition: width .4s ease; }

.demo-banner {
  background: var(--sand); color: var(--ink); text-align: center;
  font-size: 14px; padding: 8px 16px;
}
.demo-banner a { color: var(--plum); font-weight: 600; }

main.stage { max-width: 820px; margin: 0 auto; padding: 48px 24px 120px; }

.card {
  background: var(--paper);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 56px 64px;
  animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card .eyebrow { margin-bottom: 14px; display: block; }
.card h1, .card h2 { font-size: 36px; }
.card .intro { color: var(--text); margin-bottom: 28px; }
.lead { font-size: 20px; }
.ready { font-family: var(--font-head); font-size: 23px; color: var(--plum); margin-top: 22px; }
.ready .brand { color: var(--plum); }

/* Onboarding */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 32px 0; }
.fact { background: var(--cream); border-radius: var(--radius); padding: 18px 18px 16px; }
.fact strong { display: block; font-family: var(--font-head); font-size: 24px; color: var(--plum); line-height: 1.2; margin-bottom: 4px; }
.fact span { font-size: 15px; color: var(--muted); line-height: 1.45; display: block; }
.note { background: var(--rose-soft); border-radius: var(--radius); padding: 18px 22px; font-size: 16px; margin-bottom: 32px; }
.chapters-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 14px; }
.chapters-list strong { display: block; color: var(--ink); font-weight: 600; }
.chapters-list small { display: block; font-size: 15px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.chapters-list li { display: flex; gap: 14px; align-items: baseline; font-size: 16px; }
.chapters-list li b { font-family: var(--font-head); color: var(--plum); min-width: 22px; }

/* Felder */
.field { margin-bottom: 26px; }
.field > label, .field-label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 10px; font-size: 17px; }
.field .opt { font-weight: 400; color: var(--muted); font-size: 14px; }
textarea, input[type="text"] {
  width: 100%;
  font: 400 18px/1.55 var(--font-body);
  color: var(--text);
  background: var(--cream);
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 16px 18px;
  transition: border-color .15s, background .15s;
  resize: vertical;
}
textarea:focus, input[type="text"]:focus { outline: none; border-color: var(--rose); background: #fff; }
textarea::placeholder, input::placeholder { color: #A39A9D; }

.hints { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 24px; padding: 0; list-style: none; }
.hints li { font-size: 14px; color: var(--plum); background: var(--rose-soft); border-radius: 30px; padding: 5px 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font: 500 16px/1.2 var(--font-body);
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 11px 18px;
  border-radius: 40px;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--rose); }
.chip.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.chip.dim { opacity: .4; pointer-events: none; }

/* Punkte-Skala 1–5 */
.dots { display: inline-flex; gap: 8px; align-items: center; }
.dot {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff;
  font: 600 14px var(--font-body); color: var(--muted);
  cursor: pointer; transition: all .12s;
  display: inline-flex; align-items: center; justify-content: center;
}
.dot:hover { border-color: var(--rose); color: var(--plum); }
.dot.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.dots.today .dot.on { background: var(--sand); border-color: #C9B57E; color: var(--ink); }
.dots.wide { display: flex; flex-wrap: wrap; gap: 6px; }
.dots.wide .dot { width: 38px; height: 38px; }
.scale-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

/* Worklife-Check */
.grid-legend { display: flex; gap: 22px; font-size: 14px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.grid-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.grid-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center;
  padding: 18px 0; border-top: 1px solid var(--line);
}
.grid-row:last-child { border-bottom: 1px solid var(--line); }
.grid-row .dim-label b { display: block; color: var(--ink); font-weight: 600; font-size: 17px; }
.grid-row .dim-label span { font-size: 14px; color: var(--muted); line-height: 1.4; display: block; }
.grid-scales { display: grid; gap: 8px; }
.grid-scales .row { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.grid-scales .row small { font-size: 13px; color: var(--muted); width: 92px; text-align: right; }
.grid-scales .dot { width: 34px; height: 34px; font-size: 13px; }
.grid-row.done .dim-label b::after { content: " ✓"; color: var(--plum); font-size: 14px; }

/* Präferenz-Skalen */
.pref { padding: 20px 0; border-top: 1px solid var(--line); }
.pref:last-child { border-bottom: 1px solid var(--line); }
.pref-head { display: flex; justify-content: space-between; gap: 16px; font-weight: 600; color: var(--ink); font-size: 16px; margin-bottom: 12px; }
.pref-head span:last-child { text-align: right; }
.pref .row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 12px; margin-top: 6px; }
.pref .row small { font-size: 13px; color: var(--muted); }
.pref .dots { justify-content: space-between; width: 100%; max-width: 360px; justify-self: center; }

/* Ranking */
.rank-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; counter-reset: rank; }
.rank-list li {
  counter-increment: rank;
  display: flex; align-items: center; gap: 12px;
  background: var(--cream); border-radius: 14px; padding: 10px 12px 10px 14px;
  font-weight: 500;
}
.rank-list li::before {
  content: counter(rank);
  font: 700 16px var(--font-head); color: #fff; background: var(--plum);
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.rank-list li .name { flex: 1; }
.rank-list li.must { background: var(--rose-soft); box-shadow: inset 0 0 0 1.5px var(--rose); }
.rank-tools { display: flex; gap: 4px; align-items: center; }
.icon-btn {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px; font-size: 16px;
}
.icon-btn:hover { background: #fff; color: var(--plum); }
.must-toggle {
  font: 500 13px var(--font-body); border: 1.5px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 30px; padding: 6px 12px; cursor: pointer; white-space: nowrap;
}
.must-toggle.on { background: var(--plum); color: #fff; border-color: var(--plum); }
.rank-empty { color: var(--muted); font-size: 15px; background: var(--cream); border-radius: 14px; padding: 14px 16px; margin-bottom: 22px; }
.rank-status { font-size: 15px; color: var(--plum); font-weight: 600; margin: 4px 0 14px; }
.other-row { display: flex; gap: 10px; margin-top: 14px; }
.other-row input { flex: 1; padding: 11px 16px; font-size: 16px; }
.other-row button { white-space: nowrap; }

/* Rückfrage */
.followup {
  margin-top: 8px; margin-bottom: 26px;
  border-left: 3px solid var(--rose);
  padding: 4px 0 4px 22px;
  animation: rise .35s ease both;
}
.followup .who { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.followup .who img { width: 34px; height: auto; }
.followup .q { font-family: var(--font-head); font-size: 21px; color: var(--ink); line-height: 1.4; margin-bottom: 14px; }

/* Navigation */
.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; gap: 16px; }
.nav .right { display: flex; gap: 8px; align-items: center; }
.err { color: #A0304A; font-size: 15px; margin-top: 14px; min-height: 1em; }

/* Warten */
.waiting { text-align: center; padding: 72px 56px; }
.waiting img { width: 72px; margin-bottom: 30px; animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.06); opacity: 1; } }
.waiting .msg { min-height: 3.2em; color: var(--muted); transition: opacity .4s; }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.test-tools { position: fixed; right: 16px; bottom: 16px; display: flex; gap: 8px; z-index: 20; }
.test-tools button, .test-tools a {
  font: 500 13px var(--font-body); background: #fff; border: 1px solid var(--line); color: var(--muted);
  padding: 8px 12px; border-radius: 20px; cursor: pointer; text-decoration: none; box-shadow: var(--shadow);
}

@media (max-width: 720px) {
  .dots.wide .dot { width: 27px; height: 27px; font-size: 12px; border-width: 1px; }
  .dots.wide { gap: 3px; }
  main.stage { padding: 24px 12px 96px; }
  .card { padding: 32px 22px; border-radius: 22px; }
  .card h1, .card h2 { font-size: 27px; }
  .facts { grid-template-columns: 1fr; }
  .topbar-inner { padding: 10px 16px; gap: 14px; }
  .topbar img { height: 36px; }
  .welcome-head { grid-template-columns: 1fr; gap: 22px; }
  .welcome-portrait { order: -1; }
  .welcome-portrait img { width: 140px; height: 140px; }
  .welcome-portrait .sig { font-size: 32px; }
  .topbar .logo-wide { display: none; }
  .grid-row { grid-template-columns: 1fr; }
  .grid-scales .row { justify-content: space-between; }
  .grid-scales .row small { text-align: left; width: auto; }
  .dot { width: 36px; height: 36px; }
  .pref .row { grid-template-columns: 64px 1fr; }
  .nav { flex-direction: column-reverse; align-items: stretch; }
  .nav .btn-primary { width: 100%; }
  .rank-list li { flex-wrap: wrap; }
  .waiting { padding: 48px 22px; }
}
@media (min-width: 721px) { .topbar .logo-compact { display: none; } }

/* Lebenslauf-Upload (Frage 2) */
.file-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; cursor: pointer; }
.file-pick .btn { padding: 11px 24px; font-size: 16px; }
.file-status { font-size: 15px; color: var(--muted); }
.file-done { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-weight: 500; color: var(--plum); }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 15px; }
.file-hint { font-size: 14px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }

/* Hinweisseiten und Einwilligung */
.help { font-size: 15px; color: var(--muted); margin-top: 26px; }
.consent { display: flex; gap: 12px; align-items: flex-start; background: var(--cream); border-radius: var(--radius); padding: 16px 18px; font-size: 15px; line-height: 1.5; margin-top: 8px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--plum); }
.consent a { color: var(--plum); }
