/* Janów — clean editorial theme: black-on-white, high-contrast serif display,
   generous whitespace, matching the camp's poster aesthetic. */

:root {
  --bg: #fbfaf7;        /* warm off-white */
  --surface: #ffffff;
  --surface-2: #f4f2ec;
  --border: #e6e2d8;
  --text: #15120d;      /* near-black, warm */
  --muted: #6f6a60;
  --accent: #15120d;    /* editorial = ink */
  --danger: #b42318;
  --ok: #287d3c;
  --radius: 10px;
  --maxw: 680px;
  --serif: "Didot", "Bodoni 72", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand { font-family: var(--serif); font-weight: 700; letter-spacing: 0.01em; }
h1 { line-height: 1.05; }

a { color: var(--text); text-underline-offset: 2px; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* --- Landing / gate --- */
.gate-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.gate-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
}
.gate-card h1 {
  font-size: 2.4rem;
  margin: 0 0 0.4rem;
}
.gate-card p.muted, p.muted {
  color: var(--muted);
  font-size: 0.95rem;
}
.gate-card p.muted { margin: 0 0 1.5rem; }

input, textarea, button, select { font: inherit; }

input[type="text"], input[type="password"], input[type="email"] {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.12em;
}
input:focus, textarea:focus { outline: none; border-color: var(--text); }

button, .btn {
  display: inline-block;
  margin-top: 1rem;
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--text);
  color: #fff;
  border: 1px solid var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
button:hover, .btn:hover { opacity: 0.85; }

.error { color: var(--danger); font-size: 0.9rem; margin-top: 0.75rem; min-height: 1.2em; }

/* Gate consent: secondary "just now" button, scan hint, cookie note */
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--surface-2); opacity: 1; }
.scan-hint { color: var(--ok); font-size: 0.9rem; margin: 0.5rem 0 0.25rem; }
.cookie-note { font-size: 0.8rem; color: var(--muted); margin: 1rem 0 0; line-height: 1.4; }
.cookie-note a { color: var(--muted); }

/* Cookie policy / prose page */
.prose { line-height: 1.7; }
.prose h1 { font-size: 1.9rem; margin: 0.5rem 0 1rem; }
.prose h2 { font-size: 1.25rem; margin: 1.75rem 0 0.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose code { background: var(--surface-2); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.9em; }
.cookie-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; font-size: 0.92rem; }
.cookie-table th, .cookie-table td { text-align: left; vertical-align: top; padding: 0.6rem; border: 1px solid var(--border); }
.cookie-table th { background: var(--surface-2); }

/* --- Top bar --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(251,250,247,0.9);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.topbar { flex-wrap: wrap; gap: 0.5rem; }
.topbar .brand { font-size: 1.5rem; text-decoration: none; color: var(--text); }
.topbar nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.9rem; font-size: 0.9rem; }
.topbar nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.topbar nav a:hover { color: var(--text); }

.back-link { display: inline-block; color: var(--muted); text-decoration: none; font-size: 0.9rem; margin: 0 0 0.5rem; }
.back-link:hover { color: var(--text); }

.form-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.75rem; }
.form-actions button[type="submit"] { margin-top: 0; }
.btn-secondary { color: var(--muted); text-decoration: none; }
.btn-secondary:hover { color: var(--text); text-decoration: underline; }

/* --- Feed --- */
.post {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.post h2 { margin: 0 0 0.35rem; font-size: 1.6rem; line-height: 1.15; }
.post .meta { color: var(--muted); font-size: 0.8rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.post .body { font-size: 1.02rem; }
.post .body img, .post .body video { max-width: 100%; border-radius: 6px; }
.post .media { margin-top: 1rem; display: grid; gap: 0.75rem; }
.post .media img, .post .media video { width: 100%; border-radius: 6px; display: block; border: 1px solid var(--border); }
.post .media img, .post .body img { cursor: zoom-in; }

/* Tap-to-enlarge overlay */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

/* Document (PDF) attachment */
.doc-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}
.doc-link:hover { border-color: var(--text); }
.doc-link .doc-ic { font-size: 1.3rem; }

.empty { color: var(--muted); text-align: center; padding: 4rem 1rem; font-style: italic; }

button.linklike {
  width: auto; margin: 0; padding: 0;
  background: none; color: var(--muted); border: none; font-weight: 400;
}
button.linklike:hover { background: none; color: var(--text); text-decoration: underline; opacity: 1; }
button.linklike.danger { color: var(--danger); }

/* --- Admin --- */
.admin-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.admin-actions .btn { width: auto; margin: 0; }

.post-form label { display: block; margin: 1.25rem 0 0.4rem; font-weight: 600; }
.post-form input[type="text"] { text-align: left; letter-spacing: normal; }
.post-form input[type="file"] { display: block; margin-top: 0.4rem; color: var(--muted); }
.post-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  resize: vertical;
}
.post-form textarea:focus { outline: none; border-color: var(--text); }
#editor { background: #fff; color: #111; border-radius: 0 0 8px 8px; min-height: 200px; font-family: var(--sans); }
.ql-toolbar.ql-snow { border-radius: 8px 8px 0 0; background: var(--surface-2); border-color: var(--border); }
.ql-container.ql-snow { border-color: var(--border); }
.post-form button[type="submit"] { width: auto; margin-top: 1.75rem; }

.media-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

.list-head { display: flex; align-items: center; justify-content: space-between; }
.list-head .btn { width: auto; margin: 0; }
.admin-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border);
}
.row-actions { display: flex; align-items: center; gap: 1rem; white-space: nowrap; font-size: 0.9rem; }
.admin-row .meta { color: var(--muted); font-size: 0.8rem; }

/* --- Access codes --- */
.code-create {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem;
  margin: 1.25rem 0 2rem; padding: 1.25rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.code-create label { display: flex; flex-direction: column; gap: 0.4rem; font-weight: 600; }
.code-create input { text-align: left; letter-spacing: normal; }
.code-create button { width: auto; margin: 0; }
label.checkbox { flex-direction: row; align-items: center; gap: 0.45rem; font-weight: 400; }
label.checkbox input { width: auto; }

.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.code-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; text-align: center;
}
.code-card .qr { background: #fff; border-radius: 6px; padding: 6px; border: 1px solid var(--border); }
.code-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.3rem; letter-spacing: 0.12em; margin: 0.7rem 0 0.2rem; }
.badge { display: inline-block; font-size: 0.7rem; padding: 0.12rem 0.5rem; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.badge.ok { background: rgba(40,125,60,0.12); color: var(--ok); }
.badge.off { background: rgba(180,35,24,0.1); color: var(--danger); }
.badge.email { background: rgba(21,18,13,0.08); color: var(--text); }
.code-actions { display: flex; justify-content: center; gap: 1rem; margin-top: 0.75rem; font-size: 0.9rem; }
.hashmono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Prevent long links/words from forcing horizontal scroll on narrow screens. */
.post .body, .post h2, .admin-row, .doc-link { overflow-wrap: anywhere; }
img, video { max-width: 100%; }

/* --- Phone polish --- */
@media (max-width: 480px) {
  .container { padding: 1.1rem 1rem 3rem; }
  .post { padding: 1.25rem; }
  .post h2 { font-size: 1.35rem; }
  .post .body { font-size: 1rem; }
  .gate-card { padding: 2rem 1.5rem; }
  .gate-card h1 { font-size: 2rem; }
  .topbar { padding: 0.85rem 1rem; }
  .topbar .brand { font-size: 1.3rem; }
  .code-create { padding: 1rem; gap: 0.85rem; }
  .code-create label, .code-create button, .code-create input { width: 100%; }
  /* Comfortable tap targets for admin row actions. */
  .row-actions { gap: 1.25rem; }
  .row-actions a, .row-actions button { padding: 0.25rem 0; }
}

/* --- Feed: search box + category tabs + category chip --- */
.feed-search { display: flex; gap: 0.5rem; margin: 0 0 1rem; }
.feed-search input[type="search"] {
  flex: 1; min-width: 0;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}
.feed-search button { width: auto; margin: 0; white-space: nowrap; }
.feed-searchinfo {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.9rem;
  color: var(--muted); font-size: 0.9rem; margin: 0 0 1.25rem;
}
.feed-clear { color: var(--muted); text-decoration: none; white-space: nowrap; }
.feed-clear:hover { color: var(--text); }

/* Horizontally-scrollable tab bar (mobile-first). */
.tabs {
  display: flex; gap: 0.4rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 0 0 1.25rem; padding-bottom: 0.35rem;
  scrollbar-width: thin;
}
.tab {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--muted);
  text-decoration: none; font-size: 0.9rem; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--text); color: #fff; border-color: var(--text); }
.tab-count { font-size: 0.75rem; opacity: 0.7; }

/* Category chip shown on each post card. */
.post .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.cat-chip {
  display: inline-block; padding: 0.05rem 0.5rem;
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.7rem; letter-spacing: 0.05em; color: var(--muted);
}

/* Category admin: add form + rename rows. */
.cat-add { display: flex; gap: 0.5rem; margin: 0 0 1.75rem; }
.cat-add input { flex: 1; min-width: 0; padding: 0.7rem 0.9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.cat-add button { width: auto; margin: 0; white-space: nowrap; }
.cat-rename { display: flex; gap: 0.5rem; align-items: center; flex: 1; margin: 0; }
.cat-rename input { flex: 1; min-width: 0; padding: 0.5rem 0.7rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.cat-rename button { width: auto; margin: 0; }

/* ============================================================================
   Świętajno skin — a restrained Tolkien/LOTR signal over the same layout.
   Switched on by <html data-theme="swietajno"> (set from SITE_THEME env).
   Aged parchment + deep pine ink + antique gold, and an engraved-titling feel
   on the wordmark. Same editorial bones as Janów, cooler and older.
   ============================================================================ */
:root[data-theme="swietajno"] {
  --bg: #e7e3d5;        /* cool aged parchment (de-yellowed) */
  --surface: #f4f1e7;   /* lighter vellum for cards */
  --surface-2: #ddd6c4; /* raised parchment */
  --border: #c4b9a1;    /* worn edge */
  --text: #23271d;      /* deep pine ink (also the button fill) */
  --muted: #6a6353;     /* faded taupe */
  --accent: #7d6a45;    /* muted bronze (was antique gold) */
  --ok: #3f6b3a;        /* forest green */
  --serif: "Palatino Linotype", "Book Antiqua", "Iowan Old Style", Palatino, "URW Palladio L", Georgia, serif;
}

/* The topbar background is a literal off-white in the base theme — re-skin it
   to translucent parchment so the header matches. */
:root[data-theme="swietajno"] .topbar {
  background: rgba(240, 230, 205, 0.92);
}

/* Engraved-titling wordmark: uppercase, widely tracked — the LOTR signal,
   kept to the brand and the gate heading only ("just enough"). */
/* Engraved-titling wordmark — the topbar brand and the landing hero: uppercase,
   widely tracked, grand (but clamped so even a long site name fits the card). */
:root[data-theme="swietajno"] .topbar .brand {
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
:root[data-theme="swietajno"] .gate-card h1.wordmark {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: clamp(2rem, 6vw, 2.5rem);
  overflow-wrap: anywhere;
}
/* Generic gate headings (admin sign-in, "brak dostępu"): same carved caps, but
   sized/tracked so a long word like "ADMINISTRATORA" fits inside the card. */
:root[data-theme="swietajno"] .gate-card h1 {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: clamp(1.35rem, 4.5vw, 1.7rem);
  overflow-wrap: anywhere;
}

/* --- Ornaments (all inline SVG / CSS — no external assets, CSP-safe) --- */

/* Faint aged-parchment mottling behind everything. */
:root[data-theme="swietajno"] body {
  background-image:
    radial-gradient(circle at 15% 20%, rgba(110, 100, 78, 0.05), transparent 55%),
    radial-gradient(circle at 85% 12%, rgba(95, 88, 72, 0.045), transparent 50%),
    radial-gradient(circle at 50% 88%, rgba(105, 98, 78, 0.045), transparent 55%);
  background-attachment: fixed;
}

/* Engraved vine flourish beneath the gate wordmark. */
:root[data-theme="swietajno"] .gate-card h1::after {
  content: "";
  display: block;
  height: 20px;
  margin: 0.8rem auto 0;
  background: center/contain no-repeat url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='20' viewBox='0 0 160 20'><g stroke='%237d6a45' stroke-width='1.1' fill='none' stroke-linecap='round'><path d='M14 10 C40 10 44 4 60 10'/><path d='M146 10 C120 10 116 4 100 10'/><path d='M60 10 C68 4 72 4 80 10'/><path d='M100 10 C92 4 88 4 80 10'/></g><path d='M80 4 L84 10 L80 16 L76 10 Z' fill='%237d6a45'/><circle cx='14' cy='10' r='1.6' fill='%237d6a45'/><circle cx='146' cy='10' r='1.6' fill='%237d6a45'/></svg>");
}

/* Small gold sprigs flanking the topbar wordmark. */
:root[data-theme="swietajno"] .topbar .brand::before,
:root[data-theme="swietajno"] .topbar .brand::after {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  vertical-align: 0.1em;
  background: center/contain no-repeat url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path d='M8 2 L10 8 L8 14 L6 8 Z' fill='%237d6a45'/><circle cx='2' cy='8' r='1.3' fill='%237d6a45'/><circle cx='14' cy='8' r='1.3' fill='%237d6a45'/></svg>");
}
:root[data-theme="swietajno"] .topbar .brand::before { margin-right: 0.55rem; }
:root[data-theme="swietajno"] .topbar .brand::after { margin-left: 0.55rem; }

/* Inner keyline frame on the gate card — an illuminated-page/cartouche feel. */
:root[data-theme="swietajno"] .gate-card { position: relative; }
:root[data-theme="swietajno"] .gate-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(125, 106, 69, 0.35);
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
}

/* Short gold rule under each post title. */
:root[data-theme="swietajno"] .post h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 2px;
  margin-top: 0.55rem;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* --- Cinzel: an inscriptional titling face, self-hosted (CSP: font-src 'self') --- */
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/cinzel-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/cinzel-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Carved-caps titling on the wordmark and post headings. */
:root[data-theme="swietajno"] .topbar .brand,
:root[data-theme="swietajno"] .gate-card h1,
:root[data-theme="swietajno"] .post h2 {
  font-family: "Cinzel", var(--serif);
  font-weight: 700;
}
:root[data-theme="swietajno"] .post h2 { letter-spacing: 0.02em; }

/* Illuminated drop-cap on the first paragraph of each post. */
:root[data-theme="swietajno"] .post .body > p:first-of-type::first-letter {
  font-family: "Cinzel", var(--serif);
  font-size: 3.1em;
  line-height: 0.72;
  float: left;
  margin: 0.06em 0.1em 0 0;
  color: var(--accent);
  font-weight: 700;
}

/* Gilded primary buttons — gold keyline, filling with gold on hover (skips the
   link-style and outline buttons). */
:root[data-theme="swietajno"] button[type="submit"]:not(.btn-outline):not(.linklike),
:root[data-theme="swietajno"] .btn:not(.btn-outline):not(.linklike) {
  border: 1px solid var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  letter-spacing: 0.04em;
}
:root[data-theme="swietajno"] button[type="submit"]:not(.btn-outline):not(.linklike):hover,
:root[data-theme="swietajno"] .btn:not(.btn-outline):not(.linklike):hover {
  background: var(--accent);
  color: #fff;
  opacity: 1;
}

/* Gilded quotes, gold prose links, flourish horizontal rules. */
:root[data-theme="swietajno"] .post .body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  font-style: italic;
  color: var(--muted);
}
:root[data-theme="swietajno"] .post .body a {
  color: #6b6047;
  text-decoration-color: var(--accent);
}
:root[data-theme="swietajno"] .post .body hr {
  border: none;
  height: 18px;
  margin: 1.5rem auto;
  background: center/auto 100% no-repeat url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='20' viewBox='0 0 160 20'><g stroke='%237d6a45' stroke-width='1.1' fill='none' stroke-linecap='round'><path d='M14 10 C40 10 44 4 60 10'/><path d='M146 10 C120 10 116 4 100 10'/><path d='M60 10 C68 4 72 4 80 10'/><path d='M100 10 C92 4 88 4 80 10'/></g><path d='M80 4 L84 10 L80 16 L76 10 Z' fill='%237d6a45'/><circle cx='14' cy='10' r='1.6' fill='%237d6a45'/><circle cx='146' cy='10' r='1.6' fill='%237d6a45'/></svg>");
}

/* Double gold rule under the topbar; faint gold top edge on each post card. */
:root[data-theme="swietajno"] .topbar {
  border-bottom: 3px double rgba(125, 106, 69, 0.5);
}
:root[data-theme="swietajno"] .post {
  border-top: 2px solid rgba(125, 106, 69, 0.3);
}

/* Corner studs on the gate-card frame — leather-binding / framed-map feel. */
:root[data-theme="swietajno"] .gate-card::before {
  background:
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><path d='M4 1 L7 4 L4 7 L1 4 Z' fill='%237d6a45'/></svg>") left 3px top 3px no-repeat,
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><path d='M4 1 L7 4 L4 7 L1 4 Z' fill='%237d6a45'/></svg>") right 3px top 3px no-repeat,
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><path d='M4 1 L7 4 L4 7 L1 4 Z' fill='%237d6a45'/></svg>") left 3px bottom 3px no-repeat,
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><path d='M4 1 L7 4 L4 7 L1 4 Z' fill='%237d6a45'/></svg>") right 3px bottom 3px no-repeat;
}


/* ============================================================================
   Notifications — the opt-in card on the feed, the iOS add-to-home-screen
   instructions, and the "send a notification" checkbox in the post editor.
   ============================================================================ */
.push-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin: 0 0 1.25rem;
}

/* Text left, action right — until there isn't room, then stack. */
.push-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.push-state[hidden] { display: none; }

.push-text { flex: 1 1 16rem; min-width: 0; }
.push-text strong { display: block; }
.push-text p { margin: 0.25rem 0 0; font-size: 0.9rem; }

/* Buttons in this card size to their label instead of filling the row, which is
   what the global button rule does. */
.push-state button {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

/* The numbered iPhone instructions. */
.push-steps {
  margin: 0.6rem 0 0;
  padding-left: 1.3rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.push-steps li { margin-bottom: 0.35rem; }
.push-steps strong { display: inline; color: var(--text); }

/* Inline iOS share glyph, aligned with the surrounding sentence. */
.ios-share {
  vertical-align: -0.2em;
  margin: 0 0.15em;
}

.push-card .error { margin: 0.75rem 0 0; }

/* Checkbox + explanation row, used by the post editor's notify toggle. */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.check-row input[type="checkbox"] {
  width: auto;
  margin: 0.2rem 0 0;
  flex: 0 0 auto;
}
.check-row .meta {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Match the parchment skin: the card reads as a raised vellum panel. */
:root[data-theme="swietajno"] .push-card {
  border-top: 2px solid rgba(125, 106, 69, 0.3);
}
