@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --background: #f9f9f9;
  --foreground: #303b41;
  --muted: #6a6a6a;
  --muted-bg: #f1f4f4;
  --surface: #ffffff;
  --surface-elevated: #dce5e4;
  --border: #dcdcde;
  --ring: #eba900;
  --accent: #f9bf29;
  --accent-foreground: #ffffff;
  --brand-dark: #335144;
  --brand-warm: #f9bf29;
  --brand-warm-hover: #eba900;
  --font-sans: 'Poppins', system-ui, sans-serif;
  --font-serif: 'Heebo', system-ui, sans-serif;
  --radius: 0.28rem;
  --radius-md: 0.38rem;
  --radius-lg: 0.45rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; margin: 0; font-family: var(--font-serif); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; }

.font-serif { font-family: var(--font-serif); }
.container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

.btn-brand {
  background: var(--brand-warm);
  border: 1px solid var(--brand-warm);
  color: var(--accent-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.btn-brand:hover { background: var(--brand-warm-hover); border-color: var(--brand-warm-hover); }
.header-cta {
  flex-shrink: 0;
  padding: 0.5rem 0.85rem;
  font-size: 0.65rem;
  white-space: nowrap;
}
@media (max-width: 380px) {
  .header-cta { padding: 0.4rem 0.5rem; font-size: 0.55rem; letter-spacing: 0.03em; }
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--foreground);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.btn-outline:hover { background: var(--surface); }
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--foreground);
  color: var(--surface);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); background: var(--surface); }
.announce { background: var(--brand-dark); color: #fff; text-align: center; font-size: 0.75rem; padding: 0.5rem 1rem; }
.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 64px;
  padding-block: 0.5rem;
  position: relative;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .header-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .logo { grid-column: 1; justify-self: start; }
  .header-cta { grid-column: 2; justify-self: center; }
  .header-menu { grid-column: 3; justify-self: end; }
  .header-actions {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: auto;
    height: 0;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
    z-index: 95;
  }
  .header-actions .header-fav-btn,
  .header-actions .header-account {
    display: none !important;
  }
  .header-actions .header-fav-panel {
    pointer-events: auto;
  }
}
.header-menu {
  position: relative;
  justify-self: end;
  flex-shrink: 0;
}
.header-menu-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid #c5cbd0;
  border-radius: var(--radius-md);
  color: #5f6b73;
  background: #e8ebed;
  cursor: pointer;
  padding: 0;
}
.header-menu.is-open .header-menu-btn,
.header-menu-btn:hover {
  border-color: #aeb6bd;
  color: #3d474e;
  background: #dde2e5;
}
.header-menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  width: 1.05rem;
}
.header-menu-icon span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
}
.header-menu-dot {
  top: 0.28rem;
  right: 0.28rem;
}
.header-menu-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 90;
  width: min(18.5rem, calc(100vw - 1.25rem));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(30, 40, 45, 0.14);
  overflow: hidden;
}
.header-menu-nav {
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
}
.header-menu-nav a {
  display: block;
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: var(--foreground);
}
.header-menu-nav a:hover {
  background: #f3f5f4;
  color: var(--brand-warm-hover);
}
.header-menu-extras {
  border-top: 1px solid var(--border);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
}
.header-menu-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 0;
  background: transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--foreground);
  text-align: left;
  cursor: pointer;
  position: relative;
}
.header-menu-link:hover {
  background: #f3f5f4;
}
.header-menu-link-ico {
  display: inline-flex;
  color: #5f6b73;
}
.header-menu-link .header-fav-dot {
  position: static;
  margin-left: auto;
  box-shadow: none;
}
.logo { justify-self: start; min-width: 0; }
.header-cta { justify-self: center; }
@media (min-width: 768px) {
  .header-row {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
  }
  .header-menu { display: none; }
  .header-cta { margin-left: auto; }
  .header-actions { margin-left: 0.55rem; }
}
.header-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  flex-shrink: 0;
  border: 1px solid #c5cbd0;
  border-radius: var(--radius-md);
  color: #5f6b73;
  background: #e8ebed;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.header-account:hover {
  border-color: #aeb6bd;
  color: #3d474e;
  background: #dde2e5;
}
.header-account.is-logged {
  border-color: #aeb6bd;
  color: #335144;
  background: #dfe4e2;
}
.header-fav {
  position: relative;
  flex-shrink: 0;
}
.header-fav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid #c5cbd0;
  border-radius: var(--radius-md);
  color: #5f6b73;
  background: #e8ebed;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.header-fav-btn:hover,
.header-fav.is-open .header-fav-btn {
  border-color: #aeb6bd;
  color: #3d474e;
  background: #dde2e5;
}
.header-fav.has-favs .header-fav-btn {
  border-color: #aeb6bd;
  color: #335144;
  background: #dfe4e2;
}
.header-fav-dot {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #d12c2c;
  box-shadow: 0 0 0 1.5px #e8ebed;
  pointer-events: none;
}
.header-fav-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 80;
  width: min(20rem, calc(100vw - 1.5rem));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(30, 40, 45, 0.14);
  overflow: hidden;
}
@media (max-width: 767px) {
  .header-fav-panel {
    position: fixed;
    top: auto;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
    max-height: min(70vh, 28rem);
    z-index: 100;
  }
}
.header-fav-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
}
.header-fav-panel-head p {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}
.header-fav-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
}
.header-fav-panel-list {
  max-height: 14rem;
  overflow: auto;
  padding: 0.5rem;
}
.header-fav-empty {
  margin: 0;
  padding: 0.65rem 0.35rem;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}
.header-fav-item {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
}
.header-fav-item + .header-fav-item {
  margin-top: 0.15rem;
}
.header-fav-item img {
  width: 2.6rem;
  height: 2.6rem;
  object-fit: cover;
  border-radius: 0.3rem;
  background: #f3f5f4;
}
.header-fav-item-meta p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}
.header-fav-item-meta span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: var(--muted);
}
.header-fav-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.3rem;
}
.header-fav-panel-foot {
  padding: 0.65rem 0.85rem 0.85rem;
  border-top: 1px solid var(--border);
}
.header-fav-panel-foot .btn-brand {
  width: 100%;
  justify-content: center;
  text-align: center;
  font-size: 0.75rem;
}
@media (max-width: 380px) {
  .header-account,
  .header-fav-btn,
  .header-menu-btn { width: 2.1rem; height: 2.1rem; }
  .logo img { height: 2.35rem; max-width: 132px; }
}
.logo {
  display: inline-flex;
  align-items: center;
}
.logo img { height: 2.85rem; width: auto; max-width: 240px; object-fit: contain; }
.nav-desktop { display: none; gap: 0.25rem; align-items: center; flex: 1; }
.nav-desktop a { padding: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 500; }
.nav-desktop a:hover { color: var(--brand-warm-hover); }
@media (min-width: 768px) {
  .nav-desktop { display: flex; }
}

.site-footer { margin-top: auto; border-top: 1px solid var(--border); background: var(--surface); padding: 3rem 0 2rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-title { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-links a { font-size: 0.875rem; color: var(--muted); }
.footer-links a:hover { color: var(--foreground); }
.footer-copy { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); font-size: 0.75rem; color: var(--muted); }

.eyebrow { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); }
.muted { color: var(--muted); }
.rich-p { margin-bottom: 1rem; font-size: 0.95rem; line-height: 1.7; }
.rich-h2 {
  margin: 2.25rem 0 0.85rem;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.35;
}
.rich-h3 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1.05rem;
  line-height: 1.4;
}
.rich-ul {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  list-style: disc;
}
.rich-ul li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--foreground);
}
.idea-lead {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 40rem;
}
.idea-cta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.idea-body { margin-top: 0.5rem; }
.idea-gallery { margin-top: 2.5rem; }
.idea-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}
@media (min-width: 640px) {
  .idea-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.idea-gallery-grid figure {
  margin: 0;
  border: 1px solid var(--border);
  background: var(--surface);
}
.idea-gallery-grid img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}
.idea-gallery-grid figcaption {
  padding: 0.45rem 0.6rem;
  font-size: 0.72rem;
}
.idea-next-steps {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.idea-related { margin-top: 3rem; }
.idea-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.15rem;
}
@media (min-width: 640px) {
  .idea-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.idea-related-grid a {
  display: block;
  border: 1px solid var(--border);
  background: var(--surface);
  height: 100%;
}
.idea-related-grid img {
  width: 100%;
  aspect-ratio: 16/11;
  object-fit: cover;
}
.idea-related-meta {
  display: block;
  padding: 0.65rem 0.75rem 0.15rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.idea-related-grid strong {
  display: block;
  padding: 0.15rem 0.75rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface-elevated);
  padding: 4rem 0;
}
.hero-inner { display: flex; flex-direction: column; gap: 2.5rem; }
@media (min-width: 1024px) {
  .hero-inner { flex-direction: row; align-items: center; gap: 4rem; }
}
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1.1; margin-top: 1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.hero-visual { width: 100%; max-width: 28rem; aspect-ratio: 4/5; }
.hero-visual img { width: 100%; height: 100%; object-fit: contain; }

.section { padding: 4rem 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.section-alt { background: var(--background); }
.grid-2 { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: 1fr 1fr; align-items: center; } }
.grid-3 { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.08); }
.card-img { position: relative; aspect-ratio: 4/3; background: var(--muted-bg); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.5rem; }
.badge {
  position: absolute; left: 0.75rem; top: 0.75rem;
  background: rgba(255,255,255,0.9); border-radius: var(--radius-md);
  padding: 0.25rem 0.65rem; font-size: 0.75rem; font-weight: 500;
}

.filters {
  display: flex; flex-direction: column; gap: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); padding: 1.25rem; margin-top: 2.5rem;
}
@media (min-width: 640px) { .filters { flex-direction: row; flex-wrap: wrap; align-items: end; } }
.filters label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.filters select, .field input, .field textarea, .field select {
  margin-top: 0.35rem; width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-elevated); padding: 0.6rem 0.75rem;
}
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.875rem; margin-bottom: 0.25rem; }

.promo {
  position: relative; overflow: hidden; padding: 4rem 0;
  background: linear-gradient(135deg, #335144 0%, #243a32 100%); color: #fff;
}
.promo .muted { color: rgba(255,255,255,0.75); }

.legal-page, .article-page { max-width: 48rem; margin: 0 auto; padding: 3.5rem 1rem; }
.article-page img.cover { width: 100%; aspect-ratio: 16/10; object-fit: cover; margin: 2rem 0; border: 1px solid var(--border); }

/* Admin */
.admin-body { background: #f3f5f4; font-family: var(--font-sans); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-nav {
  width: 240px; background: #fff; border-right: 1px solid #d7dedb;
  padding: 1.25rem 1rem; flex-shrink: 0;
}
.admin-nav a {
  display: block; padding: 0.55rem 0.75rem; border-radius: var(--radius);
  font-size: 0.875rem; color: #303b41; margin-bottom: 0.15rem;
}
.admin-nav a:hover, .admin-nav a.active { background: #eef2f0; color: #335144; font-weight: 600; }
.admin-main { flex: 1; padding: 1.5rem; max-width: 1100px; }
.admin-sticky {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243,245,244,0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid #d7dedb; padding: 0.75rem 0; margin-bottom: 1rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.admin-card {
  background: #fff; border: 1px solid #d7dedb; border-radius: var(--radius-md);
  padding: 1.25rem; margin-bottom: 1rem;
}
.admin-card h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.btn-save {
  background: #335144; color: #fff; border: 0; border-radius: var(--radius);
  padding: 0.55rem 1rem; font-weight: 600; cursor: pointer;
}
.btn-save:hover { background: #2a4338; }
.alert-ok { color: #047857; font-size: 0.875rem; margin-top: 0.5rem; }
.alert-err { color: #dc2626; font-size: 0.875rem; margin-top: 0.5rem; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th, .table td { border-top: 1px solid var(--border); padding: 0.65rem 0.5rem; text-align: left; vertical-align: top; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: #f3f5f4; padding: 1rem; }

.error-page {
  flex: 1;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(249, 191, 41, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(51, 81, 68, 0.08), transparent 50%),
    linear-gradient(180deg, var(--surface-elevated) 0%, var(--background) 100%);
  padding: 4rem 0 5rem;
  min-height: 55vh;
}
.error-page-inner {
  max-width: 36rem;
  text-align: left;
}
.error-page-code {
  color: var(--brand-warm-hover);
  font-weight: 700;
  letter-spacing: 0.28em;
  font-size: 0.8rem;
}
.error-page-title {
  margin-top: 0.85rem;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  color: var(--brand-dark);
  line-height: 1.15;
}
.error-page-lead {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 32rem;
}
.error-page-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.login-box { width: 100%; max-width: 24rem; background: #fff; border: 1px solid #d7dedb; border-radius: var(--radius-lg); padding: 2rem; }

.account-page { padding: 3rem 1rem 4rem; max-width: 52rem; }
.account-auth { max-width: 26rem; margin: 0 auto; }
.account-title { margin-top: 0.5rem; font-size: clamp(1.75rem, 4vw, 2.4rem); }
.account-form { margin-top: 1.5rem; display: grid; gap: 0.85rem; }
.account-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.account-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}
.account-card h2 { font-size: 1.15rem; margin: 0; }
.account-points {
  margin-top: 0.65rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-dark);
  font-family: var(--font-serif);
}

/* Configurator — layout aligned with Next.js ConfiguratorPanel */
.pb-cfg { padding-bottom: 2.5rem; }

.cfg-styles-section {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  max-width: 72rem;
  margin-inline: auto;
  padding: 1.5rem 1rem 2rem;
}
@media (min-width: 640px) {
  .cfg-styles-section { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .cfg-styles-section { padding-left: 2rem; padding-right: 2rem; }
}

.cfg-style-chips {
  margin: 1rem auto 0;
  max-width: none;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.cfg-style-chip {
  scroll-snap-align: start;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--foreground);
  padding: 0.75rem 1.25rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.cfg-style-chip:hover { border-color: var(--muted); }
.cfg-style-chip.active {
  border-color: #303b41;
  background: #303b41;
  color: #fff;
  box-shadow: 0 4px 12px rgba(48, 59, 65, 0.2);
}
.cfg-style-chip .cfg-style-chip-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
}
.cfg-style-chip .cfg-style-chip-price {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  opacity: 0.85;
}

.cfg-style-detail {
  margin: 2rem auto 0;
  max-width: none;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface-elevated) 40%, transparent);
}
.cfg-style-detail-grid {
  display: grid;
  gap: 0;
}
@media (min-width: 768px) {
  .cfg-style-detail-grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}
.cfg-style-detail-media {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 11rem;
  width: 100%;
}
@media (min-width: 768px) {
  .cfg-style-detail-media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 12rem;
  }
}
.cfg-style-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cfg-style-detail-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.5rem;
}
@media (min-width: 768px) {
  .cfg-style-detail-body { padding: 2rem; }
}
@media (min-width: 1024px) {
  .cfg-style-detail-body { padding: 2.5rem; }
}
.cfg-style-gallery {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}
.cfg-style-gallery button {
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: 0;
  cursor: pointer;
  background: transparent;
  box-shadow: 0 0 0 1px var(--border);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cfg-style-gallery button.active {
  border-color: var(--foreground);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.cfg-style-gallery button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cfg-style-gallery-empty {
  aspect-ratio: 1;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.65rem;
  background: color-mix(in srgb, var(--surface) 50%, transparent);
}

.cfg-sim-section {
  border-top: 1px solid var(--border);
  background: var(--muted-bg);
}
.cfg-sim-inner {
  max-width: 72rem;
  margin-inline: auto;
  padding: 2.5rem 1rem;
}
@media (min-width: 640px) {
  .cfg-sim-inner { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .cfg-sim-inner { padding-left: 2rem; padding-right: 2rem; }
}

.cfg-sim-row {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}
@media (min-width: 1024px) {
  .cfg-sim-row {
    flex-direction: row;
    align-items: stretch;
    min-height: 420px;
  }
}

.cfg-aside {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: width 0.3s ease-out;
}
@media (min-width: 1024px) {
  .cfg-aside {
    width: 4.25rem;
    min-height: 420px;
  }
  .cfg-aside.open { width: 18rem; }
  #tf-cfg-aside-color.open { width: 18rem; } /* lg:w-72 */
  #tf-cfg-aside-gap.open { width: 13rem; } /* lg:w-52 */
  #tf-cfg-aside-color { order: 1; }
  #tf-cfg-wall { order: 2; }
  #tf-cfg-aside-gap { order: 3; }
}
.cfg-aside-toggle {
  display: flex;
  width: 100%;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--foreground);
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}
.cfg-aside-toggle:hover { background: var(--muted-bg); }
.cfg-aside.open .cfg-aside-toggle {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--muted-bg) 40%, transparent);
}
@media (min-width: 1024px) {
  .cfg-aside:not(.open) .cfg-aside-toggle {
    flex: 1;
    justify-content: center;
    padding: 2rem 0.5rem;
    border-bottom: 0;
  }
  .cfg-aside.open .cfg-aside-toggle {
    flex: 0 0 auto;
    padding: 0.75rem 0.5rem;
  }
}
.cfg-aside-toggle-label {
  max-width: 5.5rem;
  text-align: center;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--muted);
}
@media (min-width: 1024px) {
  .cfg-aside-toggle-label { max-width: 4rem; }
}
.cfg-aside-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--border);
  padding: 0.75rem;
  max-height: min(70vh, 520px);
}
@media (min-width: 1024px) {
  .cfg-aside-body { max-height: none; }
}
.cfg-aside-gap-body { max-height: min(50vh, 360px); }
.cfg-gap-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.cfg-gap-btn {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--foreground);
  padding: 0.5rem 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cfg-gap-btn:hover { background: var(--muted-bg); }
.cfg-gap-btn.active {
  border-color: var(--foreground);
  background: var(--foreground);
  color: var(--surface);
}

.cfg-wall-panel {
  position: relative;
  order: -1;
  flex: 1;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.06);
}
@media (min-width: 1024px) {
  .cfg-wall-panel {
    order: 0;
    min-height: 420px;
  }
}
.cfg-noise {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}
.cfg-wall-content {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem;
}
@media (min-width: 640px) {
  .cfg-wall-content {
    min-height: 420px;
    padding: 2rem;
  }
}
.cfg-stage {
  position: relative;
  margin-inline: auto;
  width: 100%;
  max-width: 64rem;
  min-height: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
@media (min-width: 640px) {
  .cfg-stage { min-height: 320px; }
}
.cfg-preview-bar {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 40;
}
.cfg-preview-btn {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: var(--foreground);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.cfg-preview-btn[aria-pressed="true"] {
  background: #111;
  color: #fff;
  border-color: #111;
}
.cfg-frame {
  width: 100%;
  height: 100%;
  position: relative;
  background: #111;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  border-radius: 2px;
}
.cfg-frame--print {
  background: #111;
}
.cfg-frame--premium {
  background: #111;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.cfg-frame--cut {
  background: transparent;
  overflow: visible;
  box-shadow: none;
  border-radius: 0;
}
.cfg-frame-mat {
  position: absolute;
  background: #fff;
}
.cfg-frame--cut .cfg-frame-mat {
  background: transparent;
}
.cfg-frame-art {
  position: absolute;
  overflow: hidden;
  background: #111;
}
.cfg-frame--cut .cfg-frame-art {
  background: transparent;
  overflow: visible;
}
.cfg-frame-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cfg-frame--cut .cfg-frame-art img {
  object-fit: contain;
}
#tf-configurator.cfg-final-preview .cfg-frame-btn,
#tf-configurator.cfg-final-preview .cfg-frame-edit,
#tf-configurator.cfg-final-preview .cfg-frame-idx,
#tf-configurator.cfg-final-preview .cfg-frame-dim,
#tf-configurator.cfg-final-preview .cfg-add-pill {
  display: none !important;
}
.cfg-frame-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
}
.cfg-frame-idx {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  transition: color 0.2s;
}
.cfg-frame:hover .cfg-frame-idx {
  color: rgba(255, 255, 255, 0.75);
}
.cfg-frame-btn {
  position: absolute;
  z-index: 20;
  display: flex;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s;
}
.cfg-frame-btn--active {
  opacity: 0.38;
}
.cfg-frame:hover .cfg-frame-btn--active {
  opacity: 1;
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.45);
}
.cfg-frame-btn--disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.12;
}
.cfg-add-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: background 0.15s, border-color 0.15s;
}
.cfg-add-pill:hover:not(:disabled) {
  border-color: rgba(0, 0, 0, 0.5);
  background: rgba(255, 255, 255, 0.35);
}
.cfg-add-pill:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.cfg-add-pill-plus {
  display: flex;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  color: #44403c;
}

.cfg-slots-section {
  width: 100%;
  max-width: 72rem;
  margin: 3rem auto 0;
  padding-inline: 1rem;
}
@media (min-width: 640px) {
  .cfg-slots-section { padding-inline: 1.5rem; }
}
@media (min-width: 1024px) {
  .cfg-slots-section { padding-inline: 2rem; }
}
#tf-cfg-home-recap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 640px) {
  #tf-cfg-home-recap { padding-inline: 1.5rem; }
}
@media (min-width: 1024px) {
  #tf-cfg-home-recap { padding-inline: 2rem; }
}
.cfg-slots-grid {
  margin-top: 1.5rem;
  display: grid;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .cfg-slots-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .cfg-slots-grid { grid-template-columns: repeat(3, 1fr); }
}
.cfg-slot-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s;
}
.cfg-slot-card:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.cfg-slot-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.cfg-slot-card label.cfg-field-label {
  display: block;
  margin-top: 1rem;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.cfg-slot-card select {
  margin-top: 0.5rem;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
  color: var(--foreground);
  outline: none;
}
.cfg-slot-card select:focus {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 50%, transparent);
}
.cfg-slot-card select:disabled { opacity: 0.5; }
.cfg-slot-remove {
  flex-shrink: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cfg-slot-remove:hover {
  border-color: rgba(252, 165, 165, 0.6);
  background: #fef2f2;
  color: #991b1b;
}
.cfg-consent-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--foreground);
  cursor: pointer;
}
.cfg-consent-check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.cfg-consent-legal {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
}
.cfg-upload-trigger {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  padding: 0.65rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.15s;
}
.cfg-upload-trigger:hover:not(:disabled) { background: var(--muted-bg); }
.cfg-upload-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.cfg-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.cfg-consent-modal {
  display: none;
}
.cfg-consent-modal.is-open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 80;
}
.cfg-consent-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(20, 18, 15, 0.45);
  cursor: pointer;
}
.cfg-consent-modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(28rem, calc(100vw - 1.5rem));
  max-height: min(90dvh, 36rem);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.cfg-consent-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.cfg-consent-modal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}
.cfg-consent-modal-close {
  border: 0;
  background: transparent;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0.25rem;
}
.cfg-consent-modal-body {
  padding: 1rem 1.1rem;
  overflow-y: auto;
}
.cfg-consent-modal-foot {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-elevated);
}
.cfg-consent-modal-cancel,
.cfg-consent-modal-accept {
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
}
.cfg-consent-modal-cancel {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--foreground);
}
.cfg-consent-modal-accept {
  border: 0;
  background: var(--foreground);
  color: #fff;
}
.cfg-consent-modal-accept:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
body.cfg-consent-modal-open {
  overflow: hidden;
}

.cfg-order-modal-panel {
  width: min(32rem, calc(100vw - 1.5rem));
  max-height: min(92dvh, 44rem);
}
.cfg-order-invite {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--foreground);
}
.cfg-order-form {
  display: grid;
  gap: 0.75rem;
}
.cfg-order-form .field label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.cfg-order-form .field input {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.7rem;
  background: #fff;
}
.cfg-order-error {
  margin: 0;
  color: #b91c1c;
  font-size: 0.85rem;
}
.cfg-order-guest {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.65rem 0.5rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
}
.cfg-order-guest:hover {
  color: var(--foreground);
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 1rem;
  background: rgba(248, 249, 249, 0.96);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
}
.cookie-banner-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.cookie-banner-text {
  flex: 1 1 18rem;
  max-width: 42rem;
}
.cookie-banner-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--brand-dark);
  font-size: 1rem;
}
.cookie-banner-text p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
}
.cookie-banner-text a {
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.cfg-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface-elevated) 50%, transparent);
  padding: 1.5rem;
}
@media (min-width: 640px) {
  .cfg-panel { padding: 2rem; }
}
.cfg-wall-color-picker {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.25rem;
}
.cfg-wall-color-picker input[type="color"] {
  height: 2.5rem;
  width: 100%;
  min-width: 0;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-elevated);
  padding: 0.15rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.cfg-wall-color-presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.cfg-swatch {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
  cursor: pointer;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s;
}
.cfg-swatch:hover { transform: scale(1.05); }
.cfg-swatch.active {
  border-color: var(--foreground);
  box-shadow: 0 0 0 2px var(--ring), 0 0 0 3px var(--surface);
}
.cfg-style-chip-price.is-active { color: rgba(255, 255, 255, 0.8); }
.cfg-recap {
  margin-top: 3.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface-elevated) 50%, transparent);
  padding: 1.5rem;
}
@media (min-width: 640px) {
  .cfg-recap { padding: 2rem; }
}
.cfg-recap-title {
  font-size: 1.25rem;
  color: var(--foreground);
}
.cfg-recap-list {
  margin-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.cfg-recap-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.cfg-recap-amount {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
}
.cfg-recap-footer {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .cfg-recap-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.cfg-recap-note { font-size: 0.75rem; margin-top: 0.25rem; }
.cfg-order-btn {
  border: 0;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-foreground);
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.cfg-order-btn:hover { opacity: 0.95; }
.cfg-total {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 0.25rem;
  color: var(--foreground);
}
#tf-cfg-recap { margin-top: 0; }

/* Mobile: style en haut, mur au centre, réglages mur + prix en bas */
.cfg-top-bar,
.cfg-theme-banner,
.cfg-dock,
.cfg-home-logo,
.cfg-style-sheet,
.cfg-slot-sheet,
.cfg-frame-edit { display: none; }

@media (max-width: 1023px) {
  html:has(body.cfg-fullscreen-page),
  body.cfg-fullscreen-page {
    height: 100%;
    overflow: hidden;
  }
  body.cfg-fullscreen-page {
    min-height: 100dvh;
    background: #d7c4a8;
  }
  body.cfg-fullscreen-page .site-header,
  body.cfg-fullscreen-page .site-footer,
  body.cfg-fullscreen-page .cfg-page-intro,
  body.cfg-fullscreen-page .cfg-sim-label {
    display: none;
  }
  body.cfg-fullscreen-page main {
    padding: 0;
    margin: 0;
    flex: 1;
    min-height: 100dvh;
  }
  body.cfg-fullscreen-page #tf-cfg-home-styles,
  body.cfg-fullscreen-page #tf-cfg-home-slots,
  body.cfg-fullscreen-page #tf-cfg-home-recap {
    display: none;
  }
  body.cfg-fullscreen-page #tf-configurator.pb-cfg {
    padding: 0;
    position: fixed;
    inset: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #d7c4a8;
  }
  body.cfg-fullscreen-page .cfg-sim-section,
  body.cfg-fullscreen-page .cfg-sim-inner,
  body.cfg-fullscreen-page .cfg-sim-row {
    margin: 0;
    padding: 0;
    max-width: none;
    min-height: 0;
    gap: 0;
    flex: 1 1 auto;
    height: auto;
  }
  body.cfg-fullscreen-page .cfg-sim-section {
    display: flex;
    min-height: 220px;
  }
  body.cfg-fullscreen-page .cfg-sim-inner,
  body.cfg-fullscreen-page .cfg-sim-row {
    flex: 1;
    width: 100%;
    height: 100%;
  }
  body.cfg-fullscreen-page .cfg-sim-row > .cfg-aside {
    display: none;
  }
  body.cfg-fullscreen-page .cfg-wall-panel {
    min-height: 0;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  body.cfg-fullscreen-page .cfg-wall-content {
    min-height: 0;
    height: 100%;
    padding: 0.55rem 0.7rem 0.5rem;
  }
  body.cfg-fullscreen-page .cfg-stage {
    min-height: 0;
    flex: 1;
  }
  body.cfg-fullscreen-page .cfg-add-pill {
    margin-bottom: 0;
    font-size: 0.8rem;
    padding: 0.28rem 0.65rem 0.28rem 0.28rem;
  }
  body.cfg-fullscreen-page .cfg-frame-btn--active {
    opacity: 0.95;
    background: rgba(0, 0, 0, 0.5);
  }
  body.cfg-fullscreen-page .cfg-frame-idx { display: none; }

  .cfg-top-bar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    z-index: 25;
    padding: max(0.4rem, env(safe-area-inset-top)) 0.65rem 0.4rem;
    background: #fff;
    border-bottom: 1px solid rgba(48, 59, 65, 0.08);
  }
  .cfg-home-logo {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    line-height: 0;
  }
  .cfg-home-logo img {
    height: 2.45rem;
    width: auto;
    max-width: 9.2rem;
    object-fit: contain;
  }
  .cfg-theme-banner {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    z-index: 24;
    min-height: 0;
    padding: 0.28rem 0.65rem;
    background: #f1a91e;
    border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  }
  .cfg-current-style {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
  }
  .cfg-current-style span {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(17, 17, 17, 0.62);
    line-height: 1.2;
  }
  .cfg-current-style strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
  }
  .cfg-change-style {
    flex-shrink: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: #fff;
    color: #111;
    padding: 0.32rem 0.72rem;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
  }

  .cfg-style-sheet { display: none; }
  .cfg-style-sheet.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
  }
  .cfg-style-sheet-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(17, 17, 17, 0.4);
    cursor: pointer;
  }
  .cfg-style-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(78dvh, 560px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -18px 44px rgba(17, 17, 17, 0.18);
  }
  .cfg-style-sheet-head {
    flex-shrink: 0;
    padding: 0.45rem 0.9rem 0.55rem;
    border-bottom: 1px solid #eee;
  }
  .cfg-style-sheet-handle {
    display: block;
    width: 2.4rem;
    height: 0.28rem;
    margin: 0.1rem auto 0.55rem;
    border-radius: 999px;
    background: #d8d8d8;
  }
  .cfg-style-sheet-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .cfg-style-sheet-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
  }
  .cfg-style-sheet-close {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: var(--radius-md);
    background: #f3f3f3;
    color: #333;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
  }
  .cfg-style-sheet-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0.55rem 0 0.2rem;
  }
  .cfg-pick {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    height: 100%;
    min-height: 0;
  }
  .cfg-pick-list {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0 0.85rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cfg-pick-list::-webkit-scrollbar { display: none; }
  .cfg-pick-chip {
    flex: 0 0 auto;
    border: 0;
    border-radius: var(--radius-md);
    background: #f3f3f1;
    color: #222;
    padding: 0.4rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
  }
  .cfg-pick-chip.is-active {
    background: #111;
    color: #fff;
  }
  .cfg-pick-hero {
    position: relative;
    margin: 0 0.85rem;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #eee;
    flex: 1 1 auto;
    min-height: 8.5rem;
    max-height: 14rem;
  }
  .cfg-pick-hero > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .cfg-pick-info {
    padding: 0 0.9rem 0.15rem;
  }
  .cfg-pick-info-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.7rem;
  }
  .cfg-pick-info h3 {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.02rem;
    font-weight: 700;
    color: #1a1a1a;
  }
  .cfg-pick-tag {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0.22rem 0 0;
    font-size: 0.75rem;
    line-height: 1.35;
    font-weight: 500;
    color: #6a6a6a;
  }
  .cfg-pick-from {
    flex-shrink: 0;
    margin: 0;
    font-size: 0.7rem;
    color: #6a6a6a;
    white-space: nowrap;
  }
  .cfg-pick-from strong { color: #1a1a1a; }
  .cfg-pick-thumbs {
    position: absolute;
    left: 0.45rem;
    right: 0.45rem;
    bottom: 0.45rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
  }
  .cfg-pick-thumbs button {
    aspect-ratio: 1;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius);
    padding: 0;
    background: #f3f3f3;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
    cursor: pointer;
  }
  .cfg-pick-thumbs button.is-active {
    box-shadow: 0 0 0 2px #f1a91e;
  }
  .cfg-pick-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .cfg-style-sheet-foot {
    flex-shrink: 0;
    padding: 0.7rem 0.9rem max(0.85rem, env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid #eee;
  }
  .cfg-style-sheet-pick {
    width: 100%;
    border: 0;
    border-radius: var(--radius-md);
    background: #f1a91e;
    color: #111;
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
  }
  .cfg-style-sheet-pick:disabled {
    opacity: 0.55;
    cursor: default;
  }

  .cfg-frame-edit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 18;
    transform: translate(-50%, -50%);
    min-width: 3.1rem;
    border: 0;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    padding: 0.35rem 0.5rem 0.4rem;
    cursor: pointer;
  }
  .cfg-frame-edit span {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
  }
  .cfg-frame-edit em {
    margin-top: 0.15rem;
    font-style: normal;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.9;
  }

  .cfg-dock {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    position: relative;
    z-index: 20;
    background: #f7f6f3;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -12px 36px rgba(48, 59, 65, 0.16);
  }
  .cfg-dock-mur {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    padding: 0.75rem 0.75rem 0.55rem;
  }
  .cfg-dock-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem max(0.7rem, env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid rgba(48, 59, 65, 0.08);
  }
  .cfg-dock-total { flex: 1; min-width: 0; }
  .cfg-dock-total span {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6a6a6a;
  }
  .cfg-dock-total strong {
    display: block;
    margin-top: 0.1rem;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: #303b41;
  }
  .cfg-dock-order {
    border: 0;
    border-radius: var(--radius-md);
    background: #f9bf29;
    color: #303b41;
    padding: 0.85rem 1.35rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
  }
  .cfg-dock .cfg-aside {
    width: 100%;
    max-width: none;
    border-radius: var(--radius-md);
  }
  .cfg-dock .cfg-aside-toggle {
    pointer-events: none;
    padding: 0.5rem 0.4rem 0.35rem;
    gap: 0.15rem;
  }
  .cfg-dock .cfg-aside-toggle svg {
    width: 16px;
    height: 16px;
  }
  .cfg-dock .cfg-aside-body,
  .cfg-dock .cfg-aside-gap-body {
    max-height: none;
    overflow: visible;
    padding: 0.5rem;
  }
  .cfg-dock .cfg-aside-gap-body > p { display: none; }
  .cfg-dock .cfg-gap-list {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 0;
    gap: 0.3rem;
  }
  .cfg-dock .cfg-gap-btn {
    flex: 1 1 calc(50% - 0.3rem);
    padding: 0.38rem 0.25rem;
  }

  .cfg-slot-sheet {
    display: none;
  }
  .cfg-slot-sheet.is-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 60;
  }
  .cfg-slot-sheet-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(48, 59, 65, 0.45);
    cursor: pointer;
  }
  .cfg-slot-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(82dvh, 640px);
    display: flex;
    flex-direction: column;
    background: #f7f6f3;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -16px 40px rgba(48, 59, 65, 0.22);
  }
  .cfg-slot-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
    padding: 0.95rem 1rem 0.7rem;
    border-bottom: 1px solid rgba(48, 59, 65, 0.08);
  }
  .cfg-slot-sheet-head h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: #335144;
  }
  .cfg-slot-sheet-close {
    border: 0;
    border-radius: var(--radius-md);
    background: #eef2f0;
    color: #335144;
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
  }
  .cfg-slot-sheet-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.85rem 0.85rem max(1.1rem, env(safe-area-inset-bottom));
  }
  .cfg-slot-sheet-body .cfg-slots-section {
    margin: 0;
    padding: 0;
    max-width: none;
  }
  .cfg-slot-sheet-body .cfg-slots-section > .eyebrow { display: none; }
  .cfg-slot-sheet-body .cfg-slots-grid {
    margin: 0;
    gap: 0;
  }
  .cfg-slot-sheet-body .cfg-slot-card { display: none; }
  .cfg-slot-sheet-body .cfg-slot-card.is-editing { display: block; }
  .cfg-slot-sheet-body .cfg-slot-card-head .font-serif { display: none; }
}

.admin-cfg .cfg-top-bar,
.admin-cfg .cfg-theme-banner,
.admin-cfg .cfg-dock,
.admin-cfg .cfg-home-logo,
.admin-cfg .cfg-style-sheet,
.admin-cfg .cfg-slot-sheet,
.admin-cfg .cfg-frame-edit { display: none !important; }

@media (max-width: 767px) {
  .admin-shell { flex-direction: column; }
  .admin-nav { width: 100%; border-right: 0; border-bottom: 1px solid #d7dedb; }
}

/* Parcours thèmes / lightbox */
.theme-image-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.theme-image-card {
  border: 1px solid var(--border);
  background: var(--muted-bg);
  padding: 0;
  cursor: pointer;
  aspect-ratio: 1;
  overflow: hidden;
}
.theme-image-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f3f5f4;
  display: block;
  transition: transform 0.2s ease;
}
.theme-image-card:hover img { transform: scale(1.03); }
.theme-page {
  min-width: 2rem;
  text-align: center;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  color: var(--foreground);
  text-decoration: none;
  font-size: 0.8rem;
}
.theme-page.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.theme-lightbox[hidden] { display: none !important; }
.theme-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.theme-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 28, 24, 0.72);
}
.theme-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
  justify-items: center;
}
.theme-lightbox-panel img {
  max-width: 100%;
  max-height: min(70vh, 640px);
  object-fit: contain;
  background: #f3f5f4;
}
.theme-lightbox-title {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}
.theme-lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.theme-lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--foreground);
}
body.theme-lightbox-open { overflow: hidden; }
.cfg-media-search {
  width: 100%;
  margin: 0.35rem 0 0.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  font-size: 0.8rem;
}

.cfg-fav-block { margin: 0.35rem 0 0.65rem; }
.cfg-fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.cfg-fav-thumb {
  border: 1px solid var(--border);
  background: var(--muted-bg);
  padding: 0;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
}
.cfg-fav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f3f5f4;
}
.cfg-fav-thumb.is-active {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.theme-lightbox-actions [data-lightbox-fav].is-fav {
  border-color: var(--brand);
  color: var(--brand);
}
