@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* -- Design tokens ------------------------------------------------ */
:root {
  --bg:           #f8fafc;
  --panel:        #ffffff;
  --ink:          #0f172a;
  --ink-2:        #334155;
  --muted:        #64748b;
  --muted-2:      #94a3b8;
  --line:         #e2e8f0;
  --line-light:   #f1f5f9;

  --primary:      #6366f1;
  --primary-dark: #4f46e5;
  --primary-bg:   #eef2ff;
  --primary-text: #4f46e5;

  --good:         #10b981;
  --good-dark:    #059669;
  --bad:          #f43f5e;
  --bad-dark:     #e11d48;
  --warn:         #f59e0b;

  /* level colours */
  --A1: #22c55e;
  --A2: #06b6d4;
  --B1: #f43f5e;
  --B2: #f97316;
  --C1: #8b5cf6;
  --C2: #ec4899;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,.09);
  --radius:     12px;
  --radius-sm:  8px;
  --sidebar-w:  240px;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}

/* -- Reset & base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .5em;
}
h1 { font-size: 1.9rem; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 700; border-bottom: 1px solid var(--line); padding-bottom: .35em; margin-top: 1.6em; }
h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.2em; }
h4 { font-size: .95rem; font-weight: 600; margin-top: .8em; }

code, kbd {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--line-light);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--primary);
}

hr { border: 0; border-top: 1px solid var(--line); margin: 1.5em 0; }

/* -- Layout -------------------------------------------------------- */

/* Hide the legacy checkbox — not used in the new sidebar */
#mobile-menu-toggle { display: none; }

#app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* Explicitly pin sidebar + main so nothing else can displace them */
nav#sidebar       { grid-column: 1; grid-row: 1; }
main#main-content { grid-column: 2; grid-row: 1; }

/* Stray grid children (btn, overlay) collapse to zero height — they are
   positioned fixed/absolute on mobile so they don't affect flow */
#app > .mobile-menu-btn,
#app > .nav-overlay {
  grid-column: 1 / -1;
  grid-row: 1;
  height: 0;
  overflow: visible;
  align-self: start;
}

main#main-content {
  padding: 32px 40px 80px;
  max-width: 960px;
  width: 100%;
}

/* -- Sidebar ------------------------------------------------------- */
nav#sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  width: var(--sidebar-w);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  font-size: .875rem;
  z-index: 100;
}

/* scrollbar */
nav#sidebar::-webkit-scrollbar { width: 4px; }
nav#sidebar::-webkit-scrollbar-track { background: transparent; }
nav#sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* brand bar */
.sb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px 14px;
  border-bottom: 1px solid var(--line-light);
}
.sb-logo {
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: .75rem;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: .02em;
}
.sb-title {
  font-weight: 700;
  font-size: .875rem;
  color: var(--ink);
  line-height: 1.2;
}
.sb-sub {
  font-size: .65rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 1px;
}
.sb-close-btn { display: none; }

/* top nav section */
.sb-section {
  padding: 8px 8px 4px;
  border-bottom: 1px solid var(--line-light);
}

nav#sidebar a.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-weight: 500;
  margin-bottom: 1px;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-size: .875rem;
  text-decoration: none;
}
nav#sidebar a.nav-item:hover {
  background: var(--line-light);
  text-decoration: none;
}
nav#sidebar a.nav-item.active {
  background: var(--primary-bg);
  color: var(--primary-text);
  font-weight: 600;
}

.nav-icon {
  font-size: .95rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: .7;
}
nav#sidebar a.nav-item.active .nav-icon { opacity: 1; }

/* level accordion rows */
.sb-levels {
  padding: 8px 8px;
  flex: 1;
}

.sb-level-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 1px;
  transition: background .15s;
  user-select: none;
}
.sb-level-row:hover { background: var(--line-light); }
.sb-level-row.open { background: var(--line-light); }

.sb-pill {
  color: #fff;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  min-width: 26px;
  text-align: center;
  flex-shrink: 0;
}
.sb-pill.A1 { background: var(--A1); }
.sb-pill.A2 { background: var(--A2); }
.sb-pill.B1 { background: var(--B1); }
.sb-pill.B2 { background: var(--B2); }
.sb-pill.C1 { background: var(--C1); }
.sb-pill.C2 { background: var(--C2); }

.sb-level-name {
  font-size: .83rem;
  color: var(--ink-2);
  font-weight: 500;
  flex: 1;
}
.sb-chevron {
  color: var(--muted-2);
  font-size: .8rem;
  transition: transform .2s;
}
.sb-level-row.open .sb-chevron { transform: rotate(90deg); }

/* accordion sub-links */
.sb-sub-links {
  overflow: hidden;
  max-height: 0;
  transition: max-height .22s ease;
  padding-left: 12px;
}
.sb-sub-links.open { max-height: 500px; }

.sb-sub-links a.nav-item {
  font-size: .82rem;
  padding: 5px 10px;
  color: var(--muted);
  font-weight: 400;
}
.sb-sub-links a.nav-item:hover { color: var(--ink-2); }
.sb-sub-links a.nav-item.active {
  color: var(--primary-text);
  background: var(--primary-bg);
  font-weight: 600;
}

/* -- Cards --------------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  margin: 16px 0;
}

/* level-coloured top border on overview cards */
.card.lvl-A1 { border-top: 3px solid var(--A1); }
.card.lvl-A2 { border-top: 3px solid var(--A2); }
.card.lvl-B1 { border-top: 3px solid var(--B1); }
.card.lvl-B2 { border-top: 3px solid var(--B2); }
.card.lvl-C1 { border-top: 3px solid var(--C1); }
.card.lvl-C2 { border-top: 3px solid var(--C2); }

/* -- Tags / level pills -------------------------------------------- */
.tag {
  display: inline-block;
  color: #fff;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.tag.A1 { background: var(--A1); }
.tag.A2 { background: var(--A2); }
.tag.B1 { background: var(--B1); }
.tag.B2 { background: var(--B2); }
.tag.C1 { background: var(--C1); }
.tag.C2 { background: var(--C2); }
.tag.muted { background: var(--line); color: var(--muted); }
.tag.good  { background: var(--good); }
.tag.gold  { background: var(--warn); }

/* -- Buttons ------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  text-decoration: none;
}
.btn:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn.secondary {
  background: var(--panel);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.btn.secondary:hover { background: var(--line-light); color: var(--ink-2); }
.btn.good    { background: var(--good); }
.btn.good:hover { background: var(--good-dark); }
.btn.danger  { background: #fff; color: var(--bad); border: 1px solid var(--bad); }
.btn.danger:hover { background: #fff1f2; }
.btn.small   { padding: 5px 12px; font-size: .8rem; }
.btn.primary { background: var(--primary); }

/* -- Callouts ------------------------------------------------------ */
.callout {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fffbeb;
  margin: 12px 0;
  font-size: .875rem;
}
.callout strong { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; color: var(--ink); }
.callout.tip  { background: #f0fdf4; border-color: #86efac; }
.callout.info { background: #eff6ff; border-color: #93c5fd; }
.callout.warn { background: #fff7ed; border-color: #fdba74; }
.callout.error { background: #fff1f2; border-color: #fca5a5; }

/* -- Bilingual box ------------------------------------------------- */
.bilingual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}
.bilingual > div {
  padding: 14px 18px;
  background: var(--line-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: .9rem;
}
.bilingual > div:first-child { background: #eff6ff; border-color: #bfdbfe; }
.bilingual h4 {
  margin: 0 0 6px;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
}

/* -- Tables -------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 14px 0;
  font-size: .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
th, td { padding: 9px 13px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--line-light); font-weight: 600; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: none; }
tr.irregular td { background: #fffbeb; }
tr.highlight td { background: #f0fdf4; }
table.compact td, table.compact th { padding: 5px 9px; font-size: .85rem; }

/* -- Grids --------------------------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* -- Flashcard ----------------------------------------------------- */
.flashcard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow .15s;
}
.flashcard:hover { box-shadow: var(--shadow-md); }
.flashcard .word { font-size: 2.2rem; font-weight: 700; color: var(--primary); }
.flashcard .meaning { font-size: 1.2rem; color: var(--muted); font-weight: 500; margin-top: 8px; }
.flashcard .meta { font-size: .72rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }

/* -- Quiz ---------------------------------------------------------- */
.quiz-q { margin: 12px 0; padding: 14px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.quiz-q .prompt { font-weight: 600; margin-bottom: 8px; font-size: 1.05rem; color: var(--ink); }
.quiz-q input[type=text] {
  font-family: var(--sans); font-size: 1rem; font-weight: 500;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  width: 280px; outline: none; transition: border-color .2s; background: var(--panel);
}
.quiz-q input[type=text]:focus { border-color: var(--primary); }
.quiz-q input.correct { border-color: var(--good); background: #f0fdf4; color: var(--good-dark); }
.quiz-q input.wrong   { border-color: var(--bad);  background: #fff1f2; color: var(--bad-dark); }
.quiz-q .feedback { font-size: .9rem; margin-top: 6px; margin-left: 10px; display: inline-block; font-weight: 600; }
.quiz-q .feedback.correct { color: var(--good); }
.quiz-q .feedback.wrong   { color: var(--bad); }
.quiz-q input.needs-answer { border-color: var(--warn); background: #fffbeb; }

.quiz-summary, .lesson-progress-panel, .mock-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--line-light); margin: 12px 0; flex-wrap: wrap;
}
.lesson-progress-panel > div { min-width: 200px; flex: 1; }

/* -- Lesson accordion ---------------------------------------------- */
.lesson-card { padding: 0; overflow: hidden; }
.lesson-card > summary {
  list-style: none; cursor: pointer; padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  font-weight: 600; color: var(--ink);
}
.lesson-card > summary::-webkit-details-marker { display: none; }
.lesson-card > summary::before { content: '\25B8'; color: var(--primary); font-size: 1rem; }
.lesson-card[open] > summary::before { content: '\25BE'; }
.lesson-body { padding: 0 20px 20px; }

/* -- Lesson nav dots ----------------------------------------------- */
.lesson-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.lesson-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--muted); font-weight: 700; font-size: 1rem;
  cursor: pointer; transition: all .15s;
}
.lesson-nav a:hover { border-color: var(--primary); color: var(--primary); }
.lesson-nav a.done { background: var(--warn); border-color: #d97706; color: #fff; }

/* -- Progress bar -------------------------------------------------- */
.progress { height: 10px; background: var(--line-light); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.progress > div { height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s ease-out; }
.progress.green > div { background: var(--good); }

/* -- Details / collapsible ----------------------------------------- */
details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; margin: 8px 0; background: var(--panel); }
details > summary { cursor: pointer; font-weight: 600; font-size: 1rem; outline: none; color: var(--ink); }
details[open] { border-color: var(--primary); }

/* -- Vocab search -------------------------------------------------- */
.vocab-search { padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; min-width: 200px; background: var(--panel); }
.vocab-count { color: var(--muted); font-weight: 600; }

/* -- Flashcard back ------------------------------------------------ */
.fc-back { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; background: var(--line-light); text-align: center; }
.fc-answer { font-size: 1.25rem; font-weight: 700; color: var(--good); margin-bottom: 8px; }

/* -- Mock exam ----------------------------------------------------- */
.mock-timer { font-weight: 800; color: var(--primary-dark); }
.mock-answer-key { border-color: var(--warn); background: #fffbeb; }
.answer-line { display: inline-block; border-bottom: 1px solid #000; min-width: 120px; height: 18pt; vertical-align: bottom; }
.answer-box { border: 1px solid #000; min-height: 60pt; padding: 6pt; margin: 4pt 0; }

/* -- Theme toggle -------------------------------------------------- */
.theme-toggle {
  position: fixed; top: 12px; right: 14px; z-index: 300;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; box-shadow: var(--shadow-sm);
  transition: background .15s;
}
.theme-toggle:hover { background: var(--line-light); }

/* -- Mobile header bar --------------------------------------------- */
/* Hidden on desktop; becomes a full-width sticky bar on mobile */
.mobile-menu-btn {
  display: none;
}
.nav-overlay { display: none; }

/* -- Utility ------------------------------------------------------- */
.row { display: flex; gap: .5em; align-items: baseline; flex-wrap: wrap; }
.daily-queue { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.skip-link { position: absolute; top: -40px; left: 0; background: var(--primary); color: #fff; padding: 6px 12px; z-index: 999; }
.skip-link:focus { top: 0; }
.section { display: none; }
.section.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.print-only { display: none; }
.worksheet-header { display: none; }

/* -- Dark mode ----------------------------------------------------- */
[data-theme="dark"] {
  --bg:           #0f172a;
  --panel:        #1e293b;
  --ink:          #f1f5f9;
  --ink-2:        #cbd5e1;
  --muted:        #94a3b8;
  --muted-2:      #64748b;
  --line:         #334155;
  --line-light:   #1e293b;
  --primary-bg:   #1e1b4b;
  --primary-text: #818cf8;
}

/* -- Print --------------------------------------------------------- */
@page { size: A4; margin: 18mm 16mm; }
@media print {
  body { background: #fff; font-size: 11.5pt; color: #000; font-family: 'Times New Roman', serif; }
  nav#sidebar, .no-print, .btn { display: none !important; }
  #app { display: block; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; page-break-inside: avoid; margin: 10px 0; }
  .bilingual > div { background: #fff; border: 1px solid #ccc; }
  table { border: 1px solid #000; }
  th, td { border-bottom: 1px solid #000; }
  th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  h1 { font-size: 18pt; } h2 { font-size: 14pt; page-break-after: avoid; } h3 { font-size: 12pt; page-break-after: avoid; }
  .page-break { page-break-before: always; }
  .print-only { display: block !important; }
  .worksheet-header { border-bottom: 2px solid #000; padding-bottom: 6pt; margin-bottom: 12pt; display: flex !important; justify-content: space-between; font-size: 10pt; }
  .worksheet-header strong { font-size: 14pt; }
  details { break-inside: avoid; border: 1px solid #000; }
  details > summary { font-weight: bold; }
  details > *:not(summary) { display: block !important; }
}

/* -- Mobile -------------------------------------------------------- */
@media (max-width: 768px) {
  /* Single column layout */
  #app { grid-template-columns: 1fr; }
  nav#sidebar       { grid-column: 1; grid-row: 1; }
  main#main-content { grid-column: 1; grid-row: 1; padding: 72px 18px 60px; max-width: 100%; }

  /* Sidebar: off-screen left, slides in when .open */
  /* Sidebar: off-screen left, slides in when .open */
  nav#sidebar {
    position: fixed; top: 0; left: -280px; width: 280px;
    height: 100vh; z-index: 250;
    transition: left .25s ease;
    box-shadow: none;
  }
  nav#sidebar.open { left: 0; box-shadow: var(--shadow-md); }
  
  .sb-close-btn { display: none !important; }

  /* Floating mobile header bar */
  .mobile-menu-btn {
    display: flex;
    position: fixed; 
    top: calc(16px + env(safe-area-inset-top, 0px)); 
    left: 16px; 
    right: 16px; 
    z-index: 300;
    height: 60px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 0 20px;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    box-shadow: var(--shadow-lg);
    width: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .mobile-menu-btn::after {
    content: 'Deutsch Trainer';
    font-size: 1rem;
    font-weight: 800;
    color: var(--ink);
    flex: 1;
    text-align: left;
    margin-left: 4px;
  }

  /* Theme toggle sits inside the floating bar */
  .theme-toggle {
    top: 22px; right: 24px; z-index: 310;
    box-shadow: none;
    border: none;
    background: transparent;
  }

  /* Dim overlay behind sidebar */
  .nav-overlay {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 240;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
  }
  .nav-overlay.visible { opacity: 1; pointer-events: all; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
/* -- Grammar Hub -------------------------------------------------- */

/* Golden Rules */
.golden-rules-section { margin-bottom: 40px; }
.gr-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }
.gr-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.gr-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gr-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gr-num { font-size: 1.5rem; font-weight: 800; color: var(--gr-color); opacity: 0.5; line-height: 1; }
.gr-title { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.gr-short { font-size: 0.8rem; color: var(--ink-2); line-height: 1.4; flex: 1; }
.gr-ex { font-size: 0.85rem; font-weight: 600; color: var(--primary); background: var(--primary-bg); padding: 4px 8px; border-radius: 6px; align-self: flex-start; }

/* Memory Tips */
.tips-section { margin-top: 48px; }
.tips-cat-block { margin-bottom: 32px; }
.tips-cat-label { 
  display: inline-block; padding: 4px 12px; border-radius: 20px; 
  background: var(--tc); color: #fff; font-size: 0.72rem; font-weight: 700; 
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; 
}
.tips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tip-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.tip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tip-top { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.tip-emoji { font-size: 2rem; }
.tip-meta { display: flex; flex-direction: column; gap: 2px; }
.tip-cat-badge { font-size: 0.65rem; font-weight: 700; color: var(--tc); text-transform: uppercase; }
.tip-title { font-size: 1.15rem; font-weight: 700; color: var(--ink); }

.tip-hook, .tip-rule { margin-bottom: 16px; }
.tip-hook-label, .tip-rule-label, .tip-ex-label { 
  display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; 
  letter-spacing: 0.05em; color: var(--muted); margin-bottom: 4px; 
}
.tip-hook-text { font-size: 0.9rem; color: var(--ink-2); font-style: italic; background: var(--line-light); padding: 10px; border-radius: 8px; border-left: 3px solid var(--tc); }
.tip-rule-text { font-size: 0.95rem; font-weight: 500; color: var(--ink); }

.tip-ex-list { display: flex; flex-direction: column; gap: 8px; }
.tip-ex-item { padding: 8px 12px; background: var(--bg); border-radius: 8px; border: 1px solid var(--line); }
.tip-ex-de { font-weight: 700; color: var(--ink); font-size: 0.9rem; }
.tip-ex-en { font-size: 0.85rem; color: var(--muted); }
.tip-ex-note { font-size: 0.75rem; color: var(--primary); font-weight: 500; margin-top: 2px; }

/* Modal Verb Bank */
.mv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; margin-top: 20px; }
.mv-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.mv-header {
  padding: 16px 20px;
  background: var(--line-light);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mv-level-badge {
  padding: 2px 6px; border-radius: 4px; font-size: 0.65rem; font-weight: 700;
  background: var(--ink); color: #fff;
}
.mv-verb { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.mv-en { font-size: 0.95rem; color: var(--muted); flex: 1; }
.mv-use { width: 100%; font-size: 0.8rem; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.mv-use-lbl { font-weight: 700; color: var(--primary); text-transform: uppercase; font-size: 0.65rem; }

.mv-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.mv-conj { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mv-conj-cell { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line-light); }
.mv-pronoun { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.mv-form { font-size: 0.9rem; font-weight: 700; color: var(--ink); }

.mv-past { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--bg); border-radius: 8px; }
.mv-past-lbl { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.mv-past-val { font-weight: 600; color: var(--ink); font-size: 0.9rem; margin-bottom: 4px; }

.mv-ex-lbl { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.mv-examples { margin: 0; padding-left: 18px; font-size: 0.85rem; color: var(--ink-2); }
.mv-examples li { margin-bottom: 4px; }

@media (max-width: 1024px) {
  .gr-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .gr-strip { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .mv-grid { grid-template-columns: 1fr; }
}
