/* Manrope (SIL Open Font License, fonts/OFL.txt), self-hosted variable font, weights 200-800 */
@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/manrope-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/manrope-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --fg: #1f1e1c; /* brand ink */
  --muted: #666;
  --line: #dcdcdc;
  --soft: #f3f1ec; /* brand paper */
  --accent: #1f1e1c;
  --danger: #b3261e;
  --radius: 6px;
  --gutter: 16px;
  color-scheme: light;
  font-family: 'Manrope Variable', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); }
img, svg { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 600; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--fg); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; max-width: 72rem; margin: 0 auto; padding: 12px var(--gutter); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 32px; width: auto; }
.cart-link { text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.cart-badge[hidden] { display: inline-block; visibility: hidden; } /* keeps its place, so the header text does not move when it appears */
.cart-badge { background: var(--fg); color: #fff; border-radius: 999px; min-width: 22px; padding: 0 6px; text-align: center; font-size: 0.8rem; line-height: 22px; }

.site-header__end { display: inline-flex; align-items: center; gap: 16px; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; font-size: 0.85rem; font-weight: 600; }
.lang-switch a { text-decoration: none; padding: 4px 6px; border-radius: var(--radius); color: var(--muted); }
.lang-switch a:hover { color: var(--fg); background: var(--soft); }
.lang-switch a[aria-current='true'] { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.lang-switch--footer { gap: 14px; font-size: inherit; font-weight: 400; }
.lang-switch--footer a { padding: 0; color: var(--fg); }

main { max-width: 72rem; margin: 0 auto; padding: 24px var(--gutter) 64px; }
main.narrow { max-width: 52rem; }
main.legal { padding: 24px var(--gutter) 48px; max-width: 42rem; margin: 0 auto; }
main.legal [data-legal-body] > h1:first-child { margin-top: 0; }
main.legal h1, main.legal h2, main.legal h3 { font-weight: 600; }
main.legal h2 { margin-top: 1.6em; }
main.legal p, main.legal li { color: var(--fg); }
main.legal ul, main.legal ol { padding-left: 1.25em; }
main.legal a { text-decoration: underline; text-underline-offset: 2px; }
main.legal .legal-extra { margin-top: 2.5em; padding-top: 1.5em; border-top: 1px solid var(--line); }
main.legal .legal-stand { margin-top: 3em; font-size: 0.85rem; color: var(--muted); }
main.legal .header { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.5em; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--fg); background: var(--bg); color: var(--fg); border-radius: var(--radius); padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--soft); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #333; }
.btn--link { border-color: transparent; background: none; text-decoration: underline; font-weight: 400; padding: 6px 0; }
.btn:disabled { opacity: 0.55; cursor: progress; }

/* configurator */
.cfg__title { text-align: center; font-size: 1.75rem; margin: 8px 0 24px; }
/* One page in three states (data-phase on <karvano-configurator>): upload (square + describe box), loading (the square shows progress),
   preview (preview on the left, options and price slide in on the right). Panels share the left column; the one that is not shown
   leaves the flow and fades, so the column is as tall as what is on screen. */
.cfg__workspace { display: grid; gap: 24px; overflow: clip; }
.cfg__main { position: relative; min-width: 0; }
.cfg__main.is-morphing { overflow: hidden; transition: height 0.56s cubic-bezier(0.4, 0, 0.2, 1); }
.cfg__controls { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cfg-start { max-width: 26rem; margin-inline: auto; transition: opacity 0.35s ease 0.1s, transform 0.5s ease 0.1s, visibility 0s; }
.cfg__stage { transition: opacity 0.4s ease 0.2s, transform 0.55s ease 0.2s, visibility 0s; }
karvano-configurator[data-restoring] { visibility: hidden; } /* a design that is opened again: nothing flashes while it is fetched (configurator.js #restore) */
[data-phase='preview'] .cfg-start, .cfg__stage:where([inert]) { position: absolute; inset: 0 0 auto 0; opacity: 0; visibility: hidden; pointer-events: none; }
[data-phase='preview'] .cfg-start { transform: translateX(-1.5rem) scale(0.97); transition: opacity 0.3s ease, transform 0.45s ease, visibility 0s 0.45s; }
.cfg__stage:where([inert]) { transform: translateX(1.5rem) scale(0.97); transition: opacity 0.25s ease, transform 0.45s ease, visibility 0s 0.45s; }
.cfg__controls { opacity: 0; visibility: hidden; transform: translateX(2rem); transition: opacity 0.25s ease, transform 0.45s ease, visibility 0s 0.45s; }
[data-phase='preview'] .cfg__controls { opacity: 1; visibility: visible; transform: none; transition: opacity 0.5s ease 0.25s, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s, visibility 0s; }
@media (min-width: 768px) {
  .cfg__workspace { grid-template-columns: minmax(0, 1fr) 0; column-gap: 0; align-items: start; transition: grid-template-columns 0.6s cubic-bezier(0.4, 0, 0.2, 1), column-gap 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
  [data-phase='preview'] .cfg__workspace { grid-template-columns: minmax(0, 1fr) 22rem; column-gap: 40px; }
  .cfg__controls { position: sticky; top: 16px; width: 22rem; }
}
@media (max-width: 767.98px) {
  .cfg__controls { display: none; }
  [data-phase='preview'] .cfg__controls { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .cfg-start, .cfg__stage, .cfg__controls, .cfg__workspace, .cfg__main.is-morphing, [data-phase='preview'] .cfg-start, [data-phase='preview'] .cfg__controls, .cfg__stage:where([inert]) { transition: none; }
}

.cfg-upload { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 1; padding: 24px; border: 2px dashed var(--line); border-radius: var(--radius); text-align: center; cursor: pointer; color: var(--muted); transition: border-color 0.3s; }
.cfg-upload:hover, .cfg-upload.is-drag, .cfg-upload:focus-within { border-color: var(--fg); color: var(--fg); }
.cfg-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cfg-upload__prompt { font-weight: 600; color: var(--fg); }
.cfg-upload__formats { font-size: 0.9rem; }

.cfg__error { color: var(--danger); margin: 8px 0; }
/* while the picture is analysed or the design drawn the square shows progress: a scan line and a status */
.cfg-busy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: var(--bg); opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0s 0.35s; }
[data-phase='loading'] .cfg-busy { opacity: 1; visibility: visible; transition: opacity 0.35s ease, visibility 0s; }
[data-phase='loading'] .cfg-upload { border-style: solid; border-color: var(--fg); cursor: progress; pointer-events: none; }
.cfg-busy__scan { position: absolute; left: 0; right: 0; top: 0; height: 36%; background: linear-gradient(180deg, transparent, rgba(31, 30, 28, 0.09)); border-bottom: 2px solid rgba(31, 30, 28, 0.35); animation: cfg-scan 2.2s ease-in-out infinite alternate; }
.cfg-busy__status { font-weight: 600; color: var(--fg); }
.cfg-busy__wish { max-width: 90%; color: var(--muted); font-size: 0.9rem; font-style: italic; overflow-wrap: anywhere; }
.cfg-busy__wish:not(:empty)::before { content: '\201E'; }
.cfg-busy__wish:not(:empty)::after { content: '\201C'; }
.cfg-busy__media { position: absolute; inset: 0; display: none; }
.cfg-busy[data-kind='plate'] .cfg-busy__media, .cfg-busy[data-kind='image'] .cfg-busy__media { display: block; }
.cfg-busy__media img { width: 100%; height: 100%; object-fit: contain; padding: 6%; opacity: 0.42; } /* the picture that is analysed, see-through: the scan line runs over it */
/* a described design: the twinkling plate fills the square (the same animation as in the example box), the status sits on it at the bottom */
.cfg-busy[data-kind='plate'] { justify-content: flex-end; padding: 0 12px 6%; background: transparent; }
.cfg-busy[data-kind='plate'] .cfg-busy__scan, .cfg-busy[data-kind='plate'] .cfg__spinner, .cfg-busy[data-kind='image'] .cfg__spinner { display: none; }
.cfg-busy[data-kind='plate'] .cfg-busy__status, .cfg-busy[data-kind='plate'] .cfg-busy__wish, .cfg-busy[data-kind='image'] .cfg-busy__status { position: relative; padding: 3px 14px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 88%, transparent); }
@keyframes cfg-scan { from { transform: translateY(-100%); } to { transform: translateY(280%); } }
@media (prefers-reduced-motion: reduce) { .cfg-busy__scan { animation: none; top: 0; height: 100%; } }
.cfg__spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--fg); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cfg__spinner { animation-duration: 3s; } }

.cfg__stage { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cfg-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 0; font: inherit; color: var(--muted); cursor: pointer; }
.cfg-back:hover { color: var(--fg); text-decoration: underline; }
.cfg-dialog { max-width: min(26rem, calc(100vw - 2 * var(--gutter))); padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--fg); background: var(--bg); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); }
.cfg-dialog::backdrop { background: rgba(31, 30, 28, 0.45); }
.cfg-dialog h2 { font-size: 1.15rem; }
.cfg-dialog p { margin: 0 0 20px; color: var(--muted); }
.cfg-dialog__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
/* Turnstile (web/public/captcha.js): see-through and out of the way while the check runs in the background, a dialog when Cloudflare needs a click. Never display:none: a hidden widget may not run. */
.captcha { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: var(--gutter); pointer-events: none; }
.captcha.is-open { pointer-events: auto; background: rgba(31, 30, 28, 0.45); }
.captcha__card { visibility: hidden; max-width: min(26rem, 100%); padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--fg); background: var(--bg); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); }
.captcha.is-open .captcha__card { visibility: visible; }
.captcha__card h2 { font-size: 1.15rem; }
.captcha__card p { margin: 0 0 16px; color: var(--muted); }
.cfg-frame { position: relative; width: 100%; background: #fff; border: 1px solid var(--line); line-height: 0; }
.cfg-frame { max-width: min(100%, calc(min(80vh, 42rem) * var(--ar, 0.6667))); }
.cfg-frame[data-mode='photo'] { background: var(--soft); }
.cfg-svg { display: block; width: 100%; height: auto; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.cfg-svg.is-dragging { cursor: grabbing; }
.cfg-svg.is-margin-hover { cursor: not-allowed; }
.cfg-svg.is-dragging { cursor: grabbing; }
/* the margin outline is not part of the product: only shown while hovering the margin */
.frame-guide-line { opacity: 0; transition: opacity 0.15s; }
.cfg-svg.is-margin-hover .frame-guide-line { opacity: 1; }
.cfg-tooltip { position: absolute; z-index: 2; max-width: 14rem; padding: 8px 10px; background: var(--fg); color: #fff; border-radius: var(--radius); font-size: 0.85rem; line-height: 1.35; pointer-events: none; }
.cfg-modes { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cfg-modes button { border: 0; background: var(--bg); padding: 8px 16px; font: inherit; cursor: pointer; }
.cfg-modes button[aria-pressed='true'] { background: var(--fg); color: #fff; }
.cfg-below { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: center; }
.cfg__hint { text-wrap: balance; font-size: 0.85rem; color: var(--muted); text-align: center; margin: 0; max-width: 30rem; }

/* steps */
.cfg-step { border: 1px solid var(--line); border-radius: var(--radius); }
.cfg-step__head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.cfg-step__title { font-weight: 600; }
.cfg-step__summary { margin-left: auto; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.cfg-step__chevron { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s; }
.is-open > .cfg-step__head .cfg-step__chevron { transform: rotate(-135deg); }
.cfg-step__body { padding: 0 14px 14px; }
.cfg-step__prompt { color: var(--muted); font-size: 0.9rem; margin: 0 0 10px; }
.cfg-formats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.cfg-format { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font: inherit; cursor: pointer; }
.cfg-format { min-width: 4.5rem; }
.cfg-format svg { width: 30px; height: 30px; }
.cfg-format:not(:has(svg)) { padding-top: 14px; padding-bottom: 14px; }
.cfg-format[aria-pressed='true'], .cfg-mat[aria-pressed='true'], .cfg-sub[aria-pressed='true'] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.cfg-groups, .cfg-sub-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cfg-mat, .cfg-sub { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 4.4rem; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font: inherit; font-size: 0.8rem; cursor: pointer; }
.cfg-subs { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.cfg-swatch { display: block; width: 100%; aspect-ratio: 1; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); }
.cfg-swatch--small { width: 18px; height: 18px; flex: none; }

.cfg-help { margin: 0; text-align: center; font-size: 0.9rem; }
.cfg-help a { color: var(--muted); }
.cfg-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cfg-check input { margin-top: 4px; accent-color: var(--fg); }
.cfg-check small { display: block; color: var(--muted); font-size: 0.85rem; }
.cfg-smooth { display: grid; grid-template-columns: auto 1fr 3rem; gap: 10px; align-items: center; }
.cfg-smooth input { width: 100%; accent-color: var(--fg); }
.cfg__stage .cfg-smooth { width: 100%; max-width: 26rem; }
.cfg-smooth output { text-align: right; font-variant-numeric: tabular-nums; }
.cfg-rotate { display: grid; grid-template-columns: auto 1fr 3rem auto; gap: 8px; align-items: center; }
.cfg-rotate input { width: 100%; accent-color: var(--fg); }
.cfg__stage .cfg-rotate { width: 100%; max-width: 26rem; }
.cfg-rotate output { text-align: right; font-variant-numeric: tabular-nums; }
.cfg-rotate .btn { padding-inline: 12px; }
.cfg-rotate .btn[aria-pressed='true'] { background: var(--fg); color: #fff; border-color: var(--fg); }

.cfg-prices h2 { font-size: 1rem; }
.cfg-prices dl, .totals { margin: 0; }
.cfg-prices dl > div, .totals > div { display: flex; justify-content: space-between; padding: 4px 0; }
.cfg-prices dd, .totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.cfg-prices__discount { color: #2e7d32; }
.totals__total:first-child { border-top: 0 !important; margin-top: 0; padding-top: 4px !important; }
.cfg-prices__total, .totals__total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px !important; font-weight: 700; font-size: 1.1rem; }
.cfg-prices__note, .note { font-size: 0.8rem; color: var(--muted); margin: 4px 0 0; }
.note-ref { font-size: 0.75em; vertical-align: super; line-height: 0; margin-left: 0.1em; color: var(--muted); text-decoration: none; }
.note-ref:hover, .note-ref:focus-visible { color: var(--fg); text-decoration: underline; }

/* featured presets */
/* Reserve the height of the start screen (square + describe box) before the script has built it, so what follows does not jump.
   While a design is open (loading, preview) the preview and controls are much taller than the upload
   box: "featured" is hidden then, so nothing visible is pushed down. */
#configurator { display: flow-root; min-height: 56rem; }
main:has(karvano-configurator[data-phase='preview']) .featured { display: none; }
.featured { margin-top: 40px; }
/* heading row: title and subtitle left, "all designs" right (below them when there is no room) */
.featured__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.featured__intro { flex: 1 1 24rem; min-width: 0; }
.featured__head h2 { margin-bottom: 0.25em; }
.featured__subtitle { font-size: 0.95rem; color: var(--muted); margin: 0; text-wrap: balance; }
.featured__all { flex: 0 0 auto; }

/* the card, in the carousel and in the catalogue grid */
.presets { align-content: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 24px; }
.presets__empty { grid-column: 1 / -1; color: var(--muted); margin: 0; }
.preset { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.preset__thumb { aspect-ratio: 2 / 3; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.9rem; overflow: hidden; text-align: center; }
.preset__thumb img { width: 100%; height: 100%; object-fit: contain; } /* whole plate, whatever its format */
.preset__title { font-size: 1rem; margin: 6px 0 0; }
.preset__price { margin: 0; color: var(--muted); }
.preset__actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 6px; }
.preset__actions .btn { padding: 8px 12px; font-size: 0.9rem; text-align: center; }
/* placeholders with the card's proportions, for pages that arrive without the cards */
.preset--skeleton .preset__thumb, .preset--skeleton .btn { background: var(--soft); border-color: transparent; color: transparent; }
.preset--skeleton .preset__title, .preset--skeleton .preset__price { background: var(--soft); color: transparent; border-radius: 4px; width: 70%; }
/* many designs: two columns on phones instead of a very long single column */
@media (max-width: 600px) {
  .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
}

/* carousel: a scroll-snap row (native swipe, works without JavaScript); the width of the carousel itself decides how
   many cards are visible, with the same breakpoints as cardsPerView() in core/src/carousel.js */
.carousel { container-type: inline-size; }
.carousel__track {
  --per-view: 1; --gap: 16px;
  display: flex; gap: var(--gap); position: relative;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 6px; margin: -6px; scroll-padding-inline: 6px; /* room for the focus rings, which overflow would clip */
  transition: opacity 0.2s;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > .preset { flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view)); scroll-snap-align: start; }
.carousel__track > .presets__empty { flex: 1; }
.carousel__track.is-wrapping { opacity: 0; } /* wrap-around: fade out, jump back, fade in */
@container (max-width: 559px) { .carousel__track > .preset { flex-basis: 78%; } } /* one card, a peek of the next */
@container (min-width: 560px) { .carousel__track { --per-view: 2; --gap: 20px; } }
@container (min-width: 820px) { .carousel__track { --per-view: 3; --gap: 24px; } }
@container (min-width: 1040px) { .carousel__track { --per-view: 4; --gap: 24px; } }
.carousel__bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; min-height: 48px; margin-top: 16px; }
.carousel__bar.is-idle { visibility: hidden; }
.carousel__btn { width: 40px; height: 40px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--fg); cursor: pointer; }
.carousel__btn:hover { background: var(--soft); border-color: var(--fg); }
.carousel__dots { display: flex; flex-wrap: wrap; justify-content: center; margin: 0 4px; }
.carousel__dot { position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel__dot::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: #b9b6ae; transition: background 0.2s, inset 0.2s; }
.carousel__dot:hover::before { background: var(--muted); }
.carousel__dot[aria-current='true']::before { background: var(--fg); inset: 7px; }
@media (max-width: 600px) {
  /* phones: the dots get their own row below the buttons, so a long list never squeezes them */
  .carousel__bar { min-height: 84px; }
  .carousel__dots { flex: 1 0 100%; order: 2; margin: 0; }
  .carousel__dot { width: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel__track { transition: none; }
  .carousel__dot::before { transition: none; }
}

/* catalogue page */
.designs h1 { margin-bottom: 0.25em; }
.designs__intro { margin: 0 0 20px; color: var(--muted); }
.designs__tools { min-height: 44px; margin-bottom: 16px; }
.designs__search { display: flex; gap: 8px; max-width: 34rem; }
.designs__q { flex: 1; min-width: 0; height: 44px; padding: 0 14px; font: inherit; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--fg); }
.designs__q:focus-visible { border-color: var(--fg); }
.designs__filter { min-height: 40px; margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.chip:hover { border-color: var(--fg); background: var(--soft); }
.chip[aria-current='true'] { border-color: var(--fg); background: var(--fg); color: #fff; }
.designs__foot { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 32px; }
.designs__status { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* cart */
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line__thumb img { display: block; border: 1px solid var(--line); }
.line__pending { font-size: 0.8rem; color: var(--muted); }
.line__info h2 { font-size: 1.05rem; margin-bottom: 4px; }
.line__info p { margin: 2px 0; font-size: 0.9rem; color: var(--muted); }
.line__thumb { grid-row: 1 / span 3; }
.line__info { grid-row: 1; grid-column: 2; }
.line__parts { grid-row: 2; grid-column: 2 / -1; margin: 0; }
.line__parts > div { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; font-size: 0.9rem; }
.line__parts dd, .line__price { font-variant-numeric: tabular-nums; }
.line__parts dd { margin: 0; text-align: right; white-space: nowrap; }
.line__parts dt { color: var(--muted); }
.line__price { text-align: right; white-space: nowrap; }
del { color: var(--muted); font-weight: 400; text-decoration-thickness: 1px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.totals__saved { max-width: 22rem; margin: 6px 0 0 auto; text-align: right; font-size: 0.9rem; color: #2e7d32; }
.line__qty { grid-row: 3; grid-column: 2; display: flex; gap: 12px; align-items: center; }
.line__qty input { width: 4rem; padding: 6px; font: inherit; }
.line__price { grid-row: 1; grid-column: 3; font-weight: 600; font-variant-numeric: tabular-nums; }
.totals { max-width: 22rem; margin-left: auto; padding-top: 16px; }
.cart-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 2px 10px; border: 1px solid var(--fg); border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.note--info { margin-top: 16px; padding: 12px; background: var(--soft); border-radius: var(--radius); color: var(--fg); font-size: 0.95rem; }
@media (max-width: 520px) { .line { grid-template-columns: 90px 1fr; } .line__parts { grid-column: 2; } .line__price { grid-column: 2; grid-row: 4; text-align: left; } .line__qty { grid-row: 3; } }

/* footer */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
.site-footer { border-top: 1px solid var(--line); background: var(--soft); margin-top: 32px; }
.site-footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; max-width: 72rem; margin: 0 auto; padding: 24px var(--gutter); align-items: start; }
.site-footer__brand p, .site-footer__copy { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }
.site-footer__links { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; }
.site-footer a { color: var(--fg); }
.site-footer__copy { grid-column: 1 / -1; }
.site-footer .heart { color: #d6336c; }
@media (max-width: 600px) { .site-footer__inner { grid-template-columns: 1fr; } .site-footer nav { justify-content: flex-start; } .site-footer__links { align-items: flex-start; } }

/* contact form */
.form { display: grid; gap: 16px; margin-top: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 0.95rem; }
.field input, .field select, .field textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--fg); width: 100%; box-sizing: border-box; }
.field textarea { resize: vertical; }
.field__error { color: var(--danger); font-size: 0.85rem; }
.field__error[hidden] { display: none; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact__design { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; }
.contact__design legend { font-weight: 600; padding: 0 6px; }
.contact__design p { margin: 0; font-size: 0.95rem; }
.contact__design .contact__warn { padding: 8px 10px; border-radius: var(--radius); background: var(--soft); font-size: 0.85rem; }
.contact__design .contact__warn[hidden] { display: none; }

/* the start screen's lower half: "or" and the describe-your-design box (prompt.js); it folds away while a design is made */
.cfg-more { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease; }
.cfg-more__inner { min-height: 0; overflow: hidden; padding: 4px; margin: -4px; }
[data-phase='loading'] .cfg-more { grid-template-rows: 0fr; opacity: 0; }
.cfg-or { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--muted); font-size: 0.9rem; }
.cfg-or::before, .cfg-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.prompt h2 { font-size: 1.15rem; margin-bottom: 4px; }
.prompt__subtitle { font-size: 0.9rem; color: var(--muted); margin: 0 0 14px; text-wrap: balance; }
.prompt__box { display: grid; grid-template-columns: 8.5rem 1fr; gap: 14px; align-items: stretch; background: var(--soft); border-radius: 12px; padding: 14px; }
/* the example as the product looks (web/public/plate.js): a square plate, the sparkles or the motif cut out of the front plate, the back plate behind; the plates of two examples fade into each other */
/* the plates lie on top of each other by position, not in one grid cell: Chrome does not repaint the SVG masks of a plate in a grid cell once its animations end (the motif stays invisible) */
.prompt__preview { position: relative; align-self: start; width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); }
.prompt__preview > .plate { position: absolute; inset: 0; }
.prompt__form { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.prompt__input { flex: 1 1 auto; min-height: 5.5rem; resize: vertical; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 1rem; line-height: 1.4; background: var(--bg); color: var(--fg); }
.prompt__input:not(:focus)::placeholder { color: transparent; } /* the hint only shows once the visitor clicked into the box: while the examples run, the box is empty for a moment between two wishes */
.prompt__input.is-demo { color: var(--muted); } /* an example that types itself is grey; what the visitor types is black */
.prompt__row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: flex-end; }
@media (max-width: 24rem) {
  .prompt__box { grid-template-columns: 1fr; }
  .prompt__preview { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cfg-more { transition: none; } }

/* The plate (plate.js): sparkles that grow from nothing, shine and shrink away in a loop of four seconds, and the motif of an example; one fades into the other.
   The sparkles are cutouts of the front plate (the back plate shows through), so they are SVG shapes in masks that scale: the same loop for every material pair. */
.plate { display: block; width: 100%; height: 100%; }
.plate--entering { opacity: 0; transition: opacity 0.65s ease; }
.plate--entering.is-shown { opacity: 1; }
.plate__spark { transform-box: fill-box; transform-origin: center; animation: plate-twinkle 4s ease-in-out infinite; }
@keyframes plate-twinkle {
  0%, 6% { transform: scale(0) rotate(-30deg); }
  26% { transform: scale(1) rotate(0deg); }
  36% { transform: scale(0.82) rotate(8deg); }
  56%, 100% { transform: scale(0) rotate(35deg); }
}
/* twinkle -> motif: no fade. Each part of the motif grows from its own middle (plate.js: --d is when, and the frames are set from there), the sparkles in front of it shrink
   away, the others finish their loop and stop (is-done: a loop ends with the sparkle at rest, so nothing jumps). motif -> twinkle is a plain fade back. */
.plate__mo { opacity: 0; transition: opacity 0.5s ease; }
.plate[data-mode='motif'] .plate__mo { opacity: 1; transition: none; }
.plate__part { transform-box: fill-box; transform-origin: center; }
.plate__spark.is-done { animation: none; transform: scale(0); }
.plate__spark.is-gone { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .plate__spark { animation: none; transform: scale(0.75); }
  .plate__mo { transition: none; }
  .plate[data-mode='motif'] .plate__tw { display: none; }
  .plate--entering { transition: none; }
}

/* adjust with AI (under the preview) */
.cfg-ai { width: 100%; max-width: 26rem; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; text-align: left; }
.cfg-ai__head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cfg-ai__title { font-size: 1rem; margin: 0; }
.cfg-ai__history { display: flex; gap: 6px; align-items: center; }
.cfg-ai__step { font-size: 0.8rem; color: var(--muted); }
.btn--small { padding: 4px 10px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.45; cursor: default; }
.cfg-ai__log { list-style: none; margin: 0 0 8px; padding: 0; max-height: 13rem; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.cfg-ai__log:empty { display: none; }
.cfg-ai__item { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
.cfg-ai__item:last-child { border-bottom: 0; }
.cfg-ai__text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.cfg-ai__item.is-undone { color: var(--muted); opacity: 0.55; } /* undone: back at an earlier version; the next wish from there replaces these rows */
.cfg-ai__mark { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; }
.cfg-ai__mark svg { color: var(--fg); }
.cfg-ai__spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--fg); border-radius: 50%; animation: spin 0.9s linear infinite; }
@media (prefers-reduced-motion: reduce) { .cfg-ai__spin { animation-duration: 3s; } }
.cfg-ai__notice { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin: 8px 0 0; padding: 8px 10px; border-radius: var(--radius); background: var(--soft); font-size: 0.85rem; }
.cfg-ai__notice[hidden], .cfg-ai__notice [hidden] { display: none; }
.cfg-ai__notice p { margin: 0; flex: 1 1 14rem; }
.cfg-ai__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cfg-ai__chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 0.85rem; cursor: pointer; }
.cfg-ai__chip:hover:not(:disabled) { border-color: var(--fg); }
.cfg-ai__chip:disabled { opacity: 0.5; cursor: default; }
.cfg-ai__form { display: flex; gap: 8px; }
.cfg-ai__input { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--bg); color: var(--fg); }
.cfg-ai .cfg-step__prompt { margin: 8px 0 0; font-size: 0.8rem; }
