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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #fff;
  color: #111;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-top: 3px solid #111;
}

/* ── Header ── */
.header {
  width: 100%;
  padding: 2rem 1.25rem 1.5rem;
  text-align: center;
}

.header-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: opacity 0.15s;
}

.header-link:hover { opacity: 0.6; }

.header-emoji {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.header-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #888;
}

/* ── Categories ── */
.categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 2rem;
}

.cat-btn {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  border: 1px solid #ddd;
  color: #666;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.cat-btn:hover {
  border-color: #999;
  color: #222;
}

.cat-btn.active {
  border-color: #111;
  color: #111;
  font-weight: 600;
}

/* ── Quote ── */
.quote-area {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.25rem 7rem;
}

.quote-text {
  font-size: 1.2rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.7;
  color: #111;
  margin-bottom: 1.5rem;
  cursor: default;
}

.quote-text:hover::before {
  color: #999;
}

.quote-text::before {
  content: '\201C';
  display: inline;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 3.5rem;
  font-style: italic;
  font-weight: 400;
  line-height: 0;
  vertical-align: -0.4em;
  margin-right: 0.08em;
  color: #ccc;
  transition: color 0.2s;
}

.quote-divider {
  width: 2rem;
  height: 1px;
  background: #e8e8e8;
  margin-bottom: 0.875rem;
}

.quote-meta {
  font-size: 0.75rem;
  font-weight: 400;
  color: #888;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quote-meta a {
  color: #888;
  text-decoration: none;
  transition: color 0.15s;
}

.quote-meta a:hover { color: #333; }

/* ── Context ── */
#context-before {
  margin-bottom: 1.25rem;
}

#context-after {
  margin-top: 1rem;
}

.context-sentence {
  font-size: 1rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.7;
  color: #c0c0c0;
  margin-bottom: 0.5rem;
}

.context-sentence:last-child {
  margin-bottom: 0;
}

#context-before .context-sentence::before {
  content: '[…] ';
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: #d8d8d8;
}

#context-after .context-sentence::after {
  content: ' […]';
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: #d8d8d8;
}

.context-toggle {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  color: #bbb;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #ddd;
  transition: color 0.15s;
}

.context-toggle:hover {
  color: #555;
}

.context-toggle.active {
  color: #888;
}

/* ── Share button ── */
.share-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #bbb;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transition: color 0.15s;
}

.share-btn:hover { color: #555; }

.share-btn.copied { color: #111; }

/* ── Empty state ── */
.empty {
  text-align: center;
  color: #ccc;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 4rem 0;
}

/* ── Next button ── */
.next-btn {
  position: fixed;
  bottom: 1.5rem;
  left: 1.25rem;
  right: 1.25rem;
  text-align: center;
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.9rem 1rem;
  border-radius: 100px;
  background: #111;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
}

.next-btn:hover {
  opacity: 0.8;
  color: #fff;
}

/* ── Tablet 640px+ ── */
@media (min-width: 640px) {
  .header {
    padding: 2.5rem 1.5rem 2rem;
  }

  .header-emoji {
    font-size: 2rem;
  }

  .categories {
    padding: 0 1.5rem 1.5rem;
    margin-bottom: 2.5rem;
  }

  .quote-area {
    padding: 0 1.5rem 8rem;
  }

  .quote-text {
    font-size: 1.4rem;
  }

  .next-btn {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 0.8rem 2.75rem;
    bottom: 2rem;
  }
}

/* ── Footer ── */
.site-footer {
  text-align: right;
  padding: 1rem 1.5rem 6rem;
  font-size: 0.65rem;
}

.site-footer a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer a:hover { color: #666; }

/* ── Impressum page ── */
.impressum-content {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.impressum-heading {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 2.5rem;
}

.impressum-section {
  margin-bottom: 2rem;
}

.impressum-section h2 {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.6rem;
}

.impressum-section p {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  color: #444;
}

.impressum-section a {
  color: #444;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: #ccc;
  transition: color 0.15s;
}

.impressum-section a:hover { color: #111; }

/* ── Desktop 1024px+ ── */
@media (min-width: 1024px) {
  .header {
    padding: 3.5rem 1.5rem 2.5rem;
  }

  .categories {
    padding: 0 2rem 1.5rem;
    margin-bottom: 3rem;
  }

  .quote-area {
    padding: 0 2rem 9rem;
  }

  .quote-text {
    font-size: 1.55rem;
    margin-bottom: 1.75rem;
  }

  .next-btn {
    bottom: 2.5rem;
  }
}
