/* =========================================================
   Śliska News – style (czysta baza pod dalsze stylowanie)
   ========================================================= */

:root {
  --accent: #d6001c;
  --accent-dark: #a80016;
  --text: #1a1a1a;
  --muted: #667085;
  --bg: #f4f5f7;
  --card: #ffffff;
  --surface: #ffffff;
  --field-border: #b4bac4;
  --chip-bg: #fdecee;
  --tint: #f8f9fa;
  --tint-2: #dfe3e8;
  --link: #0b57d0;
  --quote-bg: #f4f5f8;
  --quote-text: #333;
  --danger-bg: #fdecea;
  --danger-border: #f1c0bb;
  --logo-ink: #111111;
  --logo-star: #d6001c;
  color-scheme: light;
  --warn-bg: #fffaeb;
  --warn-border: #fedf89;
  --info-bg: #eff8ff;
  --info-border: #b2ddff;
  --border: #e2e4e9;
  --soft: #eef0f3;
  --danger: #b42318;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Admin / gość ---------- */
.admin-only { display: none !important; }
.is-admin .admin-only { display: inline-flex !important; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--soft); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, .chip-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-danger { color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: 4px 10px; font-size: .8rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Pasek PILNE ---------- */
.breaking { background: var(--accent); color: #fff; }
.breaking-inner { display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.breaking-label {
  flex: none;
  background: #fff;
  color: var(--accent);
  font-weight: 800;
  font-size: .75rem;
  letter-spacing: .08em;
  padding: 2px 8px;
  border-radius: 3px;
}

/* ---------- Nagłówek ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.logo {
  flex: none;
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
}
.logo span { color: var(--accent); }

.search { flex: 1; min-width: 0; max-width: 520px; }
.search input {
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
}
.search input:focus { background: #fff; border-color: var(--accent); outline: none; }

.auth { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.category-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 8px;
}
.chip-btn {
  flex: none;
  padding: 7px 14px;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.chip-btn:hover { color: var(--text); }
.chip-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Główny układ ---------- */
.app { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }

.home-status { color: var(--muted); margin-bottom: 16px; }
.home-status:empty { display: none; }

.section-title {
  margin: 32px 0 16px;
  font-size: 1.25rem;
  padding-left: 10px;
  border-left: 4px solid var(--accent);
}

/* ---------- Hero (Temat Dnia) ---------- */
.hero {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 420px;
  border-radius: var(--radius);
  background: #222;
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.hero:hover .hero-img { transform: scale(1.02); }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, 0) 100%);
}
.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 28px;
  max-width: 900px;
}
.hero-flag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  background: var(--accent);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 3px;
}
.hero-title {
  margin: 8px 0 10px;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -.01em;
}
.hero-title a:hover { text-decoration: underline; }

.hero .card-meta { color: rgba(255, 255, 255, .8); }

/* ---------- Siatka kafli ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16, 24, 40, .12); }
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--soft); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 14px 16px 16px; }
.card-tags { display: flex; align-items: center; gap: 8px; }
.card-title { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.card-title a:hover { color: var(--accent); }
.card-lead { margin: 0; color: var(--muted); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  font-size: .8rem;
  color: var(--muted);
}

.chip {
  display: inline-block;
  padding: 2px 9px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--chip-bg);
  border-radius: 3px;
}
.hero .chip { color: #fff; background: rgba(255, 255, 255, .2); }
.badge-urgent {
  padding: 2px 8px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
  background: var(--accent);
  border-radius: 3px;
}

.empty-state {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------- Widok artykułu ---------- */
.article-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.article {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.article-header h1 {
  margin: 10px 0 12px;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -.01em;
}
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .9rem; }
.article-meta strong { color: var(--text); }
.article-hero { margin: 20px 0 24px; }
.article-hero img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); }

.article-layout { display: block; }
.article-lead { margin: 0 0 20px; font-size: 1.2rem; font-weight: 700; line-height: 1.5; }

/* Treść artykułu i edytora – wspólne style */
.article-body, .ql-editor { font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.75; }
.article-body > :first-child { margin-top: 0; }
.article-body h2, .ql-editor h2 { margin: .7em 0 .3em; font-family: var(--font); font-size: 1.5rem; line-height: 1.3; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.article-body h3, .ql-editor h3 { margin: .6em 0 .25em; font-family: var(--font); font-size: 1.2rem; line-height: 1.3; }
.article-body p { margin: 0; min-height: 1.75em; }
.article-body p:empty { min-height: 1.75em; }
.article-body a, .ql-editor a { color: var(--link); text-decoration: underline; }
.article-body ul, .article-body ol { margin: 0 0 1em; padding-left: 1.5em; }
.article-body blockquote, .ql-editor blockquote {
  margin: 0;
  padding: 6px 20px;
  border-left: 4px solid var(--accent);
  background: var(--quote-bg);
  font-style: italic;
  color: var(--quote-text);
}
.article-body figure, .ql-editor figure.article-figure { margin: .9em auto; text-align: center; }
.article-body figure img, .ql-editor figure.article-figure img { max-width: 100%; margin: 0 auto; border-radius: 6px; }
.article-body figcaption, .ql-editor figure.article-figure figcaption {
  margin-top: 8px;
  font-family: var(--font);
  font-size: .85rem;
  color: var(--muted);
}

/* ---------- Edytor ---------- */
.editor { max-width: 1200px; margin: 0 auto; }

.field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.field + .field { margin-top: 0; }

.field-label { font-size: .85rem; font-weight: 700; }
.field input[type="text"], .field input[type="email"], .field input[type="url"], .field input[type="password"], .field input[type="datetime-local"], .field select, .field textarea {
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--field-border);
  border-radius: 6px;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.hint { color: var(--muted); font-size: .8rem; margin: 0; }

.panel { margin: 0; padding: 14px 16px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 12px; }
.panel legend { padding: 0 6px; font-weight: 800; font-size: .9rem; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--accent); }

/* Polskie etykiety Quill */
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before { content: "Akapit"; }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: "Nagłówek 2"; }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: "Nagłówek 3"; }
.ql-snow .ql-picker.ql-header { width: 110px; }
.ql-snow .ql-tooltip[data-mode="link"]::before { content: "Wpisz link:"; }
.ql-snow .ql-tooltip a.ql-action::after { content: "Edytuj"; }
.ql-snow .ql-tooltip.ql-editing a.ql-action::after { content: "Zapisz"; }
.ql-snow .ql-tooltip a.ql-remove::before { content: "Usuń"; }
.ql-snow .ql-tooltip::before { content: "Odwiedź:"; }

/* ---------- Modale ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(16, 24, 40, .55);
  overflow-y: auto;
}
.modal-box {
  width: 100%;
  max-width: 440px;
  padding: 24px;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .3);
}
.modal-box h2 { margin: 0 0 16px; font-size: 1.25rem; }
.modal-box .field { margin-bottom: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.form-error { margin: 4px 0 0; color: var(--danger); font-size: .88rem; font-weight: 600; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  background: #1f2937;
  color: #fff;
  font-size: .92rem;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.toast.error { background: var(--danger); }

/* ---------- Stopka ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .85rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 16px; padding-bottom: 16px; }

/* =========================================================
   RWD
   ========================================================= */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

}

@media (max-width: 800px) {
  .article { padding: 18px; }
  .header-top { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
}

@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .hero { min-height: 380px; }
  .hero-content { padding: 18px; }
  
  .logo { font-size: 1.5rem; }
  .auth .btn { padding: 8px 10px; font-size: .82rem; }
}

/* =========================================================
   Śliska News – rozszerzenia (edytor, wersje robocze, panel)
   ========================================================= */

/* Ciągły cytat: kolejne linie cytatu w edytorze tworzą jeden blok */
.ql-editor blockquote { margin: 0; padding: 6px 20px; border-radius: 0; }
.ql-editor blockquote + blockquote { padding-top: 0; }
.ql-editor blockquote:has(+ blockquote) { padding-bottom: 0; }
.article-body blockquote p { margin: 0; }

/* Pola i liczniki */

.field input[type="datetime-local"] { max-width: 100%; }

kbd {
  padding: 1px 5px; font: .75rem ui-monospace, Menlo, Consolas, monospace;
  background: var(--soft); border: 1px solid var(--border); border-radius: 4px;
}
.spacer { flex: 1; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }

/* Edytor */

.editor.is-loading { opacity: .5; pointer-events: none; }

/* Panel redakcji */
.panel-title { margin: 0 0 8px; font-size: 1.6rem; }
.panel-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }

.muted { color: var(--muted); font-size: .85rem; margin: 0; }

.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.load-more { display: flex; justify-content: center; margin: 24px 0; }

/* Podgląd */

body.modal-open { overflow: hidden; }

/* =========================================================
   Motyw ciemny (automatyczny wg systemu + ręczny przełącznik)
   ========================================================= */
:root[data-theme="dark"] {
  --accent: #d6001c;
  --accent-dark: #a80016;
  --text: #ececec;
  --muted: #a3a3a3;
  --bg: #121212;
  --card: #1c1c1c;
  --surface: #1c1c1c;
  --border: #2e2e2e;
  --soft: #262626;
  --field-border: #454545;
  --chip-bg: #3a2024;
  --tint: #212121;
  --tint-2: #2a2a2a;
  --link: #8ab4f8;
  --quote-bg: #212121;
  --quote-text: #d8d8d8;
  --danger: #ff8a80;
  --danger-bg: #3a1f1d;
  --danger-border: #6b2f2a;
  --warn-bg: #2f2a1c;
  --warn-border: #5a4d22;
  --info-bg: #262626;
  --info-border: #454545;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --logo-ink: #ffffff;
  --logo-star: #d6001c;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #d6001c;
    --accent-dark: #a80016;
    --text: #ececec;
    --muted: #a3a3a3;
    --bg: #121212;
    --card: #1c1c1c;
    --surface: #1c1c1c;
    --border: #2e2e2e;
    --soft: #262626;
    --field-border: #454545;
    --chip-bg: #3a2024;
    --tint: #212121;
    --tint-2: #2a2a2a;
    --link: #8ab4f8;
    --quote-bg: #212121;
    --quote-text: #d8d8d8;
    --danger: #ff8a80;
    --danger-bg: #3a1f1d;
    --danger-border: #6b2f2a;
    --warn-bg: #2f2a1c;
    --warn-border: #5a4d22;
    --info-bg: #262626;
    --info-border: #454545;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --logo-ink: #ffffff;
    --logo-star: #d6001c;
    color-scheme: dark;
  }
}
/* Quill w ciemnym motywie */
:root[data-theme="dark"] .ql-snow .ql-stroke { stroke: #cfcfcf; }
:root[data-theme="dark"] .ql-snow .ql-fill { fill: #cfcfcf; }
:root[data-theme="dark"] .ql-snow .ql-picker { color: #cfcfcf; }
:root[data-theme="dark"] .ql-snow .ql-picker-options { background: var(--tint-2); border-color: var(--field-border); }
:root[data-theme="dark"] .ql-snow.ql-toolbar button:hover .ql-stroke,
:root[data-theme="dark"] .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--accent); }
:root[data-theme="dark"] .ql-editor.ql-blank::before { color: var(--muted); }
:root[data-theme="dark"] .ql-snow .ql-tooltip { background: var(--tint-2); color: var(--text); border-color: var(--field-border); box-shadow: none; }
:root[data-theme="dark"] .ql-snow .ql-tooltip input[type=text] { background: var(--surface); color: var(--text); border-color: var(--field-border); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ql-snow .ql-stroke { stroke: #cfcfcf; }
  :root:not([data-theme="light"]) .ql-snow .ql-fill { fill: #cfcfcf; }
  :root:not([data-theme="light"]) .ql-snow .ql-picker { color: #cfcfcf; }
  :root:not([data-theme="light"]) .ql-snow .ql-picker-options { background: var(--tint-2); border-color: var(--field-border); }
  :root:not([data-theme="light"]) .ql-snow.ql-toolbar button:hover .ql-stroke,
  :root:not([data-theme="light"]) .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--accent); }
  :root:not([data-theme="light"]) .ql-editor.ql-blank::before { color: var(--muted); }
  :root:not([data-theme="light"]) .ql-snow .ql-tooltip { background: var(--tint-2); color: var(--text); border-color: var(--field-border); box-shadow: none; }
  :root:not([data-theme="light"]) .ql-snow .ql-tooltip input[type=text] { background: var(--surface); color: var(--text); border-color: var(--field-border); }
}
.theme-toggle { padding: 8px 10px; line-height: 1; font-size: 1rem; }
.theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: none; }
}

/* =========================================================
   Wiele kategorii, recenzje, podpisy i źródła zdjęć, dodatki
   ========================================================= */
a.chip { text-decoration: none; }
a.chip:hover { filter: brightness(.95); }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }

/* Źródło zdjęcia – mały napis na zdjęciu (opcjonalny) */
.fig-media, .media-wrap { position: relative; display: block; }
.img-source {
  position: absolute; right: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 1px 7px;
  font: 600 .68rem/1.5 var(--font); color: #fff; background: rgba(0, 0, 0, .55);
  border-radius: 3px; letter-spacing: .02em; pointer-events: none;
}
.img-source::before { content: "Źródło: "; opacity: .8; font-weight: 500; }
.article-body figure.article-figure .fig-media { display: inline-block; max-width: 100%; }
.article-hero figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); text-align: center; }

/* Ocena recenzji – kółko w stylu Pitchfork */
.review {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 220px); gap: 28px; align-items: center;
  margin: 20px 0 24px; padding: 20px 24px; background: var(--tint); border: 1px solid var(--border); border-radius: var(--radius);
}
.review-nocover { grid-template-columns: auto minmax(0, 1fr); }

.review-kind { font: 800 .75rem var(--font); letter-spacing: .1em; text-transform: uppercase; }
.review-work { margin: 6px 0 10px; font: italic 800 clamp(1.8rem, 4vw, 2.8rem)/1.1 var(--font-serif); }
.review-artist { font-size: 1.3rem; text-decoration: underline; text-underline-offset: 3px; }
.review-year { margin-top: 12px; font-size: .85rem; color: var(--muted); }
.review-cover img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.card-media { position: relative; }

/* Pasek postępu czytania, przycisk „do góry”, skip-link */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 200; transition: width .1s linear; }
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow); cursor: pointer; font-size: 1.1rem;
}
.skip-link { position: absolute; left: -999px; top: 0; z-index: 300; padding: 8px 14px; background: var(--accent); color: #fff; }
.skip-link:focus { left: 8px; top: 8px; }

@media (max-width: 720px) {
  .review { grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 16px; }
  .review-cover { grid-column: 1 / -1; max-width: 260px; }

}
@media print {
  .site-header, .breaking, .site-footer, .article-top, .related, .to-top, .read-progress { display: none !important; }
  body { background: #fff; color: #000; }
  .article { border: 0; box-shadow: none; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.review-cover { margin: 0; }
.review-cover figcaption { margin-top: 6px; font-size: .78rem; color: var(--muted); }
.review-cover .media-wrap img { display: block; }

/* Ikony motywu (SVG, kolor = kolor tekstu: biały w ciemnym motywie) */
.theme-toggle svg { display: block; }
.theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle { color: #fff; } }

/* Ocena: zwykłe kółko oraz wyróżnione (powyżej 8,5) ze strzałkami */
:root { --best: #ef4b3c; }
.score-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; }

.score-wrap.best { color: var(--best); }

/* =========================================================
   Nowy układ: lewy panel (profil + kategorie), środek, prawa kolumna
   ========================================================= */
:root { --radius: 14px; --bg: #f2f3f6; }
:root[data-theme="dark"] { --bg: #121212; }
.container.wide { max-width: 1420px; }

/* Nagłówek */
.site-header { box-shadow: 0 1px 0 var(--border); }
.header-top { gap: 20px; }
.main-nav { display: flex; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  font-weight: 700; font-size: .92rem; color: var(--muted); transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--soft); color: var(--text); }
.search { position: relative; margin-left: auto; max-width: 380px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; background: var(--soft); border-color: transparent; }
.search input:focus { background: var(--surface); }
.auth { margin-left: 0; flex-wrap: nowrap; }
.btn-icon { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.theme-toggle { padding: 0; }

/* Siatka układu */
.layout {
  display: grid; grid-template-columns: 230px minmax(0, 1fr) 330px; gap: 28px; align-items: start; padding-top: 24px; padding-bottom: 48px;
}
.layout > .app { padding: 0; min-width: 0; }
.side-left, .side-right { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; scrollbar-width: thin; }
.side-left { display: flex; flex-direction: column; gap: 16px; }
#layout[data-view="editor"] { grid-template-columns: minmax(0, 1fr); }
#layout[data-view="editor"] .side-left, #layout[data-view="editor"] .side-right { display: none; }
#layout[data-view="panel"], #layout[data-view="settings"] { grid-template-columns: 230px minmax(0, 1fr); }
#layout[data-view="panel"] .side-right, #layout[data-view="settings"] .side-right { display: none; }

/* Profil */
.profile-card, .side-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
}
.profile-card { display: none; }
.is-admin .profile-card { display: block; }
.profile-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.profile-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.profile-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-info .muted { font-size: .75rem; }
.profile-actions { display: flex; flex-direction: column; gap: 8px; }

.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 1rem;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 88px; height: 88px; font-size: 1.8rem; }

.settings-avatar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.settings-avatar-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* Kategorie */
.side-title { margin: 0 0 10px; font-size: 1.15rem; font-weight: 800; }
.cat-list { display: flex; flex-direction: column; gap: 2px; padding: 0; overflow: visible; }
.cat-list .chip-btn {
  text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; font-weight: 600; font-size: .92rem; color: var(--muted);
}
.cat-list .chip-btn:hover { background: var(--soft); color: var(--text); }
.cat-list .chip-btn.active { color: var(--accent); background: var(--chip-bg); border-bottom: 0; }

/* Prawa kolumna */
.side-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.side-head .side-title { margin: 0; }
.side-all { font-size: .8rem; font-weight: 700; color: var(--muted); }
.side-all:hover { color: var(--accent); }
.side-list { display: flex; flex-direction: column; gap: 16px; }
.side-item { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.side-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16, 24, 40, .12); }
.side-media { display: block; aspect-ratio: 16 / 9; background: var(--soft); overflow: hidden; }
.side-media img { width: 100%; height: 100%; object-fit: cover; }
.side-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.side-item-title { margin: 0; font-size: .98rem; line-height: 1.3; }
.side-item-title a:hover { color: var(--accent); }
.side-time { font-size: .75rem; color: var(--muted); }

/* Środek: ładniejsze kafle i hero */
.app .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 14px 16px 16px; }
.card-title { font-size: 1.08rem; line-height: 1.3; }
.chip { border-radius: 999px; padding: 3px 10px; }
.hero { border-radius: 18px; min-height: 380px; }
.article { max-width: none; border: 0; border-radius: 18px; padding: 28px 32px; }
.article-hero img { border-radius: var(--radius); }
.section-title { border-left: 0; padding-left: 0; font-size: 1.25rem; }
.grid.is-square .card-media { aspect-ratio: 1 / 1; }
.grid.is-square .card-media img { object-fit: contain; background: var(--soft); }
.review-cover img { object-fit: contain; background: var(--soft); }

/* Pasek PILNE – wyśrodkowany lub przewijany */
.breaking-inner { gap: 16px; }
.ticker { flex: 1; min-width: 0; overflow: hidden; }
.ticker-track { display: flex; justify-content: center; white-space: nowrap; }
.ticker-set { display: inline-flex; align-items: center; gap: 14px; flex: none; }
.ticker-item { font-weight: 700; }
.ticker-item:hover { text-decoration: underline; }
.ticker-dot { opacity: .85; }
.ticker-track.is-scrolling { justify-content: flex-start; width: max-content; animation: ticker var(--ticker-duration, 30s) linear infinite; }
.ticker-track.is-scrolling .ticker-set { padding-right: 14px; }
.ticker-track.is-scrolling .ticker-set::after { content: "•"; margin-left: 14px; opacity: .85; }
.ticker:hover .ticker-track.is-scrolling { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track.is-scrolling { animation: none; } .ticker { overflow-x: auto; } }

/* Cytat jako osobny blok (cytat + źródło + autor) */
.article-quote {
  margin: .9em 0; padding: 18px 24px 18px 28px; background: var(--quote-bg); border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0; cursor: default;
}
.ql-editor aside.article-quote { cursor: pointer; }
.article-quote p.q-text { margin: 0; font-size: 1.22em; line-height: 1.5; font-style: italic; white-space: pre-line; color: var(--quote-text); }
.article-quote p.q-text::before { content: "„"; }
.article-quote p.q-text::after { content: "”"; }
.article-quote p.q-by { margin: 10px 0 0; font: 600 .85rem/1.4 var(--font); font-style: normal; color: var(--muted); }
.article-quote .q-author { color: var(--text); font-weight: 800; }
.article-quote .q-author + .q-source::before { content: " — "; }
.ql-snow .ql-formats button.ql-pullquote { width: 28px; }

/* Responsywność układu */
@media (max-width: 1220px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); }
  .side-right { position: static; max-height: none; grid-column: 2; }
  .side-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .layout, #layout[data-view="panel"], #layout[data-view="settings"] { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .side-left { position: static; max-height: none; }
  .side-right { grid-column: 1; }
  .cat-list { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .cat-list .chip-btn { background: var(--soft); border-radius: 999px; }
  .main-nav .nav-link span { display: none; }
  .app .grid { grid-template-columns: 1fr; }
  .side-list { grid-template-columns: 1fr; }
  .article { padding: 18px; }
  .header-top { gap: 10px; }
  .logo { font-size: 1.4rem; }
}
@media print { .side-left, .side-right { display: none !important; } }

/* =========================================================
   Wersja 4: strona główna, cytaty, recenzja, edytor
   ========================================================= */

/* Strona główna: bez prawej kolumny (nic się nie dubluje) */
#layout[data-view="home"] { grid-template-columns: 230px minmax(0, 1fr); }
#layout[data-view="home"][data-cat="1"] { grid-template-columns: 230px minmax(0, 1fr) 330px; }
#layout[data-view="home"][data-cat="0"] .side-right { display: none; }
#layout[data-view="home"][data-cat="0"] .app .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 28px; }
.home-top.single { grid-template-columns: minmax(0, 1fr); }
.home-top .hero { min-height: 440px; height: 100%; margin: 0; }
.home-tiles { display: grid; grid-template-rows: 1fr 1fr; gap: 18px; }
.tile { position: relative; overflow: hidden; border-radius: var(--radius); min-height: 200px; background: #222; color: #fff; cursor: pointer; box-shadow: var(--shadow); }
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tile:hover .tile-img { transform: scale(1.04); }
.tile-content {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.25) 60%, rgba(0,0,0,0) 100%);
}
.tile-title { margin: 0; font-size: 1.08rem; line-height: 1.25; }
.tile-title a:hover { text-decoration: underline; }
.tile-time { font-size: .75rem; opacity: .8; }
.tile .chip { color: #fff; background: rgba(255,255,255,.2); }
.section-title { margin: 8px 0 14px; }

/* Cytat – wydawniczy, jeden spójny wygląd */
.article-quote {
  position: relative; margin: 1.1em 0; padding: 30px 30px 22px 30px; border: 0; border-radius: 16px; background: var(--quote-bg);
}
.article-quote::before {
  content: "\201C"; position: absolute; left: 22px; top: -6px; font: 800 4.2rem/1 Georgia, "Times New Roman", serif; color: var(--accent);
}
.article-quote p.q-text {
  margin: 0; padding-top: 16px; font: 600 1.28em/1.5 var(--font-serif); font-style: normal; color: var(--text); white-space: pre-line;
}
.article-quote p.q-text::before, .article-quote p.q-text::after { content: none; }
.article-quote p.q-by {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 16px 0 0; padding-top: 12px;
  border-top: 1px solid var(--border); font: 600 .82rem/1.4 var(--font); font-style: normal; color: var(--muted);
}
.article-quote .q-author { color: var(--text); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
.article-quote .q-author + .q-source::before { content: "·"; margin-right: 10px; }
.article-quote .q-source { font-style: italic; }

/* Recenzja: układ odporny na wąski środek */
.article { container-type: inline-size; container-name: art; }
.review { grid-template-columns: auto minmax(0, 1fr) clamp(130px, 26cqw, 230px); gap: clamp(14px, 3cqw, 28px); }
.review-work { font-size: clamp(1.4rem, 4.2cqw, 2.5rem); overflow-wrap: anywhere; hyphens: auto; }
.review-artist { overflow-wrap: anywhere; }
@container art (max-width: 640px) {
  .review { grid-template-columns: auto minmax(0, 1fr); }
  .review-cover { grid-column: 1 / -1; max-width: 240px; }
  
}

/* Artykuł – czytelniej */
.article-lead { padding-left: 14px; border-left: 4px solid var(--accent); font-weight: 600; color: var(--text); }
.article-body { max-width: 74ch; }
.article-body figure img, .article-body .fig-media img { border-radius: 12px; }

/* Edytor – prostszy i ładniejszy */

@media (max-width: 1220px) {
  #layout[data-view="home"] .app .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-top .hero { min-height: 380px; }
}
@media (max-width: 860px) {
  #layout[data-view="home"] { grid-template-columns: minmax(0, 1fr); }
  #layout[data-view="home"] .app .grid { grid-template-columns: 1fr; }
  .home-top { grid-template-columns: 1fr; }
  .home-tiles { grid-template-columns: 1fr 1fr; grid-template-rows: none; }

}
@media (max-width: 520px) { .home-tiles { grid-template-columns: 1fr; } }

/* Miernik oceny (łuk wypełnia się proporcjonalnie do oceny) */
.score-gauge { width: clamp(150px, 22cqw, 210px); height: auto; display: block; overflow: visible; }
.score-gauge .gauge-track, .score-gauge .gauge-fill { fill: none; stroke-width: 16; stroke-linecap: round; }
.score-gauge .gauge-track { stroke: var(--tint-2); }
.score-gauge .gauge-fill { stroke: var(--text); transition: stroke-dasharray .6s ease; }
.score-gauge .gauge-num { font: 900 40px var(--font); letter-spacing: -.03em; fill: var(--text); }
.score-gauge .gauge-ticks path { stroke: var(--best); stroke-width: 3.5; stroke-linecap: round; fill: none; }
.score-wrap { display: block; }
.score-wrap.best .gauge-fill { stroke: var(--best); }
.score-wrap.best .gauge-num { fill: var(--best); }
@container art (max-width: 640px) { .score-gauge { width: 150px; } }

/* Prawa kolumna znika, gdy nie ma czego pokazać */
#layout[data-view="article"][data-right="0"] { grid-template-columns: 230px minmax(0, 1fr); }
#layout[data-view="home"][data-cat="1"][data-right="0"] { grid-template-columns: 230px minmax(0, 1fr); }
@media (max-width: 1220px) { #layout[data-view="home"][data-cat="1"] { grid-template-columns: 220px minmax(0, 1fr); } }
@media (max-width: 860px) { #layout[data-view="home"][data-cat="1"], #layout[data-view="article"][data-right="0"] { grid-template-columns: minmax(0, 1fr); } }

/* Cytat – wersja 3: elegancki pasek akcentu, kursywa szeryfowa, podpis pod spodem */
.article-quote {
  position: relative; margin: 1.3em 0; padding: 8px 22px 8px 26px; border: 0; border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0; background: linear-gradient(90deg, var(--quote-bg), transparent 92%);
}
.article-quote::before { content: none; }
.article-quote p.q-text {
  margin: 0; padding: 0; font: italic 500 1.3em/1.5 var(--font-serif); color: var(--text); white-space: pre-line;
}
.article-quote p.q-text::before { content: "\201E"; color: var(--accent); font-style: normal; font-weight: 800; }
.article-quote p.q-text::after { content: "\201D"; color: var(--accent); font-style: normal; font-weight: 800; }
.article-quote p.q-by {
  display: block; margin: 10px 0 0; padding: 0; border: 0; font: 600 .9rem/1.4 var(--font); font-style: normal; color: var(--muted);
}
.article-quote .q-author { color: var(--text); font-weight: 800; text-transform: none; letter-spacing: 0; font-size: inherit; }
.article-quote .q-author::before, .article-quote .q-source::before { content: "— "; margin: 0; }
.article-quote .q-author + .q-source::before { content: ", "; margin: 0; }
.article-quote .q-source { font-style: italic; font-weight: 500; }

/* Logo Śliska News (inline SVG – kolory zależne od motywu) */
.logo { display: flex; align-items: center; }
.logo svg { height: 40px; width: auto; display: block; }
.logo-ink { fill: var(--logo-ink); }
.logo-star { fill: var(--logo-star); }
@media (max-width: 860px) { .logo svg { height: 32px; } }

/* Logo: nieco cieńszy napis (obrys w kolorze tła zjada krawędzie liter) */
.logo-ink { stroke: var(--surface); stroke-width: 3.2; stroke-linejoin: round; }

/* Kafle na wąskich ekranach (przebija regułę dla strony głównej bez kategorii) */
@media (max-width: 1220px) {
  #layout[data-view="home"][data-cat="0"] .app .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  #layout[data-view="home"][data-cat="0"] .app .grid,
  #layout[data-view="home"] .app .grid { grid-template-columns: minmax(0, 1fr); }
}

/* Recenzja: okładka wyśrodkowana, na telefonie układ w jednej kolumnie */
.review-cover { justify-self: center; }
@container art (max-width: 640px) {
  .review-cover { max-width: 280px; width: 100%; justify-self: center; }
}
@container art (max-width: 520px) {
  .review { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 16px; padding: 20px 16px 22px; }
  .review .score-gauge { margin: 0 auto; width: 190px; }
  .review-work { margin: 4px 0 8px; font-size: clamp(1.6rem, 8cqw, 2.1rem); }
  .review-year { margin-top: 8px; }
  .review-cover { max-width: min(320px, 100%); }
  .review-cover img { border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
}

/* Pasek PILNE – dopracowany wygląd */
.breaking {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 78%, #000), var(--accent) 50%, color-mix(in srgb, var(--accent) 78%, #000));
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.18);
}
.breaking-inner { padding-top: 7px; padding-bottom: 7px; }
.breaking-label {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 10px 3px 9px; border-radius: 999px;
  font-size: .7rem; letter-spacing: .12em; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.breaking-label::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: pilne-pulse 1.6s ease-in-out infinite;
}
@keyframes pilne-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .breaking-label::before { animation: none; } }
.ticker-item { font-weight: 600; font-size: .95rem; letter-spacing: .005em; }
.ticker-dot, .ticker-track.is-scrolling .ticker-set::after { font-size: .6rem; opacity: .6; }
.ticker { -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }

/* ===== Układ dla nowych widoków ===== */
#layout[data-view="ranking"], #layout[data-view="notfound"] { grid-template-columns: 230px minmax(0, 1fr); }
#layout[data-view="ranking"] .side-right, #layout[data-view="notfound"] .side-right { display: none; }
@media (max-width: 860px) {
  #layout[data-view="ranking"], #layout[data-view="notfound"] { grid-template-columns: minmax(0, 1fr); }
}
.nav-link.is-active { color: var(--text); background: var(--soft); }

/* ===== Ranking ocen ===== */
.rank-head { margin: 8px 0 22px; }
.rank-eyebrow { display: inline-block; font: 800 .75rem var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); padding-bottom: 8px; border-bottom: 3px solid var(--accent); }
.rank-title { margin: 14px 0 6px; font: 900 clamp(2rem, 5vw, 3rem)/1.05 var(--font); letter-spacing: -.035em; }
.rank-sub { margin: 0; color: var(--muted); max-width: 60ch; }
.rank-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rank-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rank-chip { font: 700 .85rem var(--font); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted); cursor: pointer; }
.rank-chip:hover { color: var(--text); }
.rank-chip.active { background: var(--text); color: var(--card); border-color: var(--text); }
.rank-year { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.rank-year select { font: inherit; font-weight: 600; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--field-border); background: var(--surface); color: var(--text); }
.rank-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rank-row { display: grid; grid-template-columns: 52px 76px minmax(0, 1fr) 190px; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); position: relative; transition: background .15s; }
.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { background: var(--tint); }
.rank-row.is-best::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.rank-pos { font: italic 800 2rem/1 var(--font-serif); color: var(--muted); text-align: center; }
.rank-row:nth-child(-n+3) .rank-pos { color: var(--text); }
.rank-cover { display: block; width: 76px; height: 76px; border-radius: 6px; overflow: hidden; background: var(--soft); }
.rank-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rank-meta { font: 800 .7rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rank-work { font: italic 800 1.25rem/1.2 var(--font-serif); overflow-wrap: anywhere; }
.rank-work:hover, .rank-artist:hover { text-decoration: underline; }
.rank-artist { font-size: .95rem; color: var(--muted); }
.rank-score { display: flex; flex-direction: column; gap: 6px; }
.rank-num { display: inline-flex; align-items: center; gap: 6px; font: 900 1.7rem/1 var(--font); letter-spacing: -.03em; }
.rank-star { width: 18px; height: 16px; fill: var(--accent); }
.rank-bar { display: block; height: 6px; border-radius: 99px; background: var(--tint-2, var(--soft)); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 99px; background: var(--text); }
.is-best .rank-bar i { background: var(--accent); }
@media (max-width: 640px) {
  .rank-row { grid-template-columns: 30px 60px minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
  .rank-pos { font-size: 1.4rem; }
  .rank-cover { width: 60px; height: 60px; }
  .rank-score { grid-column: 2 / -1; flex-direction: row; align-items: center; gap: 12px; }
  .rank-bar { flex: 1; }
  .rank-work { font-size: 1.1rem; }
}

/* ===== Strona wykonawcy / tagu ===== */
.collection-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 4px 0 8px; padding: 22px 24px; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.collection-kind { font: 800 .72rem var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-top: 8px; }
.collection-name { margin: 0; font: italic 800 clamp(1.9rem, 5vw, 3rem)/1.1 var(--font-serif); overflow-wrap: anywhere; }
.collection-name.is-tag { font: 900 clamp(1.8rem, 4.5vw, 2.6rem)/1.1 var(--font); font-style: normal; letter-spacing: -.03em; }
.collection-stats { margin: 0; color: var(--muted); font-weight: 600; }

/* ===== Tagi, udostępnianie, czytaj dalej ===== */
.review-artist a { color: inherit; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; }
.tag { font: 700 .85rem var(--font); padding: 5px 12px; border-radius: 999px; background: var(--soft); color: var(--muted); border: 1px solid var(--border); }
.tag:hover { color: var(--accent); border-color: var(--accent); }
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--border); }
.share-label { font: 800 .75rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.share-btn { font: 700 .85rem var(--font); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.related { margin: 36px 0 8px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }

/* ===== 404 i brak wyników ===== */
.nf { text-align: center; padding: 48px 16px 36px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.nf-code { font: italic 900 clamp(4.5rem, 16vw, 8rem)/1 var(--font-serif); color: var(--accent); letter-spacing: -.04em; }
.nf-title { margin: 6px 0 8px; font-size: 1.8rem; letter-spacing: -.02em; }
.nf-text { margin: 0 auto 20px; max-width: 46ch; color: var(--muted); }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.empty-search { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-search strong { color: var(--text); font-size: 1.15rem; }
.empty-search p { margin: 0 0 6px; }
.empty-icon { font-size: 1.8rem; }

/* ===== Panel: kopia zapasowa ===== */

#home-status .related { color: var(--text); text-align: left; }
.collection-head { margin-bottom: 18px; }

/* =========================================================
   Wersja 2: dopracowanie wyglądu
   ========================================================= */
::selection { background: var(--accent); color: #fff; }

/* Nagłówek: lekko przezroczysty z rozmyciem tła */
.site-header {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}

/* Płynne wejście widoków i kafli */
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#app > section:not([hidden]) { animation: view-in .3s ease both; }
.grid .card, .related-grid .card, .rank-row { animation: card-in .5s cubic-bezier(.2, .7, .2, 1) both; }
.grid .card:nth-child(2), .related-grid .card:nth-child(2) { animation-delay: .05s; }
.grid .card:nth-child(3), .related-grid .card:nth-child(3) { animation-delay: .1s; }
.grid .card:nth-child(4) { animation-delay: .15s; }
.grid .card:nth-child(5) { animation-delay: .2s; }
.grid .card:nth-child(6) { animation-delay: .25s; }
@media (prefers-reduced-motion: reduce) {
  #app > section:not([hidden]), .grid .card, .related-grid .card, .rank-row { animation: none; }
}

/* Kafle */
.card { border-radius: 14px; border-color: transparent; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .05); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(16, 24, 40, .16); }
:root[data-theme="dark"] .card { border-color: var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card { border-color: var(--border); } }
.card-media img, .side-media img { transition: transform .5s ease; }
.card:hover .card-media img, .side-item:hover .side-media img { transform: scale(1.06); }
.card-title { font-size: 1.12rem; font-weight: 800; letter-spacing: -.012em; }
.card-meta time { letter-spacing: .01em; }

/* Nagłówki sekcji z czerwonym akcentem */
.section-title, #grid-title { position: relative; padding-left: 14px; font-weight: 900; letter-spacing: -.02em; }
.section-title::before, #grid-title::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 3px; background: var(--accent); }

/* Temat dnia */
.hero { border-radius: 18px; box-shadow: 0 10px 30px rgba(16, 24, 40, .22); }
.hero::after { background: linear-gradient(to top, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .5) 42%, rgba(0, 0, 0, .05) 80%); }
.hero-title { font-weight: 900; letter-spacing: -.03em; text-shadow: 0 2px 14px rgba(0, 0, 0, .45); }
.hero-flag { box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.tile { border-radius: 14px; }
.tile-title { font-weight: 800; letter-spacing: -.01em; }

/* Lewy panel */
.side-left .profile-card, .side-left .panel { border-radius: 14px; }
.cat-list .chip-btn { transition: background .15s, color .15s, transform .15s; }
.cat-list .chip-btn:hover { transform: translateX(3px); }

/* Artykuł */
.article { border-radius: 18px; }
.article-header h1 { font-size: clamp(1.9rem, 4.4cqw, 2.9rem); line-height: 1.08; font-weight: 900; letter-spacing: -.035em; }
.article-lead { font-size: 1.22rem; line-height: 1.55; color: var(--muted); font-weight: 500; }
.article-body p { line-height: 1.75; }
.article-hero img { border-radius: 14px; }

/* Cytaty – mniejsze */
.article-quote { margin: .7em 0; padding: 12px 18px 12px 20px; border-radius: 0 10px 10px 0; }
.article-quote p.q-text { font-size: 1.02em; line-height: 1.5; }
.article-quote p.q-by { margin-top: 6px; font-size: .8rem; }

/* Stopka */
.site-footer { background: #0e0e10; color: #a9a9b0; border-top: 0; }
.site-footer .footer-inner { color: #8a8a93; }

/* Usuwanie artykułu – wybór */

/* Propozycje tagów w edytorze */

/* Górny panel na telefonie */
@media (max-width: 860px) {
  .header-top { flex-wrap: wrap; gap: 8px 10px; padding-top: 8px; padding-bottom: 10px; }
  .logo { order: 1; }
  .main-nav { order: 2; gap: 0; }
  .auth { order: 3; margin-left: auto; display: flex; gap: 6px; }
  .search { order: 4; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .nav-link { padding: 8px 10px; }
  .btn-icon { width: 36px; height: 36px; }
}
@media (max-width: 480px) {
  .logo svg { height: 26px; }
  .nav-link { padding: 8px; }
  .breaking-label { font-size: .62rem; padding: 2px 8px 2px 7px; }
  .ticker-item { font-size: .85rem; }
}

@keyframes pop-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }

/* ===== Zgłoś temat, dokumenty prawne, miernik rozmiaru ===== */
#layout[data-view="tip"], #layout[data-view="legal"] { grid-template-columns: 230px minmax(0, 1fr); }
#layout[data-view="tip"] .side-right, #layout[data-view="legal"] .side-right { display: none; }
@media (max-width: 860px) { #layout[data-view="tip"], #layout[data-view="legal"] { grid-template-columns: minmax(0, 1fr); } }

.tip-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000)); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); transition: transform .2s; }
.tip-card:hover { transform: translateY(-2px); }
.tip-card strong { font-size: 1.1rem; letter-spacing: -.01em; }
.tip-card span { font-size: .85rem; opacity: .92; }
.tip-card em { margin-top: 6px; font-style: normal; font-weight: 800; font-size: .85rem; }

.tip-form { max-width: 680px; gap: 16px; position: relative; }
.tip-form textarea { width: 100%; padding: 9px 12px; font: inherit; background: var(--surface); color: var(--text); border: 1px solid var(--field-border); border-radius: 6px; resize: vertical; }
.tip-form .field input[type="text"] { width: 100%; }
.tip-form .check { font-size: .9rem; }

.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

.legal { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: clamp(20px, 4vw, 40px); max-width: 820px; }
.legal h1 { margin: 0 0 4px; font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 900; letter-spacing: -.03em; }
.legal h2 { margin: 28px 0 8px; font-size: 1.15rem; letter-spacing: -.01em; }
.legal p, .legal li { line-height: 1.7; }
.legal ul { padding-left: 1.2em; }
.legal a { color: var(--link); text-decoration: underline; }
.legal-date { color: var(--muted); font-size: .85rem; margin: 0 0 8px; }
.legal-todo { background: #fff2a8; color: #5a4500; padding: 1px 5px; border-radius: 4px; font-weight: 700; }

/* Ukryte wizualnie (dla czytników ekranu i robotów): lista linków do artykułów */

/* =========================================================
   Design pass – porządki typograficzne i układ (bez zmian animacji)
   ========================================================= */
:root {
  --bg: #f3f4f6;
  --border: #e5e7eb;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .05);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, .06), 0 12px 28px rgba(16, 24, 40, .12);
  --font-serif: "Charter", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --r-lg: 18px;
}

/* Nagłówek */
.site-header { box-shadow: 0 1px 0 var(--border), 0 6px 18px rgba(16, 24, 40, .04); }
.search input { border-color: transparent; background: var(--soft); transition: background .2s, border-color .2s, box-shadow .2s; }
.search input:focus { box-shadow: 0 0 0 4px rgba(214, 0, 28, .1); }

/* Kategorie w panelu bocznym */
.cat-list .chip-btn { position: relative; padding: 9px 12px 9px 16px; border-radius: 10px; font-weight: 600; }
.cat-list .chip-btn.active::before {
  content: ""; position: absolute; left: 4px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent);
}
.cat-list .chip-btn.active { font-weight: 800; }

/* Hero i kafle: spokojniejszy, bardziej „redakcyjny” wygląd */
.hero, .tile { border-radius: var(--r-lg); }
.hero::after { background: linear-gradient(to top, rgba(8, 8, 14, .92) 0%, rgba(8, 8, 14, .5) 42%, rgba(8, 8, 14, .05) 100%); }
.hero-content { padding: 32px 34px; }
.hero-title { font-weight: 800; letter-spacing: -.02em; text-wrap: balance; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }

.hero-flag { border-radius: 6px; padding: 4px 10px; }
.tile-content { padding: 18px; background: linear-gradient(to top, rgba(8, 8, 14, .9) 0%, rgba(8, 8, 14, .4) 55%, rgba(8, 8, 14, 0) 100%); }
.tile-title { font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }

/* Chipy kategorii */
.chip { border-radius: 999px; padding: 3px 10px; font-size: .68rem; letter-spacing: .07em; }
.hero .chip, .tile .chip { backdrop-filter: blur(6px); background: rgba(255, 255, 255, .18); }

/* Karty */
.card { border-radius: var(--r-lg); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.card:hover { box-shadow: var(--shadow-hover); }
.card-body { padding: 16px 18px 18px; gap: 10px; }
.card-title { font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.card-lead { line-height: 1.5; }
.card-meta { font-size: .78rem; color: var(--muted); }

/* Nagłówki sekcji */
.section-title {
  display: flex; align-items: center; gap: 14px; margin: 34px 0 16px; padding: 0; border: 0;
  font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text);
}
.section-title::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); flex: none; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Karty boczne */
.side-card, .profile-card { border-radius: var(--r-lg); }

/* Artykuł */
.article { padding: clamp(20px, 4vw, 44px) clamp(18px, 4.5vw, 52px); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.article-header h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.12; letter-spacing: -.025em; font-weight: 800; text-wrap: balance; margin: 12px 0 14px; }
.article-meta { padding: 12px 0; margin-top: 4px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: .85rem; }
.article-hero { margin: 24px 0 28px; }
.article-hero img { border-radius: 14px; box-shadow: var(--shadow); }
.article-lead { font-size: 1.3rem; line-height: 1.5; font-weight: 600; letter-spacing: -.005em; border-left-width: 3px; padding-left: 18px; }
.article-body { font-size: 1.14rem; line-height: 1.8; margin-inline: auto; }
.article-body p + p { margin-top: .9em; }
.article-body p:empty { display: none; }
.article-body h2 { border-bottom: 0; padding-bottom: 0; font-size: 1.6rem; letter-spacing: -.015em; margin-top: 1.6em; }
.article-top .btn, .article-top button { border-radius: 999px; }

/* Stopka */
.site-footer { margin-top: 48px; }

/* Telefon */
@media (max-width: 860px) {
  .hero-content { padding: 20px; }
  .card-body { padding: 14px 16px 16px; }
}

/* ---------- Porządki: nagłówki sekcji (nadpisanie starej kreski) ---------- */
.section-title, #grid-title { padding-left: 0; }
.section-title::before { position: static; top: auto; bottom: auto; left: auto; }
#grid-title::before { content: none; }

/* ---------- Spójne tytuły podstron ---------- */
.panel-title, .rank-head h1 {
  margin: 8px 0 14px; font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.12;
}
.panel-title::before { content: ""; display: block; width: 36px; height: 4px; margin-bottom: 14px; border-radius: 4px; background: var(--accent); }

/* ---------- Formularze i karty ---------- */
.panel { padding: 20px 22px 22px; border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow); gap: 16px; }
.field > label, .field > .field-label { font-size: .85rem; font-weight: 700; }
.field input, .field textarea, .field select, .tip-form textarea { font-weight: 400; }
.field input[type="text"], .field input[type="email"], .field input[type="url"], .field input[type="password"], .field input[type="datetime-local"], .field select, .field textarea,
.tip-form textarea {
  border-radius: 10px; padding: 11px 14px; background: var(--surface); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus, .tip-form textarea:focus { box-shadow: 0 0 0 4px rgba(214, 0, 28, .1); }
.btn { border-radius: 10px; font-weight: 700; }
.btn-primary { box-shadow: 0 1px 2px rgba(214, 0, 28, .3), 0 4px 12px rgba(214, 0, 28, .18); }

/* Wybór pliku – własny wygląd przycisku */
input[type="file"] { font: inherit; font-size: .88rem; color: var(--muted); max-width: 100%; }
input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 9px 16px; font: 700 .85rem var(--font); color: var(--text); background: var(--surface);
  border: 1px solid var(--field-border); border-radius: 10px; cursor: pointer; transition: border-color .2s, color .2s;
}
input[type="file"]::file-selector-button:hover { border-color: var(--accent); color: var(--accent); }

/* Lista robocza / zgłoszenia */
.panel-list > * { border-radius: 14px; }

/* Panel boczny redaktora */
.side-left .profile-card, .side-left .side-card { box-shadow: var(--shadow); border: 0; }

/* Ranking */
.rank-row { border-radius: 14px; box-shadow: var(--shadow); border: 0; transition: box-shadow .2s; }
.rank-row:hover { box-shadow: var(--shadow-hover); }

/* Strony prawne */
.article-body h2 { scroll-margin-top: 90px; }

/* Ciemny motyw: ten sam czerwony co w jasnym; małe czerwone napisy dostają jaśniejszą wersję tylko dla czytelności */
:root[data-theme="dark"] .chip:not(.badge-urgent),
:root[data-theme="dark"] .cat-list .chip-btn.active,
:root[data-theme="dark"] .chip-btn.active { color: #ffd5da; }
:root[data-theme="dark"] .chip:not(.badge-urgent) { background: rgba(214, 0, 28, .35); }
:root[data-theme="dark"] .cat-list .chip-btn.active { background: rgba(214, 0, 28, .3); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip:not(.badge-urgent),
  :root:not([data-theme="light"]) .cat-list .chip-btn.active { color: #ffd5da; }
  :root:not([data-theme="light"]) .chip:not(.badge-urgent) { background: rgba(214, 0, 28, .35); }
  :root:not([data-theme="light"]) .cat-list .chip-btn.active { background: rgba(214, 0, 28, .3); }
}

/* ---------- Odtwarzacze YouTube / Spotify ---------- */
.article-embed { margin: 1.4em 0; max-width: 100%; }
.article-embed .embed-frame { position: relative; border-radius: 14px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.article-embed.embed-youtube .embed-frame { aspect-ratio: 16 / 9; }
.article-embed.embed-spotify .embed-frame { height: 152px; background: transparent; box-shadow: none; }
.article-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-link { display: inline-block; margin-top: 8px; font: 700 .82rem var(--font); color: var(--muted); text-decoration: none !important; }
.embed-link:hover { color: var(--accent); }
.ql-editor aside.article-embed { padding: 18px 20px; border: 2px dashed var(--field-border); border-radius: 14px; background: var(--soft); cursor: pointer; user-select: none; }
.embed-label { font: 700 .9rem var(--font); color: var(--muted); }
.ql-snow .ql-toolbar button.ql-embed, .ql-toolbar.ql-snow .ql-embed { width: 28px; }

/* ---------- Zapisane ---------- */
.nav-badge { min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: #fff; font: 800 .68rem/1.5 var(--font); text-align: center; }
.saved-item { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.saved-item .card { width: 100%; }
.empty-state { padding: 28px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow); color: var(--muted); }
.muted { color: var(--muted); }
.legal .chip { color: var(--accent); text-decoration: none; }
.muted { margin: 0 0 20px; }

.grid-desc { margin: -6px 0 16px; color: var(--muted); font-size: .95rem; }

/* Instagram w stopce */
.footer-links .footer-ig { display: inline-flex; align-items: center; gap: 7px; }
.footer-links .footer-ig svg { flex: none; }
.footer-links .footer-ig:hover { color: var(--accent); }

/* Stopka na telefonie: czytelna siatka linków, Instagram jako przycisk, prawa autorskie na końcu */
@media (max-width: 700px) {
  .site-footer .footer-inner { flex-direction: column; align-items: stretch; gap: 18px; padding-top: 20px; padding-bottom: 84px; }
  .footer-links { order: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
  .footer-links a { padding: 10px 0; font-size: .92rem; }
  .footer-links .footer-ig {
    grid-column: 1 / -1; justify-content: center; padding: 12px 16px; margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px; color: #fff; font-weight: 700;
  }
  .footer-inner > span:first-child { order: 2; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; text-align: center; }
  .footer-inner .data-mode { order: 3; }
}

/* Stopka – mniejsze odstępy (laptop i telefon) */
.site-footer { margin-top: 24px; }
.layout > .app, .app { padding-bottom: 20px; min-height: 40vh; }
.site-footer .footer-inner { padding-top: 18px; padding-bottom: 20px; align-items: center; }
@media (max-width: 700px) {
  .site-footer { margin-top: 12px; }
  .site-footer .footer-inner { align-items: stretch; gap: 10px; padding-top: 14px; padding-bottom: 24px; }
  .footer-links { gap: 0 16px; }
  .footer-links a { padding: 7px 0; font-size: .9rem; }
  .footer-links .footer-ig { padding: 11px 16px; margin-bottom: 6px; }
  .footer-inner > span:first-child { padding-top: 12px; margin-top: 4px; }
}

/* Temat dnia + kategoria w jednej linii; brak pogrubionej pierwszej litery w artykule */
.hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.hero-tags .hero-flag { margin-bottom: 0; white-space: nowrap; }
.hero-tags .chips { display: inline-flex; flex-wrap: nowrap; gap: 6px; }
.hero-tags .chip { white-space: nowrap; }
.article-body p::first-letter { font-weight: inherit; }

/* Pasek formatowania w edytorze (pogrubienie, cytat…) zostaje na ekranie podczas przewijania */
:root { --hdr-h: 64px; --edhead-h: 0px; }

/* ---------- Szlify: nawigacja między artykułami, dostępność, dotyk ---------- */
.article-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 760px; margin: 36px auto 8px; }
.pager-link { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-lg, 12px); background: var(--card); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; min-width: 0; }
.pager-link:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-hover, var(--shadow)); }
.pager-newer { text-align: right; align-items: flex-end; }
.pager-label { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pager-title { font-weight: 700; line-height: 1.3; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 600px) { .article-pager { grid-template-columns: 1fr; } .pager-newer { text-align: left; align-items: flex-start; } }

html { scroll-padding-top: calc(var(--hdr-h, 64px) + 12px); }
a, button, .chip, .chip-btn, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.article-body p, .card-lead, .legal p { text-wrap: pretty; }
@media print { .article-pager { display: none !important; } }

/* Recenzja (ocena + okładka) pod tekstem artykułu */
.article-main .review { margin: 36px 0 8px; }

/* Stopka zawsze przy dolnej krawędzi ekranu – bez jasnego paska pod nią, gdy treści jest mało */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
#layout { flex: 1 0 auto; }
.site-footer { margin-top: auto; }
body > .site-header, body > .site-footer { flex: none; }

/* ---------- Edytor artykułu: mniej tekstu, zwijane sekcje, wygodniejsze pola ---------- */

.fold { display: block; padding: 0; }
.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-weight: 800; font-size: .9rem; user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
.fold[open] > summary::after { transform: rotate(180deg); }
.fold[open] > summary { border-bottom: 1px solid var(--border); }
.fold > :not(summary) { margin: 12px 16px 0; }
.fold[open] { padding-bottom: 16px; }
.fold > summary:hover { color: var(--accent); }
.fold > summary:focus-visible { outline-offset: -3px; border-radius: var(--radius); }

fieldset.panel { min-width: 0; }

/* Telefon: przyciski edytora zawijają się do kilku rzędów zamiast wychodzić poza ekran */

/* === Dopieszczenie pisania (v20261031b) === */
.modal-box form { display: flex; flex-direction: column; gap: 12px; }
.modal-box .field { margin: 0; }
.modal-box .modal-actions { margin-top: 4px; }

.modal-box h2 { margin-bottom: 14px; }
/* treść w edytorze */
.ql-editor { caret-color: var(--accent); }
.ql-editor p { margin: 0 0 .85em; }
.ql-editor ::selection { background: rgba(214, 0, 28, .22); }
.ql-editor figure.article-figure { padding: 6px; border-radius: 10px; border: 1.5px solid transparent; transition: border-color .15s, background .15s; cursor: pointer; }
.ql-editor figure.article-figure:hover { border-color: var(--field-border); background: var(--soft); }
.ql-editor aside.article-embed:hover, .ql-editor aside.article-quote:hover { border-color: var(--accent); }
.ql-toolbar.ql-snow { border-radius: 12px 12px 0 0; }
.ql-toolbar.ql-snow button { border-radius: 6px; transition: background .12s; }
.ql-toolbar.ql-snow button:hover { background: var(--soft); }
.ql-snow .ql-tooltip { border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 8px 12px; z-index: 20; }
.ql-snow .ql-tooltip input[type=text] { border-radius: 8px; padding: 6px 8px; }

/* === Status, galeria, „Zobacz też”, grafika IG (v20261031c) === */
.badge-status { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; border: 1.5px solid currentColor; line-height: 1.2; white-space: nowrap; }
.badge-status.st-potwierdzone { color: #14803c; background: rgba(20, 128, 60, .1); }
.badge-status.st-niepotwierdzone { color: #a15c00; background: rgba(217, 119, 6, .12); }
.badge-status.st-plotka { color: #7c3aed; background: rgba(124, 58, 237, .1); }
:root[data-theme="dark"] .badge-status.st-potwierdzone { color: #4ade80; background: rgba(74, 222, 128, .12); }
:root[data-theme="dark"] .badge-status.st-niepotwierdzone { color: #fbbf24; background: rgba(251, 191, 36, .12); }
:root[data-theme="dark"] .badge-status.st-plotka { color: #c4b5fd; background: rgba(196, 181, 253, .12); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-status.st-potwierdzone { color: #4ade80; background: rgba(74, 222, 128, .12); }
  :root:not([data-theme="light"]) .badge-status.st-niepotwierdzone { color: #fbbf24; background: rgba(251, 191, 36, .12); }
  :root:not([data-theme="light"]) .badge-status.st-plotka { color: #c4b5fd; background: rgba(196, 181, 253, .12); }
}
.hero .badge-status { background: rgba(0, 0, 0, .45); color: #fff; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* galeria */
figure.article-gallery { position: relative; margin: 1em auto; text-align: center; }
figure.article-gallery .gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 0; border-radius: 12px; background: var(--soft); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
figure.article-gallery .gallery-track img { flex: 0 0 100%; width: 100%; max-height: 520px; object-fit: contain; scroll-snap-align: center; display: block; margin: 0; border-radius: 0; }
.article-body figure.article-gallery { cursor: ew-resize; }
.ql-editor figure.article-gallery { cursor: pointer; padding: 6px; border: 1.5px solid transparent; border-radius: 12px; }
.ql-editor figure.article-gallery:hover { border-color: var(--field-border); background: var(--soft); }
figure.article-gallery .gallery-count { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, .65); color: #fff; font: 700 .72rem/1 var(--font); padding: 6px 10px; border-radius: 999px; pointer-events: none; }
.ql-editor figure.article-gallery .gallery-count { top: 18px; right: 18px; }
figure.article-gallery figcaption { margin-top: 6px; font: .85rem/1.4 var(--font); color: var(--muted); }

/* okno galerii */

/* „Zobacz też” w edytorze */

/* okno grafiki IG */

/* autor ze zdjęciem profilowym */
.avatar-sm { width: 28px; height: 28px; font-size: .68rem; }
.author-line { display: inline-flex; align-items: center; gap: 8px; }

/* === Przeczytane, tryb czytania, podgląd, instalacja (v20261031e) === */

.pv-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* === Wyszukiwarka, archiwum, NOWE, czytanie na głos, błędy (v20261031g) === */
.search { position: relative; }
.search-suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 280px; z-index: 60; background: var(--card, #fff); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 38px rgba(0, 0, 0, .2); padding: 6px; max-height: 70vh; overflow-y: auto; }
.search-suggest[hidden] { display: none; }
.sg-head { padding: 8px 10px 4px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sg-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; color: inherit; font: inherit; font-size: .9rem; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.sg-item:hover, .sg-item.is-active { background: var(--soft); }
.sg-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; background: rgba(214, 0, 28, .1); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; }
.sg-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sg-item small { color: var(--muted); font-size: .72rem; white-space: nowrap; }

.badge-new { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: #0a7cff; color: #fff; font-size: .64rem; font-weight: 800; letter-spacing: .06em; line-height: 1.2; }
.new-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 18px; border-radius: 12px; background: rgba(10, 124, 255, .09); border: 1px solid rgba(10, 124, 255, .25); font-size: .9rem; }

.share-report { margin-left: auto; color: var(--muted); }

/* === Szybkie Newsy === */
.quick-strip { margin: 0 0 24px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--card, #fff); }
.quick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.quick-head .section-title { margin: 0; }
.quick-all { font-size: .82rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.quick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.quick-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.quick-item:first-child { border-top: 0; }
.quick-time { flex: none; width: 46px; font-size: .78rem; font-weight: 800; color: var(--accent); padding-top: 2px; }
.quick-body { flex: 1; min-width: 0; }
.quick-body p { margin: 0 0 6px; font-size: .98rem; line-height: 1.45; font-weight: 600; }
.quick-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .8rem; }
.quick-src { color: var(--accent); font-weight: 700; text-decoration: none; }
.quick-src:hover { text-decoration: underline; }
.quick-share { border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; padding: 0; }
.quick-share:hover { color: var(--text); }
.quick-day { margin: 0 0 20px; padding: 6px 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--card, #fff); }
.quick-day-title { margin: 12px 0 2px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Szybkie / archiwum / zapisane: bez pustej prawej kolumny */
#layout[data-view="quick"], #layout[data-view="saved"] { grid-template-columns: 230px minmax(0, 1fr); }
#layout[data-view="quick"] .side-right, #layout[data-view="saved"] .side-right { display: none; }
@media (max-width: 860px) { #layout[data-view="quick"], #layout[data-view="saved"] { grid-template-columns: minmax(0, 1fr); } }

/* ===== Telefon: porządek w nagłówku, pasek kategorii, artykuł ===== */
.btn-ico { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width: 860px) {
  /* nagłówek: logo + nawigacja w 1. rzędzie, wyszukiwarka + motyw/logowanie w 2. */
  .header-top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "logo nav nav" "search search auth"; align-items: center; gap: 6px 10px; padding-top: 8px; padding-bottom: 8px; }
  .logo { grid-area: logo; }
  .main-nav { grid-area: nav; justify-self: end; }
  .search { grid-area: search; max-width: none; margin: 0; min-width: 0; }
  .auth { grid-area: auth; margin: 0; display: flex; gap: 6px; }
  .search input { height: 38px; }
  .btn-icon { width: 38px; height: 38px; }

  /* kategorie, „Masz temat?” i „Nowe” jako wąski pasek u góry */
  .side-left { display: flex; flex-direction: column; gap: 8px; }
  .side-left .side-card { padding: 0; background: none; box-shadow: none; border: 0; border-radius: 0; }
  .side-left .side-title { display: none; }
  .side-left .cat-list { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding: 2px 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .side-left .cat-list::-webkit-scrollbar { display: none; }
  .side-left .cat-list .chip-btn { flex: none; padding: 6px 13px; font-size: .82rem; font-weight: 700; border-radius: 999px; background: var(--card, var(--surface)); border: 1px solid var(--border); white-space: nowrap; }
  .side-left .cat-list .chip-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
  .side-left .cat-list .chip-btn.active::before { display: none; }
  .tip-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-radius: 999px; box-shadow: none; }
  .tip-card strong { font-size: .85rem; }
  .tip-card span { display: none; }
  .tip-card em { margin: 0; font-size: .8rem; }
  .new-banner { padding: 7px 12px; margin-bottom: 12px; font-size: .82rem; border-radius: 999px; }
  .new-banner .btn { padding: 4px 12px; font-size: .78rem; }
  .layout { gap: 12px; }

  /* artykuł: bez kategorii i „Masz temat?”, przyciski jako ikony */
  #layout[data-view="article"] .side-left .side-card, #layout[data-view="article"] .tip-card { display: none; }
  .article-top .btn-ico { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .article-top .btn-ico .lbl { display: none; }
  .article-top { flex-wrap: nowrap; }
  .article-top .top-actions { flex-wrap: nowrap; margin-left: auto; }
  .article-top > .btn:first-child { font-size: 0; padding: 0; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
  .article-top > .btn:first-child::before { content: "←"; font-size: 1.15rem; }
  /* stopka: ostatnia linia nie chowa się pod przyciskiem „do góry” */
  .site-footer .footer-inner { padding-bottom: 88px; }
}

@media (max-width: 860px) { .new-banner { flex-wrap: nowrap; border-radius: 14px; } }
@media (max-width: 860px) { .new-banner span { line-height: 1.25; } }

/* „Temat dnia” + kategorie + NOWE: małe, smukłe, na górze zdjęcia */
.hero-tags { position: absolute; top: 14px; left: 16px; right: 16px; z-index: 2; display: flex; flex-wrap: nowrap; align-items: center; gap: 5px; margin: 0; overflow: hidden; }
.hero-tags .chips { display: inline-flex; flex-wrap: nowrap; gap: 5px; }
.hero-tags .hero-flag, .hero-tags .chip { font-size: .62rem; line-height: 1; padding: 5px 9px; border-radius: 999px; letter-spacing: .06em; white-space: nowrap; box-shadow: none; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 80px; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, .45), transparent); }

/* Meta artykułu: jedna czysta linia – autor · data · czas czytania */
.article-meta { align-items: center; gap: 6px 0; }
.article-meta > * { display: inline-flex; align-items: center; }
.article-meta > * + *::before { content: "·"; margin: 0 10px; color: var(--muted); opacity: .7; font-weight: 700; }
.article-meta .author-line { gap: 8px; }

/* Karuzela: siatka slajdów do wyboru */

/* Panel redaktora */
.profile-card { padding: 18px; }
.profile-top { gap: 14px; margin-bottom: 14px; }
.profile-top .avatar { width: 68px; height: 68px; flex: none; font-size: 1.4rem; }
.avatar-ring { box-shadow: 0 0 0 3px var(--surface, #fff), 0 0 0 5px var(--accent); }
.profile-info strong { font-size: 1.12rem; letter-spacing: -.01em; white-space: normal; line-height: 1.2; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; align-self: flex-start; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); font-size: .72rem; font-weight: 700; }
.role-chip i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }

.profile-actions { gap: 6px; }

.pa-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-weight: 700; font-size: .9rem; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.pa-row svg { flex: none; color: var(--muted); }
.pa-row span { flex: 1; }
.pa-row:hover { background: var(--soft); }
.pa-row em { font-style: normal; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.pa-row em[hidden] { display: none; }
.pa-logout { margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; padding-top: 14px; color: var(--muted); font-weight: 600; }
.pa-logout:hover { color: var(--accent); background: transparent; }
.pa-logout:hover svg { color: var(--accent); }
@media (max-width: 860px) {
  .profile-card { padding: 14px; }
  .profile-top .avatar { width: 56px; height: 56px; }
  .profile-actions { display: grid; grid-template-columns: 1fr 1fr; }
  
  .pa-row { padding: 10px; background: var(--soft); font-size: .82rem; }
  .pa-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pa-logout { grid-column: 1 / -1; background: transparent; border-top: 0; margin: 0; padding-top: 6px; justify-content: center; }
}

.profile-actions { min-width: 0; }
.pa-row { min-width: 0; }
.pa-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-info { min-width: 0; }
@media (max-width: 860px) { .profile-actions { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }

.quick-meta { row-gap: 6px; }
.quick-from { color: var(--muted); font-weight: 600; margin-right: -8px; }
.quick-src-plain { color: var(--text); }
.quick-src { overflow-wrap: anywhere; }

/* Modale wyższe niż ekran: przewijanie w górę i w dół (bez ucinania nagłówka) */
.modal { align-items: flex-start; }
.modal-box { margin: auto; }

/* Kategorie na górze zdjęcia – małe i smukłe (karty i kafle, jak w Temacie dnia) */
.card, .tile { position: relative; }
.img-tags { position: absolute; top: 10px; left: 12px; right: 12px; z-index: 2; display: flex; align-items: center; gap: 5px; overflow: hidden; pointer-events: none; }
.img-tags a, .img-tags .badge-urgent { pointer-events: auto; }
.img-tags .chips { display: inline-flex; flex-wrap: nowrap; gap: 5px; }
.img-tags .chip, .img-tags .badge-urgent, .img-tags .badge-new, .img-tags .badge-status { font-size: .6rem; line-height: 1; padding: 5px 9px; border-radius: 999px; letter-spacing: .06em; white-space: nowrap; box-shadow: none; color: #fff; background: rgba(0, 0, 0, .42); backdrop-filter: blur(6px); }
.img-tags .badge-urgent { background: var(--accent); }
.img-tags .badge-new { background: var(--accent); }
.card-media::after, .tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 64px; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, .38), transparent); }
.tile::before { z-index: 1; }
.card-media { position: relative; }

/* Wybór zdjęcia do grafik */

/* === Galeria w artykule (v2): scena + miniatury + pełny ekran === */
figure.article-gallery.gx { margin: 1.6em 0; text-align: left; outline-offset: 6px; }
.gx .gx-stage { position: relative; aspect-ratio: var(--gx-ar, 16 / 9); max-height: 620px; width: 100%; overflow: hidden; border-radius: 20px; background: #0c0c10; box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .55); cursor: zoom-in; touch-action: pan-y; user-select: none; -webkit-user-select: none; isolation: isolate; }
.gx .gx-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(34px) saturate(1.25) brightness(.55); transform: scale(1.1); transition: background-image .3s; z-index: 0; }
.gx .gx-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; margin: 0; border-radius: 0; z-index: 1; transition: opacity .13s ease, transform .13s ease; }
.gx .gx-stage.is-swap .gx-img { opacity: 0; transform: scale(.985); }
.gx .gx-stage::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.gx .gx-nav { position: absolute; top: 50%; z-index: 3; width: 46px; height: 46px; margin-top: -23px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; background: rgba(12, 12, 16, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; cursor: pointer; opacity: 0; transition: opacity .18s, background .18s, transform .18s; padding: 0; }
.gx .gx-prev { left: 14px; } .gx .gx-next { right: 14px; }
.gx .gx-stage:hover .gx-nav, .gx:focus-within .gx-nav { opacity: 1; }
.gx .gx-nav:hover { background: var(--accent); border-color: transparent; transform: scale(1.06); }
.gx .gx-count { position: absolute; left: 14px; bottom: 14px; z-index: 3; padding: 7px 12px; border-radius: 999px; background: rgba(12, 12, 16, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; font: 800 .74rem/1 var(--font); letter-spacing: .06em; pointer-events: none; }
.gx .gx-full { position: absolute; right: 14px; bottom: 14px; z-index: 3; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; background: rgba(12, 12, 16, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; cursor: pointer; padding: 0; transition: background .18s; }
.gx .gx-full:hover { background: var(--accent); }
.gx .gx-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gx .gx-thumbs::-webkit-scrollbar { display: none; }
.gx .gx-thumb { position: relative; flex: 0 0 auto; width: 84px; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--soft); opacity: .55; transition: opacity .18s, transform .18s, box-shadow .18s; }
.gx .gx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; border-radius: 0; pointer-events: none; }
.gx .gx-thumb:hover { opacity: .9; }
.gx .gx-thumb.is-on { opacity: 1; box-shadow: 0 0 0 2.5px var(--accent); transform: translateY(-2px); }
.gx figcaption { margin-top: 4px; padding: 0 2px; font: 600 .86rem/1.45 var(--font); color: var(--muted); }
@media (hover: none) { .gx .gx-nav { opacity: .92; width: 40px; height: 40px; margin-top: -20px; } .gx .gx-prev { left: 10px; } .gx .gx-next { right: 10px; } }
@media (max-width: 640px) { .gx .gx-stage { border-radius: 16px; } .gx .gx-thumb { width: 66px; border-radius: 10px; } }

/* pełny ekran */
body.gx-lock { overflow: hidden; }
.gx-lb { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; background: rgba(6, 6, 9, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: gx-in .2s ease; color: #fff; }
@keyframes gx-in { from { opacity: 0; } to { opacity: 1; } }
.gx-lb-top { display: flex; justify-content: space-between; align-items: center; padding: max(14px, env(safe-area-inset-top)) 18px 6px; }
.gx-lb-count { font: 800 .8rem/1 var(--font); letter-spacing: .08em; opacity: .85; }
.gx-lb-close { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; padding: 0; }
.gx-lb-close:hover { background: var(--accent); }
.gx-lb-stage { position: relative; flex: 1; min-height: 0; padding: 0 12px; touch-action: pan-y; }
.gx-lb-img { position: absolute; inset: 0; margin: auto; max-width: calc(100% - 24px); max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); transition: opacity .09s ease; user-select: none; -webkit-user-select: none; }
.gx-lb-img.is-swap { opacity: 0; }
.gx-lb .gx-nav { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .22); border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; padding: 0; transition: background .18s; }
.gx-lb .gx-prev { left: 16px; } .gx-lb .gx-next { right: 16px; }
.gx-lb .gx-nav:hover { background: var(--accent); }
.gx-lb-cap { min-height: 24px; padding: 12px 20px max(18px, env(safe-area-inset-bottom)); text-align: center; font: 600 .92rem/1.4 var(--font); color: rgba(255, 255, 255, .78); }
@media (max-width: 640px) { .gx-lb .gx-nav { width: 42px; height: 42px; margin-top: -21px; } .gx-lb .gx-prev { left: 8px; } .gx-lb .gx-next { right: 8px; } }
@media (prefers-reduced-motion: reduce) { .gx .gx-img, .gx .gx-bg, .gx-lb { transition: none; animation: none; } }

/* Szybkie newsy na stronie głównej – kompaktowo, żeby nie przyćmiewały artykułów */
.quick-strip { margin: 0 0 18px; padding: 8px 14px; border-radius: 14px; background: var(--card, #fff); }
.quick-strip .quick-head { margin-bottom: 2px; }
.quick-strip .section-title { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.quick-strip .section-title::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.quick-strip .quick-all { font-size: .76rem; }
.quick-strip .quick-item { padding: 7px 0; gap: 10px; align-items: baseline; }
.quick-strip .quick-time { width: 40px; font-size: .72rem; padding-top: 0; }
.quick-strip .quick-body { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; }
.quick-strip .quick-body p { margin: 0; font-size: .86rem; line-height: 1.35; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; flex: 1; min-width: 0; }
.quick-strip .quick-meta { flex: none; font-size: .72rem; gap: 8px; max-width: 34%; }
.quick-strip .quick-from, .quick-strip .quick-share { display: none; }
.quick-strip .quick-src { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: inline-block; }
@media (max-width: 640px) {
  .quick-strip .quick-body { display: block; }
  .quick-strip .quick-body p { -webkit-line-clamp: 2; }
  .quick-strip .quick-meta { max-width: none; margin-top: 2px; }
}

/* ===== Panel boczny redaktora (v2) ===== */
.side-left, .side-right { scrollbar-width: none; -ms-overflow-style: none; }
.side-left::-webkit-scrollbar, .side-right::-webkit-scrollbar { display: none; width: 0; height: 0; }
.profile-card { position: relative; padding: 0 16px 14px; overflow: hidden; }
.profile-banner { height: 62px; margin: 0 -16px; background: radial-gradient(120% 140% at 0% 0%, #ff4d5f 0%, var(--accent) 45%, #7a0010 100%); }
.profile-top { margin: -30px 0 12px; align-items: flex-end; position: relative; }
.profile-top .avatar { width: 64px; height: 64px; }
.profile-info { padding-bottom: 2px; }
.profile-info strong { font-size: 1.05rem; }

.profile-actions { display: flex; flex-direction: column; gap: 2px; }

.pa-row { padding: 8px 8px; gap: 10px; }
.pa-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--soft); font-style: normal; }
.pa-ico svg { width: 16px; height: 16px; color: var(--muted); }
.pa-row:hover .pa-ico { background: rgba(214, 0, 28, .1); }
.pa-row:hover .pa-ico svg { color: var(--accent); }
.pa-logout { margin-top: 6px; border-top: 1px solid var(--border); border-radius: 0; padding-top: 10px; }

/* ===== Panel redaktora – strona ===== */
.panel-sub { margin: -2px 0 18px; color: var(--muted); }

.ptabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding: 4px; border-radius: 999px; background: var(--soft); scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptab { flex: 1 0 auto; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: .88rem; padding: 9px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.ptab.is-active { background: var(--card, #fff); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.ptab[data-count]:not([data-count=""])::after { content: attr(data-count); margin-left: 7px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .7rem; }

/* ===== Ustawienia konta ===== */

.st-card { display: flex; flex-direction: column; gap: 14px; }
.st-h { margin: 0; font-size: 1rem; }

.st-authors { display: flex; flex-direction: column; gap: 10px; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 4px 0; }
.st-row + .st-row { border-top: 1px solid var(--border); padding-top: 12px; }
.st-actions { position: sticky; bottom: 12px; }

.side-left > * { flex: none; }
.profile-top { align-items: flex-start; }
.profile-info { padding-top: 38px; }

/* ===== Telefon: minimalistycznie (v2) ===== */
@media (max-width: 860px) {
  /* profil redaktora: jedna kompaktowa belka, tylko na stronie głównej */
  #layout:not([data-view="home"]) .profile-card { display: none !important; }
  .profile-card { padding: 10px 12px; border-radius: 16px; }
  .profile-banner, .pa-logout { display: none; }
  .profile-top { margin: 0 0 10px; align-items: center; gap: 10px; }
  .profile-top .avatar { width: 38px; height: 38px; font-size: .95rem; box-shadow: none; }
  .profile-info { padding-top: 0; }
  .profile-info strong { font-size: .95rem; }
  .role-chip { margin-top: 2px; padding: 0; background: none; font-size: .72rem; }
  .role-chip i { box-shadow: none; width: 6px; height: 6px; }
  .profile-actions { display: flex; flex-direction: row; gap: 8px; align-items: center; }
  
  .pa-row { position: relative; width: 42px; height: 42px; flex: none; padding: 0; justify-content: center; background: var(--soft); border-radius: 12px; }
  .pa-row > span { display: none; }
  .pa-ico { background: transparent; width: auto; height: auto; }
  .pa-row em { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; font-size: .65rem; padding: 0 5px; }

  /* mniej ozdobników na liście */
  .tip-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--card, #fff); color: var(--text); box-shadow: none; border: 1px solid var(--border); }
  .tip-card strong { font-size: .88rem; }
  .tip-card span { display: none; }
  .tip-card em { color: var(--accent); font-size: .82rem; }
  
  .quick-strip { padding: 6px 12px; }
  .quick-strip .quick-head .btn { display: none; }
  .panel-title { font-size: 1.35rem; }
  .panel-title::before { margin-bottom: 10px; }

  .st-actions { bottom: 8px; }
  .st-actions .btn { width: 100%; }
}
@media (max-width: 860px) {
  #layout:not([data-view="home"]) .side-left .side-card, #layout:not([data-view="home"]) .tip-card { display: none; }
  .quick-strip .quick-head .btn { display: none !important; }
}
.st-row[hidden]{display:none}

/* ===== Ustawienia: bez pustej prawej kolumny ===== */
#layout[data-view="settings"] { grid-template-columns: 230px minmax(0, 1fr); }
#layout[data-view="settings"] .side-right { display: none; }
@media (max-width: 860px) { #layout[data-view="settings"] { grid-template-columns: minmax(0, 1fr); } }

.st-actions { position: static; }
.st-actions .btn { min-width: 220px; }
@media (max-width: 960px) {  .st-actions { position: sticky; bottom: 8px; } .st-actions .btn { width: 100%; } }

/* ===== Zgłoszone tematy: statusy i archiwum ===== */

/* ===== Oceny czytelników ===== */
.reader-vote { margin: 18px 0 8px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--card, #fff); }
.reader-vote[hidden] { display: none; }
.rv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rv-head h2 { margin: 0; font-size: 1.05rem; }
.rv-mine { font-size: .85rem; color: var(--muted); }
.rv-mine b { color: var(--text); }
.rv-lead { margin: 6px 0 14px; color: var(--muted); font-size: .92rem; }
.rv-pick { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.rv-val { flex: none; min-width: 3.4ch; font-size: 2.4rem; font-weight: 900; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--accent); }
.rv-pick input[type="range"] { --p: 70%; flex: 1; min-width: 0; height: 28px; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.rv-pick input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(to right, var(--accent) var(--p), var(--soft) var(--p)); }
.rv-pick input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--soft); }
.rv-pick input[type="range"]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--accent); }
.rv-pick input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.rv-pick input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.rv-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rv-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; font-size: .88rem; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rv-link:hover { color: var(--accent); }
.rv-bars { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 8px; }
.rv-bar { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 12px; }
.rv-lab { font-size: .82rem; font-weight: 700; color: var(--muted); }
.rv-track { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.rv-track i { display: block; height: 100%; border-radius: 99px; background: var(--text); }
.rv-bar.is-readers .rv-track i { background: var(--accent); }
.rv-bar b { text-align: right; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.rv-note { margin: 0 0 12px; font-size: .88rem; color: var(--muted); }
.rv-note span { opacity: .8; }
.rank-readers { display: block; margin-top: 4px; font-size: .68rem; font-weight: 700; letter-spacing: .02em; color: var(--accent); white-space: nowrap; }
.push-toggle.is-on { color: var(--accent); border-color: var(--accent); background: rgba(214, 0, 28, .08); }
.push-toggle.is-on svg { fill: currentColor; }
.push-toggle[hidden] { display: none; }
@media (max-width: 640px) { .reader-vote { padding: 14px 16px; } .rv-bar { grid-template-columns: 76px 1fr 38px; gap: 8px; } .rv-val { font-size: 2rem; } }

/* push przy szybkim newsie */
.field-check { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin: 6px 0 10px; cursor: pointer; }
.field-check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Telefon: autor w osobnym wierszu, pod nim data · czas czytania (bez kropki na początku linii) */
@media (max-width: 640px) {
  .article-meta { gap: 8px 0; padding: 14px 0; }
  .article-meta > .author-line { flex: 0 0 100%; font-size: 1rem; }
  .article-meta > .author-line + *::before { display: none; }
  .article-meta > time, .article-meta > span:not(.author-line) { font-size: .85rem; }
}

/* Ustawienia v3: nagłówki z opisem i przełączniki */
.st-head { display: flex; flex-direction: column; gap: 2px; }
.st-sub { margin: 0; color: var(--muted); font-size: .85rem; }
.st-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; padding: 10px 0; border-top: 1px solid var(--border); }
.st-switch > span { display: flex; flex-direction: column; gap: 2px; }
.st-switch small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.st-switch input { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--border); position: relative; cursor: pointer; transition: background .2s; border: 0; }
.st-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.st-switch input:checked { background: var(--accent); }
.st-switch input:checked::after { transform: translateX(18px); }
.st-switch input:disabled { opacity: .5; cursor: not-allowed; }

/* Wyrównanie kolumn: lewy pasek zaczyna się na tej samej linii co treść */
.side-left, .side-right { top: 84px; max-height: calc(100vh - 100px); }

/* Brak widocznych pasków przewijania (przewijanie nadal działa) */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar, html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* diagnostyka powiadomień */
.st-diag { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--bg-soft, rgba(0,0,0,.05)); font-size: .85rem; line-height: 1.45; }
.st-diag.is-ok { color: #14803c; } .st-diag.is-bad { color: #b42318; }

/* Telefon: stopka wyśrodkowana */
@media (max-width: 640px) {
  .footer-links { display: flex; flex-wrap: wrap; justify-content: center; text-align: center; gap: 2px 20px; }
  .footer-links a { padding: 9px 0; }
  .footer-links .footer-ig { order: -2; flex: 0 0 100%; margin: 0 0 6px; justify-content: center; }
  .footer-links::before { content: ""; order: -1; flex-basis: 100%; height: 0; }
  .site-footer .footer-inner { align-items: center; text-align: center; }
  .footer-inner > span:first-child { width: 100%; }
}

/* Komentarze po prawej stronie artykułu */
.comments { background: var(--card, #fff); border: 1px solid var(--border); border-radius: var(--radius, 14px); padding: 18px; }
.cmt-title { margin: 0 0 12px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.cmt-title span { font-size: .75rem; background: var(--soft, #eee); color: var(--muted); padding: 2px 9px; border-radius: 99px; }
.cmt-form textarea { width: 100%; resize: vertical; min-height: 76px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; font: inherit; background: var(--bg, #fff); color: inherit; }
.cmt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.cmt-row small { color: var(--muted); }
.cmt-note, .cmt-msg, .cmt-empty { margin: 8px 0; font-size: .88rem; color: var(--muted); }
.cmt-msg { color: var(--accent); }

.cmt-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.cmt { display: flex; gap: 10px; }
.cmt.is-pending { opacity: .7; }
.cmt-av { flex: none; width: 34px; height: 34px; font-size: .8rem; }
.cmt-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cmt-body { min-width: 0; flex: 1; }
.cmt-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cmt-head time { color: var(--muted); font-size: .78rem; }
.cmt-body p { margin: 2px 0 0; font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.cmt-wait { color: var(--muted); font-size: .76rem; }
.cmt-actions { display: flex; gap: 12px; margin-top: 2px; }
.cmt-act { border: 0; background: none; color: var(--muted); font: inherit; font-size: .76rem; padding: 0; cursor: pointer; }
.cmt-act:hover { color: var(--accent); }
.cmt-more { width: 100%; margin-top: 14px; }

.mod-q { flex: 1; min-width: 140px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 99px; font: inherit; background: var(--bg, #fff); color: inherit; }
.reader-switch { font-size: .85rem; }
.form-ok { color: #14803c; font-size: .9rem; }
.ok-text { color: #14803c; }
#btn-account.is-on { color: var(--accent); }

/* Wspólne okno logowania (redaktor i czytelnik) */
.is-admin #btn-account { display: none; }
#reader-modal .modal-box { max-width: 420px; }
#reader-modal .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
#reader-modal .field input { height: 46px; }
#reader-modal .field-check { align-items: flex-start; font-weight: 500; font-size: .88rem; line-height: 1.4; }
#reader-modal .field-check input { margin-top: 2px; }
#reader-modal .modal-actions { align-items: center; flex-wrap: wrap; gap: 10px; }
.reader-switch { font-size: .85rem; display: flex; gap: 6px; flex-wrap: wrap; }
.reader-switch a { color: var(--accent); font-weight: 700; text-decoration: none; }
.reader-switch a:hover { text-decoration: underline; }
.reader-switch span { color: var(--muted); }
#reader-modal .reader-switch { margin: 14px 0 0; justify-content: center; }
#reader-modal .reader-switch:empty { display: none; }
#reader-modal .field-check span { display: block; }

/* Komentarze: prawa kolumna (szeroki ekran) lub pod artykułem */
#side-comments:not(:empty) { margin-bottom: 18px; }
#side-comments .comments { box-shadow: var(--shadow); border: 0; border-radius: var(--radius); }
#comments-home .comments { margin-top: 28px; }
.side-head[hidden] { display: none; }
#layout[data-view="article"] .side-right { position: static; max-height: none; overflow: visible; }
.cmt-toggle { color: var(--accent); font-weight: 700; font-size: .8rem; margin-top: 2px; display: block; }

.cmt-replies { list-style: none; margin: 10px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.cmt-to { font-size: .75rem; color: var(--muted); margin-left: 6px; }
.cmt-replying { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.cmt-replying b { color: inherit; }
.cmt-row small.is-warn { color: #c77700; font-weight: 700; }
.cmt-row small.is-max { color: #d12; font-weight: 700; }
.cmt { border-radius: 10px; transition: background .4s; }
.cmt.cmt-hl > .cmt-body { animation: cmthl 3.5s ease-out; }
@keyframes cmthl { 0%, 60% { background: rgba(255, 190, 0, .28); box-shadow: 0 0 0 6px rgba(255, 190, 0, .28); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }

/* ---- Okno logowania / rejestracji (nowy wygląd) ---- */
#reader-modal .modal-box.rm-box { max-width: 400px; padding: 26px 26px 22px; position: relative; }
.rm-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.rm-close:hover { background: var(--soft, rgba(0,0,0,.06)); color: var(--text); }
.rm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 28px 18px 0; border-radius: 12px; background: var(--soft, rgba(0,0,0,.06)); }
.rm-tabs[hidden] { display: none; }
.rm-tabs button { border: 0; background: transparent; border-radius: 9px; padding: 9px 8px; font: inherit; font-size: .88rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.rm-tabs button.is-on { background: var(--surface, #fff); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
#reader-modal h2 { margin: 0 0 4px; font-size: 1.35rem; }
.rm-sub { margin: 0 0 18px; color: var(--muted); font-size: .88rem; line-height: 1.45; }
#reader-form { display: flex; flex-direction: column; gap: 0; }
.rm-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.rm-field[hidden] { display: none; }
.rm-field > span { font-size: .82rem; font-weight: 700; }
.rm-field input { width: 100%; box-sizing: border-box; height: 46px; padding: 0 14px; font: inherit; color: var(--text); background: var(--surface, #fff); border: 1.5px solid var(--border); border-radius: 12px; outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.rm-field input::placeholder { color: var(--muted); opacity: .7; }
.rm-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200, 30, 40, .14); }
.rm-field small { color: var(--muted); font-size: .78rem; }
#reader-modal .field-check { margin: 2px 0 14px; }
.rm-submit { width: 100%; height: 46px; border-radius: 12px; font-size: 1rem; margin-top: 2px; }
#reader-modal .reader-switch { margin: 14px 0 0; justify-content: center; font-size: .85rem; }
#reader-modal .reader-switch a { font-weight: 600; }

.cmt-badge { margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; vertical-align: 1px; }
.rv-who { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.rv-who > b { display: block; font-size: .8rem; margin-bottom: 8px; }
.rv-who ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rv-who li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--border); border-radius: 99px; font-size: .82rem; }
.rv-who li .avatar { width: 22px; height: 22px; font-size: .55rem; }
.rv-who li .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.rv-who li.is-staff { border-color: var(--accent); }
.rv-who-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-who-note { margin: 0 0 10px; font-size: .8rem; color: var(--muted); }

/* ---- Kafelek profilu dla zalogowanego czytelnika ---- */
.rd-only { display: none !important; }
.is-reader .rd-only:not([hidden]) { display: flex !important; }
.is-reader-only .profile-card { display: block; }
.is-reader-only [data-action="quick-new"] { display: none !important; }
a.ptab { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.cmt-badge.is-owner { background: #111; color: #fff; }
.cmt-badge.is-editor { background: #2563eb; }

/* ---- Moderacja: minimalistyczna lista ---- */
.mod-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 4px; }
.mod-bar b { font-size: 1.02rem; }
.mc-link { border: 0; background: none; padding: 0; font: inherit; font-size: .82rem; font-weight: 700; color: var(--accent); cursor: pointer; }
.mod-list { display: flex; flex-direction: column; }
.mod-empty { padding: 18px 0; }
.mc { padding: 14px 2px; border-bottom: 1px solid var(--border); transition: opacity .18s, transform .18s; }
.mc.is-out { opacity: 0; transform: translateX(10px); }
.mc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .92rem; }
.mc-head time { color: var(--muted); font-size: .78rem; }
.mc-st { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--muted); }
.mc-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.mc-st.is-pending::before, .mc-st.is-reported::before { background: #f59e0b; }
.mc-st.is-hidden::before { background: #9ca3af; }
.mc-art { display: block; margin-top: 2px; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.mc-art:hover { color: var(--accent); }
.mc-text { margin: 8px 0 8px; font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.mc-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mc-actions button { border: 0; background: none; padding: 0; font: inherit; font-size: .8rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.mc-actions button:hover { color: var(--text); }
.mc-actions .is-danger { color: #c0392b; }
.mc-actions button:disabled { opacity: .5; cursor: default; }

.mod-q { width: 100%; box-sizing: border-box; margin: 8px 0 6px; height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 99px; font: inherit; background: var(--surface, #fff); color: inherit; }

.role-chip b { white-space: nowrap; }

/* ---- Zdjęcie główne: zawsze 16:9 + kadrowanie w edytorze ---- */
.article-hero .media-wrap { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: var(--soft); }
.article-hero .media-wrap img { width: 100%; height: 100%; max-height: none; object-fit: cover; border-radius: 0; display: block; box-shadow: none; }

/* ---- Oceny: jedna linia na komputerze, przyciski 1–10 na telefonie ---- */
.rv-pick { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-bottom: 12px; }
.rv-val { font-size: 2rem; min-width: 3.2ch; }
.rv-send { height: 42px; padding: 0 22px; border-radius: 12px; }
.rv-btns { display: none; }
@media (max-width: 640px) {
  .rv-pick { display: none; }
  .rv-btns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 6px 0 12px; }
  .rv-btns button { height: 46px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface, #fff); color: var(--text); font: inherit; font-size: 1.05rem; font-weight: 800; cursor: pointer; }
  .rv-btns button:active, .rv-btns button.is-mine { background: var(--accent); border-color: var(--accent); color: #fff; }
  .rv-lead { font-size: .88rem; margin-bottom: 8px; }
}

/* ---- Rola w kafelku profilu ---- */
.profile-info { flex: 1; min-width: 0; }
.profile-info .role-chip { max-width: 100%; box-sizing: border-box; border-radius: 12px; padding: 4px 10px; }
.role-chip b { white-space: normal; line-height: 1.2; font-size: .7rem; }
.role-chip i { flex: none; }

/* ---- Odstęp pól w sekcji Zdjęcie główne ---- */
.fold > .field + .field { margin-top: 14px; }

/* ---- Konto czytelnika w kafelku (także gdy jest równocześnie redaktorem) ---- */
.is-admin #btn-rd-mod { display: none !important; }
.is-reader-only .profile-card { display: block; }

/* ---- Komentarze: bardziej minimalistyczne, zwłaszcza na telefonie ---- */
.cmt { gap: 10px; }
.cmt-head { gap: 6px; align-items: center; }
.cmt-head b { font-size: .92rem; }
.cmt-head time { font-size: .74rem; }
.cmt-badge { margin-left: 0; padding: 0 7px; font-size: .6rem; line-height: 1.7; }
.cmt-to { margin-left: 0; font-size: .72rem; }
.cmt-body p { margin: 1px 0 0; font-size: .9rem; line-height: 1.42; }
.cmt-actions { gap: 14px; margin-top: 3px; }
.cmt-act { font-size: .74rem; }
@media (max-width: 640px) {
  .comments { padding: 14px 4px 4px; border: 0; background: transparent; border-radius: 0; }
  .cmt-title { font-size: 1rem; margin-bottom: 8px; }
  .cmt-list { gap: 16px; margin-top: 10px; }
  .cmt { gap: 9px; }
  .cmt-av { width: 26px; height: 26px; font-size: .62rem; margin-top: 1px; }
  .cmt-head b { font-size: .88rem; }
  .cmt-replies { margin-top: 10px; padding-left: 10px; border-left-width: 1px; gap: 12px; }
  .cmt-replies .cmt-av { width: 22px; height: 22px; font-size: .55rem; }
  .cmt-body p { font-size: .9rem; }
  .cmt-act { font-size: .72rem; }
  .cmt-form textarea { min-height: 64px; border-radius: 10px; }
}

.cmt-badge.is-chief { background: #7c3aed; }

/* ---- panel użytkowników (Właściciel): karty z wyborem roli i weryfikacji ---- */

.rd-hint { margin: 10px 14px 0; padding: 10px 12px; border-radius: 12px; background: rgba(230,160,0,.14); font-size: .8rem; line-height: 1.4; display: grid; gap: 8px; justify-items: start; }
.rd-hint[hidden] { display: none; }

/* ---- panel użytkowników v2: siatka kart na całą szerokość ---- */
#layout[data-view="account"] { grid-template-columns: 230px minmax(0, 1fr); }
#layout[data-view="account"] .side-right { display: none; }
#view-account [data-modusers] { max-width: none; }

@media (max-width: 1100px) { #layout[data-view="account"] { grid-template-columns: 220px minmax(0, 1fr); } }
@media (max-width: 860px) { #layout[data-view="account"] { grid-template-columns: minmax(0, 1fr); gap: 18px; }  }

/* zalogowany: ikonka konta w rogu znika (na komputerze konto jest w kafelku profilu po lewej; na telefonie zostaje jako skrót) */
@media (min-width: 861px) { body.is-reader #btn-account, body.is-admin #btn-account { display: none; } }

/* profil: plakieta roli w jednej linii pod zdjęciem (komputer); na telefonie pod nazwą */
.role-chip b { white-space: nowrap; }
@media (min-width: 861px) {
  .profile-top { flex-wrap: wrap; row-gap: 8px; }
  .profile-info { display: contents; }
  .profile-info strong { flex: 1 1 0; min-width: 0; align-self: flex-end; padding-bottom: 4px; }
  .profile-top::after { content: ''; order: 2; flex: 0 0 100%; height: 0; }
  .profile-info .role-chip { order: 3; margin-top: 0; max-width: 100%; }
}
/* telefon: przyciski w kafelku profilu zawijają się zamiast wychodzić poza ekran */
@media (max-width: 860px) {
  .profile-actions { flex-wrap: wrap; }
  
  .profile-info .role-chip { max-width: 100%; }
}
.logo:focus-visible { outline: none; }

/* ---- Google, profil publiczny, edycja i zgłoszenia komentarzy, tryb wolniejszy ---- */
.rm-google-box { margin: 4px 0 14px; }
.rm-google { width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface, #fff); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: background .15s, box-shadow .15s; }
.rm-google:hover { background: var(--soft); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.rm-google:disabled { opacity: .6; cursor: wait; }
.rm-or { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: .78rem; }
.rm-or::before, .rm-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.cmt-name { color: inherit; text-decoration: none; }
.cmt-name:hover b { text-decoration: underline; }
.cmt-edited { color: var(--muted); font-size: .74rem; }
.cmt-edit textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; font: inherit; background: var(--surface, #fff); color: inherit; resize: vertical; }
.cmt-edit .cmt-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.cmt-edit small, .cmt-slow { color: var(--muted); font-size: .76rem; }
.cmt-slow { display: block; margin-top: 8px; }
.cmt-why { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmt-why em { font-style: normal; font-size: .78rem; color: var(--muted); }
.cmt-close { margin-left: auto; font-size: .78rem; font-weight: 700; }
.cmt-title { display: flex; align-items: center; gap: 8px; }
.mc-why { display: block; margin: 2px 0 4px; color: #9a6700; font-size: .78rem; }
.mod-slow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 14px; }
.mod-slow span { font-weight: 700; font-size: .88rem; }
.mod-slow select { height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: var(--surface, #fff); color: inherit; }
.mod-slow small { flex-basis: 100%; color: var(--muted); font-size: .76rem; }
#layout[data-view="user"] { grid-template-columns: 230px minmax(0, 1fr); }
#layout[data-view="user"] .side-right { display: none; }
@media (max-width: 860px) { #layout[data-view="user"] { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.up-card { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.up-av { width: 84px; height: 84px; flex: 0 0 84px; font-size: 1.6rem; }
.up-name { margin: 0 0 6px; font-size: 1.5rem; }
.up-meta { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: .86rem; }
.up-h { font-size: 1.05rem; margin: 18px 0 8px; }
.up-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.up-c { padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--card, #fff); }
.up-c p { margin: 4px 0 6px; }
.up-c time { color: var(--muted); font-size: .76rem; }
.up-art { font-weight: 700; font-size: .86rem; color: var(--accent); text-decoration: none; }
.panel.up-card { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; gap: 18px; }
.up-card .up-main { flex: 1; min-width: 0; }
@media (max-width: 520px) { .panel.up-card { flex-direction: column; text-align: center; } .up-meta { justify-content: center; } }

/* Pole-pułapka antyspamowe: niewidoczne dla ludzi */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; overflow: hidden; pointer-events: none; }

/* Wyszukiwarka w panelu użytkowników: równy tekst w Safari */
.mod-q { -webkit-appearance: none; appearance: none; display: block; height: 42px; line-height: 42px; padding: 0 16px; font-size: .95rem; }
.mod-q::placeholder { line-height: normal; opacity: .6; }
.mod-q::-webkit-search-decoration, .mod-q::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Czcionki (z wersji v3): Figtree – tekst, Bricolage Grotesque – nagłówki, Source Serif 4 – treść artykułu. Bez zmian układu i kolorów. */
:root {
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}
body { font-feature-settings: "kern", "liga"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, .panel-title, .st-h, .section-title, .hero-title, .card-title, .tile-title, .rank-title,
.article-header h1, .profile-info strong, .side-title, .side-item-title, .rank-score, .rank-pos, .nav-link { font-family: var(--font-display); }
.article-body, .ql-editor { font-optical-sizing: auto; }

/* Szybkie newsy: gwiazdka zamiast kropki */
.quick-strip .section-title::before {
  content: ""; width: 14px; height: 14px; border-radius: 0; transform: none; flex: none; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l3.1 6.9 7.4.8-5.5 5 1.6 7.4L12 17.8l-6.6 3.8 1.6-7.4-5.5-5 7.4-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l3.1 6.9 7.4.8-5.5 5 1.6 7.4L12 17.8l-6.6 3.8 1.6-7.4-5.5-5 7.4-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Galeria: zwykłe przesuwanie zdjęć w bok zamiast zanikania */
.gx .gx-img { transition: none; will-change: transform; }
.gx .gx-stage.is-swap .gx-img { opacity: 1; transform: none; }

/* Zaokrąglenia (z wersji v3): większe, spójne rogi. Tylko promienie – bez zmian kolorów, cieni i układu. */
:root { --radius: 14px; --r-card: 20px; --r-ctl: 12px; --r-hero: 24px; }
.card, .tile, .side-card, .profile-card, .panel, .st-card, .tip-card, .rank-list, .article { border-radius: var(--r-card); }
.hero { border-radius: var(--r-hero); }
.quick-strip { border-radius: var(--r-card); }
.card-media, .side-media, .rank-cover { border-radius: 14px; }
.card .card-media { border-radius: var(--r-card) var(--r-card) 0 0; }
.hero-img, .tile img { border-radius: inherit; }
.article-body img, .article-hero img, .article-hero .media-wrap { border-radius: 16px; }
.btn, .pa-row, .cat-list .chip-btn, input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], input[type="datetime-local"], select, textarea { border-radius: var(--r-ctl); }
.btn-sm { border-radius: 10px; }
.ptabs { border-radius: var(--r-ctl); }
.ptab { border-radius: 9px; }
.modal-box { border-radius: var(--r-card); }
@media (max-width: 700px) {
  .hero { border-radius: 20px; }
  .card, .side-card, .profile-card, .panel, .st-card, .article, .quick-strip { border-radius: 18px; }
}

/* Nowinki z Poślizgiem – panel na stronie głównej (kształt z wersji v3, krótszy, zgodny z motywem jasnym i ciemnym) */
:root { --hl: #ffe14a; }
.quick-strip { margin: 0 0 18px; padding: 12px 20px 6px; background: var(--card, #fff); border: 1px solid var(--border); box-shadow: 0 10px 28px -20px rgba(16, 24, 40, .35); color: var(--text); }
:root[data-theme="dark"] .quick-strip { box-shadow: 0 10px 28px -18px rgba(0, 0, 0, .7); }
.quick-strip .quick-head { margin-bottom: 4px; }
.quick-strip .section-title { font-family: var(--font-display); font-size: 1.08rem; font-weight: 800; letter-spacing: -.02em; text-transform: none; color: var(--text); gap: 9px; margin: 0; }
.quick-strip .section-title::before { width: 16px; height: 16px; }
.quick-strip .quick-all { font-size: .8rem; font-weight: 800; color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.quick-strip .quick-all:hover { color: var(--accent); }
.quick-strip .quick-item { padding: 8px 0; gap: 12px; align-items: center; border-top-color: var(--border); }
.quick-strip .quick-time { width: auto; flex: none; padding: 3px 8px; border-radius: 999px; background: var(--hl); color: #111113; font: 800 .74rem/1.2 var(--font-display); letter-spacing: 0; }
.quick-strip .quick-body p { font-family: var(--font-display); font-size: .96rem; font-weight: 600; letter-spacing: -.005em; line-height: 1.3; color: var(--text); }
.quick-strip .quick-src { color: var(--accent); font-weight: 800; }
@media (max-width: 700px) {
  .quick-strip { padding: 10px 14px 4px; }
  .quick-strip .quick-item { align-items: flex-start; }
  .quick-strip .quick-body p { -webkit-line-clamp: 2; }
}

/* Animacja tekstu: linia podkreślenia „wjeżdża” pod tytułem po najechaniu */
.card-title a, .side-item-title a, .tile-title a { background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 2px; transition: background-size .3s cubic-bezier(.22, .7, .2, 1), color .2s; padding-bottom: 1px; }
.card:hover .card-title a, .side-item:hover .side-item-title a, .tile:hover .tile-title a, .card-title a:focus-visible, .side-item-title a:focus-visible { background-size: 100% 2px; text-decoration: none; }
.hero-title a { background-image: linear-gradient(#fff, #fff); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 3px; transition: background-size .35s cubic-bezier(.22, .7, .2, 1); text-decoration: none; }
.hero:hover .hero-title a { background-size: 100% 3px; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .card-title a, .side-item-title a, .tile-title a, .hero-title a { transition: none; } }
:root[data-theme="dark"] .quick-strip .quick-src { color: #ff6b7d; }

/* Redaktorzy: profil, lista, link autora */
#layout[data-view="authors"] { grid-template-columns: 230px minmax(0, 1fr); }
#layout[data-view="authors"] .side-right { display: none; }
@media (max-width: 860px) { #layout[data-view="authors"] { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.author-hero { display: flex; align-items: center; gap: 18px; margin-top: 12px; }
.author-hero .avatar-lg { width: 88px; height: 88px; flex: none; }
.author-hero-text { min-width: 0; }
.author-hero-text .collection-name { margin: 2px 0 4px; }
.author-bio { margin: 0 0 6px; max-width: 56ch; color: var(--text); font-size: 1.02rem; line-height: 1.5; }
.author-link { color: inherit; text-decoration: none; }
.author-link:hover strong { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.au-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.au-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-card, 18px); background: var(--card, #fff); color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.au-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 24px -16px rgba(16, 24, 40, .35); }
.au-card .avatar-lg { width: 64px; height: 64px; flex: none; }
.au-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.au-body strong { font-family: var(--font-display); font-size: 1.08rem; letter-spacing: -.01em; }
.au-bio { font-size: .88rem; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.au-n { font-size: .78rem; font-weight: 700; color: var(--accent); }
@media (max-width: 700px) {
  .au-list { grid-template-columns: minmax(0, 1fr); }
  .author-hero { align-items: flex-start; gap: 14px; }
  .author-hero .avatar-lg { width: 68px; height: 68px; }
}

/* Cytat (wariant B): miękkie tło, czerwony pasek z boku, kursywa szeryfowa, przerywnik jako zwykły szary tekst */
.article-quote { position: relative; margin: 1.4em 0; padding: 16px 22px 16px 24px; border: 0; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; overflow: visible; background: var(--quote-bg); box-shadow: none; }
.article-quote::before, .article-quote::after { content: none; }
.article-quote p.q-text { font: italic 500 1.28em/1.55 var(--font-serif); letter-spacing: 0; color: var(--text); }
.article-quote p.q-text.has-mid::before, .article-quote p.q-text.has-mid::after { content: none; }
.article-quote .q-part::before { content: "\201E"; color: var(--accent); font-style: normal; font-weight: 800; }
.article-quote .q-part::after { content: "\201D"; color: var(--accent); font-style: normal; font-weight: 800; }
.article-quote .q-mid { display: inline; margin: 0 .4em; padding: 0; border: 0; border-radius: 0; background: none; font: 600 .66em/1 var(--font); font-style: normal; letter-spacing: 0; color: var(--muted); white-space: normal; vertical-align: baseline; }
:root[data-theme="dark"] .article-quote .q-mid { color: var(--muted); background: none; }
.article-quote p.q-by { display: block; margin: 8px 0 0; padding: 0; border: 0; font: 600 .85rem/1.4 var(--font); color: var(--muted); }
.article-quote .q-author { color: var(--text); font-weight: 800; font-size: inherit; letter-spacing: 0; text-transform: none; }
.article-quote .q-author::before { content: none; }
.article-quote .q-source { font-style: normal; font-weight: 600; }
.article-quote .q-author + .q-source::before { content: ", "; margin: 0; color: var(--muted); }
@media (max-width: 700px) { .article-quote { padding: 14px 16px 14px 18px; } .article-quote p.q-text { font-size: 1.14em; } }
/* okno cytatu */

/* długie nazwy w kafelku profilu: zawsze pod banerem, max 2 linie */
@media (min-width: 861px) {
  .profile-info strong { align-self: flex-start; margin-top: 34px; padding-bottom: 0; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; line-height: 1.2; }
}

/* przycisk ręcznego powiadomienia push (tylko Właściciel) */

/* =========================================================
   Panel · Moje konto · Ustawienia – wspólny układ
   ========================================================= */
.hub-nav { display: inline-flex; gap: 4px; padding: 4px; margin: 2px 0 18px; border-radius: 14px; background: var(--soft); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.hub-nav::-webkit-scrollbar { display: none; }
.hub-nav[hidden] { display: none; }

.panel-sub { margin: -2px 0 14px; }

/* panel: kafelki statystyk */

.ptabs { padding: 5px; }
.ptab[hidden] { display: none; }

/* moje konto: karta tożsamości */
.acc-hero { padding: 0; overflow: hidden; gap: 0; margin-bottom: 18px; }
.acc-cover { height: 96px; background: radial-gradient(120% 160% at 0% 0%, #ff4d5f 0%, var(--accent) 48%, #6d000f 100%); }
.acc-hero-body { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px 18px; padding: 0 22px 20px; margin-top: -42px; }
.acc-hero-av { width: 92px; height: 92px; flex: none; font-size: 2rem; box-shadow: 0 0 0 4px var(--card), 0 6px 18px rgba(0, 0, 0, .25); }
.acc-hero-main { flex: 1 1 220px; min-width: 0; padding-bottom: 2px; }
.acc-hero-name { margin: 0 0 6px; font-size: 1.45rem; line-height: 1.15; overflow-wrap: anywhere; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-chip { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 99px; background: var(--soft); color: var(--muted); font-size: .78rem; font-weight: 700; }
.acc-chip.is-ok { background: rgba(34, 197, 94, .14); color: #15803d; }
.acc-chip.is-warn { background: rgba(245, 158, 11, .16); color: #b45309; }
:root[data-theme="dark"] .acc-chip.is-ok { color: #4ade80; }
:root[data-theme="dark"] .acc-chip.is-warn { color: #fbbf24; }
.acc-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 4px; }
.acc-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.acc-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 1100px) { .acc-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .acc-hero-av { width: 76px; height: 76px; } .acc-hero-body { padding: 0 16px 16px; margin-top: -36px; } .acc-hero-name { font-size: 1.2rem; } }
#view-account .st-card, #view-account .st-profile-block .st-card { margin: 0; }
#view-account .st-profile-block { display: flex; flex-direction: column; gap: 16px; }
#view-account .st-profile-block .st-actions-inline { position: static; }
#view-account .st-profile-block .st-actions-inline .btn { min-width: 0; width: 100%; }
#view-account .st-profile-block .panel:last-of-type { margin-bottom: 0; }
#view-account .acc-grid .st-row .btn { flex: none; }

#st-profile-block .st-actions-inline { display: flex; }

/* ustawienia: karty z ikonami */
.st-h { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.st-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--chip-bg); color: var(--accent); font-style: normal; flex: none; }

.st-switch:first-of-type { border-top: 0; }
.acc-hero-body { align-items: flex-start; }
.acc-hero-main { padding-top: 48px; }
.acc-hero-actions { padding-top: 50px; }
@media (max-width: 520px) { .acc-hero-main { padding-top: 40px; } .acc-hero-actions { padding-top: 0; flex: 1 1 100%; } }
#view-account .st-row { align-items: center; }
.st-authors { padding-right: 4px; }
.st-more { align-self: flex-start; margin-top: 4px; }
.st-art { align-items: flex-start; }
.st-art input { margin-top: 3px; }
.st-art[hidden] { display: none; }
#st-art-filter { width: 100%; }

/* zgłoszenia: tematy i błędy */

/* profil publiczny: biografia */
.up-bio { margin: 10px 0 0; max-width: 56ch; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.up-more { display: inline-block; margin-top: 8px; font-weight: 700; font-size: .9rem; color: var(--accent); text-decoration: none; }
.up-more:hover { text-decoration: underline; }
@media (max-width: 640px) { .up-card .up-bio { margin-inline: auto; } }

/* =========================================================
   Profil redaktora (strona autora) – wersja rozbudowana
   ========================================================= */
.author-head { position: relative; display: block; padding: 0; overflow: hidden; border-left: 0; border-radius: var(--r-lg, 20px); gap: 0; }
.author-cover { height: 110px; background: radial-gradient(120% 170% at 0% 0%, #ff4d5f 0%, var(--accent) 46%, #5c000d 100%); }
.author-topbar { position: absolute; top: 14px; left: 16px; z-index: 2; }
.author-back { background: rgba(255, 255, 255, .94); color: #111; border-color: transparent; backdrop-filter: blur(6px); }
.author-head .author-hero { align-items: flex-start; gap: 20px; margin: -46px 0 0; padding: 0 26px 24px; }
.author-head .author-hero .avatar-lg { width: 104px; height: 104px; box-shadow: 0 0 0 4px var(--card), 0 8px 22px rgba(0, 0, 0, .28); }
.author-head .author-hero-text { padding-top: 54px; min-width: 0; flex: 1; }
.author-role { display: inline-flex; padding: 3px 11px; border-radius: 99px; background: var(--chip-bg); color: var(--accent); font: 800 .7rem var(--font); letter-spacing: .12em; text-transform: uppercase; }
.author-head .collection-name { margin: 8px 0 6px; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.1; overflow-wrap: anywhere; }
.author-head .author-bio { margin: 0 0 14px; max-width: 60ch; font-size: 1.05rem; line-height: 1.55; }
.author-head .author-bio.is-empty { color: var(--muted); font-style: italic; font-size: .95rem; }
.author-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.au-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 99px; background: var(--soft); color: var(--muted); font-size: .84rem; font-weight: 600; }
.au-pill b { color: var(--text); font-weight: 800; }
@media (max-width: 640px) {
  .author-cover { height: 84px; }
  .author-head .author-hero { flex-direction: column; align-items: flex-start; gap: 0; padding: 0 18px 20px; margin-top: -40px; }
  .author-head .author-hero .avatar-lg { width: 84px; height: 84px; }
  .author-head .author-hero-text { padding-top: 12px; }
}

/* logowanie: pokaż hasło, wymuszona zmiana nazwy, imię i nazwisko */
.rm-pass { position: relative; display: block; }
.rm-pass input { padding-right: 76px; width: 100%; }
.rm-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: .8rem; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.rm-eye:hover { color: var(--text); background: var(--soft); }
#rename-modal { z-index: 1000; }
#rename-modal .rm-sub { line-height: 1.5; }
#rn-hint { margin: -4px 0 10px; color: var(--muted); font-size: .85rem; }

.st-byline { margin: -4px 0 0; padding: 9px 12px; border-radius: 10px; background: var(--soft); font-size: .9rem; }
.st-byline:empty { display: none; }

/* Przełącznik kont */
.acc-sw-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.acc-sw-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface, transparent); }
.acc-sw-row.is-on { border-color: var(--accent, #d6001c); box-shadow: 0 0 0 1px var(--accent, #d6001c) inset; }
.acc-sw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acc-sw-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-sw-main small { color: var(--muted, #6b6578); }
.acc-sw-badge { font-size: .78rem; font-weight: 800; color: var(--accent, #d6001c); }
.acc-sw-x { border: 0; background: none; color: var(--muted, #6b6578); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.acc-sw-x:hover { background: rgba(127, 127, 127, .15); }
.acc-sw-row .avatar { width: 40px; height: 40px; flex: none; font-size: .85rem; }

/* Aplikacja na Maca: górny pasek strony jest paskiem tytułu okna – szukajka po lewej, logo (= Home) na środku, ikony po prawej */
html.is-mac-app .site-header { -webkit-app-region: drag; user-select: none; -webkit-user-select: none; box-shadow: 0 1px 0 var(--border); }
html.is-mac-app .site-header .logo,
html.is-mac-app .site-header .search,
html.is-mac-app .site-header .auth { -webkit-app-region: no-drag; }
html.is-mac-app body.modal-open .site-header { -webkit-app-region: no-drag; }
html.is-mac-app .site-header .main-nav { display: none; }                 /* nawigacja jest w pasku menu macOS */
html.is-mac-app .site-header .header-top {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "search logo auth";
  align-items: center; gap: 16px; min-height: 56px; padding-top: 0; padding-bottom: 0; flex-wrap: nowrap;
}
html.is-mac-app .site-header .logo { grid-area: logo; justify-self: center; margin: 0; }
html.is-mac-app .site-header .logo svg { height: 26px; width: auto; }
html.is-mac-app .site-header .auth { grid-area: auth; justify-self: end; display: flex; gap: 8px; }
html.is-mac-app .site-header .search { grid-area: search; justify-self: start; width: 100%; max-width: 300px; margin: 0; }
html.is-mac-app:not(.is-app-fullscreen) .site-header .search { margin-left: 70px; width: calc(100% - 70px); }   /* miejsce na przyciski okna */
html.is-mac-app .site-header .search input {
  height: 34px; padding: 0 14px 0 36px; font-size: .9rem; border-radius: 999px;
  background: color-mix(in srgb, var(--soft) 80%, transparent); border: 1px solid transparent;
}
html.is-mac-app .site-header .search input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(214, 0, 28, .12); }
html.is-mac-app .site-header .search svg { left: 12px; width: 15px; height: 15px; }
html.is-mac-app .site-header .auth .btn-icon { width: 34px; height: 34px; border-radius: 10px; }

/* Aplikacja na Maca: ukrywamy to, co tam nie działa (push w przeglądarce, instalacja PWA), a pasek okna trzymamy równo z przyciskami okna */
html.is-mac-app #btn-push, html.is-mac-app #install-link, html.is-mac-app .st-push-row { display: none !important; }
html.is-mac-app .site-header { height: 56px; }
html.is-mac-app .site-header .header-top { height: 56px; min-height: 56px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; align-items: center; }
html.is-mac-app .site-header .search { display: flex; align-items: center; height: 34px; }
html.is-mac-app .site-header .search input { height: 34px; box-sizing: border-box; line-height: 34px; margin: 0; }
html.is-mac-app .site-header .search svg { top: 50%; transform: translateY(-50%); }
html.is-mac-app .site-header .auth { align-items: center; height: 34px; }
html.is-mac-app .site-header .logo { display: flex; align-items: center; height: 34px; }
html.is-mac-app .site-header { box-shadow: 0 1px 0 var(--border); }

/* „Czytaj też” w środku artykułu – minimalistycznie */
.article-body .peek { margin: 30px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.article-body .peek-link { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 0; color: inherit; text-decoration: none; }
.article-body .peek-text { display: block; min-width: 0; }
.article-body .peek-kicker { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.article-body .peek-title { display: block; margin: 7px 0 9px; font-size: 1.22rem; line-height: 1.28; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.article-body .peek-meta { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); }
.article-body .peek-go { margin-left: 6px; font-weight: 700; color: var(--text); transition: transform .2s, color .2s; }
.article-body .peek-link:hover .peek-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.article-body .peek-link:hover .peek-go { transform: translateX(3px); color: var(--accent); }
.article-body .peek-img { flex: none; width: 124px; height: 88px; object-fit: cover; border-radius: 10px; transition: transform .35s; }
.article-body .peek-link:hover .peek-img { transform: scale(1.03); }
@media (max-width: 560px) { .article-body .peek-link { gap: 14px; padding: 16px 0; } .article-body .peek-title { font-size: 1.05rem; } .article-body .peek-img { width: 88px; height: 88px; } }
.article-body .peek-link, .article-body .peek-link:hover { color: var(--text); text-decoration: none; font-family: inherit; }
.article-body .peek-text, .article-body .peek-meta, .article-body .peek-kicker, .article-body .peek-go { text-decoration: none; font-family: inherit; }
.article-body .peek-title { color: var(--text); }
.article-body .peek-link:hover .peek-title { color: var(--accent); }

/* Cytat – mniejszy (v20261101z) */
.article-quote { margin: 1.1em 0; padding: 4px 16px 4px 18px; border-left-width: 3px; border-radius: 0 10px 10px 0; }
.article-quote p.q-text { font-size: 1.08em; line-height: 1.5; }
.article-quote p.q-by { margin-top: 6px; font-size: .8rem; }
@media (max-width: 700px) { .article-quote p.q-text { font-size: 1em; } }

/* Cytat – minimalistyczny (v20261101aa) */
.article-body .article-quote, .article-quote {
  margin: 1.6em 0; padding: 0 0 0 18px; background: none; border: 0; border-left: 2px solid var(--accent); border-radius: 0;
}
.article-quote p.q-text {
  font: italic 400 1.02em/1.65 var(--font-serif); color: var(--text); letter-spacing: 0;
}
.article-quote p.q-text::before, .article-quote p.q-text::after { content: none; }
.article-quote p.q-by {
  display: block; margin: 8px 0 0; font: 500 .78rem/1.4 var(--font); font-style: normal; color: var(--muted); letter-spacing: .02em;
}
.article-quote .q-author { font-weight: 700; color: var(--muted); }
.article-quote .q-author::before, .article-quote .q-source::before { content: none; }
.article-quote .q-author + .q-source::before { content: " · "; }
.article-quote .q-source { font-style: normal; font-weight: 500; }
@media (max-width: 700px) { .article-quote { margin: 1.3em 0; padding-left: 14px; } .article-quote p.q-text { font-size: 1em; } }

/* Cytat – szare tło wraca, mniejszy tekst (v20261101ab) */
.article-body .article-quote, .article-quote {
  margin: 1.3em 0; padding: 10px 18px 10px 20px; background: var(--quote-bg); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
}
.article-quote p.q-text { font: italic 400 1em/1.6 var(--font-serif); }
.article-quote p.q-text::before { content: "\201E"; color: var(--accent); font-style: normal; font-weight: 700; }
.article-quote p.q-text::after { content: "\201D"; color: var(--accent); font-style: normal; font-weight: 700; }
.article-quote p.q-by { margin-top: 6px; font-size: .76rem; }
@media (max-width: 700px) { .article-quote { padding: 8px 14px 8px 16px; } }

/* Zgłoszone reklamy (konto Właściciela) */

/* Panel: zakładki w grupach, przyklejone pod nagłówkiem (v20261101ad) */

.ptab[hidden] { display: none; }

.mod-guests { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .86rem; }
.cmt-guest { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; }

/* Reakcje i wyświetlenia pod artykułem */
.reactions { margin: 22px 0 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card, #fff); }
.rx-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .95rem; }
.rx-views { color: var(--muted); font-size: .82rem; font-weight: 600; }
.rx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.rx-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface, #fff); color: var(--text); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; transition: transform .12s, border-color .15s, background .15s; }
.rx-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.rx-btn b { color: var(--muted); font-weight: 700; min-width: 1ch; }
.rx-btn.is-on { border-color: var(--accent); background: rgba(214, 0, 28, .08); } .rx-btn.is-on b { color: var(--accent); }
.rx-e { font-size: 1.15rem; line-height: 1; }
@media (max-width: 480px) { .rx-l { display: none; } .rx-btn { padding: 8px 12px; } }

/* Podsumowanie reakcji przy nagłówku artykułu (reagować można tylko na dole) */
.rx-top { display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 0; font: inherit; font-size: .88rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.rx-top[hidden] { display: none; }
.rx-top span { display: inline-flex; align-items: center; gap: 4px; }
.rx-top:hover { color: var(--text); }
.article-meta .rx-top::after { content: none !important; display: none; }
.article-meta .rx-top { gap: 14px; }
.rx-top .ic-eye, .rx-views .ic-eye { flex: none; vertical-align: -3px; opacity: .85; }
.rx-views { display: inline-flex; align-items: center; gap: 6px; }
.rx-top .rx-v { gap: 6px; }
.article-meta .rx-top span::before { content: none !important; }

/* Pełny profil użytkownika (Właściciel) */

/* ===== Pasek boczny zamiast górnego menu (komputer, v20261101aj) ===== */
.rail-toggle, .rail-profile, .logo-mini { display: none; }
@media (min-width: 1100px) {
  :root { --rail-w: 244px; }
  html.rail-on body.rail-c { --rail-w: 78px; }
  html.rail-on body { padding-left: var(--rail-w); transition: padding-left .2s ease; }
  html.rail-on .site-header { position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w); z-index: 60; border-bottom: 0; border-right: 1px solid var(--border); box-shadow: none; transition: width .2s ease; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
  html.rail-on .site-header .header-top { flex-direction: column; align-items: stretch; flex-wrap: nowrap; height: 100%; width: 100%; max-width: none; margin: 0; padding: 18px 12px 14px; gap: 14px; }
  html.rail-on .site-header .logo { order: 1; padding: 2px 8px 6px; display: block; }
  html.rail-on .site-header .logo svg { width: 100%; height: auto; display: block; }
  html.rail-on .site-header .search { order: 2; margin: 0; max-width: none; flex: none; }
  html.rail-on .site-header .main-nav { order: 3; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; padding-right: 2px; }
  html.rail-on .site-header .auth { order: 4; margin: 0; flex-wrap: wrap; justify-content: flex-start; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
  html.rail-on .site-header .rail-toggle { order: 5; display: flex; }
  html.rail-on .site-header .nav-link { width: 100%; justify-content: flex-start; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: .95rem; white-space: nowrap; }
  html.rail-on .site-header .nav-link svg { flex: none; }
  html.rail-on .site-header .nav-link.is-active { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
  html.rail-on .site-header .search input { width: 100%; }
  html.rail-on .site-header .search-suggest { left: calc(100% + 14px); right: auto; top: 0; width: 360px; }
  html.rail-on .rail-toggle { align-items: center; gap: 10px; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: .84rem; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
  html.rail-on .rail-toggle:hover { background: var(--soft); color: var(--text); }
  html.rail-on .rail-toggle svg { transition: transform .2s; flex: none; }
  html.rail-on body.rail-c .rail-toggle svg { transform: rotate(180deg); }
  html.rail-on .rail-profile { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; overflow: hidden; }
  html.rail-on .rail-profile img { width: 100%; height: 100%; object-fit: cover; display: block; }
  html.rail-on .is-admin .rail-profile, html.rail-on .is-reader-only .rail-profile { display: inline-grid; place-items: center; }
  html.rail-on .is-admin .site-header #btn-account, html.rail-on .is-reader-only .site-header #btn-account { display: none; }
  /* zwinięty pasek: same ikony */
  html.rail-on body.rail-c .site-header .header-top { padding-inline: 10px; align-items: center; }
  html.rail-on body.rail-c .site-header .logo svg { display: none; }
  html.rail-on body.rail-c .site-header .logo-mini { display: block; width: 38px; height: 38px; margin: 0 auto; }
  html.rail-on body.rail-c .site-header .nav-link { gap: 0; justify-content: center; padding: 12px 0; }
  html.rail-on body.rail-c .site-header .nav-link span, html.rail-on body.rail-c .rail-toggle span { display: none; }
  html.rail-on body.rail-c .site-header .nav-link { position: relative; }
  html.rail-on body.rail-c .site-header .nav-badge { position: absolute; top: 4px; right: 12px; }
  html.rail-on body.rail-c .site-header .search { width: 46px; }
  html.rail-on body.rail-c .site-header .search input { width: 46px; padding: 0; cursor: pointer; color: transparent; }
  html.rail-on body.rail-c .site-header .search input::placeholder { color: transparent; }
  html.rail-on body.rail-c .site-header .search svg { left: 15px; }
  html.rail-on body.rail-c .site-header .auth { flex-direction: column; align-items: center; flex-wrap: nowrap; }
  html.rail-on body.rail-c .rail-toggle { gap: 0; padding: 10px 14px; }
  /* profil: avatar na pasku, po kliknięciu okienko */
  html.rail-on #side-left .profile-card { display: none !important; }
  html.rail-on body.pp-open #side-left .profile-card { display: block !important; position: fixed; left: calc(var(--rail-w) + 12px); bottom: 16px; width: 310px; max-height: calc(100vh - 32px); overflow-y: auto; z-index: 70; box-shadow: 0 18px 60px rgba(0, 0, 0, .28); border: 1px solid var(--border); animation: view-in .18s ease both; }
  html.rail-on .sp-dock-l { left: calc(var(--rail-w) + 18px); }
}

/* ===== Pasek boczny – wersja smukła + kategorie na pasku (v20261101aj) ===== */
.rail-scroll { display: contents; }
@media (min-width: 1100px) {
  :root { --rail-w: 216px; }
  html.rail-on body.rail-c { --rail-w: 68px; }
  html.rail-on .site-header .header-top { padding: 16px 10px 12px; gap: 12px; }
  html.rail-on .site-header .logo { padding: 2px 6px 2px; }
  html.rail-on .site-header .logo svg { width: 78%; }
  html.rail-on .site-header .search input { height: 38px; font-size: .86rem; }
  html.rail-on .rail-scroll { display: flex; flex-direction: column; gap: 14px; order: 3; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
  html.rail-on .rail-scroll::-webkit-scrollbar { display: none; }
  html.rail-on .site-header .main-nav { flex: none; overflow: visible; order: 0; gap: 2px; }
  html.rail-on .site-header .nav-link { padding: 9px 12px; font-size: .88rem; border-radius: 12px; gap: 11px; }
  html.rail-on .site-header .nav-link svg { width: 17px; height: 17px; }
  html.rail-on .rail-scroll .side-card { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
  html.rail-on .rail-scroll .side-title { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin: 4px 12px 6px; padding-top: 12px; border-top: 1px solid var(--border); }
  html.rail-on .rail-scroll .cat-list { gap: 1px; }
  html.rail-on .rail-scroll .cat-list .chip-btn { padding: 7px 12px 7px 14px; font-size: .84rem; border-radius: 10px; width: 100%; text-align: left; transform: none; }
  html.rail-on .rail-scroll .cat-list .chip-btn:hover { transform: none; }
  html.rail-on .rail-scroll .cat-list .chip-btn.active::before { left: 4px; }
  html.rail-on .rail-scroll .tip-card { padding: 12px 14px; border-radius: 14px; margin-top: 2px; }
  html.rail-on .rail-scroll .tip-card strong { font-size: .88rem; }
  html.rail-on .rail-scroll .tip-card span { font-size: .76rem; }
  html.rail-on .rail-scroll .tip-card em { font-size: .76rem; }
  html.rail-on .site-header .auth { padding-top: 8px; gap: 6px; }
  html.rail-on .site-header .auth .btn-icon { width: 36px; height: 36px; border-radius: 12px; }
  html.rail-on .rail-profile { width: 36px; height: 36px; }
  /* zwinięty: kwadratowe, zaokrąglone ikony wyśrodkowane */
  html.rail-on body.rail-c .site-header .header-top { padding-inline: 0; align-items: center; }
  html.rail-on body.rail-c .site-header .logo-mini { width: 34px; height: 34px; border-radius: 10px; }
  html.rail-on body.rail-c .site-header .main-nav { align-items: center; width: 100%; }
  html.rail-on body.rail-c .site-header .nav-link { width: 42px; height: 42px; padding: 0; border-radius: 13px; justify-content: center; }
  html.rail-on body.rail-c .site-header .nav-badge { top: 2px; right: 2px; }
  html.rail-on body.rail-c .site-header .search { width: 42px; }
  html.rail-on body.rail-c .site-header .search input { width: 42px; height: 42px; border-radius: 13px; }
  html.rail-on body.rail-c .site-header .search svg { left: 13px; }
  html.rail-on body.rail-c .rail-scroll { align-items: center; }
  html.rail-on body.rail-c .rail-scroll .side-card, html.rail-on body.rail-c .rail-scroll .tip-card { display: none; }
  html.rail-on body.rail-c .site-header .auth { width: 100%; }
  html.rail-on body.rail-c .rail-toggle { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 13px; margin: 0 auto; }
  /* układ strony bez lewej kolumny */
  html.rail-on .side-left { display: contents; }
  html.rail-on .layout { grid-template-columns: minmax(0, 1fr) 330px; }
  html.rail-on #layout[data-view="home"][data-cat="1"] { grid-template-columns: minmax(0, 1fr) 330px; }
  html.rail-on #layout[data-view="home"], html.rail-on #layout[data-view="editor"], html.rail-on #layout[data-view="panel"], html.rail-on #layout[data-view="settings"],
  html.rail-on #layout[data-view="ranking"], html.rail-on #layout[data-view="notfound"], html.rail-on #layout[data-view="tip"], html.rail-on #layout[data-view="legal"],
  html.rail-on #layout[data-view="quick"], html.rail-on #layout[data-view="saved"] { grid-template-columns: minmax(0, 1fr); }
  html.rail-on #layout[data-view="home"][data-cat="1"] { grid-template-columns: minmax(0, 1fr) 330px; }
  html.rail-on .side-right { top: 24px; max-height: calc(100vh - 48px); }
}
@media (min-width: 1100px) and (max-width: 1220px) {
  html.rail-on .layout, html.rail-on #layout[data-view="home"][data-cat="1"] { grid-template-columns: minmax(0, 1fr); }
  html.rail-on .side-right { grid-column: 1; position: static; max-height: none; }
}
@media (min-width: 1100px) { html.rail-on .rail-scroll .tip-card span { display: none; } html.rail-on .rail-scroll .tip-card { flex: none; } }

/* ===== Pasek: ikony kategorii, równe przyciski (v20261101aj) ===== */
.cat-ico { display: none; }
@media (min-width: 1100px) {
  html.rail-on .rail-scroll .cat-list .chip-btn { display: flex; align-items: center; gap: 11px; padding: 8px 12px; }
  html.rail-on .rail-scroll .cat-list .chip-btn .cat-ico { display: inline-flex; flex: none; }
  html.rail-on .rail-scroll .cat-list .chip-btn.active::before { display: none; }
  html.rail-on .site-header .auth { gap: 8px; }
  html.rail-on .site-header .auth .btn-icon, html.rail-on .rail-profile { width: 40px; height: 40px; }
  html.rail-on body.rail-c .site-header .auth { align-items: center; padding-top: 10px; }
  html.rail-on body.rail-c .site-header .auth .btn-icon, html.rail-on body.rail-c .rail-profile { width: 42px; height: 42px; border-radius: 13px; }
  html.rail-on body.rail-c .rail-profile { border-radius: 50%; }
  html.rail-on body.rail-c .rail-toggle { border: 1px solid var(--border); background: var(--surface); }
  html.rail-on .site-header .header-top { padding-bottom: 14px; }
  /* zwinięty: kategorie jako ikony pod linią */
  html.rail-on body.rail-c .rail-scroll .side-card { display: block; width: 100%; }
  html.rail-on body.rail-c .rail-scroll .side-title { font-size: 0; margin: 2px 14px 8px; padding: 0; border-top: 1px solid var(--border); height: 0; }
  html.rail-on body.rail-c .rail-scroll .cat-list { align-items: center; gap: 2px; }
  html.rail-on body.rail-c .rail-scroll .cat-list .chip-btn { width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 13px; }
  html.rail-on body.rail-c .rail-scroll .cat-list .chip-btn span { display: none; }
  html.rail-on body.rail-c .rail-scroll .tip-card { display: none; }
  html.rail-on body.rail-c .rail-scroll { gap: 10px; }
  html.rail-on body.rail-c .site-header .main-nav { padding-bottom: 0; }
}
@media (min-width: 1100px) { html.rail-on .site-header .search input { font-size: .82rem; padding-right: 8px; } }

/* ===== v20261101aj: Nowinki + Śliska+, Redakcja, kompaktowy pasek ===== */

.quick-strip { padding: 10px 16px 12px; }
.quick-strip .quick-item { padding: 5px 0; }
.quick-strip .quick-body p { font-size: .9rem; }

.plus-box { text-align: center; max-width: 380px; }
.plus-badge { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; font: 800 1.8rem/1 var(--font-display); color: #fff; background: #e0152e; }
.plus-p { margin: 0 0 10px; color: var(--muted); line-height: 1.5; }
.plus-s { font-size: .86rem; margin-bottom: 16px; }
@media (min-width: 1100px) {
  /* układ: jedna kolumna, prawa tylko tam, gdzie jest potrzebna */
  html.rail-on #layout, html.rail-on #layout[data-view] { grid-template-columns: minmax(0, 1fr); }
  html.rail-on #layout[data-view="home"][data-cat="1"], html.rail-on #layout[data-view="article"]:not([data-right="0"]) { grid-template-columns: minmax(0, 1fr) 330px; }
}
@media (min-width: 1100px) and (max-width: 1220px) {
  html.rail-on #layout[data-view="home"][data-cat="1"], html.rail-on #layout[data-view="article"]:not([data-right="0"]) { grid-template-columns: minmax(0, 1fr); }
}
/* kompaktowy pasek: wszystko mieści się bez przewijania */
@media (min-width: 1100px) {
  html.rail-on .site-header .header-top { padding: 12px 10px 10px; gap: 8px; }
  html.rail-on .site-header .logo { padding: 0 6px; }
  html.rail-on .site-header .logo svg { width: 70%; }
  html.rail-on .site-header .search input { height: 34px; }
  html.rail-on .site-header .nav-link { padding: 7px 11px; font-size: .85rem; }
  html.rail-on .site-header .nav-link svg { width: 16px; height: 16px; }
  html.rail-on .rail-scroll { gap: 8px; }
  html.rail-on .rail-scroll .side-title { margin: 2px 12px 4px; padding-top: 8px; }
  html.rail-on .rail-scroll .cat-list .chip-btn { padding: 6px 11px; font-size: .82rem; }
  html.rail-on .rail-scroll .tip-card { padding: 9px 12px; }
  html.rail-on .rail-scroll .tip-card strong { font-size: .82rem; }
  html.rail-on .site-header .auth { padding-top: 6px; gap: 6px; flex-wrap: nowrap; }
  html.rail-on .site-header .auth .btn-icon, html.rail-on .rail-profile { width: 34px; height: 34px; border-radius: 11px; }
  html.rail-on .rail-profile { border-radius: 50%; }
  html.rail-on .site-header .rail-toggle { padding: 6px 10px; }
  /* zwinięty: mniejsze kafelki, bez motywu */
  html.rail-on body.rail-c .site-header .nav-link, html.rail-on body.rail-c .rail-scroll .cat-list .chip-btn, html.rail-on body.rail-c .rail-toggle, html.rail-on body.rail-c .site-header .auth .btn-icon, html.rail-on body.rail-c .rail-profile { width: 36px; height: 36px; border-radius: 11px; }
  html.rail-on body.rail-c .rail-profile { border-radius: 50%; }
  html.rail-on body.rail-c .site-header .search { width: 36px; }
  html.rail-on body.rail-c .site-header .search input { width: 36px; height: 36px; border-radius: 11px; }
  html.rail-on body.rail-c .site-header .search svg { left: 10px; }
  html.rail-on body.rail-c .site-header .logo-mini { width: 30px; height: 30px; }
  html.rail-on body.rail-c .site-header .header-top { gap: 6px; }
  html.rail-on body.rail-c .rail-scroll { gap: 4px; }
  html.rail-on body.rail-c .rail-scroll .cat-list, html.rail-on body.rail-c .site-header .main-nav { gap: 1px; }
  html.rail-on body.rail-c #btn-theme { display: none; }
  html.rail-on .is-reader .rail-profile, html.rail-on .is-admin .rail-profile { display: inline-grid; place-items: center; }
  html.rail-on .is-reader .site-header #btn-account, html.rail-on .is-admin .site-header #btn-account { display: none; }
  html.rail-on .rail-profile .avatar, html.rail-on .rail-profile > * { width: 100%; height: 100%; border-radius: 50%; }
}
/* Redakcja */
.au-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.au-card { min-width: 0; }
.au-body strong { overflow-wrap: anywhere; }
.mod-q { max-width: 420px; width: 100%; }
@media (min-width:1100px) and (max-height:780px){ html.rail-on .rail-scroll .tip-card{display:none} }

/* ===== Rotator nowinek + Śliska+ (v20261101aj) ===== */

.quick-strip .quick-list .quick-item { display: none; border-top: 0; padding: 6px 0; }
.quick-strip .quick-list .quick-item.is-on { display: flex; animation: qr-in .35s ease both; }
@keyframes qr-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.plus-card { display: flex; flex-direction: column; justify-content: center; gap: 5px; text-align: left; font: inherit; cursor: pointer; color: #fff; border: 0; border-radius: 16px; padding: 12px 14px; background: radial-gradient(120% 140% at 0% 0%, #3a3a3a 0%, #1f1f1f 55%, #141414 100%); box-shadow: inset 0 -2px 0 #e0152e; transition: transform .15s; }
.plus-card:hover { transform: translateY(-2px); }
.plus-top { display: flex; align-items: center; justify-content: space-between; }
.plus-top b { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -.01em; }
.plus-top i { font-style: normal; font-size: .58rem; font-weight: 800; letter-spacing: .1em; background: #e0152e; padding: 3px 8px; border-radius: 999px; }
.plus-tx { font-size: .76rem; line-height: 1.35; color: rgba(255, 255, 255, .72); }
.plus-go { font-size: .78rem; font-weight: 800; }

/* bez migotania starego wyglądu przy ładowaniu */
@media (min-width: 1100px) { html.rail-on #side-left > .side-card, html.rail-on #side-left > .tip-card { display: none; } }

/* Zwinięty pasek – równe kafelki u góry (v20261101ap) */
@media (min-width: 1100px) {
  html.rail-on body.rail-c .site-header .header-top { padding-top: 14px; gap: 6px; }
  html.rail-on body.rail-c .site-header .logo { padding: 0; margin: 0 auto 8px; width: 38px; height: 38px; display: block; }
  html.rail-on body.rail-c .site-header .logo-mini { width: 38px; height: 38px; margin: 0; border-radius: 12px; display: block; object-fit: cover; }
  html.rail-on body.rail-c .site-header .search { width: 38px; height: 38px; margin: 0 auto; position: relative; flex: none; }
  html.rail-on body.rail-c .site-header .search input { width: 38px; height: 38px; border-radius: 12px; background: transparent; border: 0; box-shadow: none; padding: 0; cursor: pointer; }
  html.rail-on body.rail-c .site-header .search input:hover { background: var(--soft); }
  html.rail-on body.rail-c .site-header .search svg { left: 50%; top: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); color: var(--muted); pointer-events: none; }
  html.rail-on body.rail-c .site-header .nav-link, html.rail-on body.rail-c .rail-scroll .cat-list .chip-btn, html.rail-on body.rail-c .rail-toggle, html.rail-on body.rail-c .site-header .auth .btn-icon, html.rail-on body.rail-c .rail-profile { width: 38px; height: 38px; border-radius: 12px; }
  html.rail-on body.rail-c .rail-profile { border-radius: 50%; }
  html.rail-on body.rail-c .site-header .main-nav { margin-top: 4px; }
}
@media (min-width:1100px){ html.rail-on body.rail-c .site-header .main-nav { padding: 4px 0 0; margin-top: 0; } html.rail-on body.rail-c .rail-scroll { padding: 0; } }

/* Nowinki: trzy naraz, kompaktowo (v20261101aq) */
.quick-strip .quick-list .quick-item, .quick-strip .quick-list .quick-item.is-on { display: flex; animation: none; padding: 5px 0; border-top: 1px solid var(--border); }
.quick-strip .quick-list .quick-item:first-child { border-top: 0; }
.quick-strip { padding: 8px 16px 10px; margin-bottom: 14px; }
.quick-strip .quick-head { margin-bottom: 2px; }

.quick-strip .quick-body p { font-size: .88rem; }
.plus-card { padding: 10px 14px; gap: 3px; justify-content: center; }
.plus-card .plus-tx { font-size: .72rem; }
.plus-top b { font-size: .98rem; }

.quick-more { align-self: flex-start; margin-top: 8px; }
.quick-strip .quick-head { margin-bottom: 6px; }
.plus-card { margin-top: 2px; }

/* Nowinki i Śliska+ jako dwa osobne panele (v20261101as) */
.quick-row { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; margin: 0 0 18px; align-items: stretch; }
.quick-row .quick-strip { margin: 0; }
.quick-row .plus-card { margin: 0; padding: 14px 18px; border-radius: 18px; }
.quick-row .plus-card .plus-tx { font-size: .78rem; }
@media (max-width: 860px) { .quick-row { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

/* =====================================================================
   REDESIGN „PRO” (v20261101at) – spójna, stonowana, redakcyjna oprawa.
   Czcionki bez zmian. Jasny motyw ustawiany na :root, ciemny zostaje z własnych reguł.
   ===================================================================== */
:root {
  --bg: #f6f7f9;
  --border: #e4e7ec;
  --soft: #f0f2f5;
  --text: #101828;
  --muted: #667085;
  --radius: 12px; --r-card: 14px; --r-ctl: 10px; --r-hero: 18px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .12);
}
body { font-size: 15px; line-height: 1.55; letter-spacing: -.003em; }
h1, h2, h3, .hero-title, .card-title, .tile-title { letter-spacing: -.022em; }

/* Jedna skala zaokrągleń */
.card, .tile, .side-card, .profile-card, .panel, .st-card, .article, .quick-strip, .rank-list, .au-card, .plus-card { border-radius: 14px !important; }
.hero { border-radius: 18px !important; }
.btn, .field input, .field select, .field textarea, .search input { border-radius: 10px; }

/* Karty: cienka ramka, delikatny cień, spokojny hover */
.card, .au-card, .side-card, .quick-strip { border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -16px rgba(16, 24, 40, .28); border-color: #d5d9e0; }
.card-title { font-size: 1.08rem; font-weight: 700; line-height: 1.28; }
.card-lead { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.card-meta { color: var(--muted); font-size: .76rem; letter-spacing: .01em; }

/* Etykiety kategorii: jedna, cicha forma (ciemne szkło, wersaliki) */
.img-tags .chip, .hero-tags .chip, .tile .chip { background: rgba(10, 12, 18, .62) !important; color: #fff !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: .62rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; }
.hero-flag { background: var(--accent); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; }
.badge-new { background: transparent !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, .55); font-size: .6rem; font-weight: 700; letter-spacing: .1em; padding: 4px 9px; border-radius: 999px; }
.badge-urgent { border-radius: 999px; font-size: .62rem; letter-spacing: .1em; }

/* Hero: mocniejszy dół kadru dla czytelności, spokojniejszy tytuł */
.hero::after, .tile::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(8, 10, 16, 0) 38%, rgba(8, 10, 16, .78) 100%); }
.hero-content, .hero-tags, .tile-content, .img-tags { z-index: 2; }
.hero-title { font-weight: 800; line-height: 1.08; text-wrap: balance; }
.tile-title { font-weight: 700; text-wrap: balance; }
.hero, .tile { box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 16px 32px -22px rgba(16, 24, 40, .45); }

/* Nagłówki sekcji w stylu redakcyjnym */
.section-title, .grid-title { font-size: .72rem !important; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
.quick-strip .section-title { font-size: .8rem !important; }
.quick-strip { padding: 10px 18px 12px; }
.quick-strip .quick-time { background: #fff3c4; color: #5c4400; font-size: .7rem; padding: 3px 9px; }
.quick-strip .quick-body p { font-weight: 600; }
.quick-all { font-weight: 700; font-size: .78rem; }

/* Pasek boczny: spokojny, techniczny */
.site-header { background: var(--surface); border-right: 1px solid var(--border); box-shadow: none; }
html.rail-on .site-header .nav-link { font-weight: 600; color: #475467; }
html.rail-on .site-header .nav-link:hover { background: var(--soft); color: var(--text); }
html.rail-on .site-header .nav-link.is-active { background: #fff1f2; color: var(--accent); font-weight: 700; }
html.rail-on .rail-scroll .cat-list .chip-btn { font-weight: 600; color: #475467; }
html.rail-on .rail-scroll .cat-list .chip-btn.active { background: #fff1f2; color: var(--accent); }
html.rail-on .rail-scroll .tip-card { box-shadow: none; background: #1a1a1a; }
.search input { background: var(--soft); border: 1px solid transparent; }
.search input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(214, 0, 28, .1); }

/* Przyciski */
.btn { font-weight: 600; border: 1px solid var(--border); background: var(--surface); transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: var(--field-border); background: var(--soft); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(214, 0, 28, .3); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Śliska+: stonowany, premium */
.plus-card { background: linear-gradient(160deg, #262626, #141414) !important; box-shadow: inset 0 -2px 0 var(--accent), 0 1px 2px rgba(16, 24, 40, .1); }

/* Stopka */
.site-footer { background: #0d0d0d; border-top: 1px solid #1f1f1f; }
.site-footer a, .site-footer span { color: #98a2b3; }
.site-footer a:hover { color: #fff; }

/* Ciemny motyw: zachowaj ciemne powierzchnie */
:root[data-theme="dark"] .site-header { background: var(--surface); border-right-color: var(--border); }
:root[data-theme="dark"] .btn { background: var(--surface); border-color: var(--border); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .au-card, :root[data-theme="dark"] .quick-strip { border-color: var(--border); }
:root[data-theme="dark"] html.rail-on .site-header .nav-link.is-active, :root[data-theme="dark"] .nav-link.is-active { background: rgba(214, 0, 28, .16); }
.quick-strip .section-title { font-size: .98rem !important; letter-spacing: -.015em; text-transform: none; font-weight: 700; }

html[data-theme="dark"].rail-on .site-header { background: var(--surface); border-right-color: var(--border); }
html[data-theme="dark"].rail-on .site-header .nav-link { color: #b5b5b5; }
html[data-theme="dark"].rail-on .site-header .nav-link:hover { background: var(--soft); color: #fff; }
html[data-theme="dark"].rail-on .site-header .nav-link.is-active { background: rgba(214, 0, 28, .18); color: #ff6b7d; }
html[data-theme="dark"].rail-on .rail-scroll .cat-list .chip-btn { color: #b5b5b5; }
html[data-theme="dark"].rail-on .rail-scroll .cat-list .chip-btn:hover { background: var(--soft); color: #fff; }
html[data-theme="dark"].rail-on .rail-scroll .cat-list .chip-btn.active { background: rgba(214, 0, 28, .18); color: #ff6b7d; }
html[data-theme="dark"].rail-on .rail-scroll .tip-card { background: var(--soft); }
html[data-theme="dark"].rail-on .search input { background: var(--soft); }
html[data-theme="dark"].rail-on .quick-strip .quick-time { background: #3a3000; color: #ffe27a; }
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]).rail-on .site-header { background: var(--surface); border-right-color: var(--border); }
html:not([data-theme="light"]).rail-on .site-header .nav-link { color: #b5b5b5; }
html:not([data-theme="light"]).rail-on .site-header .nav-link:hover { background: var(--soft); color: #fff; }
html:not([data-theme="light"]).rail-on .site-header .nav-link.is-active { background: rgba(214, 0, 28, .18); color: #ff6b7d; }
html:not([data-theme="light"]).rail-on .rail-scroll .cat-list .chip-btn { color: #b5b5b5; }
html:not([data-theme="light"]).rail-on .rail-scroll .cat-list .chip-btn:hover { background: var(--soft); color: #fff; }
html:not([data-theme="light"]).rail-on .rail-scroll .cat-list .chip-btn.active { background: rgba(214, 0, 28, .18); color: #ff6b7d; }
html:not([data-theme="light"]).rail-on .rail-scroll .tip-card { background: var(--soft); }
html:not([data-theme="light"]).rail-on .search input { background: var(--soft); }
html:not([data-theme="light"]).rail-on .quick-strip .quick-time { background: #3a3000; color: #ffe27a; }
}

/* =====================================================================
   PORTAL INFORMACYJNY (v20261101at) – układ jak w serwisach newsowych
   ===================================================================== */
.masthead { display: flex; align-items: center; gap: 18px; padding: 0 0 10px; margin-bottom: 14px; border-bottom: 2px solid var(--text); font-size: .78rem; color: var(--muted); }
.mh-date { font-weight: 700; color: var(--text); text-transform: capitalize; letter-spacing: .01em; }
.mh-live { display: inline-flex; align-items: center; gap: 7px; }
.mh-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(214, 0, 28, .5); animation: mh-pulse 2s infinite; }
@keyframes mh-pulse { 70% { box-shadow: 0 0 0 7px rgba(214, 0, 28, 0); } 100% { box-shadow: 0 0 0 0 rgba(214, 0, 28, 0); } }
.mh-sp { flex: 1; }
.masthead a { color: var(--muted); font-weight: 600; text-decoration: none; }
.masthead a:hover { color: var(--accent); }
@media (max-width: 720px) { .masthead a { display: none; } .masthead { gap: 10px; flex-wrap: wrap; } }

.home-top { grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: stretch; }

@media (max-width: 1250px) { .home-top { grid-template-columns: minmax(0, 1fr); }  }

/* Karty listy: zdjęcie u góry, kategoria czerwonym tekstem, nagłówek pod spodem */
.news-grid .card, #news-grid .card { display: flex; flex-direction: column; background: var(--card, #fff); overflow: hidden; }
#news-grid .card .card-media { order: 1; aspect-ratio: 16 / 10; display: block; overflow: hidden; border-radius: 0; }
#news-grid .card .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
#news-grid .card:hover .card-media img { transform: scale(1.04); }
#news-grid .card .img-tags { order: 2; position: static; padding: 14px 18px 0; display: flex; gap: 8px; align-items: center; }
#news-grid .card .img-tags .chip { background: transparent !important; color: var(--accent) !important; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; font-size: .68rem; letter-spacing: .12em; }
#news-grid .card .img-tags .badge-new { color: var(--accent) !important; border-color: var(--accent); }
#news-grid .card .card-body { order: 3; padding: 6px 18px 16px; }
#news-grid .card .card-title { font-size: 1.14rem; line-height: 1.24; }
#news-grid .card .card-lead { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }

/* Nagłówek sekcji z czerwonym akcentem */
#grid-title { display: flex; align-items: center; gap: 14px; margin: 30px 0 16px; padding-top: 12px; border-top: 2px solid var(--text); font-size: .86rem !important; letter-spacing: .16em; position: relative; }
#grid-title::before { content: ""; position: absolute; left: 0; top: -2px; width: 56px; height: 2px; background: var(--accent); }

/* Hero jako zdjęcie wiodące */
.hero { min-height: 480px; }
.hero-title { font-size: clamp(1.9rem, 3vw, 2.7rem); max-width: 22ch; }
#grid-title::before { bottom: auto; height: 2px; border-radius: 0; width: 56px; top: -2px; transform: none; }
.mh-date { text-transform: none; }
.mh-date::first-letter { text-transform: uppercase; }
#quick-slot .quick-row { margin-top: 24px; }

/* Wersja deweloperska (dev.sliska.pl) */
#dev-dock { position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 9999; display: flex; gap: 6px; align-items: center; }
#dev-out { border: 0; cursor: pointer; background: rgba(28, 17, 0, .88); color: #fbbf24; font: 800 .66rem/1 var(--font); letter-spacing: .08em; padding: 7px 11px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
#dev-out:hover { background: #000; }
#dev-pill { z-index: 9999; display: inline-flex; align-items: center; gap: 6px; background: #f59e0b; color: #1c1100; font: 800 .66rem/1 var(--font); letter-spacing: .1em; padding: 7px 11px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); text-decoration: none; opacity: .9; transition: opacity .15s, transform .15s; }
#dev-pill:hover { opacity: 1; transform: translateY(-1px); }
#dev-pill b { font-weight: 800; }
#dev-pill span { font-weight: 700; letter-spacing: .04em; text-transform: none; opacity: .85; }

/* Ranga Moderatora: mała żółta korona przy nazwie */
.crown { display: inline-flex; align-items: center; margin-left: 5px; color: #f5b301; vertical-align: -2px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.12)); }
.crown svg { display: block; }
.up-meta .crown { margin-left: 0; }
.up-meta .crown svg { width: 18px; height: 18px; }
html.is-dev body { padding-bottom: 46px; }

/* Logo wersji deweloperskiej: plakietka DEV jest częścią SVG logo (przypięta do napisu); przełącznik w #dev-dock */
html.is-dev #logo svg { overflow: visible; }
html.dev-logo-off .dev-badge { display: none; }
html.is-dev body.rail-c #logo { position: relative; }
html.rail-on.is-dev:not(.dev-logo-off) body.rail-c #logo::after { content: "DEV"; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%) rotate(-6deg); background: #d6001c; color: #fff; font: 800 .46rem/1 var(--font); letter-spacing: .1em; padding: 3px 5px; border-radius: 99px; pointer-events: none; }
#dev-logo { border: 0; cursor: pointer; background: rgba(28, 17, 0, .88); color: #fbbf24; font: 800 .66rem/1 var(--font); letter-spacing: .08em; padding: 7px 11px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
#dev-logo:hover { background: #000; }

/* Strona główna: jeden duży artykuł i dwa mniejsze obok (zamiast panelu „Najnowsze”) */
.home-top { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.home-top.single { grid-template-columns: minmax(0, 1fr); }
.home-tiles { display: grid; grid-template-rows: 1fr 1fr; gap: 18px; min-width: 0; }
.home-tiles .tile { min-height: 210px; }
@media (max-width: 1250px) { .home-top { grid-template-columns: minmax(0, 1fr); } .home-tiles { grid-template-columns: 1fr 1fr; grid-template-rows: auto; } .home-tiles .tile { min-height: 190px; } }
@media (max-width: 620px) { .home-tiles { grid-template-columns: 1fr; } }

/* Kategorie: trzy artykuły w rzędzie (z prawą kolumną też) */
@media (min-width: 1100px) {
  #layout[data-view="home"][data-cat="1"] .app .grid,
  #layout:not([data-view="home"]) .app #news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
#news-grid .card-title { font-size: 1rem; }
/* Reklama w siatce zawsze dorównuje wysokością sąsiednim artykułom (nie zostaje pusta przestrzeń) */
#news-grid > .sp-card { aspect-ratio: auto; min-height: 320px; height: 100%; }

/* Pasek PILNE – nowy wygląd: ciemny, smukły, z czerwonym wskaźnikiem na żywo */
.breaking {
  position: relative;
  background: #15110f;
  color: #fff;
  box-shadow: none;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.breaking::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--accent) 0, var(--accent) 120px, rgba(224,21,46,0) 60%);
}
.breaking-inner { padding-top: 8px; padding-bottom: 8px; gap: 14px; }
.breaking-label {
  background: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(224,21,46,.18);
  padding: 4px 11px 4px 10px; font-size: .68rem; font-weight: 800; letter-spacing: .14em;
}
.breaking-label::before { background: #fff; width: 6px; height: 6px; }
.ticker { -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.ticker-item { color: #fff; font-weight: 600; font-size: .93rem; letter-spacing: 0; }
.ticker-item:hover { text-decoration: none; color: #ff7a8a; }
.ticker-dot, .ticker-track.is-scrolling .ticker-set::after { color: var(--accent); opacity: 1; font-size: .55rem; }
.ticker-track { justify-content: flex-start; }
@media (max-width: 620px) { .breaking-inner { gap: 10px; } .ticker-item { font-size: .86rem; } }
.ticker { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }

/* PILNE: wraca czerwony, ale cieńszy */
.breaking {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 78%, #000), var(--accent) 50%, color-mix(in srgb, var(--accent) 78%, #000));
  border-bottom: 0;
}
.breaking::after { display: none; }
.breaking-inner { padding-top: 3px; padding-bottom: 3px; gap: 12px; }
.breaking-label { background: #fff; color: var(--accent); box-shadow: none; padding: 2px 9px 2px 8px; font-size: .64rem; }
.breaking-label::before { background: var(--accent); width: 6px; height: 6px; }
.ticker-item { font-size: .88rem; line-height: 1.3; }
.ticker-item:hover { color: #fff; text-decoration: underline; }
.ticker-dot, .ticker-track.is-scrolling .ticker-set::after { color: #fff; opacity: .6; }

/* DEV: plakietka przy logo tylko raz (na telefonie i w szerokim układzie bez zwiniętego menu nie dublujemy jej pseudo-elementem) */
@media (max-width: 860px) { html.is-dev #logo::after { display: none !important; } }

/* hotfix 2026-11-02: korona zawsze w jednej linii z nazwą i plakietką, pole URL w galerii */
.cmt-head > .rb { display: inline-flex; align-items: center; gap: 4px; flex: none; white-space: nowrap; }
.cmt-head > .rb .crown { margin-left: 0; }
.cmt-head .cmt-name { min-width: 0; }
.cmt-head .cmt-to { white-space: nowrap; }

/* Telefon: wyśrodkowany autor i data (hotfix) */
@media (max-width: 640px) {
  .article-meta { justify-content: center; text-align: center; }
  .article-meta > .author-line { justify-content: center; }
  .article-meta > .rx-top { flex: 0 0 100%; justify-content: center; }
  .article-meta > .rx-top::before { display: none !important; }
  .article-meta > .rx-top[hidden] { display: none; }
}

/* hotfix 2026-11-02: autor i statystyki artykułu wyśrodkowane na telefonie */
@media (max-width: 700px) {
  .article-meta { justify-content: center; text-align: center; }
  .article-meta > .author-line { justify-content: center; }
  .article-meta > .rx-top { flex: 0 0 100%; justify-content: center; display: inline-flex; }
  .article-meta > .rx-top[hidden] { display: none; }
  .article-meta > .rx-top::before { content: none !important; display: none !important; }
}
