:root {
  color-scheme: light;
  --bg: #eef7f4;
  --surface: #ffffff;
  --surface-soft: #f5faf8;
  --ink: #163330;
  --muted: #60736f;
  --brand: #0e6b5f;
  --brand-strong: #084d45;
  --accent: #f6c35b;
  --danger: #b4472d;
  --line: #dce9e5;
  --shadow: 0 18px 45px rgba(11, 61, 54, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, #dff1eb 0%, #f7fbf9 55%, #eef7f4 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.legal-page {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.legal-page h1 {
  margin-bottom: 12px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.phone-frame {
  position: relative;
  width: min(430px, 100%);
  height: min(900px, calc(100vh - 40px));
  min-height: 720px;
  overflow: auto;
  border: 1px solid rgba(14, 107, 95, 0.18);
  border-radius: 28px;
  background: var(--bg);
  box-shadow: var(--shadow);
  padding: 20px 18px 96px;
  scrollbar-width: none;
}

.phone-frame::-webkit-scrollbar,
.chips::-webkit-scrollbar {
  display: none;
}

.topbar,
.section-heading,
.search-row,
.dialog-head,
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar {
  margin-bottom: 16px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.7rem;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  line-height: 1.16;
}

h3 {
  margin-bottom: 5px;
  font-size: 0.98rem;
}

p {
  color: var(--muted);
  line-height: 1.45;
}

.avatar-button,
.icon-button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
}

.avatar-button {
  width: 46px;
  height: 46px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.language-toggle {
  min-width: 44px;
  height: 40px;
  border: 1px solid rgba(14, 107, 95, 0.22);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand);
  font-weight: 900;
}

.avatar-button.large {
  width: 64px;
  height: 64px;
  font-size: 1.1rem;
}

.hero-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(14, 107, 95, 0.96), rgba(14, 107, 95, 0.78)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='260' viewBox='0 0 420 260'%3E%3Ccircle cx='338' cy='54' r='88' fill='%23f6c35b' fill-opacity='.55'/%3E%3Ccircle cx='64' cy='230' r='108' fill='%23ffffff' fill-opacity='.14'/%3E%3Cpath d='M258 202c23-9 38-28 38-51 0-32-28-58-63-58s-63 26-63 58c0 23 15 42 38 51l-9 30h68l-9-30Z' fill='%23ffffff' fill-opacity='.17'/%3E%3C/svg%3E");
  background-size: cover;
  color: #fff;
}

.hero-panel p,
.hero-panel h2 {
  color: #fff;
}

.status-pill {
  display: inline-flex;
  width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 750;
}

.primary-button,
.primary-mini,
.ghost-button,
.role-toggle button,
.chips button {
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  min-height: 48px;
  background: var(--accent);
  color: #352300;
}

.primary-mini {
  padding: 10px 14px;
  background: var(--brand);
  color: #fff;
}

.ghost-button {
  background: transparent;
  color: var(--brand);
}

.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px;
  border-radius: 999px;
  background: #dcebe7;
}

.role-toggle button {
  padding: 11px 10px;
  background: transparent;
  color: var(--muted);
}

.role-toggle button.active {
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 8px 18px rgba(14, 107, 95, 0.12);
}

.search-card,
.service-card,
.provider-card,
.provider-panel,
.request-card,
.message-card,
.match-card,
.plan-card,
.settings-list button,
.trust-strip {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.search-card {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
}

.search-card label {
  font-weight: 800;
}

.search-row {
  justify-content: flex-start;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.search-row input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chips button {
  flex: 0 0 auto;
  padding: 8px 11px;
  background: #e8f3ef;
  color: var(--brand-strong);
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
}

.beta-banner {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #ecd28d;
  border-radius: 16px;
  background: #fff8e7;
}

.beta-banner strong {
  color: #60440d;
  font-size: 0.88rem;
}

.beta-banner span,
.de-copy {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.de-copy {
  display: none;
  margin-top: -4px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
}

.show-german .de-copy {
  display: block;
}

.trust-strip div {
  min-width: 0;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  font-size: 0.8rem;
}

.trust-strip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.25;
}

.section-block,
.page-heading {
  margin-top: 20px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-card {
  min-height: 136px;
  padding: 14px;
  text-align: left;
}

.service-card .icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #eaf5f1;
  color: var(--brand);
  font-size: 1.25rem;
}

.service-card p,
.provider-card p,
.request-card p,
.message-card p {
  margin-bottom: 0;
  font-size: 0.82rem;
}

.provider-list,
.request-stack,
.match-list,
.settings-list {
  display: grid;
  gap: 10px;
}

.provider-card,
.message-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.provider-photo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0e6b5f, #44a38f);
  color: #fff;
  font-weight: 900;
}

.provider-meta,
.request-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.provider-meta span,
.request-meta span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef7f4;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.book-button {
  border: 0;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 850;
  padding: 10px 12px;
}

.provider-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.request-card {
  padding: 14px;
}

.match-card {
  padding: 14px;
}

.match-card strong {
  display: block;
  margin-bottom: 4px;
}

.match-card span {
  display: inline-flex;
  margin-top: 8px;
  border-radius: 999px;
  padding: 5px 8px;
  background: #e8f3ef;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 850;
}

.request-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.status-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff4d7;
  color: #72500a;
  font-size: 0.72rem;
  font-weight: 850;
}

.message-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}

.profile-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.profile-category-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 9px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.receiver-card {
  background: #f3faf7;
  border-color: #cfeee2;
}

.helper-card {
  background: #fff8e7;
  border-color: #ecd28d;
}

.profile-category-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 950;
  box-shadow: var(--shadow-soft);
}

.profile-category-card h3 {
  margin: 0;
  font-size: 1rem;
}

.profile-category-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.profile-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-card-meta span {
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 850;
}

.settings-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px;
  color: var(--ink);
  text-align: left;
}

.settings-list span {
  color: var(--muted);
  font-size: 0.84rem;
}

.legal-warning {
  border-color: #ecd28d;
  background: #fff8e7;
}

.legal-warning h2 {
  color: #60440d;
}

.bottom-nav {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 22px -6px -78px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 10px 4px;
}

.bottom-nav button.active {
  background: #e8f3ef;
  color: var(--brand);
}

.app-dialog {
  width: min(400px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  overflow: auto;
  border: 0;
  border-radius: 22px;
  padding: 0;
  box-shadow: var(--shadow);
}

.app-dialog::backdrop {
  background: rgba(12, 37, 34, 0.44);
}

.app-dialog form {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.app-dialog label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.app-dialog input,
.app-dialog select,
.app-dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 12px;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: start;
  font-weight: 700;
}

.checkbox-row input {
  width: auto;
  margin-top: 4px;
}

.checkbox-row span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.dialog-copy {
  margin-bottom: 0;
  font-size: 0.86rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.plan-card {
  align-content: start;
  min-height: 112px;
  padding: 13px;
}

.plan-card input {
  width: auto;
}

.plan-card strong,
.plan-card span {
  display: block;
}

.plan-card span {
  color: var(--brand);
  font-weight: 900;
}

.icon-button {
  width: 38px;
  height: 38px;
  background: #edf5f2;
  color: var(--ink);
  font-size: 1.4rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(24px);
  width: min(390px, calc(100vw - 28px));
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 4;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 520px) {
  .app-shell {
    padding: 0;
  }

  .profile-category-grid {
    grid-template-columns: 1fr;
  }

  .phone-frame {
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 360px) {
  .trust-strip,
  .two-column {
    grid-template-columns: 1fr;
  }

  .provider-card,
  .message-card {
    grid-template-columns: 44px 1fr;
  }

  .provider-card .book-button,
  .message-card > span {
    grid-column: 2;
    width: max-content;
  }
}
