/* =========================================================
   Святий Юда Тадей — стилі
   Малахіт (плащ апостола на іконах), сусальне золото, кіновар,
   вапнякове тло. Свічник — головний образ сайту.
   ========================================================= */
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-light.woff") format("woff"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-italic.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --fs: 18px;
  --bg: #edf1ec;          /* вапно */
  --surface: #f9fbf8;
  --ink: #15211d;
  --ink-2: #33423d;
  --muted: #5b6964;
  --line: #d3dbd5;
  --mal: #0f3b33;         /* малахіт */
  --mal-2: #0a2a24;
  --mal-3: #185045;
  --gold: #c49a3c;        /* сусальне золото */
  --gold-2: #e3c47e;
  --gold-ink: #85651f;
  --gold-soft: #efe6cc;
  --cin: #a3372a;         /* кіновар */
  --pio: #6e4a30;         /* ряса капуцина */
  --ok: #2b6a47;
  --err: #9b2c2c;
  --on-dark: #eef2ee;
  --on-dark-2: #b9c9c2;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(10, 42, 36, .06), 0 10px 30px -12px rgba(10, 42, 36, .18);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Display", "Inter", system-ui, sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  /* сумісність з адмінкою */
  --paper: var(--surface); --night: var(--mal-2); --night-2: var(--mal); --wine: var(--cin);
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0b1c18;
  --surface: #11292400;
  --surface: #122a25;
  --ink: #e7eee9;
  --ink-2: #c9d5cf;
  --muted: #94a69f;
  --line: #24423b;
  --gold-ink: #e3c47e;
  --gold-soft: #2c2a1c;
  --cin: #e6907f;
  --pio: #d5a882;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mal-3); text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
:where(html[data-theme="dark"]) a { color: var(--gold-2); }
a:hover { color: var(--gold-ink); text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0 0 .5em; color: var(--ink); line-height: 1.12; }
h1 { font-family: var(--display); font-weight: 300; font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -.025em; }
h2 { font-family: var(--display); font-weight: 300; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.015em; }
h3 { font-weight: 600; font-size: 1.1rem; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5em 1em; z-index: 200; }
.skip:focus { left: 8px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(780px, 100% - 2.5rem); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
main > section, main > .wrap, main > div.wrap { margin-block: 3.5rem; }
main > section.hero, main > section.page-head { margin-top: 0; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 2.9rem; padding: .7em 1.35em; border-radius: 999px; font: 600 .92rem/1.2 var(--sans); text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background .2s, color .2s, border-color .2s; }
.btn-gold { background: var(--gold); color: #1a1406; }
.btn-gold:hover { background: var(--gold-2); color: #1a1406; }
.btn-line { border-color: rgba(238, 242, 238, .45); color: var(--on-dark); }
.btn-line:hover { border-color: var(--gold-2); color: var(--gold-2); }
.btn-line-dark, .btn-outline { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-line-dark:hover, .btn-outline:hover { border-color: var(--mal-3); color: var(--ink); }
.btn-ink { background: var(--mal); color: var(--on-dark); }
.btn-ink:hover { background: var(--mal-3); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 2.1rem; padding: .35em .9em; font-size: .8rem; }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(1.1); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { color: #fff; filter: brightness(1.1); }

/* ---------- панель адміністратора на сайті ---------- */
.adminbar { background: var(--gold); color: #1a1406; font-size: .82rem; }
.adminbar .wrap { display: flex; gap: 1.2rem; padding-block: .35rem; flex-wrap: wrap; }
.adminbar a { color: #1a1406; font-weight: 600; }

/* ---------- шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 1.5rem; min-height: 4.2rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark { width: 2.4rem; height: 2.4rem; border-radius: 999px 999px 6px 6px; background: var(--mal); display: grid; place-items: center; }
.brand-mark svg { width: 1.3rem; height: 1.6rem; }
.flame { fill: var(--gold-2); }
.cross { fill: var(--on-dark); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.brand-tag { font-size: .74rem; color: var(--muted); }
.nav { display: flex; gap: .15rem; margin-left: auto; }
.nav a { padding: .45em .7em; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .9rem; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--mal) 7%, transparent); }
.nav a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.header-tools { display: flex; align-items: center; gap: .25rem; }
.tool { display: inline-grid; place-items: center; font: 600 .78rem var(--sans); background: transparent; border: 0; color: var(--ink-2); border-radius: 8px; min-width: 2.4rem; height: 2.4rem; cursor: pointer; text-decoration: none; }
.tool:hover { background: color-mix(in srgb, var(--mal) 8%, transparent); color: var(--ink); }
.tool svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu-btn { display: none; }
.tool-font { display: inline-flex; align-items: flex-start; justify-content: center; gap: 1px; padding-top: .55rem; font-size: .9rem; }
.tool-font span { font-size: .75em; line-height: 1; }
.nav-extra { display: none; }
@media (max-width: 1320px) {
  .brand-tag { display: none; }
  .nav a { padding: .45em .55em; font-size: .86rem; }
  .header-in { gap: 1rem; }
}
@media (max-width: 1140px) {
  .menu-btn { display: inline-grid; }
  .header-tools { margin-left: auto; }
  .nav { display: none; position: absolute; inset: 100% 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; padding: .5rem 1.25rem 1rem; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: .8em .2em; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a.active { box-shadow: inset 3px 0 0 var(--gold); padding-left: .8em; }
  .tool-font, .tool-wide { display: none !important; }
  .nav-extra { display: grid; gap: 0; margin-top: .4rem; }
  .nav-extra button, .nav-extra a { text-align: left; font: 400 1rem var(--sans); background: none; border: 0; border-bottom: 1px solid var(--line); padding: .75em .2em; color: var(--ink-2); cursor: pointer; text-decoration: none; }
}
@media (max-width: 480px) {
  .header-in { gap: .5rem; }
  .brand { gap: .55rem; }
  .brand-name { font-size: .92rem; }
  .tool { min-width: 2.2rem; }
}

/* ---------- повідомлення ---------- */
.flashes { margin-block: 1rem !important; display: grid; gap: .6rem; }
.flash { padding: .9em 1.2em; border-radius: var(--radius); border: 1px solid; background: var(--surface); }
.flash-ok { border-color: #b4d6c0; background: #eaf5ee; color: #1d4a30; }
.flash-error { border-color: #e4bcbc; background: #fbeeee; color: #7a1f1f; }
html[data-theme="dark"] .flash-ok { background: #15301f; color: #bfe3cb; border-color: #2c4a37; }
html[data-theme="dark"] .flash-error { background: #2c1717; color: #f0c2c2; border-color: #5a2a2a; }
.help-card { padding: 1.2em 1.4em; border-radius: var(--radius); background: #fff4dc; border: 1px solid #e8cf8d; color: #4a3610; }
html[data-theme="dark"] .help-card { background: #2c2513; color: #f0dfb4; border-color: #5a4a20; }
.help-card p { margin: 0 0 .4em; }
.note-box, .note { }
p.note, div.note { padding: 1em 1.2em; border-radius: var(--radius); background: var(--gold-soft); color: var(--ink); margin-block: 1rem; }

/* ---------- герой: малахіт і свічник ---------- */
.hero { position: relative; background: var(--mal); color: var(--on-dark); overflow: hidden; padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero::before { content: ""; position: absolute; inset: auto -10% -30% -10%; height: 70%; background: radial-gradient(60% 60% at 50% 100%, rgba(227, 196, 126, .22), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .75fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5.6vw, 4.4rem); max-width: 13em; margin-bottom: .35em; overflow-wrap: break-word; }
.hero-lead { font-size: 1.1rem; color: var(--on-dark-2); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.hero .hints a, .page-head .hints a { color: var(--on-dark); }

.search-box { display: flex; align-items: center; gap: .4rem; background: var(--surface); border-radius: 999px; padding: .3rem .3rem .3rem 1.1rem; max-width: 40rem; margin-top: 1.6rem; box-shadow: 0 10px 30px -10px rgba(0,0,0,.35); border: 1.5px solid transparent; }
.search-box:focus-within { border-color: var(--gold); }
.search-box svg { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 1.02rem var(--sans); color: var(--ink); padding: .65rem .3rem; outline: none; }
.search-box input::placeholder { color: var(--muted); }
.search-box button { font: 600 .92rem var(--sans); border: 0; border-radius: 999px; background: var(--mal); color: var(--on-dark); padding: .75rem 1.3rem; cursor: pointer; }
.search-box button:hover { background: var(--mal-3); }
.page-head .search-box { box-shadow: none; border-color: var(--line); }
.hints { margin-top: .9rem; font-size: .88rem; color: var(--on-dark-2); display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: baseline; }
.hints a { text-decoration-color: rgba(255,255,255,.35); }
.hints.dark { color: var(--muted); }
.hints.dark a { color: var(--mal-3); }

/* арка — форма ікони в кіоті, головний мотив сайту */
.arch { display: block; aspect-ratio: 3 / 4; border-radius: 999px 999px 12px 12px; overflow: hidden; background: var(--mal-2); position: relative; box-shadow: 0 0 0 1px rgba(227, 196, 126, .5), 0 0 0 7px var(--mal), 0 0 0 8px rgba(227, 196, 126, .35), 0 30px 60px -20px rgba(0,0,0,.6); }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.arch-empty, .arch > span { display: grid; place-items: center; width: 100%; height: 100%; color: var(--gold-2); font-size: 4rem; }
.hero-icon { margin: 0; justify-self: center; width: min(100%, 340px); }
.hero-icon figcaption { font-size: .78rem; color: var(--on-dark-2); text-align: center; margin-top: 1.3rem; line-height: 1.4; }

/* свічник: кожна свічка — молитва */
.kanun { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 22px 15px; height: 132px; overflow: hidden; padding: 30px 1.25rem 0; margin-top: clamp(2rem, 5vw, 3.5rem); border-bottom: 3px solid var(--gold); box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.kanun::after { content: ""; position: absolute; inset: auto 0 0 0; height: 10px; background: linear-gradient(var(--gold), #9c7a2c); }
.c { position: relative; display: inline-block; width: 6px; height: var(--h, 16px); border-radius: 2px 2px 1px 1px; background: linear-gradient(90deg, #cfc4a6, #fbf6e6 45%, #d6cbb0); flex: none; }
.c::before { content: ""; position: absolute; left: 2.5px; bottom: 100%; width: 1px; height: 4px; background: #3a2c1c; }
.c.on::after { content: ""; position: absolute; left: 50%; bottom: calc(100% + 1px); width: 9px; height: 16px; margin-left: -4.5px; border-radius: 50% 50% 35% 35% / 65% 65% 35% 35%; background: radial-gradient(ellipse at 50% 82%, #fff 0, #fff2bd 22%, #ffbd45 52%, rgba(255, 120, 0, 0) 76%); filter: drop-shadow(0 0 6px rgba(255, 186, 80, .9)); transform-origin: 50% 100%; animation: flicker 2.8s ease-in-out var(--d, 0s) infinite; }
.c.lit-now::after { animation: ignite .9s ease-out, flicker 2.8s ease-in-out .9s infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1, 1) rotate(-1deg); } 30% { transform: scale(.92, 1.08) rotate(2deg); } 55% { transform: scale(1.05, .94) rotate(-2deg); } 80% { transform: scale(.97, 1.04) rotate(1deg); } }
@keyframes ignite { 0% { transform: scale(.1); opacity: 0; } 60% { transform: scale(1.4, 1.3); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .c.on::after, .c.lit-now::after { animation: none; } }
.kanun-caption { padding-block: 1.1rem 1.6rem; color: var(--on-dark-2); font-size: .92rem; }
.kanun-caption p { margin: 0; max-width: 60em; }
.kanun-caption strong { color: var(--gold-2); font-weight: 600; }
.kanun-caption a { color: var(--on-dark); margin-left: .4em; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-icon { order: -1; width: 170px; }
  .hero-icon figcaption { display: none; }
  .kanun { height: 112px; gap: 20px 13px; }
  .search-box button { padding: .7rem 1rem; }
}

/* ---------- святі ---------- */
.saints { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 3rem; }
.saint { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.6rem; align-items: start; padding-top: 1.5rem; border-top: 3px solid var(--c); }
.saint-yuda { --c: var(--mal); }
.saint-pio { --c: var(--pio); }
.saint .arch { box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); background: var(--c); }
.saint .arch > span { font-size: 2.6rem; }
.saint h2 { font-size: 1.55rem; margin-bottom: .35em; }
.saint h2 a { color: var(--ink); text-decoration: none; }
.saint h2 a:hover { color: var(--c); }
.saint p { color: var(--ink-2); }
.feast { font-size: .9rem; font-weight: 600; color: var(--c, var(--gold-ink)); }
html[data-theme="dark"] .saint-yuda { --c: #6fb8a3; }
.links { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: .95rem; }
@media (max-width: 900px) { .saints { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .saint { grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; } }

/* ---------- молитва дня ---------- */
.daily { background: var(--surface); border-block: 1px solid var(--line); padding-block: 3.5rem; }
.daily-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: 3rem; }
.daily h3 { font-family: var(--display); font-weight: 300; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.015em; margin-bottom: .7em; }
.daily h3 a { color: var(--ink); text-decoration: none; }
.fade-out { max-height: 12.5em; overflow: hidden; mask-image: linear-gradient(#000 50%, transparent); margin-bottom: 1.2rem; }
@media (max-width: 800px) { .daily-grid { grid-template-columns: 1fr; gap: 1rem; } }

/* ---------- заголовки розділів ---------- */
.sec-head { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: 1rem 3rem; align-items: baseline; margin-bottom: 1.8rem; }
.sec-head h2 { margin: 0; }
.sec-head p { margin: 0; color: var(--muted); max-width: 46em; }
@media (max-width: 800px) { .sec-head { grid-template-columns: 1fr; } }
.empty { padding: 2.2rem 1.6rem; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--surface); }
.empty p { max-width: 40em; }

/* ---------- записки (прохання і свідчення) ---------- */
.notes { list-style: none; margin: 0 0 1.8rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; border-top: 1px solid var(--line); }
.notes-wide { grid-template-columns: 1fr; }
@media (max-width: 860px) { .notes { grid-template-columns: 1fr; } }
.note { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.note.with-photo { grid-template-columns: 6.5rem minmax(0, 1fr); }
.note-photo img { width: 6.5rem; height: 6.5rem; object-fit: cover; border-radius: 8px; }
.note-who { margin: 0 0 .35rem; font-size: .92rem; color: var(--ink-2); }
.note-who b { color: var(--ink); font-weight: 600; }
.note-who time { color: var(--muted); font-size: .82rem; margin-left: .5rem; }
.note-text { font-family: var(--serif); font-size: 1.04rem; line-height: 1.65; color: var(--ink); }
.note-text p { margin: 0 0 .5em; }
.note-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin-top: .6rem; font-size: .88rem; }

.pray { display: inline-flex; align-items: center; gap: .55em; font: 600 .86rem var(--sans); padding: .5em 1em .5em .85em; border-radius: 999px; border: 1.5px solid var(--gold); background: transparent; color: var(--ink); cursor: pointer; transition: background .2s, border-color .2s; }
.pray .c { height: 11px; width: 5px; margin-top: 6px; }
.pray .c::before { display: none; }
.pray .c.on::after { width: 7px; height: 11px; margin-left: -3.5px; animation: none; }
.pray:not(:disabled):hover { background: var(--gold-soft); }
.pray .cnt { min-width: 1.6em; padding: .05em .45em; border-radius: 999px; background: var(--gold-soft); font-size: .8rem; text-align: center; }
.pray.done { border-color: var(--ok); color: var(--ok); cursor: default; }
html[data-theme="dark"] .pray.done { color: #8fd1ad; border-color: #4c8d68; }
.pray.big { font-size: 1rem; padding: .8em 1.4em .8em 1.1em; }
.pray.pop { animation: pop .6s; }
@keyframes pop { 40% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--gold) 25%, transparent); } }
.report { font: inherit; font-size: .78rem; background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; padding: .2em; }
.report:hover { color: var(--err); }
.pending-mine { padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--gold-soft); margin-bottom: 1.4rem; font-size: .95rem; display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
.pager { display: flex; gap: .4rem; margin-top: 2rem; flex-wrap: wrap; }
.pager a { min-width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); }
.pager a.active { background: var(--mal); color: var(--on-dark); border-color: var(--mal); }

/* ---------- відео ---------- */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.6rem 1.4rem; }
.video { margin: 0; }
.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity .2s; }
.yt:hover img { opacity: 1; }
.yt .play { position: absolute; inset: 0; margin: auto; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: rgba(10, 42, 36, .85); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--gold-2); }
.yt .play svg { width: 1.5rem; height: 1.5rem; fill: var(--gold-2); margin-left: 3px; }
.yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.video figcaption { margin-top: .6rem; font-size: .95rem; line-height: 1.4; }
.video figcaption a { font-size: .8rem; color: var(--muted); white-space: nowrap; margin-left: .3em; }
.vgroup { margin-block: 2.4rem; scroll-margin-top: 6rem; }

/* ---------- цитата ---------- */
.quote-band { background: var(--mal-2); color: var(--on-dark); padding-block: clamp(3rem, 7vw, 5rem); }
.quote-band blockquote { margin-block: 0; }
.quote-band p { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3.4vw, 2.3rem); line-height: 1.35; max-width: 26em; margin-bottom: .6em; color: #fff; }
.quote-band footer { color: var(--gold-2); font-size: .95rem; }

/* ---------- фото ---------- */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .6rem; }
.strip a { scroll-snap-align: start; }
.strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px 8px 8px; }
.masonry { columns: 4 230px; column-gap: 1.2rem; }
.masonry figure { break-inside: avoid; margin: 0 0 1.4rem; }
.masonry img { width: 100%; border-radius: 8px; }
.masonry figcaption { font-size: .85rem; color: var(--ink-2); padding-top: .45rem; line-height: 1.4; }
.masonry figcaption small { display: block; color: var(--muted); font-size: .75rem; margin-top: .15rem; }
.masonry figcaption small a { color: inherit; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6, 18, 15, .95); display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; place-items: center; gap: .7rem; max-height: 100vh; padding: 1rem 0; }
.lightbox img { max-height: 84vh; max-width: 100%; border-radius: 6px; }
.lightbox figcaption { color: #dfe7e2; text-align: center; font-size: .9rem; max-width: 50em; }
.lightbox button { background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; height: 100%; opacity: .7; }
.lightbox button:hover { opacity: 1; }
.lb-close { position: absolute; top: .4rem; right: .8rem; height: auto !important; }

/* ---------- внутрішні сторінки ---------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) 2.4rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.page-head.slim h1 { margin-bottom: .3em; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 38em; }
.crumb { font-size: .88rem; margin-bottom: .6rem; }
.crumb a { color: var(--gold-ink); text-decoration: none; }
.page-head.cat-yuda { box-shadow: inset 0 4px 0 var(--mal); }
.page-head.cat-pio { box-shadow: inset 0 4px 0 var(--pio); }
.page-head.cat-daily { box-shadow: inset 0 4px 0 var(--gold); }
.page-head.cat-need { box-shadow: inset 0 4px 0 var(--cin); }
.page-head.cat-mary { box-shadow: inset 0 4px 0 #2f5c8a; }

.saint-head { background: var(--mal); color: var(--on-dark); border: 0; }
.saint-head.saint-pio { background: #3b2a1e; }
.saint-head.saint-pio .arch { box-shadow: 0 0 0 1px rgba(227, 196, 126, .5), 0 0 0 7px #3b2a1e, 0 0 0 8px rgba(227, 196, 126, .35), 0 30px 60px -20px rgba(0,0,0,.6); }
.saint-head h1 { color: #fff; }
.saint-head .lead { color: var(--on-dark-2); }
.saint-head .feast { color: var(--gold-2); }
.saint-head .hero-icon figcaption { color: var(--on-dark-2); }
.saint-head-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 760px) { .saint-head-grid { grid-template-columns: 1fr; } .saint-head .hero-icon { width: 190px; justify-self: start; } }

.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 4rem; align-items: start; }
.aside { position: sticky; top: 5.5rem; padding-left: 1.6rem; border-left: 1px solid var(--line); }
.aside h2 { font-size: 1.3rem; }
@media (max-width: 960px) { .with-aside { grid-template-columns: 1fr; gap: 2rem; } .aside { position: static; padding: 1.6rem 0 0; border-left: 0; border-top: 1px solid var(--line); } }
.plist { list-style: none; padding: 0; margin: 0; }
.plist li { border-bottom: 1px solid var(--line); }
.plist a { display: block; padding: .6em 0; text-decoration: none; color: var(--ink); font-size: .95rem; }
.plist a:hover { color: var(--gold-ink); }

.prose { color: var(--ink-2); }
.reading { font-family: var(--serif); font-size: 1.12rem; line-height: 1.8; max-width: 40em; }
.reading h3 { font-family: var(--display); font-weight: 300; font-size: 1.6rem; letter-spacing: -.015em; margin-top: 2em; color: var(--ink); }
.reading > h3:first-child { margin-top: 0; }
.prose strong { color: var(--ink); }
.prose .resp { color: var(--cin); font-style: italic; }
.prose p.resp-only { padding-left: 1.1em; border-left: 2px solid var(--gold); }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--gold); margin: 2rem 0; max-width: 18rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--gold); opacity: .6; }
.divider span { font-size: 1rem; }

/* ---------- молитовник ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip { padding: .45em 1em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink-2); font-size: .88rem; }
.chip:hover { border-color: var(--mal-3); color: var(--ink); }
.chip.active { background: var(--mal); color: var(--on-dark); border-color: var(--mal); }
.chip span { opacity: .65; font-size: .85em; }
.pgroup { margin-block: 2.6rem; scroll-margin-top: 6rem; }
.pgroup h2 { padding-left: .8rem; border-left: 3px solid var(--c, var(--gold)); }
.cat-yuda { --c: var(--mal); } .cat-pio { --c: var(--pio); } .cat-daily { --c: var(--gold); } .cat-need { --c: var(--cin); } .cat-mary { --c: #2f5c8a; }
html[data-theme="dark"] .cat-mary { --c: #8db4dc; }
html[data-theme="dark"] .cat-yuda { --c: #6fb8a3; }
.prows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.prows li { border-bottom: 1px solid var(--line); }
.prows a { display: grid; gap: .15rem; padding: .95rem .2rem; text-decoration: none; color: var(--ink); }
.prows a:hover { background: color-mix(in srgb, var(--gold) 7%, transparent); }
.prows a:hover .pt { color: var(--gold-ink); }
.pt { font-weight: 600; font-size: 1.05rem; }
.pi { color: var(--muted); font-size: .9rem; }
.filter-empty { color: var(--muted); }

.prayer-text { font-family: var(--serif); font-size: 1.22rem; line-height: 1.9; color: var(--ink); padding-block: 1rem; }
.prayer-text > p:first-child::first-letter { float: left; font-size: 3.5em; line-height: .86; padding: .07em .1em 0 0; color: var(--cin); font-weight: 500; }
.prayer-text h3 { font-family: var(--sans); font-weight: 600; font-size: .95rem; color: var(--gold-ink); margin: 2.2em 0 .6em; letter-spacing: .01em; }
.prayer-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.3rem; }

.results { list-style: none; padding: 0; margin: 1rem 0 0; border-top: 1px solid var(--line); }
.results li { border-bottom: 1px solid var(--line); }
.results a { display: grid; gap: .2rem; padding: 1.1rem .2rem; text-decoration: none; color: var(--ink); }
.results a:hover { background: color-mix(in srgb, var(--gold) 7%, transparent); }
.rk { font-size: .78rem; color: var(--c, var(--gold-ink)); font-weight: 600; }
.rt { font-weight: 600; font-size: 1.1rem; }
.rs { color: var(--ink-2); font-size: .92rem; font-family: var(--serif); }
mark { background: color-mix(in srgb, var(--gold) 35%, transparent); color: inherit; padding: 0 .1em; border-radius: 2px; }

/* ---------- форми і коментарі ---------- */
.panel-form, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.2rem, 4vw, 2rem); }
.form { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.form input[type=file] { max-width: 100%; font: inherit; font-size: .9rem; }
.form h2 { margin-bottom: 0; }
.form label { display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; font-weight: 600; font-size: .92rem; }
.form .opt { display: inline; font-weight: 400; color: var(--muted); font-size: .88em; }
.form input[type=text], .form input[type=password], .form input[type=email], .form input[type=number], .form input[type=search], .form textarea, .form select {
  font: 400 1rem var(--sans); padding: .75em .9em; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); width: 100%; }
.form textarea { resize: vertical; line-height: 1.55; font-family: var(--serif); font-size: 1.05rem; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
.form .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .9rem; }
.form .check > span { min-width: 0; }
.form .check input { margin-top: .3em; width: 1.1em; height: 1.1em; accent-color: var(--mal); flex: none; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } .form-foot .btn { width: 100%; } }
.file-preview { max-height: 180px; width: auto; border-radius: 10px; margin-top: .4rem; }

.comments h2 .count { font-family: var(--sans); font-size: .9rem; vertical-align: middle; padding: .1em .6em; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); }
.clist { list-style: none; padding: 0; margin: 0 0 1.6rem; border-top: 1px solid var(--line); }
.comment { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.comment.pending { opacity: .8; }
.c-head { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; font-size: .9rem; margin-bottom: .3rem; }
.c-head time { color: var(--muted); font-size: .8rem; }
.c-body { font-family: var(--serif); font-size: 1.02rem; }
.c-body p { margin: 0 0 .5em; }
.avatar { width: 2rem; height: 2rem; border-radius: 999px 999px 4px 4px; display: grid; place-items: center; background: var(--mal); color: var(--gold-2); font-weight: 600; font-size: .85rem; flex: none; }
.avatar.big { width: 3rem; height: 3rem; font-size: 1.15rem; }
.badge { font-size: .74rem; padding: .15em .6em; border-radius: 999px; background: var(--gold-soft); color: var(--ink-2); }

.post-page .back { font-size: .92rem; }
.post-full header { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.2rem; }
.post-text { font-family: var(--serif); font-size: 1.18rem; line-height: 1.8; color: var(--ink); }
.post-photo img { border-radius: 10px; margin: 1.2rem 0; max-height: 560px; width: auto; }
.post-full footer { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 1.2rem; }

/* ---------- футер ---------- */
.site-footer { margin-top: 5rem; background: var(--mal-2); color: var(--on-dark-2); padding-top: 3.5rem; font-size: .93rem; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--gold-2); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr 1.2fr; gap: 3rem; }
.f-quote { font-family: var(--serif); font-style: italic; font-size: 1.5rem; line-height: 1.35; color: #fff; margin-bottom: .4rem; }
.f-cite { color: var(--gold-2); font-size: .88rem; }
.f-links { display: grid; gap: .45rem; align-content: start; }
.f-links a { text-decoration: none; }
.f-help h2 { font-family: var(--sans); font-weight: 600; font-size: 1rem; color: #fff; }
.f-help p { margin: 0 0 .4em; }
.f-help strong { color: #fff; }
.f-partners { margin-top: 2.6rem; font-size: .84rem; color: var(--on-dark-2); }
.f-partners p { max-width: 70em; margin: 0; }
.f-bottom { display: flex; gap: 1.5rem; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.1); margin-top: 3rem; padding-block: 1.3rem; font-size: .82rem; }
.f-admin { margin-left: auto; color: var(--on-dark-2) !important; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- друк ---------- */
@media print {
  .site-header, .site-footer, .prayer-actions, .comments, .related, .flashes, .adminbar, .crumb { display: none !important; }
  body { background: #fff; color: #000; }
  .page-head { background: none; border: 0; padding: 0; box-shadow: none !important; }
}

.captcha { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; }
.captcha img { border-radius: 8px; border: 1px solid var(--line); }
.captcha label { flex: 1; min-width: 10rem; }

.join { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; padding: 2rem clamp(1.2rem, 4vw, 2.6rem); border: 1px solid var(--gold); border-radius: 14px; background: color-mix(in srgb, var(--gold) 9%, var(--surface)); }
.join h2 { margin-bottom: .3em; }
.join p { margin: 0; max-width: 44em; color: var(--ink-2); }
.f-join { color: var(--gold-2) !important; font-weight: 600; margin-bottom: .4rem; }
.bm-pop { position: fixed; z-index: 90; right: 1rem; top: 5rem; width: min(22rem, calc(100% - 2rem)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.3rem; box-shadow: var(--shadow); }
.bm-pop h2 { font-size: 1.2rem; padding-right: 1.5rem; }
.bm-pop p { font-size: .92rem; }
.bm-close { position: absolute; top: .4rem; right: .6rem; border: 0; background: none; font-size: 1.6rem; color: var(--muted); cursor: pointer; }
kbd { font: 600 .8rem var(--sans); padding: .1em .45em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--bg); }
