/* Văn khấn page (van-khan.html). Brand tokens come from css/colors.css. */
.vk-page {
    background: var(--brand-cream, #fff9e6);
    color: var(--brand-ink, #4b241d);
    padding-bottom: 3rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.vk-hero {
    background: var(--hero-paper, #fff8ed);
    border-block: 1px solid var(--hero-rule, #d6b56f);
    padding: clamp(1.4rem, 4vw, 2.4rem) 1rem clamp(1.2rem, 3vw, 1.8rem);
    text-align: center;
    color: var(--hero-ink, #7b1e25);
}

.vk-breadcrumb {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--hero-muted, #645047);
    margin-bottom: 0.4rem;
}

.vk-breadcrumb a {
    color: inherit;
}

.vk-hero h1 {
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.5rem;
    color: var(--hero-ink, #7b1e25);
}

.vk-lead {
    max-width: 640px;
    margin: 0 auto;
    color: var(--hero-muted, #645047);
    font-size: 1rem;
    line-height: 1.6;
}

.vk-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 1.2rem 1rem 0;
}

.vk-today {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.4rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--brand-border, rgba(185, 28, 28, 0.16));
    line-height: 1.5;
}

.vk-today svg {
    flex: none;
    width: 22px;
    height: 22px;
    color: var(--brand-red, #b91c1c);
}

.vk-today p {
    margin: 0;
}

.vk-today a {
    color: var(--brand-red, #b91c1c);
    font-weight: 700;
}

.vk-today.is-highlight {
    background: #fff3d6;
    border-color: var(--hero-rule, #d6b56f);
}

.vk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 1rem 0 0;
}

.vk-search {
    flex: 1 1 260px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.85rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--brand-border, rgba(185, 28, 28, 0.16));
}

.vk-search svg {
    width: 18px;
    height: 18px;
    color: var(--brand-muted, #805b50);
    flex: none;
}

.vk-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0.6rem 0;
    font: inherit;
    font-size: 16px;
    color: inherit;
    outline: none;
}

.vk-search:focus-within {
    border-color: var(--brand-red, #b91c1c);
}

.vk-chips,
.vk-size {
    display: flex;
    gap: 0.4rem;
}

.vk-chip,
.vk-size-btn {
    border: 1px solid var(--brand-border, rgba(185, 28, 28, 0.16));
    background: #fff;
    color: var(--brand-ink, #4b241d);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

.vk-chip.is-active {
    background: var(--brand-red, #b91c1c);
    border-color: var(--brand-red, #b91c1c);
    color: #fff;
}

.vk-size-btn {
    min-width: 2.6rem;
    padding-inline: 0.6rem;
}

.vk-size-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.vk-note {
    margin: 1rem 0;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    background: #fff;
    border-left: 4px solid var(--hero-rule, #d6b56f);
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--brand-muted, #805b50);
}

.vk-blank {
    display: inline-block;
    min-width: 2.2em;
    border-bottom: 1px dashed var(--brand-red, #b91c1c);
    color: var(--brand-red, #b91c1c);
    text-align: center;
    line-height: 1.1;
}

.vk-toc {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
    margin: 0 0 1.4rem;
}

.vk-toc-group {
    background: #fff;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    border: 1px solid var(--brand-border, rgba(185, 28, 28, 0.16));
}

.vk-toc-group h2 {
    margin: 0 0 0.4rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand-muted, #805b50);
}

.vk-toc-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vk-toc-group li + li {
    margin-top: 0.3rem;
}

.vk-toc-group a {
    color: var(--brand-red-deep, #8b0000);
    font-weight: 700;
    text-decoration: none;
    line-height: 1.4;
}

.vk-toc-group a:hover,
.vk-toc-group a:focus-visible {
    text-decoration: underline;
}

.vk-list {
    --vk-text-size: 18px;
    display: grid;
    gap: 1.2rem;
}

.vk-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--brand-border, rgba(185, 28, 28, 0.16));
    box-shadow: var(--brand-shadow, 0 16px 42px rgba(124, 45, 18, 0.11));
    padding: clamp(1rem, 3vw, 1.6rem);
    scroll-margin-top: 5.5rem;
}

.vk-card:target {
    border-color: var(--hero-rule, #d6b56f);
    box-shadow: 0 0 0 3px rgba(214, 181, 111, 0.45), var(--brand-shadow, 0 16px 42px rgba(124, 45, 18, 0.11));
}

.vk-group-label {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: #fdecec;
    color: var(--brand-red, #b91c1c);
    font-size: 0.78rem;
    font-weight: 800;
}

.vk-card-head h2 {
    margin: 0.45rem 0 0.3rem;
    font-size: clamp(1.2rem, 2.6vw, 1.5rem);
    line-height: 1.3;
    color: var(--hero-ink, #7b1e25);
}

.vk-summary {
    margin: 0;
    color: var(--brand-muted, #805b50);
    line-height: 1.55;
}

.vk-offerings {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--hero-paper, #fff8ed);
}

.vk-offerings h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    color: var(--brand-ink, #4b241d);
}

.vk-offerings ul {
    margin: 0;
    padding-left: 1.2rem;
    columns: 2 220px;
    column-gap: 1.5rem;
    line-height: 1.6;
}

.vk-text {
    margin-top: 1.1rem;
    font-family: 'Noto Serif', Georgia, 'Times New Roman', serif;
    font-size: var(--vk-text-size, 18px);
    line-height: 1.75;
    color: #2f1a15;
}

.vk-text p {
    margin: 0 0 0.7em;
}

.vk-source {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--brand-muted, #805b50);
}

.vk-actions,
.vk-app-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.vk-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--brand-border, rgba(185, 28, 28, 0.16));
    background: #fff;
    color: var(--brand-red-deep, #8b0000);
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
}

.vk-btn svg {
    width: 16px;
    height: 16px;
}

.vk-btn:hover {
    background: #fff3d6;
}

.vk-btn-primary {
    background: var(--brand-red, #b91c1c);
    border-color: var(--brand-red, #b91c1c);
    color: #fff;
}

.vk-btn-primary:hover {
    background: var(--brand-red-deep, #8b0000);
}

.vk-btn-quiet {
    border-color: transparent;
    background: transparent;
}

.vk-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--brand-muted, #805b50);
}

.vk-app {
    margin: 2rem 0 0;
    padding: 1.2rem;
    border-radius: 18px;
    background: var(--hero-paper, #fff8ed);
    border: 1px solid var(--hero-rule, #d6b56f);
    text-align: center;
}

.vk-app h2 {
    margin: 0 0 0.4rem;
    font-size: 1.2rem;
    color: var(--hero-ink, #7b1e25);
}

.vk-app p {
    margin: 0;
    color: var(--brand-muted, #805b50);
}

.vk-app-actions {
    justify-content: center;
}

.vk-article {
    margin-top: 2rem;
    line-height: 1.7;
}

.vk-article h2 {
    font-size: 1.3rem;
    color: var(--hero-ink, #7b1e25);
    margin: 1.6rem 0 0.5rem;
}

.vk-article h3 {
    font-size: 1.05rem;
    margin: 1.1rem 0 0.3rem;
}

.vk-article a {
    color: var(--brand-red, #b91c1c);
}

.vk-toast {
    position: fixed;
    left: 50%;
    bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 50;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    background: #2f1a15;
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    .vk-toolbar {
        gap: 0.5rem;
    }
    .vk-search {
        flex-basis: 100%;
    }
    .vk-chips {
        flex: 1 1 0;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .vk-chips,
    .vk-size {
        gap: 0.3rem;
    }
    .vk-chip {
        padding-inline: 0.6rem;
    }
    .vk-size-btn {
        min-width: 2.3rem;
        padding-inline: 0.4rem;
    }
    .vk-chip {
        white-space: nowrap;
    }
}

@media print {
    .vk-toolbar,
    .vk-today,
    .vk-actions,
    .vk-app,
    .vk-toc,
    #header-container,
    #footer-container {
        display: none !important;
    }
    .vk-card {
        box-shadow: none;
        break-inside: avoid-page;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
