/*
 * Festivitas components: only what Bootstrap does not have. Everything is prefixed fv- (Bootstrap owns fs-).
 * The F mark and fleur-de-lis are CSS masks with inline SVG, so they take the current text color and still work
 * when static files are served from another origin.
 */
:root {
    --fv-mark-f: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='100 88 426 426'%3E%3Cpath d='M189.3,166.3C210.5,131.5 240.7,108.7 279.7,98.4C293.9,94.6 308.5,92.6 323.4,93C338.3,93.4 353.4,92.7 368.2,94.3C381.8,95.8 395.2,99.5 408.6,102.8C427.3,107.3 444.4,115.9 460.2,126.7C465.7,130.5 470.5,135.4 475.9,139.3C488.8,148.4 496.7,161.5 504.7,174.4C510.9,184.6 515.7,195.6 521.5,207.1C512.8,210.4 505.2,212.8 498.2,216.2C492.6,218.9 488.8,217.2 484.2,214C474.8,207.3 465.4,200.5 455.2,195.4C442.7,189 429.4,190.9 417.9,198.3C408.1,204.6 403.1,214.9 401.1,226.3C399.9,233.5 399.1,240.8 399.1,248.1C399.1,261.5 398.3,274.9 399.9,288.3C400.4,292.6 402.6,293 405.8,293C420,293 434.1,293 448.3,293C456.1,293 456,292.1 456.6,300.2C457.9,319 458.6,337.9 456.1,356.7C455.7,360.3 454.2,361.1 451,361C437.1,360.9 423,361.2 409.1,360.9C404.1,360.8 402.8,362.5 402.9,367.2C403.5,383 403.5,398.8 404,414.6C404.5,429 405.4,443.4 406,457.8C406.7,473.5 407.4,489.3 408,505C408,506.1 407.8,507.3 407.6,509.1C325.3,509.1 243.1,509.1 160.3,509.1C160.2,506.9 160,505.2 160,503.4C160,461.6 160,419.8 160,377.9C160,376.3 160.2,374.6 160.5,373C162.4,364.4 159.8,361.1 150.8,361C139,360.9 127.1,361 115.3,361C105.5,360.9 107.3,361.9 106.3,352.7C104.9,340 105.2,327.1 105.1,314.3C105.1,308.6 106,302.8 106.3,297C106.5,293.8 107.9,292.9 111,292.9C124.8,293.1 138.7,293 152.5,293C161,293 161,293 161,284.7C160.9,261.5 163.2,238.5 169,216C173.5,198.6 180,182.1 189.3,166.3 z'/%3E%3C/svg%3E");
    --fv-mark-fleur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='289 560 58 68'%3E%3Cpath d='M328.2,608.4C329.9,610.9 331.4,613.1 333.2,615.6C328.4,618.6 323.9,621.6 319.2,624.2C318.1,624.8 315.9,624.7 314.7,624C311.4,621.7 308.5,618.9 305.1,616.6C302.8,615.1 302.8,614.1 304.4,612C306,609.9 307.5,607.6 308.2,605.1C308.8,603 308.2,600.5 308.1,598.1C307.4,598 306.7,597.9 306.1,597.8C305,600 303.9,602.2 302.8,604.4C295.4,603.6 292.9,601.2 293,595C293.1,589.1 296.8,585.2 303.4,585.1C307.3,585 308.2,583.3 308,579.8C307.9,577.4 307.8,574.8 308.1,572.4C308.7,568.1 313.8,563.3 317.4,563.1C320.8,563 325.8,567 327.1,571.2C327.6,572.7 328.1,574.4 327.9,576C327.1,581.7 329,585 335,586C339.6,586.7 342.5,589.8 343,594.3C343.3,596.2 342.7,598.9 341.4,600.1C336.8,604.3 335,603.8 331.4,598.2C326.1,600.1 326.6,603.9 328.2,608.4 z'/%3E%3C/svg%3E");
}

/* ---------- Brand marks and ornaments ---------- */
.fv-mark {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: none;
    background-color: currentColor;
    -webkit-mask: var(--fv-mark-f) center / contain no-repeat;
    mask: var(--fv-mark-f) center / contain no-repeat;
}
.fv-mark--fleur {
    width: .85em;
    -webkit-mask-image: var(--fv-mark-fleur);
    mask-image: var(--fv-mark-fleur);
}

/* Fleur-de-lis between two hairlines */
.fv-ornament {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--fv-gold-ui);
    margin-block: 2rem;
}
.fv-ornament::before,
.fv-ornament::after { content: ""; flex: 1; height: 1px; background: var(--fv-line); }
.fv-ornament .fv-mark { font-size: 1.4rem; }

/* Ceremonial double-rule frame */
.fv-frame {
    border: 3px double var(--fv-gold-ui);
    border-radius: 4px;
    background: color-mix(in srgb, var(--fv-gold) 5%, var(--fv-surface));
    padding: 1.5rem 1.25rem;
}

/* Faint seal behind empty states, login and error pages */
.fv-watermark { position: relative; isolation: isolate; overflow: clip; }
.fv-watermark::before {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(280px, 70%);
    aspect-ratio: 632 / 628;
    translate: -50% -50%;
    z-index: -1;
    background: url("../images/festivitas.270f4dddb6b2.svg") center / contain no-repeat;
    opacity: var(--fv-watermark);
    pointer-events: none;
}

/* ---------- Page header ---------- */
.fv-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-block: 1.75rem 1.5rem;
}
.fv-page-header__text { display: grid; gap: .35rem; min-width: 0; }
.fv-page-header h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 700; margin: 0; }
.fv-page-header .fv-lede { color: var(--fv-muted); max-width: 60ch; margin: 0; }
.fv-page-header__actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ---------- Date seal ---------- */
.fv-date-seal {
    width: 62px;
    flex: none;
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 7px 0 8px;
    border: 3px double var(--fv-link);
    border-radius: 4px;
    background: var(--fv-surface);
    text-align: center;
    line-height: 1;
}
.fv-date-seal__day { font: 700 1.7rem/1 var(--fv-font-display); color: var(--fv-link); font-variant-numeric: lining-nums; }
.fv-date-seal__month { font: 700 .66rem/1 var(--fv-font-caps); letter-spacing: .16em; text-transform: uppercase; color: var(--fv-ink); }
.fv-date-seal__weekday { font-size: .62rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--fv-muted); }
.fv-date-seal--sm { width: 50px; padding: 5px 0 6px; }
.fv-date-seal--sm .fv-date-seal__day { font-size: 1.3rem; }

/* ---------- Event card and list rows ---------- */
.fv-event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--fv-surface);
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius-panel);
    box-shadow: var(--fv-shadow);
    min-width: 0;
    transition: border-color var(--fv-duration) var(--fv-ease);
}
.fv-event-card:hover { border-color: var(--fv-link); }
.fv-event-card__image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.fv-event-card__content { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 1rem; padding: 1.1rem; }
.fv-event-card__body { display: grid; gap: .5rem; align-content: start; min-width: 0; }
.fv-event-card__title { margin: 0; font-size: 1.25rem; }
.fv-event-card__title a { color: var(--fv-ink); text-decoration: none; }
.fv-event-card:hover .fv-event-card__title a { color: var(--fv-link); }
.fv-event-card--past { box-shadow: none; }
.fv-event-card--past .fv-date-seal { border-color: var(--fv-line-strong); }
.fv-event-card--past .fv-date-seal__day { color: var(--fv-muted); }

.fv-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .9rem; color: var(--fv-muted); }
.fv-facts li { display: flex; gap: .5rem; align-items: center; }
.fv-facts .ph { color: var(--fv-link); font-size: 1.1rem; }

.fv-list-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .9rem;
    align-items: center;
    padding: .75rem .25rem;
    border-bottom: 1px solid var(--fv-line);
    position: relative;
}
.fv-list-row:last-child { border-bottom: 0; }
.fv-list-row__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--fv-subtle);
    color: var(--fv-subtle-ink);
    font-size: 1.15rem;
}
.fv-list-row__title { font: 600 1rem/1.3 var(--fv-font-ui); margin: 0; }
.fv-list-row__meta, .fv-list-row time { color: var(--fv-muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }

/* ---------- Chips ---------- */
.fv-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.fv-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 36px;
    padding: 0 .9rem;
    border-radius: var(--fv-radius-pill);
    border: 1px solid var(--fv-line-strong);
    background: var(--fv-surface);
    color: var(--fv-ink);
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
}
.fv-chip:hover { background: var(--fv-raised); color: var(--fv-ink); text-decoration: none; }
.fv-chip.active,
.fv-chip[aria-current="true"],
.fv-chip[aria-pressed="true"] { background: var(--fv-primary); border-color: var(--fv-primary); color: var(--fv-on-primary); }

/* ---------- FestiCoin ---------- */
.fv-coin {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem .65rem .2rem .22rem;
    border-radius: var(--fv-radius-pill);
    border: 1px solid color-mix(in srgb, var(--fv-gold) 55%, transparent);
    background: color-mix(in srgb, var(--fv-gold) 14%, var(--fv-surface));
    color: var(--fv-ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    white-space: nowrap;
    vertical-align: middle;
}
.fv-coin__disc {
    width: 1.35em;
    height: 1.35em;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--fv-gold);
    color: var(--fv-on-gold);
}
.fv-coin__disc img { display: block; width: 100%; height: 100%; object-fit: contain; }
.fv-coin.is-negative {
    border-color: color-mix(in srgb, var(--fv-danger) 45%, transparent);
    background: var(--fv-danger-bg);
    color: var(--fv-danger);
}
.fv-coin.is-negative .fv-coin__disc { background: var(--fv-danger); color: var(--fv-danger-bg); }
/* On the navy top bar */
.fv-coin--on-dark {
    border-color: color-mix(in srgb, var(--fv-or-400) 70%, transparent);
    background: rgb(255 255 255 / .1);
    color: var(--fv-topbar-ink);
}
.fv-coin--on-dark .fv-coin__disc { background: var(--fv-or-400); color: var(--fv-azure-950); }
.fv-coin--lg { font-size: 1.25rem; padding: .3rem .9rem .3rem .3rem; }
.fv-coin--xl { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); padding: .3rem 1.1rem .3rem .35rem; font-family: var(--fv-font-display); }

/* ---------- Members ---------- */
.fv-member-rank { display: block; width: 40px; height: 40px; flex: none; object-fit: contain; }
.fv-member-rank--sm { width: 28px; height: 28px; }
.fv-member-rank--xl { width: 64px; height: 64px; }

.fv-rank {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .55rem;
    border-radius: 4px;
    border: 1px solid var(--fv-gold-ui);
    background: color-mix(in srgb, var(--fv-gold) 10%, var(--fv-surface));
    color: var(--fv-gold-text);
    font: 700 .7rem/1 var(--fv-font-caps);
    letter-spacing: .14em;
    text-transform: uppercase;
}
.fv-medal {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 1.5px solid var(--fv-gold-ui);
    background: color-mix(in srgb, var(--fv-gold) 12%, var(--fv-surface));
    color: var(--fv-gold-text);
    overflow: hidden;
}
.fv-medal img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }

/* ---------- Empty state ---------- */
.fv-empty {
    display: grid;
    justify-items: center;
    gap: .6rem;
    padding: 2.5rem 1rem;
    text-align: center;
    border: 1px dashed var(--fv-line-strong);
    border-radius: var(--fv-radius-panel);
}
.fv-empty__title { margin: 0; font: 650 1.25rem/1.3 var(--fv-font-display); }
.fv-empty__text { color: var(--fv-muted); max-width: 40ch; margin: 0; }
.fv-empty > .ph { font-size: 2.5rem; color: var(--fv-link); }
.fv-empty--compact { padding: 1.25rem 1rem; gap: .35rem; border-style: dashed; }
.fv-empty--compact > .ph { font-size: 1.6rem; }
.fv-empty--compact .fv-empty__title { font-size: 1.05rem; }
.fv-empty--compact .fv-empty__text { font-size: .875rem; }

/* ---------- Stat tiles ---------- */
.fv-stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.fv-stat {
    display: grid;
    gap: .35rem;
    padding: .9rem;
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius-panel);
    background: var(--fv-raised);
    min-width: 0;
}
.fv-stat__value { font: 650 clamp(1.4rem, 1rem + 1.2vw, 1.9rem)/1 var(--fv-font-display); font-variant-numeric: lining-nums tabular-nums; }
.fv-stat__note { font-size: .78rem; color: var(--fv-muted); }

/* ---------- Small shared controls ---------- */
.fv-section-title { font-size: 1.4rem; margin: 0 0 1rem; }

/* Search field with a leading icon */
.fv-search { position: relative; min-width: min(100%, 240px); flex: 1 1 240px; }
.fv-search .ph { position: absolute; left: .8rem; top: 50%; translate: 0 -50%; color: var(--fv-muted); pointer-events: none; }
.fv-search .form-control { padding-left: 2.3rem; }
.fv-search-note { color: var(--fv-muted); font-size: .9rem; margin: -.75rem 0 1.25rem; }

/* Two or three options side by side (Kort / Lista) */
.fv-segmented {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius-pill);
    background: var(--fv-surface);
}
.fv-segmented a,
.fv-segmented button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 34px;
    padding: 0 .85rem;
    border: 0;
    border-radius: var(--fv-radius-pill);
    background: none;
    color: var(--fv-muted);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
}
.fv-segmented a:hover,
.fv-segmented button:hover { color: var(--fv-ink); text-decoration: none; }
.fv-segmented [aria-current="true"],
.fv-segmented [aria-pressed="true"],
.fv-segmented .active { background: var(--fv-primary); color: var(--fv-on-primary); }

/* A chip row that scrolls sideways on phones instead of wrapping */
@media (max-width: 767.98px) {
    .fv-chips--scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -.5);
        padding: 0 calc(var(--bs-gutter-x, 1.5rem) * .5) .25rem;
        scrollbar-width: none;
    }
    .fv-chips--scroll::-webkit-scrollbar { display: none; }
}

/* Label / value pairs */
.fv-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem 1rem; margin: 0; font-size: .925rem; }
.fv-dl dt { color: var(--fv-muted); font-weight: 500; }
.fv-dl dd { margin: 0; overflow-wrap: anywhere; }

/* Anchors under the sticky top bar */
.fv-anchor { scroll-margin-top: 84px; }

/* A bar pinned above the tab bar on phones, for the page's main action */
.fv-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    background: color-mix(in srgb, var(--fv-surface) 94%, transparent);
    border-top: 1px solid var(--fv-line);
    backdrop-filter: blur(8px);
    box-shadow: 0 -4px 16px rgb(6 23 43 / .08);
}
.fv-sticky-cta__text { display: grid; min-width: 0; line-height: 1.25; }
.fv-sticky-cta__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--fv-font-display); }
.fv-sticky-cta__text span { color: var(--fv-muted); font-size: .8rem; }
.fv-sticky-cta .btn { margin-left: auto; flex: none; }
body:has(.fv-sticky-cta) .fv-main { padding-bottom: 5.5rem; }
@media (min-width: 992px) { body:has(.fv-sticky-cta) .fv-main { padding-bottom: 2.5rem; } }
body:has(.fv-sticky-cta) .fv-toasts { bottom: calc(136px + env(safe-area-inset-bottom, 0px)); }

/* Narrow reading column (guest pages, forms) */
.container.fv-narrow { max-width: 760px; }
.container.fv-narrow--sm { max-width: 440px; }

/* Top bar without navigation, for pages reached without an account */
.fv-topbar--simple { position: static; }
.fv-topbar__tag { margin-left: auto; color: var(--fv-topbar-dim); font: 600 .72rem/1 var(--fv-font-caps); letter-spacing: .16em; text-transform: uppercase; }

/* Navigation tiles: icon, title and one line of help */
.fv-tiles { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.fv-tile {
    display: grid;
    gap: .2rem;
    padding: 1rem;
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius-panel);
    background: var(--fv-surface);
    color: var(--fv-ink);
    text-decoration: none;
    transition: border-color var(--fv-duration) var(--fv-ease);
}
.fv-tile:hover { border-color: var(--fv-link); color: var(--fv-ink); text-decoration: none; }
.fv-tile > .ph { font-size: 1.5rem; color: var(--fv-link); margin-bottom: .3rem; }
.fv-tile__title { font-weight: 600; }
.fv-tile__text { color: var(--fv-muted); font-size: .85rem; }

/* A plain list with check marks */
.fv-checklist { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.fv-checklist li { position: relative; padding-left: 1.6rem; }
.fv-checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .35em;
    width: 1rem;
    height: 1rem;
    background: var(--fv-success);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='none' stroke='black' stroke-width='28' stroke-linecap='round' stroke-linejoin='round' d='M40 144l56 56L216 80'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='none' stroke='black' stroke-width='28' stroke-linecap='round' stroke-linejoin='round' d='M40 144l56 56L216 80'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Articles (news, static pages) ---------- */
.fv-byline { display: flex; align-items: center; gap: .5rem; color: var(--fv-muted); font-size: .875rem; }
.fv-article-list { display: grid; gap: 1rem; }
.fv-article-teaser {
    padding: 1.25rem;
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius-panel);
    background: var(--fv-surface);
}
.fv-article-teaser .fv-eyebrow { margin: 0 0 .35rem; }
.fv-article-teaser__title { margin: 0 0 .6rem; font-size: 1.45rem; }
.fv-article-teaser__title a { color: var(--fv-ink); text-decoration: none; }
.fv-article-teaser__title a:hover { color: var(--fv-link); text-decoration: underline; }
.fv-article-teaser__excerpt { margin-top: .75rem; color: var(--fv-muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.fv-article-teaser__excerpt img { display: none; }
.fv-article-teaser__actions { display: flex; gap: 1rem; margin-top: .75rem; font-weight: 600; font-size: .9rem; }
.fv-article-teaser__actions a { text-decoration: none; }

.fv-article { padding-top: 1.5rem; padding-bottom: 1rem; }
.fv-article__header { display: grid; gap: .4rem; margin-bottom: 1.75rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--fv-line); }
.fv-article__header h1 { margin: 0 0 .35rem; font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem); font-weight: 700; }
.fv-article__header .fv-eyebrow { margin: 0; }
.fv-article__back { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: .75rem; font-size: .875rem; font-weight: 600; text-decoration: none; }
.fv-article__body { font-size: 1.0625rem; }
.fv-article__footer { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--fv-line); }

/* ---------- Comments (recipes, tastings) ---------- */
.fv-comments { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--fv-line); }
.fv-comment-form { display: grid; gap: .5rem; margin-bottom: 1.5rem; }
.fv-comment-form textarea { min-height: 80px; }
.fv-comment-form .btn { justify-self: start; }
.fv-comment { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: start; padding: .9rem 0; border-bottom: 1px solid var(--fv-line); }
.fv-comment:last-child { border-bottom: 0; }
.fv-comment__meta { display: flex; flex-wrap: wrap; gap: .25rem .6rem; margin: 0 0 .2rem; font-size: .875rem; }
.fv-comment__meta span { color: var(--fv-muted); }

/* ---------- Media cards (tastings, albums): image on top, whole card is the link ---------- */
.fv-media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.fv-media-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius-panel);
    background: var(--fv-surface);
    box-shadow: var(--fv-shadow-sm);
    transition: border-color var(--fv-duration) var(--fv-ease);
}
.fv-media-card:hover { border-color: var(--fv-link); }
/* The wrapper reserves the photo space; intrinsic image dimensions must not size the grid/flex card. */
.fv-media-card__media { position: relative; flex: none; width: 100%; overflow: hidden; aspect-ratio: 16 / 9; max-height: 180px; display: grid; place-items: center; background: var(--fv-raised); color: var(--fv-line-strong); font-size: 2.5rem; }
.fv-media-card__media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.fv-media-card__body { display: grid; gap: .4rem; padding: 1rem; }
.fv-media-card__title { margin: 0; font-size: 1.2rem; }
.fv-media-card__title a { color: var(--fv-ink); text-decoration: none; }
.fv-media-card:hover .fv-media-card__title a { color: var(--fv-link); }
.fv-media-card__text { margin: 0; color: var(--fv-muted); font-size: .9rem; }
.fv-media-card__meta { margin: 0; color: var(--fv-muted); font-size: .8125rem; }

.fv-banner { display: block; width: 100%; height: clamp(140px, 24vw, 240px); object-fit: cover; margin-top: 1.5rem; border-radius: var(--fv-radius-panel); box-shadow: var(--fv-shadow); }
.fv-page-header .fv-eyebrow a { color: inherit; text-decoration: none; }
.fv-page-header .fv-eyebrow a:hover { color: var(--fv-link); }
.fv-lede-block { max-width: 70ch; color: var(--fv-muted); }

/* ---------- Delete confirmation (core/_confirm_delete.html) ---------- */
.fv-confirm {
    max-width: 560px;
    margin: 3rem auto;
    padding: 2rem 1.5rem 1.5rem;
    display: grid;
    justify-items: center;
    gap: .5rem;
    text-align: center;
    background: var(--fv-surface);
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius-panel);
    box-shadow: var(--fv-shadow);
    min-width: 0;
}
.fv-confirm__icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--fv-danger-bg);
    color: var(--fv-danger);
    font-size: 1.6rem;
}
.fv-confirm__title { margin: .5rem 0 0; font-size: 1.6rem; font-weight: 700; }
.fv-confirm__name { margin: 0; font: italic 600 1.15rem/1.35 var(--fv-font-display); color: var(--fv-ink); }
.fv-confirm__name::before { content: "“"; }
.fv-confirm__name::after { content: "”"; }
.fv-confirm__text { margin: .25rem 0 0; color: var(--fv-muted); max-width: 44ch; }
.fv-confirm__details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .25rem 1rem;
    margin: .75rem 0 0;
    padding: .75rem 1rem;
    border-radius: var(--fv-radius-control);
    background: var(--fv-raised);
    text-align: left;
    font-size: .9rem;
    width: 100%;
    min-width: 0;
}
.fv-confirm__details dd { min-width: 0; overflow-wrap: anywhere; }
.fv-confirm__details dt { color: var(--fv-muted); font-weight: 500; }
.fv-confirm__details dd { margin: 0; }
.fv-confirm__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1rem; }
@media (max-width: 575.98px) {
    .fv-confirm { margin: 1.5rem auto; }
    .fv-confirm__actions { flex-direction: column-reverse; width: 100%; }
    .fv-confirm__actions .btn { width: 100%; }
}

/* ---------- Pagination (core/_pagination.html) ---------- */
.fv-pagination { margin: 1.5rem 0; }
.fv-pagination .pagination { gap: .25rem; --bs-pagination-border-radius: var(--fv-radius-control); }
.fv-pagination .page-link { min-width: 40px; min-height: 40px; display: grid; place-items: center; border-radius: var(--fv-radius-control) !important; }

/* ---------- Tables that become stacked rows on phones (.fv-table-stack, cells need data-label) ---------- */
@media (max-width: 767.98px) {
    .fv-table-stack thead { display: none; }
    .fv-table-stack,
    .fv-table-stack tbody,
    .fv-table-stack tr,
    .fv-table-stack td { display: block; width: 100%; }
    .fv-table-stack tr {
        padding: .65rem .9rem;
        border-bottom: 1px solid var(--fv-line);
    }
    .fv-table-stack.table > :not(caption) > * > * {
        padding: .2rem 0;
        border: 0;
        box-shadow: none;
        background: transparent;
        text-align: left !important;
    }
    .fv-table-stack td[data-label] { display: flex; justify-content: space-between; gap: 1rem; }
    .fv-table-stack td[data-label]::before {
        content: attr(data-label);
        flex: none;
        color: var(--fv-muted);
        font-size: .8rem;
        font-weight: 500;
    }
    .fv-table-stack td[data-label] > * { text-align: right; }
    .fv-table-stack td.fv-table-stack__empty { display: block; text-align: center !important; }
}

/* ---------- Login and password reset ---------- */
.fv-auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 1.5rem;
    padding: 2rem 1rem;
    margin: 0 !important;
    overflow: hidden;
    background:
        radial-gradient(60rem 40rem at 50% -10%, var(--fv-subtle), transparent 70%),
        var(--fv-bg);
    color: var(--fv-ink);
}
body:has(.fv-auth) { background-color: var(--fv-bg); }
.fv-auth__panel {
    width: min(420px, calc(100vw - 2rem));
    padding: 2rem 1.75rem 1.75rem;
    background: color-mix(in srgb, var(--fv-surface) 92%, transparent);
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius-panel);
    box-shadow: var(--fv-shadow-lg);
    backdrop-filter: blur(6px);
}
.fv-auth__seal {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin: -4rem auto 1rem;
    border-radius: 50%;
    border: 3px double var(--fv-gold-ui);
    background: var(--fv-surface);
    color: var(--fv-azure-600);
    font-size: 2.6rem;
    box-shadow: var(--fv-shadow);
}
.fv-auth__seal:hover { color: var(--fv-azure-700); }
/* Login motion (members/js/login.js): the panel rises in, the medallion breathes, a wrong password shakes the panel */
.fv-auth__panel { animation: fv-auth-rise .7s cubic-bezier(.22, 1, .36, 1) both; }
.fv-auth__panel.is-rejected { animation: fv-auth-shake .5s cubic-bezier(.36, .07, .19, .97) both; }
.fv-auth__seal { animation: fv-auth-breathe 4.5s ease-in-out 1s infinite; }
@keyframes fv-auth-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fv-auth-breathe {
    50% { box-shadow: var(--fv-shadow), 0 0 0 6px rgb(216 178 90 / .07), 0 0 34px rgb(216 178 90 / .22); }
}
@keyframes fv-auth-shake {
    15% { transform: translateX(-8px); }
    30% { transform: translateX(7px); }
    45% { transform: translateX(-5px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-1px); }
}
.fv-auth__title { font-size: 1.75rem; font-weight: 700; text-align: center; margin: .25rem 0 1.25rem; }

/* ---------- App shell: top bar ---------- */
.fv-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--fv-topbar);
    color: var(--fv-topbar-ink);
    border-bottom: 2px solid color-mix(in srgb, var(--fv-or-400) 55%, transparent);
}
.fv-topbar__inner { display: flex; align-items: center; gap: 1.75rem; min-height: 60px; }
.fv-topbar :focus-visible,
.fv-footer :focus-visible { outline-color: var(--fv-or-400); }

.fv-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--fv-topbar-ink);
    font-size: 1.6rem;
    text-decoration: none;
}
.fv-brand:hover { color: var(--fv-or-400); text-decoration: none; }

.fv-topnav { align-self: stretch; gap: .25rem; }
.fv-topnav .dropdown { display: flex; }
.fv-topnav__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: 0 .8rem;
    border: 0;
    background: none;
    color: var(--fv-topbar-dim);
    font-weight: 500;
    text-decoration: none;
}
.fv-topnav__link:hover,
.fv-topnav__link[aria-expanded="true"] { color: var(--fv-topbar-ink); text-decoration: none; }
.fv-topnav__link[aria-current="page"],
.fv-topnav__link.is-active { color: var(--fv-topbar-ink); }
.fv-topnav__link[aria-current="page"]::after,
.fv-topnav__link.is-active::after {
    content: "";
    position: absolute;
    left: .8rem;
    right: .8rem;
    bottom: -2px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--fv-or-400);
}

.fv-topbar__end { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.fv-topbar__coin { text-decoration: none; border-radius: var(--fv-radius-pill); }
.fv-topbar__coin:hover { text-decoration: none; }
.fv-topbar__coin:hover .fv-coin { background: rgb(255 255 255 / .18); }
.fv-topbar__user {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: var(--fv-touch);
    padding: .25rem .5rem .25rem .3rem;
    border: 0;
    border-radius: var(--fv-radius-pill);
    background: none;
    color: var(--fv-topbar-ink);
    font-weight: 500;
}
.fv-topbar__user:hover,
.fv-topbar__user[aria-expanded="true"] { background: rgb(255 255 255 / .08); }
.fv-topbar__btn { color: var(--fv-topbar-ink); border: 1px solid rgb(255 255 255 / .4); }
.fv-topbar__btn:hover { color: var(--fv-topbar-ink); background: rgb(255 255 255 / .1); }
.fv-topbar__btn--quiet { border-color: transparent; }

/* Menus opened from the top bar */
.fv-menu .dropdown-item { display: flex; align-items: center; gap: .6rem; }
.fv-menu .dropdown-item .ph { color: var(--fv-muted); font-size: 1.1rem; }
.fv-menu .dropdown-item[aria-current="page"] { color: var(--fv-link); font-weight: 600; }
.fv-menu .dropdown-item[aria-current="page"] .ph { color: var(--fv-link); }
.fv-menu--user { min-width: 270px; }
.fv-menu__who { display: grid; justify-items: start; gap: .4rem; padding: .5rem .75rem .65rem; }
.fv-menu__theme { display: grid; gap: .45rem; padding: .4rem .75rem .5rem; }

/* Ljust / Midnatt / Auto */
.fv-theme-switch {
    display: flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius-pill);
    background: var(--fv-raised);
}
.fv-theme-switch button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 36px;
    padding: .45rem .6rem;
    border: 0;
    border-radius: var(--fv-radius-pill);
    background: none;
    color: var(--fv-muted);
    font-size: .8125rem;
    font-weight: 600;
    transition: background-color var(--fv-duration) var(--fv-ease), color var(--fv-duration) var(--fv-ease);
}
.fv-theme-switch button:hover { color: var(--fv-ink); }
.fv-theme-switch button[aria-pressed="true"] { background: var(--fv-primary); color: var(--fv-on-primary); }

.fv-main { padding-bottom: 2.5rem; }

/* ---------- App shell: mobile tab bar and "Mer" sheet ---------- */
.fv-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--fv-surface);
    border-top: 1px solid var(--fv-line);
    box-shadow: 0 -4px 16px rgb(6 23 43 / .06);
}
.fv-tabbar__item {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    min-height: 60px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--fv-muted);
    font-size: .7rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
}
.fv-tabbar__item .ph { font-size: 1.45rem; vertical-align: 0; }
.fv-tabbar__item:hover { color: var(--fv-ink); text-decoration: none; }
.fv-tabbar__item[aria-current="page"],
.fv-tabbar__item.is-active { color: var(--fv-link); font-weight: 700; }
.fv-tabbar__item[aria-current="page"]::before,
.fv-tabbar__item.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 26px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--fv-gold-ui);
}
@media (max-width: 991.98px) {
    body:has(.fv-tabbar) { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
}

.fv-sheet {
    --bs-offcanvas-height: auto;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.fv-sheet__handle { width: 40px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--fv-line-strong); }
.fv-sheet__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.fv-sheet__grid a {
    display: grid;
    justify-items: center;
    gap: .35rem;
    padding: .75rem .25rem;
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius-panel);
    background: var(--fv-raised);
    color: var(--fv-ink);
    font-size: .78rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
}
.fv-sheet__grid a .ph { font-size: 1.5rem; color: var(--fv-link); }
.fv-sheet__grid a[aria-current="page"] { border-color: var(--fv-link); background: var(--fv-subtle); }
.fv-sheet__list { list-style: none; margin: 0; padding: 0; }
.fv-sheet__list a { display: block; padding: .7rem .25rem; border-bottom: 1px solid var(--fv-line); color: var(--fv-ink); text-decoration: none; }

/* ---------- App shell: footer ---------- */
.fv-footer {
    margin-top: 2rem;
    padding: 3rem 0 1.5rem;
    background: var(--fv-topbar);
    color: var(--fv-topbar-ink);
    border-top: 2px solid color-mix(in srgb, var(--fv-or-400) 55%, transparent);
}
.fv-footer__grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 768px) { .fv-footer__grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.fv-footer__brand .fv-mark { font-size: 2.5rem; }
.fv-footer__name { margin: .75rem 0 .3rem; font: 700 .85rem/1.4 var(--fv-font-caps); letter-spacing: .18em; text-transform: uppercase; }
.fv-footer .fv-motto { margin: 0; font-size: 1.75rem; color: var(--fv-or-400); }
.fv-footer__tribute {
    display: grid;
    justify-items: center;
    gap: .15rem;
    border-color: var(--fv-or-400);
    background: rgb(255 255 255 / .04);
    color: inherit;
    text-align: center;
}
.fv-footer__tribute .fv-mark--fleur { font-size: 1.4rem; color: var(--fv-or-400); margin-bottom: .35rem; }
.fv-footer__tribute .fv-eyebrow { color: var(--fv-topbar-dim); }
.fv-footer__title { margin: 0; font: 650 1.35rem/1.25 var(--fv-font-display); }
.fv-footer__person { margin: .2rem 0 0; color: var(--fv-topbar-dim); font-family: var(--fv-font-display); font-style: italic; }
.fv-footer__links { display: flex; gap: 2.5rem; }
.fv-footer__links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.fv-footer__links a { color: var(--fv-topbar-dim); text-decoration: none; }
.fv-footer__links a:hover { color: var(--fv-topbar-ink); text-decoration: underline; }
.fv-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgb(255 255 255 / .12); }
.fv-footer__hawaii { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; color: var(--fv-topbar-dim); border-radius: var(--fv-radius-control); }
.fv-footer__hawaii:hover { color: var(--fv-topbar-ink); }
.fv-footer__copy {
    margin: 0;
    color: var(--fv-topbar-dim);
    font-size: .8rem;
    text-align: center;
}

/* ---------- Toasts (Django messages) ---------- */
.fv-toasts {
    position: fixed;
    z-index: 1090;
    right: 1.5rem;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    display: grid;
    gap: .6rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}
/* On phones: centered above the tab bar */
@media (max-width: 991.98px) {
    .fv-toasts { right: auto; left: 50%; translate: -50% 0; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
    body:has(.fv-tabbar) .fv-toasts { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}
.fv-toasts .toast { width: 100%; pointer-events: auto; }
.fv-toast__body { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: start; padding: .8rem .8rem .8rem .9rem; }
.fv-toast__icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 1.05rem; }
.fv-toast__icon .ph { vertical-align: 0; }
.fv-toast__text { padding-top: .2rem; font-size: .9375rem; }
.fv-toast--success .fv-toast__icon { background: var(--fv-success-bg); color: var(--fv-success); }
.fv-toast--danger .fv-toast__icon { background: var(--fv-danger-bg); color: var(--fv-danger); }
.fv-toast--warning .fv-toast__icon { background: var(--fv-warning-bg); color: var(--fv-warning); }
.fv-toast--info .fv-toast__icon { background: var(--fv-subtle); color: var(--fv-subtle-ink); }

/* Frapped takes over the whole screen; hide the shell there (its own CSS already hides nav and footer) */
body:has(.wrapped) :is(.fv-topbar, .fv-tabbar, .fv-sheet, .fv-toasts) { display: none !important; }

/* ---------- Old utility names still used by some templates ---------- */
.bg-noble-blue { background-color: var(--fv-topbar) !important; }
.bg-heraldic-white { background-color: var(--fv-argent-100) !important; }
.text-noble-blue { color: var(--fv-link) !important; }
.text-heraldic-white { color: var(--fv-argent-100) !important; }

/* ---------- Error pages (core/error_base.html), on the Midnight entrance layout ---------- */
.fv-error-panel {
    width: min(480px, calc(100vw - 2rem));
    padding: 2rem 1.75rem 1.75rem;
    text-align: center;
    background: color-mix(in srgb, var(--fv-surface) 92%, transparent);
    border: 1px solid var(--fv-line);
    border-radius: var(--fv-radius-panel);
    box-shadow: var(--fv-shadow-lg);
}
.fv-error-panel__code { margin: 0; font: 700 .8rem/1 var(--fv-font-caps); letter-spacing: .3em; color: var(--fv-gold); }
.fv-error-panel__text { color: var(--fv-ink); }
.fv-error-panel__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
body:has(.fv-error-panel) { background-color: var(--fv-azure-950); }
