/* Mieterservice – 1:1 nach dem bestehenden Envopark-Mieterservice (Lovable-Prototyp) */
:root {
  --radius: .875rem;
  --background: oklch(97.2% .004 120);
  --foreground: oklch(22% .012 150);
  --card: oklch(100% 0 0);
  --primary: oklch(42% .085 150);
  --primary-foreground: oklch(99% 0 0);
  --secondary: oklch(95.5% .006 120);
  --muted: oklch(95.5% .006 120);
  --muted-foreground: oklch(50% .012 150);
  --accent: oklch(94% .04 118);
  --accent-foreground: oklch(36% .08 130);
  --brand-olive: oklch(66% .14 115);
  --destructive: oklch(56% .2 27);
  --border: oklch(91% .006 120);
  --input: oklch(88% .008 120);
  --ring: oklch(42% .085 150);
  --shadow-card: 0 1px 2px oklch(20% .02 150 / .04), 0 8px 24px -12px oklch(20% .02 150 / .12);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; border: 0 solid var(--border); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--background); color: var(--foreground); line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { cursor: pointer; background: none; }
img, svg { display: block; }
a { color: inherit; text-decoration: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

.wrap-page { min-height: 100dvh; padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
.ts-header { margin: 0 auto; display: flex; max-width: 42rem; align-items: center; justify-content: space-between; gap: 1rem; padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem 0; }
.ts-header img { height: 2.4rem; width: auto; margin: .1875rem 0 .1875rem .375rem; } /* entspricht h-11 des Original-Logos inkl. Rand */
.ts-header span { flex-shrink: 0; text-align: right; font-size: .75rem; line-height: 1.25; color: var(--muted-foreground); }
.ts-main { margin: 0 auto; max-width: 42rem; padding: 2rem 1rem 0; }
.ts-intro { margin-bottom: 1.75rem; padding: 0 .25rem; }
.ts-intro h1 { font-size: 1.9rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.025em; }
.ts-intro p { margin-top: .5rem; font-size: 15px; line-height: 1.625; color: var(--muted-foreground); }
.ts-notice { margin-top: .875rem; display: flex; gap: .625rem; align-items: flex-start; font-size: .8125rem; line-height: 1.5; color: var(--muted-foreground); }
.ts-notice svg { width: 1rem; height: 1rem; flex-shrink: 0; margin-top: .125rem; color: var(--brand-olive); }
.ts-notice a { font-weight: 500; color: var(--primary); }
.space-y-4 > * + * { margin-top: 1rem; }
.ts-meta { display: flex; align-items: center; justify-content: space-between; padding: 0 .25rem; font-size: .75rem; line-height: 1rem; color: var(--muted-foreground); }
.text-destructive { color: var(--destructive); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset[disabled] { opacity: 1; }
.ts-card { border-radius: 1rem; background: var(--card); padding: 1.25rem; box-shadow: var(--shadow-card); }
.ts-card-head { margin-bottom: 1.25rem; display: flex; align-items: flex-start; gap: 1rem; }
.ts-num { margin-top: .125rem; flex-shrink: 0; font-size: .75rem; line-height: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .05em; color: var(--brand-olive); }
.ts-card-head > div { min-width: 0; }
.ts-card h2 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; letter-spacing: -0.025em; color: var(--foreground); }
.ts-card-head p { margin-top: .125rem; font-size: .875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.ts-label { margin-bottom: .375rem; display: block; font-size: .875rem; line-height: 1.25rem; font-weight: 500; color: var(--foreground); }
.ts-label .opt { margin-left: .375rem; font-weight: 400; color: var(--muted-foreground); }
.ts-input {
  display: block; min-height: 3rem; width: 100%; border-radius: .75rem; border: 1px solid var(--input); background: var(--card);
  padding: 0 1rem; font-size: 1rem; line-height: 1.5rem; color: var(--foreground); outline: none;
  transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s;
}
.ts-input::placeholder { color: oklch(50% .012 150 / .7); }
.ts-input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px oklch(42% .085 150 / .15); }
.ts-input:disabled { cursor: not-allowed; background: var(--muted); color: var(--muted-foreground); }
.ts-input:disabled { -webkit-text-fill-color: var(--muted-foreground); opacity: 1; }
.ts-recipient { display: grid; gap: .375rem; margin-bottom: 1.25rem; text-align: left; }
.ts-recipient-note { margin: 0; font-size: .8125rem; line-height: 1.45; color: var(--muted-foreground); }
.ts-input[aria-invalid="true"] { border-color: var(--destructive); }
.ts-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px oklch(56% .2 27 / .15); }
.ts-select-wrap { position: relative; }
select.ts-input { appearance: none; -webkit-appearance: none; padding-right: 2.75rem; }
.ts-select-wrap svg { pointer-events: none; position: absolute; right: 1rem; top: 50%; width: 1rem; height: 1rem; transform: translateY(-50%); color: var(--muted-foreground); }
textarea.ts-input { min-height: 9rem; resize: vertical; padding-top: .75rem; padding-bottom: .75rem; line-height: 1.625; }
.ts-counter { margin-top: .375rem; display: flex; justify-content: space-between; gap: .75rem; font-size: .75rem; line-height: 1rem; color: var(--muted-foreground); }
.ts-counter .n { font-variant-numeric: tabular-nums; }
.ts-err { margin-top: .375rem; font-size: .875rem; line-height: 1.25rem; color: var(--destructive); }
.ts-help { margin-top: .375rem; font-size: .875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.ts-photos { border-radius: .75rem; background: var(--secondary); padding: 1rem; }
.ts-photos-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .75rem; }
.ts-photos-head h3 { font-size: 15px; font-weight: 600; }
.ts-photos-head p { font-size: .875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.ts-photos-head .count { flex-shrink: 0; font-size: .875rem; font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
.ts-thumbs { margin-top: 1rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.ts-thumbs li { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: .5rem; background: var(--muted); }
.ts-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.ts-thumbs button { position: absolute; right: .25rem; top: .25rem; display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: 9999px; background: oklch(22% .012 150 / .7); color: var(--background); backdrop-filter: blur(4px); }
.ts-thumbs button svg { width: 1rem; height: 1rem; }
.ts-photo-btns { margin-top: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.ts-btn-outline { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; gap: .5rem; border-radius: .75rem; border: 1px solid var(--input); background: var(--card); padding: 0 .75rem; font-size: 15px; font-weight: 500; transition: background-color .15s; }
.ts-btn-outline:hover { background: var(--muted); }
.ts-btn-outline:disabled { opacity: .5; cursor: default; }
.ts-btn-outline svg, .ts-btn-primary svg, .ts-btn-round svg { width: 1rem; height: 1rem; }
.ts-note { margin-top: .75rem; font-size: .75rem; line-height: 1rem; color: var(--muted-foreground); }
.ts-hp { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }
.ts-alert { border-radius: .75rem; border: 1px solid oklch(56% .2 27 / .3); background: oklch(56% .2 27 / .05); padding: .75rem 1rem; font-size: .875rem; line-height: 1.25rem; color: var(--destructive); }
.ts-submit-text { margin-bottom: 1rem; font-size: .875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.ts-submit-text a { color: var(--primary); font-weight: 500; text-underline-offset: 4px; }
.ts-submit-text a:hover { text-decoration: underline; }
.ts-btn-primary { display: inline-flex; min-height: 3.25rem; width: 100%; align-items: center; justify-content: center; gap: .5rem; border-radius: 9999px; background: var(--primary); padding: 0 1.5rem; font-size: 1rem; line-height: 1.5rem; font-weight: 500; color: var(--primary-foreground); transition: background-color .15s; }
.ts-btn-primary:hover { background: oklch(42% .085 150 / .9); }
.ts-btn-primary:disabled { opacity: .6; }
.ts-review-dl { border-radius: .75rem; background: var(--secondary); padding: 0 1rem; font-size: .875rem; line-height: 1.25rem; }
.ts-review-dl > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .75rem; padding: .625rem 0; }
.ts-review-dl > div + div { border-top: 1px solid var(--border); }
.ts-review-dl > div.desc { display: block; }
.ts-review-dl dt { color: var(--muted-foreground); }
.ts-review-dl dd { overflow-wrap: break-word; font-weight: 500; }
.ts-review-dl .desc dd { margin-top: .25rem; white-space: pre-wrap; font-weight: 400; }
.ts-review-btns { margin-top: 1.25rem; display: grid; gap: .5rem; }
.ts-btn-round { display: inline-flex; min-height: 3.25rem; align-items: center; justify-content: center; gap: .5rem; border-radius: 9999px; border: 1px solid var(--input); padding: 0 1.5rem; font-size: 15px; font-weight: 500; transition: background-color .15s; }
.ts-btn-round:hover { background: var(--muted); }
.ts-review-btns .ts-btn-primary { width: auto; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ts-done { border-radius: 1rem; background: var(--card); padding: 1.75rem; text-align: center; box-shadow: var(--shadow-card); }
.ts-done-icon { margin: 0 auto 1.25rem; display: grid; width: 3.5rem; height: 3.5rem; place-items: center; border-radius: 9999px; background: var(--accent); color: var(--accent-foreground); }
.ts-done-icon svg { width: 1.75rem; height: 1.75rem; }
.ts-done .thanks { font-size: .875rem; line-height: 1.25rem; font-weight: 500; color: var(--brand-olive); }
.ts-done h1 { margin-top: .25rem; font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.025em; }
.ts-done .text { margin: .75rem auto 0; max-width: 28rem; font-size: 15px; line-height: 1.625; color: var(--muted-foreground); }
.ts-ref { margin: 1.5rem auto 0; max-width: 20rem; border-radius: .75rem; background: var(--secondary); padding: 1rem 1.25rem; }
.ts-ref .l { font-size: .75rem; line-height: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-foreground); }
.ts-ref .v { margin-top: .25rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; letter-spacing: .025em; color: var(--foreground); }
.ts-again { margin-top: 1.75rem; display: inline-flex; min-height: 3rem; align-items: center; gap: .5rem; border-radius: 9999px; background: var(--primary); padding: 0 1.5rem; font-size: 15px; font-weight: 500; color: var(--primary-foreground); transition: background-color .15s; }
.ts-again:hover { background: oklch(42% .085 150 / .9); }
.ts-again svg { width: 1rem; height: 1rem; }
.ts-foot { margin-top: 2rem; text-align: center; font-size: .875rem; line-height: 1.25rem; color: var(--muted-foreground); }
.ts-foot a { font-weight: 500; color: var(--primary); text-underline-offset: 4px; }
.ts-foot a:hover { text-decoration: underline; }
.ts-legal { margin-top: .75rem; text-align: center; font-size: .75rem; color: var(--muted-foreground); }
.ts-legal a:hover { text-decoration: underline; }
.ts-legal span { margin: 0 .375rem; }
.ts-prose h2 { font-size: 1.125rem; font-weight: 600; margin: 1.5rem 0 .5rem; letter-spacing: -0.015em; }
.ts-prose p, .ts-prose li { font-size: .9375rem; line-height: 1.65; color: var(--foreground); }
.ts-prose ul { list-style: disc; padding-left: 1.25rem; margin: .5rem 0; }
.ts-prose a { color: var(--primary); font-weight: 500; }
@media (min-width: 640px) {
  .ts-header { padding-top: 2rem; }
  .ts-header img { height: 2.625rem; margin-left: .425rem; }
  .ts-main { padding: 3rem 1.25rem 0; }
  .ts-intro h1 { font-size: 2.25rem; }
  .ts-card { padding: 1.75rem; }
  .ts-thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ts-review-btns { grid-template-columns: auto minmax(0, 1fr); }
  .ts-done { padding: 2.5rem; }
}
