:root {
  --bg: #1b0d0d;
  --bg-alt: #241212;
  --card: #2c1616;
  --border: #4a2424;
  --text: #f5ece4;
  --text-muted: #cbb3a8;
  --accent: #b3222c;
  --accent-light: #d94a3f;
  --gold: #e0b24d;
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbf3ec;
    --bg-alt: #f2e3d5;
    --card: #ffffff;
    --border: #e6d2c2;
    --text: #2a1414;
    --text-muted: #7a5a4d;
    --accent: #b3222c;
    --accent-light: #8f1b23;
    --gold: #9c7423;
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100svh;
  min-height: 100vh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 18px calc(28px + env(safe-area-inset-bottom));
}

/* ---------- Kopf ---------- */

.app-header {
  text-align: center;
  padding: 10px 0 22px;
}

.app-header .glass {
  font-size: 34px;
  line-height: 1;
}

.app-header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 8px 0 2px;
}

.app-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Views ---------- */

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: fade-in .25s var(--ease);
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Menü-Karten (Startbildschirm) ---------- */

.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.menu-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px;
  text-align: left;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}

@media (hover: hover) {
  .menu-card:hover {
    border-color: var(--accent);
  }
}

.menu-card:active {
  transform: scale(0.98);
}

.menu-card .icon {
  font-size: 30px;
  width: 46px;
  text-align: center;
  flex-shrink: 0;
}

.menu-card .label {
  font-size: 17px;
  font-weight: 700;
}

.menu-card .sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Zurück-Leiste ---------- */

.subview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 4px 0 10px;
  z-index: 5;
}

.back-btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.subview-header h2 {
  font-size: 18px;
  margin: 0;
}

/* ---------- Karten / Inhalte ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card p {
  margin: 6px 0;
  line-height: 1.5;
  font-size: 15.5px;
}

.quote-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quote-list li {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-style: italic;
  font-size: 15px;
  line-height: 1.4;
}

.word-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.word-table td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
}

.word-table td:first-child {
  color: var(--text-muted);
}

.word-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--gold);
}

.intro-text p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 14px;
}

/* ---------- Notizen ---------- */

.note-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.note-card .person-label {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}

.note-card .person-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.note-card .person-haltung {
  font-size: 13px;
  color: var(--gold);
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.note-card .person-haltung strong {
  color: var(--text);
}

.note-card textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
}

.note-card textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.save-state {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
  height: 14px;
}

.save-state.saved {
  color: var(--gold);
}

.victim-card {
  border-color: var(--accent);
}

.victim-card .person-label {
  color: var(--accent-light);
}
