/* kandeli.ge — standalone pages: one page per product (p/*.html) and the
   information pages (info/*.html).

   Loaded after style.css, whose header, footer, colour tokens and dark theme
   these pages share with the shop. Everything here is prefixed (kp- shared,
   pp- product, ip- information) so none of it can leak into the storefront. */

/* ------------------------------------------------------------ shared chrome */

.kp-body { display: flex; flex-direction: column; min-height: 100vh; }
.kp-main { flex: 1 0 auto; padding: 18px 0 48px; }

/* The header, the announcement strip, the contact button and scroll-to-top
   are the shop's own markup (scripts/page_chrome.py) and take their look from
   style.css. What is here only covers where these pages differ: links where
   the shop has buttons, a <form> for the search, badges hidden by [hidden]. */
.kp-promo-off .promo-banner { display: none; }
.kp-body a.nav-action-btn,
.kp-body a.icon-btn { text-decoration: none; }
.kp-body .icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.kp-body .wishlist-badge[hidden],
.kp-body .cart-badge[hidden] { display: none; }
.kp-body .nav-search-wrapper { margin-bottom: 0; }
.kp-body .brand { min-width: 0; }
.kp-body .search-btn { border: 0; font: inherit; font-weight: 600; }
.kp-body .search-input { border: 0; font: inherit; font-size: 1rem; }
.kp-body .catalog-menu-item { text-decoration: none; }
.kp-body .catalog-menu-item-icon svg { fill: none; }
.kp-body .catalog-menu-item.active { font-weight: 700; }
.kp-body .contact-fab-btn,
.kp-body .scroll-top-btn { border: 0; }
.kp-body .scroll-top-btn { right: 22px; bottom: 22px; }

/* The phone's buy bar sits on the bottom edge: the round buttons move up. */
.contact-fab,
.scroll-top-btn { transition: bottom 0.25s ease, opacity 0.3s, transform 0.3s; }
body.pp-sticky-on .contact-fab,
body.pp-sticky-on .scroll-top-btn { bottom: calc(88px + env(safe-area-inset-bottom)); }


.kp-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    opacity: 0;
    z-index: 300;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-gold);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}
.kp-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.pp-sticky.is-on ~ .kp-toast { bottom: 96px; }

.kp-skip {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 400;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--accent-burgundy);
    color: #fff;
}
.kp-skip:focus { left: 12px; }

/* The storefront hero's glow (style.css .hero::before/::after) behind the
   product too — gold on the right, a faint burgundy on the left — so the page
   reads as the same shop, not a plain grey sheet. */
.pp-page .kp-main { position: relative; overflow-x: clip; }
.pp-page .kp-main::before,
.pp-page .kp-main::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}
.pp-page .kp-main::before {
    top: -260px;
    right: -12%;
    width: 680px;
    height: 680px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, rgba(212, 175, 55, 0) 70%);
}
.pp-page .kp-main::after {
    top: 120px;
    left: -14%;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(128, 0, 32, 0.06) 0%, rgba(128, 0, 32, 0) 70%);
}
.pp-page .kp-main > .container { position: relative; z-index: 1; }

/* --------------------------------------------------------- product: top bar */

.pp-top {
    display: flex;
    align-items: center;
    gap: 12px 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.pp-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px 0 10px;
    border-radius: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 3px var(--shadow-color);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.pp-back svg { width: 20px; height: 20px; fill: currentColor; }
.pp-back:hover { border-color: var(--accent-burgundy); transform: translateX(-2px); }
[data-theme="dark"] .pp-back:hover { border-color: var(--accent-gold); }

.pp-crumbs { min-width: 0; flex: 1 1 320px; font-size: 0.84rem; color: var(--text-secondary); }
.pp-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; padding: 0; }
.pp-crumbs li { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pp-crumbs li + li::before { content: "›"; opacity: 0.6; }
.pp-crumbs a { color: inherit; text-decoration: none; }
.pp-crumbs a:hover { color: var(--accent-burgundy-text); text-decoration: underline; }
.pp-crumbs [aria-current] { color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }

/* ------------------------------------------------------------ product: hero */

.pp-main {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 40px;
    padding: 28px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    box-shadow: var(--card-shadow);
}
@media (max-width: 880px) {
    .pp-main { grid-template-columns: 1fr; gap: 22px; padding: 14px; border-radius: 18px; }
}

.pp-gallery { min-width: 0; }
.pp-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    width: 100%;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    cursor: zoom-in;
}
.pp-stage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.35s ease;
}
@media (hover: hover) { .pp-stage:hover img { transform: scale(1.03); } }
.pp-zoom-hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(28, 30, 33, 0.72);
    color: #fff;
    font-size: 0.75rem;
    pointer-events: none;
}
.pp-zoom-hint svg { width: 15px; height: 15px; fill: currentColor; }
.pp-stage-brand {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    line-height: 0;
}
.pp-stage-brand img { height: 18px; width: auto; }

.pp-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.pp-thumb {
    flex: 0 0 74px;
    height: 74px;
    padding: 4px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.pp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pp-thumb:hover { border-color: var(--accent-gold); }
.pp-thumb[aria-current="true"] { border-color: var(--accent-burgundy); }
[data-theme="dark"] .pp-thumb[aria-current="true"] { border-color: var(--accent-gold); }

.pp-info { min-width: 0; display: flex; flex-direction: column; }
.pp-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-gold-text);
}
.pp-kicker a { color: inherit; text-decoration: none; }
.pp-kicker a:hover { text-decoration: underline; }
.pp-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.14);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: var(--text-primary);
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: none;
}
.pp-pill .ico { width: 1em; height: 1em; margin-right: 0; color: var(--accent-gold-text); }
.pp-title {
    margin: 10px 0 6px;
    font-family: 'Playfair Display', 'Noto Serif Georgian', serif;
    font-size: clamp(1.45rem, 2.5vw, 2.05rem);
    line-height: 1.3;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}
.pp-subtitle { color: var(--text-secondary); font-size: 0.98rem; margin: 0 0 6px; }

.pp-rating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 0.86rem;
    text-decoration: none;
}
.pp-rating[hidden] { display: none; }
.pp-stars { color: var(--accent-gold); letter-spacing: 2px; font-size: 1rem; }

.pp-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 18px 0 4px; }
.pp-price {
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--accent-burgundy-text);
    font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .pp-price { color: var(--accent-gold-text); }
.pp-price-ask { font-size: 1.3rem; }
.pp-price-note { font-size: 0.84rem; color: var(--text-secondary); }

/* Sizes the maker prices one by one: ivory options with the shop's gold
   edge, the picked one gilded. Many sizes scroll inside the list, so the
   add button stays near the price. */
.pp-sizes { margin: 14px 0 6px; }
.pp-sizes-title {
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
    color: var(--accent-gold-text); margin-bottom: 8px;
}
.pp-sizes-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px;
    max-height: 260px; overflow-y: auto; padding: 2px;
}
.pp-size {
    display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
    padding: 10px 12px; border-radius: 10px; text-align: left; font: inherit; cursor: pointer;
    background: var(--pp-ivory, var(--bg-secondary)); color: var(--text-primary);
    border: 1px solid var(--pp-ivory-line, var(--border-color));
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.pp-size:hover { border-color: var(--accent-gold); }
.pp-size.is-on {
    border-color: var(--accent-gold); background: rgba(212, 175, 55, 0.14);
    box-shadow: inset 0 0 0 1px var(--accent-gold);
}
.pp-size:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }
.pp-size-name { font-size: 0.86rem; line-height: 1.3; }
.pp-size-price { font-size: 0.95rem; font-weight: 700; color: var(--accent-burgundy-text); font-variant-numeric: tabular-nums; }
[data-theme="dark"] .pp-size-price { color: var(--accent-gold-text); }

.pp-ship {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0 0;
    padding: 13px 15px;
    border-radius: 14px;
    background: var(--bg-tertiary);
    font-size: 0.9rem;
    line-height: 1.5;
}
.pp-ship-icon {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold-text);
    background: radial-gradient(circle at 30% 25%, rgba(243, 198, 63, 0.3), rgba(212, 175, 55, 0.1) 70%);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.45);
}
.pp-ship-icon svg { width: 19px; height: 19px; fill: currentColor; }
.pp-ship.is-onorder .pp-ship-icon { background: var(--bg-secondary); }
.pp-ship strong { display: block; }
.pp-ship p { margin: 2px 0 0; color: var(--text-secondary); }
.pp-ship.is-onorder { background: rgba(212, 175, 55, 0.12); border: 1px solid rgba(212, 175, 55, 0.45); }

.pp-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
/* Phones: quantity, favourite and share on one row, the big button under them. */
@media (max-width: 520px) {
    .pp-buy { display: grid; grid-template-columns: auto 1fr auto auto; grid-template-areas: "qty . wish share" "add add add add"; }
    .pp-buy .pp-qty { grid-area: qty; }
    .pp-buy .pp-add { grid-area: add; width: 100%; }
    .pp-buy #pp-wish { grid-area: wish; }
    .pp-buy .pp-share-wrap { grid-area: share; }
    .pp-buy:has(.pp-add-ask) { grid-template-areas: "add add wish share"; grid-template-columns: 1fr 1fr auto auto; }
}
.pp-qty {
    display: inline-flex;
    align-items: center;
    height: 52px;
    border-radius: 26px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}
.pp-qty button {
    width: 44px;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.35rem;
    cursor: pointer;
    border-radius: 26px;
}
.pp-qty button:hover { color: var(--accent-burgundy-text); }
.pp-qty output { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-add {
    flex: 1 1 210px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 22px;
    border: 0;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--accent-burgundy) 0%, #a31d3b 100%);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(128, 0, 32, 0.25);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.pp-add svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.pp-add:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(128, 0, 32, 0.3); }
.pp-add:active { transform: none; }
.pp-add.is-done { background: linear-gradient(135deg, #2f6b2f 0%, #3d8a3d 100%); box-shadow: 0 6px 18px rgba(47, 107, 47, 0.25); }
/* "Ask on Messenger" wears the same burgundy as add-to-cart: it is this page's
   one main action, and Messenger's own blue-violet clashed with the shop. */
/* Dark theme: gold, as the shop's own add-to-cart (.add-cart-btn) is. */
[data-theme="dark"] .pp-add:not(.is-done) {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #f6d365 100%);
    color: var(--bg-primary);
    box-shadow: 0 6px 18px rgba(243, 198, 63, 0.22);
}
[data-theme="dark"] .pp-add:not(.is-done):hover { box-shadow: 0 10px 24px rgba(243, 198, 63, 0.3); }
[data-theme="dark"] .pp-qty button:hover,
[data-theme="dark"] .pp-round:hover { color: var(--accent-gold-text); border-color: var(--accent-gold); }

.pp-round {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.pp-round svg { width: 22px; height: 22px; fill: currentColor; }
.pp-round:hover { border-color: var(--accent-burgundy); color: var(--accent-burgundy-text); }
.pp-round[aria-pressed="true"] { color: var(--accent-burgundy-text); border-color: rgba(128, 0, 32, 0.4); background: rgba(128, 0, 32, 0.06); }
[data-theme="dark"] .pp-round[aria-pressed="true"] { border-color: rgba(234, 106, 145, 0.45); background: rgba(234, 106, 145, 0.08); }

.pp-added {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    margin-top: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid rgba(47, 107, 47, 0.35);
    background: rgba(47, 107, 47, 0.08);
    font-size: 0.92rem;
}
.pp-added[hidden] { display: none; }
.pp-added b { color: #2f6b2f; }
[data-theme="dark"] .pp-added b { color: #7fcf7f; }
.pp-added a { font-weight: 700; color: var(--accent-burgundy-text); white-space: nowrap; }
[data-theme="dark"] .pp-added a { color: var(--accent-gold-text); }

.pp-ask-note { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--bg-tertiary); font-size: 0.9rem; line-height: 1.55; }

.pp-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px 18px;
    margin: 20px 0 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--bg-tertiary);
    font-size: 0.86rem;
}
.pp-facts div { min-width: 0; }
.pp-facts dt { color: var(--text-secondary); font-size: 0.78rem; }
.pp-facts dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }

/* Three promises in one strip: a round gold medallion over two short lines,
   thin rules between them. The medallion has a width of its own — a flex
   basis alone set only its height in the column, and the circle came out as a
   stretched oval. */
.pp-trust {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 16px 0 0;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-secondary);
    overflow: hidden;
}
.pp-trust li {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 16px 10px 15px;
    text-align: center;
}
.pp-trust li + li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: var(--border-color);
}
.pp-trust-icon {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold-text);
    background: radial-gradient(circle at 30% 25%, rgba(243, 198, 63, 0.3), rgba(212, 175, 55, 0.1) 70%);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.45), 0 3px 10px rgba(184, 134, 11, 0.12);
}
.pp-trust-icon svg { width: 21px; height: 21px; fill: none; }
.pp-trust-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pp-trust b { color: var(--text-primary); font-size: 0.84rem; line-height: 1.3; }
.pp-trust-text > span { color: var(--text-secondary); font-size: 0.76rem; line-height: 1.35; }
[data-theme="dark"] .pp-trust { background: var(--bg-tertiary); }
[data-theme="dark"] .pp-trust-icon {
    background: radial-gradient(circle at 30% 25%, rgba(243, 198, 63, 0.24), rgba(243, 198, 63, 0.06) 70%);
    box-shadow: inset 0 0 0 1px rgba(243, 198, 63, 0.4);
}
/* Phones: one promise per row, medallion on the left. */
@media (max-width: 520px) {
    .pp-trust { grid-template-columns: 1fr; }
    .pp-trust li { flex-direction: row; align-items: center; gap: 14px; padding: 12px 14px; text-align: left; }
    .pp-trust li + li::before { left: 14px; right: 14px; top: 0; bottom: auto; width: auto; height: 1px; }
    .pp-trust-icon { width: 38px; height: 38px; }
    .pp-trust-icon svg { width: 19px; height: 19px; }
}

/* ---------------------------------------------------------- product: body */

.pp-section {
    margin-top: 22px;
    padding: 26px 30px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
}
@media (max-width: 880px) { .pp-section { padding: 20px 16px; border-radius: 16px; } }
.pp-section { scroll-margin-top: 130px; }   /* clear of the sticky header */
.pp-section > h2,
.ip-card > h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    font-family: 'Playfair Display', 'Noto Serif Georgian', serif;
    font-size: 1.3rem;
    color: var(--text-primary);
}
.pp-section > h2::before {
    content: "";
    flex: 0 0 4px;
    height: 22px;
    border-radius: 2px;
    background: var(--accent-gold);   /* one colour, as the shop's own markers (was gold → burgundy) */
}
.pp-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.pp-cols > .pp-section { margin-top: 22px; }
@media (max-width: 980px) { .pp-cols { grid-template-columns: 1fr; gap: 0; } }

.pp-desc p { margin: 0 0 13px; line-height: 1.8; max-width: 78ch; overflow-wrap: anywhere; }
.pp-desc p:last-child { margin-bottom: 0; }
.pp-desc.is-clamped { max-height: 420px; overflow: hidden; position: relative; }
.pp-desc.is-clamped::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    background: linear-gradient(transparent, var(--bg-secondary));
}
.pp-more {
    margin-top: 12px;
    padding: 8px 16px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}
.pp-more[hidden] { display: none; }

.pp-specs { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.pp-specs th,
.pp-specs td { padding: 11px 12px; border-bottom: 1px solid var(--border-color); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.pp-specs th { width: 44%; color: var(--text-secondary); font-weight: 500; }
.pp-specs tr:last-child th,
.pp-specs tr:last-child td { border-bottom: 0; }
.pp-specs tr:nth-child(odd) { background: var(--bg-tertiary); }
.pp-specs tr:nth-child(odd) th { border-radius: 10px 0 0 10px; }
.pp-specs tr:nth-child(odd) td { border-radius: 0 10px 10px 0; }
.pp-bullets { margin: 0; padding-left: 20px; line-height: 1.75; }
.pp-bullets li { margin-bottom: 5px; }

.pp-help { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 880px) { .pp-help { grid-template-columns: 1fr; } }
.pp-help a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.pp-help a:hover { border-color: var(--accent-gold); transform: translateY(-2px); box-shadow: var(--card-shadow); }
.pp-help b { font-size: 1rem; }
.pp-help span { color: var(--text-secondary); font-size: 0.86rem; line-height: 1.55; }
.pp-help em { margin-top: auto; padding-top: 6px; font-style: normal; font-weight: 700; font-size: 0.84rem; color: var(--accent-burgundy-text); }
[data-theme="dark"] .pp-help em { color: var(--accent-gold-text); }
.pp-help-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(128, 0, 32, 0.08);
    color: var(--accent-burgundy-text);
}
[data-theme="dark"] .pp-help-icon { background: rgba(243, 198, 63, 0.1); color: var(--accent-gold-text); }
.pp-help-icon svg { width: 22px; height: 22px; fill: currentColor; }

.pp-reviews-list { display: grid; gap: 12px; }
.pp-review { padding: 14px 16px; border-radius: 14px; background: var(--bg-tertiary); }
.pp-review header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 0.86rem; color: var(--text-secondary); }
.pp-review header b { color: var(--text-primary); }
.pp-review p { margin: 6px 0 0; line-height: 1.6; }
.pp-review-cta { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--accent-burgundy-text); }
[data-theme="dark"] .pp-review-cta { color: var(--accent-gold-text); }

/* The cards are the shop's own .product-card (style.css); only the grid, and
   a smaller type size for a row of five, are set here. */
.pp-related {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}
@media (max-width: 520px) { .pp-related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.pp-rel .card-img-wrapper { display: block; }
.pp-rel .card-info { padding: 12px 13px 12px; }
.pp-rel .card-title { font-size: 0.95rem; margin-bottom: 4px; }
.pp-rel .card-price { font-size: 1.08rem; }
.pp-rel .card-onorder-badge span { color: inherit; }
@media (max-width: 520px) {
    .pp-rel .card-info { padding: 10px; }
    .pp-rel .card-title { font-size: 0.86rem; }
    .pp-rel .card-price { font-size: 0.98rem; }
    .pp-rel .card-category { font-size: 0.66rem; }
}
.pp-more-link { display: inline-flex; margin-top: 16px; font-weight: 700; color: var(--accent-burgundy-text); text-decoration: none; }
.pp-more-link:hover { text-decoration: underline; }
[data-theme="dark"] .pp-more-link { color: var(--accent-gold-text); }

/* ------------------------------------------------- product: warm surfaces
   The grey panels (delivery, facts, specifications, the three conditions)
   read cold next to the storefront's burgundy and gold. They take the ivory
   and gold edge the shop itself uses for its gold notes (style.css
   .modal-fullpage-link). The dark theme keeps its own panels. */
.pp-page {
    --pp-ivory: #fcf8ee;
    --pp-ivory-line: rgba(212, 175, 55, 0.38);
}
[data-theme="dark"] .pp-page {
    --pp-ivory: var(--bg-tertiary);
    --pp-ivory-line: var(--border-color);
}
.pp-page .pp-ship,
.pp-page .pp-facts,
.pp-page .pp-ask-note,
.pp-page .pp-review { background: var(--pp-ivory); border: 1px solid var(--pp-ivory-line); }
.pp-page .pp-ship.is-onorder { background: rgba(212, 175, 55, 0.12); border-color: rgba(212, 175, 55, 0.45); }
.pp-page .pp-facts dt { color: var(--accent-gold-text); }
.pp-page .pp-qty { background: var(--pp-ivory); border-color: var(--pp-ivory-line); }
.pp-page .pp-specs tr:nth-child(odd) { background: var(--pp-ivory); }
.pp-page .pp-specs th,
.pp-page .pp-specs td { border-bottom-color: var(--pp-ivory-line); }
.pp-page .pp-help a { background: var(--pp-ivory); border-color: var(--pp-ivory-line); }
.pp-page .pp-help a:hover { border-color: var(--accent-gold); }
.pp-page .pp-trust { border-color: var(--pp-ivory-line); }
.pp-page .pp-stage { border-color: var(--pp-ivory-line); }
.pp-page .pp-thumb { border-color: var(--pp-ivory-line); }
.pp-page .pp-thumb:hover { border-color: var(--accent-gold); }
.pp-page .pp-thumb[aria-current="true"] { border-color: var(--accent-burgundy); }
[data-theme="dark"] .pp-page .pp-thumb[aria-current="true"] { border-color: var(--accent-gold); }
/* "Read in full": the shop's outlined burgundy button, not a grey chip. */
.pp-page .pp-more {
    border-color: var(--accent-burgundy);
    background: transparent;
    color: var(--accent-burgundy-text);
    transition: background 0.2s ease;
}
.pp-page .pp-more:hover { background: rgba(128, 0, 32, 0.06); }
[data-theme="dark"] .pp-page .pp-more { border-color: var(--accent-gold); color: var(--accent-gold-text); }
[data-theme="dark"] .pp-page .pp-more:hover { background: rgba(243, 198, 63, 0.08); }
/* The zoom hint over the photo: burgundy glass instead of charcoal. */
.pp-page .pp-zoom-hint { background: rgba(128, 0, 32, 0.82); }
[data-theme="dark"] .pp-page .pp-zoom-hint { background: rgba(18, 24, 36, 0.85); color: var(--accent-gold-text); }

/* ------------------------------------------------ product: finishing touches
   Church-shop details in the storefront's own two colours: a gilded edge
   along the product card, the photo in a thin double gold frame (the way an
   icon sits in its kiot), a small ornament under the name, and a gold hairline
   under every section heading. Nothing moves; only lines and light change. */
.pp-page .pp-main { position: relative; overflow: hidden; }
.pp-page .pp-main::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-burgundy) 0%, var(--accent-gold) 30%, #f3d98b 50%, var(--accent-gold) 70%, var(--accent-burgundy) 100%);
}
.pp-page .pp-stage {
    background: radial-gradient(circle at 50% 42%, #ffffff 0%, #ffffff 55%, #fbf6ea 100%);
    border: 1px solid rgba(212, 175, 55, 0.55);
    box-shadow: inset 0 0 0 5px #ffffff, inset 0 0 0 6px rgba(212, 175, 55, 0.35), 0 10px 26px rgba(128, 0, 32, 0.07);
}
[data-theme="dark"] .pp-page .pp-stage {
    border-color: rgba(243, 198, 63, 0.4);
    box-shadow: inset 0 0 0 5px #ffffff, inset 0 0 0 6px rgba(243, 198, 63, 0.3), 0 10px 26px rgba(0, 0, 0, 0.35);
}
.pp-page .pp-title { position: relative; padding-bottom: 16px; margin-bottom: 10px; }
.pp-page .pp-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 140px;
    height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='10' viewBox='0 0 140 10'%3E%3Cdefs%3E%3ClinearGradient id='l' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23d4af37' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23d4af37'/%3E%3C/linearGradient%3E%3ClinearGradient id='r' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23d4af37'/%3E%3Cstop offset='1' stop-color='%23d4af37' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='0' y='4.5' width='60' height='1' fill='url(%23l)'/%3E%3Crect x='80' y='4.5' width='60' height='1' fill='url(%23r)'/%3E%3Cpath d='M70 0.5 74.5 5 70 9.5 65.5 5Z' fill='%23d4af37'/%3E%3Cpath d='M70 3 72 5 70 7 68 5Z' fill='%23800020'/%3E%3C/svg%3E") left center / 140px 10px no-repeat;
}
.pp-page .pp-section > h2 {
    padding-bottom: 12px;
    border-bottom: 1px solid transparent;
    border-image: linear-gradient(90deg, rgba(212, 175, 55, 0.7), rgba(212, 175, 55, 0.15) 60%, transparent) 1;
}
.pp-page .pp-price { letter-spacing: -0.01em; }
.pp-page .pp-price-row { margin-top: 14px; }

/* --------------------------------------------------- product: sticky buy bar */

.pp-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(110%);
    transition: transform 0.25s ease;
}
.pp-sticky.is-on { transform: none; }
.pp-sticky-info { min-width: 0; flex: 1 1 auto; }
.pp-sticky-t { display: block; font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-sticky-p { display: block; font-weight: 800; font-size: 1.1rem; color: var(--accent-burgundy-text); }
[data-theme="dark"] .pp-sticky-p { color: var(--accent-gold-text); }
.pp-sticky .pp-add { flex: 0 0 auto; height: 46px; padding: 0 18px; font-size: 0.92rem; }
@media (min-width: 881px) { .pp-sticky { display: none; } }

/* -------------------------------------------------------- product: lightbox */

.pp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;              /* over the contact button (900), as the shop's lightbox is */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 12, 16, 0.94);
    padding: 56px 16px;
}
.pp-lightbox[hidden] { display: none; }
.pp-lightbox img { max-width: min(96vw, 1100px); max-height: 100%; object-fit: contain; border-radius: 8px; background: #fff; }
.pp-lb-btn {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
}
.pp-lb-btn svg { width: 24px; height: 24px; fill: currentColor; }
.pp-lb-btn:hover { background: rgba(255, 255, 255, 0.2); }
.pp-lb-close { top: 12px; right: 12px; }
.pp-lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.pp-lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.pp-lb-count { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, 0.8); font-size: 0.85rem; }

/* ------------------------------------------------------ product: share menu */

.pp-share-wrap { position: relative; }
.pp-share-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    z-index: 60;
    width: 230px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
.pp-share-menu[hidden] { display: none; }
.pp-share-menu a,
.pp-share-menu button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.pp-share-menu a:hover,
.pp-share-menu button:hover { background: var(--bg-tertiary); }
.pp-share-dot { flex: 0 0 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 0.8rem; font-weight: 800; }
.pp-share-dot svg { width: 15px; height: 15px; fill: currentColor; }

/* ============================================================ info pages */

.ip-hero {
    position: relative;
    margin-bottom: 22px;
    padding: 34px 34px 30px;
    border-radius: 24px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 88% 12%, rgba(243, 198, 63, 0.35), transparent 42%),
        linear-gradient(135deg, #5e0018 0%, #800020 55%, #9b2440 100%);
    box-shadow: 0 18px 40px rgba(128, 0, 32, 0.22);
}
.ip-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.03), 0 0 0 60px rgba(255, 255, 255, 0.02);
}
.ip-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #f3d77a; }
.ip-hero h1 { margin: 10px 0 8px; font-family: 'Playfair Display', 'Noto Serif Georgian', serif; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.25; }
.ip-hero p { max-width: 64ch; margin: 0; font-size: 1rem; line-height: 1.65; color: rgba(255, 255, 255, 0.88); }
@media (max-width: 720px) { .ip-hero { padding: 24px 20px; border-radius: 18px; } }

.ip-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 26px; align-items: start; }
.ip-layout > * { min-width: 0; }
@media (max-width: 960px) { .ip-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

.ip-nav {
    position: sticky;
    top: 128px;                 /* under the shop's header (98px logo) */
    padding: 10px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}
.ip-nav-title { display: block; padding: 6px 12px 8px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.ip-nav ul { list-style: none; margin: 0; padding: 0; }
.ip-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.92rem;
    transition: background 0.2s ease;
}
.ip-nav a:hover { background: var(--bg-tertiary); }
.ip-nav a[aria-current="page"] { background: rgba(128, 0, 32, 0.08); color: var(--accent-burgundy-text); font-weight: 700; }
[data-theme="dark"] .ip-nav a[aria-current="page"] { background: rgba(243, 198, 63, 0.1); color: var(--accent-gold-text); }
.ip-nav-icon { flex: 0 0 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-tertiary); font-size: 0.95rem; }
@media (max-width: 960px) {
    .ip-nav { position: static; padding: 6px; }
    .ip-nav-title { display: none; }
    .ip-nav ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .ip-nav ul::-webkit-scrollbar { display: none; }
    .ip-nav a { white-space: nowrap; padding: 8px 12px; }
    .ip-nav-icon { flex-basis: 26px; height: 26px; }
}

.ip-card {
    margin-bottom: 18px;
    padding: 26px 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    line-height: 1.75;
    scroll-margin-top: 132px;
}
@media (max-width: 720px) { .ip-card { padding: 20px 18px; border-radius: 16px; } }
.ip-card p { margin: 0 0 12px; }
.ip-card p:last-child { margin-bottom: 0; }
.ip-card ul,
.ip-card ol { margin: 0 0 12px; padding-left: 22px; }
.ip-card li { margin-bottom: 6px; }
.ip-card h4 { margin: 18px 0 8px; font-size: 1rem; }
.ip-card a { color: var(--accent-burgundy-text); }
[data-theme="dark"] .ip-card a { color: var(--accent-gold-text); }
.ip-h-icon {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.15);
    font-size: 1.15rem;
}

.ip-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.ip-tile {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}
.ip-tile-icon { font-size: 1.5rem; }
.ip-tile b { display: block; margin: 8px 0 4px; font-size: 1.02rem; }
.ip-tile span { display: block; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.55; }
.ip-tile strong { color: var(--accent-burgundy-text); font-size: 1.35rem; }
[data-theme="dark"] .ip-tile strong { color: var(--accent-gold-text); }

.ip-steps { list-style: none; counter-reset: ip-step; padding: 0 !important; margin: 0; display: grid; gap: 12px; }
.ip-steps li {
    counter-increment: ip-step;
    position: relative;
    margin: 0;
    padding: 12px 14px 12px 58px;
    border-radius: 14px;
    background: var(--bg-tertiary);
}
.ip-steps li::before {
    content: counter(ip-step);
    position: absolute;
    left: 14px;
    top: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-burgundy);
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
}

.ip-toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; list-style: none; padding: 0 !important; margin: 0; }
.ip-toc a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    color: var(--text-primary) !important;
    text-decoration: none;
    font-size: 0.9rem;
}
.ip-toc a:hover { border-color: var(--accent-gold); }
.ip-toc a > span:first-child { flex: 0 0 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-tertiary); font-size: 0.78rem; font-weight: 700; }

.ip-faq-search {
    width: 100%;
    height: 50px;
    padding: 0 18px;
    margin-bottom: 14px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.98rem;
}
.ip-faq-search:focus { outline: 2px solid var(--accent-gold); outline-offset: 1px; }
.ip-faq { display: grid; gap: 10px; }
.ip-faq details {
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    overflow: hidden;
}
.ip-faq details[open] { border-color: rgba(212, 175, 55, 0.6); box-shadow: var(--card-shadow); }
.ip-faq summary {
    overflow-wrap: anywhere;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.ip-faq summary::-webkit-details-marker { display: none; }
.ip-faq summary::after {
    content: "+";
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}
.ip-faq details[open] summary::after { content: "−"; background: var(--accent-burgundy); color: #fff; }
.ip-faq details > div { padding: 0 20px 18px; color: var(--text-secondary); line-height: 1.75; }
.ip-faq-empty { padding: 18px; text-align: center; color: var(--text-secondary); }

.ip-contact { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 20px;
    border-radius: 23px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary) !important;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.ip-btn:hover { border-color: var(--accent-gold); }
.ip-btn-primary { border: 0; background: linear-gradient(135deg, var(--accent-burgundy) 0%, #a31d3b 100%); color: #fff !important; box-shadow: 0 6px 18px rgba(128, 0, 32, 0.22); }

.ip-card .modal-tab-warranty-list { margin-top: 8px; }
.ip-card .tariff-table-wrap { margin-top: 4px; }

/* Order tracking */
.ip-track-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; }
@media (max-width: 720px) { .ip-track-form { grid-template-columns: 1fr; } }
.ip-track-form input {
    height: 50px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font: inherit;
}
.ip-track-form input:focus { outline: 2px solid var(--accent-gold); outline-offset: 1px; }
.ip-track-form .ip-btn { height: 50px; justify-content: center; }
.ip-track-result:empty { display: none; }
.ip-track-result { margin-top: 16px; }
.ip-track-error { color: var(--sev-urgent); font-weight: 600; }
.ip-timeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 !important; margin: 16px 0 0; }
.ip-timeline li { position: relative; margin: 0; padding-top: 34px; text-align: center; font-size: 0.84rem; color: var(--text-secondary); }
.ip-timeline li::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    z-index: 1;
}
.ip-timeline li::after { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--border-color); }
.ip-timeline li:first-child::after { display: none; }
.ip-timeline li.done { color: var(--text-primary); font-weight: 600; }
.ip-timeline li.done::before { background: var(--accent-burgundy); border-color: var(--accent-burgundy); }
.ip-timeline li.done::after { background: var(--accent-burgundy); }
.ip-timeline li.current::before { box-shadow: 0 0 0 5px rgba(128, 0, 32, 0.18); }
.ip-order-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.92rem; }

/* ============================================================ prayer book
   generate_prayer_pages.py — /locvani/. The shop's chrome, colours and cards
   around a reading sheet set like a printed Georgian prayer book: warm paper,
   a gold rule with the Bolnisi cross, the first letter as an initial, and the
   rubrics — "(3-გზის)", "გუნდი:", verse numbers — in cinnabar. */

.lx-main { --lx-ink: #2b2118; --lx-cinnabar: #a3161f; --lx-gold: #b8892a; --lx-paper: #fdf8ee; --lx-line: #eadfc8; }
[data-theme="dark"] .lx-main { --lx-ink: #ece3d2; --lx-cinnabar: #ef7d84; --lx-gold: #e2bd5a; --lx-paper: #17150f; --lx-line: #3a3226; }
.lx-crumbs { margin-bottom: 18px; }

/* A thin gold bar at the very top: how far into the prayer the reader is. */
.lx-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.lx-progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #b8860b, #f3c63f, #b8860b); }

.lx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.lx-layout-sec { grid-template-columns: minmax(0, 1fr) 290px; }

/* ---- the sheet */
.lx-sheet {
    --lx-size: 1.14rem;
    position: relative;
    padding: 46px clamp(22px, 5vw, 68px) 40px;
    border-radius: 26px;
    border: 1px solid var(--lx-line);
    background: radial-gradient(ellipse at 50% 0%, #fffdf8 0%, #fdf8ee 55%, #f7eedc 100%);
    color: var(--lx-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 50px rgba(80, 50, 20, 0.1);
}
.lx-sheet::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(184, 137, 42, 0.26);
    border-radius: 19px;
    pointer-events: none;
}
[data-theme="dark"] .lx-sheet {
    background: radial-gradient(ellipse at 50% 0%, #201c16 0%, #19160f 60%, #14120d 100%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .lx-sheet::before { border-color: rgba(226, 189, 90, 0.18); }

.lx-orn { display: flex; align-items: center; gap: 14px; max-width: 340px; margin: 0 auto; color: var(--lx-gold); }
.lx-orn span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor); }
.lx-orn span:last-child { background: linear-gradient(270deg, transparent, currentColor); }
.lx-orn svg { flex: none; width: 30px; height: 30px; fill: currentColor; }

.lx-head { position: relative; text-align: center; }
.lx-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--lx-gold);
    text-decoration: none;
}
.lx-kicker svg { width: 18px; height: 18px; }
.lx-kicker:hover { text-decoration: underline; }
.lx-title {
    max-width: 24ch;
    margin: 10px auto 12px;
    font-family: 'Noto Serif Georgian', 'Playfair Display', serif;
    font-size: clamp(1.55rem, 3.1vw, 2.35rem);
    font-weight: 700;
    line-height: 1.32;
    color: #6d0f22;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
[data-theme="dark"] .lx-title { color: #f3dfa2; }
.lx-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; font-size: 0.84rem; color: var(--text-secondary); }
.lx-time { display: inline-flex; align-items: center; gap: 6px; }
.lx-time svg { width: 16px; height: 16px; }
.lx-langs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; border: 1px solid var(--lx-line); background: rgba(255, 255, 255, 0.5); }
[data-theme="dark"] .lx-langs { background: rgba(255, 255, 255, 0.04); }
.lx-langs a { padding: 4px 11px; border-radius: 999px; color: var(--text-secondary); font-size: 0.78rem; font-weight: 600; text-decoration: none; }
.lx-langs a:hover { color: var(--lx-ink); }
.lx-langs a[aria-current="page"] { background: #800020; color: #fff; }
[data-theme="dark"] .lx-langs a[aria-current="page"] { background: #e2bd5a; color: #1b1b1b; }
.lx-alt {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(184, 137, 42, 0.5);
    background: rgba(243, 198, 63, 0.12);
    color: var(--lx-ink);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}
.lx-alt[hidden] { display: none; }
[data-ka-only][hidden] { display: none !important; }

/* ---- the text */
.lx-text {
    max-width: 68ch;
    margin: 34px auto 0;
    font-family: 'Noto Serif Georgian', 'Noto Serif', Georgia, serif;
    font-size: calc(var(--lx-size) * var(--lx-scale, 1));
    line-height: 1.95;
    color: var(--lx-ink);
    overflow-wrap: anywhere;
}
.lx-text p { margin: 0 0 1.05em; }
.lx-first::first-letter {
    float: left;
    margin: 0.08em 0.14em 0 0;
    font-size: 3.35em;
    font-weight: 700;
    line-height: 0.86;
    color: #800020;
    text-shadow: 0 1px 0 rgba(184, 137, 42, 0.45);
}
[data-theme="dark"] .lx-first::first-letter { color: #e2bd5a; text-shadow: none; }
.lx-h {
    margin: 1.9em 0 0.85em;
    font-family: inherit;
    font-size: 1.16em;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    color: #6d0f22;
    scroll-margin-top: 130px;
}
.lx-h::after { content: ""; display: block; width: 46px; height: 2px; margin: 0.45em auto 0; border-radius: 2px; background: var(--lx-gold); opacity: 0.7; }
[data-theme="dark"] .lx-h { color: #f3dfa2; }
.lx-who { font-weight: 700; color: var(--lx-cinnabar); }
.lx-rub { color: var(--lx-cinnabar); font-size: 0.9em; }
.lx-vn {
    display: inline-block;
    margin-right: 0.18em;
    font-family: 'Outfit', 'Noto Sans Georgian', sans-serif;
    font-size: 0.66em;
    font-weight: 700;
    vertical-align: 0.42em;
    line-height: 1;
    color: var(--lx-cinnabar);
}
.lx-note { font-size: 0.92em; text-align: center; color: var(--lx-cinnabar); }
.lx-foot { padding-top: 0.8em; border-top: 1px dashed var(--lx-line); font-size: 0.84em; color: var(--text-secondary); }
.lx-credit { font-size: 0.84em; text-align: center; color: var(--text-secondary); }

.lx-end { margin-top: 38px; text-align: center; }
.lx-source { margin: 18px 0 0; font-size: 0.82rem; color: var(--text-secondary); }
.lx-source a { color: inherit; }
.lx-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; text-align: left; }
.lx-pn a {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid var(--lx-line);
    background: rgba(255, 255, 255, 0.55);
    color: var(--lx-ink);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
[data-theme="dark"] .lx-pn a { background: rgba(255, 255, 255, 0.03); }
.lx-pn a:hover { border-color: var(--lx-gold); transform: translateY(-2px); }
.lx-pn small { font-size: 0.75rem; color: var(--text-secondary); }
.lx-pn b { font-size: 0.9rem; line-height: 1.4; }
.lx-pn-next { text-align: right; grid-column: 2; }

/* ---- the rail */
.lx-rail { position: sticky; top: 128px; display: flex; flex-direction: column; gap: 14px; }
.lx-card { padding: 16px; border-radius: 18px; border: 1px solid var(--border-color); background: var(--bg-secondary); box-shadow: var(--card-shadow); }
.lx-card h2 { margin: 0 0 10px; font-family: 'Playfair Display', 'Noto Serif Georgian', serif; font-size: 1rem; color: var(--text-primary); }
.lx-card h2 a { color: inherit; text-decoration: none; }
.lx-card h2 a:hover { text-decoration: underline; }
.lx-card ol { list-style: none; margin: 0; padding: 0; }
.lx-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lx-size { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-tertiary); }
.lx-size button {
    width: 38px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.lx-size button:hover { background: var(--bg-secondary); color: var(--accent-burgundy-text); }
[data-theme="dark"] .lx-size button:hover { color: var(--accent-gold-text); }
#lx-size-val { min-width: 44px; text-align: center; font-size: 0.78rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.lx-actions { display: flex; gap: 8px; }
.lx-actions .pp-round { width: 40px; height: 40px; }
.lx-actions .pp-round svg { width: 19px; height: 19px; }
.lx-actions .pp-share-menu { bottom: auto; top: calc(100% + 8px); }
.lx-toc ol { counter-reset: lx-toc; max-height: 38vh; overflow-y: auto; }
.lx-toc li { counter-increment: lx-toc; }
.lx-toc a, .lx-insec a {
    display: flex;
    gap: 9px;
    padding: 7px 8px;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.86rem;
    line-height: 1.4;
    text-decoration: none;
}
.lx-toc a::before { content: counter(lx-toc); flex: none; min-width: 1.4em; font-size: 0.76rem; font-weight: 700; color: var(--accent-gold-text); }
.lx-toc a:hover, .lx-insec a:hover { background: var(--bg-tertiary); }
.lx-toc a.is-here { background: rgba(212, 175, 55, 0.14); font-weight: 600; }
.lx-insec ol { max-height: 46vh; overflow-y: auto; }
.lx-insec a[aria-current="page"] { background: rgba(128, 0, 32, 0.08); color: var(--accent-burgundy-text); font-weight: 700; }
[data-theme="dark"] .lx-insec a[aria-current="page"] { background: rgba(243, 198, 63, 0.1); color: var(--accent-gold-text); }

.lx-shop { margin-top: 30px; }

/* ---- the front page */
.lx-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: center;
    gap: 30px;
    padding: 44px 46px;
    border-radius: 28px;
    color: #fff;
    /* the rings are painted, not a clipped ::before, so the search results can hang below the hero */
    background:
        radial-gradient(circle at calc(100% - 140px) 100px, transparent 209px, rgba(243, 223, 162, 0.16) 209px 210px, rgba(255, 255, 255, 0.045) 210px 244px, rgba(255, 255, 255, 0.02) 244px 278px, transparent 278px),
        radial-gradient(circle at 82% 45%, rgba(243, 198, 63, 0.32), transparent 36%),
        linear-gradient(125deg, #4d0013 0%, #800020 52%, #9b2440 100%);
    box-shadow: 0 20px 44px rgba(128, 0, 32, 0.24);
}
.lx-hero-text { position: relative; z-index: 4; min-width: 0; }   /* above .sx-today-wrap (3): the search results hang over it */
.lx-eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-gold-text); }
.lx-eyebrow-light { color: #f3d77a; }
.lx-hero h1 { margin: 8px 0 10px; font-family: 'Noto Serif Georgian', 'Playfair Display', serif; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; color: #fff; }
.lx-hero p { max-width: 58ch; margin: 0 0 22px; font-size: 1.02rem; line-height: 1.65; color: rgba(255, 255, 255, 0.88); }
.lx-hero-art { position: relative; z-index: 1; display: flex; justify-content: center; }
.lx-hero-art img { width: 220px; height: auto; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.35)); }
.lx-search { position: relative; max-width: 560px; }
.lx-search > svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: #800020; pointer-events: none; }
.lx-search input {
    width: 100%;
    height: 54px;
    padding: 0 20px 0 50px;
    border: 2px solid transparent;
    border-radius: 27px;
    background: #fff;
    color: #1c1e21;
    font: inherit;
    font-size: 1rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.lx-search input:focus { outline: none; border-color: #f3c63f; }
.lx-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 30;
    max-height: 60vh;
    overflow-y: auto;
    padding: 6px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}
.lx-results[hidden] { display: none; }
.lx-results a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; color: var(--text-primary); text-decoration: none; }
.lx-results a:hover, .lx-results a.is-on { background: var(--bg-tertiary); }
.lx-results b { font-weight: 600; font-size: 0.93rem; line-height: 1.4; }
.lx-results small { font-size: 0.76rem; color: var(--accent-gold-text); }
.lx-results mark { background: rgba(243, 198, 63, 0.35); color: inherit; border-radius: 3px; }
.lx-results p { margin: 0; padding: 12px 14px; color: var(--text-secondary); font-size: 0.9rem; }
.lx-hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; }
.lx-hero-stats li { padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.1); font-size: 0.84rem; }
.lx-hero-stats b { color: #f3d77a; }

.lx-today-wrap { margin-top: -26px; padding: 0 30px; position: relative; z-index: 3; }
.lx-today {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
    padding: 18px 24px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.55);
    background: var(--bg-secondary);
    box-shadow: var(--card-shadow);
}
.lx-today:not(:has(.lx-day:not([hidden]))) { display: none; }
.lx-day { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; color: var(--text-primary); text-decoration: none; min-width: 0; }
.lx-day[hidden] { display: none; }
.lx-day-k { font-weight: 800; color: var(--accent-burgundy-text); }
[data-theme="dark"] .lx-day-k { color: var(--accent-gold-text); }
.lx-day-t { font-family: 'Noto Serif Georgian', serif; font-size: 1.02rem; overflow-wrap: anywhere; }
.lx-day:hover .lx-day-t { text-decoration: underline; }

.lx-block { margin-top: 34px; }
.lx-block-h {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    font-family: 'Playfair Display', 'Noto Serif Georgian', serif;
    font-size: 1.45rem;
    color: var(--text-primary);
}
.lx-block-h::before { content: ""; flex: 0 0 4px; height: 24px; border-radius: 2px; background: var(--accent-gold); }
.lx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .lx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lx-tiles { grid-template-columns: minmax(0, 1fr); } }
.lx-tile {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: var(--card-shadow);
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.lx-tile:hover { transform: translateY(-3px); border-color: var(--accent-gold); box-shadow: var(--card-shadow-hover); }
.lx-tile-ico {
    grid-row: 1 / span 2;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold-text);
    background: radial-gradient(circle at 30% 25%, rgba(243, 198, 63, 0.3), rgba(212, 175, 55, 0.1) 70%);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.45);
}
.lx-tile-ico svg { width: 25px; height: 25px; }
.lx-tile-t { font-family: 'Noto Serif Georgian', serif; font-weight: 700; font-size: 1.02rem; line-height: 1.35; }
.lx-tile-m { font-size: 0.78rem; color: var(--text-secondary); }

.lx-secs { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.lx-sec {
    display: flex;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.lx-sec:hover { transform: translateY(-3px); border-color: var(--accent-gold); box-shadow: var(--card-shadow-hover); }
.lx-sec-ico {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(128, 0, 32, 0.08);
    color: var(--accent-burgundy-text);
}
[data-theme="dark"] .lx-sec-ico { background: rgba(243, 198, 63, 0.1); color: var(--accent-gold-text); }
.lx-sec-ico svg { width: 24px; height: 24px; }
.lx-sec-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lx-sec-body b { font-family: 'Noto Serif Georgian', serif; font-size: 1.02rem; line-height: 1.35; }
.lx-sec-n { font-size: 0.8rem; font-weight: 700; color: var(--accent-gold-text); }
.lx-sec-prev { list-style: none; margin: 6px 0 0; padding: 0; }
.lx-sec-prev li { font-size: 0.8rem; line-height: 1.5; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-sec-prev li::before { content: "· "; color: var(--accent-gold-text); }
.lx-hub-source { margin: 30px 0 0; text-align: center; font-size: 0.84rem; color: var(--text-secondary); }
.lx-hub-source a { color: inherit; }

/* ---- a section */
.lx-sechead {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
    padding: 26px 30px;
    border-radius: 24px;
    color: #fff;
    background: radial-gradient(circle at 90% 20%, rgba(243, 198, 63, 0.28), transparent 40%), linear-gradient(125deg, #4d0013 0%, #800020 55%, #9b2440 100%);
    box-shadow: 0 16px 36px rgba(128, 0, 32, 0.2);
}
.lx-sechead-ico {
    flex: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f3d77a;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(243, 215, 122, 0.5);
}
.lx-sechead-ico svg { width: 34px; height: 34px; }
.lx-sechead .lx-eyebrow { color: #f3d77a; }
.lx-sechead h1 { margin: 4px 0 2px; font-family: 'Noto Serif Georgian', serif; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.25; color: #fff; }
.lx-sechead-n { margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 0.92rem; }
.lx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lx-list li { display: flex; align-items: center; gap: 8px; }
.lx-row {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.lx-row:hover { border-color: var(--accent-gold); transform: translateX(3px); }
.lx-num {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-gold-text);
}
.lx-row-t { flex: 1; min-width: 0; font-family: 'Noto Serif Georgian', serif; font-size: 0.98rem; line-height: 1.45; }
.lx-row-m { flex: none; font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; }
.lx-badge {
    flex: none;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
}
.lx-badge:hover { border-color: var(--accent-gold); color: var(--text-primary); }
.lx-secnav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; color: var(--text-primary); font-size: 0.88rem; text-decoration: none; }
.lx-secnav a:hover { background: var(--bg-tertiary); }
.lx-secnav a[aria-current="page"] { background: rgba(128, 0, 32, 0.08); color: var(--accent-burgundy-text); font-weight: 700; }
[data-theme="dark"] .lx-secnav a[aria-current="page"] { background: rgba(243, 198, 63, 0.1); color: var(--accent-gold-text); }
.lx-secnav svg { flex: none; width: 18px; height: 18px; color: var(--accent-gold-text); }

/* ---- narrow screens */
@media (max-width: 1000px) {
    .lx-layout, .lx-layout-sec { grid-template-columns: minmax(0, 1fr); }
    .lx-rail { position: static; }
    /* The reading tools float at the bottom, between the round buttons. */
    .lx-reading .lx-tools {
        position: fixed;
        left: 50%;
        bottom: calc(18px + env(safe-area-inset-bottom));
        z-index: 95;
        transform: translateX(-50%);
        padding: 6px 8px;
        border-radius: 999px;
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        background: var(--glass-bg);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    }
    .lx-reading .lx-tools #lx-size-val { display: none; }
    .lx-reading .lx-tools .lx-size { border: 0; background: transparent; }
    .lx-reading .lx-tools .pp-share-menu { top: auto; bottom: calc(100% + 10px); }
    .lx-reading .lx-main { padding-bottom: 90px; }
    .lx-hero { grid-template-columns: minmax(0, 1fr); padding: 32px 26px; }
    .lx-hero-art { display: none; }
}
@media (max-width: 600px) {
    .lx-sheet { --lx-size: 1.06rem; padding: 32px 18px 28px; border-radius: 20px; }
    .lx-sheet::before { inset: 6px; border-radius: 15px; }
    .lx-text { margin-top: 26px; line-height: 1.9; }
    .lx-pn { grid-template-columns: minmax(0, 1fr); }
    .lx-pn-next { grid-column: 1; }
    .lx-reading #lx-print { display: none; }
    .lx-hero { padding: 26px 20px 40px; border-radius: 22px; }
    .lx-hero p { font-size: 0.95rem; }
    .lx-today-wrap { padding: 0 10px; }
    .lx-today { padding: 14px 16px; }
    .lx-sechead { padding: 20px; gap: 14px; border-radius: 20px; }
    .lx-sechead-ico { width: 54px; height: 54px; }
    .lx-sechead-ico svg { width: 26px; height: 26px; }
    .lx-row { padding: 12px; gap: 10px; }
    .lx-row-m { display: none; }
}

/* ---- print / PDF: the text alone on white paper, under the shop's mark
   (owner, 2026-10-08: "beautiful, our logo small, no orthodoxy.ge").
   The paper margin is zero, which leaves Chrome no room for its own header
   and footer (title, URL, date) — it then hides that option. The body's
   padding is cloned onto every page instead, and a fixed line repeats at the
   foot of each. Paper is always light, whatever the screen theme. The
   orthodoxy.ge credits that are plain text are taken out around printing by
   pages.js (lxPrintCredits); the linked ones go here. */
@media print {
    @page lx-paper { margin: 0; }
    html:has(> body.lx-reading) { background: #fff !important; }
    body.lx-reading {
        page: lx-paper;
        margin: 0;
        padding: 12mm 17mm 18mm;
        box-decoration-break: clone;
        -webkit-box-decoration-break: clone;
        background: #fff !important;
        color: #2b2118;
        color-scheme: light;
        --text-primary: #2b2118;
        --text-secondary: #6b5d4f;
        --accent-gold: #b8892a;
        --accent-burgundy: #800020;
        --accent-burgundy-text: #800020;
        --border-color: #e3d6bb;
    }
    body.lx-reading .lx-main,
    [data-theme="dark"] body.lx-reading .lx-main { --lx-ink: #2b2118; --lx-cinnabar: #a3161f; --lx-gold: #b8892a; --lx-paper: #fff; --lx-line: #e3d6bb; }

    .kp-body .navbar, .kp-body .promo-banner, .main-footer, .lx-rail, .lx-shop, .lx-progress, .contact-fab,
    .scroll-top-btn, .kp-toast, .lx-crumbs, .lx-pn, .lx-alt, .lx-langs, .kp-skip { display: none !important; }
    .lx-source:has(a[href*="orthodoxy.ge"]), .lx-hub-source:has(a[href*="orthodoxy.ge"]) { display: none !important; }

    /* Letterhead: the navbar's own logo (already loaded, so it always makes
       it onto the paper), small, with the name and the address. */
    body.lx-reading .navbar {
        display: block !important;
        position: static !important;
        margin: 0 0 8mm;
        padding: 0 0 3mm;
        background: none !important;
        border: 0;
        border-bottom: 0.6pt solid #cdb072;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    body.lx-reading .nav-container { display: flex !important; align-items: center; justify-content: space-between; min-height: 0; max-width: none; margin: 0; padding: 0; }
    body.lx-reading .nav-catalog, body.lx-reading .nav-search-wrapper, body.lx-reading .nav-actions { display: none !important; }
    body.lx-reading .brand { display: flex !important; align-items: center; gap: 3mm; opacity: 1; }
    body.lx-reading .brand-icon { width: 12mm !important; height: 12.5mm !important; filter: none; }
    body.lx-reading .brand-text { display: flex !important; flex-direction: column; gap: 0.6mm; }
    body.lx-reading .brand-title { font-family: 'Noto Serif Georgian', serif; font-size: 14pt !important; line-height: 1.1 !important; color: #800020 !important; }
    body.lx-reading .brand-subtitle { display: block !important; font-size: 7.5pt !important; letter-spacing: 0.06em; color: #8a7a66 !important; }
    body.lx-reading .nav-container::after { content: "kandeli.ge"; font: 600 8.5pt 'Outfit', sans-serif; letter-spacing: 0.08em; color: #8a7a66; }

    /* A quiet line at the foot of every page */
    body.lx-reading::after {
        content: "kandeli.ge";
        position: fixed;
        left: 0;
        right: 0;
        bottom: 8mm;
        text-align: center;
        font: 600 7pt 'Outfit', 'Noto Sans Georgian', sans-serif;
        letter-spacing: 0.1em;
        color: #a8987f;
    }

    /* The sheet: no card, no frame, no tint */
    .lx-main { padding: 0 !important; margin: 0 !important; }
    .lx-main > .container { max-width: none; margin: 0; padding: 0; }
    .lx-layout { display: block; }
    .lx-sheet, [data-theme="dark"] .lx-sheet { padding: 0; border: 0; border-radius: 0; box-shadow: none !important; background: #fff !important; color: var(--lx-ink); }
    .lx-sheet::before, .lx-sheet::after { display: none; }
    .lx-text a { color: inherit !important; text-decoration: none !important; }

    /* Title block: the letterhead opens the page, so the top cross steps aside */
    .lx-head { margin-bottom: 7mm; padding-bottom: 5mm; border-bottom: 0.6pt solid var(--lx-line); break-after: avoid; }
    .lx-head > .lx-orn:first-child { display: none; }
    .lx-kicker { margin-top: 0; font-size: 8.5pt; color: var(--lx-gold) !important; text-decoration: none; }
    .lx-kicker svg { width: 10pt; height: 10pt; }
    .lx-title { margin: 2mm auto 1.5mm; font-size: 20pt; color: #6d0f22 !important; }
    .lx-meta { display: none !important; }   /* reading time means nothing on paper */

    /* The text: book-like measure, nothing split across a page fold */
    .lx-text { max-width: none; margin-top: 0; font-size: 12pt; line-height: 1.68; }
    .lx-text p, .lx-h { break-inside: avoid; }
    .lx-h { break-after: avoid; color: #6d0f22 !important; }
    .lx-first::first-letter { color: #800020 !important; text-shadow: none; }

    /* The end: the cross alone closes the text */
    .lx-end { margin-top: 8mm; break-inside: avoid; }
    .lx-end .lx-orn { max-width: 56mm; }
    .lx-end .lx-orn svg { width: 15pt; height: 15pt; }

    /* Icons on the lives: a modest size on paper; the thumbnails stay on screen */
    .sx-icons img, .tc-hero img { max-height: 72mm; width: auto; box-shadow: none !important; }
    .sx-thumbs { display: none !important; }
}

/* ================================================================ Bible
   generate_bible_pages.py — /biblia/. The prayer book's sheet and tools;
   verses one to a line with the number in the margin, each an address
   (#v16) that selects, copies and shares. */

.bb-title { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bb-book { font-size: 0.62em; font-weight: 700; color: var(--lx-gold); text-decoration: none; letter-spacing: 0.01em; }
.bb-book:hover { text-decoration: underline; }
.bb-ch { display: block; }
.bb-nav { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; }
.bb-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--lx-line);
    background: rgba(255, 255, 255, 0.6);
    color: var(--lx-ink);
    font-size: 1.4rem;
    line-height: 1;
    text-decoration: none;
}
[data-theme="dark"] .bb-arrow { background: rgba(255, 255, 255, 0.04); }
a.bb-arrow:hover { border-color: var(--lx-gold); color: var(--accent-burgundy-text); }
span.bb-arrow { opacity: 0.35; }
.bb-select {
    height: 38px;
    padding: 0 34px 0 14px;
    border-radius: 19px;
    border: 1px solid var(--lx-line);
    background: rgba(255, 255, 255, 0.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23b8892a' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center / 18px;
    color: var(--lx-ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    appearance: none;
    cursor: pointer;
}
[data-theme="dark"] .bb-select { background-color: rgba(255, 255, 255, 0.05); }
.bb-select option { color: #1c1e21; background: #fff; }

.bb-text { max-width: 70ch; }
.bv { position: relative; margin: 0 0 0.55em !important; padding: 0.12em 0.5em 0.12em 2.2em; border-radius: 10px; scroll-margin-top: 140px; transition: background 0.2s ease; }
.bv-n {
    position: absolute;
    left: 0.35em;
    top: 0.52em;
    min-width: 1.6em;
    font-family: 'Outfit', 'Noto Sans Georgian', sans-serif;
    font-size: 0.66em;
    font-weight: 700;
    line-height: 1;
    text-align: right;
    color: var(--lx-cinnabar);
    text-decoration: none;
    cursor: pointer;
}
.bv-n:hover { text-decoration: underline; }
.bv.is-sel { background: rgba(243, 198, 63, 0.24); box-shadow: inset 3px 0 0 var(--lx-gold); }
.bv:target, .bv.is-flash { animation: bv-flash 2.4s ease; }
@keyframes bv-flash { 0%, 40% { background: rgba(243, 198, 63, 0.35); } 100% { background: transparent; } }
.bv-absent .bv-t { font-size: 0.86em; font-style: italic; color: var(--text-secondary); }
.bv-h { margin: 0.6em 0 0.9em !important; font-size: 0.92em; font-style: italic; text-align: center; color: var(--lx-cinnabar); }
/* a verse one source borrows from another (the Mtskheta manuscript's gaps): its number wears an asterisk, the note below says whence */
.bv-fill .bv-n::after { content: "*"; margin-left: 1px; }
.bb-fillnote { max-width: 70ch; margin: 1.1em 0 0 !important; padding-top: 0.8em; border-top: 1px solid var(--lx-rule, rgba(201, 162, 39, 0.35)); font-size: 0.82em; font-style: italic; line-height: 1.6; color: var(--text-secondary); }

/* The Septuagint beside the Masoretic text (generate_bible_pages.py, scripts/septuagint_notes.py) */
.bb-versions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: min(100%, 340px); margin: 12px auto 0; padding: 3px; border-radius: 14px; border: 1px solid var(--lx-line); background: rgba(255, 255, 255, 0.5); }
[data-theme="dark"] .bb-versions { background: rgba(255, 255, 255, 0.04); }
.bb-versions a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 5px 8px; border-radius: 11px; color: var(--text-secondary); font-size: 0.84rem; font-weight: 700; line-height: 1.25; text-decoration: none; }
.bb-versions a small { font-size: 0.7rem; font-weight: 600; opacity: 0.85; }
.bb-versions a:hover { color: var(--lx-ink); }
.bb-versions a[aria-current="page"] { background: #800020; color: #fff; }
[data-theme="dark"] .bb-versions a[aria-current="page"] { background: #e2bd5a; color: #1b1b1b; }
.bb-mas-note { max-width: 62ch; margin: 16px auto 0; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(184, 137, 42, 0.45); background: rgba(243, 198, 63, 0.1); font-size: 0.86rem; line-height: 1.55; text-align: left; color: var(--lx-ink); }
.bb-mas-note p { margin: 0 !important; }
.bb-mas-note p + p { margin-top: 8px !important; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.bb-mas-note a { color: var(--accent-burgundy-text, #800020); font-weight: 700; text-decoration: none; }
.bb-mas-note a:hover { text-decoration: underline; }
.bv-mt .bv-t { opacity: 0.88; }
.bv-mt-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--lx-line); font-size: 0.68em; font-weight: 600; font-style: normal; vertical-align: 0.15em; color: var(--text-secondary); white-space: nowrap; }
.bb-diff { max-width: 70ch; margin: 1.6em 0 0; padding: 1.1em 1.2em; border-radius: 16px; border: 1px solid var(--lx-line); background: var(--pp-ivory, #fcf8ee); font-size: 0.9rem; line-height: 1.6; color: var(--lx-ink); }
.bb-diff h2 { margin: 0 0 0.6em !important; font-size: 1.02rem; color: var(--lx-cinnabar); }
.bb-diff-book { margin: 0 0 0.8em !important; font-style: italic; color: var(--text-secondary); }
.bb-diff-item { padding: 0.7em 0; border-top: 1px solid var(--lx-line); }
.bb-diff-item h3 { margin: 0 0 0.3em !important; font-size: 0.95rem; }
.bb-diff-item h3 a { color: var(--lx-cinnabar); text-decoration: none; }
.bb-diff-item p { margin: 0.25em 0 0 !important; }
.bb-diff-nt b, .bb-diff-dss b { color: var(--lx-gold); }
.bb-diff-nt a { color: inherit; font-weight: 700; }
.bb-diff-more { margin: 0.8em 0 0 !important; padding-top: 0.7em; border-top: 1px solid var(--lx-line); font-weight: 600; }
.bb-diff-more a, .bb-mas-link a { color: var(--accent-burgundy-text, #800020); text-decoration: none; }
.bb-diff-more a:hover, .bb-mas-link a:hover { text-decoration: underline; }
.bb-mas-link { margin: 6px 0 0 !important; font-size: 0.86rem; color: var(--text-secondary); }
.bb-mas-link a { margin-left: 10px; font-weight: 700; }
.bb-lxx-card { margin: 18px 0 6px; padding: 14px 18px; border-radius: 16px; border: 1px solid rgba(184, 137, 42, 0.45); background: rgba(243, 198, 63, 0.1); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.bb-lxx-card p { flex: 1 1 360px; margin: 0; font-size: 0.92rem; line-height: 1.55; color: var(--text-primary); }
.bb-lxx-go { flex: none; padding: 8px 16px; border-radius: 999px; background: #800020; color: #fff; font-weight: 700; font-size: 0.88rem; text-decoration: none; }
[data-theme="dark"] .bb-lxx-go { background: #e2bd5a; color: #1b1b1b; }
.sa-text { max-width: 72ch; }
.sa-text h2 { margin: 1.6em 0 0.5em; font-size: 1.15rem; color: var(--lx-cinnabar); }
.sa-text ul { padding-left: 1.2em; }
.sa-text li { margin: 0.35em 0; }
.sa-text a { color: var(--lx-cinnabar); }
.sa-lead { font-size: 1.04em; }
.sa-small { font-size: 0.86em; color: var(--text-secondary); }
.sa-table { overflow-x: auto; margin: 1em 0; border: 1px solid var(--lx-line); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.sa-table table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 0.86rem; line-height: 1.45; }
.sa-table th { text-align: left; padding: 8px 10px; background: rgba(243, 198, 63, 0.14); color: var(--lx-ink); font-weight: 700; white-space: nowrap; }
.sa-table td { padding: 8px 10px; border-top: 1px solid var(--lx-line); vertical-align: top; }
.sa-table td:first-child { white-space: nowrap; font-weight: 600; }
.sa-sources li { font-size: 0.9em; }
@media (max-width: 600px) {
    .sa-table { overflow: visible; border: 0; }
    .sa-table table, .sa-table tbody, .sa-table tr, .sa-table td { display: block; min-width: 0; width: auto; }
    .sa-table thead { display: none; }
    .sa-table tr { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--lx-line); border-radius: 12px; }
    .sa-table td { padding: 2px 0; border: 0; white-space: normal !important; }
    .sa-table td:first-child { font-size: 1.02em; color: var(--lx-cinnabar); }
    .sa-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--lx-gold); }
}
.sa-back { margin: 0.8em 0 0; text-align: center; }
.sa-back a { color: var(--lx-cinnabar); font-weight: 700; text-decoration: none; }

.bb-grid-card h2 a { color: inherit; text-decoration: none; }
.bb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 5px; max-height: 44vh; overflow-y: auto; }
.bb-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border-radius: 9px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
}
.bb-grid a:hover { background: rgba(212, 175, 55, 0.2); }
.bb-grid a[aria-current="page"] { background: var(--accent-burgundy); color: #fff; }
[data-theme="dark"] .bb-grid a[aria-current="page"] { background: var(--accent-gold); color: var(--bg-primary); }

/* The selected verses: reference, copy, share. */
.bb-selbar {
    position: fixed;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 130;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: calc(100vw - 24px);
    padding: 6px 6px 6px 16px;
    border-radius: 999px;
    transform: translateX(-50%);
    background: #1c1e21;
    color: #fff;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}
.bb-selbar[hidden] { display: none; }
.bb-selbar b { margin-right: 6px; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-selbar button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 19px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}
.bb-selbar button:hover { background: rgba(255, 255, 255, 0.22); }
.bb-selbar svg { width: 17px; height: 17px; fill: currentColor; }
.bb-selbar .bb-selx { width: 38px; padding: 0; justify-content: center; background: transparent; }
body.bb-selecting .lx-tools { visibility: hidden; }
/* While verses are selected the bar owns the bottom edge: the round buttons step aside. */
body.bb-selecting .contact-fab,
body.bb-selecting .scroll-top-btn { opacity: 0; pointer-events: none; }
@media (max-width: 480px) { .bb-selbar button span { display: none; } .bb-selbar button { padding: 0 11px; } }

/* A book: every chapter with its first words. */
.bb-bookhead .bb-trs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bb-bookhead .lx-badge { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.1); color: #fff; }
.bb-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.bb-cell {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.bb-cell:hover { border-color: var(--accent-gold); transform: translateY(-2px); }
.bb-cell b {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(128, 0, 32, 0.08);
    color: var(--accent-burgundy-text);
    font-size: 0.9rem;
}
[data-theme="dark"] .bb-cell b { background: rgba(243, 198, 63, 0.12); color: var(--accent-gold-text); }
.bb-cell span { font-family: 'Noto Serif Georgian', serif; font-size: 0.84rem; line-height: 1.5; color: var(--text-secondary); }

/* The front page: the two Testaments, book by book. */
.bb-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.bb-jump a {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}
.bb-jump a:hover { border-color: var(--accent-gold); }
.bb-testament { scroll-margin-top: 130px; }
.bb-group { margin-bottom: 18px; }
.bb-group h3 { margin: 0 0 10px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; color: var(--accent-gold-text); }
.bb-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.bb-bookcard {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.bb-bookcard:hover { border-color: var(--accent-gold); transform: translateY(-2px); box-shadow: var(--card-shadow); }
.bb-bookcard b { font-family: 'Noto Serif Georgian', serif; font-size: 0.98rem; line-height: 1.35; }
.bb-bookcard > span { font-size: 0.78rem; color: var(--text-secondary); }
@media (max-width: 600px) {
    .bv { padding-left: 1.9em; }
    .bb-cells { grid-template-columns: minmax(0, 1fr); }
    .bb-books { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
    .bb-nav, .bb-selbar { display: none !important; }
    .bb-text { max-width: none; }
    .bv { padding: 0 0 0 2.1em; border-radius: 0; break-inside: avoid; }
    .bv.is-sel { background: none; box-shadow: none; }
    .bv-n { color: #8a1c24; }
    .bb-book { color: var(--lx-gold) !important; text-decoration: none; }
}

/* ============================================================== library
   generate_library.py — /biblioteka/: one shelf per part of the library. */
.lb-shelves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
@media (max-width: 1100px) { .lb-shelves { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lb-shelf {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: var(--card-shadow);
}
.lb-shelf-top { display: flex; align-items: center; gap: 16px; color: var(--text-primary); text-decoration: none; }
.lb-shelf-top:hover b { text-decoration: underline; }
.lb-shelf-ico {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold-text);
    background: radial-gradient(circle at 30% 25%, rgba(243, 198, 63, 0.3), rgba(212, 175, 55, 0.1) 70%);
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.45);
}
.lb-shelf-ico svg { width: 32px; height: 32px; }
.lb-shelf-top b { display: block; font-family: 'Noto Serif Georgian', serif; font-size: 1.5rem; line-height: 1.2; }
.lb-shelf-top small { display: block; margin-top: 2px; font-size: 0.84rem; color: var(--text-secondary); }
.lb-go {
    margin-left: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-burgundy);
    color: #fff;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}
[data-theme="dark"] .lb-go { background: var(--accent-gold); color: var(--bg-primary); }
.lb-shelf-top:hover .lb-go { transform: translateX(3px); }
.lb-shelf > p { margin: 0; font-size: 0.93rem; line-height: 1.65; color: var(--text-secondary); }
.lb-shelf, .lb-links, .lb-links li { min-width: 0; }   /* a long name ends in "…", not past the card */
.lb-links { list-style: none; display: grid; gap: 6px; margin: 4px 0 0; padding: 0; }
.lb-links a {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: 'Noto Serif Georgian', serif;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lb-links a:hover { background: rgba(212, 175, 55, 0.18); }
.lb-soon { margin: 22px 0 0; padding: 14px 18px; border-radius: 14px; border: 1px dashed rgba(212, 175, 55, 0.6); text-align: center; font-size: 0.9rem; color: var(--text-secondary); }
@media (max-width: 800px) { .lb-shelves { grid-template-columns: minmax(0, 1fr); } }

/* ======================================================= lives of the saints
   generate_saints_pages.py — /cxovrebani/. The saint's icon stands over the
   life in a gilt frame; the year is a calendar of days. */
.sx-icons { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 0 0 6px; flex-wrap: wrap; }
.sx-icons img {
    display: block;
    max-height: 300px;
    width: auto;
    padding: 6px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f3dfa2, #b8892a 45%, #f6d365 70%, #9a7020);
    box-shadow: 0 14px 34px rgba(60, 30, 5, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.sx-icons-many img { max-height: 220px; }
.sx-icons figcaption { flex-basis: 100%; margin-top: 4px; text-align: center; font-size: 0.72rem; color: var(--text-secondary); }
.sx-title { max-width: 28ch; }
.sx-ref { color: var(--lx-cinnabar); text-decoration: none; border-bottom: 1px dotted currentColor; }
.sx-ref:hover { border-bottom-style: solid; }
.sx-day h2 small { font-weight: 400; font-size: 0.8rem; color: var(--text-secondary); }
.sx-day ol { max-height: 46vh; overflow-y: auto; }
.sx-day li a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--text-primary); font-size: 0.85rem; line-height: 1.4; text-decoration: none; }
.sx-day li a:hover { background: var(--bg-tertiary); }
.sx-day li a[aria-current="page"] { background: rgba(128, 0, 32, 0.08); color: var(--accent-burgundy-text); font-weight: 700; }
[data-theme="dark"] .sx-day li a[aria-current="page"] { background: rgba(243, 198, 63, 0.1); color: var(--accent-gold-text); }
.sx-day li .sx-pic { width: 32px; height: 42px; border-radius: 4px; }
.sx-day li .sx-pic svg { width: 18px; height: 18px; }
.sx-icons a { display: block; }
.sx-icons figcaption a { color: var(--accent-burgundy-text); font-weight: 700; text-decoration: none; }
[data-theme="dark"] .sx-icons figcaption a { color: var(--accent-gold-text); }
.sx-pic.is-shop { background: linear-gradient(135deg, #f3dfa2, #b8892a 50%, #9a7020); }
.sx-pic.is-shop img { object-fit: contain; background: #fff; }
.sx-cal { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-color); color: var(--accent-burgundy-text); font-size: 0.86rem; font-weight: 700; text-decoration: none; }
[data-theme="dark"] .sx-cal { color: var(--accent-gold-text); }
.sx-cal svg { width: 18px; height: 18px; }

/* A day */
.sx-dayhead { gap: 18px; }
.sx-daynav { flex: none; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; font-size: 1.5rem; text-decoration: none; }
.sx-daynav:hover { background: rgba(255, 255, 255, 0.12); }
.sx-daydate { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 86px; height: 86px; border-radius: 18px; background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(243, 215, 122, 0.5); }
.sx-daydate b { font-family: 'Noto Serif Georgian', serif; font-size: 2rem; line-height: 1; color: #f3d77a; }
.sx-daydate span { font-size: 0.78rem; color: rgba(255, 255, 255, 0.85); }
.sx-daytext { flex: 1; min-width: 0; }
.sx-daytext h1 small { font-size: 0.55em; font-weight: 400; opacity: 0.8; }
.sx-daycal { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: #f3d77a; font-size: 0.86rem; font-weight: 700; text-decoration: none; }
.sx-daycal svg { width: 17px; height: 17px; }
.sx-lives { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.sx-life { display: flex; align-items: center; gap: 8px; }
.sx-life-a {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.sx-life-a:hover { border-color: var(--accent-gold); transform: translateY(-2px); box-shadow: var(--card-shadow); }
.sx-pic { flex: none; width: 58px; height: 76px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(212, 175, 55, 0.12); color: var(--accent-gold-text); }
.sx-pic svg { width: 28px; height: 28px; }
.sx-pic.has-icon { padding: 3px; background: linear-gradient(135deg, #f3dfa2, #b8892a 50%, #9a7020); }
.sx-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.sx-life-t { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sx-life-t b { font-family: 'Noto Serif Georgian', serif; font-size: 0.95rem; line-height: 1.45; }
.sx-life-t small { font-size: 0.76rem; color: var(--text-secondary); }

/* The front page */
.sx-today-wrap { margin-top: -26px; padding: 0 30px; position: relative; z-index: 3; }
.sx-today { padding: 18px 22px; border-radius: 20px; border: 1px solid rgba(212, 175, 55, 0.55); background: var(--bg-secondary); box-shadow: var(--card-shadow); }
.sx-today-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.sx-today-head b { font-family: 'Noto Serif Georgian', serif; font-size: 1.05rem; color: var(--accent-burgundy-text); }
[data-theme="dark"] .sx-today-head b { color: var(--accent-gold-text); }
.sx-today-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.sx-today-list a { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; color: var(--text-primary); font-size: 0.9rem; line-height: 1.4; text-decoration: none; }
.sx-today-list a:hover { background: var(--bg-tertiary); }
.sx-today-list img { flex: none; width: 36px; height: 48px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 2px #d6b05c; }
.sx-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sx-feat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; border-radius: 16px; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-primary); text-align: center; text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease; }
.sx-feat:hover { border-color: var(--accent-gold); transform: translateY(-3px); }
.sx-feat .sx-pic { width: 84px; height: 112px; }
.sx-feat b { font-family: 'Noto Serif Georgian', serif; font-size: 0.86rem; line-height: 1.35; }
.sx-feat small { font-size: 0.74rem; color: var(--accent-gold-text); font-weight: 700; }
.sx-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sx-month { padding: 16px; border-radius: 18px; border: 1px solid var(--border-color); background: var(--bg-secondary); scroll-margin-top: 130px; }
.sx-month h3 { margin: 0 0 10px; font-family: 'Noto Serif Georgian', serif; font-size: 1.05rem; }
.sx-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.sx-days a { display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 8px; background: var(--bg-tertiary); color: var(--text-primary); font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.sx-days a:hover { background: rgba(212, 175, 55, 0.25); }
.sx-days a.has-icon { box-shadow: inset 0 -2px 0 rgba(212, 175, 55, 0.8); }
.sx-days a.is-today { background: var(--accent-burgundy); color: #fff; }
[data-theme="dark"] .sx-days a.is-today { background: var(--accent-gold); color: var(--bg-primary); }
.lx-block-h small { font-family: 'Outfit', 'Noto Sans Georgian', sans-serif; font-size: 0.8rem; font-weight: 400; color: var(--text-secondary); }
@media (max-width: 600px) {
    .sx-icons img { max-height: 230px; }
    .sx-icons-many img { max-height: 160px; }
    .sx-dayhead { flex-wrap: wrap; }
    .sx-daydate { width: 70px; height: 70px; }
    .sx-lives { grid-template-columns: minmax(0, 1fr); }
    .sx-today-wrap { padding: 0 10px; }
    .sx-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================== teachings
   generate_teachings_pages.py — /pateriki/, /satnoebani/, /gzamkvlevi/,
   /sibrdzne/: articles on the reading sheet; the sayings as quotations. */
.tc-divider { margin: 1.4em 0 !important; text-align: center; letter-spacing: 0.6em; font-size: 0.8em; color: var(--lx-gold); }
.tc-h { margin: 1.6em 0 0.7em; font-size: 1.05em; font-weight: 700; text-align: center; color: #6d0f22; }
[data-theme="dark"] .tc-h { color: #f3dfa2; }
.tc-epigraph { margin: 1.2em auto; max-width: 52ch; padding: 0.4em 0 0.4em 1.1em; border-left: 3px solid var(--lx-gold); font-style: italic; }
.tc-epigraph p { margin: 0 0 0.3em !important; }
.tc-epigraph cite { display: block; font-size: 0.86em; font-style: normal; text-align: right; }
.tc-cite { margin: 16px 0 0; font-size: 0.84rem; font-style: italic; color: var(--text-secondary); }
.tc-group { margin-top: 26px; }
.tc-group .lx-block-h small { font-family: 'Outfit', 'Noto Sans Georgian', sans-serif; font-size: 0.8rem; color: var(--text-secondary); }
.tc-filter { position: relative; max-width: 460px; margin: 0 0 6px; }
.tc-filter svg { position: absolute; left: 16px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); fill: var(--text-secondary); pointer-events: none; }
.tc-filter input {
    width: 100%;
    height: 48px;
    padding: 0 18px 0 46px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.96rem;
}
.tc-filter input:focus { outline: none; border-color: var(--accent-gold); }
.tc-none { margin: 20px 0; text-align: center; color: var(--text-secondary); }
.tc-list .lx-row-t { font-size: 0.98rem; }

/* the sayings */
.tc-qlist { max-width: 64ch; }
.tc-q { position: relative; margin: 0 0 1.2em; padding: 1.1em 1.3em 0.9em 2.6em; border-radius: 16px; background: rgba(255, 255, 255, 0.55); border: 1px solid var(--lx-line); scroll-margin-top: 140px; }
[data-theme="dark"] .tc-q { background: rgba(255, 255, 255, 0.03); }
.tc-q::before { content: "„"; position: absolute; left: 0.35em; top: -0.12em; font-family: 'Noto Serif Georgian', serif; font-size: 2.6em; line-height: 1; color: var(--lx-gold); }
.tc-q blockquote { margin: 0; }
.tc-q blockquote p { margin: 0 !important; }
.tc-q figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 0.55em; font-size: 0.82em; }
.tc-q cite { font-style: normal; font-weight: 700; color: var(--lx-cinnabar); }
.tc-q cite a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.tc-q-tools { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.tc-q-n { color: var(--text-secondary); font-size: 0.9em; text-decoration: none; }
.tc-q-copy { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); cursor: pointer; }
.tc-q-copy:hover { background: rgba(212, 175, 55, 0.18); color: var(--text-primary); }
.tc-q-copy svg { width: 16px; height: 16px; fill: currentColor; }
.tc-q:target, .tc-q.is-flash { animation: bv-flash 2.4s ease; }

.tc-daily {
    position: relative;
    margin: 0 0 24px;
    padding: 26px 30px 22px 58px;
    border-radius: 22px;
    border: 1px solid rgba(212, 175, 55, 0.55);
    background: radial-gradient(ellipse at 0% 0%, rgba(243, 198, 63, 0.18), transparent 60%), var(--bg-secondary);
    box-shadow: var(--card-shadow);
}
.tc-daily[hidden] { display: none; }
.tc-daily::before { content: "„"; position: absolute; left: 18px; top: 4px; font-family: 'Noto Serif Georgian', serif; font-size: 4rem; line-height: 1; color: var(--accent-gold); }
.tc-daily blockquote { margin: 8px 0 10px; font-family: 'Noto Serif Georgian', serif; font-size: 1.2rem; line-height: 1.7; color: var(--text-primary); }
.tc-daily-by { margin: 0; font-weight: 700; color: var(--accent-burgundy-text); }
[data-theme="dark"] .tc-daily-by { color: var(--accent-gold-text); }
.tc-daily-by a { color: inherit; }
.tc-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tc-topic {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.tc-topic:hover { border-color: var(--accent-gold); transform: translateY(-2px); box-shadow: var(--card-shadow); }
.tc-topic b { font-family: 'Noto Serif Georgian', serif; font-size: 1.08rem; }
.tc-topic-q { font-family: 'Noto Serif Georgian', serif; font-size: 0.86rem; line-height: 1.55; color: var(--text-secondary); }
.tc-topic small { font-size: 0.76rem; font-weight: 700; color: var(--accent-gold-text); }
@media (max-width: 600px) {
    .tc-q { padding: 0.9em 1em 0.8em 2.1em; }
    .tc-daily { padding: 22px 18px 18px 44px; }
    .tc-daily blockquote { font-size: 1.05rem; }
}
/* The library's second row: the four teachings. */
.lb-more-h { margin-top: 30px; }
.lb-more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lb-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 18px; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-primary); text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.lb-card:hover { border-color: var(--accent-gold); transform: translateY(-3px); box-shadow: var(--card-shadow); }
.lb-card-ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(128, 0, 32, 0.08); color: var(--accent-burgundy-text); }
[data-theme="dark"] .lb-card-ico { background: rgba(243, 198, 63, 0.1); color: var(--accent-gold-text); }
.lb-card-ico svg { width: 25px; height: 25px; }
.lb-card b { font-family: 'Noto Serif Georgian', serif; font-size: 1.12rem; line-height: 1.3; }
.lb-card small { font-size: 0.78rem; font-weight: 700; color: var(--accent-gold-text); }
.lb-card-t { font-size: 0.84rem; line-height: 1.55; color: var(--text-secondary); }
@media (max-width: 1100px) { .lb-more { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lb-more { grid-template-columns: minmax(0, 1fr); } }

/* Stage 5: a feast's icon or a church's photograph over the text; photos
   inside it; thumbnails and dates in the lists. */
.tc-hero { margin: 0 auto 8px; max-width: 560px; text-align: center; }
.tc-hero img { display: block; width: 100%; max-height: 380px; object-fit: cover; border-radius: 16px; box-shadow: 0 16px 36px rgba(60, 30, 5, 0.25); }
.tc-hero.is-icon img { width: auto; max-width: 100%; max-height: 340px; margin: 0 auto; object-fit: contain; padding: 6px; border-radius: 6px;
    background: linear-gradient(135deg, #f3dfa2, #b8892a 45%, #f6d365 70%, #9a7020); }
.tc-hero figcaption { margin-top: 8px; font-size: 0.72rem; line-height: 1.5; color: var(--text-secondary); }
.tc-hero figcaption a { color: inherit; }
.tc-photo { margin: 1.4em 0; }
.tc-photo img { display: block; width: 100%; border-radius: 14px; box-shadow: 0 10px 26px rgba(60, 30, 5, 0.18); }
.tc-photo figcaption { margin-top: 6px; font-size: 0.8em; font-style: italic; text-align: center; color: var(--text-secondary); }
.lx-row.has-thumb { padding: 8px 14px 8px 8px; }
.tc-thumb { flex: none; width: 64px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--bg-tertiary); }
.tc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tc-when { display: block; margin-top: 2px; font-family: 'Outfit', 'Noto Sans Georgian', sans-serif; font-size: 0.76rem; font-weight: 700; color: var(--accent-gold-text); }

/* ================================================== fasts and patriarchs
   generate_church_pages.py — /marxva/, /patriarqebi/ */
.lx-sechead .lx-langs { display: inline-flex; margin-top: 10px; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); }
.lx-sechead .lx-langs a { color: rgba(255, 255, 255, 0.85); }
.fs-today { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-bottom: 8px; padding: 20px 24px;
    border-radius: 20px; border: 1px solid rgba(212, 175, 55, 0.55); background: var(--bg-secondary); box-shadow: var(--card-shadow); }
.fs-today-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fs-today-main b { font-family: 'Noto Serif Georgian', serif; font-size: 1.45rem; line-height: 1.3; color: var(--accent-burgundy-text); }
[data-theme="dark"] .fs-today-main b { color: var(--accent-gold-text); }
#fs-today-sub { font-size: 0.9rem; color: var(--text-secondary); }
.fs-week { display: grid; grid-template-columns: repeat(7, 52px); gap: 6px; }
.fs-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; background: var(--bg-tertiary); font-size: 0.72rem; color: var(--text-secondary); }
.fs-day b { font-size: 1rem; color: var(--text-primary); }
.fs-day i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-color); }
.fs-day.k-S i, .fs-day.k-W i, .fs-day.k-T i { background: #7b4f9e; }
.fs-day.k-T i { box-shadow: 0 0 0 2px rgba(123, 79, 158, 0.3); }
.fs-day.k-F i, .fs-day.k-P i { background: #c0392b; }
.fs-day.k-D i { background: #4a5568; }
.fs-day.k-C i { background: #d4a017; }
.fs-day.k-X i, .fs-day.k-N i { background: #2e9e5b; }
.fs-day.is-today { background: rgba(212, 175, 55, 0.22); box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.7); }
.fs-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fs-card { padding: 20px 22px; border-radius: 18px; border: 1px solid var(--border-color); background: var(--bg-secondary); border-top: 4px solid #7b4f9e; }
.fs-card.is-now { box-shadow: 0 0 0 2px rgba(123, 79, 158, 0.35), var(--card-shadow); }
.fs-card h3 { margin: 0 0 8px; font-family: 'Noto Serif Georgian', serif; font-size: 1.15rem; }
.fs-dates { margin: 0 0 8px; font-size: 0.9rem; line-height: 1.7; }
.fs-dates b { color: var(--accent-gold-text); }
.fs-note { margin: 0 0 8px; font-size: 0.88rem; color: var(--text-secondary); }
.fs-rules { margin: 0; padding-left: 18px; font-size: 0.88rem; line-height: 1.6; }
.fs-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.fs-box h2 { font-size: 1.05rem !important; }
.fs-box p { margin: 0; font-size: 0.92rem; line-height: 1.7; color: var(--text-secondary); }
.fs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.fs-list b { color: #7b4f9e; }
.fs-free { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.fs-free li { display: flex; flex-direction: column; gap: 3px; padding: 16px; border-radius: 16px; border: 1px solid var(--border-color); background: var(--bg-secondary); border-left: 4px solid #2e9e5b; }
.fs-free span { font-size: 0.88rem; font-weight: 700; color: var(--accent-gold-text); }
.fs-free small { font-size: 0.82rem; color: var(--text-secondary); }
.fs-paschas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.fs-paschas li { display: flex; flex-direction: column; align-items: center; padding: 14px 10px; border-radius: 14px; border: 1px solid var(--border-color); background: var(--bg-secondary); }
.fs-paschas li.is-now { border-color: #c0392b; box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.2); }
.fs-paschas b { font-size: 1.1rem; }
.fs-paschas span { font-family: 'Noto Serif Georgian', serif; color: #c0392b; }
.fs-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.fs-links .pf-btn { margin: 0; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.fs-links svg { width: 17px; height: 17px; fill: currentColor; }

.pt-portrait { margin: 0 auto 8px; text-align: center; }
.pt-portrait img { display: block; max-height: 320px; width: auto; max-width: 100%; margin: 0 auto; border-radius: 12px; box-shadow: 0 14px 34px rgba(60, 30, 5, 0.28); }
.pt-portrait figcaption { margin-top: 8px; font-size: 0.72rem; color: var(--text-secondary); }
.pt-portrait figcaption a { color: inherit; }
.pt-style { max-width: 56ch; margin: -2px auto 10px; font-size: 0.9rem; font-style: italic; color: var(--text-secondary); }
.pt-list a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: 10px; color: var(--text-primary); font-size: 0.88rem; text-decoration: none; }
.pt-list a:hover { background: var(--bg-tertiary); }
.pt-list a[aria-current="page"] { background: rgba(128, 0, 32, 0.08); color: var(--accent-burgundy-text); }
[data-theme="dark"] .pt-list a[aria-current="page"] { background: rgba(243, 198, 63, 0.1); color: var(--accent-gold-text); }
.pt-list small { color: var(--text-secondary); white-space: nowrap; }
.pt-current { margin-bottom: 10px; }
.pt-current .lx-eyebrow { display: block; margin-bottom: 10px; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pt-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-primary); text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.pt-card:hover { border-color: var(--accent-gold); transform: translateY(-3px); box-shadow: var(--card-shadow); }
.pt-photo { display: block; aspect-ratio: 4 / 5; background: var(--bg-tertiary); }
.pt-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pt-card-t { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }
.pt-card-t b { font-family: 'Noto Serif Georgian', serif; font-size: 1.05rem; }
.pt-card-t small { font-size: 0.8rem; color: var(--accent-gold-text); font-weight: 700; }
.pt-card-big { flex-direction: row; max-width: 620px; }
.pt-card-big .pt-photo { width: 200px; flex: none; }
.pt-card-big .pt-card-t { justify-content: center; padding: 20px 24px; }
.pt-card-big .pt-card-t b { font-size: 1.5rem; }
@media (max-width: 800px) {
    .fs-today { grid-template-columns: minmax(0, 1fr); }
    .fs-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .fs-cards, .fs-cols { grid-template-columns: minmax(0, 1fr); }
    .pt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-card-big .pt-photo { width: 130px; }
}

/* ================================================================ stage 6
   The Georgian saints' lists; the library's search. */
.sx-rosters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sx-rosters .lb-card b { font-size: 1rem; }
@media (max-width: 900px) { .sx-rosters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.bb-chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-primary); font-size: 0.86rem; font-weight: 600; text-decoration: none; }
.bb-chip:hover { border-color: var(--accent-gold); }
.bb-chip.is-on { background: var(--accent-burgundy); border-color: var(--accent-burgundy); color: #fff; }
[data-theme="dark"] .bb-chip.is-on { background: var(--accent-gold); border-color: var(--accent-gold); color: var(--bg-primary); }
.sx-sort { display: inline-flex; gap: 2px; margin: 0 0 14px; padding: 3px; border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-tertiary); }
.sx-sort button { height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.sx-sort button[aria-pressed="true"] { background: var(--bg-secondary); color: var(--text-primary); box-shadow: 0 1px 3px var(--shadow-color); }
.sx-can { display: inline-block; margin-top: 2px; padding: 2px 8px; border-radius: 999px; background: rgba(212, 175, 55, 0.15); color: var(--accent-gold-text); font-size: 0.72rem; font-weight: 700; }
.sx-life-a small small { font-size: 0.9em; opacity: 0.8; }
span.sx-life-a { cursor: default; }
.tc-life { margin: 14px 0 0; }
.tc-life .pf-btn { display: inline-flex; align-items: center; gap: 8px; margin: 0; text-decoration: none; }
.tc-life svg { width: 17px; height: 17px; fill: currentColor; }
.tc-life.is-days { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tc-life.is-days > span { display: inline-flex; align-items: center; gap: 8px; margin-right: 4px; font-weight: 600; color: var(--accent-burgundy-text); }

.lb-search { margin-top: 20px; }
.lb-results { max-height: 70vh; }
.lb-results h4 { margin: 8px 12px 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-gold-text); }
.lb-results a { flex-direction: row !important; align-items: center; gap: 12px !important; }
.lb-results .lb-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: rgba(128, 0, 32, 0.08); color: var(--accent-burgundy-text); }
[data-theme="dark"] .lb-results .lb-ico { background: rgba(243, 198, 63, 0.1); color: var(--accent-gold-text); }
.lb-results .lb-ico svg { width: 18px; height: 18px; }
.lb-results .lb-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lb-results .lb-txt b { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ==========================================================================
   საეკლესიო კალენდარი — /kalendari/ (generate_calendar_pages.py). The day as
   the Kandeli app draws it: the colours are the app's (theme/tokens.ts
   dayKindColors), each day kind carrying its own --kc.
   ========================================================================== */
.k-pascha { --kc: #a31d3b; --kt: #a31d3b; }
.k-feast { --kc: #d4af37; --kt: #8a6a12; }
.k-cheesefare { --kc: #c24a80; --kt: #a3316a; }
.k-departed { --kc: #4a6fd4; --kt: #2f55b8; }
.k-fast { --kc: #7c68d6; --kt: #5a46b8; }
.k-free { --kc: #3d8f5f; --kt: #2d7a4d; }
.k-plain { --kc: #9aa0a6; --kt: var(--text-primary); }
[data-theme="dark"] .k-feast { --kt: #f3d77a; }
[data-theme="dark"] .k-cheesefare { --kt: #f08bbb; }
[data-theme="dark"] .k-departed { --kt: #9db4f5; }
[data-theme="dark"] .k-fast { --kt: #b5a8f5; }
[data-theme="dark"] .k-free { --kt: #7fd0a0; }
.kl-dot { flex: none; display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--kc); }

/* The day's banner */
.kl-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 34px;
    padding: 34px 42px 30px;
    border-radius: 28px;
    color: #fff;
    background:
        radial-gradient(circle at calc(100% - 150px) 50%, transparent 159px, rgba(243, 223, 162, 0.14) 159px 160px, rgba(255, 255, 255, 0.035) 160px 196px, transparent 196px),
        radial-gradient(circle at 84% 40%, rgba(243, 198, 63, 0.3), transparent 42%),
        linear-gradient(125deg, #3a000e 0%, #6d0019 46%, #9b2440 100%);
    box-shadow: 0 20px 44px rgba(128, 0, 32, 0.24);
}
.kl-hero::after { content: ""; position: absolute; left: 42px; right: 42px; bottom: 0; height: 4px; border-radius: 4px 4px 0 0; background: var(--kc); opacity: 0.9; }
.kl-hero-text { min-width: 0; }
.kl-date { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 4px; font-family: 'Noto Serif Georgian', 'Playfair Display', serif; color: #fff; }
.kl-date b { font-size: clamp(3.4rem, 7vw, 5.2rem); line-height: 0.95; font-weight: 800; letter-spacing: -0.02em; }
.kl-date span { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; }
.kl-date small { flex-basis: 100%; font-family: inherit; font-size: 1.05rem; font-weight: 600; color: rgba(255, 255, 255, 0.78); }
.kl-old { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); }
.kl-today-badge { padding: 3px 11px; border-radius: 999px; background: #f3c63f; color: #3a000e; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.04em; }
.kl-headline { max-width: 62ch; margin: 16px 0 4px; font-family: 'Noto Serif Georgian', 'Playfair Display', serif; font-size: clamp(1.18rem, 2.3vw, 1.5rem); font-weight: 700; line-height: 1.42; color: #f3d77a; }
.kl-headline a { color: inherit; text-decoration: underline; text-decoration-color: rgba(243, 215, 122, 0.4); text-underline-offset: 5px; }
.kl-headline a:hover { text-decoration-color: #f3d77a; }
.kl-subline { max-width: 70ch; margin: 2px 0 0; font-family: 'Noto Serif Georgian', serif; font-size: 0.92rem; line-height: 1.55; color: rgba(255, 255, 255, 0.8); }
.kl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.kl-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 0.85rem; font-weight: 600; text-decoration: none; }
a.kl-chip:hover { background: rgba(255, 255, 255, 0.18); }
.kl-chip svg { width: 15px; height: 15px; }
.kl-chip .kl-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28); }
.kl-chip.is-allow { border-color: rgba(127, 208, 160, 0.5); background: rgba(61, 143, 95, 0.28); }
.kl-week { margin: 12px 0 0; font-size: 0.86rem; color: rgba(255, 255, 255, 0.72); }
.kl-feast-link { display: inline-flex; align-items: center; gap: 9px; margin-top: 14px; padding: 9px 15px; border-radius: 14px; border: 1px solid rgba(243, 215, 122, 0.45); background: rgba(243, 215, 122, 0.12); color: #f3d77a; font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.kl-feast-link:hover { background: rgba(243, 215, 122, 0.2); }
.kl-feast-link svg { width: 17px; height: 17px; }
.kl-feast-link i { font-style: normal; }
.kl-hero-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.kl-dnavs { display: inline-flex; gap: 6px; }
.kl-dnav, .kl-print { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.26); background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 1.45rem; line-height: 1; text-decoration: none; cursor: pointer; }
.kl-dnav:hover, .kl-print:hover { background: rgba(255, 255, 255, 0.2); }
.kl-dnav.is-off { opacity: 0.3; cursor: default; }
.kl-print svg { width: 18px; height: 18px; }
.kl-back, .kl-share { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 17px; border-radius: 999px; font: inherit; font-size: 0.88rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.kl-back { border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.1); color: #fff; }
.kl-back[hidden] { display: none; }
.kl-share { border: 0; background: #f3c63f; color: #3a000e; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }
.kl-share:hover { background: #f6d25e; }
.kl-back svg, .kl-share svg { width: 17px; height: 17px; }
.kl-hero .pp-share-wrap { position: relative; }
.kl-hero .lx-langs { margin-top: 16px; border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); }
.kl-hero .lx-langs a { color: rgba(255, 255, 255, 0.8); }
.kl-hero .lx-langs a[aria-current="page"] { background: #f3c63f; color: #3a000e; }
.kl-hero .lx-alt { display: inline-block; margin: 12px 0 0 10px; color: #f3d77a; font-size: 0.85rem; }
.kl-hero .lx-alt[hidden] { display: none; }
.kl-art-a { display: block; }
.kl-art { position: relative; z-index: 1; width: 236px; height: 312px; margin: 0; padding: 6px; border-radius: 999px 999px 20px 20px; background: linear-gradient(135deg, #f3dfa2, #b8892a 50%, #9a7020); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
.kl-art img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px 999px 15px 15px; background: #2a0a14; }
.kl-art-a:hover .kl-art { transform: translateY(-2px); transition: transform 0.2s; }

/* Two columns under it */
.kl-cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; margin-top: 22px; }
.kl-maincol, .kl-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kl-card { padding: 18px 20px; border-radius: 20px; border: 1px solid var(--border-color); background: var(--bg-secondary); box-shadow: var(--card-shadow); }
.kl-card-h { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; }
.kl-card-h h2 { margin: 0; font-family: 'Noto Serif Georgian', 'Playfair Display', serif; font-size: 1.14rem; color: var(--accent-burgundy-text); }
[data-theme="dark"] .kl-card-h h2 { color: var(--accent-gold-text); }
.kl-hint { margin: 0; font-size: 0.76rem; color: var(--text-secondary); }
.kl-fine { margin: 6px 0; font-size: 0.8rem; line-height: 1.55; color: var(--text-secondary); }
.kl-computed { margin: 0; padding: 12px 16px; border-radius: 14px; border: 1px dashed rgba(212, 175, 55, 0.6); background: rgba(212, 175, 55, 0.1); font-size: 0.88rem; }

/* ხსენება */
.kl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.kl-list a, .kl-name { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 12px; color: var(--text-primary); text-decoration: none; font-family: 'Noto Serif Georgian', serif; font-size: 0.95rem; line-height: 1.45; }
.kl-list a:hover { background: var(--bg-tertiary); }
.kl-list a > span:last-of-type, .kl-name > span:last-child { flex: 1; min-width: 0; }
.kl-list .sx-pic { width: 40px; height: 52px; }
.kl-list .sx-pic svg { width: 20px; height: 20px; }
.kl-list .sx-pic.is-muted { opacity: 0.4; }
.kl-list i { font-style: normal; font-size: 1.3rem; color: var(--accent-gold-text); }
.kl-star { color: var(--accent-burgundy-text); font-weight: 700; }
.kl-all { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border-color); color: var(--accent-burgundy-text); font-size: 0.9rem; font-weight: 700; text-decoration: none; }
[data-theme="dark"] .kl-all { color: var(--accent-gold-text); }
.kl-all:hover { text-decoration: underline; }

/* საკითხავები */
.kl-rd { margin: 0 0 9px; font-size: 0.95rem; line-height: 1.75; color: var(--text-primary); }
.kl-rd:last-child { margin-bottom: 0; }
.kl-rd b { color: var(--accent-burgundy-text); font-weight: 700; }
[data-theme="dark"] .kl-rd b { color: var(--accent-gold-text); }
.kl-rd a { color: var(--accent-burgundy-text); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(128, 0, 32, 0.3); text-underline-offset: 3px; }
[data-theme="dark"] .kl-rd a { color: var(--accent-gold-text); text-decoration-color: rgba(243, 198, 63, 0.35); }
.kl-rd a:hover { text-decoration-color: currentColor; }
.kl-rd.is-service { font-style: italic; color: var(--text-secondary); }
.kl-rd.is-service b { color: inherit; font-weight: 600; }
.kl-zach { font-size: 0.8em; color: var(--text-secondary); }
.kl-notes p:not(.kl-fine) { margin: 0 0 8px; font-size: 0.88rem; line-height: 1.65; color: var(--text-secondary); }

/* ხმა და დღის ფსალმუნნი */
.kl-tone-head { display: flex; align-items: center; gap: 14px; }
.kl-tone-badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--accent-gold); background: rgba(212, 175, 55, 0.1); color: var(--accent-gold-text); }
.kl-tone-badge svg { width: 18px; height: 18px; }
.kl-tone-badge b { font-size: 1.4rem; line-height: 1; }
.kl-tone-head div { display: flex; flex-direction: column; gap: 2px; }
.kl-tone-head small { font-size: 0.78rem; color: var(--text-secondary); }
.kl-more { margin: 12px 0 0; }
.kl-more summary { cursor: pointer; color: var(--accent-burgundy-text); font-size: 0.88rem; font-weight: 700; }
[data-theme="dark"] .kl-more summary { color: var(--accent-gold-text); }
.kl-more p { margin: 8px 0 0; font-size: 0.9rem; line-height: 1.65; }
.kl-sub { margin: 14px 0 8px; font-size: 0.88rem; line-height: 1.55; color: var(--text-secondary); }
.kl-kath { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.kl-kath a { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-primary); text-decoration: none; }
.kl-kath a:hover { border-color: var(--accent-gold); }
.kl-kath small { grid-column: 1; color: var(--accent-gold-text); font-size: 0.74rem; font-weight: 700; }
.kl-kath b { grid-column: 1; font-size: 1rem; }
.kl-kath i { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-size: 1.3rem; color: var(--accent-gold-text); }

/* დღის სიტყვა */
.kl-word blockquote { margin: 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--accent-burgundy); font-family: 'Noto Serif Georgian', serif; font-size: 1rem; line-height: 1.75; }
[data-theme="dark"] .kl-word blockquote { border-left-color: var(--accent-gold); }
.kl-word blockquote p { margin: 0; }
.kl-word-by { margin: 10px 0 0; font-size: 0.84rem; color: var(--text-secondary); }
.kl-word-by a { color: var(--accent-burgundy-text); }
[data-theme="dark"] .kl-word-by a { color: var(--accent-gold-text); }

/* The month */
.kl-mhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.kl-mtitle { flex: 1; margin: 0; text-align: center; font-family: 'Noto Serif Georgian', 'Playfair Display', serif; font-size: 1.16rem; color: var(--text-primary); }
.kl-mtitle span { color: var(--text-secondary); font-weight: 600; }
.kl-mnav { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-tertiary); color: var(--text-primary); font-size: 1.35rem; line-height: 1; text-decoration: none; }
.kl-mnav:hover { background: var(--accent-burgundy); color: #fff; }
.kl-mnav.is-off { opacity: 0.3; }
.kl-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; }
.kl-wd span { text-align: center; font-size: 0.7rem; font-weight: 700; color: var(--text-secondary); }
.kl-wd .is-sun { color: var(--accent-burgundy-text); }
.kl-grid, .kl-ygrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.kl-c, .kl-yc { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--kt, var(--text-primary)); font-weight: 600; text-decoration: none; }
.kl-c { font-size: 0.9rem; }
.kl-c:not(.k-plain):not(.is-void), .kl-yc:not(.k-plain):not(.is-pad) { background: color-mix(in srgb, var(--kc) 20%, transparent); }
.kl-c.k-pascha, .kl-yc.k-pascha { background: #a31d3b !important; color: #fff; }
.kl-c:hover, .kl-yc:hover { box-shadow: inset 0 0 0 2px var(--accent-gold); }
.kl-c.is-out { opacity: 0.38; }
.kl-c.is-void { opacity: 0.2; color: var(--text-secondary); }
.kl-c.is-sel, .kl-yc.is-sel { box-shadow: inset 0 0 0 2px var(--accent-burgundy); }
[data-theme="dark"] .kl-c.is-sel { box-shadow: inset 0 0 0 2px var(--accent-gold); }
.kl-c.is-today, .kl-yc.is-today { background: var(--accent-burgundy) !important; color: #fff !important; }
[data-theme="dark"] .kl-c.is-today, [data-theme="dark"] .kl-yc.is-today { background: var(--accent-gold) !important; color: #1a1205 !important; }
.kl-legend { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-color); }
.kl-legend summary { cursor: pointer; font-size: 0.86rem; font-weight: 700; color: var(--text-secondary); }
.kl-legend ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.kl-legend li { display: flex; align-items: flex-start; gap: 10px; }
.kl-legend .kl-dot { margin-top: 5px; }
.kl-legend b { display: block; font-size: 0.86rem; }
.kl-legend small { font-size: 0.76rem; color: var(--text-secondary); }

/* Coming feasts, and the way to the rest of the library */
.kl-up ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.kl-up a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; color: var(--text-primary); text-decoration: none; }
.kl-up a:hover { background: var(--bg-tertiary); }
.kl-up-d { flex: none; width: 48px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--kc) 55%, transparent); background: color-mix(in srgb, var(--kc) 15%, transparent); color: var(--kt); }
.kl-up-d b { font-size: 1.18rem; line-height: 1; }
.kl-up-d small { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; }
.kl-up-d.k-pascha { background: #a31d3b; border-color: #a31d3b; color: #fff; }
.kl-up a > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kl-up a > span:last-child b { font-size: 0.92rem; line-height: 1.35; }
.kl-up a > span:last-child small { font-size: 0.76rem; color: var(--text-secondary); }
.kl-links { display: grid; gap: 2px; padding: 8px; }
.kl-links a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-primary); font-size: 0.92rem; font-weight: 600; text-decoration: none; }
.kl-links a:hover { background: var(--bg-tertiary); }
.kl-links svg { width: 20px; height: 20px; color: var(--accent-gold-text); }
.kl-links span { flex: 1; }
.kl-links i { font-style: normal; font-size: 1.2rem; color: var(--accent-gold-text); }
.kl-shop { margin-top: 26px; }
.kl-source { margin-top: 20px; }
.kl-app.is-loading .kl-hero, .kl-app.is-loading .kl-cols { opacity: 0.55; transition: opacity 0.15s; }

/* The year at a glance (the calendar's front page) */
.kl-year { margin-top: 38px; }
.kl-yw { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.kl-ym { padding: 14px; border-radius: 18px; border: 1px solid var(--border-color); background: var(--bg-secondary); }
.kl-ym h3 { margin: 0 0 8px; font-family: 'Noto Serif Georgian', serif; font-size: 0.98rem; color: var(--accent-burgundy-text); }
[data-theme="dark"] .kl-ym h3 { color: var(--accent-gold-text); }
.kl-ygrid { gap: 3px; }
.kl-yc { font-size: 0.7rem; }
.kl-year-next { margin: 14px 0 0; text-align: right; }

@media (max-width: 1080px) {
    .kl-cols { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 880px) {
    /* One column: the month first, as in the app; the rest after the day. */
    .kl-cols { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .kl-side { display: contents; }
    .kl-month { order: 1; }
    .kl-maincol { order: 2; }
    .kl-up, .kl-links { order: 3; }
    .kl-hero { grid-template-columns: minmax(0, 1fr); padding: 28px 26px 26px; }
    .kl-art { position: absolute; top: 26px; right: 22px; width: 118px; height: 156px; padding: 4px; }
    .kl-art-a { position: static; }
    .kl-hero .lx-eyebrow, .kl-date, .kl-old { padding-right: 132px; }
}
@media (max-width: 560px) {
    .kl-hero { padding: 22px 18px 22px; border-radius: 22px; }
    .kl-hero::after { left: 22px; right: 22px; }
    .kl-art { top: 20px; right: 14px; width: 86px; height: 114px; padding: 3px; }
    .kl-hero .lx-eyebrow, .kl-date, .kl-old { padding-right: 96px; }
    .kl-date b { font-size: 3.1rem; }
    .kl-date span { font-size: 1.45rem; }
    .kl-card { padding: 16px; }
    .kl-share span { display: none; }
    .kl-share { width: 42px; padding: 0; justify-content: center; }
    .kl-yw { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .kl-ym { padding: 10px; }
}
@media print {
    .kl-side, .kl-hero-bar, .kl-shop, .kl-year, .kl-hero .lx-langs, .kl-more summary, .kl-art { display: none !important; }
    .kl-hero { display: block; padding: 0 0 12px; background: none !important; color: #000; box-shadow: none; border-bottom: 2px solid #800020; border-radius: 0; }
    .kl-hero::after { display: none; }
    .kl-date, .kl-headline, .kl-headline a { color: #000 !important; }
    .kl-date small, .kl-old, .kl-week, .kl-subline { color: #333 !important; }
    .kl-chip { color: #000; border-color: #999; background: none; }
    .kl-cols { display: block; }
    .kl-card { box-shadow: none; border: 0; padding: 12px 0; }
    .kl-more p { display: block; }
}

/* ==========================================================================
   What the app shows around the texts (library_bridge.cjs): a saint's
   pictures, the Georgian saints' plates, the Georgian Church's feasts as
   calendar leaves, the Menaion's months, a place's views and the way there,
   Tbilisi's churches as a directory, the name-day finder, and a viewer that
   opens any of these pictures full size.
   ========================================================================== */
.sx-gal { flex-direction: column; align-items: center; gap: 10px; }
.sx-hero-img { display: block; border-radius: 10px; cursor: zoom-in; }
.sx-hero-img img { max-height: 320px; }
.sx-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sx-thumb { display: block; width: 58px; height: 76px; padding: 2px; border-radius: 6px; background: linear-gradient(135deg, #f3dfa2, #b8892a 50%, #9a7020); cursor: zoom-in; }
.sx-thumb img { width: 100%; height: 100%; max-height: none; object-fit: cover; border-radius: 4px; box-shadow: none; }
.sx-gal figcaption a { display: inline; color: inherit; font-weight: 600; }

.sx-plates { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 0 4px; scroll-snap-type: x proximity; }
.sx-plate { flex: none; width: 104px; display: flex; flex-direction: column; gap: 6px; color: var(--text-primary); text-decoration: none; scroll-snap-align: start; }
.sx-plate img { width: 104px; height: 136px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-tertiary); }
.sx-plate:hover img { border-color: var(--accent-gold); }
.sx-plate small { font-size: 0.72rem; line-height: 1.3; text-align: center; }
.sx-plates-note { margin: 0 0 16px; font-size: 0.74rem; color: var(--text-secondary); }

.sx-feasts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sx-feast { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; border: 1px solid var(--border-color); background: var(--bg-secondary); }
.sx-feast.is-next { border-color: var(--accent-gold); box-shadow: 0 0 0 1px var(--accent-gold), var(--card-shadow); }
.sx-feast > a:not(.sx-feast-cal), .sx-feast > span:not(.sx-feast-next) { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; color: var(--text-primary); text-decoration: none; }
.sx-leaf { flex: none; width: 62px; height: 68px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--accent-gold); background: rgba(212, 175, 55, 0.1); color: var(--accent-gold-text); }
.sx-leaf b { font-family: 'Noto Serif Georgian', serif; font-size: 1.6rem; line-height: 1; }
.sx-leaf small { margin-top: 3px; font-size: 0.7rem; font-weight: 700; }
.sx-feast.is-next .sx-leaf { background: var(--accent-burgundy); border-color: var(--accent-burgundy); color: #fff; }
.sx-feast-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sx-feast-t b { font-family: 'Noto Serif Georgian', serif; font-size: 0.95rem; line-height: 1.45; }
.sx-feast-t small { font-size: 0.76rem; color: var(--text-secondary); }
.sx-feast .sx-pic { width: 44px; height: 58px; }
.sx-feast-cal { flex: none; align-self: center; padding: 6px 12px; border-radius: 999px; background: var(--bg-tertiary); color: var(--accent-burgundy-text); font-size: 0.78rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
[data-theme="dark"] .sx-feast-cal { color: var(--accent-gold-text); }
.sx-feast-next { position: absolute; top: -9px; left: 14px; padding: 1px 9px; border-radius: 999px; background: var(--accent-gold); color: #1a1205; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; }

.sx-month { overflow: hidden; }
.sx-month-img { display: block; width: calc(100% + 32px); height: 92px; margin: -16px -16px 12px; object-fit: cover; object-position: center 30%; border-bottom: 1px solid var(--border-color); }

.lx-banner { display: flex; align-items: center; gap: 14px; margin: 18px 0; padding: 14px 18px; border-radius: 18px; border: 1px solid var(--accent-gold); background: linear-gradient(90deg, rgba(212, 175, 55, 0.14), transparent 60%), var(--bg-secondary); color: var(--text-primary); text-decoration: none; box-shadow: var(--card-shadow); }
.lx-banner:hover { transform: translateY(-1px); }
.lx-banner-ico { flex: none; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--accent-burgundy); color: #f3d77a; }
.lx-banner-ico svg { width: 22px; height: 22px; }
.lx-banner > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lx-banner b { font-family: 'Noto Serif Georgian', serif; font-size: 1.02rem; }
.lx-banner small { font-size: 0.8rem; color: var(--text-secondary); }
.lx-banner small:first-child { color: var(--accent-gold-text); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.04em; }
.lb-names { margin-top: 24px; }

/* Tbilisi's churches */
.tb-dir { margin: 6px 0 0; }
.tb-h { margin: 0 0 12px; font-family: 'Noto Serif Georgian', serif; font-size: 1.1rem; color: var(--accent-burgundy-text); }
[data-theme="dark"] .tb-h { color: var(--accent-gold-text); }
.tb-lands { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 22px; }
.tb-land { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-primary); text-decoration: none; }
.tb-land:hover { border-color: var(--accent-gold); }
.tb-land img { flex: none; width: 76px; height: 76px; object-fit: cover; border-radius: 10px; }
.tb-land span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tb-land b { font-family: 'Noto Serif Georgian', serif; font-size: 0.95rem; line-height: 1.35; }
.tb-land small { font-size: 0.76rem; line-height: 1.45; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tb-land i { font-style: normal; color: var(--accent-gold-text); font-size: 1.3rem; }
.tb-search { max-width: none; margin-bottom: 8px; }
.tb-search input { border-color: var(--border-color); }
.tb-count { margin: 0 0 12px; font-size: 0.8rem; color: var(--text-secondary); }
.tb-group h3 { margin: 16px 0 8px; font-family: 'Noto Serif Georgian', serif; font-size: 1rem; letter-spacing: 0.06em; color: var(--accent-gold-text); }
.tb-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg-secondary); }
.tb-row b { font-family: 'Noto Serif Georgian', serif; font-size: 0.95rem; font-weight: 600; line-height: 1.45; }
.tb-addr { display: flex; align-items: flex-start; gap: 6px; font-size: 0.82rem; color: var(--text-secondary); }
.tb-addr svg { flex: none; width: 14px; height: 14px; margin-top: 2px; fill: currentColor; opacity: 0.7; }
.tb-line { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-phone, .tb-planned { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; text-decoration: none; }
.tb-phone { border: 1px solid var(--accent-gold); background: rgba(212, 175, 55, 0.1); color: var(--accent-gold-text); }
.tb-phone svg { width: 12px; height: 12px; fill: currentColor; }
.tb-planned { border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-secondary); font-weight: 600; }
.tb-group[hidden], .tb-row[hidden] { display: none; }
.tb-none { padding: 24px 0; text-align: center; color: var(--text-secondary); }

/* A place's views and the way there */
.tc-views { margin: 26px 0 0; }
.tc-views-h { margin: 0 0 10px; font-family: 'Noto Serif Georgian', serif; font-size: 1rem; color: var(--accent-burgundy-text); }
[data-theme="dark"] .tc-views-h { color: var(--accent-gold-text); }
.tc-views-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.tc-view { flex: none; display: block; border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.tc-view img { display: block; width: 220px; height: 150px; object-fit: cover; transition: transform 0.25s; }
.tc-view:hover img { transform: scale(1.04); }
.tc-route { display: flex; align-items: center; gap: 14px; margin: 18px 0 0; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--accent-gold); background: var(--bg-secondary); color: var(--text-primary); text-decoration: none; }
.tc-route:hover { background: rgba(212, 175, 55, 0.08); }
.tc-route-pin { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--accent-gold); background: rgba(212, 175, 55, 0.1); color: var(--accent-gold-text); }
.tc-route-pin svg { width: 20px; height: 20px; fill: currentColor; }
.tc-route > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tc-route small { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent-gold-text); }
.tc-route b { font-family: 'Noto Serif Georgian', serif; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-route .tc-route-sub { font-weight: 500; letter-spacing: 0; color: var(--text-secondary); }
.tc-route i { font-style: normal; font-size: 1.3rem; color: var(--accent-gold-text); }
.tc-place { margin: 24px 0 0; }
.tc-hero a[data-zoom], .tc-photo a[data-zoom] { display: block; cursor: zoom-in; }

/* Name days */
.nd-app { display: flex; flex-direction: column; gap: 18px; }
.nd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.nd-person { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid var(--border-color); background: var(--bg-secondary); box-shadow: var(--card-shadow); }
.nd-person.is-soon { border-color: var(--accent-gold); }
.nd-person-top { display: flex; align-items: flex-start; gap: 12px; }
.nd-person-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nd-person-t b { font-size: 1rem; }
.nd-person-t span { font-family: 'Noto Serif Georgian', serif; font-size: 0.84rem; line-height: 1.45; color: var(--text-secondary); }
.nd-person-t em { font-style: normal; font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.nd-person.is-soon .nd-person-t em { color: var(--accent-burgundy-text); }
[data-theme="dark"] .nd-person.is-soon .nd-person-t em { color: var(--accent-gold-text); }
.nd-person .sx-pic { width: 46px; height: 60px; }
.nd-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nd-act { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border-color); background: transparent; color: var(--accent-burgundy-text); font: inherit; font-size: 0.8rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.nd-act.is-main { border-color: var(--accent-burgundy); background: var(--accent-burgundy); color: #fff; }
[data-theme="dark"] .nd-act { color: var(--accent-gold-text); }
[data-theme="dark"] .nd-act.is-main { border-color: var(--accent-gold); background: var(--accent-gold); color: #1a1205; }
.nd-del { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); font-size: 1.1rem; cursor: pointer; }
.nd-del svg { width: 18px; height: 18px; fill: currentColor; vertical-align: middle; }
.nd-del:hover { background: var(--bg-tertiary); }
.nd-date { flex: none; width: 50px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg-tertiary); }
.nd-date b { font-size: 1.25rem; line-height: 1; color: var(--accent-burgundy-text); }
[data-theme="dark"] .nd-date b { color: var(--accent-gold-text); }
.nd-date small { font-size: 0.66rem; font-weight: 700; color: var(--text-secondary); }
.nd-date.is-strong { border-color: var(--accent-gold); background: rgba(212, 175, 55, 0.12); }
.nd-fine { margin: 10px 0 0; font-size: 0.78rem; color: var(--text-secondary); }
.nd-form { padding: 20px; }
.nd-form h2 { font-size: 1.1rem; margin-bottom: 14px; }
.nd-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nd-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); }
.nd-field input { height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--border-color); background: var(--bg-primary); color: var(--text-primary); font: inherit; font-size: 1rem; font-weight: 500; }
.nd-field input:focus { outline: none; border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2); }
.nd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.nd-chip { cursor: pointer; font-family: inherit; }
.nd-msg { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(61, 143, 95, 0.12); color: #2d7a4d; font-size: 0.88rem; font-weight: 600; }
[data-theme="dark"] .nd-msg { color: #7fd0a0; }
.nd-results { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.nd-results:empty { display: none; }
.nd-hint { margin: 0 0 4px; font-size: 0.86rem; color: var(--text-secondary); }
.nd-opt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border-color); background: var(--bg-secondary); }
.nd-opt.is-folk { border-color: var(--accent-gold); }
.nd-opt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nd-opt-t a { font-family: 'Noto Serif Georgian', serif; font-size: 0.92rem; line-height: 1.45; color: var(--text-primary); text-decoration: none; }
.nd-opt-t a:hover { text-decoration: underline; }
.nd-opt-t small { font-size: 0.74rem; color: var(--text-secondary); }
.nd-opt-t small a { font-family: inherit; font-size: inherit; color: var(--accent-burgundy-text); }
[data-theme="dark"] .nd-opt-t small a { color: var(--accent-gold-text); }
.nd-folk { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; color: var(--accent-gold-text); }
.nd-add { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--accent-gold); background: rgba(212, 175, 55, 0.1); color: var(--accent-gold-text); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.nd-add:hover { background: var(--accent-gold); color: #1a1205; }
.nd-more { align-self: flex-start; padding: 8px 14px; border-radius: 999px; border: 1px dashed var(--border-color); background: transparent; color: var(--text-secondary); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
@media (max-width: 640px) { .nd-fields { grid-template-columns: minmax(0, 1fr); } }

/* The picture viewer */
.lx-lb { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(8, 6, 10, 0.92); }
.lx-lb[hidden] { display: none; }
.lx-lb figure { margin: 0; max-width: min(92vw, 1100px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lx-lb img { max-width: 100%; max-height: 80vh; min-height: min(62vh, 560px); width: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lx-lb figcaption { max-width: 70ch; text-align: center; color: rgba(255, 255, 255, 0.85); font-size: 0.86rem; line-height: 1.5; }
.lx-lb figcaption small { display: block; color: rgba(255, 255, 255, 0.55); font-size: 0.76rem; }
.lx-lb button { position: absolute; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lx-lb button:hover { background: rgba(255, 255, 255, 0.24); }
.lx-lb-x { top: 18px; right: 18px; }
.lx-lb-p { left: 18px; top: 50%; transform: translateY(-50%); }
.lx-lb-n { right: 18px; top: 50%; transform: translateY(-50%); }
.lx-lb button[hidden] { display: none; }
@media (max-width: 640px) { .lx-lb-p, .lx-lb-n { top: auto; bottom: 18px; transform: none; } }
@media (max-width: 600px) {
    .sx-feast { flex-wrap: wrap; }
    .sx-feast > a:not(.sx-feast-cal), .sx-feast > span:not(.sx-feast-next) { flex-basis: 100%; }
    .sx-feast-cal { margin-left: 76px; }
}

