/* ── Globaler Overflow-Schutz ───────────────────────────── */
html { overflow-x: clip; }
body { overflow-x: hidden; max-width: 100vw; width: 100%; }
* { min-width: 0; }

/* ============================================================
   pages.css — Seitenspezifische Styles
   Einbinden nach theme.css und vocab.css.
   ============================================================ */

/* ============================================================
   GEMEINSAME KOMPONENTEN (mehrere Seiten)
   ============================================================ */

/* ── Toolbar (Archiv, Vokabelliste, Grammatik) ────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.toolbar .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Such-Input ───────────────────────────────────────────── */
.search-input {
  flex: 1;
  min-width: 160px;
  max-width: 320px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-input);
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.search-input:focus {
  border-color: var(--accent-45);
  box-shadow: 0 0 0 3px var(--accent-12);
}
.search-input::placeholder { color: var(--ink-40); }

.count-label {
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
}

/* ── Sortier-Buttons ──────────────────────────────────────── */
.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-btn);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
  white-space: nowrap;
}
.sort-btn:hover {
  background: var(--surface-btn-hover);
  border-color: var(--accent-28);
  color: var(--ink);
}
.sort-btn--active {
  background: var(--accent-10);
  border-color: var(--accent-35);
  color: var(--accent);
}

/* ── TOPIK-Dots (Grammatikseiten) ─────────────────────────── */
.topik-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-1 { background: #22c55e; }
.dot-2 { background: #f59e0b; }
.dot-3 { background: #ef4444; }

/* ── TOPIK-Level-Badges ───────────────────────────────────── */
.level-topik-i {
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.30);
  color: rgba(21,128,61,.90);
}
.level-topik-ii {
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.30);
  color: rgba(180,116,8,.90);
}
.level-topik-iii {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.30);
  color: rgba(185,28,28,.90);
}

@media (prefers-color-scheme: dark) {
  .level-topik-i   { color: rgba(74,222,128,.90); }
  .level-topik-ii  { color: rgba(251,191,36,.90); }
  .level-topik-iii { color: rgba(252,165,165,.90); }
}

/* ── Rechtliche Seiten (Cookie-Richtlinien, Impressum) ─────── */
.legal-section {
  max-width: 720px;
  margin-inline: auto;
  padding-block: clamp(32px, 6vw, 64px);
}
.legal-section h1 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  margin-bottom: 8px;
}
.legal-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 8px;
  color: var(--ink);
}
.legal-section p,
.legal-section li {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-75);
}
.legal-section ul {
  padding-left: 1.4em;
  margin: 8px 0;
}
.legal-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13.5px;
}
.legal-section th,
.legal-section td {
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--line);
  vertical-align: top;
}
.legal-section th {
  background: var(--ink-04);
  font-weight: 700;
  color: var(--ink);
}
.legal-section .meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 32px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--accent-80);
  text-decoration: none;
  margin-bottom: 24px;
}
.back-link:hover { text-decoration: underline; }
code {
  background: var(--ink-06);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 92%;
}

/* ============================================================
   LADEBILDSCHIRM (index.html)
   ============================================================ */
#loadingScreen {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background: var(--bg);
  padding: 0 24px;
  box-sizing: border-box;
  transition: opacity .5s ease, visibility .5s ease;
}
#loadingScreen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.ls-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ls-korean {
  font-family: var(--serif);
  font-size: clamp(32px, 10vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.ls-korean span { color: var(--accent); }
.ls-sub {
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.ls-bar-wrap {
  width: clamp(140px, 60vw, 240px);
  height: 3px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.ls-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-50), var(--accent));
  animation: lsBar 50s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes lsBar {
  0%   { width: 0%; }
  40%  { width: 55%; }
  70%  { width: 78%; }
  90%  { width: 90%; }
  100% { width: 100%; }
}
.ls-chars {
  display: flex;
  gap: 14px;
  font-size: 22px;
  color: var(--ink-28);
}
.ls-char { animation: lsFloat 2s ease-in-out infinite; }
.ls-char:nth-child(1) { animation-delay: 0s; }
.ls-char:nth-child(2) { animation-delay: .2s; }
.ls-char:nth-child(3) { animation-delay: .4s; }
.ls-char:nth-child(4) { animation-delay: .6s; }
.ls-char:nth-child(5) { animation-delay: .8s; }
@keyframes lsFloat {
  0%, 100% { transform: translateY(0);     opacity: .28; }
  50%       { transform: translateY(-6px);  opacity: .70; }
}
.ls-hint {
  font-size: 12.5px;
  color: var(--ink-38);
  letter-spacing: .04em;
}

/* ============================================================
   ARCHIV (archive.html)
   ============================================================ */
.archive-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.archive-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.archive-row {
  display: grid;
  grid-template-columns: 110px 1fr 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background .14s ease;
  cursor: pointer;
}
.archive-row:last-child { border-bottom: none; }
.archive-row:hover { background: var(--accent-05); }
.archive-row--today {
  background: var(--accent-05);
  border-left: 3px solid var(--accent-50);
}
.arc-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.arc-date-main {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.arc-date-wd {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.arc-topic {
  font-size: 14px;
  color: var(--ink-80);
  line-height: 1.35;
}
.arc-grammar {
  font-size: 13px;
  color: var(--accent-85);
  font-weight: 700;
  font-family: var(--sans);
}
.arc-grammar:empty::before {
  content: '—';
  color: var(--muted);
  font-weight: 400;
  font-family: inherit;
}
.arc-rating {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.stars { display: flex; gap: 2px; }
.star {
  font-size: 17px;
  cursor: pointer;
  color: var(--ink-20);
  transition: color .1s ease, transform .1s ease;
  line-height: 1;
  padding: 2px;
  background: none;
  border: none;
}
.star:hover, .star.star--hover { color: #f5a623; transform: scale(1.15); }
.star.star--filled, .star.star--voted { color: #f5a623; }
.rating-meta { font-size: 11px; color: var(--muted); white-space: nowrap; }
.archive-header-row {
  display: grid;
  grid-template-columns: 110px 1fr 1fr auto;
  gap: 16px;
  padding: 8px 18px;
  background: var(--ink-03);
  border-bottom: 1px solid var(--line);
}
.archive-header-row span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted);
}
.arc-skel {
  height: 58px;
  background: linear-gradient(90deg, var(--ink-05) 25%, var(--ink-10) 50%, var(--ink-05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite ease-in-out;
}
.arc-today-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-10);
  border: 1px solid var(--accent-22);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-85);
  margin-left: 6px;
}
@media (max-width: 640px) {
  .archive-row, .archive-header-row { grid-template-columns: 90px 1fr auto; }
  .arc-grammar, .archive-header-row .hdr-grammar { display: none; }
  .sort-btn.sort-grammar { display: none; }
}
@media (max-width: 420px) {
  .archive-row, .archive-header-row { grid-template-columns: 80px 1fr auto; gap: 10px; padding: 12px 14px; }
  .arc-date-main { font-size: 13px; }
  .arc-topic { font-size: 13px; }
}

/* ============================================================
   COOKIE-EINSTELLUNGEN (cookie-einstellungen.html)
   ============================================================ */
.settings-wrap {
  max-width: 680px;
  margin-inline: auto;
  padding-block: clamp(32px, 6vw, 64px);
}
.settings-wrap h1 {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 800;
  margin-bottom: 6px;
}
.settings-wrap .meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
}
.consent-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 28px;
}
.consent-status--ok {
  background: rgba(16,140,80,.10);
  border: 1px solid rgba(16,140,80,.25);
  color: rgba(16,140,80,.90);
}
.consent-status--pending {
  background: rgba(200,100,0,.10);
  border: 1px solid rgba(200,100,0,.25);
  color: rgba(180,90,0,.90);
}
.consent-status__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.category-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.category-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-card);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.category-card:has(.toggle:checked) {
  border-color: var(--accent-25);
  box-shadow: 0 2px 12px var(--accent-07);
}
.category-info { flex: 1; min-width: 0; }
.category-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-required {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-35);
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.category-desc { font-size: 13.5px; line-height: 1.6; color: var(--ink-68); margin: 0; }
.category-items {
  margin-top: 8px;
  padding-left: 1.2em;
  font-size: 12.5px;
  color: var(--ink-55);
}
.category-items li { margin-bottom: 2px; }
.toggle-wrap { flex-shrink: 0; padding-top: 2px; }
.toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 44px; height: 24px;
  border-radius: 12px;
  background: var(--ink-15);
  border: 1px solid var(--ink-12);
  cursor: pointer;
  position: relative;
  transition: background .2s ease, border-color .2s ease;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  top: 2px; left: 2px;
  transition: transform .2s ease;
  box-shadow: 0 1px 3px var(--ink-20);
}
.toggle:checked { background: var(--accent-70); border-color: var(--accent-50); }
.toggle:checked::after { transform: translateX(20px); }
.toggle:disabled { opacity: .55; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn--save {
  background: linear-gradient(180deg, var(--accent-18), var(--accent-10));
  border: 1px solid var(--accent-30);
  color: var(--accent-90);
  font-weight: 700;
}
.btn--save:hover {
  background: linear-gradient(180deg, var(--accent-25), var(--accent-15));
  border-color: var(--accent-45);
}
.btn--danger {
  background: transparent;
  border: 1px solid rgba(180,35,24,.25);
  color: rgba(180,35,24,.80);
  font-size: 13px;
}
.btn--danger:hover { background: rgba(180,35,24,.06); border-color: rgba(180,35,24,.40); }
.save-feedback {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(16,140,80,.85);
  padding: 6px 0;
}
.save-feedback--visible { display: flex; }
.stored-data {
  margin-top: 36px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--ink-02);
}
.stored-data h2 { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.stored-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.stored-table th,
.stored-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.stored-table th { font-weight: 700; color: var(--muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.stored-table tr:last-child td { border-bottom: none; }
.stored-table .val { font-family: monospace; color: var(--ink-70); }
.stored-table .absent { color: var(--ink-30); font-style: italic; }
.settings-links { margin-top: 28px; font-size: 13px; color: var(--muted); }
.settings-links a { color: var(--accent-80); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   GRAMMATIKÜBERSICHT (grammar-overview.html)
   ============================================================ */
.topik-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-btn);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
  white-space: nowrap;
}
.topik-btn:hover {
  background: var(--surface-btn-hover);
  border-color: var(--accent-28);
  color: var(--ink);
}
.topik-btn--active {
  background: var(--hl-vocab-bg);
  border-color: var(--hl-vocab-border);
  color: var(--accent);
}
.grammar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}
.grammar-card-ov {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid var(--grammar-card-border);
  border-radius: var(--r-md);
  background: var(--grammar-card-bg);
  transition: transform .16s ease, box-shadow .16s ease;
}
.grammar-card-ov:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.gc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.gc-form {
  font-family: var(--sans);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 800;
  color: var(--grammar-form-color);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.gc-level {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.gc-explanation { font-size: 13.5px; color: var(--ink-72); line-height: 1.6; margin: 0; }
.gc-example {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--ink-04);
  border: 1px solid var(--line);
}
.gc-example-ko { font-size: 14px; color: var(--ink); line-height: 1.5; }
.gc-example-de { font-size: 12.5px; color: var(--muted); font-style: italic; }
.gc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  gap: 8px;
}
.gc-count { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.gc-link {
  color: var(--accent-80);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
  white-space: nowrap;
}
.gc-link:hover { color: var(--accent); }
.skel-card {
  height: 180px;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, var(--ink-05) 25%, var(--ink-10) 50%, var(--ink-05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite ease-in-out;
}
.empty-msg {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
}

/* ============================================================
   GRAMMATIK TOPIK-SEITEN (grammar-topik-1/2/3.html)
   ============================================================ */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.level-badge--i {
  background: rgba(34,197,94,.10);
  border: 1px solid rgba(34,197,94,.28);
  color: rgba(21,128,61,.90);
}
.level-badge--ii {
  background: rgba(245,158,11,.10);
  border: 1px solid rgba(245,158,11,.28);
  color: rgba(180,116,8,.90);
}
.level-badge--iii {
  background: rgba(239,68,68,.10);
  border: 1px solid rgba(239,68,68,.28);
  color: rgba(185,28,28,.90);
}
@media (prefers-color-scheme: dark) {
  .level-badge--i   { color: rgba(74,222,128,.90); }
  .level-badge--ii  { color: rgba(251,191,36,.90); }
  .level-badge--iii { color: rgba(252,165,165,.90); }
}
.level-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  opacity: .7;
  flex-shrink: 0;
}
.grammar-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--grammar-card-border);
  border-radius: var(--r-md);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
.grammar-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 18px 22px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.grammar-item:last-child { border-bottom: none; }
.grammar-item:hover { background: var(--grammar-card-bg); }
.grammar-item.hidden { display: none; }
.gi-left { display: flex; flex-direction: column; gap: 8px; }
.gi-form {
  font-family: var(--sans);
  font-size: clamp(14px, 4vw, 21px);
  font-weight: 800;
  color: var(--grammar-form-color);
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  min-width: 0;
}
.gi-archive {
  font-size: 11.5px;
  color: var(--accent-80);
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.gi-archive:hover { color: var(--accent); }
.gi-archive-none { font-size: 11.5px; color: var(--ink-38); font-style: italic; }
.gi-right { display: flex; flex-direction: column; gap: 10px; }
.gi-explanation { font-size: 14px; color: var(--ink-75); line-height: 1.65; margin: 0; }
.gi-example {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--ink-04);
  border: 1px solid var(--line);
}
.gi-example-ko { font-size: 14.5px; color: var(--ink); line-height: 1.5; }
.gi-example-de { font-size: 13px; color: var(--muted); font-style: italic; }
.gi-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-28);
  min-width: 24px;
  text-align: right;
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .grammar-item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
  }
  .gi-left  { grid-row: 1; grid-column: 1; }
  .gi-right { grid-row: 2; grid-column: 1 / -1; }
  .gi-num   { grid-row: 1; grid-column: 2; }
}
@media (max-width: 460px) {
  .grammar-item { padding: 14px; gap: 12px; }
}

/* ============================================================
   VOKABELLISTE (vocab-list.html)
   ============================================================ */
.pos-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pos-btn {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
  white-space: nowrap;
}
.pos-btn:hover { background: var(--ink-05); color: var(--ink); }
.pos-btn--active { background: var(--hl-bg); border-color: var(--hl-border); color: var(--ink); }
.vocab-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.vocab-table { width: 100%; border-collapse: collapse; }
.vocab-table thead tr { background: var(--ink-03); border-bottom: 1px solid var(--line); }
.vocab-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.vocab-table th.th-sortable { cursor: pointer; user-select: none; }
.vocab-table th.th-sortable:hover { color: var(--ink); }
.vocab-table th.th-active { color: var(--accent); }
.vocab-table tbody tr {
  border-bottom: 1px solid var(--line);
  background: var(--surface-card);
  transition: background .12s;
}
.vocab-table tbody tr:last-child { border-bottom: none; }
.vocab-table tbody tr:hover { background: var(--accent-05); }
.vocab-table td { padding: 11px 16px; font-size: 14px; color: var(--ink-80); vertical-align: middle; }
.td-ko { font-size: 16px; font-weight: 700; color: var(--ink); }
.td-de { color: var(--ink-72); }
.td-count { text-align: center; }
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
.count-badge--1 { background: var(--ink-06); color: var(--ink-60); border: 1px solid var(--ink-14); }
.count-badge--2 { background: var(--accent-10); color: var(--accent-80); border: 1px solid var(--accent-22); }
.count-badge--many { background: var(--hl-vocab-bg); color: var(--accent); border: 1px solid var(--hl-vocab-border); }
.td-date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pos-badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent-08);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-68);
  white-space: nowrap;
}
.skel-row td { padding: 0; }
.skel-line {
  height: 44px;
  background: linear-gradient(90deg, var(--ink-05) 25%, var(--ink-10) 50%, var(--ink-05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite ease-in-out;
}
@media (max-width: 640px) {
  .vocab-table .td-date,
  .vocab-table th:last-child { display: none; }
}
@media (max-width: 440px) {
  .vocab-table .td-pos,
  .vocab-table th:nth-child(3) { display: none; }
}

/* ── Grammatikübersicht: Schnellzugriff-Buttons ─────────── */
.topik-quicklinks {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Toolbar-Stack (Grammatikübersicht) ──────────────────── */
.toolbar-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* ── Meta-Zeile (index.html) ─────────────────────────────── */
.meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-row .lead { margin: 0; }

.btn--csv {
  display: none;
  font-size: 12.5px;
  padding: 6px 12px;
}

/* ── Fehler-Overlay ──────────────────────────────────────── */
.error-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
  box-sizing: border-box;
  transition: opacity .3s ease, visibility .3s ease;
}

.error-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.error-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 420px;
  width: 100%;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow);
  text-align: center;
}

.error-icon {
  font-size: 48px;
  line-height: 1;
}

.error-title {
  font-family: var(--serif);
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 760;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.error-msg {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.error-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}