:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --bar: #e9ebef;
  --text: #1c2027;
  --muted: #6b7280;
  --border: #e1e4e9;
  --hover: #eef1f6;
  --select: #e3ecfd;
  --accent: #2f6fde;
  --accent-ink: #ffffff;
  --danger: #c73a3a;
  --warn: #c98a00;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 18px rgba(0, 0, 0, .04);
  --pop-shadow: 0 10px 30px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .08);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --panel: #1a1d22;
    --bar: #16181c;
    --text: #e5e7eb;
    --muted: #9198a3;
    --border: #2a2f37;
    --hover: #242931;
    --select: #1f2c45;
    --accent: #6d9bff;
    --accent-ink: #0c1018;
    --danger: #ff7a7a;
    --warn: #f0b429;
    --shadow: none;
    --pop-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pad { padding: 12px 16px; }
.grow { flex: 1; min-width: 0; }
.ico { display: inline-flex; flex: none; color: var(--muted); }
.fav { flex: none; border-radius: 3px; }

button, select, input { font: inherit; color: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}
button:hover, .button:hover { background: var(--hover); }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover, .button.primary:hover { filter: brightness(1.08); }
button.icon { padding: 4px 8px; border: none; background: transparent; color: var(--muted); font-size: 15px; }
button.icon:hover { color: var(--text); background: var(--hover); }
button.link { border: none; background: none; padding: 0; color: var(--accent); }
button.link:hover { text-decoration: underline; background: none; }
input, select {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Könyvjelzősáv ---------- */

.bar {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 38px;
  padding: 0 8px;
  background: var(--bar);
  border-bottom: 1px solid var(--border);
  flex: none;
}
.profiles {
  display: flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  margin-right: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.profile {
  height: 26px;
  padding: 0 10px 0 8px;
  gap: 5px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  color: var(--muted);
}
.profile .pi { font-size: 13px; }
.profile:hover { color: var(--text); background: var(--hover); }
.profile.active { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.profile.active:hover { background: var(--panel); }
/* a munkaprofil jól látható: más színű sáv */
body[data-profile="work"] .bar { background: color-mix(in srgb, var(--accent) 9%, var(--bar)); }
.bar-items {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
}
.bar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  max-width: 180px;
  height: 28px;
  padding: 0 9px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
}
.bar-item > span:not(.ico):not(.edit-tools) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-item:hover, .bar-item.open { background: var(--hover); }
.bar-item.open { background: var(--select); }
.bar-more { flex: none; height: 28px; padding: 0 10px; border: none; background: transparent; font-size: 15px; border-radius: 999px; }
.bar-more.open { background: var(--select); }
.bar-tools { display: flex; align-items: center; gap: 4px; flex: none; margin-left: 4px; padding-left: 6px; border-left: 1px solid var(--border); }
.bar-btn { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 999px; background: transparent; border-color: transparent; color: var(--muted); }
.bar-btn:hover { color: var(--text); }
.bar-btn.primary { color: var(--accent-ink); }
body.bm-edit .bar-tools .bar-btn:not(.primary) { border-color: var(--border); background: var(--panel); color: var(--text); }
body.bm-edit .bar { background: var(--select); }
body.bm-edit .bar-item { max-width: 240px; border: 1px dashed var(--border); background: var(--panel); cursor: grab; }
.edit-tools { display: inline-flex; gap: 1px; margin-left: 2px; flex: none; }
.et { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 5px; font-size: 12px; color: var(--muted); cursor: pointer; }
.et:hover { background: var(--hover); color: var(--text); }
.et:last-child:hover { color: var(--danger); }
.bm-row.add { color: var(--accent); border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; margin-top: 4px; }
.bar-hint { font-size: 13px; color: var(--muted); padding-left: 6px; white-space: nowrap; }
.bar-hint button.link { font-size: 13px; }

.bm-menu, .ctx {
  position: fixed;
  z-index: 60;
  min-width: 200px;
  max-width: 340px;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--pop-shadow);
  padding: 5px;
}
.ctx { z-index: 70; min-width: 210px; }
.bm-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
}
.bm-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-row .arrow { color: var(--muted); font-size: 16px; line-height: 1; }
.bm-row:hover, .bm-row.open { background: var(--hover); }
.bm-empty { padding: 6px 10px; color: var(--muted); font-size: 13px; }
.ctx button {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  border: none;
  background: transparent;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13.5px;
}
.ctx button:hover { background: var(--hover); }
.ctx hr, .menu-list hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; width: 100%; }

/* húzás jelölése */
.drop-into { background: var(--select) !important; outline: 2px solid var(--accent); outline-offset: -2px; }
.bar-item.drop-before { box-shadow: inset 2px 0 0 var(--accent); }
.bar-item.drop-after { box-shadow: inset -2px 0 0 var(--accent); }
.bm-row.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.bm-row.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------- Fejléc ---------- */

.top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 600px) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  flex: none;
}
.left { display: flex; align-items: center; gap: 18px; min-width: 0; container-type: inline-size; }
.clock { flex: none; line-height: 1.15; }
#time { font-size: 24px; font-weight: 650; letter-spacing: -.3px; }
#date { font-size: 12.5px; }
#date::first-letter { text-transform: uppercase; }

.weather {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 4px 12px 4px 6px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.weather:hover { background: var(--panel); border-color: var(--border); }
.weather .now { display: flex; align-items: center; gap: 6px; min-width: 0; }
.weather .temp { font-size: 22px; font-weight: 600; }
.weather .where { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.weather .city { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weather .desc { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weather .days { display: flex; gap: 10px; padding-left: 14px; border-left: 1px solid var(--border); }
.weather .day { display: flex; flex-direction: column; align-items: center; font-size: 11.5px; line-height: 1.15; }
.weather .dn { color: var(--muted); font-weight: 600; }
.weather .mm { display: flex; gap: 4px; }
.weather .mm span { color: var(--muted); }
@container (max-width: 470px) { .weather .days { display: none; } }
@container (max-width: 300px) { .weather .where { display: none; } }

.search {
  position: relative;
  display: flex;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.search:focus-within { border-color: var(--accent); }
.search select { border: none; border-right: 1px solid var(--border); border-radius: 999px 0 0 999px; padding-left: 16px; background: transparent; color: var(--muted); }
.search input { flex: 1; border: none; border-radius: 0 999px 999px 0; padding: 10px 16px; background: transparent; outline: none; }
.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--pop-shadow);
  padding: 5px;
}
.sg { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 14px; }
.sg .t { flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg .p { flex: 1; min-width: 0; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg:hover, .sg.active { background: var(--hover); }

.right { display: flex; align-items: center; gap: 8px; justify-self: end; }
.notes-btn { padding: 7px 14px; }
.menu { position: relative; }
.menu summary {
  list-style: none;
  cursor: pointer;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  user-select: none;
}
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 240px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--pop-shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.menu-list button, .menu-list a {
  justify-content: flex-start;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
}
.menu-list button:hover, .menu-list a:hover { background: var(--hover); }

/* ---------- Hírolvasó: források | lista | betekintő ---------- */

.reader {
  display: grid;
  grid-template-columns: 240px minmax(300px, 420px) minmax(0, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}
.sources, .list, .preview {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px 10px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
  border-radius: var(--radius) var(--radius) 0 0;
}
.col-head h2 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btns { display: flex; align-items: center; gap: 2px; flex: none; }
.src-toggle { border: none; background: none; padding: 0; gap: 8px; cursor: default; min-width: 0; }
.src-toggle:hover { background: none; }
#srcCurrent { display: none; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }

/* források */
.feed-nav { padding: 6px; }
.src-row, .src-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 13.5px;
  text-align: left;
  justify-content: flex-start;
}
.src-row .t, .src-label .t { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-row:hover, .src-cat:hover { background: var(--hover); }
.src-row.active, .src-cat.active { background: var(--select); }
.src-row.indent { padding-left: 30px; }
.src-cat { padding: 0; margin-top: 6px; }
.src-cat .twisty { border: none; background: none; padding: 6px 4px 6px 8px; color: var(--muted); font-size: 12px; width: 26px; }
.src-label { flex: 1; min-width: 0; display: flex; gap: 8px; border: none; background: none; padding: 6px 8px 6px 0; font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); justify-content: flex-start; }
.src-label:hover { background: none; }
.count { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.src-row:not(.active) .count:not(:empty) { color: var(--accent); font-weight: 600; }
.warn { color: var(--warn); font-size: 13px; cursor: help; }

/* lista */
.chip { border-radius: 999px; padding: 3px 10px; font-size: 12.5px; }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.news { display: flex; flex-direction: column; }
.item {
  display: flex;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
}
.item:hover { background: var(--hover); }
.item.selected { background: var(--select); border-left-color: var(--accent); }
.item .body { flex: 1; min-width: 0; }
.meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 2px; min-width: 0; }
.meta .src { color: var(--accent); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta time { flex: none; }
.meta .src + time::before { content: "·"; margin-right: 6px; color: var(--muted); }
.item .title { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.item.read .title { font-weight: 450; color: var(--muted); }
.item.read .thumb { opacity: .7; }
.sum {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 7px; flex: none; background: var(--hover); }
#refresh.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* betekintő */
.preview { position: relative; }
.preview-empty { height: 100%; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); padding: 24px; }
.preview-empty .big { font-size: 42px; opacity: .5; }
.preview-empty p { margin: 6px 0 0; }
.preview-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.preview-bar .back { display: none; }
.preview-bar .button { font-size: 13.5px; padding: 5px 12px; margin-left: 6px; }
.preview-inner { max-width: 760px; margin: 0 auto; padding: 22px 28px 40px; }
.preview-inner > .meta { font-size: 13px; gap: 8px; margin-bottom: 8px; }
.preview-inner > .meta time::before { content: "·"; margin-right: 8px; }
.preview h1 { font-size: 26px; line-height: 1.25; letter-spacing: -.3px; margin-bottom: 18px; }
.preview h1 a:hover { color: var(--accent); }
.hero { width: 100%; max-height: 420px; object-fit: cover; border-radius: 10px; margin-bottom: 18px; }
.content { font-size: 16.5px; line-height: 1.65; overflow-wrap: anywhere; }
.content img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 12px 0; }
.content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.content h1, .content h2, .content h3, .content h4 { font-size: 19px; margin: 1.3em 0 .5em; line-height: 1.3; }
.content blockquote { margin: 1em 0; padding: 2px 16px; border-left: 3px solid var(--border); color: var(--muted); }
.content pre { background: var(--hover); padding: 12px; border-radius: 8px; overflow-x: auto; font-size: 14px; }
.content table { border-collapse: collapse; display: block; overflow-x: auto; }
.content td, .content th { border: 1px solid var(--border); padding: 4px 8px; }
.content figure { margin: 1em 0; }
.content figcaption { font-size: 13px; color: var(--muted); }
.more { margin-top: 28px; }
.full-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }

/* asztali nézet: a hasábok önállóan görgethetők, az oldal kitölti az ablakot */
@media (min-width: 761px) {
  body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  .reader { flex: 1; min-height: 0; }
  .sources, .list, .preview { overflow-y: auto; overscroll-behavior: contain; }
}

/* ---------- Párbeszédablakok ---------- */

.dlg {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  padding: 22px;
  width: min(440px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.dlg.wide { width: min(720px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(0, 0, 0, .4); }
.dlg h2 { font-size: 18px; margin-bottom: 16px; }
.dlg label, .login-card label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.dlg label > span:last-child { display: contents; }
.dlg label input, .dlg label select, .login-card input { width: 100%; font-size: 15px; color: var(--text); }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.empty { text-align: center; padding: 20px 10px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.empty p { margin: 0 0 4px; }

.feed-list { list-style: none; margin: 0; padding: 0; max-height: 55vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.feed-list li { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--border); }
.feed-list li:first-child { border-top: none; }
.feed-list .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; margin-left: 8px; border-radius: 999px; background: var(--hover); color: var(--muted); }
.tag.error { color: var(--danger); }

/* ---------- Jegyzetnapló ---------- */

.notes-dlg {
  width: min(860px, calc(100vw - 32px));
  height: min(88vh, 920px);
  padding: 0;
  overflow: hidden;
}
.notes-dlg[open] { display: flex; flex-direction: column; }
.notes-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.notes-head h2 { margin: 0; font-size: 18px; white-space: nowrap; }
.notes-search { flex: 1; min-width: 0; border-radius: 999px; padding: 7px 14px; }
.notes-compose { display: flex; gap: 8px; align-items: flex-end; padding: 0 16px; }
.notes-new, .note-edit {
  flex: 1;
  width: 100%;
  resize: none;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
}
.notes-new:focus, .note-edit:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.notes-bar { display: flex; justify-content: space-between; gap: 10px; padding: 6px 18px 8px; font-size: 12.5px; border-bottom: 1px solid var(--border); min-height: 30px; }
.notes-status { color: var(--muted); }
.notes-status.error { color: var(--danger); }
.notes-list { flex: 1; overflow-y: auto; padding: 4px 16px 24px; overscroll-behavior: contain; }
.notes-empty { text-align: center; padding: 40px 0; }
.notes-day {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 12px 2px 6px;
  background: var(--panel);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.notes-day::first-letter { text-transform: uppercase; }
.note { padding: 8px 10px; margin: 0 -10px; border-radius: 10px; }
.note:hover, .note.editing { background: var(--hover); }
.note-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-height: 26px; }
.note-meta time { font-weight: 600; font-variant-numeric: tabular-nums; }
.note-meta button.icon { font-size: 13px; padding: 2px 6px; opacity: 0; }
.note:hover .note-meta button.icon, .note.editing .note-meta button.icon, .note-meta button.icon:focus-visible { opacity: 1; }
.note-meta button:not(.icon) { font-size: 12.5px; padding: 3px 10px; }
.note-meta button.danger { color: var(--danger); }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.55; cursor: text; }
.trash-view .note-text { cursor: default; color: var(--muted); }
.note-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.note-text mark, .version-text mark { background: color-mix(in srgb, var(--warn) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.note-versions { margin: 8px 0 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.note-versions > p { margin: 0 0 8px; }
.version { padding: 8px 0; border-top: 1px solid var(--border); }
.version-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.version-head button { font-size: 12.5px; padding: 3px 10px; }
.version-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; color: var(--muted); max-height: 160px; overflow-y: auto; }
.notes-undo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 14px;
  padding: 8px 8px 8px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
}
.notes-undo span { flex: 1; }
.notes-undo button.primary { padding: 5px 12px; }
.notes-undo button.icon { color: var(--bg); opacity: .7; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
  max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--danger); color: #fff; }

/* ---------- Bejelentkezés ---------- */

.login-page { display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(380px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card > p { margin: 0 0 20px; font-size: 14px; }
.login-card button { width: 100%; padding: 10px; margin-top: 6px; }
.alert { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }

/* ---------- Kisebb képernyők ---------- */

/* Közepes: két hasáb, a betekintő jobbról becsúszó panel */
@media (max-width: 1180px) {
  .reader { grid-template-columns: 220px minmax(0, 1fr); }
  .preview {
    position: fixed;
    z-index: 30;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(760px, 100%);
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(105%);
    transition: transform .22s ease;
    box-shadow: var(--pop-shadow);
  }
  .preview.show { transform: none; }
  .preview-bar { border-radius: 0; }
  .preview-bar .back { display: inline-flex; }
}

/* Mobil: egy hasáb, a források lenyithatók */
@media (max-width: 760px) {
  .top { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 12px; gap: 10px; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  #date { display: none; }
  .left { gap: 8px; }
  .bar-btn { padding: 0 8px; }
  #bmAdd, #bmAddFolder { font-size: 0; }
  .profile .pn { display: none; }
  .notes-btn span { display: none; }
  .notes-btn { padding: 7px 10px; }
  .notes-dlg { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; border: none; }
  .notes-head { flex-wrap: wrap; }
  .notes-search { order: 3; flex-basis: 100%; }
  .profile { padding: 0 8px; }
  #bmAdd::before { content: "+ 🔖"; font-size: 13px; }
  #bmAddFolder::before { content: "+ 📁"; font-size: 13px; }
  .reader { grid-template-columns: minmax(0, 1fr); padding: 0 12px 16px; gap: 10px; }
  .src-toggle { cursor: pointer; }
  .src-toggle h2::after { content: " ▾"; color: var(--muted); }
  #srcCurrent { display: inline; }
  .sources .feed-nav { display: none; }
  .sources.open .feed-nav { display: block; }
  .sources:not(.open) .col-head { border-bottom: none; }
  .col-head { position: static; }
  .preview-inner { padding: 18px 16px 32px; }
  .preview h1 { font-size: 22px; }
  .content { font-size: 16px; }
  .search select { padding-left: 10px; max-width: 96px; }
}
