/* ============================================================
   Lernen — German B1 study app
   Theme: warm "paper" textbook, calm green accent, dark mode,
   RTL-ready, print-friendly.
   ============================================================ */


:root {
  /* paper / light */
  --bg:        #f4efe6;
  --bg-grain:  #efe8db;
  --surface:   #fbf8f2;
  --surface-2: #f3ecdf;
  --ink:       #2c2723;
  --ink-soft:  #5c5347;
  --ink-faint: #8c8273;
  --line:      #e2d8c6;
  --line-soft: #ece3d3;

  --accent:      #2f7d5b;   /* "Glück" green */
  --accent-deep: #245f46;
  --accent-soft: #e3efe7;
  --accent-ink:  #1d4d39;

  --gold:      #b6852b;     /* der */
  --rose:      #b14f63;     /* die */
  --blue:      #3f6ea3;     /* das */
  --gold-bg:   #f6ecd6;
  --rose-bg:   #f6e3e6;
  --blue-bg:   #e3ebf4;

  --ok:        #2f7d5b;
  --ok-bg:     #e3efe7;
  --bad:       #b14438;
  --bad-bg:    #f6e2de;

  --radius:   14px;
  --radius-s: 9px;
  --shadow:   0 1px 2px rgba(44,39,35,.05), 0 8px 24px -12px rgba(44,39,35,.18);
  --shadow-lift: 0 2px 6px rgba(44,39,35,.08), 0 18px 40px -16px rgba(44,39,35,.28);

  --serif: 'Newsreader', Georgia, serif;
  --sans:  'Atkinson Hyperlegible', system-ui, sans-serif;

  --maxw: 920px;
  --header-h: 60px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg:        #14110d;
  --bg-grain:  #181410;
  --surface:   #201b15;
  --surface-2: #2a241c;
  --ink:       #ece4d6;
  --ink-soft:  #c2b8a6;
  --ink-faint: #8c8273;
  --line:      #352d23;
  --line-soft: #2a241c;

  --accent:      #5cc394;
  --accent-deep: #7ad3a9;
  --accent-soft: #1c2f26;
  --accent-ink:  #aee6c9;

  --gold:      #d6a24e;
  --rose:      #d98397;
  --blue:      #7ea6d6;
  --gold-bg:   #2a2316;
  --rose-bg:   #2c1c20;
  --blue-bg:   #182230;

  --ok:        #5cc394;
  --ok-bg:     #1c2f26;
  --bad:       #e08a7e;
  --bad-bg:    #2e1c19;

  --shadow:   0 1px 2px rgba(0,0,0,.3), 0 10px 30px -14px rgba(0,0,0,.6);
  --shadow-lift: 0 2px 8px rgba(0,0,0,.4), 0 22px 48px -18px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(0,0,0,.012) 0, transparent 60%),
    radial-gradient(circle at 82% 78%, rgba(0,0,0,.012) 0, transparent 60%);
  color: var(--ink);
  color-scheme: light;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* нативные поля наследуют цвет темы (защита от black-on-black, F1 audit) */
input, select, textarea { color: inherit; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); opacity: 1; }

[dir="rtl"] body { font-family: 'Atkinson Hyperlegible', 'Segoe UI', Tahoma, sans-serif; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }

a { color: var(--accent-deep); }

::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.appbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.appbar__row {
  max-width: var(--maxw); margin: 0 auto; padding: 9px 20px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.brand__mark {
  font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--ink);
  letter-spacing: -.02em; white-space: nowrap;
}
.brand__mark b { color: var(--accent-deep); font-weight: 600; }
.brand__sub {
  font-size: 11.5px; color: var(--ink-faint); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 640px) { .brand__sub { display: none; } }

.appbar__spacer { flex: 1; }

.langpick { display: flex; align-items: center; gap: 2px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.langpick button {
  border: 0; background: transparent; color: var(--ink-soft);
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; cursor: pointer; line-height: 1;
  transition: background .15s, color .15s;
}
.langpick button:hover { color: var(--ink); }
.langpick button[aria-pressed="true"] { background: var(--accent); color: #fff; }
[data-theme="dark"] .langpick button[aria-pressed="true"] { color: #11201a; }

.iconbtn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft);
  border-radius: 10px; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.iconbtn:hover { color: var(--ink); border-color: var(--ink-faint); }
.iconbtn svg { width: 18px; height: 18px; }

/* ---------- Tabs ---------- */
.tabs {
  position: sticky; top: var(--header-h); z-index: 30;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tabs__row {
  max-width: var(--maxw); margin: 0 auto; padding: 0 12px;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.tabs__row::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; border: 0; background: transparent; cursor: pointer;
  font-family: var(--sans); font-size: 13.5px; font-weight: 700; color: var(--ink-faint);
  padding: 12px 13px 11px; border-bottom: 2.5px solid transparent;
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--ink-soft); }
.tab[aria-selected="true"] { color: var(--accent-deep); border-bottom-color: var(--accent); }
.tab svg { width: 16px; height: 16px; opacity: .9; }
.tab__badge {
  font-size: 10.5px; font-weight: 800; background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 999px; padding: 1px 7px; line-height: 1.5;
}

/* ---------- Sections / panels ---------- */
main { padding: 26px 0 80px; }
.panel { display: none; animation: fade .25s ease; }
.panel.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.sec-head { margin-bottom: 18px; }
.sec-head h1 { font-size: 30px; }
.sec-head p { margin: 5px 0 0; color: var(--ink-soft); font-size: 14.5px; }
.eyebrow {
  font-family: var(--sans); font-size: 11.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-deep); margin-bottom: 8px;
}

/* ---------- Card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }

/* ---------- Today ---------- */
.today-hero {
  background: linear-gradient(150deg, var(--accent-soft), var(--surface) 70%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.today-hero .lk { font-size: 12.5px; font-weight: 800; color: var(--accent-deep); letter-spacing: .04em; }
.today-hero h2 { font-size: 27px; margin: 4px 0 0; }
.today-hero .tr { color: var(--ink-soft); font-style: italic; font-family: var(--serif); font-size: 17px; margin-top: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.chip {
  font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft);
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.chip--on { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-theme="dark"] .chip--on { color: #11201a; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 680px) { .grid2 { grid-template-columns: 1fr; } }

.minicard { padding: 16px 18px; }
.minicard h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.minicard h3 svg { width: 17px; height: 17px; color: var(--accent); }
.minicard p { margin: 7px 0 0; font-size: 14px; color: var(--ink-soft); }
.minicard .go {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 12px;
  font-size: 13px; font-weight: 800; color: var(--accent-deep); cursor: pointer;
  background: none; border: 0; padding: 0; font-family: var(--sans);
}
.minicard .go svg { width: 14px; height: 14px; }
[dir="rtl"] .minicard .go svg { transform: scaleX(-1); }

/* ---------- Toolbar (search + filters) ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.search {
  flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 11px;
}
.search svg { width: 16px; height: 16px; color: var(--ink-faint); flex: 0 0 auto; }
.search input {
  flex: 1; border: 0; background: transparent; color: var(--ink); font-family: var(--sans);
  font-size: 14.5px; padding: 10px 0; outline: none;
}
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  font-family: var(--sans); font-size: 12.5px; font-weight: 700; padding: 7px 12px;
  border-radius: 999px; cursor: pointer; transition: all .15s;
}
.filter:hover { border-color: var(--ink-faint); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.count { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 10px; font-weight: 700; }

/* ---------- Word / verb table ---------- */
.tbl { width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tbl thead th {
  text-align: start; font-family: var(--sans); font-size: 11px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint);
  padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  position: sticky; top: calc(var(--header-h) + 44px); z-index: 5;
}
.tbl tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: 14.5px; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }

.w-head { font-weight: 700; font-size: 15.5px; }
.w-art { font-weight: 800; }
.w-art--der { color: var(--gold); }
.w-art--die { color: var(--rose); }
.w-art--das { color: var(--blue); }
.w-plural { color: var(--ink-faint); font-size: 13px; }
.w-tr { color: var(--ink-soft); }
.w-bsp { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 14px; margin-top: 3px; }
.w-bsp-tr { color: var(--ink-faint); font-size: 12.5px; margin-top: 1px; }

.badge {
  display: inline-block; font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line);
}
.badge--noun  { background: var(--blue-bg); color: var(--blue); border-color: transparent; }
.badge--adj   { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.badge--adv   { background: var(--gold-bg); color: var(--gold); border-color: transparent; }
.badge--phrase{ background: var(--rose-bg); color: var(--rose); border-color: transparent; }

.vtype { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.vtype--aux { color: var(--rose); }
.vtype--modal { color: var(--gold); }
.vtype--strong { color: var(--blue); }
.vtype--mixed { color: var(--accent-deep); }
.vtype--regular { color: var(--ink-faint); }

.mono { font-variant-numeric: tabular-nums; }
.strong-form { font-weight: 700; color: var(--accent-deep); }

.hide-tr .w-tr, .hide-tr .w-bsp-tr, .hide-tr .tr-col { visibility: hidden; }

.empty { text-align: center; color: var(--ink-faint); padding: 50px 20px; font-size: 15px; }

/* ---------- Cards: verb (mobile) ---------- */
.vcards { display: none; }
@media (max-width: 720px) {
  .tbl--verbs, .tbl--words { display: none; }
  .vcards { display: grid; gap: 10px; }
  .vcard { padding: 14px 16px; }
  .vcard__top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
  .vcard__inf { font-weight: 700; font-size: 16px; }
  .vcard__tr { color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; }
  .vcard__forms { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 9px; font-size: 13.5px; }
  .vcard__forms span b { color: var(--accent-deep); }
  .vcard__bsp { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 13.5px; margin-top: 8px; }
}

/* ---------- Grammar ---------- */
.gcard { padding: 20px 22px; }
.gcard h3 { font-size: 19px; }
.gcard .lead { color: var(--ink-soft); margin: 8px 0 0; font-size: 14.5px; }
.gcard h4 {
  font-family: var(--sans); font-size: 11.5px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint); margin: 18px 0 8px;
}
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.rules li {
  position: relative; padding-inline-start: 22px; font-size: 14px; color: var(--ink);
}
.rules li::before {
  content: ""; position: absolute; inset-inline-start: 4px; top: 8px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.ex { display: grid; gap: 8px; }
.ex .row {
  background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--radius-s);
  padding: 10px 13px;
}
.ex .de { font-family: var(--serif); font-size: 15px; }
.ex .de b { color: var(--accent-deep); font-weight: 600; }
.ex .tr-col { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.gcard .go {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  font-family: var(--sans); font-weight: 800; font-size: 13.5px; padding: 9px 15px; cursor: pointer;
}
[data-theme="dark"] .gcard .go { color: #11201a; }
.gcard .go svg { width: 15px; height: 15px; }
[dir="rtl"] .gcard .go svg { transform: scaleX(-1); }

/* ---------- Homework ---------- */
.ha-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pill {
  font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft);
}
.pill b { color: var(--ink); }
.ha-item { padding: 16px 18px; }
.ha-item__nr {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: 14px; flex: 0 0 auto;
}
.ha-item__head { display: flex; gap: 12px; align-items: flex-start; }
.ha-item__seite { font-size: 11.5px; color: var(--ink-faint); font-weight: 700; }
.ha-item__prompt { font-size: 14.5px; margin-top: 2px; }
.ha-sol {
  margin-top: 11px; border: 1px dashed var(--line); border-radius: var(--radius-s);
  background: var(--surface-2); overflow: hidden;
}
.ha-sol > summary {
  list-style: none; cursor: pointer; padding: 9px 13px; font-size: 12.5px; font-weight: 800;
  color: var(--accent-deep); display: flex; align-items: center; gap: 7px;
}
.ha-sol > summary::-webkit-details-marker { display: none; }
.ha-sol > summary svg { width: 14px; height: 14px; transition: transform .2s; }
.ha-sol[open] > summary svg { transform: rotate(90deg); }
.ha-sol__body { padding: 0 13px 12px; font-size: 14px; color: var(--ink-soft); }
.ha-sol__body .runex {
  margin-top: 9px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--accent); color: #fff; border: 0; border-radius: 8px; font-weight: 800;
  font-size: 12.5px; padding: 7px 12px; font-family: var(--sans);
}
[data-theme="dark"] .ha-sol__body .runex { color: #11201a; }

/* ---------- Trainer ---------- */
.tr-launch { padding: 20px 22px; }
.tr-launch h3 { font-size: 19px; }
.tr-launch p { color: var(--ink-soft); margin: 7px 0 0; font-size: 14.5px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--accent); color: #fff; border: 0; border-radius: 11px;
  font-family: var(--sans); font-weight: 800; font-size: 14.5px; padding: 11px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.1); transition: transform .1s, background .15s;
}
[data-theme="dark"] .btn { color: #11201a; }
.btn:hover { background: var(--accent-deep); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn--ghost:hover { background: var(--surface-2); }
.btn svg { width: 17px; height: 17px; }

.trainer { padding: 22px; }
.trainer__bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.progress { flex: 1; height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .35s ease; }
.trainer__count { font-size: 12.5px; font-weight: 800; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.q-prompt { font-family: var(--serif); font-size: 23px; line-height: 1.5; margin: 6px 0 4px; }
.q-blank {
  display: inline-block; min-width: 76px; border-bottom: 2.5px solid var(--accent);
  text-align: center; font-weight: 700; color: var(--accent-deep); padding: 0 6px;
}
.q-hint { font-size: 13px; color: var(--ink-faint); margin-top: 6px; font-style: italic; font-family: var(--serif); }
.q-tr { font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; }

.opts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.opt {
  flex: 1; min-width: 130px; cursor: pointer; font-family: var(--serif); font-size: 19px; font-weight: 500;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 16px 18px; text-align: center; color: var(--ink); transition: all .12s;
}
.opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.opt:disabled { cursor: default; }
.opt--ok  { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.opt--bad { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.opt--mute { opacity: .45; }

.feedback {
  margin-top: 18px; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px;
  min-height: 24px;
}
.feedback.ok  { color: var(--ok); }
.feedback.bad { color: var(--bad); }
.feedback svg { width: 19px; height: 19px; }

.trainer__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 12px; }

.result { text-align: center; padding: 30px 22px; }
.result__score { font-family: var(--serif); font-size: 52px; color: var(--accent-deep); line-height: 1; }
.result__label { color: var(--ink-soft); margin: 8px 0 22px; font-size: 16px; }
.ring { width: 132px; height: 132px; margin: 0 auto 6px; }
.ring circle { fill: none; stroke-width: 11; }
.ring .bg { stroke: var(--surface-2); }
.ring .fg { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .8s ease; }

/* ---------- Sessions ---------- */
.timeline { position: relative; padding-inline-start: 26px; }
.timeline::before {
  content: ""; position: absolute; inset-inline-start: 7px; top: 6px; bottom: 6px; width: 2px;
  background: var(--line);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before {
  content: ""; position: absolute; inset-inline-start: -23px; top: 5px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--surface); border: 2.5px solid var(--accent);
}
.tl-date { font-size: 12.5px; font-weight: 800; color: var(--accent-deep); }
.tl-card { margin-top: 6px; padding: 14px 16px; }
.tl-card h3 { font-size: 16px; }
.tl-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }

/* ---------- Settings drawer ---------- */
.scrim {
  position: fixed; inset: 0; background: rgba(20,17,13,.4); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50;
}
.scrim.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; width: min(380px, 90vw);
  background: var(--surface); border-inline-start: 1px solid var(--line);
  box-shadow: var(--shadow-lift); z-index: 51; transform: translateX(100%);
  transition: transform .26s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column;
}
[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.show { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 19px; }
.drawer__body { padding: 8px 20px 24px; overflow-y: auto; }
.set-row { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.set-row:last-child { border-bottom: 0; }
.set-row h3 { font-family: var(--sans); font-size: 14px; font-weight: 800; }
.set-row p { font-size: 12.5px; color: var(--ink-faint); margin: 3px 0 0; }
.set-row__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.switch { position: relative; width: 44px; height: 25px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .2s; cursor: pointer;
}
.switch .track::before {
  content: ""; position: absolute; height: 19px; width: 19px; inset-inline-start: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::before { transform: translateX(19px); }
[dir="rtl"] .switch input:checked + .track::before { transform: translateX(-19px); }

.sel {
  width: 100%; margin-top: 10px; font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer;
}
.btn-danger {
  margin-top: 10px; width: 100%; background: var(--bad-bg); color: var(--bad); border: 1px solid transparent;
  border-radius: 10px; font-family: var(--sans); font-weight: 800; font-size: 13.5px; padding: 10px; cursor: pointer;
}
.offline-note { font-size: 12px; color: var(--ink-faint); margin-top: 16px; display: flex; gap: 8px; align-items: flex-start; }
.offline-note svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: var(--accent); }

/* ---------- Print ---------- */
@media print {
  .appbar, .tabs, .scrim, .drawer, .tr-launch, .toolbar, .chips, .minicard .go, .gcard .go, .ha-sol__body .runex { display: none !important; }
  body { background: #fff; color: #000; }
  .panel { display: block !important; page-break-after: always; }
  .panel:last-child { page-break-after: auto; }
  .card, .tbl, .today-hero { box-shadow: none; border-color: #ccc; }
  .sec-head h1 { font-size: 22pt; }
  .hide-tr .w-tr, .hide-tr .w-bsp-tr, .hide-tr .tr-col { visibility: visible; }
  .tbl thead th { position: static; }
  .vcards { display: none !important; }
  .tbl--verbs, .tbl--words { display: table !important; }
  @page { margin: 1.6cm; }
}
