/* =========================================================
   PfotenTreff – Apple-inspired Mobile UI
   Clean · Minimal · Native feel
   ========================================================= */

:root {
  --color-dark: #1c1c1e;
  --color-label: #1c1c1e;
  --color-secondary: #8e8e93;
  --color-accent: #34c759;
  --color-accent-dark: #248a3d;
  --color-bg: #f2f2f7;
  --color-surface: #ffffff;
  --color-fill: #e5e5ea;
  --color-border: rgba(60, 60, 67, 0.12);
  --color-separator: rgba(60, 60, 67, 0.18);
  --color-pass: #ff3b30;
  --color-pass-soft: #ffe5e3;
  --color-match-soft: #e8f8ee;
  --color-blue: #007aff;

  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.08);

  --header-h: 72px;
  --tab-h: 52px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration: 260ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.35;
  color: var(--color-label);
  background: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

ul {
  list-style: none;
}

a {
  color: inherit;
}

/* ----- App Shell ----- */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 430px;
  height: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--color-bg);
  overflow: hidden;
}

@media (min-width: 480px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #1c1c1e;
  }

  .app {
    height: min(860px, 100dvh - 48px);
    min-height: 0;
    border-radius: 40px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 28px 80px rgba(0, 0, 0, 0.55);
    overflow: hidden;
  }
}

/* ----- Header (iOS large title style) ----- */
.app-header {
  flex-shrink: 0;
  padding: calc(var(--safe-top) + 8px) 20px 10px;
  background: rgba(242, 242, 247, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--color-separator);
  z-index: 10;
}

.app-header__inner {
  min-height: 52px;
}

.header-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-secondary);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.brand {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-dark);
}

/* ----- Views ----- */
.app-main {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px 20px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
  -webkit-overflow-scrolling: touch;
}

.view--active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.view[hidden] {
  display: block !important;
  visibility: hidden;
}

.view.view--active[hidden] {
  visibility: visible;
}

/* =========================================================
   Radar
   ========================================================= */
.radar {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 14px;
}

.card-stack {
  position: relative;
  flex: 1;
  min-height: 0;
}

.dog-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  will-change: transform, opacity;
}

.dog-card--behind {
  transform: scale(0.97) translateY(10px);
  opacity: 0.7;
  z-index: 0;
}

.dog-card--front {
  z-index: 2;
}

.dog-card.is-leaving-left {
  animation: swipeOutLeft 0.4s var(--ease) forwards;
}

.dog-card.is-leaving-right {
  animation: swipeOutRight 0.4s var(--ease) forwards;
}

.dog-card.is-entering {
  animation: cardEnter 0.36s var(--ease) both;
}

@keyframes swipeOutLeft {
  to {
    transform: translateX(-120%) rotate(-12deg);
    opacity: 0;
  }
}

@keyframes swipeOutRight {
  to {
    transform: translateX(120%) rotate(12deg);
    opacity: 0;
  }
}

@keyframes cardEnter {
  from {
    transform: scale(0.96) translateY(10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.dog-card__image-wrap {
  position: relative;
  flex: 1;
  min-height: 200px;
  background: var(--color-fill);
}

.dog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dog-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 11px;
  border-radius: var(--radius-full);
  background: rgba(28, 28, 30, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dog-card__badge--secondary {
  left: auto;
  right: 14px;
  background: rgba(52, 199, 89, 0.92);
}

.dog-card__body {
  padding: 16px 18px 18px;
}

.dog-card__title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.dog-card__name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.dog-card__age {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-secondary);
  letter-spacing: -0.02em;
}

.dog-card__breed {
  margin-top: 4px;
  color: var(--color-secondary);
  font-size: 15px;
  font-weight: 500;
}

.dog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-label);
}

.dog-card__about {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dog-card__energy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.energy-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
}

.energy-dots {
  display: flex;
  gap: 5px;
}

.energy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-fill);
}

.energy-dot.is-on {
  background: var(--color-accent);
}

.swipe-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 2px 0 6px;
  flex-shrink: 0;
}

.action-btn {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  transition: transform 140ms var(--ease);
}

.action-btn:active {
  transform: scale(0.92);
}

.action-btn--pass {
  color: var(--color-pass);
  border: 1px solid rgba(255, 59, 48, 0.18);
}

.action-btn--match {
  width: 72px;
  height: 72px;
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(52, 199, 89, 0.28);
}

.action-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.radar-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 32px 24px;
  gap: 8px;
}

.radar-empty[hidden] {
  display: none;
}

.radar-empty__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.radar-empty__text {
  color: var(--color-secondary);
  max-width: 260px;
  font-size: 15px;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* =========================================================
   Matches
   ========================================================= */
.matches {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 8px;
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-secondary);
  padding-left: 4px;
}

.new-matches {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.new-matches::-webkit-scrollbar {
  display: none;
}

.new-match {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 76px;
  scroll-snap-align: start;
}

.new-match:active {
  opacity: 0.7;
}

.new-match__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--color-accent);
}

.new-match__name {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  letter-spacing: -0.01em;
}

.new-match__meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-secondary);
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 0.5px solid var(--color-separator);
  transition: background 120ms ease;
}

.chat-item:last-child {
  border-bottom: none;
}

.chat-item:active {
  background: var(--color-bg);
}

.chat-item__avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-item__content {
  flex: 1;
  min-width: 0;
}

.chat-item__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.chat-item__name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.chat-item__time {
  font-size: 13px;
  color: var(--color-secondary);
  flex-shrink: 0;
}

.chat-item__meta {
  font-size: 13px;
  color: var(--color-secondary);
  margin-bottom: 1px;
}

.chat-item__preview {
  font-size: 14px;
  color: var(--color-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item--unread .chat-item__preview {
  color: var(--color-label);
  font-weight: 500;
}

.chat-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.chat-item--closed .chat-item__name::after {
  content: " · kein Interesse";
  font-weight: 400;
  color: var(--color-secondary);
  font-size: 12px;
}

/* =========================================================
   Shop
   ========================================================= */
.shop {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}

.shop-intro {
  font-size: 14px;
  color: var(--color-secondary);
  line-height: 1.45;
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: #fff4e0;
  color: #9a6700;
  font-size: 11px;
  font-weight: 700;
}

.shop-disclaimer {
  font-size: 14px;
  color: var(--color-secondary);
  text-align: center;
  padding: 28px 12px;
  line-height: 1.45;
}

.shop-disclaimer[hidden] {
  display: none;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.product__image {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  background: var(--color-fill);
}

.product__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  flex: 1;
}

.product__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.product__price {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-secondary);
}

.product__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.product__shop-btn {
  padding: 6px 11px;
  border-radius: var(--radius-full);
  background: var(--color-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.product__edit-btn {
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: var(--color-bg);
  color: var(--color-secondary);
  font-size: 12px;
  font-weight: 600;
}

/* =========================================================
   Profil / Mein Hund / Premium
   ========================================================= */
.premium {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 12px;
}

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 8px 4px;
}

.profile-hero__photos {
  position: relative;
  margin-bottom: 14px;
}

.profile-hero__dog {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}

.profile-hero__owner {
  position: absolute;
  right: -2px;
  bottom: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-bg);
}

.profile-hero__name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.profile-hero__meta {
  margin-top: 4px;
  font-size: 15px;
  color: var(--color-secondary);
  font-weight: 500;
}

.profile-hero__bio {
  margin-top: 10px;
  max-width: 320px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--color-label);
}

.settings-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px;
}

.settings-block__title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-secondary);
  padding: 0 4px;
}

.btn-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-blue);
  padding: 0 4px;
}

.btn-link:active {
  opacity: 0.55;
}

/* iOS Settings Group */
.ios-group {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ios-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  text-align: left;
  border-bottom: 0.5px solid var(--color-separator);
  transition: background 120ms ease;
}

.ios-row:last-child {
  border-bottom: none;
}

.ios-row:active {
  background: var(--color-bg);
}

.ios-row__label {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-label);
}

.ios-row__value {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-size: 16px;
  color: var(--color-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ios-row__chevron {
  flex-shrink: 0;
  color: #c7c7cc;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.donate-banner {
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.donate-banner[hidden] {
  display: none;
}

.donate-banner__text {
  font-size: 15px;
  line-height: 1.45;
  color: var(--color-secondary);
  margin-bottom: 14px;
}

.donate-banner__perks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.donate-banner__perks li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--color-label);
}

.donate-banner__perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
}

.premium-active {
  padding: 20px 18px;
  border-radius: var(--radius-lg);
  background: var(--color-match-soft);
}

.premium-active[hidden] {
  display: none;
}

.premium-active__badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.premium-active__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.premium-active__text {
  color: var(--color-secondary);
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.premium-active__method {
  font-size: 14px;
  font-weight: 600;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  transition: opacity 140ms ease, transform 140ms var(--ease);
}

.btn-primary:active {
  opacity: 0.85;
  transform: scale(0.985);
}

.btn-primary--full {
  width: 100%;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: var(--color-fill);
  color: var(--color-label);
  font-weight: 600;
  font-size: 15px;
}

.btn-secondary:active {
  opacity: 0.75;
}

.btn-secondary--sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: var(--radius-full);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-pass);
  font-size: 16px;
  font-weight: 600;
}

.btn-danger[hidden] {
  display: none;
}

.btn-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-blue);
}

/* =========================================================
   Tab Bar
   ========================================================= */
.tab-bar {
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(249, 249, 249, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--color-separator);
  z-index: 20;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--color-secondary);
  transition: color 160ms ease;
}

.tab:active {
  opacity: 0.65;
}

.tab--active {
  color: var(--color-accent);
}

.tab__icon {
  display: block;
  width: 24px;
  height: 24px;
}

.tab__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* =========================================================
   Toast
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 18px);
  transform: translateX(-50%) translateY(10px);
  max-width: min(340px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: var(--radius-full);
  background: rgba(28, 28, 30, 0.92);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast[hidden] {
  display: block !important;
  visibility: hidden;
}

.toast.is-visible[hidden] {
  visibility: visible;
}

@media (min-width: 480px) {
  .toast {
    bottom: max(24px, calc((100dvh - min(860px, 100dvh - 48px)) / 2 + var(--tab-h) + 12px));
  }
}

/* =========================================================
   Overlays
   ========================================================= */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease);
}

.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.overlay[hidden] {
  display: flex !important;
  visibility: hidden;
}

.overlay.is-open[hidden] {
  visibility: visible;
}

.overlay__panel {
  width: 100%;
  max-height: 94%;
  background: var(--color-bg);
  border-radius: 14px 14px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(28px);
  transition: transform var(--duration) var(--ease);
  overflow: hidden;
}

.overlay.is-open .overlay__panel {
  transform: translateY(0);
}

.overlay__panel--full {
  height: 100%;
  max-height: 100%;
  border-radius: 0;
}

.overlay__panel--sheet {
  padding-bottom: calc(14px + var(--safe-bottom));
}

.overlay__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 6px 10px;
  background: rgba(242, 242, 247, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 0.5px solid var(--color-separator);
}

.overlay__title {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.02em;
}

.overlay__spacer {
  width: 40px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--color-blue);
}

.icon-btn:active {
  opacity: 0.5;
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.form-section-label {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-secondary);
}

.form-section-label:first-child {
  margin-top: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.field__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-secondary);
}

.field__input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-label);
  outline: none;
  box-shadow: inset 0 0 0 0.5px var(--color-border);
}

.field__input:focus {
  box-shadow: inset 0 0 0 1.5px var(--color-accent);
}

.field__input--area {
  resize: vertical;
  min-height: 84px;
  line-height: 1.4;
}

.field-row {
  display: flex;
  gap: 10px;
}

.form-hint {
  font-size: 13px;
  color: var(--color-secondary);
  line-height: 1.4;
}

/* Foto aus Galerie */
.photo-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.photo-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 0.5px var(--color-border);
}

.photo-picker__preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-fill);
  flex-shrink: 0;
}

.photo-picker__actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.photo-picker__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  background: var(--color-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 160ms ease, transform 140ms var(--ease);
}

.photo-picker__btn:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.photo-picker__hint {
  font-size: 12px;
  color: var(--color-secondary);
  line-height: 1.3;
}

/* Chat */
.chat-panel {
  background: var(--color-bg);
}

.chat-panel__peer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.chat-panel__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-panel__name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.chat-panel__meta {
  font-size: 12px;
  color: var(--color-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}

.chat-profile-card {
  align-self: stretch;
  padding: 12px 14px;
  margin-bottom: 6px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.chat-profile-card__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-secondary);
  margin-bottom: 5px;
}

.chat-profile-card__text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-label);
}

.chat-profile-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.bubble {
  max-width: 78%;
  padding: 10px 13px;
  border-radius: 18px;
  font-size: 16px;
  line-height: 1.35;
  word-wrap: break-word;
}

.bubble--them {
  align-self: flex-start;
  background: var(--color-fill);
  color: var(--color-label);
  border-bottom-left-radius: 5px;
}

.bubble--me {
  align-self: flex-end;
  background: var(--color-accent);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.bubble__time {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  opacity: 0.65;
}

.quick-replies {
  flex-shrink: 0;
  padding: 8px 12px 0;
  background: var(--color-surface);
  border-top: 0.5px solid var(--color-separator);
}

.quick-replies[hidden] {
  display: none;
}

.quick-replies__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.quick-replies__row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.quick-replies__row::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--color-bg);
  color: var(--color-label);
}

.quick-chip--yes {
  background: var(--color-match-soft);
  color: var(--color-accent-dark);
}

.quick-chip--no {
  background: var(--color-pass-soft);
  color: #c0392b;
}

.chat-composer {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px calc(10px + var(--safe-bottom));
  background: var(--color-surface);
  border-top: 0.5px solid var(--color-separator);
}

.chat-composer__input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 20px;
  background: var(--color-bg);
  outline: none;
}

.chat-composer__send {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  flex-shrink: 0;
}

.chat-composer__send:active {
  opacity: 0.8;
}

/* Payment */
.payment {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
}

.payment__summary {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.payment__price {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.payment__price span {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-secondary);
}

.payment__note {
  margin-top: 4px;
  font-size: 14px;
  color: var(--color-secondary);
  line-height: 1.4;
}

.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pay-method {
  cursor: pointer;
}

.pay-method input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-method__box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 0.5px var(--color-border);
}

.pay-method input:checked + .pay-method__box {
  box-shadow: inset 0 0 0 1.5px var(--color-accent);
}

.pay-method__brand {
  font-weight: 600;
  font-size: 16px;
}

.pay-method__brand--paypal {
  color: #003087;
}

.pay-method__brand--apple {
  color: #111;
}

.pay-method__brand--google {
  color: #1a73e8;
}

.pay-method__desc {
  font-size: 13px;
  color: var(--color-secondary);
}

.card-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-fields[hidden] {
  display: none;
}

.payment__legal {
  font-size: 12px;
  color: var(--color-secondary);
  line-height: 1.4;
  text-align: center;
}
