/* TwoMoons.Gifts: the bow logo's berry, black and green dot on white and blush.
   Berry is the accent (buttons, links, the active category); the green dot is
   kept for small marks such as step numbers. Marcellus SC for headings, Inter for
   text. All styling lives here: the Content-Security-Policy forbids inline styles. */

:root {
  --berry: #9a004b;
  --leaf: #00a551;
  --berry-deep: #7a003d;
  --ink: #151314;
  --paper: #ffffff;
  --blush: #faf3f6;
  --line: #eadfe4;
  --muted: #6b6166;
  --ok: #1f7a4d;
  --err: #b3261e;
  --sale: #c4161c;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(21, 19, 20, 0.06), 0 8px 24px -12px rgba(21, 19, 20, 0.2);
  --display: 'Marcellus SC', 'Copperplate', 'Copperplate Gothic Light', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1120px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-wrap: break-word;
}

main { flex: 1; min-width: 0; }
img { max-width: 100%; display: block; }
a { color: var(--berry); }
a:hover { color: var(--berry-deep); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: 0.02em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 640px; }
.center { text-align: center; padding-top: 72px; padding-bottom: 96px; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.sr-only, .visually-hidden, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 20; background: var(--paper); padding: 8px 12px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 2px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-mark { height: 44px; width: auto; flex: none; }
.brand-text { font: 400 1.25rem/1 var(--display); letter-spacing: 0.04em; }
.main-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; }
.main-nav a { text-decoration: none; padding: 8px 10px; border-radius: 999px; font-weight: 500; font-size: 0.92rem; color: var(--ink); }
.main-nav a:hover { background: var(--blush); color: var(--berry); }

/* ── Buttons and links ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 0.95rem/1 var(--body); text-decoration: none; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  transition: transform 0.12s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); color: var(--paper); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--berry); border-color: var(--berry); color: #fff; }
.btn-primary:hover { background: var(--berry-deep); border-color: var(--berry-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-small { padding: 9px 14px; font-size: 0.86rem; }
.btn-block { width: 100%; }
.text-link { color: var(--berry); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; color: var(--berry-deep); }

/* ── Notice and empty state ─────────────────────────────────────────────── */
.notice { padding: 12px 16px; border-radius: 8px; background: var(--blush); border: 1px solid var(--line); border-left: 4px solid var(--berry); color: var(--ink); }
.notice-error, .form-error { color: var(--err); font-weight: 600; }
.notice-error { padding: 12px 16px; border-radius: 8px; background: #fbeeec; border: 1px solid #f0d0cb; font-weight: 400; }
.empty { padding: 32px 0; color: var(--muted); }

/* ── Landing: hero ──────────────────────────────────────────────────────── */
.hero { background: var(--blush); border-bottom: 3px solid var(--berry); text-align: center; }
.hero-inner { padding-top: 48px; padding-bottom: 44px; }
.hero h1 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.hero h1 em { font-style: normal; color: var(--berry); }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 52ch; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }

/* ── Landing: sections ──────────────────────────────────────────────────── */
.section { padding-top: 44px; padding-bottom: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.section-hint { color: var(--muted); font-size: 0.92rem; margin: 0 0 16px; }

/* "Gifts we've made": one row of cards that scrolls sideways, card by card. The next card peeks in at
   the edge so the row reads as one to swipe; app.js adds the arrows. */
.work { padding: 48px 0 40px; }
.work h2 { margin-bottom: 6px; }
.work-list { list-style: none; margin: 0; padding: 4px 2px 14px; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 2px; overscroll-behavior-x: contain; }
/* With the arrows there, the scrollbar under the row is only clutter. */
.work-list.is-enhanced { scrollbar-width: none; }
.work-list.is-enhanced::-webkit-scrollbar { display: none; }
.work-card { flex: none; width: min(78vw, 280px); scroll-snap-align: start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.work-media { position: relative; display: block; aspect-ratio: 1; background: var(--blush); border-bottom: 1px solid var(--line); overflow: hidden; }
.work-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.work-title { font-size: 1.05rem; margin: 12px 14px 4px; }
.work-story { margin: 0 14px 14px; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.work-nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.work-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.work-nav[hidden] { display: none; }
.work-arrow[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.work-arrow:focus-visible { outline: 2px solid var(--berry); outline-offset: 2px; }

/* Kind words: a few quotes after the Our work row, as cards of the same look. */
.kind-words { padding: 24px 0 40px; }
.kind-words h2 { margin-bottom: 6px; }
.kind-words-list { list-style: none; margin: 0; padding: 4px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kind-words-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kind-words-stars { margin: 0; color: var(--berry); font-size: 1.05rem; letter-spacing: 0.1em; }
.kind-words-quote { margin: 0; flex: 1; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.kind-words-who { margin: 0; color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.kind-words-more { margin: 18px 0 0; text-align: center; font-size: 0.95rem; }
.kind-words-more a { color: var(--berry); }
/* The admin list shows the whole quote; one long unbroken string must not push the row wider than a phone. */
.admin-kw-quote { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { .kind-words-list { grid-template-columns: 1fr; } }

/* Sample wall: one cover photo per view, each a way into the shop. Every tile is
   the same size: a square that shows the whole photo, whatever its shape, with
   the name of the view underneath. */
.wall { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .wall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 860px) { .wall { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.wall li { min-width: 0; }
.wall-tile {
  display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.wall-tile:hover { color: var(--ink); box-shadow: var(--shadow); border-color: #d9c6d0; }
/* Photo boxes (here, product cards, the product page, the admin grids) are squares
   whatever the shape of the photo. The photo is laid over the box instead of sitting
   in it, so a tall photo can neither stretch the box nor be cropped by it. */
.wall-media { position: relative; display: block; aspect-ratio: 1; background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; }
.wall-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: transform 0.3s ease; }
.wall-tile:hover .wall-media img { transform: scale(1.04); }
.wall-caption { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; font-weight: 600; font-size: 0.92rem; line-height: 1.3; }
.wall-cta { font-style: normal; font-size: 0.8rem; font-weight: 600; color: var(--berry); }

.wall-more { margin: 16px 0 0; }

/* Partners: three across on a wide screen, stacked on a phone. */
.partners-section { padding-bottom: 56px; }
.partners-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .partners-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
.partners-list li { min-width: 0; }
.partners-link {
  display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.partners-link:hover { border-color: var(--berry); color: var(--berry); }
.partners-name { font-weight: 600; }
.partners-url { font-size: 0.86rem; color: var(--muted); overflow-wrap: anywhere; }

/* ── Product grid and cards ─────────────────────────────────────────────── */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); margin-top: 18px; }
@media (max-width: 420px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.card {
  display: flex; flex-direction: column; background: var(--paper); min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { box-shadow: var(--shadow); border-color: #d9c6d0; }
.card-media { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--blush); display: grid; place-items: center; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; cursor: zoom-in; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.card-zoom {
  position: absolute; right: 8px; bottom: 8px; width: 36px; height: 36px; border-radius: 999px; cursor: zoom-in;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); display: grid; place-items: center; font-size: 0.9rem;
}
.card-zoom:hover { border-color: var(--berry); color: var(--berry); }
.card-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-class { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.card-title {
  font: 400 0.9rem/1.35 var(--body); margin: 0; color: var(--ink); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-title:hover { color: var(--berry); }
.card-price { font-weight: 700; font-size: 1rem; margin: 0; }
.card-cta { margin-top: auto; font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.card-cta:hover { text-decoration: underline; }
.img-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: #d9c6d0; background: var(--blush); }

/* Lightbox: a native <dialog> opened by app.js */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: min(92vw, 720px); overflow: visible; }
.lightbox::backdrop { background: rgba(21, 19, 20, 0.8); }
.lightbox-frame { position: relative; background: var(--paper); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
/* min-height keeps the frame from collapsing to the button bar while a photo loads; contain keeps its proportions. */
.lightbox img { display: block; width: 100%; height: auto; min-height: min(50vh, 360px); max-height: 70vh; object-fit: contain; }
.lightbox img[hidden] { display: none; }
.lightbox-error { display: grid; place-items: center; min-height: min(50vh, 360px); margin: 0; color: var(--muted); background: var(--blush); border-radius: var(--radius); }
.lightbox-error[hidden] { display: none; }
/* Three columns, Close always in the middle one, so it stays centered when Previous and Next are hidden. */
.lightbox-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.lightbox-close, .lightbox-nav {
  min-width: 44px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); font: inherit; font-size: 0.95rem; padding: 0 16px; cursor: pointer;
}
.lightbox-close { grid-column: 2; }
.lightbox-nav[data-lightbox-prev] { grid-column: 1; justify-self: start; }
.lightbox-nav[data-lightbox-next] { grid-column: 3; justify-self: end; }
.lightbox-close:hover, .lightbox-nav:hover { border-color: var(--berry); color: var(--berry); }

/* ── Shop: sidebar and results ──────────────────────────────────────────── */
.shop { display: grid; gap: 24px; padding-top: 28px; padding-bottom: 64px; }
@media (min-width: 880px) { .shop { grid-template-columns: 220px minmax(0, 1fr); gap: 36px; } }
/* Grid items default to min-width: auto, so the scrolling category strip would widen the page. */
.shop > *, .search input { min-width: 0; }
.filters { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 880px) { .filters { position: sticky; top: 84px; align-self: start; } }
.search { display: flex; gap: 8px; }
input[type='search'], input[type='number'], input[type='text'], input[type='email'], input[type='password'], select, textarea {
  font: inherit; color: inherit; background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--berry); box-shadow: 0 0 0 3px rgba(154, 0, 75, 0.15); }
.category-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 879px) {
  .category-list { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 6px; }
  .category-list a { white-space: nowrap; border: 1px solid var(--line); background: var(--paper); }
}
.category-list a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--ink); }
.category-list a:hover { background: var(--blush); }
.category-list a[aria-current='page'] { background: var(--berry); color: #fff; }
.category-list a[aria-current='page'] .muted { color: #f1cfe0; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.results-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }
.view-description { color: var(--muted); max-width: 62ch; margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

/* ── Product page ───────────────────────────────────────────────────────── */
.product { padding-top: 24px; padding-bottom: 72px; }
.crumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--berry); }
.product-grid { display: grid; gap: 28px; }
@media (min-width: 880px) { .product-grid { grid-template-columns: 1.1fr 1fr; gap: 52px; align-items: start; } }
.product-grid > * { min-width: 0; }
.gallery-main { position: relative; background: var(--blush); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.thumbs { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.thumb { width: 64px; height: 64px; padding: 4px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer; }
.thumb[aria-pressed='true'], .thumb:hover { border-color: var(--berry); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.buy h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.price { font: 700 1.7rem/1 var(--body); margin: 8px 0 24px; }
.ordering-soon { padding: 20px; background: var(--blush); border: 1px solid var(--line); border-top: 3px solid var(--berry); border-radius: var(--radius); }
.ordering-soon h2 { font-size: 1.2rem; }
/* ── Personalization panel and cart (ordering on) ────────────────────────── */
.personalize { padding: 20px; background: var(--blush); border: 1px solid var(--line); border-top: 3px solid var(--berry); border-radius: var(--radius); }
.personalize h2 { font-size: 1.2rem; }
.personalize-form { display: grid; gap: 16px; }
.personalize-field { display: grid; gap: 6px; min-width: 0; }
.personalize-field label { font-weight: 600; }
.personalize-opt { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.personalize-field .hint { margin: 0; }
.personalize input:not([type='hidden']), .personalize textarea { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 12px; }
.personalize textarea { resize: vertical; min-height: 80px; }
.personalize-buy { display: flex; align-items: flex-end; gap: 16px; }
.personalize-qty { width: 6.5rem; }
.cart { padding-top: 32px; padding-bottom: 64px; }
.cart-lines { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 16px; }
.cart-line { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.cart-photo { display: block; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--blush); }
.cart-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-photo-empty { display: block; width: 100%; height: 100%; }
.cart-title { font-size: 1.05rem; margin: 0 0 6px; }
.cart-title a { color: var(--ink); text-decoration: none; }
.cart-title a:hover { color: var(--berry); }
.cart-detail { margin: 2px 0; font-size: 0.92rem; overflow-wrap: anywhere; white-space: pre-line; }
.cart-controls { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.cart-controls form { display: flex; align-items: center; gap: 8px; }
.cart-qty input { width: 5rem; font: inherit; border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.cart-price { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; }
.cart-line-total { font-weight: 700; font-size: 1.1rem; }
@media (min-width: 640px) {
  .cart-line { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .cart-price { grid-column: 3; flex-direction: column; align-items: flex-end; gap: 2px; }
}
.cart-summary { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.cart-subtotal { display: flex; justify-content: space-between; gap: 16px; margin: 0; font-size: 1.15rem; }
.cart-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.request { display: grid; gap: 22px; padding-top: 24px; padding-bottom: 48px; }
.request h1, .request h2, .request p { margin: 0; }
.request-items { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.request-items ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.request-items li { display: flex; justify-content: space-between; gap: 16px; }
.request-wish { display: block; color: var(--muted); font-size: 0.88rem; }
/* The customer's order page */
.order { display: grid; gap: 18px; padding-top: 24px; padding-bottom: 48px; }
.order h1, .order h2, .order h3, .order p, .order ul, .order dl { margin: 0; }
.order-section { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.order-lines { list-style: none; padding: 0; display: grid; gap: 10px; }
.order-line-title { font-weight: 600; }
.order-row { display: flex; justify-content: space-between; gap: 16px; margin: 0; }
.order-row dd { margin: 0; font-variant-numeric: tabular-nums; }
.order-sum { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.order-sub { padding-left: 16px; color: var(--muted); font-size: 0.92rem; }
.order-total { font-size: 1.15rem; font-weight: 600; }
.order-message, .order-pickup { white-space: pre-line; overflow-wrap: anywhere; }
.order-proof-images { display: grid; gap: 12px; }
.order-proof-img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.order-downloads { list-style: none; padding: 0; display: grid; gap: 6px; }
.order-pay form { display: grid; gap: 10px; justify-items: start; }
.order-changes { display: grid; gap: 8px; justify-items: start; }
.order-changes textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.order-label { font-weight: 600; }
.order-error { color: var(--err); font-weight: 600; }
.order-contact { text-align: center; }
.hint { font-size: 0.86rem; color: var(--muted); margin: 0 0 8px; }
.description { margin-top: 24px; color: #3b3338; white-space: pre-line; }
.specs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.94rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 500; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background: var(--blush); border-top: 1px solid var(--line); padding: 24px 0; font-size: 0.9rem; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.footer-brand { margin: 0; color: var(--ink); font-weight: 500; }
.footer-links { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-social { display: inline-flex; align-items: center; gap: 6px; }
.footer-icon { width: 16px; height: 16px; flex: none; }
.footer-legal { display: flex; gap: 6px 20px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.86rem; }
.footer-legal a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.footer-legal a:hover { color: var(--berry); text-decoration: underline; }

/* ── Legal and trust pages ──────────────────────────────────────────────── */
/* Long text: a narrow measure, roomy lines, headings that are easy to scan. */
.legal { max-width: 760px; padding-top: 36px; padding-bottom: 56px; line-height: 1.65; overflow-wrap: break-word; }
.legal-head { border-bottom: 3px solid var(--berry); margin-bottom: 24px; padding-bottom: 12px; }
.legal-head h1 { margin-bottom: 0.25em; }
.legal-dates { margin: 0; color: var(--muted); font-size: 0.9rem; }
.legal section { margin-top: 30px; }
.legal h2 { font-size: clamp(1.15rem, 2.6vw, 1.4rem); margin-bottom: 0.6em; }
.legal p { margin: 0 0 0.9em; }
.legal ul { margin: 0 0 0.9em; padding-left: 1.3em; }
.legal li { margin-bottom: 0.35em; }
.legal strong { font-weight: 600; }
.legal-contact { display: flex; flex-direction: column; gap: 2px; font-style: normal; padding: 14px 16px; background: var(--blush); border: 1px solid var(--line); border-radius: 8px; }
.legal-nav { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.92rem; }
.legal-nav a { font-weight: 600; text-decoration: none; }
.legal-nav a:hover { text-decoration: underline; }

/* ── Admin ──────────────────────────────────────────────────────────────── */
/* Built for a phone first: one column of cards, big tap targets. */
.admin { padding-top: 20px; padding-bottom: 72px; }
.admin h1, .admin h2 { letter-spacing: 0.02em; }
.admin h2 { font-size: 1.25rem; }
.admin-nav { display: flex; gap: 6px; max-width: 100%; min-width: 0; overflow-x: auto; }
.admin-tab {
  text-decoration: none; font-weight: 600; padding: 10px 16px; border-radius: 999px; color: var(--ink);
  border: 1px solid var(--line); background: var(--paper); white-space: nowrap;
}
.admin-tab:hover { border-color: var(--berry); color: var(--berry); }
.admin-tab[aria-current='page'] { background: var(--berry); color: #fff; border-color: var(--berry); }
.admin-tab-flag { display: inline-block; margin-left: 6px; min-width: 1.4em; padding: 0 6px; border-radius: 999px; background: #e0245e; color: #fff; font-size: 0.74rem; font-weight: 700; line-height: 1.5; text-align: center; }
.admin-requests { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.admin-request-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.admin-request-name { font-weight: 700; overflow-wrap: anywhere; }
.admin-unsent { color: #b3261e; font-weight: 700; margin: 0; }

/* Our products: the list and the add/edit form */
.admin-own { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.admin-own-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.admin-own-photo { flex: none; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--blush); display: grid; place-items: center; font-size: 0.68rem; text-align: center; }
.admin-own-photo img { width: 100%; height: 100%; object-fit: contain; }
.admin-work-move { display: flex; gap: 6px; margin-left: auto; }
.admin-work-move form { margin: 0; }
.admin-crumbs { margin: 0 0 8px; font-size: 0.9rem; }
.admin-own-status { margin: 0 0 12px; font-weight: 600; }
.admin-own-key { margin: 0; }
.admin-own-pair { display: grid; gap: 12px; }
@media (min-width: 720px) { .admin-own-pair { grid-template-columns: 1fr 1fr; } }
.admin-own-form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.admin-own-form legend { font-weight: 700; font-size: 0.92rem; padding: 0 6px; }
.admin-own-form .muted { font-weight: 400; font-size: 0.86rem; margin: 0; }
.admin-own-shots { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 110px), 1fr)); }
.admin-own-shots li { display: flex; flex-direction: column; gap: 6px; }
.admin-own-shot { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 8px; background: var(--blush); }
.admin-own-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.admin-form input[type='radio'] { width: 22px; height: 22px; min-height: 0; padding: 0; accent-color: var(--berry); }
.admin-form input[type='file'] { padding: 8px; }
.admin-answers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 16px; margin: 0 0 20px; }
.admin-answers dt { font-weight: 700; font-size: 0.86rem; margin-top: 10px; }
.admin-basket h2 { font-size: 1.1rem; margin: 0 0 4px; }
.admin-basket-items { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.admin-basket-items p { margin: 0 0 2px; }
.admin-answers dd { margin: 0; overflow-wrap: anywhere; }
.admin-multiline { white-space: pre-wrap; }
/* Orders: the list and the review screen. */
.admin-orders { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.admin-order-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.admin-order-row.is-waiting { border-color: var(--berry); }
.admin-order-number { font-weight: 700; }
.admin-order-name { overflow-wrap: anywhere; }
.admin-order-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 14px; }
.admin-filters a[aria-current="page"] { font-weight: 700; text-decoration: underline; }
.admin-order-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.admin-order-line { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.admin-order-line p { margin: 0 0 6px; overflow-wrap: anywhere; }
.admin-order-line-title { font-weight: 700; }
.admin-order-files { display: flex; flex-wrap: wrap; gap: 4px 12px; overflow-wrap: anywhere; }
.admin-order-charges { margin: 0; padding-left: 18px; }
.admin-figure-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: end; }
@media (min-width: 720px) { .admin-figure-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.admin-totals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; margin: 0 0 10px; max-width: 360px; }
.admin-totals dt, .admin-totals dd { margin: 0; }
.admin-totals dd { text-align: right; font-variant-numeric: tabular-nums; }
.admin-totals .admin-total { font-weight: 700; border-top: 1px solid var(--line); padding-top: 6px; }
.admin-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-history li { overflow-wrap: anywhere; }
.admin-history .admin-inline-form { display: inline-flex; margin-left: 8px; }
@media (min-width: 720px) {
  .admin-answers { grid-template-columns: 160px minmax(0, 1fr); }
  .admin-answers dt { margin-top: 0; padding: 8px 0; }
  .admin-answers dd { padding: 8px 0; }
}
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.admin-title { margin: 8px 0 16px; }
.admin-who { display: flex; align-items: center; gap: 10px; margin: 0; }
.admin-sync { background: var(--blush); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.admin-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 20px 0; }
.admin-panel h2 { margin-bottom: 12px; }
.admin-panel.danger { border-color: #f0d0cb; }
.admin-panel.attention { border-color: #b3261e; }
.admin-panel.attention h2 { color: #b3261e; }
.tag.tag-attention { color: #b3261e; border-color: #f0d0cb; font-weight: 700; }
.admin-form { display: flex; flex-direction: column; gap: 12px; }
.admin-form > fieldset:disabled { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; opacity: 0.6; }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.admin-form input:not([type='checkbox']), .admin-form select, .admin-form textarea, .admin-search input, .admin-search select {
  font: inherit; color: inherit; background: #fff; border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; min-height: 44px;
}
.admin-form textarea { resize: vertical; }
.admin-form label.check { flex-direction: row; align-items: center; gap: 10px; font-size: 1rem; }
.admin-form label.check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--berry); }
.admin-search { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 10px; }
@media (min-width: 720px) { .admin-search { grid-template-columns: 1fr 240px auto; } }
.admin-catalog-bar { align-items: end; }
@media (min-width: 720px) { .admin-catalog-bar { grid-template-columns: 1fr 200px 220px auto; } }
.admin-target { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.82rem; min-width: 0; }
.admin-count { margin: 4px 0 12px; font-size: 0.88rem; }
.admin-first-view { max-width: 420px; }
.admin-login { max-width: 420px; margin: 8vh auto 0; padding: 0 16px; }
.admin-tabs { display: flex; gap: 8px; margin: 0 0 12px; }
.admin-tabs a { padding: 6px 12px; border-radius: 6px; text-decoration: none; border: 1px solid currentColor; opacity: .7; }
.admin-tabs a[aria-current="page"] { opacity: 1; font-weight: 600; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.admin-sort-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 6px; }
.admin-sort-row form { margin: 0; }
.admin-sort label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.admin-sort select { width: auto; }
.admin-sort [hidden] { display: none; }

/* Catalog */
.admin-grid { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.admin-pc { position: relative; min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-pc.is-fav { border-color: var(--berry); box-shadow: inset 0 0 0 1px var(--berry); }
.admin-pc-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--blush); display: grid; place-items: center; font-size: 0.8rem; }
.admin-pc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.admin-heart-form { position: absolute; top: 8px; right: 8px; margin: 0; }
.admin-heart {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  color: #b4a9ae; font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.admin-heart[aria-pressed='true'] { color: #e0245e; border-color: #e0245e; }
.admin-heart:disabled { opacity: 0.45; cursor: not-allowed; }
.admin-pc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.admin-pc-body p { margin: 0; }
.admin-pc-title { font-size: 0.88rem; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.admin-pc-meta { font-size: 0.76rem; overflow-wrap: anywhere; }
.admin-pc-price { font-weight: 700; }
.admin-pc-views { font-size: 0.74rem; }
.admin-pc-link { font-size: 0.8rem; }
[data-live-results][aria-busy='true'] { opacity: 0.6; transition: opacity 0.15s ease 0.2s; }
.tag { font-size: 0.68rem; padding: 2px 7px; border-radius: 999px; background: var(--blush); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }

/* Views */
.admin-views { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.admin-view-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.admin-view-row.is-dragging { opacity: 0.5; }
.admin-handle { cursor: grab; color: var(--muted); user-select: none; padding: 6px 4px; touch-action: none; }
.admin-view-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.admin-view-name { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.admin-live-form, .admin-move { display: flex; align-items: center; gap: 8px; margin: 0; }
.admin-move form { margin: 0; }
.admin-view-row .admin-live-form, .admin-view-row .admin-move { grid-column: 2; }
@media (min-width: 720px) {
  .admin-view-row { grid-template-columns: auto 1fr auto auto; }
  .admin-view-row .admin-live-form, .admin-view-row .admin-move { grid-column: auto; }
}
.admin-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.admin-switch input { width: 22px; height: 22px; accent-color: var(--berry); }

/* A markup field beside its margin field: on a view, and on each product in it. */
.admin-grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.admin-markup-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.admin-markup-row label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.78rem; }
.admin-markup-row input[type='number'] { width: 96px; min-height: 40px; padding: 6px 8px; }
.admin-markup p { margin: 10px 0 0; }
.admin-markup-item { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 6px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
.admin-markup-item .admin-markup-row input[type='number'] { width: 78px; }
.admin-markup-item p { margin: 0; }
.admin-markup-out { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.admin-view-markups { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 6px; }

/* Markups */
.admin-blanket { margin-top: 0; }
.admin-blanket-line { margin: 0 0 10px; font-size: 1.05rem; }
.admin-inline-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.admin-inline-form input[type='number'] { width: 96px; min-height: 40px; padding: 6px 8px; }
.admin-table-wrap { overflow-x: auto; max-width: 100%; margin-bottom: 8px; }
.admin-rules { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-rules th, .admin-rules td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-rules th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.admin-rules td form { margin: 0; }
.admin-rules td:first-child { overflow-wrap: anywhere; }

/* ── Custom gifts page ──────────────────────────────────────────────────── */
/* The page is complete without script: the story shows step 1's picture and all
   six captions, and the form is plain fields. These are the still styles; the
   story's motion and the budget slider are added with the page script. */

.gift-eyebrow { margin: 0 0 10px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--berry); }

/* Story */
.gift-story .wrap { padding-top: 40px; padding-bottom: 44px; display: grid; gap: 22px; }
.gift-story p, .gift-ask p, .gift-form p { margin: 0; }
.gift-story-head { display: grid; gap: 6px; }
.gift-story-head h2, .gift-ask h2 { margin: 0; }
.gift-story-grid { display: grid; gap: 18px; align-items: start; }
@media (min-width: 900px) { .gift-story-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; } }
.gift-stage-box { min-width: 0; display: grid; gap: 10px; }
/* The story's photos, stacked in one frame: 4:5 on a phone, cropped on each photo's subject, and the
   whole 8:5 photo from 640px. One carries "on" and shows; the script moves it as the story plays. */
.gift-stage { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 14px; border: 1px solid var(--line); background: var(--blush); }
@media (min-width: 640px) { .gift-stage { aspect-ratio: 8 / 5; } }
.gift-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform-origin: var(--gift-focus, 50% 50%); }
.gift-photo.on { opacity: 1; z-index: 1; }
/* Where each photo's subject is: the phone crop keeps it in frame and the push-in moves toward it. */
.gift-photo[data-steps='1'] { object-position: 50% 40%; --gift-focus: 50% 40%; }
.gift-photo[data-steps='2'] { object-position: 62% 55%; --gift-focus: 62% 55%; }
.gift-photo[data-steps='3'] { object-position: 55% 45%; --gift-focus: 55% 45%; }
.gift-photo[data-steps='4'] { object-position: 44% 55%; --gift-focus: 44% 55%; }
.gift-photo[data-steps='5'] { object-position: 45% 55%; --gift-focus: 45% 55%; }
.gift-photo[data-steps='6'] { object-position: 48% 50%; --gift-focus: 48% 50%; }
.gift-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gift-now { margin-left: auto; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.gift-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-width: 0; }
.gift-step { border: 1px solid transparent; border-radius: var(--radius); padding: 10px 12px; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: start; position: relative; overflow: hidden; }
.gift-num { grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 0.9rem; background: var(--paper); color: var(--muted); border: 1.5px solid var(--line); }
.gift-ttl { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 600; }
.gift-who { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.gift-cap { display: block; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.gift-step.is-on { background: var(--blush); border-color: var(--line); }
.gift-step.is-on .gift-num { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.gift-step.is-on .gift-ttl b, .gift-step.is-on .gift-who { color: var(--berry); }
.gift-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.gift-bar i { display: block; height: 100%; width: 0; background: var(--berry); }


/* The request */
.gift-ask { background: var(--blush); border-top: 1px solid var(--line); }
.gift-ask-grid { padding-top: 40px; padding-bottom: 56px; display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .gift-ask-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; } }
.gift-ask-intro { display: grid; gap: 14px; min-width: 0; }
.gift-next { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gift-next li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; align-items: baseline; color: var(--muted); }
.gift-next li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); transform: translateY(1px); }
.gift-next b { color: var(--ink); font-weight: 600; }
.gift-form { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 22px 18px; display: grid; gap: 22px; min-width: 0; }
/* A refused request opens at #gift-form: keep its top clear of the sticky header, which wraps to two rows on a phone. */
#gift-form { scroll-margin-top: 140px; }
@media (min-width: 900px) { #gift-form { scroll-margin-top: 96px; } }
@media (min-width: 560px) { .gift-form { padding: 28px; } }
.gift-form h3 { margin: 0; font-size: 1.35rem; }
.gift-form-off { justify-items: start; gap: 14px; }
.gift-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.gift-form legend, .gift-lab { padding: 0; font-weight: 600; font-size: 0.98rem; }
.gift-form legend { margin-bottom: 10px; }
.gift-opt { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.gift-hint { color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.gift-field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.gift-pair { display: grid; gap: 16px; }
@media (min-width: 560px) { .gift-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gift-trio { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.gift-trio .gift-field:first-child { grid-column: 1 / -1; }
@media (min-width: 560px) { .gift-trio { grid-template-columns: minmax(0, 2fr) minmax(0, 0.7fr) minmax(0, 1fr); } .gift-trio .gift-field:first-child { grid-column: auto; } }
.gift-form input:not([type='radio']), .gift-form select, .gift-form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 12px;
}
.gift-form textarea { resize: vertical; min-height: 104px; }
.gift-form [aria-invalid='true'] { border-color: var(--err); }
.gift-form ::placeholder { color: #9b8f95; }
.gift-error { color: var(--err); font-size: 0.86rem; font-weight: 600; }
.gift-problem { padding: 12px 16px; border-radius: 8px; background: #fbeeec; border: 1px solid #f0d0cb; color: var(--err); font-weight: 600; }
.gift-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.gift-pick { position: relative; }
.gift-pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.gift-pick span { display: block; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 0.92rem; font-weight: 500; background: var(--paper); }
.gift-pick input:hover + span { border-color: var(--berry); }
.gift-pick input:checked + span { background: var(--berry); border-color: var(--berry); color: #fff; }
.gift-pick input:focus-visible + span { box-shadow: 0 0 0 3px rgba(154, 0, 75, 0.28); border-color: var(--berry); }
.gift-send { display: grid; gap: 10px; justify-items: start; }
/* The trap field for bots: out of sight and out of the tab order, but still in the page. */
.gift-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.gift-thanks { padding-top: 64px; padding-bottom: 80px; }
.gift-thanks .lede { margin-left: 0; margin-bottom: 24px; }

/* Captions: with script on a narrow screen only the current step's caption is open;
   without script (or on a wide screen) all six stay open. */
@media (max-width: 899px) { .gift-enhanced .gift-step:not(.is-on) .gift-cap { display: none; } }

/* Motion. Each rule below ends in the finished state the still rules above already
   draw, so a visitor who asks for reduced motion (see the block at the end) sees the
   same pictures without any of it. */
.gift-step { transition: background 0.3s ease, border-color 0.3s ease; }
.gift-playing .gift-step.is-on .gift-bar i { animation: gift-fill 5600ms linear forwards; }
@keyframes gift-fill { from { width: 0; } to { width: 100%; } }

/* The photos cross-fade: the new one fades in on top while the old one stays underneath, then the
   old one fades out, so there is never a blank frame. The photo on show slowly moves in toward its
   subject over its step (5.6 s, the same as the progress line), only while the story plays. */
.gift-photo { transition: opacity 0.9s ease 0.9s; }
.gift-photo.on { transition-delay: 0s; animation: gift-push 5600ms ease-out both; animation-play-state: paused; }
.gift-playing .gift-photo.on { animation-play-state: running; }
@keyframes gift-push { from { transform: scale(1); } to { transform: scale(1.06); } }

/* The budget slider the script builds over the budget select. The filled part of the
   track follows --gift-lo and --gift-hi, which the script sets on .gift-range. With one
   handle (.gift-range-one) a tap anywhere on the track moves it there. */
.gift-form [hidden] { display: none; }
.gift-slider { grid-column: 1 / -1; display: grid; gap: 6px; min-width: 0; }
.gift-read { font: 400 1.5rem/1.2 var(--display); color: var(--berry); letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }
.gift-range { position: relative; height: 44px; --gift-lo: 6%; --gift-hi: 22%; }
.gift-rail { position: absolute; left: 13px; right: 13px; top: 19px; height: 6px; border-radius: 3px; background: var(--line); }
.gift-rail i { position: absolute; top: 0; bottom: 0; left: var(--gift-lo); right: calc(100% - var(--gift-hi)); background: var(--berry); border-radius: 3px; }
.gift-form .gift-range input { position: absolute; left: 0; top: 0; width: 100%; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.gift-range input::-webkit-slider-runnable-track { background: none; height: 44px; }
.gift-range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 26px; height: 26px; margin-top: 9px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--berry); box-shadow: 0 2px 6px rgba(21, 19, 20, 0.25); cursor: grab; }
.gift-range input::-moz-range-track { background: none; }
.gift-range input::-moz-range-thumb { pointer-events: auto; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--berry); box-shadow: 0 2px 6px rgba(21, 19, 20, 0.25); cursor: grab; }
.gift-form .gift-range input:focus-visible { outline: none; }
.gift-form .gift-range-one input { pointer-events: auto; cursor: pointer; }
.gift-range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(154, 0, 75, 0.28); }
.gift-range input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 5px rgba(154, 0, 75, 0.28); }
.gift-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.8rem; padding: 0 4px; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .wall-tile img { transition: none; }
  /* The story and its progress line: no transitions and no animations, so each photo simply
     appears, still. */
  .gift-step, .gift-bar i, .gift-photo, .gift-tap::before, .gift-tap::after { transition: none !important; }
  .gift-bar i, .gift-photo.on, .gift-seg i { animation: none !important; }
}

/* Dashboard: bars are CSS widths, tiles wrap to one column at phone width. */
.admin-dash-section { margin: 0 0 28px; }
.admin-dash-section h2 { font-size: 1.1rem; margin: 0 0 4px; }
.admin-dash-section > .muted { margin: 0 0 12px; }
.admin-dash-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-dash-bar { display: grid; grid-template-columns: minmax(7.5em, auto) 2.5em minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none; }
.admin-dash-bar:hover { border-color: var(--berry); }
.admin-dash-label { font-weight: 600; }
.admin-dash-count { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.admin-dash-track { display: block; width: 100%; height: 14px; border-radius: 999px; background: var(--blush); overflow: hidden; }
.admin-dash-fill { fill: var(--berry); }
.admin-dash-split { margin: 4px 0 0 10px; font-size: 0.86rem; }
.admin-dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin: 0; }
.admin-dash-tile { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 12px; min-width: 0; }
.admin-dash-tile dt { font-size: 0.86rem; font-weight: 600; }
.admin-dash-tile dd { margin: 0; }
.admin-dash-value { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.admin-dash-note { font-size: 0.82rem; }
.admin-dash-foot { margin: 10px 0 0; font-size: 0.82rem; }
@media (max-width: 480px) {
  .admin-dash-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-dash-track { grid-column: 1 / -1; }
}

/* Name-frame designer: the wood preview, its messages and the spelling check. */
.frame-stage { display: grid; place-items: center; min-height: 180px; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.frame-stage .frame-preview { display: block; width: 100%; max-width: 520px; height: auto; filter: drop-shadow(0 6px 14px rgba(43, 29, 18, 0.25)); }
.frame-empty { margin: 0; text-align: center; }
.frame-messages { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.frame-messages:empty { display: none; }
.frame-problem { color: var(--berry); font-weight: 600; }
.frame-note { color: var(--muted); font-size: 0.92rem; }
.frame-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.frame-tools .hint { margin: 0; }
.frame-check { margin: 0; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--paper); display: grid; gap: 10px; }
.frame-check legend { font-weight: 700; padding: 0 6px; }
.frame-check .hint { margin: 0; }
.frame-spelling { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.frame-spelling:empty { display: none; }
.frame-spelling dt { font-weight: 600; color: var(--muted); }
.frame-spelling dd { margin: 0; font-weight: 700; letter-spacing: 0.02em; overflow-wrap: anywhere; }
.personalize .frame-check input[type='checkbox'] { width: auto; }
.cart-photo .frame-preview { display: block; width: 100%; height: auto; }
.cart-section { margin: 28px 0 8px; }
.cart-section h2 { font-size: 1.25rem; margin-bottom: 4px; }
.cart-section p { margin: 0; }
.frame-tools [hidden] { display: none; }
.order-frame { max-width: 520px; }
.order-frame .frame-preview { display: block; width: 100%; height: auto; }
.frame-checkout-line { display: flex; gap: 12px; align-items: center; }
.frame-checkout-pic { flex: 0 0 72px; }
.frame-checkout-pic .frame-preview { display: block; width: 72px; height: auto; }
.admin-frame { max-width: 320px; margin-top: 8px; }
.admin-frame .frame-preview { display: block; width: 100%; height: auto; }
.frame-backgrounds { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.frame-backgrounds legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.frame-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.frame-swatch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; }
.frame-swatch:has(input:checked) { border-color: var(--berry); box-shadow: 0 0 0 1px var(--berry); }
.personalize .frame-swatch input[type='radio'] { width: auto; margin: 0; }
.frame-swatch svg { display: block; flex: none; }
.admin-discount-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Sale prices: the full price struck through, then the sale price in bold red with the saving. */
.on-sale .price-was { display: block; color: var(--muted); font-weight: 400; font-size: 0.85em; text-decoration: line-through; }
.on-sale .price-now { color: var(--sale); font-weight: 800; }
.on-sale .price-save { color: var(--sale); font-weight: 700; font-size: 0.72em; white-space: nowrap; }
.price.on-sale .price-was { margin-bottom: 6px; }

/* "Back" on a product page. */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-weight: 600; font-size: 0.95rem; color: var(--berry); text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.tag-sale { background: #fdecec; color: var(--sale); }
.admin-item-sale { display: flex; align-items: flex-end; gap: 8px; margin: 8px 0; }
.admin-item-sale label { font-size: 0.85rem; }
.admin-item-sale input { width: 5em; }
.cart-edit { display: inline-block; font-weight: 600; color: var(--berry); }
.admin-menu-list { list-style: none; padding: 0; margin: 0; }
.admin-menu-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.admin-menu-moves { display: flex; gap: 6px; }
.admin-menu-moves form { margin: 0; }
.product-option { border: 0; padding: 0; margin: 0 0 14px; }
.product-option legend { font-weight: 600; margin-bottom: 6px; }
.product-option-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.product-option-choice { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; }
.product-option-choice:has(input:checked) { border-color: var(--berry); box-shadow: 0 0 0 1px var(--berry); }
.personalize .product-option-choice input[type='radio'] { width: auto; margin: 0; }

/* The frame preview's copy-picture button, top right over the picture. */
.frame-stage-wrap { position: relative; }
.frame-copy { position: absolute; top: 8px; right: 8px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; box-shadow: var(--shadow); }
.frame-copy:hover, .frame-copy:focus-visible { color: var(--berry); border-color: var(--berry); }
.frame-copy[hidden] { display: none; }
.frame-copy-status { position: absolute; top: 50px; right: 8px; z-index: 1; margin: 0; max-width: 70%; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 0.85rem; }
.frame-copy-status:empty { display: none; }
.personalize label.frame-scores { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; font-weight: 600; cursor: pointer; }
.personalize .frame-scores input[type='checkbox'] { width: 20px; height: 20px; padding: 0; flex: none; accent-color: var(--berry); }
/* The story told on the photo, as stories are: six progress segments across the top, the current
   step's caption on a dark fade at the bottom, and taps (clicks) on the left and right of the photo
   for back and forward. Only with script (gift-enhanced), at every width: the photo then takes the
   whole row, and the six-step list stays for screen readers, folded out of sight. */
.gift-overlay, .gift-tap { display: none; }
.gift-story-grid.gift-enhanced { grid-template-columns: minmax(0, 1fr); }
.gift-enhanced .gift-stage-box { width: 100%; max-width: 920px; margin: 0 auto; }
.gift-enhanced .gift-overlay { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.gift-segs { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; }
.gift-seg { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.45); overflow: hidden; }
.gift-seg i { display: block; height: 100%; width: 0; background: #fff; }
.gift-seg.done i { width: 100%; }
.gift-enhanced:not(.gift-playing) .gift-seg.now i { width: 100%; }
.gift-playing .gift-seg.now i { animation: gift-fill 5600ms linear forwards; }
/* Dark enough through the middle, where the step title sits, to keep white words at 4.5:1 or better over
   the brightest photo; the shadow lifts the letters off any light patch the fade lets through. */
.gift-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 16px 16px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); background: linear-gradient(to top, rgba(18, 12, 14, 0.9) 0%, rgba(18, 12, 14, 0.82) 60%, rgba(18, 12, 14, 0.45) 85%, rgba(18, 12, 14, 0) 100%); }
.gift-cap-line { display: none; margin: 0; }
.gift-cap-line.on { display: grid; gap: 4px; }
.gift-cap-line b { font-size: 1.02rem; line-height: 1.25; }
.gift-cap-who { justify-self: start; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); }
.gift-cap-body { font-size: 0.92rem; line-height: 1.4; }
.gift-enhanced .gift-tap { display: block; position: absolute; top: 0; bottom: 0; z-index: 3; width: 38%; padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gift-tap-prev { left: 0; }
.gift-tap-next { right: 0; }
.gift-tap:focus-visible { outline: 3px solid #fff; outline-offset: -6px; border-radius: 12px; }
.gift-enhanced .gift-steps { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gift-enhanced .gift-now { display: none; }
/* A wider photo gets a roomier caption, kept to a readable line length. */
@media (min-width: 640px) {
  .gift-segs { top: 14px; left: 16px; right: 16px; gap: 6px; }
  .gift-caption { padding: 96px 28px 24px; }
  .gift-cap-line.on { gap: 6px; max-width: 46em; }
  .gift-cap-line b { font-size: 1.3rem; }
  .gift-cap-body { font-size: 1.02rem; line-height: 1.5; }
}
/* With a mouse, a round arrow shows on the side the pointer is over, so the clicks are found. */
.gift-tap::after { content: ''; position: absolute; top: 50%; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; background: rgba(18, 12, 14, 0.45); opacity: 0; transition: opacity 0.2s ease; }
.gift-tap::before { content: ''; position: absolute; top: 50%; z-index: 1; width: 10px; height: 10px; margin-top: -5px; border: solid #fff; border-width: 0 0 2.5px 2.5px; opacity: 0; transition: opacity 0.2s ease; }
.gift-tap-prev::after { left: 14px; }
.gift-tap-prev::before { left: 31px; transform: rotate(45deg); }
.gift-tap-next::after { right: 14px; }
.gift-tap-next::before { right: 31px; transform: rotate(-135deg); }
@media (hover: hover) { .gift-tap:hover::after, .gift-tap:hover::before { opacity: 1; } }
.gift-tap:focus-visible::after, .gift-tap:focus-visible::before { opacity: 1; }
