/* Saga, bed linen and interior textiles, Plovdiv.
   Bleached white and laundry blue with the orange of the old site's header flower; one light theme.
   Alegreya for display, Open Sans for text. The quilted "duvet" of the home page is drawn here in CSS. */

@font-face {
    font-family: "Alegreya";
    src: url("/fonts/alegreya.woff2") format("woff2");
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Alegreya";
    src: url("/fonts/alegreya-italic.woff2") format("woff2");
    font-weight: 400 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Open Sans";
    src: url("/fonts/open-sans.woff2") format("woff2");
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --white: #fbfcff;
    --paper: #f0f3fc;
    --wash: #dfe6fa;
    --line: #c3cdee;
    --bluing: #2440b8;
    --bluing-deep: #172a80;
    --night: #121735;
    --ink: #1b2040;
    --muted: #474e72;
    --sun: #f7941d;
    --sun-soft: #ffd9a8;
    --display: "Alegreya", Georgia, "Times New Roman", serif;
    --text: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --wrap: 1180px;
    --pad: clamp(18px, 4vw, 40px);
    /* the quilting of a duvet: two rows of running stitches crossing in diamonds */
    --quilt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cpath d='M0 48 48 0l48 48-48 48z' fill='none' stroke='%23fff' stroke-opacity='.17' stroke-width='1.6' stroke-dasharray='5 5' stroke-linecap='round'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 130px;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font: 400 1.0625rem/1.65 var(--text);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--bluing);
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--bluing-deep);
}

:focus-visible {
    outline: 3px solid var(--sun);
    outline-offset: 3px;
    border-radius: 4px;
}

h1,
h2,
h3 {
    font-family: var(--display);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin: 0 0 0.5em;
    color: var(--night);
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.5rem, 6.4vw, 4.9rem);
    letter-spacing: -0.025em;
    line-height: 0.98;
}

h2 {
    font-size: clamp(1.9rem, 4vw, 3rem);
}

h3 {
    font-size: 1.45rem;
}

p {
    margin: 0 0 1em;
}

.wrap {
    width: 100%;
    max-width: calc(var(--wrap) + 2 * var(--pad));
    margin-inline: auto;
    padding-inline: var(--pad);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--night);
    color: #fff;
    border-radius: 8px;
}

.skip:focus {
    top: 12px;
    color: #fff;
}

.lead {
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    line-height: 1.55;
    max-width: 38em;
}

/* ---- buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.85em 1.5em;
    border: 0;
    border-radius: 999px;
    background: var(--sun);
    color: var(--night);
    font: 700 1rem/1.2 var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    color: var(--night);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -10px rgba(18, 23, 53, 0.6);
}

.btn-light {
    background: #fff;
    color: var(--bluing-deep);
}

.btn-light:hover {
    color: var(--bluing-deep);
}

.btn-line {
    background: transparent;
    color: #fff;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75);
}

.btn-line:hover {
    color: #fff;
    box-shadow: inset 0 0 0 2px #fff;
}

/* ---- header ---- */

.top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 252, 255, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    padding-block: 10px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-right: auto;
    text-decoration: none;
    color: var(--bluing);
}

.brand-name {
    font: italic 900 2rem/1 var(--display);
    letter-spacing: -0.02em;
    padding-bottom: 3px;
    border-bottom: 2px dashed currentColor;
}

.brand-note {
    font-size: 0.8rem;
    color: var(--muted);
}

.call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--bluing);
    color: #fff;
    font-weight: 700;
    font-size: 0.98rem;
    text-decoration: none;
    white-space: nowrap;
}

.call:hover {
    background: var(--bluing-deep);
    color: #fff;
}

.lang {
    display: flex;
    gap: 2px;
    font-size: 0.85rem;
    font-weight: 700;
}

.lang a,
.lang span {
    padding: 6px 9px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
}

.lang span {
    background: var(--wash);
    color: var(--night);
}

.nav {
    order: 5;
    width: 100%;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: -8px;
    padding: 0 0 2px;
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav a {
    flex: none;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
}

.nav a:hover {
    background: var(--wash);
    color: var(--night);
}

.nav a[aria-current="page"] {
    background: var(--night);
    color: #fff;
}

@media (min-width: 1000px) {
    .nav {
        order: 0;
        width: auto;
        margin-inline: 0;
        padding: 0;
    }

    .brand {
        margin-right: auto;
    }

    .top-row {
        flex-wrap: nowrap;
    }
}

@media (max-width: 560px) {
    .brand-note {
        display: none;
    }

    .brand-name {
        font-size: 1.7rem;
    }

    .call {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* ---- home: the duvet ---- */

.hero {
    position: relative;
    background: var(--quilt), linear-gradient(160deg, #2c4bd0 0%, var(--bluing) 45%, var(--bluing-deep) 100%);
    color: #fff;
    border-radius: 0 0 clamp(24px, 5vw, 56px) clamp(24px, 5vw, 56px);
    padding: clamp(36px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
    overflow: hidden;
}

/* the hem of the duvet: one row of stitches along its lower edge */
.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 18px 0;
    border-bottom: 3px dashed rgba(255, 255, 255, 0.55);
}

.hero-grid {
    display: grid;
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

@media (min-width: 900px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }
}

.hero h1 {
    color: #fff;
}

.hero .lead {
    color: #e8edff;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.6em;
}

.hero-phone {
    font-size: 1.15rem;
}

/* the made bed under the duvet: the cover is pulled back from the photo when the page opens */
.bed {
    position: relative;
    max-width: 620px;
    justify-self: end;
    width: 100%;
    border-radius: clamp(18px, 3vw, 34px);
    overflow: hidden;
    box-shadow: 0 30px 60px -28px rgba(8, 12, 40, 0.75), 0 0 0 6px rgba(255, 255, 255, 0.16);
}

.bed a {
    display: block;
}

.bed img {
    width: 100%;
}

.bed-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform-origin: 0 0;
    animation: turn-down 1.5s cubic-bezier(0.6, 0, 0.2, 1) 0.25s both;
}

@keyframes turn-down {
    from {
        transform: scale(4.2);
    }

    to {
        transform: scale(1);
    }
}

/* ---- home: motto ---- */

.motto {
    padding: clamp(48px, 8vw, 104px) 0;
}

.motto blockquote {
    margin: 0;
    max-width: 21em;
    font: italic 500 clamp(1.9rem, 5vw, 3.7rem)/1.1 var(--display);
    letter-spacing: -0.015em;
    color: var(--bluing);
}

.motto p {
    margin: 1.2em 0 0;
    color: var(--muted);
}

/* ---- home: who we sew for ---- */

.who {
    background: var(--night);
    color: #dfe5fb;
    padding: clamp(48px, 7vw, 96px) 0;
    border-radius: clamp(24px, 5vw, 56px);
    margin-inline: clamp(0px, 2vw, 24px);
}

.who h2 {
    color: #fff;
    max-width: 16em;
}

.who-grid {
    display: grid;
    gap: clamp(24px, 4vw, 56px);
}

@media (min-width: 900px) {
    .who-grid {
        grid-template-columns: 0.8fr 1.2fr;
    }
}

.who-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font: 800 clamp(1.7rem, 4.4vw, 3.2rem)/1.08 var(--display);
    letter-spacing: -0.02em;
    color: #fff;
}

.who-list li {
    padding: 0.28em 0;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.28);
}

.who-list li:last-child {
    border-bottom: 0;
}

.who-list li:nth-child(even) {
    color: var(--sun-soft);
}

/* ---- home: the three shelves ---- */

.band {
    padding: clamp(48px, 7vw, 96px) 0;
}

.band-tight {
    padding: clamp(32px, 5vw, 64px) 0;
}

.band-paper {
    background: var(--paper);
}

.shelves {
    display: grid;
    gap: 18px;
    margin-top: clamp(20px, 3vw, 36px);
}

@media (min-width: 860px) {
    .shelves {
        grid-template-columns: 1.25fr 1fr;
        grid-template-rows: auto auto;
    }

    .shelf:first-child {
        grid-row: span 2;
    }
}

.shelf {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 260px;
    padding: 22px;
    border-radius: 28px;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    background: var(--night);
    isolation: isolate;
}

.shelf:first-child {
    min-height: clamp(320px, 46vw, 560px);
}

.shelf img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.shelf::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(18, 23, 53, 0) 25%, rgba(18, 23, 53, 0.9) 82%);
}

.shelf:hover {
    color: #fff;
}

.shelf:hover img {
    transform: scale(1.04);
}

.shelf-title {
    font: 800 clamp(1.6rem, 3vw, 2.3rem)/1.05 var(--display);
    letter-spacing: -0.015em;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.5);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
}

.shelf-text {
    margin-top: 6px;
    font-size: 0.97rem;
    line-height: 1.45;
    color: #eef1ff;
}

/* ---- sewn-in labels: fabrics, materials, the links to a product group ---- */

.labels {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.labels li,
.labels a {
    display: block;
    padding: 7px 14px;
    background: #fff;
    border-radius: 6px;
    outline: 1.5px dashed var(--line);
    outline-offset: -5px;
    box-shadow: 0 1px 0 var(--line), 0 6px 14px -10px rgba(18, 23, 53, 0.5);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--night);
}

.labels li:has(a) {
    padding: 0;
    outline: 0;
    box-shadow: none;
    background: none;
}

.labels a {
    text-decoration: none;
    transition: transform 0.15s ease;
}

.labels a:hover {
    transform: rotate(-2deg) translateY(-2px);
    outline-color: var(--bluing);
    color: var(--bluing-deep);
}

.labels a:focus-visible {
    outline: 3px solid var(--sun);
    outline-offset: 3px;
}

.labels-big li {
    padding: 12px 22px;
    font: 700 clamp(1.15rem, 2.2vw, 1.5rem)/1.2 var(--display);
}

.fabrics {
    display: grid;
    gap: clamp(20px, 4vw, 56px);
    align-items: center;
}

@media (min-width: 900px) {
    .fabrics {
        grid-template-columns: 0.9fr 1.1fr;
    }
}

/* ---- home: since 1990 ---- */

.since {
    display: grid;
    gap: clamp(16px, 4vw, 56px);
    align-items: center;
}

@media (min-width: 860px) {
    .since {
        grid-template-columns: auto 1fr;
    }
}

.since-year {
    margin: 0;
    font: italic 900 clamp(5.5rem, 19vw, 13rem)/0.8 var(--display);
    letter-spacing: 0.03em;
    font-variant-numeric: lining-nums;
    color: var(--bluing);
}

.since-year small {
    display: block;
    margin-bottom: 0.6em;
    font: 600 1rem/1.3 var(--text);
    letter-spacing: 0;
    color: var(--muted);
}

/* ---- inner pages ---- */

.page-hero {
    background: var(--quilt), linear-gradient(160deg, #2c4bd0 0%, var(--bluing) 50%, var(--bluing-deep) 100%);
    color: #fff;
    padding: clamp(36px, 6vw, 80px) 0 clamp(44px, 6vw, 80px);
    border-radius: 0 0 clamp(24px, 5vw, 56px) clamp(24px, 5vw, 56px);
    position: relative;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 16px 0;
    border-bottom: 3px dashed rgba(255, 255, 255, 0.5);
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(2.3rem, 5.6vw, 4.2rem);
    max-width: 14em;
}

.page-hero .lead {
    color: #e8edff;
    margin-bottom: 0;
}

.jump {
    padding-top: 22px;
}

/* a product group: text, then its photos in a strip that scrolls sideways */

.group {
    padding: clamp(36px, 5vw, 64px) 0 0;
}

.group:last-of-type {
    padding-bottom: clamp(40px, 6vw, 80px);
}

.group-head {
    display: grid;
    gap: 8px clamp(20px, 4vw, 56px);
    align-items: start;
}

@media (min-width: 900px) {
    .group-head {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    }
}

.group-head h2 {
    margin: 0;
}

.group-body > :last-child {
    margin-bottom: 0;
}

.group-body .labels {
    margin: 0.4em 0 1em;
}

.facts {
    margin: 0 0 1em;
    padding: 0;
    list-style: none;
}

.facts li {
    padding: 0.5em 0;
    border-bottom: 1.5px dashed var(--line);
}

.facts li:last-child {
    border-bottom: 0;
}

.facts strong {
    color: var(--night);
}

.strip {
    display: flex;
    gap: 14px;
    list-style: none;
    margin: clamp(18px, 3vw, 30px) 0 0;
    padding: 6px max(var(--pad), calc((100vw - var(--wrap)) / 2)) 18px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-inline: max(var(--pad), calc((100vw - var(--wrap)) / 2));
    scrollbar-width: thin;
    scrollbar-color: var(--bluing) var(--wash);
}

.strip li {
    flex: none;
    scroll-snap-align: start;
}

.strip a {
    display: block;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 30px -22px rgba(18, 23, 53, 0.7);
    transition: transform 0.2s ease;
}

.strip a:hover {
    transform: translateY(-4px);
}

.strip img {
    height: clamp(170px, 24vw, 260px);
    width: auto;
    max-width: none;
}

.no-photo {
    margin-top: clamp(18px, 3vw, 30px);
    padding-top: 0;
    border-top: 3px dashed var(--line);
}

/* ---- about ---- */

.prose {
    max-width: 44em;
}

.prose h2 {
    margin-top: 1.4em;
}

.duo {
    display: grid;
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
}

@media (min-width: 900px) {
    .duo {
        grid-template-columns: 1fr 1fr;
    }
}

.pullquote {
    margin: 0;
    padding: clamp(24px, 4vw, 44px);
    background: var(--wash);
    border-radius: 28px;
    outline: 2px dashed var(--bluing);
    outline-offset: -12px;
    font: italic 500 clamp(1.6rem, 3.2vw, 2.4rem)/1.15 var(--display);
    color: var(--bluing-deep);
}

.photo-card {
    margin: 0;
}

.photo-card a {
    display: block;
    border-radius: 28px;
    overflow: hidden;
}

.photo-card figcaption {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--muted);
}

/* ---- contact ---- */

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(22px, 3.5vw, 40px);
}

.big-phone {
    display: block;
    font: 800 clamp(2rem, 5vw, 3.1rem)/1.1 var(--display);
    letter-spacing: -0.015em;
    color: var(--bluing);
    text-decoration: none;
    white-space: nowrap;
}

.big-phone:hover {
    text-decoration: underline;
}

.contact-list {
    margin: 1.4em 0 0;
}

.contact-list div {
    padding: 0.8em 0;
    border-top: 1.5px dashed var(--line);
}

.contact-list dt {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
}

.contact-list dd {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-form > div {
    margin-bottom: 14px;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 700;
    font-size: 0.93rem;
    color: var(--night);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #8d98c4;
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form ::placeholder {
    color: #5d6488;
    opacity: 1;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
    outline: 3px solid var(--sun);
    outline-offset: 1px;
    border-color: var(--bluing);
}

.contact-form ul {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    color: #a3161b;
    font-size: 0.9rem;
}

.form-hint {
    margin: 12px 0 0;
    font-size: 0.87rem;
    color: var(--muted);
}

.contact-sent {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #dcf5e3;
    color: #0e4a22;
}

.contact-sent strong {
    display: block;
}

/* ---- call band and footer ---- */

.cta {
    margin: clamp(40px, 6vw, 80px) clamp(0px, 2vw, 24px) 0;
    padding: clamp(36px, 6vw, 72px) 0;
    background: var(--quilt), var(--bluing);
    color: #fff;
    border-radius: clamp(24px, 5vw, 56px);
}

.cta h2 {
    color: #fff;
    max-width: 14em;
}

.cta p {
    color: #e8edff;
    max-width: 34em;
    margin: 0;
}

.cta-row {
    display: grid;
    gap: 24px;
    align-items: center;
}

@media (min-width: 860px) {
    .cta-row {
        grid-template-columns: 1fr auto;
    }
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.cta-phone {
    font: 800 clamp(2rem, 5vw, 3rem)/1 var(--display);
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.cta-phone:hover {
    color: var(--sun-soft);
}

.foot {
    margin-top: clamp(40px, 6vw, 80px);
    padding: clamp(36px, 5vw, 64px) 0 20px;
    background: var(--night);
    color: #cfd6f2;
    font-size: 0.97rem;
}

.foot a {
    color: #fff;
}

.foot a:hover {
    color: var(--sun-soft);
}

.foot h2 {
    font: 700 1rem/1.3 var(--text);
    letter-spacing: 0;
    color: var(--sun-soft);
    margin-bottom: 0.7em;
}

.foot-grid {
    display: grid;
    gap: 28px;
}

@media (min-width: 800px) {
    .foot-grid {
        grid-template-columns: 1.3fr 1fr 0.8fr;
    }
}

.foot-brand {
    margin-bottom: 14px;
    color: #fff;
}

.foot-brand .brand-name {
    font-size: 2.6rem;
}

.foot-name {
    color: #fff;
    font-weight: 700;
}

.foot-phone {
    font: 800 1.5rem/1.3 var(--display);
    text-decoration: none;
}

.foot-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.foot-nav li {
    padding: 2px 0;
}

.foot-bottom {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 2px dashed rgba(255, 255, 255, 0.22);
    font-size: 0.88rem;
}

.foot-bottom p {
    margin: 0;
}

/* ---- 404 ---- */

.not-found {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px var(--pad);
    background: var(--quilt), linear-gradient(160deg, #2c4bd0, var(--bluing-deep));
    color: #e8edff;
}

.not-found > div {
    max-width: 34em;
}

.not-found .brand-name {
    display: inline-block;
    margin-bottom: 28px;
    font-size: 3rem;
    color: #fff;
}

.not-found h1,
.not-found h2 {
    color: #fff;
}

.not-found h1 {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
}

.not-found h2 {
    margin-top: 1.6em;
    font-size: 1.6rem;
}

.not-found a {
    color: #fff;
}

.not-found .btn {
    color: var(--night);
}

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

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ---- lightbox: /js/lightbox.js opens a linked image enlarged over the page, in a <dialog> ----
   Paste this block into the site's css/site.css. The overlay is dark in every theme and brings its own
   colours and box sizing, so it does not depend on the rest of the stylesheet. To recolour it to the
   site, set these on .lightbox (or on :root): --lb-bg, --lb-text, --lb-accent (focus ring),
   --lb-accent-soft (hover). */

[data-lightbox] {
    cursor: zoom-in;
}

.lightbox,
.lightbox * {
    box-sizing: border-box;
}

html:has(.lightbox[open]) {
    overflow: hidden;
    scrollbar-gutter: stable;
}

.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 68px 12px 14px;
    border: 0;
    background: var(--lb-bg, rgba(12, 14, 16, 0.95));
    color: var(--lb-text, #f2f2f2);
    color-scheme: dark;
    overscroll-behavior: contain;
}

.lightbox[open] {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
}

.lightbox::backdrop {
    background: none;
}

.lightbox-stage {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.lightbox-stage img {
    display: block;
    max-width: none;
    border-radius: 4px;
    background: #fff;
}

.lightbox-caption {
    display: grid;
    place-items: center;
    min-height: 44px;
    max-width: none;
    margin: 0;
    padding: 0 56px;
    color: var(--lb-text, #f2f2f2);
    font-size: 0.92rem;
    line-height: 1.35;
    text-align: center;
}

.lightbox-button {
    position: absolute;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 20px no-repeat;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lightbox-button:hover {
    border-color: #ffffff;
    background-color: var(--lb-accent-soft, rgba(255, 255, 255, 0.16));
}

.lightbox-button:focus-visible {
    outline: 3px solid var(--lb-accent, #ffffff);
    outline-offset: 3px;
    border-radius: 50%;
}

.lightbox-button[hidden] {
    display: none;
}

.lightbox-close {
    top: 12px;
    right: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}

.lightbox-prev,
.lightbox-next {
    bottom: 14px;
}

.lightbox-prev {
    left: 12px;
    rotate: 180deg;
}

.lightbox-next {
    right: 12px;
}

@media (min-width: 760px) {
    .lightbox {
        padding: 24px 84px 18px;
    }

    .lightbox-caption {
        padding: 0;
    }

    .lightbox-prev,
    .lightbox-next {
        top: calc(50% - 22px);
        bottom: auto;
    }

    .lightbox-prev {
        left: 20px;
    }

    .lightbox-next,
    .lightbox-close {
        right: 20px;
    }

    .lightbox-close {
        top: 20px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .lightbox[open] {
        animation: lightbox-in 0.2s ease;
    }
}

@keyframes lightbox-in {
    from {
        opacity: 0;
    }
}

.lightbox {
    --lb-bg: rgba(18, 23, 53, 0.96);
    --lb-accent: #f7941d;
    --lb-accent-soft: rgba(247, 148, 29, 0.3);
}
