/* ReadAndLern – Styles */

:root {
  --bg: #F6F6F3;
  --surface: #FFFFFF;
  --surface-2: #FBFBF9;
  --ink: #16181D;
  --text: #23262D;
  --text-2: #3A3E47;
  --muted: #5B606B;
  --faint: #8A8F99;
  --line: #E6E6E1;
  --line-2: #EDEDEA;
  --field: #DADBD6;
  --chip: #F1F1EE;
  --accent: #2F5BEA;
  --accent-hover: #1F44C2;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(47, 91, 234, 0.10);
  --mark-bg: #FFF1BF;
  --mark-line: #E8B931;
  --dark-btn: #16181D;
  --dark-btn-ink: #FFFFFF;
  --shadow-pop: 0 16px 40px rgba(22, 24, 29, 0.16), 0 2px 6px rgba(22, 24, 29, 0.06);
  --backdrop: rgba(22, 24, 29, 0.22);
  --ok: #1F7A4D;
  --ok-bg: #EEF7F1;
  --bad: #C0362C;
  --bad-ink: #8A2A22;
  --bad-bg: #FDF0EF;
  --tip-bg: #FFF1BF;
  --tip-ink: #7A5A00;

  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-book: 'Literata', Georgia, 'Times New Roman', serif;
  --reader-size: 20px;
  --reader-font: var(--font-book);
  --radius: 10px;
  color-scheme: light;
}

:root[data-theme="sepia"] {
  --bg: #F3EBDC;
  --surface: #FBF6EC;
  --surface-2: #F7F0E3;
  --ink: #2B2218;
  --text: #3A2F22;
  --text-2: #4A3D2D;
  --muted: #6B5B47;
  --faint: #8C7B65;
  --line: #E2D6C1;
  --line-2: #E9DFCD;
  --field: #D6C8B0;
  --chip: #EDE3D1;
  --accent: #9A4A1E;
  --accent-hover: #7C3A15;
  --accent-soft: rgba(154, 74, 30, 0.10);
  --mark-bg: #F6E2A6;
  --mark-line: #C99A2E;
  --dark-btn: #2B2218;
}

:root[data-theme="dark"] {
  --bg: #15171B;
  --surface: #1E2127;
  --surface-2: #1A1D22;
  --ink: #ECEDEF;
  --text: #D7D9DD;
  --text-2: #C2C5CB;
  --muted: #9CA1AB;
  --faint: #7D828C;
  --line: #2C3038;
  --line-2: #262A31;
  --field: #3A3F48;
  --chip: #2A2E35;
  --accent: #86A2FF;
  --accent-hover: #A6BBFF;
  --accent-ink: #0E1220;
  --accent-soft: rgba(134, 162, 255, 0.16);
  --mark-bg: rgba(232, 185, 49, 0.22);
  --mark-line: #B8901E;
  --dark-btn: #ECEDEF;
  --dark-btn-ink: #15171B;
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  --backdrop: rgba(0, 0, 0, 0.45);
  --ok: #5CC48E;
  --ok-bg: rgba(92, 196, 142, 0.12);
  --bad: #FF8A80;
  --bad-ink: #FFB4AB;
  --bad-bg: rgba(255, 138, 128, 0.12);
  --tip-bg: rgba(232, 185, 49, 0.18);
  --tip-ink: #F0CF6A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }

/* ---------- Icons ---------- */
.ic { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 18px; height: 18px; }
.ic-lg { width: 26px; height: 26px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: var(--radius);
  border: 1px solid transparent; background: none; cursor: pointer;
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--text); font-weight: 500; font-size: 14px; }
.btn-outline:hover { border-color: var(--field); color: var(--ink); }
.btn-dark { background: var(--dark-btn); color: var(--dark-btn-ink); }
.btn-lg { min-height: 52px; font-size: 16px; border-radius: 12px; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn:disabled { opacity: .6; cursor: default; }

.icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  color: var(--text-2); cursor: pointer; text-decoration: none; position: relative; flex: 0 0 auto;
}
.icon-btn:hover { color: var(--ink); border-color: var(--field); }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.soft { border-color: transparent; background: var(--chip); }
.icon-btn.aa { font-family: var(--font-book); font-size: 16px; font-weight: 600; width: auto; min-width: 44px; padding: 0 12px; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.field input[type="text"], .input-wrap {
  min-height: 48px; border-radius: 12px; border: 1.5px solid var(--field); background: var(--surface);
}
.field input[type="text"] { padding: 0 14px; font-size: 16px; }
.field input[type="text"]:focus, .input-wrap:focus-within { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-wrap { display: flex; align-items: center; padding-left: 14px; }
.input-wrap input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 17px; min-height: 48px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.form-error { margin: 0; color: #C0362C; font-size: 14px; font-weight: 500; }
:root[data-theme="dark"] .form-error { color: #FF8A80; }

/* ---------- Login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.login-inner { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 32px; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.login-brand h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.tagline { margin: 0; font-family: var(--font-book); font-style: italic; font-size: 17px; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.login-card { padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 4px 16px rgba(22, 24, 29, 0.04); }
.login-note { margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted); text-align: center; }

.logo { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; }
.logo .ic { width: 18px; height: 18px; stroke-width: 2; }
.logo-lg { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 12px 28px rgba(22, 24, 29, 0.16); }
.logo-lg .ic { width: 32px; height: 32px; stroke-width: 1.75; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  min-height: 64px; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.mainnav { display: flex; gap: 4px; }
.mainnav a {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: #4A4F59; color: var(--muted); text-decoration: none;
}
.mainnav a:hover { color: var(--ink); background: var(--chip); }
.mainnav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.count { font-size: 12px; font-weight: 600; background: var(--chip); color: var(--text-2); padding: 2px 8px; border-radius: 999px; }
.mainnav a[aria-current="page"] .count { background: var(--surface); color: var(--accent); }
.top-actions { display: flex; gap: 8px; }
.back-btn, .reader-title { display: none; }
.dot-count {
  position: absolute; top: 6px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.progress { height: 3px; background: var(--line); position: sticky; top: 64px; z-index: 19; }
.progress-bar { height: 3px; width: 0; background: var(--accent); transition: width .2s; }

body:not(.v-reader) .reader-only { display: none !important; }
.mobile-only { display: none !important; }

/* ---------- Layout ---------- */
.container { width: 100%; margin: 0 auto; padding: 56px 24px 64px; display: flex; flex-direction: column; gap: 32px; }
.container-lib { max-width: 1088px; }
.container-gl { max-width: 1168px; gap: 20px; padding-top: 48px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 8px; }
.page-title { font-family: var(--font-book); font-size: 40px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.page-sub { margin: 0; font-size: 16px; color: var(--muted); }
.page-sub b { color: var(--text); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Bibliothek ---------- */
.lib-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.book-list { flex: 1 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.book-list:empty { display: none; }
.book-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-wrap: wrap; gap: 24px; }
.cover {
  flex: 0 0 148px; height: 212px; border-radius: 10px; color: #FFFFFF; padding: 20px 16px;
  display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 10px 24px rgba(30, 42, 68, 0.22);
  text-decoration: none;
}
.cover:hover { color: #FFFFFF; }
.cover-kicker { font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.cover-title { font-family: var(--font-book); font-size: 19px; line-height: 1.2; font-weight: 600; overflow-wrap: break-word; hyphens: auto; }
.cover-line { width: 32px; height: 3px; border-radius: 2px; background: var(--accent); }
:root[data-theme="dark"] .cover-line { background: #FFFFFF; opacity: .7; }
.book-info { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.book-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.book-top > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.book-title { font-family: var(--font-book); font-size: 24px; font-weight: 600; overflow-wrap: anywhere; }
.book-meta { font-size: 14px; color: var(--muted); }
.book-progress { display: flex; flex-direction: column; gap: 8px; }
.book-progress-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.book-progress-row b { color: var(--text); }
.bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.bar > div { height: 6px; border-radius: 999px; background: var(--accent); }
.stats { display: flex; gap: 24px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 22px; font-weight: 700; }
.stat span { font-size: 13px; color: var(--muted); }
.book-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu.disabled > summary { opacity: .45; pointer-events: none; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column;
}
.menu-pop button {
  text-align: left; min-height: 44px; padding: 0 12px; border: none; background: none; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.menu-pop button:hover { background: var(--chip); }
.menu-pop .danger { color: #C0362C; }
:root[data-theme="dark"] .menu-pop .danger { color: #FF8A80; }

.dropzone {
  flex: 1 1 300px; min-width: 0; min-height: 260px; border: 2px dashed var(--field); border-radius: 20px; padding: 32px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; background: var(--surface-2);
  transition: border-color .15s, background-color .15s;
}
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dz-icon { width: 56px; height: 56px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.dz-idle { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dz-title { font-size: 17px; font-weight: 600; }
.dz-hint { font-size: 13px; color: var(--muted); max-width: 260px; }
.dz-form { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.dz-file { font-size: 14px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.dz-actions { display: flex; gap: 8px; justify-content: flex-end; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.step > span:last-child { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.step b { font-size: 15px; font-weight: 600; }
.step-num { flex: 0 0 32px; height: 32px; border-radius: 999px; background: var(--line-2); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }

/* ---------- Reader ---------- */
#view-reader { display: flex; justify-content: center; padding: 56px 24px 48px; }
.reader { width: 100%; max-width: 680px; }
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.chapter-title { font-family: var(--font-book); font-size: 40px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 10px; }
.chapter-meta { margin: 0 0 40px; font-size: 14px; color: var(--muted); }
.book-text { font-family: var(--reader-font); font-size: var(--reader-size); line-height: 1.75; color: var(--text); overflow-wrap: break-word; hyphens: auto; }
.book-text p { margin: 0 0 1.2em; }
.book-text h2, .book-text h3, .book-text h4 { font-family: var(--font-book); line-height: 1.3; margin: 1.6em 0 .6em; color: var(--ink); }
.book-text h2 { font-size: 1.35em; }
.book-text h3 { font-size: 1.15em; }
.book-text blockquote { margin: 0 0 1.2em; padding-left: 1em; border-left: 3px solid var(--line); color: var(--text-2); }
.book-text hr { border: none; text-align: center; margin: 2em 0; }
.book-text hr::after { content: '· · ·'; color: var(--muted); letter-spacing: .4em; }
.book-text img { max-width: 100%; height: auto; }
.book-text ul, .book-text ol { padding-left: 1.4em; margin: 0 0 1.2em; }

.w { cursor: pointer; border-radius: 3px; transition: background-color .1s; }
@media (hover: hover) { .w:hover { background: var(--accent-soft); } }
.w.g { background: var(--mark-bg); box-shadow: inset 0 -2px 0 var(--mark-line); padding: 0 1px; }
.w.sel { background: var(--accent); color: var(--accent-ink); box-shadow: none; padding: 1px 3px; border-radius: 4px; }

.chapter-nav { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.chapter-nav .btn { font-weight: 600; }

/* ---------- Popover ---------- */
.popover {
  position: absolute; z-index: 40; width: 360px; max-width: calc(100vw - 32px); padding: 20px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; gap: 14px; font-size: 14px;
}
.pop-arrow {
  position: absolute; top: -7px; left: 40px; width: 12px; height: 12px; background: var(--surface);
  border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg);
}
.popover.above .pop-arrow { top: auto; bottom: -7px; transform: rotate(225deg); }
.sheet-handle { display: none; }
.pop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pop-word-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pop-word { font-family: var(--font-book); font-size: 22px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.pop-meta { font-size: 13px; color: var(--muted); min-height: 1.2em; }
.pop-meta b { font-weight: 600; color: var(--text-2); }
.pop-tools { display: flex; gap: 4px; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pop-trans, .pop-sentence-wrap { display: flex; flex-direction: column; gap: 4px; }
.pop-trans { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.pop-translation { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; color: var(--accent); line-height: 1.25; min-height: 30px; }
.pop-translation.error { font-size: 14px; font-weight: 500; color: #C0362C; letter-spacing: 0; }
:root[data-theme="dark"] .pop-translation.error { color: #FF8A80; }
.pop-def { font-size: 14px; color: var(--muted); }
.pop-sentence { font-family: var(--font-book); font-style: italic; font-size: 15px; color: var(--text-2); line-height: 1.5; }
.pop-sentence b { font-style: normal; }
.pop-sentence-tr { font-size: 14px; color: var(--text); padding: 10px 12px; background: var(--chip); border-radius: 10px; }
.pop-actions { display: flex; gap: 8px; }
.pop-actions .btn-primary { flex: 1; }
.pop-actions .btn.in-glossary, .pop-actions .btn.in-glossary:hover { background: var(--chip); color: var(--text); }
.pop-source { font-size: 12px; color: var(--muted); }

.skeleton { display: inline-block; height: 1em; width: 60%; border-radius: 6px; background: linear-gradient(90deg, var(--line-2), var(--chip), var(--line-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; vertical-align: middle; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.backdrop { position: fixed; inset: 0; z-index: 35; background: var(--backdrop); }

/* ---------- Glossar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search {
  flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  border-radius: var(--radius); border: 1px solid var(--field); background: var(--surface); color: var(--muted);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 15px; color: var(--ink); min-height: 42px; }
.select-label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.select-label select { min-height: 44px; padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--field); background: var(--surface); font-size: 14px; color: var(--ink); max-width: 240px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips:empty { display: none; }
.chip {
  flex: 0 0 auto; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--field); background: var(--surface);
  color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--dark-btn); border-color: var(--dark-btn); color: var(--dark-btn-ink); font-weight: 600; }

.table-box { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.gtable { width: 100%; min-width: 880px; border-collapse: collapse; font-size: 14px; }
.gtable th { text-align: left; color: var(--muted); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.gtable td { padding: 16px 20px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.gtable tr:last-child td { border-bottom: none; }
.gtable tr.new { background: var(--accent-soft); }
.g-word { display: flex; flex-direction: column; gap: 4px; }
.g-word-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-word-text { font-family: var(--font-book); font-size: 18px; font-weight: 600; }
.badge-new { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent); padding: 2px 7px; border-radius: 999px; }
.g-pos { font-size: 13px; color: var(--muted); }
.g-trans { font-size: 15px; font-weight: 600; }
.g-sentence { font-family: var(--font-book); font-style: italic; font-size: 15px; color: var(--text-2); max-width: 440px; }
.g-sentence b { font-style: normal; }
.g-chapter, .g-date { color: var(--muted); white-space: nowrap; }
.g-chapter a { color: var(--muted); }
.g-chapter a:hover { color: var(--accent); }
.g-actions { text-align: right; padding-top: 10px !important; padding-bottom: 10px !important; }
.g-actions .icon-btn { border-color: transparent; background: transparent; color: var(--muted); }
.g-actions .icon-btn:hover { color: #C0362C; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--field); border-radius: 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty b { color: var(--ink); font-size: 17px; }

/* ---------- Dialoge ---------- */
.dlg {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 20px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop);
}
.dlg-sm { width: min(400px, calc(100vw - 32px)); }
.dlg::backdrop { background: var(--backdrop); }
.dlg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.dlg-head h2 { font-family: var(--font-book); font-size: 22px; font-weight: 600; flex: 1; }
.toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc-list a { display: flex; gap: 12px; align-items: baseline; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--text); min-height: 44px; }
.toc-list a:hover { background: var(--chip); color: var(--ink); }
.toc-list a[aria-current="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.toc-num { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 1.5em; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper .icon-btn { font-weight: 600; font-size: 14px; }
.stepper span { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; background: var(--chip); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { min-height: 38px; padding: 0 12px; border: none; background: transparent; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-2); }
.seg button.serif { font-family: var(--font-book); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.flashcard {
  min-height: 240px; padding: 28px 20px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; margin-bottom: 16px;
}
.fc-word { font-family: var(--font-book); font-size: 32px; font-weight: 600; overflow-wrap: anywhere; }
.fc-back { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); width: 100%; }
.fc-trans { font-size: 24px; font-weight: 700; color: var(--accent); }
.fc-sentence { font-family: var(--font-book); font-style: italic; font-size: 15px; color: var(--text-2); }
.fc-sentence b { font-style: normal; }
.fc-actions { display: flex; gap: 8px; }
.fc-actions .btn { flex: 1; }
.fc-done { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; padding: 8px 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 12px; background: var(--dark-btn); color: var(--dark-btn-ink); font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-pop);
}

.tabbar { display: none; }

/* ---------- Mobile ---------- */
@media (max-width: 719px) {
  .mobile-only { display: inline-flex !important; }
  .desktop-only { display: none !important; }
  .topbar { padding: 6px 12px; min-height: 56px; }
  .progress { top: 56px; }
  .mainnav { display: none; }

  body.v-reader .topbar { padding: 0 6px; background: var(--bg); border-bottom: none; }
  body.v-reader .brand { display: none; }
  body.v-reader .back-btn { display: inline-flex; }
  body.v-reader .reader-title { display: flex; flex-direction: column; align-items: center; line-height: 1.25; min-width: 0; flex: 1; text-align: center; }
  #rt-chapter { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  #rt-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  body.v-reader .top-actions { gap: 0; }
  body.v-reader .top-actions .icon-btn { border-color: transparent; background: transparent; }

  .tabbar {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    padding: 6px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; color: var(--muted); font-size: 12px; font-weight: 500; text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--accent); font-weight: 700; }
  .tabbar a[aria-current="page"] .ic { fill: currentColor; }
  body.v-reader .tabbar, body.v-practice .tabbar { display: none; }
  body:not(.v-reader) main { padding-bottom: 84px; }

  .container { padding: 24px 20px 32px; gap: 24px; }
  .container-gl { padding-top: 20px; gap: 14px; }
  .page-head { align-items: center; }
  .page-title { font-size: 30px; }
  .page-sub { font-size: 14px; }
  .book-card { padding: 16px; gap: 16px; }
  .cover { flex-basis: 104px; height: 150px; padding: 14px 12px; }
  .cover-title { font-size: 14px; }
  .book-title { font-size: 20px; }
  .dropzone { min-height: 200px; }

  #view-reader { padding: 20px 22px 40px; }
  .eyebrow { font-size: 12px; }
  .chapter-title { font-size: 30px; }
  .chapter-meta { margin-bottom: 28px; }
  .book-text { line-height: 1.7; }
  .chapter-nav .btn span { display: none; }

  .toolbar .select-label { flex: 1 1 140px; }
  .toolbar .select-label select { flex: 1; }
  .table-box { background: transparent; border: none; border-radius: 0; overflow: visible; }
  .gtable { min-width: 0; display: block; }
  .gtable thead { display: none; }
  .gtable tbody { display: flex; flex-direction: column; gap: 10px; }
  .gtable tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 6px 14px 16px;
  }
  .gtable tr.new { border-color: var(--accent); background: var(--surface); }
  .gtable td { padding: 0; border: none; }
  .gtable .g-word-cell { grid-column: 1; grid-row: 1; }
  .gtable .g-actions { grid-column: 2; grid-row: 1 / span 2; padding: 0 !important; }
  .gtable .g-trans-cell { grid-column: 1; margin-top: 4px; }
  .gtable .g-sentence-cell { grid-column: 1 / -1; margin-top: 6px; padding-right: 10px; }
  .gtable .g-chapter, .gtable .g-date { grid-column: 1 / -1; font-size: 12px; margin-top: 6px; }
  .gtable .g-date { margin-top: 0; }
  .g-word { flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .g-word-text { font-size: 19px; }
  .g-trans { color: var(--accent); font-size: 16px; }
  .g-sentence { font-size: 14px; color: var(--muted); max-width: none; }

  /* Bottom-Sheet */
  .popover {
    position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-width: none;
    border-radius: 24px 24px 0 0; border: none; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); gap: 16px;
    max-height: 80dvh; overflow-y: auto; animation: sheet-in .22s ease-out;
  }
  .pop-arrow { display: none; }
  .sheet-handle { display: block; align-self: center; width: 40px; height: 5px; border-radius: 999px; background: var(--field); }
  .pop-word { font-size: 26px; }
  .pop-meta { font-size: 14px; }
  .pop-tools .icon-btn { background: var(--chip); border-color: transparent; border-radius: 12px; }
  .pop-trans { padding: 16px; border: none; border-radius: 14px; background: var(--accent-soft); }
  .pop-trans .label { color: var(--text-2); }
  .pop-translation { font-size: 26px; }
  .pop-def { color: var(--text-2); }
  .pop-sentence { font-size: 16px; }
  .pop-actions { flex-direction: column; }
  .pop-actions .btn { min-height: 52px; border-radius: 14px; font-size: 16px; }
  .pop-source { text-align: center; }

  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
  body.v-reader .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }
}


/* ---------- Unregelmäßige Verben ---------- */
.count-due { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.mainnav a[aria-current="page"] .count-due { background: var(--accent); color: var(--accent-ink); }
.tab-ic { position: relative; display: inline-flex; }
.tab-ic .dot-count { top: -6px; right: -10px; }

.v-top { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.v-progress { flex: 2 1 520px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.v-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.v-progress-head h2 { font-size: 17px; font-weight: 600; }
.level-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; }
.level-bar > span { min-width: 4px; }
.level-legend { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.level-legend > div { display: flex; flex-direction: column; gap: 4px; }
.level-legend .lg-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.level-legend .lg-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.level-legend b { font-size: 22px; font-weight: 700; }
.level-legend .lg-int { font-size: 12px; color: var(--muted); }
.v-explain { margin: 0; font-size: 13px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line-2); }
.lv-0 { background: var(--line); }
.lv-1 { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.lv-2 { background: color-mix(in srgb, var(--accent) 50%, transparent); }
.lv-3 { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.lv-4 { background: color-mix(in srgb, var(--accent) 88%, transparent); }
.lv-5 { background: var(--ok); }

.v-start {
  flex: 1 1 300px; min-width: 0; border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 16px;
  background: #16181D; color: #FFFFFF;
}
:root[data-theme="dark"] .v-start { background: #262A31; border: 1px solid var(--line); }
.v-start-label { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #B9BDC6; }
.v-start-num { display: flex; align-items: baseline; gap: 10px; }
.v-start-num b { font-size: 56px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.v-start-num span, .v-start-detail { font-size: 14px; color: #D7D9DD; }
.seg-dark { background: #2A2E35; display: flex; }
:root[data-theme="dark"] .seg-dark { background: #1A1D22; }
.seg-dark button { flex: 1; color: #D7D9DD; }
.seg-dark button[aria-pressed="true"] { background: #FFFFFF; color: #16181D; }
.v-start-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: #D7D9DD; }
.v-start-row select { min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid #3A3F48; background: #2A2E35; color: #FFFFFF; font-size: 14px; }
.check-dark { color: #D7D9DD; }
.v-start-btn { margin-top: auto; width: 100%; }

.toggle-box {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--field); background: var(--surface); font-size: 14px; color: var(--text); cursor: pointer;
}
.toggle-box input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.chips-wrap { flex-wrap: wrap; overflow: visible; }
.chip .chip-code { font-weight: 700; }
.chip .chip-ex { opacity: .8; margin-left: 6px; }
.chip .chip-n { font-size: 12px; opacity: .7; margin-left: 6px; }

.vtable .v-form { font-family: var(--font-book); font-size: 17px; }
.vtable .v-inf { font-weight: 600; }
.vtable .v-de { color: var(--text-2); }
.pattern-pill { font-size: 12px; font-weight: 600; background: var(--chip); color: var(--text-2); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.v-count { color: var(--muted); white-space: nowrap; }
.v-stand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.dots { display: flex; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line); }
.dots i.on { background: var(--accent); }
.dots.known i.on { background: var(--ok); }
.v-stand-label { font-size: 13px; color: var(--text); }
.v-stand-label.new { color: var(--muted); }
.v-stand-label.known { color: var(--ok); font-weight: 600; }
.v-stand-label.due::after { content: ' · fällig'; color: var(--accent); font-weight: 600; }

/* Formen-Kacheln (Popover und Auflösung) */
.forms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.form-tile { padding: 10px 6px; border-radius: 12px; background: var(--bg); text-align: center; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.form-tile b { font-family: var(--font-book); font-size: 19px; font-weight: 600; overflow-wrap: anywhere; }
.form-tile span { font-size: 11px; color: var(--muted); }
.form-tile.hl { background: var(--accent); color: var(--accent-ink); }
.form-tile.hl span { color: var(--accent-ink); opacity: .85; }
.form-tile.wrong { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.form-tile.wrong b { color: var(--accent); }
.forms-lg .form-tile { padding: 12px; }
.forms-lg .form-tile b { font-size: 22px; }
.forms-lg .form-tile span { order: -1; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

.pop-verb { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.pop-verb-head, .pop-verb-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.link-btn { border: none; background: none; padding: 8px 0; min-height: 36px; color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* Abfrage */
body.v-practice .topbar, body.v-practice .progress { display: none !important; }
.btn-ghost { background: transparent; color: var(--text-2); font-weight: 500; font-size: 14px; padding: 0 12px; }
.btn-ghost:hover { background: var(--chip); color: var(--ink); }
.q-head {
  position: sticky; top: 0; z-index: 20; min-height: 64px; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.q-progress { flex: 1; max-width: 480px; display: flex; flex-direction: column; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--text-2); }
.q-progress .bar { width: 100%; }
.q-progress .bar > div { width: 0; transition: width .25s; }
.q-score { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); min-width: 120px; justify-content: flex-end; }
.q-score b { color: var(--text); }
.ok-ic { color: var(--ok); stroke-width: 2.25; }
.q-wrap, .q-result { width: 100%; max-width: 680px; margin: 0 auto; padding: 48px 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 28px; }
.q-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pill { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--chip); padding: 4px 10px; border-radius: 999px; }
.q-prompt { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.q-de { font-size: 15px; color: var(--muted); }
.q-inf-row { display: flex; align-items: center; gap: 12px; }
.q-inf { font-family: var(--font-book); font-size: 56px; line-height: 1.1; font-weight: 600; letter-spacing: -0.01em; }
.q-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.q-field-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.q-field-wrap label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.q-field { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--field); background: var(--surface); }
.q-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.q-field input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-family: var(--font-book); font-size: 22px; color: var(--ink); min-height: 52px; }
.q-state-ic { display: none; width: 22px; height: 22px; stroke-width: 2.5; }
.q-field.ok { border: 2px solid var(--ok); background: var(--ok-bg); box-shadow: none; }
.q-field.ok .q-state-ic { display: block; color: var(--ok); }
.q-field.bad { border: 2px solid var(--bad); background: var(--bad-bg); box-shadow: none; }
.q-field.bad input { color: var(--bad-ink); text-decoration: line-through; }
.q-field.bad .q-state-ic { display: block; color: var(--bad); }
.q-msg { font-size: 13px; min-height: 1.3em; }
.q-msg.ok { color: var(--ok); font-weight: 600; }
.q-msg.bad { color: var(--bad-ink); }
.q-msg b { font-family: var(--font-book); font-size: 16px; }
.q-solution { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.q-tip { display: flex; gap: 12px; align-items: flex-start; }
.q-tip-ic { flex: 0 0 32px; height: 32px; border-radius: 999px; background: var(--tip-bg); color: var(--tip-ink); display: flex; align-items: center; justify-content: center; }
.q-tip > div { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--text-2); }
.q-tip b { font-size: 15px; color: var(--ink); }
.q-example { font-family: var(--font-book); font-style: italic; color: var(--muted); }
.q-example b { font-style: normal; font-size: inherit; color: var(--text); }
.q-actions { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.q-note { font-size: 13px; color: var(--muted); }
.q-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
kbd { font-family: inherit; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.2); }

.q-result-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.q-result-head h1 { font-family: var(--font-book); font-size: 30px; font-weight: 600; }
.q-result-head p { margin: 0; font-size: 15px; max-width: 420px; }
.ring { --p: 0deg; width: 132px; height: 132px; border-radius: 999px; background: conic-gradient(var(--accent) 0 var(--p), var(--line) var(--p) 360deg); display: flex; align-items: center; justify-content: center; }
.ring > div { width: 108px; height: 108px; border-radius: 999px; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring b { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.ring b small { font-size: 17px; color: var(--muted); font-weight: 600; }
.ring span { font-size: 12px; color: var(--muted); margin-top: 4px; }
.q-mistakes { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.q-mistakes-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.q-mistakes-head h2 { font-size: 15px; font-weight: 600; }
.mistake { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.mistake-forms { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-family: var(--font-book); font-size: 19px; }
.mistake-forms i { font-style: normal; color: var(--faint); }
.mistake-meta { font-size: 13px; color: var(--muted); }
.mistake-meta s { color: var(--bad-ink); }
.q-next-due { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: 14px; color: var(--text-2); }
.q-next-due b { color: var(--ink); }
.q-result-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.q-result-actions .btn { flex: 1 1 200px; }

@media (max-width: 719px) {
  .v-progress { padding: 18px; }
  .level-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v-start-num b { font-size: 44px; }
  .toggle-box { flex: 1 1 100%; }
  .vtable tr { grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 0; padding: 14px 16px; }
  .vtable td.v-c1 { grid-column: 1; grid-row: 1; }
  .vtable td.v-c2 { grid-column: 2; grid-row: 1; }
  .vtable td.v-c3 { grid-column: 3; grid-row: 1; }
  .vtable td.v-c2::before, .vtable td.v-c3::before { content: '·'; color: var(--faint); margin: 0 7px; }
  .vtable td.v-de { grid-column: 1 / 4; grid-row: 2; margin-top: 4px; font-size: 14px; }
  .vtable td.v-pattern-cell { grid-column: 4; grid-row: 1; justify-self: end; }
  .vtable td.v-count { grid-column: 1 / 4; grid-row: 3; margin-top: 8px; font-size: 13px; }
  .vtable td.v-count:empty { display: none; }
  .vtable td.v-stand-cell { grid-column: 4; grid-row: 2 / 4; align-self: end; justify-self: end; }

  .q-head { padding: 8px 12px; min-height: 56px; gap: 8px; }
  .q-score { min-width: 0; padding-right: 8px; }
  .q-wrap { padding: 16px 20px 24px; gap: 16px; min-height: calc(100dvh - 56px); }
  .q-card { padding: 20px; gap: 22px; border-radius: 20px; }
  .q-inf { font-size: 44px; }
  .q-fields { grid-template-columns: minmax(0, 1fr); }
  .q-solution { padding: 18px; }
  .q-actions { margin-top: auto; flex-direction: column-reverse; align-items: stretch; gap: 10px; position: sticky; bottom: 0; padding: 12px 0 calc(8px + env(safe-area-inset-bottom)); background: var(--bg); }
  .q-buttons { margin-left: 0; flex-direction: column-reverse; }
  .q-buttons .btn { width: 100%; min-height: 54px; }
  .q-note { text-align: center; }
  .q-result { padding: 28px 20px 32px; gap: 18px; }
  .q-result-actions { flex-direction: column; }
  .q-result-actions .btn { flex: none; width: 100%; }
}

@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
