/* ===========================================================================
   Artist site stylesheet.
   Admin = "Warm Atelier": the painter's studio backstage. Paper, umber ink,
   sienna pigment, museum-placard cards. Senior-friendly throughout:
   >=18px text, >=48px targets, AA+ contrast, calm predictable motion.
   ======================================================================== */

/* --- Self-hosted fonts (CSP 'self'; latin-ext = Romanian diacritics) ------ */

@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/vendor/fonts/atkinson-latin-ext-400.woff2') format('woff2');
  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: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/vendor/fonts/atkinson-latin-400.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/vendor/fonts/atkinson-latin-ext-700.woff2') format('woff2');
  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: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/vendor/fonts/atkinson-latin-700.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/vendor/fonts/fraunces-latin-ext-600.woff2') format('woff2');
  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: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/vendor/fonts/fraunces-latin-600.woff2') format('woff2');
  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;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('/vendor/fonts/fraunces-latin-ext-600-italic.woff2') format('woff2');
  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: 'Fraunces';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('/vendor/fonts/fraunces-latin-600-italic.woff2') format('woff2');
  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;
}

/* --- Design tokens --------------------------------------------------------- */

:root {
  /* shared */
  --ink: #2b2118; /* deep umber, ~13:1 on paper */
  --ink-soft: #6f6051; /* captions; >=4.5:1 on paper */
  --paper: #f9f6f0; /* brighter warm off-white canvas */
  --card: #ffffff; /* clean white for cards/panels */
  --sienna: #9c4a21; /* primary pigment */
  --sienna-deep: #7a3717;
  --ochre: #c8a96a; /* decorative only, never text */
  --leaf: #2e6b34; /* success */
  --brick: #a8321e; /* danger */
  --line: #e7e0d2; /* soft hairline borders on paper */

  /* public site keeps its older names, mapped to the same family */
  --accent: var(--sienna);
  --muted: var(--ink-soft);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Atkinson Hyperlegible', Verdana, system-ui, sans-serif;

  --shadow-card: 0 1px 2px rgba(43, 33, 24, 0.05), 0 8px 24px rgba(43, 33, 24, 0.06);
  --shadow-press: 2px 3px 0 rgba(43, 33, 24, 0.16);
  --shadow-lift: 0 6px 16px rgba(43, 33, 24, 0.1), 0 22px 48px rgba(43, 33, 24, 0.14);

  /* deeper umber for hero scrims / dark accents */
  --ink-deep: #1b140d;
  /* a touch warmer/deeper paper for alternating bands */
  --sand: #f1ece0;

  /* Fluid type scale (Fraunces display headings, Atkinson body) */
  --step--1: clamp(0.83rem, 0.79rem + 0.18vw, 0.94rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.13rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.5rem);
  --step-2: clamp(1.44rem, 1.3rem + 0.7vw, 2rem);
  --step-3: clamp(1.73rem, 1.5rem + 1.15vw, 2.66rem);
  --step-4: clamp(2.07rem, 1.7rem + 1.85vw, 3.55rem);
  --step-5: clamp(2.49rem, 1.9rem + 2.95vw, 4.74rem);

  --measure: 64ch; /* comfortable prose line length */
  --hero-h: clamp(26rem, 70vh, 44rem);

  /* spacing scale */
  --space-1: 0.5rem;
  --space-2: 0.85rem;
  --space-3: 1.3rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;

  --shadow-frame: 0 2px 4px rgba(27, 20, 13, 0.1), 0 14px 36px rgba(27, 20, 13, 0.14);
}

* {
  box-sizing: border-box;
}

/* The hidden attribute must always win, even over display:flex/grid classes. */
[hidden] {
  display: none !important;
}

/* ===========================================================================
   PUBLIC SITE (visual redesign lands with the Phase 3 gallery)
   ======================================================================== */

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-3);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.6rem;
  padding: 0.95rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

/* The red chop/seal echoed from the paintings, drawn in CSS. */
.brand-seal {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 5px;
  background: var(--sienna);
  color: #fff7ec;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1.5px rgba(255, 247, 236, 0.55);
  transform: rotate(-3deg);
}

.site-nav {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.4rem;
  align-items: center;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.02rem;
  /* Top/bottom padding is deliberately uneven (+/-0.26rem around 0.5rem): it
     drops the link text onto the wordmark's baseline (24px Fraunces vs 16.32px
     Atkinson under center alignment) without changing the box height, so the
     header row and the right-side tools don't move. */
  padding: 0.76rem 0.15rem 0.24rem;
  border-bottom: 2px solid transparent;
  transition: border-color 140ms ease, color 140ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  border-bottom-color: var(--ochre);
}

/* Round flag button that switches to the other language. */
.lang-switch a {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.lang-switch svg {
  display: block;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(43, 33, 24, 0.12);
}

.lang-switch a:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(156, 74, 33, 0.12);
}

/* Right-aligned header tools: discreet search + language switch. */
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.header-search {
  display: flex;
  align-items: center;
  margin: 0; /* kill the UA's default form margin so the pill centers in the row */
  height: 44px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color 140ms ease, box-shadow 140ms ease, width 180ms ease;
}
.header-search:focus-within {
  border-color: var(--sienna);
  box-shadow: 0 0 0 3px rgba(156, 74, 33, 0.12);
}
.header-search input {
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  padding: 0.5rem 0.2rem 0.5rem 0.95rem;
  width: 11rem;
  min-height: 40px;
}
.header-search input::placeholder {
  color: var(--muted);
}
.header-search input:focus {
  outline: none;
}
.header-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0 0.7rem;
  min-height: 40px;
}
.header-search-btn:hover {
  color: var(--sienna);
}

main {
  max-width: 64rem;
  margin: 0 auto;
  padding: var(--space-4) clamp(1rem, 4vw, 2rem) var(--space-6);
}

/* Clear, on-brand keyboard focus everywhere (accessibility + polish). */
:where(a, button, summary, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--sienna);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header reflows on small screens: nav drops to its own row, search stays
   beside the wordmark and shrinks. */
@media (max-width: 44rem) {
  .site-nav {
    order: 3;
    flex-basis: 100%;
    gap: 0.2rem 1.1rem;
  }
  /* Nav sits on its own row here — no wordmark beside it to baseline-match,
     so symmetric padding again. */
  .site-nav a {
    padding: 0.5rem 0.15rem;
  }
  .header-tools {
    margin-left: auto;
  }
  .header-search input {
    width: 8rem;
  }
}

/* Quiet typographic hero (home fallback when no featured image) */
.hero {
  text-align: center;
  padding: var(--space-6) 0 var(--space-5);
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.hero > p {
  color: var(--ink-soft);
  font-size: var(--step-1);
  margin: 0 auto;
  max-width: 44ch;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  padding: var(--space-5) clamp(1rem, 4vw, 2rem);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--sand);
}

.footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.3rem;
}

.footer-nav a,
.footer-social a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-social a:hover {
  color: var(--sienna);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-legal {
  flex-basis: 100%;
  font-size: var(--step--1);
  color: var(--muted);
}

/* Public page body (artist-authored rich text) */
.page-body {
  line-height: 1.75;
}

/* --- Gallery: artwork cards as small framed canvases --------------------- */

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: clamp(1.6rem, 3.5vw, 3rem);
  margin: var(--space-4) 0 var(--space-6);
}

.art-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}

/* Clean, modern card: the artwork itself with a soft shadow that lifts on
   hover — no heavy frame, the art carries the page. */
.art-frame {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.art-frame img {
  display: block;
  width: 100%;
  height: 17rem;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
  .art-card:hover .art-frame {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lift);
  }
  .art-card:hover .art-frame img {
    transform: scale(1.05);
  }
}

.art-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
  margin-top: 0.15rem;
}

.art-meta {
  color: var(--ink-soft);
  font-size: 0.92rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.art-price {
  color: var(--sienna);
  font-weight: 700;
}

.art-badge-sold {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}

/* --- Gallery head: title + discreet filter trigger ------------------------ */
.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.filter {
  flex: none;
}
/* The trigger pill (a label toggling the hidden .filter-toggle checkbox). */
.filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  transition: border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
.filter-trigger:hover {
  border-color: var(--sienna);
  color: var(--sienna);
}
.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--sienna);
  color: #fff7ec;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Dimmed backdrop + right-hand drawer, toggled by the checkbox. */
.filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(27, 20, 13, 0.42);
  opacity: 0;
  visibility: hidden;
  cursor: default;
}
.filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  height: 100dvh;
  width: min(23rem, 92vw);
  transform: translateX(101%);
  background: var(--card);
  box-shadow: -10px 0 44px rgba(27, 20, 13, 0.2);
  overflow-y: auto;
  padding: 1.5rem 1.5rem 2rem;
}
.filter-toggle:checked ~ .filter-backdrop {
  opacity: 1;
  visibility: visible;
}
.filter-toggle:checked ~ .filter-drawer {
  transform: none;
}
@media (prefers-reduced-motion: no-preference) {
  .filter-backdrop {
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }
  .filter-drawer {
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  }
}
.filter-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}
.filter-drawer-title {
  font-family: var(--font-display);
  font-size: var(--step-2);
}
.filter-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
}
.filter-close:hover {
  background: var(--sand);
  color: var(--ink);
}
.filter-fields {
  display: grid;
  gap: 0.9rem;
}
.filter-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.filter-fields select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  min-height: 46px;
}
.filter-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1.6rem;
}
.filter-clear {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.filter-clear:hover {
  color: var(--brick);
}

/* Active-filter chips: discreet, each removable, below the gallery head. */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}
.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--step--1);
  color: var(--ink);
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  text-decoration: none;
}
.active-chip:hover {
  border-color: var(--sienna);
}
.active-chip-x {
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.active-chip:hover .active-chip-x {
  color: var(--brick);
}
.active-clear {
  font-size: var(--step--1);
  color: var(--sienna);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Painting detail -------------------------------------------------------- */

.painting-detail {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr);
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 56rem) {
  .painting-detail {
    grid-template-columns: 1fr;
  }
}

.painting-images {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.painting-photo {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
}

.painting-info .page-title {
  margin-bottom: 0.2rem;
}

.painting-price {
  font-size: 1.15rem;
  margin: 1rem 0;
}

.prints-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.3rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-card);
}

.prints-box h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.prints-table {
  width: 100%;
  border-collapse: collapse;
}

.prints-table td {
  padding: 0.45rem 0;
  border-bottom: 1px solid #ece4d2;
}

.prints-table td:last-child {
  text-align: right;
}

.prints-table tr:last-child td {
  border-bottom: none;
}

.hero-cta {
  text-align: center;
  margin: 1.5rem 0 2.5rem;
}

.button-link {
  display: inline-block;
  background: var(--sienna);
  color: #fff7ec;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.8rem;
  border-radius: 10px;
  box-shadow: var(--shadow-press);
}

.button-link:hover {
  background: var(--sienna-deep);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 21, 14, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 100;
  cursor: zoom-out;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Error / 404 pages (inline styles are blocked by the strict CSP) */
body.error-page {
  font-family: var(--font-body);
}

body.error-page main {
  max-width: 36rem;
  margin: 4rem auto;
  padding: 0 1.5rem;
  text-align: center;
}

body.error-page .brand-seal {
  margin: 0 auto 1.2rem;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.3rem;
}

body.error-page h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-3);
}

body.error-page a {
  color: var(--accent);
}

/* ===========================================================================
   PUBLIC — gallery redesign (layout utilities, buttons, hero, commerce)
   ======================================================================== */

body {
  overflow-x: hidden; /* lets .full-bleed use 100vw without a scroll gutter */
}

/* Break out of the centered main to span the viewport. */
.full-bleed {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

/* --- Buttons (one public system) ------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1;
  padding: 0.85rem 1.6rem;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, background 140ms ease, box-shadow 140ms ease,
    border-color 140ms ease, color 140ms ease;
}
.btn-primary {
  background: var(--sienna);
  color: #fff7ec;
  box-shadow: var(--shadow-press);
}
.btn-primary:hover {
  background: var(--sienna-deep);
}
.btn-primary:active {
  transform: translate(1px, 2px);
  box-shadow: 1px 1px 0 rgba(43, 33, 24, 0.18);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--sienna);
  color: var(--sienna);
}
.btn-lg {
  font-size: 1.12rem;
  padding: 1rem 2.1rem;
}

/* --- Section headings / eyebrows ------------------------------------------ */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--sienna);
  margin: 0 0 0.5rem;
}
.section-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-3);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
}
.center {
  text-align: center;
}

/* Attribute chips on the painting detail page (technique/support/size/subjects) */
.attr-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0.6rem 0 1.1rem;
}
.attr-chips .chip {
  display: inline-block;
  font-size: var(--step--1);
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--ochre);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}
a.chip:hover {
  background: var(--sienna);
  border-color: var(--sienna);
  color: #fff7ec;
}

/* Admin subjects checkbox group */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.3rem 1.2rem;
  margin-bottom: 0.5rem;
}

/* --- Image-led hero -------------------------------------------------------- */
.hero-featured {
  position: relative;
  isolation: isolate;
  height: var(--hero-h);
  /* block-only so .full-bleed's margin-inline (the 100vw bleed) survives */
  margin-block: 0 var(--space-5);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--ink-deep);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      to top,
      rgba(27, 20, 13, 0.8) 0%,
      rgba(27, 20, 13, 0.34) 42%,
      rgba(27, 20, 13, 0) 75%
    ),
    linear-gradient(to right, rgba(27, 20, 13, 0.42), rgba(27, 20, 13, 0) 58%);
}
.hero-overlay {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 4rem);
  color: #fbf6ec;
}
.hero-overlay .eyebrow {
  color: var(--ochre);
}
.hero-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-5);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.45);
}
.hero-tag {
  font-size: var(--step-1);
  margin: 0 0 1.5rem;
  max-width: 38ch;
  color: #f1e7d6;
}

/* Short artist statement under the hero */
.home-statement {
  max-width: var(--measure);
  margin: 0 auto var(--space-5);
  text-align: center;
  font-size: var(--step-1);
  line-height: 1.75;
  color: var(--ink-soft);
}

/* --- Static page prose ----------------------------------------------------- */
.page-prose {
  max-width: var(--measure);
  margin: 0 auto;
}
.page-body h2,
.page-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 1.8rem 0 0.6rem;
}
.page-body h2 {
  font-size: var(--step-2);
}
.page-body h3 {
  font-size: var(--step-1);
}
.page-body p {
  margin: 0 0 1.1rem;
}
.page-body a {
  color: var(--sienna);
  text-underline-offset: 2px;
}
.page-body blockquote {
  margin: 1.4rem 0;
  padding: 0.4rem 0 0.4rem 1.2rem;
  border-left: 3px solid var(--ochre);
  font-style: italic;
  color: var(--ink-soft);
}
.page-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* --- Checkout -------------------------------------------------------------- */
.checkout {
  max-width: 56rem;
  margin: 0 auto;
}
.checkout-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-4);
}
.checkout-summary img {
  width: 120px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.checkout-summary h2 {
  font-family: var(--font-display);
  font-size: var(--step-1);
  margin: 0 0 0.25rem;
}
.checkout-price {
  font-size: var(--step-1);
  margin: 0;
}
.checkout-price strong {
  color: var(--sienna);
}

/* Public form fields (checkout + order lookup) */
.checkout label,
.order-lookup label {
  display: block;
  font-weight: 700;
  margin: 0.9rem 0 0.3rem;
}
.checkout input,
.checkout select,
.order-lookup input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.02rem;
  padding: 0.7rem 0.85rem;
  min-height: 48px;
  border: 1.5px solid #b9ab90;
  border-radius: 9px;
  background: var(--card);
  color: var(--ink);
}
.checkout input:focus,
.checkout select:focus,
.order-lookup input:focus {
  outline: 2px solid var(--sienna);
  outline-offset: 1px;
  border-color: var(--sienna);
}
.checkout-error {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  background: #fbe9e4;
  border: 1px solid var(--brick);
  color: #7e1d10;
  border-radius: 9px;
}

/* --- Contact form --- */
.contact {
  max-width: 42rem;
  margin: 0 auto;
}
.contact-form {
  margin-top: 1.4rem;
}
.contact-form .cf-turnstile {
  margin: 0.4rem 0;
}
.contact-error {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  background: #fbe9e4;
  border: 1px solid var(--brick);
  color: #7e1d10;
  border-radius: 9px;
}
.contact-success {
  margin: 1.4rem 0;
  padding: 1rem 1.2rem;
  background: #e8f3e6;
  border: 1px solid var(--leaf, #5a7d4f);
  color: #2f4a28;
  border-radius: 9px;
  font-size: 1.1rem;
}
/* Honeypot: kept off-screen (not display:none, which some bots skip). Real
   visitors never see or fill it; a filled value flags automation. */
.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
#paypal-button {
  margin-top: 1.4rem;
  min-height: 48px;
}

/* --- Order status + confirmation ------------------------------------------ */
.order-lookup {
  max-width: 32rem;
}
.order-status {
  max-width: 32rem;
  margin-top: 1.4rem;
  padding: 1rem 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  font-size: var(--step-1);
}
.confirmation {
  max-width: 40rem;
  margin: var(--space-5) auto;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1.6rem, 5vw, 3rem);
  box-shadow: var(--shadow-card);
}
.confirmation .brand-seal {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.4rem;
  margin: 0 auto 1rem;
  transform: rotate(-4deg);
}
.confirmation .order-ref {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--sienna);
}

/* --- Motion ---------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-overlay > * {
    animation: heroRise 600ms both ease-out;
  }
  .hero-overlay > *:nth-child(2) {
    animation-delay: 90ms;
  }
  .hero-overlay > *:nth-child(3) {
    animation-delay: 180ms;
  }
  .hero-overlay > *:nth-child(4) {
    animation-delay: 270ms;
  }
  @keyframes heroRise {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* --- Narrow screens -------------------------------------------------------- */
@media (max-width: 34rem) {
  .checkout-summary {
    grid-template-columns: 1fr;
  }
  .checkout-summary img {
    width: 100%;
    height: 200px;
  }
}

/* Rich-text alignment/indent classes (emitted by the editor sanitizer).
   Shared by the public site and the admin editing surface. */
.ql-align-center {
  text-align: center;
}
.ql-align-right {
  text-align: right;
}
.ql-align-justify {
  text-align: justify;
}
.ql-indent-1 { padding-left: 3em; }
.ql-indent-2 { padding-left: 6em; }
.ql-indent-3 { padding-left: 9em; }
.ql-indent-4 { padding-left: 12em; }
.ql-indent-5 { padding-left: 15em; }
.ql-indent-6 { padding-left: 18em; }
.ql-indent-7 { padding-left: 21em; }
.ql-indent-8 { padding-left: 24em; }

/* ===========================================================================
   ADMIN — Warm Atelier
   ======================================================================== */

body.admin {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--ink);
  /* Paper atmosphere: warm light from above + a whisper of grain. */
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 252, 243, 0.9), rgba(255, 252, 243, 0) 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

/* --- Brand plaque header --------------------------------------------------- */

.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(180deg, #342819, var(--ink));
  border-bottom: 4px solid var(--ochre);
  box-shadow: 0 2px 10px rgba(43, 33, 24, 0.25);
}

.admin-header .site-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: #f6ecd9;
  letter-spacing: 0.01em;
  position: relative;
  padding-bottom: 0.15rem;
}

/* brush-stroke underline */
.admin-header .site-title::after {
  content: '';
  position: absolute;
  left: 2px;
  right: 14%;
  bottom: -2px;
  height: 4px;
  border-radius: 999px 999px 999px 2px;
  background: linear-gradient(90deg, var(--ochre) 0%, #b08c4d 55%, rgba(176, 140, 77, 0) 100%);
  transform: rotate(-0.6deg);
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.15rem;
  font-size: 1.02rem;
  color: #efe4cf;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 150ms ease, color 150ms ease;
}

.admin-nav a:hover {
  background: rgba(246, 236, 217, 0.12);
  color: #fff;
}

.admin-nav a.active {
  background: var(--sienna);
  color: #fff7ec;
  font-weight: 700;
  box-shadow: inset 0 -2px 0 rgba(43, 33, 24, 0.35);
}

.logout-form {
  display: inline;
  margin-left: 0.6rem;
}

body.admin button.quiet {
  border: none;
  background: none;
  color: #d8c8a8;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 48px;
  padding: 0 0.8rem;
  font-size: 1rem;
  cursor: pointer;
}

body.admin button.quiet:hover {
  color: #fff;
}

/* --- Main column ------------------------------------------------------------ */

.admin-main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2.2rem 2rem 4rem;
}

.admin-main h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.1rem;
  line-height: 1.2;
  margin: 0.4rem 0 0.6rem;
}

/* painted stroke under every page title */
.admin-main h1::after {
  content: '';
  display: block;
  width: 7rem;
  height: 4px;
  margin-top: 0.55rem;
  border-radius: 999px 2px 999px 2px;
  background: linear-gradient(90deg, var(--sienna) 0%, var(--ochre) 70%, rgba(200, 169, 106, 0) 100%);
}

.admin-main h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  margin-top: 2.2rem;
}

.lead {
  font-size: 1.12rem;
  max-width: 44rem;
}

.help {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0.1rem 0 0.3rem;
}

/* Gentle staggered arrival — one orchestrated moment, then stillness. */
@media (prefers-reduced-motion: no-preference) {
  .admin-main > * {
    animation: atelier-rise 360ms ease-out backwards;
  }
  .admin-main > :nth-child(2) { animation-delay: 60ms; }
  .admin-main > :nth-child(3) { animation-delay: 120ms; }
  .admin-main > :nth-child(4) { animation-delay: 180ms; }
  .admin-main > :nth-child(5) { animation-delay: 240ms; }
  .admin-main > :nth-child(n + 6) { animation-delay: 300ms; }
}

@keyframes atelier-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Banners ----------------------------------------------------------------- */

.flash {
  background: var(--leaf);
  color: #f3faf2;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.9rem 1.4rem;
  border-radius: 10px;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-card);
}

.error-banner {
  background: var(--brick);
  color: #fdf3f1;
  font-size: 1.08rem;
  padding: 0.9rem 1.4rem;
  border-radius: 10px;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow-card);
}

/* --- Forms -------------------------------------------------------------------- */

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.stack label,
.stack .field-label {
  font-size: 1.12rem;
  font-weight: 700;
  margin-top: 1.15rem;
}

.stack input[type='text'],
.stack input[type='email'],
.stack input[type='url'],
.stack input[type='password'],
.stack input[type='number'],
.stack textarea {
  font-family: var(--font-body);
  font-size: 1.1rem;
  padding: 0.72rem 0.95rem;
  border: 1.5px solid #b9ab90;
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(43, 33, 24, 0.05);
}

.stack input:focus-visible,
.stack textarea:focus-visible,
body.admin button:focus-visible,
body.admin a:focus-visible {
  outline: 3px solid var(--sienna);
  outline-offset: 2px;
}

.checkbox-row,
.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 1.05rem;
  font-weight: 400;
  padding: 0.5rem 0;
  cursor: pointer;
}

.checkbox-row input,
.radio-row input {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--sienna);
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.3rem 1.2rem;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

legend {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0 0.55rem;
}

/* --- Buttons -------------------------------------------------------------------- */

body.admin button,
body.admin a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.2; /* links inherit the body's 1.6 -> taller than buttons */
  padding: 0.6rem 1.6rem;
  border-radius: 10px;
  border: 1.5px solid #b9ab90;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-press);
  transition: transform 130ms ease, box-shadow 130ms ease;
}

@media (prefers-reduced-motion: no-preference) {
  body.admin button:hover,
  body.admin a.button:hover {
    transform: translateY(-1px);
    box-shadow: 3px 4px 0 rgba(43, 33, 24, 0.18);
  }
  body.admin button:active,
  body.admin a.button:active {
    transform: translateY(1px);
    box-shadow: 1px 1px 0 rgba(43, 33, 24, 0.14);
  }
}

body.admin button.primary,
body.admin a.button.primary {
  background: linear-gradient(180deg, #ad5526, var(--sienna));
  border-color: var(--sienna-deep);
  color: #fff7ec;
  font-weight: 700;
  margin-top: 1.3rem;
  align-self: flex-start;
}

/* Save + back-without-saving, side by side at the end of forms */
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Specificity must beat `body.admin button.primary` (margin/align-self). */
body.admin .form-actions button.primary,
body.admin .form-actions a.button {
  margin: 0;
  align-self: center;
}

body.admin button.primary:hover {
  background: linear-gradient(180deg, var(--sienna), var(--sienna-deep));
}

body.admin button.danger {
  background: var(--brick);
  border-color: #7e2516;
  color: #fdf3f1;
  font-weight: 700;
}

body.admin .danger-quiet {
  color: var(--brick);
}

/* --- Dashboard: museum placards --------------------------------------------------- */

.stat-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin: 1.6rem 0;
}

.stat-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--ink);
  outline: 1px solid var(--ochre);
  outline-offset: -5px;
  border-radius: 4px;
  padding: 1.3rem 1.7rem 1.1rem;
  display: flex;
  flex-direction: column;
  min-width: 12rem;
  box-shadow: var(--shadow-card);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.05;
  color: var(--sienna);
}

.stat-number::after {
  content: '';
  display: block;
  width: 2.4rem;
  height: 3px;
  margin: 0.35rem 0 0.5rem;
  border-radius: 999px;
  background: var(--ochre);
}

.stat-label {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}

/* Stat cards are links to the matching filtered list. */
a.stat-card {
  text-decoration: none;
  transition: transform 130ms ease, box-shadow 130ms ease, border-color 130ms ease;
}

a.stat-card:hover {
  border-color: var(--sienna);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

/* Status filter + title search above admin tables. */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.9rem 1.1rem;
  margin: 1.4rem 0 0.4rem;
  padding: 0.9rem 1.1rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.filter-bar select,
.filter-bar input[type='search'],
.filter-bar input[type='date'] {
  font-family: var(--font-body);
  font-size: 1.05rem;
  min-height: 48px;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid #b9ab90;
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
}

.filter-bar input[type='search'] {
  width: 16rem;
  max-width: 100%;
}

.filter-bar .filter-clear {
  color: var(--sienna);
  font-size: 1rem;
  align-self: center;
  margin-bottom: 0.6rem;
}

.filter-results {
  font-weight: 700;
  color: var(--ink-soft);
}

/* "Tradu automat din română" — quiet helper under the English fields. */
body.admin button.translate-btn {
  align-self: flex-start;
  min-height: 44px;
  padding: 0.35rem 0.9rem;
  font-size: 0.95rem;
  background: var(--paper);
  box-shadow: none;
}

body.admin button.translate-btn:hover {
  border-color: var(--sienna);
  color: var(--sienna);
}

body.admin button.translate-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

a.button.big {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 1.05rem 1.4rem;
  width: 100%;
  border-radius: 12px;
}

a.button.big:hover {
  border-color: var(--sienna);
}

.button-sub {
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-weight: 400;
}

/* --- Tables ------------------------------------------------------------------------- */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 1.2rem;
  box-shadow: var(--shadow-card);
}

.admin-table th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
  padding: 0.85rem 1.1rem;
  background: #efe7d6;
  border-bottom: 1px solid var(--line);
}

.admin-table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid #ece4d2;
  font-size: 1.02rem;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: #fbf7ec;
}

.row-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.row-actions .button {
  min-height: 44px;
  padding: 0.4rem 1.1rem;
  box-shadow: none;
}

/* --- Language folder tabs -------------------------------------------------------------- */

.lang-tabs {
  display: flex;
  gap: 0.45rem;
  padding: 0 0.6rem;
  margin-top: 0.8rem;
}

.lang-tabs .tab {
  min-height: 52px;
  font-size: 1.1rem;
  padding: 0.7rem 1.7rem;
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: #eadfca;
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: none;
  position: relative;
  top: 2px;
}

.lang-tabs .tab.active {
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  border-color: #b9ab90;
  top: 1px;
  z-index: 1;
  box-shadow: 0 -3px 8px rgba(43, 33, 24, 0.06);
}

/* wax-dot completion badge */
.tab-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.45rem;
  border-radius: 50%;
  background: var(--leaf);
  color: #f3faf2;
  font-size: 0.8rem;
  font-weight: 700;
}

.lang-panel {
  background: var(--card);
  border: 1px solid #b9ab90;
  border-radius: 12px;
  padding: 1.3rem 1.5rem 1.6rem;
  box-shadow: var(--shadow-card);
}

/* Admin: paintings list + photo manager */
.thumb-cell {
  width: 64px;
}

.row-thumb {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.row-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--ink-soft);
  background: #efe7d6;
  text-align: center;
}

.order-cell {
  white-space: nowrap;
}

.move-form {
  display: inline;
}

body.admin .move-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1rem;
}

body.admin .move-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 1rem;
}

.photo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.photo-card img {
  width: 100%;
  height: 9rem;
  object-fit: cover;
  border-radius: 6px;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

/* Arrows stay square and inline; the delete button drops to its own
   full-width row so its label never overflows the narrow card. */
.photo-actions form {
  flex: 0 0 auto;
}

.photo-actions .button {
  flex: 1 1 100%;
  min-height: 44px;
  padding: 0.3rem 0.8rem;
  box-shadow: none;
  font-size: 0.92rem;
}

.upload-status {
  font-weight: 700;
  color: var(--sienna);
}

body.admin select {
  font-family: var(--font-body);
  font-size: 1.08rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #b9ab90;
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  min-height: 48px;
}

/* Print size rows: fields on a grid, action buttons on their own row below. */
.print-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.print-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.9rem;
}

.print-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.print-fields input[type='text'],
.print-fields input[type='number'] {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border: 1.5px solid #b9ab90;
  border-radius: 8px;
  width: 100%;
}

.print-fields .print-enabled {
  flex-direction: row;
  align-self: end;
  align-items: center;
  min-height: 41px; /* same visual height as the inputs beside it */
  font-weight: 600;
}

.print-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

/* Specificity must beat `body.admin button.primary` (margin/align-self). */
body.admin .print-actions button {
  min-height: 44px;
  padding: 0.4rem 1.1rem;
  margin: 0;
  align-self: center;
}

/* Page addresses section (bottom of the edit screen) */
.slug-section {
  margin-top: 2.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.3rem 1.5rem 1.6rem;
  box-shadow: var(--shadow-card);
}

.slug-section h2 {
  margin-top: 0;
}

.slug-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Page address (slug) field: prefix + locked input + unlock button */
.slug-input {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}

.slug-input .slug-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.6rem 0 0.9rem;
  background: #efe7d6;
  border: 1.5px solid #b9ab90;
  border-right: none;
  border-radius: 10px 0 0 10px;
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-right: -0.6rem;
}

.stack .slug-input input[type='text'] {
  flex: 1;
  border-radius: 0 10px 10px 0;
}

.stack .slug-input input[type='text']:read-only {
  background: #f3ecdd;
  color: var(--ink-soft);
}

body.admin .slug-input .slug-unlock,
body.admin .slug-input .slug-save,
body.admin .slug-input .slug-cancel {
  min-height: 0;
  padding: 0.4rem 1rem;
  font-size: 0.98rem;
  box-shadow: none;
  margin: 0;
  white-space: nowrap;
}

/* --- Quill skin -------------------------------------------------------------------------- */

.rich-editor {
  background: var(--card);
  min-height: 16rem;
  font-size: 18px;
}

.rich-editor-small {
  min-height: 8rem;
}

.ql-toolbar.ql-snow {
  border: 1.5px solid #b9ab90;
  border-radius: 10px 10px 0 0;
  background: #f3ecdd;
}

.ql-snow .ql-stroke {
  stroke: var(--ink);
}

.ql-snow .ql-fill {
  fill: var(--ink);
}

.ql-snow .ql-picker {
  color: var(--ink);
}

/* Romanian labels for the heading picker (Quill labels these via CSS). */
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
  content: 'Text normal';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='2']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='2']::before {
  content: 'Titlu mare';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value='3']::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value='3']::before {
  content: 'Titlu mic';
}

/* Romanian labels for the link tooltip (Quill labels these via CSS too). */
.ql-snow .ql-tooltip::before {
  content: 'Adresa:';
}
.ql-snow .ql-tooltip[data-mode='link']::before {
  content: 'Scrieți adresa (link):';
}
.ql-snow .ql-tooltip a.ql-action::after {
  content: 'Modifică';
}
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
  content: 'Salvează';
}
.ql-snow .ql-tooltip a.ql-remove::before {
  content: 'Șterge';
}

/* Quill's toolbar buttons keep their stock size — opt out of the
   senior-friendly 48px form-button rule that would inflate them. */
body.admin .ql-toolbar.ql-snow button {
  min-height: 0;
  min-width: 0;
  width: 28px;
  height: 24px;
  padding: 3px 5px;
  border: none;
  background: none;
  font-size: inherit;
  box-shadow: none;
  transition: none;
}

body.admin .ql-toolbar.ql-snow button:hover {
  transform: none;
  box-shadow: none;
}

.ql-container.ql-snow {
  border: 1.5px solid #b9ab90;
  border-top: none;
  border-radius: 0 0 10px 10px;
  font-size: 18px;
  font-family: var(--font-body);
  background: var(--card);
}

.ql-editor {
  min-height: 14rem;
  line-height: 1.65;
}

.rich-editor-small .ql-editor {
  min-height: 6rem;
}

/* --- Settings rows ---------------------------------------------------------------------------- */

.zone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.3rem;
  box-shadow: var(--shadow-card);
}

.zone-row label {
  margin: 0;
}

.money-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.money-input input {
  width: 8rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  padding: 0.6rem;
  border: 1.5px solid #b9ab90;
  border-radius: 10px;
  text-align: right;
  background: #fff;
}

.unit {
  font-weight: 700;
  color: var(--ink-soft);
}

/* --- Login: the easel card ---------------------------------------------------------------------- */

.login-main {
  max-width: 28rem;
  margin-top: 7vh;
}

/* 2FA: the 6-digit code field, big and obvious for the senior admin. */
.code-input {
  font-size: 2rem;
  letter-spacing: 0.5em;
  text-align: center;
  max-width: 11em;
}

.resend-form {
  margin-top: 1.2rem;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem 2.2rem 2.4rem;
  box-shadow: 0 18px 40px rgba(43, 33, 24, 0.12), var(--shadow-card);
  position: relative;
  overflow: hidden;
}

/* painted top edge */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7px;
  background: linear-gradient(
    90deg,
    var(--sienna-deep),
    var(--sienna) 35%,
    #b86a35 60%,
    var(--ochre) 100%
  );
}

.login-main h1 {
  font-size: 1.75rem;
}
