@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("fonts/literata.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/source-sans-3.woff2") format("woff2");
}
:root {
  --bg: #e7e9f4;
  --surface: #ffffff;
  --ink: #1c2340;
  --muted: #5c657a;
  --line: #d5d9ea;
  --brand: #3f51b5;
  --brand-dark: #303f9f;
  --brand-soft: #e8eaf8;
  --ok: #1b7f4a;
  --bad: #b42318;
  --shadow: 0 10px 30px rgba(28, 35, 64, 0.08);
  --radius: 18px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Literata", Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--brand); }
body {
  min-height: 100dvh;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(63, 81, 181, 0.18), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.5;
}
button, a, label, summary { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
button, [role="switch"] { cursor: pointer; }
img { max-width: 100%; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 650; letter-spacing: -0.02em; }
a { color: var(--brand-dark); }

.stage {
  min-height: 100svh;
  background: var(--brand);
}
.phone {
  width: min(32rem, 100%);
  margin: 0 auto;
  height: 100svh;
  max-height: 100svh;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tabs {
  position: relative;
  z-index: 6;
  flex: 0 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 4px 6px 4px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.tab-foot {
  flex: none;
  height: 8px;
  background: var(--brand);
}
.top {
  position: relative;
  z-index: 5;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--brand);
  color: white;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
}
.brand img { height: 36px; width: 36px; object-fit: contain; background: #fff; }
.who {
  margin: 0;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 600;
}
.who.ok { color: #d9ffe8; }
.who.bad { color: #ffd7d2; }
main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}
.demo {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.86rem;
}
.hero {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--brand);
  color: white;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 18px 16px 8px;
}
.home-logo {
  display: block;
  width: 50%;
  height: auto;
  margin: 0 auto;
  align-self: center;
  background: #fff;
}
.hero-eyebrow { padding: 16px 16px 0; }
.privacy p { margin: 0; }
.privacy-lead { font-weight: 700; }
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
}
.hero h1 { font-size: 1.85rem; line-height: 1.15; }
.hero-bar {
  margin-top: 8px;
  padding: 10px 16px;
  background: var(--brand-dark);
  font-size: 0.95rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.search-row { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; }
.search-row input { width: auto; flex: 1; min-width: 0; }
.search-row .button { flex: 0 0 auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }
.ok { color: var(--ok); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }
.warn { color: #b78103; font-weight: 600; }
.lead { margin-top: -6px; }
.page-title { font-size: 1.8rem; }
.app-title {
  margin: 0;
  color: var(--brand-dark);
  font-family: var(--display);
  font-size: 1.9rem;
  line-height: 1.15;
  text-align: center;
}
.greeting {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.25;
  color: var(--ink);
}
.split { display: grid; gap: 12px; }
.button, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 0;
  background: var(--brand);
  color: white;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}
.button.ghost {
  background: transparent;
  color: var(--brand-dark);
  border: 1px solid var(--line);
}
.button.send { min-width: 88px; }
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  color: var(--muted);
  text-decoration: none;
  font-size: calc(0.72rem + 3px);
  font-weight: 600;
  border-radius: 12px;
}
.tab svg { width: 22px; height: 22px; }
.tab.is-on { color: var(--brand); background: var(--brand-soft); }
.group h2 { font-size: 1.05rem; color: var(--brand-dark); }
.people { list-style: none; margin: 8px 0 0; padding: 0; }
.people a {
  display: flex;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  min-height: 48px;
  align-items: center;
  font-size: calc(1em + 1px);
}
.back-btn { align-self: flex-start; }
.klasse { margin-top: -8px; }
.facts { margin: 0; display: flex; flex-direction: column; }
.facts div { padding: 10px 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 0.82rem; }
.facts dd { margin: 2px 0 0; }
.facts a { font-weight: 600; }
.modal {
  border: 0;
  border-radius: var(--radius);
  padding: 20px;
  width: min(22rem, calc(100% - 32px));
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(28, 35, 64, 0.45); }
.modal h2 { color: var(--brand-dark); }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  color: var(--ink);
  background: #fbfbfe;
}
textarea { resize: vertical; }
.row-actions { display: flex; gap: 8px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  font-weight: 600;
}
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice input { width: 1.15rem; height: 1.15rem; accent-color: var(--brand); }
.stats { list-style: none; margin: 0; padding: 0; }
.stats li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 40dvh;
}
.bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 16px 16px 16px 6px;
  background: #f3f5fb;
  border: 1px solid var(--line);
}
.bubble.mine {
  align-self: flex-end;
  background: var(--brand-soft);
  border-radius: 16px 16px 6px 16px;
}
.bubble header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0; font-size: 0.78rem; color: var(--muted); }
.bubble header strong { color: inherit; }
.bubble p { margin-top: 4px; }
.file { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; color: inherit; }
.shot {
  display: block;
  width: min(100%, 240px);
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.shot img, .file img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}
.viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #111;
}
.viewer::backdrop { background: #111; }
.viewer-stage {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  touch-action: none;
  transform-origin: center center;
}
.viewer-close {
  position: absolute;
  z-index: 2;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #fff;
  color: #1c2340;
  font: inherit;
  font-weight: 700;
}
.chat-main { overflow: hidden; }
.chat-main .thread {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.dock {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 -16px -16px;
  padding: 8px 16px 12px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.composer {
  position: static;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin: 0;
  padding: 0;
  background: #fff;
}
.info-list { list-style: none; margin: 8px 0 0; padding: 0; }
.info-list li { padding: 7px 0; border-top: 1px solid var(--line); }
.clip {
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.clip svg { width: 22px; height: 22px; }
.clip input { position: absolute; inset: 0; opacity: 0; }
.composer textarea { min-height: 44px; max-height: 120px; }
.file-note { font-size: 0.85rem; }
.switch-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.switch-row h2 { font-size: 1.15rem; }
.switch {
  width: 52px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: #c5cadb;
  padding: 3px;
  flex: none;
}
.switch span {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: white;
  transition: transform 160ms ease;
}
.switch.is-on { background: var(--brand); }
.switch.is-on span { transform: translateX(20px); }
.switch:disabled { opacity: 0.45; cursor: not-allowed; }
.nameplate { font-size: 1.25rem; }
@media (max-width: 719px) {
  body { background: var(--brand); overflow: hidden; }
}
@media (min-width: 720px) {
  body { padding: 24px 16px; }
  .phone {
    position: relative;
    height: calc(100dvh - 48px);
    max-height: calc(100dvh - 48px);
    border-radius: 28px;
  }
  .top { border-radius: 28px 28px 0 0; }
  .tabs { border-radius: 0; }
  .tab-foot { height: 8px; border-radius: 0 0 28px 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .switch span { transition: none; }
}
.top-side { display: flex; align-items: center; gap: 2px; min-width: 0; }
.back {
  color: white;
  text-decoration: none;
  font-size: 2rem;
  line-height: 1;
  padding: 0 8px 0 0;
}
.choice.meal { align-items: center; min-height: 0; padding: 10px 14px; }
.choice.meal img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; flex: none; }
.choice.meal.trip img { width: 56px; height: 56px; border-radius: 10px; filter: saturate(0.72); }
.location-photo { display: block; width: 84%; max-width: 420px; margin: 0 auto; border-radius: 14px; }
.location-address { font-weight: 700; line-height: 1.45; }
.map-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 750;
}
.map-button svg { display: block; filter: drop-shadow(0 6px 10px rgba(28, 35, 64, 0.18)); }
.map-button span { font-size: 0.95rem; }
.map-dialog {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #d7deea;
}
.map-dialog::backdrop { background: rgba(28, 35, 64, 0.45); }
#location-map { width: 100%; height: 100%; }
.map-close {
  position: absolute;
  z-index: 1000;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 1.6rem;
  line-height: 1;
}
.choice.meal span { display: flex; flex-direction: column; gap: 2px; }
.choice.meal small { color: var(--muted); font-weight: 500; }
.filters select, .filters input { width: 100%; }
.filters select { font-size: 1.2rem; padding: 12px; }
.filters fieldset { border: 0; margin: 0; padding: 0; }
.filters legend { font-weight: 700; }
.manage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.manage-person { padding: 10px 12px; }
.manage-person p { margin: 0; }
.manage-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.manage-line + .manage-line { margin-top: 2px; }
.manage-dates { margin-top: 2px !important; color: var(--muted); }
.manage-flags { display: flex; gap: 16px; margin-top: 6px; }
.manage-flags label { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.manage-flags input { width: 1.2rem; height: 1.2rem; accent-color: var(--brand); }
.refund { border: 0; background: transparent; color: var(--bad); font-weight: 700; padding: 0; }
