:root {
  --bg: #f6f2e9;
  --paper: #fffdf8;
  --panel: #fbf8f1;
  --ink: #1e2633;
  --ink-2: #4a5465;
  --ink-3: #7b8496;
  --line: #e4dccb;
  --line-2: #efe8d9;
  --accent: #1d3f6e;
  --accent-2: #2b5a99;
  --accent-soft: #e3ebf6;
  --gold: #a87b1f;
  --gold-soft: #f5ead2;
  --ok: #2f7d4f;
  --ok-soft: #e1f1e6;
  --warn: #a35a00;
  --warn-soft: #fbead3;
  --danger: #b3261e;
  --shadow: 0 1px 2px rgba(30, 38, 51, .06), 0 4px 16px rgba(30, 38, 51, .06);
  --shadow-lg: 0 10px 40px rgba(30, 38, 51, .18);
  --radius: 14px;
  --ui: 'Assistant', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --text: 'Frank Ruhl Libre', 'David', 'Times New Roman', serif;
  --fs: 19px;
  --nav-w: 232px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #14181f;
  --paper: #1b2029;
  --panel: #191e26;
  --ink: #e9e4d8;
  --ink-2: #b9b3a6;
  --ink-3: #8a8579;
  --line: #2c333f;
  --line-2: #242a34;
  --accent: #8fb3e8;
  --accent-2: #a9c5ef;
  --accent-soft: #22324a;
  --gold: #d9b05a;
  --gold-soft: #3a3020;
  --ok: #6cc08c;
  --ok-soft: #1f3327;
  --warn: #f0a650;
  --warn-soft: #3a2a17;
  --danger: #ff8a80;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */
#app { display: flex; min-height: 100%; }
.sidenav {
  width: var(--nav-w);
  flex: none;
  position: sticky; top: 0; height: 100vh;
  padding: 18px 12px;
  border-inline-end: 1px solid var(--line);
  background: var(--panel);
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { font-family: var(--text); font-size: 22px; line-height: 1.1; display: block; }
.brand small { color: var(--ink-3); font-size: 12px; }
.navlink {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  text-decoration: none; color: var(--ink-2); font-weight: 600;
}
.navlink svg { width: 22px; height: 22px; flex: none; }
.navlink:hover { background: var(--line-2); color: var(--ink); }
.navlink.on { background: var(--accent-soft); color: var(--accent); }
.nav-spacer { flex: 1; }
.syncdot { font-size: 12px; color: var(--ink-3); padding: 6px 12px; display: flex; gap: 6px; align-items: center; }
.syncdot i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); display: inline-block; }
.syncdot.ok i { background: var(--ok); }
.syncdot.busy i { background: var(--gold); }
.syncdot.off i { background: var(--danger); }

main { flex: 1; min-width: 0; outline: none; }
.page { max-width: 980px; margin: 0 auto; padding: 22px 24px 120px; }
.page.wide { max-width: 1200px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--text); font-weight: 700; font-size: 30px; margin: 0; flex: 1; min-width: 0; }
.sub { color: var(--ink-3); font-size: 14px; }

@media (max-width: 820px) {
  #app { display: block; }
  .sidenav {
    position: fixed; inset: auto 0 0 0; top: auto; height: auto; width: auto; z-index: 30;
    flex-direction: row; padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
    border-inline-end: 0; border-top: 1px solid var(--line);
    justify-content: space-around; gap: 0;
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    backdrop-filter: blur(10px);
  }
  .brand, .nav-spacer, .syncdot { display: none; }
  .navlink { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; flex: 1; text-align: center; font-weight: 600; }
  .navlink svg { width: 24px; height: 24px; }
  .navlink.on { background: none; }
  .page { padding: 14px 16px 110px; }
  .page-head h1 { font-size: 25px; }
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 8px 16px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #10151c; }
.btn.primary:hover { background: var(--accent-2); }
.btn.gold { background: var(--gold-soft); border-color: transparent; color: var(--gold); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 34px; padding: 4px 11px; font-size: 14px; border-radius: 9px; }
.btn.icon { padding: 0; width: 42px; }
.btn.icon.small { width: 34px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.input, .select, textarea.input {
  width: 100%; min-height: 44px; padding: 9px 13px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--paper);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.searchbox { position: relative; }
.searchbox svg { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.searchbox .input { padding-inline-start: 42px; min-height: 48px; font-size: 17px; border-radius: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--line-2); color: var(--ink-2); border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.chip.st-draft { background: var(--line-2); color: var(--ink-2); }
.chip.st-ready { background: var(--gold-soft); color: var(--gold); }
.chip.st-sent { background: var(--ok-soft); color: var(--ok); }
.chip button { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; line-height: 1; font-size: 15px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.seg { display: inline-flex; background: var(--line-2); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty { text-align: center; color: var(--ink-3); padding: 60px 20px; }
.empty > svg { width: 64px; height: 64px; color: var(--line); margin-bottom: 8px; }
.empty h2 { font-family: var(--text); color: var(--ink-2); margin: 6px 0; }

/* ---------- haaros list ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.list { display: grid; gap: 12px; }
.hcard { padding: 16px 18px; cursor: pointer; display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .1s; position: relative; }
.hcard:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.hcard h3 { font-family: var(--text); font-size: 21px; font-weight: 700; margin: 0 0 4px; line-height: 1.3; }
.hcard .src { color: var(--gold); font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.hcard p { margin: 0; color: var(--ink-2); font-family: var(--text); font-size: 16px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hcard .meta { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.hcard .meta svg { width: 15px; height: 15px; vertical-align: -3px; }
.hcard .pin { position: absolute; inset-inline-end: 14px; top: 14px; color: var(--gold); width: 18px; height: 18px; }
.group-title { font-size: 13px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin: 18px 2px 4px; }

.fab {
  position: fixed; inset-inline-end: 24px; bottom: 28px; z-index: 25;
  height: 58px; padding: 0 22px 0 18px; border-radius: 18px; border: 0;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 17px;
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); cursor: pointer; text-decoration: none;
}
:root[data-theme="dark"] .fab { color: #10151c; }
.fab svg { width: 26px; height: 26px; }
@media (max-width: 820px) { .fab { bottom: calc(76px + env(safe-area-inset-bottom)); inset-inline-end: 16px; } }

/* ---------- editor ---------- */
.ed-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 6px; padding: 10px 0; margin: -10px 0 8px; }
.ed-status { font-size: 13px; color: var(--ink-3); }
.sheet { padding: 26px 30px 30px; }
@media (max-width: 820px) { .sheet { padding: 18px 16px 22px; border-radius: 12px; } }
.ed-title { width: 100%; border: 0; outline: 0; background: none; font-family: var(--text); font-size: 28px; font-weight: 700; padding: 0; margin-bottom: 6px; }
.ed-source { width: 100%; border: 0; outline: 0; background: none; font-size: 16px; color: var(--gold); font-weight: 600; padding: 2px 0; margin-bottom: 10px; }
.ed-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.ed-meta .taginput { border: 0; outline: 0; background: none; min-width: 120px; flex: 1; font-size: 14px; padding: 4px; }
.ed-body {
  width: 100%; border: 0; outline: 0; background: none; resize: none; overflow: hidden;
  font-family: var(--text); font-size: var(--fs); line-height: 1.75; min-height: 40vh; padding: 0;
}
.ed-tools { position: sticky; bottom: 0; z-index: 15; display: flex; gap: 4px; flex-wrap: wrap; align-items: center;
  padding: 8px; margin-top: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
@media (max-width: 820px) { .ed-tools { bottom: calc(66px + env(safe-area-inset-bottom)); } }
.ed-tools .sep { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.ed-tools .btn { min-height: 38px; padding: 4px 10px; font-size: 14px; }
.ed-tools .btn.sym { font-family: var(--text); font-size: 20px; width: 38px; padding: 0; }
.footnotes { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.footnotes h4 { margin: 0 0 8px; font-size: 14px; color: var(--ink-3); }
.fn { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.fn b { font-family: var(--text); color: var(--accent); min-width: 22px; padding-top: 8px; }
.fn textarea { flex: 1; font-family: var(--text); font-size: 16px; min-height: 40px; resize: vertical; }
.attachments { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.att { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); min-height: 90px; }
.att img { width: 100%; height: 130px; object-fit: cover; display: block; cursor: zoom-in; }
.att .lbl { padding: 6px 8px; font-size: 12px; color: var(--ink-2); display: flex; gap: 4px; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.att audio { width: 100%; height: 40px; display: block; margin-top: 8px; }
.att .x { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; display: grid; place-items: center; }
.att .x svg { width: 16px; height: 16px; }
.att .ocr { position: absolute; bottom: 36px; inset-inline-start: 6px; }
.att.audio, .att.file { grid-column: span 2; padding: 10px; }
.cite { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 14px; margin: 4px 0; }
.cite a { font-weight: 600; text-decoration: none; }
.cite button { margin-inline-start: auto; }

.rec { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--warn-soft); color: var(--warn); border-radius: 12px; margin-top: 10px; font-weight: 600; }
.rec i { width: 12px; height: 12px; background: var(--danger); border-radius: 50%; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- OCR review ---------- */
.ocr-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-height: 0; }
@media (max-width: 820px) { .ocr-wrap { grid-template-columns: 1fr; } }
.ocr-img { max-height: 60vh; overflow: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.ocr-img img { width: 100%; display: block; }
.ocr-text { font-family: var(--text); font-size: 19px; line-height: 1.9; white-space: pre-wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); max-height: 60vh; overflow: auto; outline: none; }
.unsure { background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 0 4px; cursor: pointer; border-bottom: 2px dashed var(--warn); font-weight: 700; }
.unsure.fixed { background: var(--ok-soft); color: var(--ok); border-bottom-color: var(--ok); }
.ask { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--gold-soft); }
.ask h4 { margin: 0 0 8px; font-size: 15px; }
.ask .opts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ask .opts .btn { font-family: var(--text); font-size: 18px; }
.ask .crop { height: 60px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 8px; background: #fff; }

/* ---------- library ---------- */
.lib-section h2 { font-family: var(--text); font-size: 22px; margin: 26px 2px 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tile { padding: 14px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; min-height: 78px; cursor: pointer; border-inline-start: 4px solid var(--accent); }
.tile:hover { border-color: var(--gold); border-inline-start-color: var(--gold); }
.tile b { font-family: var(--text); font-size: 18px; line-height: 1.25; }
.tile small { color: var(--ink-3); font-size: 13px; direction: ltr; text-align: start; }
.crumbs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { text-decoration: none; font-weight: 600; }
.files { padding: 4px; }
.frow { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: inherit; cursor: pointer; }
.frow:hover { background: var(--line-2); }
.frow svg.ic { width: 24px; height: 24px; flex: none; color: var(--accent); }
.frow svg.ic.pdf { color: var(--danger); }
.frow .nm { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.frow .dt { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }

.viewer { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; }
.viewer-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; }
.viewer-bar .ttl { flex: 1; min-width: 120px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-bar input.pg { width: 64px; text-align: center; min-height: 36px; }
.viewer-body { flex: 1; overflow: auto; background: #8a8f98; padding: 14px 0; }
:root[data-theme="dark"] .viewer-body { background: #0c0f14; }
.viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.pdfpage { margin: 0 auto 14px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.3); position: relative; }
.pdfpage canvas { display: block; width: 100%; height: 100%; }
.pdfpage .pn { position: absolute; bottom: -2px; inset-inline-start: -46px; font-size: 12px; color: #fff; opacity: .8; }
.viewer-note { padding: 8px 14px; background: var(--gold-soft); color: var(--ink); font-size: 14px; display: flex; gap: 10px; align-items: center; }
.viewer-note mark, .hit mark { background: #ffe58a; color: #1e2633; border-radius: 3px; padding: 0 2px; }

/* ---------- search ---------- */
.hits { display: grid; gap: 10px; }
.hit { padding: 14px 16px; cursor: pointer; }
.hit .t { font-weight: 700; color: var(--accent); }
.hit .p { font-size: 13px; color: var(--ink-3); }
.hit .s { font-family: var(--text); font-size: 17px; line-height: 1.6; margin-top: 6px; color: var(--ink-2); }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 14px; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; }
.notice svg { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 1px; }
.notice.warn { background: var(--warn-soft); }
.notice.warn svg { color: var(--warn); }

/* ---------- directory ---------- */
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.dcard { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.dcard h3 { margin: 0; font-family: var(--text); font-size: 20px; }
.dcard .en { color: var(--ink-3); font-size: 14px; direction: ltr; text-align: start; }
.dcard .where { font-size: 13px; color: var(--gold); font-weight: 600; }
.dcard .ln { display: flex; gap: 8px; align-items: center; font-size: 14px; word-break: break-all; }
.dcard .ln svg { width: 17px; height: 17px; flex: none; color: var(--ink-3); }
.dcard .note { font-size: 13px; color: var(--ink-2); }
.dcard .acts { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }

/* ---------- settings ---------- */
.set { padding: 18px 20px; margin-bottom: 14px; }
.set h2 { margin: 0 0 4px; font-size: 18px; }
.set p { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.set .line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.set .line:first-of-type { border-top: 0; }
.set .line > span { flex: 1; min-width: 160px; font-weight: 600; }
.pin-in { letter-spacing: .5em; text-align: center; font-size: 22px; max-width: 220px; direction: ltr; }
.corr-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.corr-list div { display: flex; gap: 10px; padding: 6px 10px; border-top: 1px solid var(--line-2); align-items: center; font-family: var(--text); font-size: 17px; }
.corr-list div:first-child { border-top: 0; }
.corr-list s { color: var(--ink-3); }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(15, 20, 28, .45); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 20px 22px; background: var(--paper); border-radius: 18px; box-shadow: var(--shadow-lg); }
.modal.big { width: min(1100px, 100%); }
.modal h2 { margin: 0 0 12px; font-size: 20px; }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 820px) { .modal-bg { place-items: end stretch; padding: 0; } .modal { border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); width: 100%; } }
@keyframes fade { from { opacity: 0; } }
#toast { position: fixed; z-index: 80; left: 50%; bottom: 30px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 600; transition: .2s; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
@media (max-width: 820px) { #toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }
.spin { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: rot .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes rot { to { transform: rotate(360deg); } }
.loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 40px; color: var(--ink-3); }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.9); display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 94vh; }

/* ---------- print / export ---------- */
@media print {
  .sidenav, .ed-top, .ed-tools, .fab, #toast, .attachments .x, .no-print { display: none !important; }
  body, .card { background: #fff; box-shadow: none; border: 0; }
  .page { padding: 0; }
}

/* default icon size (specific rules above/below override it) */
svg { width: 1.25em; height: 1.25em; flex: none; }
.modal h2 svg, .set h2 svg { width: 22px; height: 22px; vertical-align: -4px; color: var(--accent); }
