:root {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #18181b;
  --surface-2: #27272a;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #f4f4f5;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --subtle: #71717a;
  --accent: #10b981;
  --accent-text: #09090b;
  --danger: #fb7185;
  --star: #fbbf24;
  --radius: 1.5rem;
  --radius-sm: 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
[hidden] { display: none !important; }

.shell {
  max-width: 72rem;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(6rem + env(safe-area-inset-bottom));
}

.page { flex: 1; padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 1.25rem; }
.page.centered { align-items: center; justify-content: center; }
.narrow { width: 100%; max-width: 28rem; }

.eyebrow { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.3em; color: var(--subtle); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.error { color: var(--danger); font-size: 0.875rem; }
.success { color: var(--accent); font-size: 0.875rem; }

.header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.grid { display: grid; gap: 1rem; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .grid.filters { grid-template-columns: repeat(3, 1fr); } }

.empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgb(24 24 27 / 0.7);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

/* Ziel-Karte */
.destination-card { gap: 0.75rem; transition: border-color 0.15s; }
.destination-card:hover, .destination-card:focus-visible { border-color: var(--border-strong); }
.destination-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.destination-card .flags { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; color: var(--muted); }
.meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted); }
.fav { color: var(--danger); }
.visited { color: var(--accent); }
.star { color: var(--star); }

.icon { width: 1.25rem; height: 1.25rem; flex: none; }
.icon.sm { width: 0.9rem; height: 0.9rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  border: 1px solid transparent;
}
button.tag { cursor: pointer; font: inherit; font-size: 0.8rem; }
button.tag.active { border-color: var(--accent); color: var(--accent); }

/* Formulare */
form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem; color: var(--text-2); }
input[type="text"], input[type="password"], input[type="number"], input[type="url"], input[type="search"], textarea, select {
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  width: 100%;
}
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
textarea { min-height: 7rem; resize: vertical; }
.hint { font-size: 0.8rem; color: var(--subtle); }
.link-host { font-weight: 400; opacity: 0.75; }
.link-host::before { content: "· "; }
.checks { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.875rem; color: var(--text-2); }
.checks label { display: flex; align-items: center; gap: 0.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.875rem;
  color: var(--text-2);
  cursor: pointer;
}
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.row > input { flex: 1; min-width: 10rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-text);
}
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.secondary { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn.danger { background: transparent; border-color: var(--border-strong); color: var(--danger); }
.btn.small { padding: 0.4rem 0.75rem; font-size: 0.85rem; border-radius: 0.75rem; }

/* Bilder */
.images { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.75rem; }
.image { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image button { position: absolute; top: 0.4rem; right: 0.4rem; }

/* Listen in Profil */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.list li { display: flex; align-items: center; gap: 0.5rem; justify-content: space-between; flex-wrap: wrap; }

.pre { white-space: pre-wrap; color: var(--text-2); }

/* Navigation */
.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--border);
  background: rgb(9 9 11 / 0.95);
  backdrop-filter: blur(8px);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-inner { max-width: 72rem; margin: 0 auto; display: flex; justify-content: space-around; padding: 0.75rem 1rem; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; font-size: 0.875rem; color: var(--muted); }
.nav a.active { color: var(--accent); }
