/* einly · Stil A4 „Beere“ */
:root {
  --bg: #FBEDEA;
  --surface: #FFF7F5;
  --card: #FFFFFF;
  --ink: #2A1420;
  --muted: #674E5A;
  --muted-2: #8A7280;
  --line: #F2DFDB;
  --line-2: #E6CEC9;
  --accent: #B0275C;
  --accent-ink: #FFFFFF;
  --soft: #FFE0C2;
  --soft-ink: #6E3A0E;
  --danger: #A3203C;
  --ok: #1F7A4D;
  --r-card: 36px;
  --r-field: 18px;
  --tabbar: 62px;
  /* Schwebende Leiste unten (wie die neuen iPhone-Apps): Abstand vom unteren Rand, am iPhone knapp über dem Home-Strich */
  --safe-b: max(12px, calc(env(safe-area-inset-bottom) - 8px));
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* „hidden“ soll immer gewinnen, auch gegen display: flex */
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Sora, system-ui, sans-serif; font-size: 16px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--accent); }

#app { max-width: 480px; min-height: 100dvh; margin: 0 auto; background: var(--surface); display: flex; flex-direction: column; }
.screen { flex: 1; padding: max(24px, env(safe-area-inset-top)) 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.screen.center { justify-content: center; }

.wordmark { font-weight: 800; font-size: 26px; letter-spacing: -1px; }
.wordmark span { color: var(--accent); }
h1 { font-size: 32px; line-height: 1.12; letter-spacing: -.5px; margin: 8px 0 0; font-weight: 700; }
h2 { font-size: 24px; line-height: 1.2; margin: 0; font-weight: 700; }
.lead { color: var(--muted); font-size: 16px; margin: 0; }
.small { color: var(--muted); font-size: 13px; margin: 0; }
.dots { display: flex; gap: 6px; }
.dots span { height: 6px; width: 6px; border-radius: 3px; background: var(--line-2); }
.dots span.on { width: 22px; background: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 999px; border: none; font-weight: 600; font-size: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { background: var(--card); color: var(--ink); border: 1.5px solid var(--line-2); }
.btn-link { background: none; border: none; color: var(--muted); text-decoration: underline; min-height: 44px; padding: 0 8px; font-size: 14px; }
.btn-block { width: 100%; }
.actions { display: flex; gap: 10px; margin-top: auto; padding-top: 8px; }
.actions .btn { flex: 1; }

label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
label.field .hint { font-weight: 400; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 50px; border: 1.5px solid var(--line-2); border-radius: var(--r-field); background: var(--card); padding: 12px 14px; font-weight: 400; }
textarea.input { resize: vertical; min-height: 84px; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); font-size: 14px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.group-title { font-weight: 600; font-size: 14px; margin: 6px 0 -6px; }

.error { color: var(--danger); font-size: 14px; min-height: 20px; margin: 0; }
.ok { color: var(--ok); font-weight: 600; }
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.notice { background: var(--soft); color: var(--soft-ink); border-radius: 24px; padding: 14px 16px; font-size: 14px; }

.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photo-slot { position: relative; aspect-ratio: 4 / 5; border-radius: 24px; border: 1.5px dashed var(--line-2); background: var(--card); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted-2); font-size: 28px; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-slot .remove { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(42,20,32,.75); color: #fff; font-size: 16px; }

.profile-photo { border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4 / 5; background: var(--line); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prompt-card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; }
.prompt-card .q { font-size: 13px; font-weight: 600; color: var(--muted); }
.prompt-card .a { font-size: 21px; font-weight: 600; line-height: 1.3; margin-top: 6px; }
.vitals { display: flex; flex-wrap: wrap; gap: 8px; }
.vitals span { background: var(--soft); color: var(--soft-ink); border-radius: 999px; padding: 6px 12px; font-size: 14px; }

#toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tabbar) + 16px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 18px; font-size: 14px; max-width: 90vw; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.show { opacity: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.field-title { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.hint { display: block; color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 2px; }
label.field .hint { display: inline; margin: 0; }

/* Freiwillige Angaben: grau = nicht im Profil */
.opt-card { border-radius: 24px; padding: 14px 16px; background: var(--line); border: 1.5px solid var(--line); transition: background .15s; }
.opt-card .chip:not([aria-pressed="true"]), .opt-card .input { background: transparent; }
.opt-card.on { background: var(--card); border-color: var(--line-2); }
.opt-card.on .input { background: var(--card); }
.opt-card .opt-head { margin: 0 0 10px; }
.opt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.opt-tag { font-size: 12px; font-weight: 500; color: var(--muted); }
.opt-card.on .opt-tag { color: var(--accent); }
.count { text-align: right; }

/* Fotos */
.photo-slot .edit { position: absolute; inset: 0; border: 0; padding: 0; background: none; }
.photo-slot.filled { border-style: solid; }
.photo-slot .main-tag { position: absolute; left: 6px; bottom: 6px; border: 0; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,.92); color: var(--ink); }
.photo-slot .main-tag { background: var(--accent); color: #fff; }

/* Zuschneiden */
.cropper { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; gap: 14px; padding: 12px 20px 24px; overflow-y: auto; }
.cropper-head { display: flex; justify-content: space-between; align-items: center; }
.cropper-head .strong { font-weight: 700; color: var(--accent); }
.cropper-stage { position: relative; width: 100%; max-width: 420px; margin: 0 auto; border-radius: var(--r-card); overflow: hidden; touch-action: none; cursor: grab; background: #000; }
.cropper-stage canvas { display: block; }
.cropper-frame { position: absolute; inset: 0; border-radius: var(--r-card); box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); pointer-events: none; }
.cropper-zoom input { width: 100%; accent-color: var(--accent); }
.center { text-align: center; }

/* ---------- App-Rahmen mit Leiste unten ---------- */
.shell { display: flex; flex-direction: column; min-height: 100dvh; }
.view { flex: 1; display: flex; flex-direction: column; padding-bottom: calc(var(--tabbar) + var(--safe-b) + 12px); }
.tabbar { position: fixed; bottom: var(--safe-b); left: 50%; transform: translateX(-50%); width: calc(100% - 28px); max-width: 452px; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; height: var(--tabbar); padding: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .74); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(42, 20, 32, .08); box-shadow: 0 8px 28px rgba(42, 20, 32, .14); }
.tabbar button { position: relative; background: none; border: 0; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px 0; color: var(--muted-2); font-size: 11px; font-weight: 600; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabbar button[aria-current="true"] { color: var(--accent); }
.tabbar button[aria-current="true"] svg { stroke-width: 2.3; }
.badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--accent); color: #fff; font-size: 11px; font-style: normal; line-height: 18px; text-align: center; }
.badge:empty { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 6px; }
.loading { margin: 40vh auto; width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.topline { display: flex; justify-content: space-between; align-items: center; }
.pill { background: var(--soft); color: var(--soft-ink); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--card); color: var(--muted-2); display: inline-flex; align-items: center; justify-content: center; transition: background .25s, color .25s, border-color .25s; }
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.icon-btn:hover, .icon-btn:active { background: var(--line); border-color: var(--muted-2); color: var(--ink); }

/* ---------- Profil-Ansicht ---------- */
.profile { display: flex; flex-direction: column; gap: 14px; }
.profile-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.profile-head h1 { margin: 0; }
.profile-head .age { font-weight: 500; color: var(--muted); margin-left: 10px; }
.profile-photo { position: relative; }
.prompt-card { position: relative; }
.prompt-card .a { padding-right: 44px; white-space: pre-wrap; overflow-wrap: anywhere; }
.vitals-card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.vitals.interests span { background: var(--card); border: 1.5px solid var(--line-2); color: var(--ink); }
.photo-missing { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 14px; padding: 20px; }
.like-btn { position: absolute; right: 14px; bottom: 14px; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--surface); color: var(--accent); box-shadow: 0 0 14px rgba(42,20,32,.34); display: flex; align-items: center; justify-content: center; }
/* Herz: beim Darüberfahren / Antippen etwas kräftiger */
.like-btn { transition: background .25s, color .25s, transform .25s, box-shadow .25s; }
.like-btn:hover, .like-btn:active { background: #F6CBD8; color: #7A0F3B; transform: scale(1.06); box-shadow: 0 0 18px rgba(122,15,59,.42); }
.like-btn svg { width: 30px; height: 30px; margin-top: 3px; overflow: visible; fill: currentColor; }
.like-btn .lh { transform-box: fill-box; transform-origin: center; }
.like-btn .ls { opacity: 0; transform-box: fill-box; transform-origin: 0% 100%; transform: scale(.4); transition: opacity .3s ease, transform .35s cubic-bezier(.3, 1.6, .5, 1); }
/* geklickt: dunkler, Herz pulsiert kurz, Strahlen springen heraus */
.like-btn.liked { background: #F6CBD8; color: #6E0A33; transform: scale(1.06); }
.like-btn.liked .lh { animation: like-pop .38s ease; }
.like-btn.liked .ls { opacity: 1; transform: scale(1); }
@keyframes like-pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
.marked { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip-space { height: 64px; }
.skip-btn { position: fixed; z-index: 15; left: max(20px, calc(50% - 220px)); bottom: calc(var(--tabbar) + 14px + var(--safe-b)); width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--surface); color: var(--muted); font-size: 22px; box-shadow: 0 0 14px rgba(42,20,32,.34); transition: background .25s, color .25s, transform .25s, box-shadow .25s; }
.skip-btn:hover, .skip-btn:active { background: var(--line); color: var(--ink); transform: scale(1.06); box-shadow: 0 0 18px rgba(42,20,32,.42); }

/* ---------- Fenster von unten ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(42,20,32,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto; background: var(--surface); border-radius: 28px 28px 0 0; padding: 18px 20px calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.target { border-radius: 24px; overflow: hidden; }
.target.prompt, .target.poll { background: var(--card); border: 1.5px solid var(--line); padding: 16px 18px; }
.target .q { font-size: 13px; font-weight: 600; color: var(--muted); }
.target .a { font-size: 18px; font-weight: 600; margin-top: 4px; white-space: pre-wrap; }
/* Gelikte Fotos immer im Originalformat 4:5 zeigen (nichts abschneiden), mittig */
.target-img { display: block; aspect-ratio: 4 / 5; height: min(44dvh, 360px); width: auto; max-width: 100%; margin: 0 auto; object-fit: cover; border-radius: 22px; }
.target.photo { display: flex; justify-content: center; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-list .btn { justify-content: flex-start; }
.btn-danger { background: var(--card); color: var(--danger); border: 1.5px solid var(--line-2); }
.celebrate { display: flex; flex-direction: column; gap: 14px; text-align: center; padding: 8px 0; }
.celebrate img { width: 140px; height: 175px; object-fit: cover; border-radius: 28px; margin: 0 auto; }

/* ---------- Posteingang ---------- */
.like-note { background: var(--card); border: 1.5px solid var(--accent); border-radius: var(--r-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.like-note .who { font-weight: 700; }
.like-note .comment { font-size: 18px; font-weight: 600; white-space: pre-wrap; }
.decide { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 0 calc(var(--tabbar) + var(--safe-b) + 10px); margin-bottom: calc(-1 * (var(--tabbar) + var(--safe-b) + 12px)); background: linear-gradient(transparent, var(--surface) 30%); }
.decide .btn { flex: 1; }

/* ---------- Match & Chat ---------- */
.match-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 16px 12px; background: var(--surface); border-bottom: 1.5px solid var(--line); }
.match-head img { width: 44px; height: 55px; object-fit: cover; border-radius: 14px; }
.match-head .name { font-weight: 700; font-size: 18px; flex: 1; }
.seg { display: flex; gap: 6px; padding: 10px 16px 0; }
.seg button { flex: 1; min-height: 40px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); font-weight: 600; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chat { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.msg { max-width: 80%; padding: 10px 14px; border-radius: 20px; background: var(--card); border: 1.5px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--accent); color: #fff; border-color: var(--accent); border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-start; border-bottom-left-radius: 6px; }
.msg time { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }
.day { align-self: center; font-size: 12px; color: var(--muted); margin: 6px 0; }
.origin { align-self: stretch; display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1.5px dashed var(--line-2); border-radius: 24px; padding: 14px; font-size: 14px; }
.origin img { width: 64px; height: 80px; object-fit: cover; border-radius: 14px; }
.origin .row-o { display: flex; gap: 10px; align-items: flex-start; }
.composer { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: flex-end; padding: 10px 16px calc(var(--tabbar) + var(--safe-b) + 10px); margin-bottom: calc(-1 * (var(--tabbar) + var(--safe-b) + 12px)); background: var(--surface); border-top: 1.5px solid var(--line); }
.composer textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; }
.composer .btn { min-height: 46px; padding: 0 18px; }

/* ---------- Einstellungen & Karte ---------- */
.map { height: 300px; border-radius: 24px; overflow: hidden; border: 1.5px solid var(--line-2); z-index: 0; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--accent); }
.range-row output { min-width: 64px; text-align: right; font-weight: 700; }
.must { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.must input { width: 20px; height: 20px; accent-color: var(--accent); }
.list-btn { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 56px; padding: 0 18px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; text-align: left; }
.list-btn::after { content: '›'; font-size: 22px; color: var(--muted-2); }
.list-btn.danger { color: var(--danger); }

.poll-options { margin-top: 10px; padding-right: 44px; }
.prompt-card.poll .like-btn { top: 14px; bottom: auto; }
.sticky-top { position: sticky; top: 0; z-index: 30; background: var(--surface); margin: -8px -20px 0; padding: 8px 12px; border-bottom: 1.5px solid var(--line); }
.btn-link.strong { color: var(--accent); font-weight: 700; text-decoration: none; }

/* Icons (Inline-SVG aus icons/icons.svg, Farbe folgt der Schrift) */
.ic { width: 20px; height: 20px; flex: none; }
.ipill { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
.chip:disabled { opacity: .42; cursor: not-allowed; }

/* Interessen-Auswahl */
.int-tools { display: flex; gap: 10px; align-items: center; }
.int-count { white-space: nowrap; background: var(--line); color: var(--muted); border-radius: 999px; padding: 12px 14px; font-size: 13px; font-weight: 600; }
.int-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 4px; }
.int-filters::-webkit-scrollbar { display: none; }
.int-filters .chip { white-space: nowrap; }
.int-group h3 { font-size: 16px; margin: 6px 0 10px; }
.int-footer { position: sticky; bottom: 0; margin: auto -20px 0; padding: 10px 20px max(14px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.int-footer .actions { margin-top: 0; padding-top: 0; }
.int-footer .error:empty { display: none; }

/* Profilangaben nach Themen */
.facts { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-card); padding: 6px 18px; }
.fact-row { padding: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.fact-row + .fact-row { border-top: 1.5px solid var(--line); }
.fact-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.fact-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { display: inline-flex; align-items: center; gap: 8px; background: var(--soft); color: var(--soft-ink); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.fact .ic { width: 20px; height: 20px; }

.chip { display: inline-flex; align-items: center; gap: 7px; }
.chip .ic { width: 22px; height: 22px; }
.ipill .ic, .fact .ic { width: 24px; height: 24px; }
.with-ic { display: inline-flex; align-items: center; gap: 7px; }
.fact .ic + .ic { margin-left: -4px; }

/* „Sucht“ direkt unter dem Namen */
.intent-badge { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; background: var(--soft); color: var(--soft-ink); border-radius: 999px; padding: 10px 16px; font-size: 15px; margin-top: -4px; }
.intent-badge .ic { width: 26px; height: 26px; }

.view .int-footer { bottom: 0; padding-bottom: calc(var(--tabbar) + var(--safe-b) + 10px); margin-bottom: calc(-1 * (var(--tabbar) + var(--safe-b) + 12px)); }

/* Fotos verschieben */
.photo-slot.filled { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.photo-slot.dragging { opacity: .25; border: 2px dashed var(--accent); }
.photo-slot.shifting { transition: transform .55s cubic-bezier(.25, .8, .25, 1); }
.photo-slot.drop-target { outline: 3px solid var(--accent); outline-offset: 2px; }
.drag-ghost { position: fixed; z-index: 70; pointer-events: none; margin: 0; transform: rotate(3deg) scale(1.05); box-shadow: 0 12px 28px rgba(42,20,32,.3); cursor: grabbing; }

/* Überspringen: Kreuz dreht sich beim Antippen, beim Klick eine ganze Drehung */
.skip-btn { display: flex; align-items: center; justify-content: center; }
.skip-btn svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.skip-btn:hover svg, .skip-btn:active svg { transform: rotate(90deg); }
.skip-btn.skipping { background: var(--line); color: var(--ink); }
.skip-btn.skipping svg { animation: skip-spin .38s ease-in; }
@keyframes skip-spin { 0% { transform: rotate(90deg) scale(1); } 60% { transform: rotate(250deg) scale(1.15); } 100% { transform: rotate(360deg) scale(.6); opacity: .3; } }
.skip-btn:disabled { opacity: 1; cursor: default; }

/* Zurück zum vorherigen Profil: nur der Pfeil, ohne Knopf-Optik */
.profile-head .icon-btn { align-self: center; flex: none; }
.back-btn { width: 44px; height: 44px; margin-left: -4px; border: 0; background: none; padding: 0; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color .25s; }
.back-btn svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; transform-origin: 12% 46%; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.back-btn:hover, .back-btn:active { color: var(--ink); }
/* Darüberfahren: nur leicht kippen, die Spitze bleibt bündig mit dem Namen. Erst beim Drücken geht sie kurz nach links hinaus. */
.back-btn:hover svg { transform: rotate(-10deg); }
.back-btn:active svg { transform: translateX(-5px) rotate(-12deg); }
.back-btn:disabled { color: var(--line-2); cursor: default; }
.back-btn:disabled svg { transform: none; }
.back-btn.rewinding { color: var(--ink); }
.back-btn.rewinding svg { animation: back-swing .38s ease-in; }
@keyframes back-swing { 0% { transform: translateX(-5px) rotate(-12deg); } 45% { transform: translateX(4px) rotate(8deg); } 100% { transform: translateX(-26px) rotate(-30deg); opacity: 0; } }
.from-back { animation: from-left .45s cubic-bezier(.25, .8, .25, 1); }
@keyframes from-left { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .back-btn svg, .from-back, .skip-btn svg { animation: none !important; transition: none !important; } }
.screen { position: relative; }
.topline.pinned { position: absolute; top: max(24px, env(safe-area-inset-top)); left: 20px; }

/* Abmelden / Konto löschen: ganz unten in „Profil bearbeiten“, Text mittig, ohne Pfeil */
.account-actions { margin-top: auto; padding-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.list-btn.plain { justify-content: center; text-align: center; }
.list-btn.plain::after { content: none; }

/* Pflichtangaben in „Mehr über dich“: immer hell (stehen immer im Profil), fehlende rot umrandet */
.section-title { font-size: 17px; margin: 12px 0 -4px; }
.opt-card.req { background: var(--card); border-color: var(--line-2); }
.opt-card.req .input { background: var(--card); }
.opt-tag.req { color: var(--muted); }
.opt-card.missing { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) inset; }

/* Seitenkopf: Zurück und Speichern nie umbrechen, langer Titel mittig */
.sticky-top .btn-link { white-space: nowrap; flex: none; }
.sticky-top strong { text-align: center; padding: 0 8px; line-height: 1.25; }

/* ---------- Rückmeldung beim Darüberfahren und Antippen ----------
   Überall gleich: Fläche bzw. Schrift wird sanft dunkler/kräftiger.
   Darüberfahren nur mit Maus (sonst bleibt der Zustand auf dem Handy nach dem Tippen hängen),
   Antippen/Drücken (:active) überall. */
.btn, .chip, .list-btn, .btn-link, .tabbar button, .photo-slot, .photo-slot .remove, .photo-slot .main-tag, .must {
  transition: background-color .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn-primary:not(:disabled):active { background: #8E1E4A; }
.btn-secondary:not(:disabled):active, .btn-danger:not(:disabled):active { background: var(--line); border-color: var(--muted-2); }
.btn-danger:not(:disabled):active { color: #7E1830; }
.list-btn:not(:disabled):active { background: #FBEFEC; border-color: var(--line-2); }
.list-btn.danger:not(:disabled):active { color: #7E1830; }
.chip:not(:disabled):not([aria-pressed="true"]):active { background: var(--line); border-color: var(--muted-2); }
.opt-card:not(.on):not(.req) .chip:not(:disabled):not([aria-pressed="true"]):active { background: var(--line-2); }
.chip[aria-pressed="true"]:not(:disabled):active { background: #120810; border-color: #120810; }
.btn-link:not(:disabled):active { color: var(--ink); }
.btn-link.strong:not(:disabled):active { color: #7A0F3B; }
.tabbar button:active { color: var(--ink); }
.tabbar button[aria-current="true"]:active { color: #7A0F3B; }
.photo-slot:not(.filled):active { background: var(--line); border-color: var(--muted-2); }
.photo-slot .remove:active { background: rgba(42,20,32,.95); }
@media (hover: hover) {
  .btn-primary:not(:disabled):hover { background: #8E1E4A; }
  .btn-secondary:not(:disabled):hover, .btn-danger:not(:disabled):hover { background: var(--line); border-color: var(--muted-2); }
  .btn-danger:not(:disabled):hover { color: #7E1830; }
  .list-btn:not(:disabled):hover { background: #FBEFEC; border-color: var(--line-2); }
  .list-btn.danger:not(:disabled):hover { color: #7E1830; }
  .chip:not(:disabled):not([aria-pressed="true"]):hover { background: var(--line); border-color: var(--muted-2); }
  .opt-card:not(.on):not(.req) .chip:not(:disabled):not([aria-pressed="true"]):hover { background: var(--line-2); }
  .chip[aria-pressed="true"]:not(:disabled):hover { background: #120810; border-color: #120810; }
  .btn-link:not(:disabled):hover { color: var(--ink); }
  .btn-link.strong:not(:disabled):hover { color: #7A0F3B; }
  .tabbar button:hover { color: var(--ink); }
  .tabbar button[aria-current="true"]:hover { color: #7A0F3B; }
  .photo-slot:not(.filled):hover { background: var(--line); border-color: var(--muted-2); }
  .photo-slot .remove:hover { background: rgba(42,20,32,.95); }
}

/* Konto löschen als Warnung: beim Darüberfahren/Antippen rot mit heller Schrift */
.list-btn.danger:not(:disabled):active { background: var(--danger); border-color: var(--danger); color: #fff; }
@media (hover: hover) { .list-btn.danger:not(:disabled):hover { background: var(--danger); border-color: var(--danger); color: #fff; } }
/* Endgültig löschen im Bestätigungsfenster: von Anfang an rot */
.btn-delete { background: var(--danger); color: #fff; }
.btn-delete:not(:disabled):active { background: #7E1830; }
@media (hover: hover) { .btn-delete:not(:disabled):hover { background: #7E1830; } }

/* Abmelden: beim Darüberfahren/Antippen dunkel mit heller Schrift */
.list-btn.logout:not(:disabled):active { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (hover: hover) { .list-btn.logout:not(:disabled):hover { background: var(--ink); border-color: var(--ink); color: #fff; } }

/* Verwerfen (Speichern-Abfrage): beim Darüberfahren/Antippen dunkel mit heller Schrift, wie Abmelden */
.btn-discard:not(:disabled):active { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (hover: hover) { .btn-discard:not(:disabled):hover { background: var(--ink); border-color: var(--ink); color: #fff; } }

/* Konto-Seite: gesperrte Knöpfe (laufendes Match) grau, ohne Farbwechsel; Tippen zeigt einen Hinweis */
.list-btn.locked, .list-btn.locked:active { background: var(--line); border-color: var(--line); color: var(--muted-2); cursor: default; }
@media (hover: hover) { .list-btn.locked:hover { background: var(--line); border-color: var(--line); color: var(--muted-2); } }
.list-btn.resume { background: var(--accent); border-color: var(--accent); color: #fff; }
.list-btn.resume:active { background: #8E1E4A; border-color: #8E1E4A; }
@media (hover: hover) { .list-btn.resume:hover { background: #8E1E4A; border-color: #8E1E4A; } }
.konto .account-actions { margin-top: 0; padding-top: 4px; }
/* Hinweis unten mit Knopf (z. B. „Zum Match“) */
#toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 14px; width: max-content; max-width: min(90vw, 440px); }
.toast-action { background: none; border: 0; color: #FFC2D6; font-weight: 700; padding: 4px 0; text-decoration: underline; white-space: nowrap; }

/* Match-Tab ohne Match: Text mittig, darunter beendete Matches */
.no-match { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0 8px; }
.ended-item span { display: flex; flex-direction: column; gap: 2px; }
.ended-item .small { font-weight: 500; }
.ended-note { align-self: center; text-align: center; font-size: 13px; color: var(--muted); background: var(--line); border-radius: 16px; padding: 10px 14px; margin-top: 10px; max-width: 90%; }

/* Moderation: gesperrte Konten */
.banned-row { display: flex; align-items: center; gap: 12px; }
.banned-row img { width: 48px; height: 60px; object-fit: cover; border-radius: 12px; flex: none; }
.banned-row > div { flex: 1; }
.banned-row .btn { min-height: 44px; padding: 0 16px; }

/* Fragen im Match: ruhige Karte über dem Chat */
.prompt-card { background: var(--card); border: 1px solid var(--line-2); border-radius: 20px; padding: 14px 16px; margin: 8px 0 4px; display: flex; flex-direction: column; gap: 10px; }
.prompt-card strong { font-size: 15px; }
.prompt-card .chips { gap: 8px; }

/* Das habt ihr gemeinsam (aus den Alltagsfragen) */
.common-card { background: #FBEAF0; color: #5C1A33; border-radius: 24px; padding: 16px 18px; }
.common-card h3 { margin: 0 0 6px; font-size: 15px; }
.common-card p { margin: 4px 0 0; }
/* Alltagsfragen: Schieberegler mit zwei Enden */
.alltag-q { display: flex; flex-direction: column; gap: 10px; }
.alltag-q .ends { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; }
.alltag-q .ends span:last-child { text-align: right; }
.alltag-q input[type=range] { width: 100%; accent-color: var(--accent); }
.alltag-q.untouched input[type=range] { accent-color: var(--muted-2); opacity: .55; }
.alltag-q .state { font-size: 13px; color: var(--muted); }
.lock-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.lock-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Flüssiges Glas in der Leiste: eine helle, leicht spiegelnde Pille gleitet zum aktiven Tab */
.tabbar { overflow: hidden; }
.tabbar button { z-index: 1; transition: color .3s; }
.tab-glass { position: absolute; top: 5px; left: 0; height: calc(100% - 10px); border-radius: 999px; z-index: 0; pointer-events: none;
  transform-origin: center; will-change: transform;
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(246, 203, 216, .55));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 2px rgba(176, 39, 92, .12), 0 2px 8px rgba(176, 39, 92, .16);
  border: 1px solid rgba(255, 255, 255, .7); }
.tabbar button:active svg { transform: scale(.9); transition: transform .15s; }
.code-input { font-size: 24px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.code-input::placeholder { letter-spacing: .3em; }
.row-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 0; }
.row-label small { font-weight: 500; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-done { color: var(--muted-2); }
.code-done .input { background: var(--line); border-color: var(--line); }
.code-done::after { content: '✓ bestätigt'; font-size: 13px; color: var(--accent); font-weight: 700; }
