/* Next Move – Design */
:root {
  color-scheme: light;
  --bg: #f6f4ff;
  --surface: #ffffff;
  --surface-2: #f1eefc;
  --ink: #1b1838;
  --ink-2: #5d5a7a;
  --ink-3: #8c89a6;
  --line: #e6e1f6;
  --brand: #5b3df5;
  --brand-2: #8b6cff;
  --brand-ink: #ffffff;
  --coral: #ff6a55;
  --mint: #0fb98a;
  --sun: #ffb020;
  --sky: #2aa7ff;
  --pink: #ff4fa3;
  --grad: linear-gradient(135deg, #5b3df5 0%, #a63df0 52%, #ff6a55 100%);
  --grad-soft: linear-gradient(135deg, #efeaff 0%, #fdeaf4 100%);
  --shadow: 0 10px 30px rgba(43, 25, 140, 0.12);
  --shadow-sm: 0 3px 10px rgba(43, 25, 140, 0.08);
  --r: 22px;
  --r-sm: 14px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; }
h2 { font-size: clamp(22px, 3.2vw, 30px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 750; }
p { margin: 0 0 0.8em; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.center { text-align: center; }
.hidden { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: 999px; border: 0;
  background: var(--brand); color: var(--brand-ink); font-weight: 750; font-size: 18px;
  cursor: pointer; text-decoration: none; box-shadow: 0 6px 18px rgba(91, 61, 245, 0.35);
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.btn.big { min-height: 64px; font-size: 20px; padding: 0 36px; }
.btn.grad { background: var(--grad); }
.btn.white { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: none; border: 2px solid var(--line); }
.btn.soft { background: var(--surface-2); color: var(--brand); box-shadow: none; }
.btn.danger { background: #fff0ee; color: #c8372a; box-shadow: none; }
.btn.sm { min-height: 44px; font-size: 15px; padding: 0 18px; }
.iconbtn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; display: inline-grid; place-items: center;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); cursor: pointer; font-size: 20px; flex-shrink: 0;
}
.iconbtn:active { transform: scale(0.94); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface); padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 850; font-size: 22px; text-decoration: none; color: var(--ink); }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad); display: grid; place-items: center;
  color: #fff; font-size: 22px; box-shadow: 0 4px 12px rgba(166, 61, 240, 0.35);
}
.avatar-pill {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-sm); border: 0; cursor: pointer; font-weight: 700;
}
.avatar-pill .av { width: 36px; height: 36px; border-radius: 50%; background: var(--grad-soft); display: grid; place-items: center; font-size: 22px; }
/* Titelleiste: Schaltflächen heben sich deutlich vom hellen Hintergrund ab */
.topbar .btn.soft { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 12px rgba(91, 61, 245, 0.3); }
.topbar .avatar-pill { color: var(--ink); border: 2px solid var(--brand); padding: 4px 12px 4px 4px; }
.topbar .btn.soft:focus-visible, .topbar .avatar-pill:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }

/* ---------- Start ---------- */
.start {
  min-height: 100vh; position: relative; display: flex; align-items: flex-end; color: #fff;
  background: #1b1838 center/cover no-repeat;
}
.start::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(27, 24, 56, 0.15) 0%, rgba(41, 20, 110, 0.55) 45%, rgba(27, 24, 56, 0.95) 100%);
}
.start .wrap { position: relative; padding-bottom: 48px; padding-top: 48px; width: 100%; }
.start h1 { font-size: clamp(48px, 9vw, 88px); margin-bottom: 8px; }
.start .tag { font-size: clamp(19px, 2.6vw, 26px); max-width: 640px; opacity: 0.95; margin-bottom: 28px; }
.start .brandline { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.start .brandline .logo-mark { width: 56px; height: 56px; font-size: 30px; border-radius: 16px; }
.profiles { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 8px; }
.profile-chip {
  display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-weight: 700; font-size: 17px;
}
.profile-chip .av { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 26px; }
.profile-chip small { display: block; font-weight: 500; opacity: 0.8; font-size: 13px; }
.privacy { display: inline-flex; gap: 8px; align-items: center; opacity: 0.85; font-size: 15px; margin-top: 18px; }
.start a.link { color: #fff; opacity: 0.85; }

/* ---------- Home ---------- */
.hello {
  margin-top: 22px; border-radius: 28px; padding: 28px; color: #fff; background: var(--grad); position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; box-shadow: var(--shadow);
}
.hello::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.hello h1 { font-size: clamp(28px, 4.4vw, 40px); margin-bottom: 6px; }
.hello p { opacity: 0.92; font-size: 18px; margin-bottom: 18px; }
.ring { width: 132px; height: 132px; position: relative; z-index: 1; }
.ring svg { transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-weight: 850; font-size: 30px; line-height: 1; }
.ring .lbl small { display: block; font-size: 12px; font-weight: 600; opacity: 0.9; margin-top: 4px; }

.section-title { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 14px; }
.section-title h2 { margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tile {
  position: relative; border-radius: var(--r); overflow: hidden; min-height: 190px; color: #fff; cursor: pointer;
  background: #2b2560 center/cover no-repeat; box-shadow: var(--shadow-sm); border: 0; text-align: left; padding: 0;
  display: flex; flex-direction: column; justify-content: flex-end; transition: transform 0.15s ease;
}
.tile:active { transform: scale(0.98); }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 16, 50, 0.05) 20%, rgba(20, 16, 50, 0.85) 100%); }
.tile .in { position: relative; padding: 18px; }
.tile .num {
  position: absolute; top: 14px; left: 14px; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, 0.92);
  color: var(--ink); display: grid; place-items: center; font-size: 22px; z-index: 1;
}
.tile .status {
  position: absolute; top: 14px; right: 14px; z-index: 1; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800;
  background: rgba(255, 255, 255, 0.92); color: var(--ink);
}
.tile .status.done { background: var(--mint); color: #fff; }
.tile h3 { margin: 0 0 2px; font-size: 21px; }
.tile p { margin: 0; opacity: 0.88; font-size: 15px; }
.tile.next { outline: 4px solid var(--sun); outline-offset: 3px; }
.tile.feature { min-height: 220px; }

.cta-card {
  display: flex; gap: 18px; align-items: center; padding: 18px; border-radius: var(--r); background: var(--surface);
  box-shadow: var(--shadow-sm); border: 0; width: 100%; text-align: left; cursor: pointer;
}
.cta-card .ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 34px; background: var(--grad-soft); flex-shrink: 0; }
.cta-card h3 { margin: 0; }
.cta-card p { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }

/* ---------- Wizard ---------- */
.wizard { min-height: 100vh; display: flex; flex-direction: column; }
.wiz-top { position: sticky; top: 0; z-index: 10; background: var(--bg); padding: 14px 0 8px; }
.wiz-top .wrap { display: flex; align-items: center; gap: 14px; }
.wiz-title { font-weight: 800; font-size: 17px; }
.wiz-title small { display: block; color: var(--ink-3); font-weight: 600; font-size: 13px; }
.bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; flex: 1; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width 0.35s ease; }
.wiz-body { flex: 1; display: flex; align-items: center; padding: 18px 0 30px; }
.wiz-body > .wrap { width: 100%; max-width: 860px; }
.wiz-foot { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(246, 244, 255, 0) 0%, var(--bg) 35%); padding: 26px 0 22px; pointer-events: none; }
.wiz-foot .btn { pointer-events: auto; }
.wiz-foot .wrap { display: flex; gap: 12px; justify-content: space-between; max-width: 860px; }
.q-emoji { font-size: 56px; line-height: 1; margin-bottom: 10px; }
.q-title { font-size: clamp(26px, 4vw, 38px); font-weight: 850; margin-bottom: 8px; }
.q-sub { color: var(--ink-2); font-size: 18px; margin-bottom: 26px; }

.input {
  width: 100%; min-height: 64px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface);
  padding: 0 22px; font-size: 24px; font-weight: 700; color: var(--ink); outline: none; transition: border-color 0.2s;
}
.input:focus { border-color: var(--brand); }
textarea.input { min-height: 120px; padding: 16px 20px; font-size: 18px; font-weight: 500; resize: vertical; }

.choice-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice-grid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.choice-grid.avatars { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.choice {
  min-height: 64px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); cursor: pointer;
  padding: 12px 16px; font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 12px; text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.choice:active { transform: scale(0.97); }
.choice .e { font-size: 26px; }
.choice small { display: block; color: var(--ink-2); font-weight: 500; font-size: 14px; }
.choice.on { border-color: var(--brand); background: #f0ecff; box-shadow: inset 0 0 0 1px var(--brand); }
.choice.avatar { justify-content: center; font-size: 38px; min-height: 76px; padding: 0; }
.choice .code { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-weight: 850; font-size: 15px; flex-shrink: 0; }
.choice.on .code { background: var(--brand); color: #fff; }
.choice-grid.kantone { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.choice-grid.kantone .choice { font-size: 16px; gap: 10px; padding: 10px 12px; }
.choice .name { min-width: 0; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.copy { color: var(--ink-3); font-size: 13px; margin-top: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  min-height: 52px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: all 0.15s;
}
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.sm { min-height: 40px; font-size: 14px; padding: 0 14px; }

/* Noten */
.grade-row { display: grid; grid-template-columns: 170px 1fr 70px; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.grade-row label { font-weight: 750; }
.grade-val { font-weight: 850; font-size: 24px; text-align: right; }
.grade-row.off .grade-val { color: var(--ink-3); font-size: 15px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 12px; border-radius: 999px; background: linear-gradient(90deg, #ffd7d1, #ffe9b8 45%, #c8f3e3); }
input[type="range"]::-moz-range-track { height: 12px; border-radius: 999px; background: linear-gradient(90deg, #ffd7d1, #ffe9b8 45%, #c8f3e3); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 36px; height: 36px; margin-top: -12px; border-radius: 50%; background: #fff; border: 4px solid var(--brand); box-shadow: var(--shadow-sm); }
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 4px solid var(--brand); }
.avg-box { margin-top: 18px; display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.avg-box b { font-size: 34px; }
.toggle { border: 0; background: var(--surface-2); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; }

/* Swipe */
.deck { position: relative; height: min(56vh, 480px); max-width: 520px; margin: 0 auto; touch-action: none; }
.swipe-card {
  position: absolute; inset: 0; border-radius: 28px; overflow: hidden; background: #2b2560 center/cover no-repeat;
  box-shadow: 0 18px 40px rgba(27, 24, 56, 0.25); color: #fff; display: flex; flex-direction: column; justify-content: flex-end;
  user-select: none; -webkit-user-select: none; will-change: transform; transition: transform 0.3s ease, opacity 0.3s ease;
}
.swipe-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(20, 14, 60, 0.9) 100%); }
.swipe-card .txt { position: relative; padding: 26px; font-size: clamp(22px, 3.4vw, 30px); font-weight: 850; line-height: 1.2; }
.swipe-card.under { transform: scale(0.94) translateY(16px); opacity: 0.7; }
.swipe-card.dragging { transition: none; }
.stamp {
  position: absolute; top: 26px; padding: 8px 16px; border-radius: 12px; font-weight: 900; font-size: 26px; border: 4px solid; opacity: 0;
  transform: rotate(-12deg); background: rgba(255, 255, 255, 0.9);
}
.stamp.yes { left: 22px; color: var(--mint); border-color: var(--mint); }
.stamp.no { right: 22px; color: var(--coral); border-color: var(--coral); transform: rotate(12deg); }
.stamp.maybe { left: 50%; margin-left: -70px; color: var(--sun); border-color: var(--sun); transform: none; }
.swipe-actions { display: flex; justify-content: center; gap: 22px; margin-top: 26px; align-items: center; }
.swipe-btn {
  width: 78px; height: 78px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); font-size: 34px; cursor: pointer;
  display: grid; place-items: center; transition: transform 0.1s;
}
.swipe-btn:active { transform: scale(0.9); }
.swipe-btn.maybe { width: 62px; height: 62px; font-size: 26px; }
.swipe-btn small { display: block; font-size: 11px; font-weight: 800; color: var(--ink-2); margin-top: -4px; }
.swipe-hint { text-align: center; color: var(--ink-2); margin-top: 12px; font-size: 15px; }
.counter { text-align: center; font-weight: 800; color: var(--brand); margin-bottom: 14px; }

/* Rating */
.rate-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.rate-row .lbl { display: flex; gap: 14px; align-items: center; }
.rate-row .lbl .e { font-size: 30px; }
.rate-row .lbl b { display: block; font-size: 18px; }
.rate-row .lbl small { color: var(--ink-2); font-size: 14px; }
.dots { display: flex; gap: 8px; }
.dot { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 800; color: var(--ink-3); font-size: 15px; }
.dot.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.dot.fill { background: #e8e2ff; border-color: #cfc4ff; color: var(--brand); }
.scale-legend { display: flex; justify-content: flex-end; gap: 8px; font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }

/* Likert / Dies oder das */
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.lk {
  border: 2px solid var(--line); background: var(--surface); border-radius: 20px; padding: 18px 6px; cursor: pointer; text-align: center;
  font-weight: 750; font-size: 15px; transition: all 0.15s;
}
.lk .e { font-size: 42px; display: block; margin-bottom: 6px; transition: transform 0.2s; }
.lk.on { border-color: var(--brand); background: #f0ecff; }
.lk.on .e { transform: scale(1.18); }
.q-card { background: var(--surface); border-radius: 28px; padding: 34px; box-shadow: var(--shadow); margin-bottom: 26px; position: relative; overflow: hidden; }
.q-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--grad); }
.q-card .q-title { margin: 0; }
.q-num { font-weight: 800; color: var(--brand); margin-bottom: 8px; }

.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; }
.vs-side { background: var(--surface); border-radius: 24px; padding: 26px 16px; text-align: center; box-shadow: var(--shadow-sm); border: 3px solid transparent; transition: all 0.2s; }
.vs-side .e { font-size: 64px; display: block; }
.vs-side b { font-size: 22px; display: block; margin-top: 8px; }
.vs-side.lean { border-color: var(--brand); background: #f6f3ff; }
.vs-mid { display: grid; place-items: center; font-weight: 900; color: var(--ink-3); }
.vs-scale { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.vs-dot { flex: 1; min-height: 64px; border-radius: 18px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 750; font-size: 14px; padding: 6px; }
.vs-dot.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Feier ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(27, 24, 56, 0.55); display: grid; place-items: center; padding: 20px; animation: fade 0.2s ease; }
.celebrate { background: var(--surface); border-radius: 32px; padding: 34px; max-width: 520px; width: 100%; text-align: center; box-shadow: var(--shadow); animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
.celebrate .badge { width: 110px; height: 110px; margin: -90px auto 14px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 56px; box-shadow: 0 12px 30px rgba(166, 61, 240, 0.45); border: 6px solid #fff; }
.celebrate .btns { display: grid; gap: 10px; margin-top: 20px; }
@keyframes pop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; }

/* ---------- Modal / Sheet ---------- */
.sheet { background: var(--surface); border-radius: 28px; max-width: 760px; width: 100%; max-height: 92vh; overflow: auto; box-shadow: var(--shadow); animation: pop 0.25s ease; }
.sheet-hero { height: 240px; background: #2b2560 center/cover no-repeat; position: relative; color: #fff; display: flex; align-items: flex-end; }
.sheet-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(20, 14, 60, 0.85)); }
.sheet-hero .in { position: relative; padding: 22px 26px; width: 100%; }
.sheet-hero h2 { margin: 6px 0 0; color: #fff; }
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.sheet-fav { position: absolute; top: 14px; right: 74px; z-index: 2; }
.sheet-body { padding: 24px 26px 30px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.fact { background: var(--surface-2); border-radius: 16px; padding: 12px 14px; }
.fact small { display: block; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.fact b { font-size: 17px; }
.links { display: grid; gap: 10px; margin-top: 16px; }
.linkbtn { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); text-decoration: none; color: var(--ink); font-weight: 700; }
.linkbtn span.e { font-size: 22px; }
.linkbtn small { display: block; color: var(--ink-2); font-weight: 500; }

/* ---------- Badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: var(--surface-2); color: var(--ink-2); }
.pill.efz { background: #e3f0ff; color: #1767c2; }
.pill.eba { background: #fff1d6; color: #9a6200; }
.pill.bm { background: #e6fbf3; color: #0a7d5d; }
.pill.light { background: rgba(255, 255, 255, 0.22); color: #fff; }
.match { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-weight: 850; font-size: 14px; color: #fff; background: var(--mint); }
.match.mid { background: var(--sun); }
.match.low { background: var(--ink-3); }

/* ---------- Explorer ---------- */
.searchbar { position: sticky; top: calc(70px + env(safe-area-inset-top, 0px)); z-index: 15; background: var(--bg); padding: 14px 0 10px; }
.search { position: relative; }
.search input { padding-left: 54px; font-size: 19px; font-weight: 600; min-height: 58px; }
.search .e { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 22px; }
.hscroll { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .chip { flex-shrink: 0; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding: 10px 0 40px; }
.jcard { background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; display: flex; flex-direction: column; border: 0; padding: 0; text-align: left; transition: transform 0.12s; }
.jcard:active { transform: scale(0.98); }
.jcard .img { height: 120px; background: #2b2560 center/cover no-repeat; position: relative; }
.jcard .img .femoji { position: absolute; left: 12px; bottom: -18px; width: 44px; height: 44px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-size: 24px; box-shadow: var(--shadow-sm); }
.jcard .img .match { position: absolute; right: 10px; top: 10px; }
.jcard .img .heart { position: absolute; left: 10px; top: 10px; font-size: 22px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)); }
.jcard .body { padding: 26px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.jcard h3 { font-size: 17px; margin: 0; }
.jcard p { font-size: 14px; color: var(--ink-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jcard .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.empty { text-align: center; padding: 60px 20px; color: var(--ink-2); }
.empty .e { font-size: 60px; }

/* ---------- Auswertung ---------- */
.result-hero { margin-top: 22px; border-radius: 32px; overflow: hidden; position: relative; color: #fff; background: #2b2560 center/cover no-repeat; min-height: 340px; display: flex; align-items: flex-end; box-shadow: var(--shadow); }
.result-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(91, 61, 245, 0.92) 0%, rgba(166, 61, 240, 0.75) 45%, rgba(255, 106, 85, 0.35) 100%); }
.result-hero .in { position: relative; padding: 34px; max-width: 760px; }
.result-hero .kicker { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 14px; opacity: 0.9; }
.result-hero h1 { font-size: clamp(32px, 5.4vw, 52px); margin: 8px 0 12px; }
.result-hero p { font-size: 19px; opacity: 0.95; }
.cards2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--surface); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow-sm); }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card.tint { background: var(--grad-soft); box-shadow: none; }
.meter { margin: 14px 0 18px; }
.meter .lbls { display: flex; justify-content: space-between; font-weight: 750; font-size: 15px; margin-bottom: 8px; }
.meter .track { height: 16px; border-radius: 999px; background: var(--line); position: relative; overflow: visible; }
.meter .fill { height: 100%; border-radius: 999px; background: var(--grad); }
.meter .marker { position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #fff; border: 5px solid var(--brand); box-shadow: var(--shadow-sm); }
.meter .track.split { background: linear-gradient(90deg, #ffb7a8, #e9e3ff 50%, #b5a6ff); }
.reasons { list-style: none; padding: 0; margin: 0; }
.reasons li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.reasons li:last-child { border-bottom: 0; }
.reasons li .e { flex-shrink: 0; }
.ibars .ib { display: grid; grid-template-columns: 34px 180px 1fr 44px; gap: 10px; align-items: center; padding: 6px 0; }
.ibars .ib .e { font-size: 22px; }
.ibars .ib .t { height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ibars .ib .t i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.ibars .ib b { text-align: right; font-size: 14px; color: var(--ink-2); }
.ladder { display: grid; gap: 10px; }
.ladder .lane { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
.ladder .lane.on { background: #ece6ff; box-shadow: inset 0 0 0 2px var(--brand); }
.ladder .node { padding: 8px 12px; border-radius: 12px; background: #fff; font-weight: 750; font-size: 14px; box-shadow: var(--shadow-sm); }
.ladder .arr { color: var(--ink-3); font-weight: 900; }
.timeline { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.timeline li { position: relative; padding: 0 0 20px 58px; counter-increment: s; }
.timeline li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 850; }
.timeline li::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li b { display: block; font-size: 18px; }
.qlist { margin: 0; padding-left: 22px; }
.qlist li { margin-bottom: 8px; }
.field-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field-card { border-radius: var(--r); min-height: 150px; color: #fff; background: #2b2560 center/cover no-repeat; position: relative; overflow: hidden; display: flex; align-items: flex-end; border: 0; padding: 0; text-align: left; cursor: pointer; }
.field-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(20, 14, 60, 0.88)); }
.field-card .in { position: relative; padding: 16px; }
.field-card .rank { position: absolute; top: 12px; left: 12px; background: #fff; color: var(--ink); border-radius: 12px; padding: 4px 10px; font-weight: 850; z-index: 1; }
.disclaimer { font-size: 14px; color: var(--ink-2); background: var(--surface-2); border-radius: 16px; padding: 14px 18px; }
.print-head { display: none; }
/* PDF aus der installierten App (js/pdf.js): Darstellung wie im Druck */
.pdf-mode { background: #fff; padding-top: 16px; }
.pdf-mode .toolbar, .pdf-mode .no-print, .pdf-mode footer.foot, .pdf-mode .banner { display: none !important; }
.pdf-mode .print-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #5b3df5; padding-bottom: 8px; margin-bottom: 12px; }
.pdf-mode, .pdf-mode * { box-shadow: none !important; animation: none !important; transition: none !important; }
.pdf-mode .card, .pdf-mode .jcard { border: 1px solid #ddd; }
.pdf-mode .result-hero { margin-top: 0; }
.pdf-mode .section-title { padding: 8px 0 10px; align-items: center; }
.pdf-mode .ibars .ib { grid-template-columns: 26px minmax(0, 1fr) 90px 30px; }
.pdf-mode .jcard h3 { overflow-wrap: anywhere; }
.pdf-mode .section-title h2 { line-height: 1.3; }
.pdf-mode .grid-cards { grid-template-columns: repeat(3, 1fr); padding-bottom: 0; }
.pdf-mode .jcard .img { height: 90px; }
.pdf-mode .jcard p { display: block; overflow: visible; -webkit-line-clamp: unset; }
.pdf-busy { position: fixed; inset: 0; z-index: 400; background: rgba(27, 24, 56, 0.6); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 50px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 999px; font-weight: 700; z-index: 300; box-shadow: var(--shadow); animation: pop 0.25s ease; }
.banner { background: #fff4d6; color: #7a5200; padding: 10px 16px; border-radius: 14px; font-size: 14px; margin-top: 14px; }

.info h2 { margin-top: 28px; }
.info .card + .card { margin-top: 14px; }
footer.foot { padding: 30px 0 50px; color: var(--ink-3); font-size: 14px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hello { grid-template-columns: 1fr; padding: 22px; }
  .ring { width: 110px; height: 110px; }
  .grade-row { grid-template-columns: 1fr 64px; }
  .grade-row input { grid-column: 1 / -1; grid-row: 2; }
  .likert { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .lk { padding: 12px 2px; font-size: 12px; }
  .lk .e { font-size: 32px; }
  .rate-row { grid-template-columns: 1fr; }
  .dot { width: 44px; height: 44px; }
  .versus { grid-template-columns: 1fr 1fr; }
  .vs-mid { display: none; }
  .vs-scale { flex-wrap: wrap; }
  .vs-dot { min-width: calc(50% - 6px); }
  .ibars .ib { grid-template-columns: 30px 1fr 40px; }
  .ibars .ib .t { grid-column: 2 / 4; grid-row: 2; }
  .result-hero .in, .q-card { padding: 22px; }
  .topbar .logo span.word { display: none; }
}

/* ---------- Druck / PDF ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 12pt; }
  .topbar, .toolbar, .no-print, footer.foot, .banner, .toast, .overlay, #confetti { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .print-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #5b3df5; padding-bottom: 8px; margin-bottom: 12px; }
  .result-hero { min-height: 0; box-shadow: none; border-radius: 16px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .result-hero .in { padding: 20px; }
  .card, .field-card, .jcard, .ladder .lane, .meter .fill, .meter .track, .ibars .t i, .timeline li::before, .match, .pill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* Schatten drucken als graue Kästen – im Druck weglassen */
  * { box-shadow: none !important; }
  .card { border: 1px solid #ddd; }
  /* Grafische Elemente nie über einen Seitenumbruch teilen (page-break-* für Safari/iPad) */
  .card, .jcard, .field-card, .result-hero, .ladder .lane, .ibars .ib, .meter, .timeline li, .reasons > *, .print-head {
    break-inside: avoid; page-break-inside: avoid;
  }
  .section-title { break-after: avoid; page-break-after: avoid; margin-top: 18px; }
  /* Safari teilt Raster-Elemente trotz break-inside – als Inline-Blöcke sind sie unteilbar */
  .cards2, .grid-cards, .field-cards { display: block; font-size: 0; padding-bottom: 0; }
  .cards2 > * { display: inline-block; vertical-align: top; width: 49%; margin: 0 0 12px; font-size: 12pt; }
  .cards2 > :nth-child(odd) { margin-right: 2%; }
  .cards2 > :only-child { width: 100%; margin-right: 0; }
  .grid-cards > .jcard { display: inline-flex; vertical-align: top; width: 23.5%; margin: 0 2% 8px 0; font-size: 12pt; }
  .grid-cards > .jcard:nth-child(4n) { margin-right: 0; }
  .jcard { border: 1px solid #ddd; }
  .jcard h3 { overflow-wrap: anywhere; hyphens: auto; }
  .field-cards > .field-card { display: inline-flex; vertical-align: top; width: 32%; margin: 0 2% 8px 0; font-size: 12pt; }
  .field-cards > .field-card:nth-child(3n) { margin-right: 0; }
  .field-card .in { padding-top: 46px; }
  .ibars .ib { grid-template-columns: 26px minmax(0, 1fr) 70px 30px; }
  .jcard .img { height: 46px; }
  .jcard .img .femoji { display: none; }
  .jcard .body { padding: 8px 10px; }
  .jcard h3 { font-size: 11pt; }
  .jcard p { font-size: 9pt; }
  .field-card { min-height: 90px; }
  textarea { border: 1px solid #ccc !important; }
}
