:root {
  --ink: #30362f;
  --muted: #6b6c60;
  --paper: #faf6ef;
  --line: #e3dbcd;
  --accent: #984b37;
  --accent-strong: #773824;
  --sand: #efe6d8;
  --white: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, input[type="submit"], a.button { cursor: pointer; }
button:disabled, input[type="submit"]:disabled { opacity: .6; cursor: wait; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.035em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); margin-bottom: 1.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.15rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.container { max-width: 1240px; margin: auto; padding-inline: 32px; }
.demo-banner { background: var(--ink); color: #f8f1e5; text-align: center; padding: 8px 16px; font-size: .7rem; letter-spacing: .07em; }
.site-header { border-bottom: 1px solid var(--line); background: #fffdf8; }
.navigation { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: Georgia, serif; font-size: 2.3rem; line-height: 1; font-weight: 600; letter-spacing: -.065em; text-decoration: none; white-space: nowrap; }
.brand-symbol { width: 36px; height: 36px; flex-shrink: 0; }
.brand-home { font-style: italic; font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 25px; font-size: .9rem; flex-wrap: wrap; }
.nav-links > a:not(.button) { text-decoration: none; }
.nav-user { color: var(--muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-content { min-height: 65vh; padding-block: 36px 72px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; padding-block: 40px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.site-footer .brand { font-size: 1.8rem; color: var(--ink); }
.site-footer .brand-symbol { width: 28px; height: 28px; }
.footer-tagline { margin: 14px 0 0; font-size: .75rem; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; min-height: 510px; gap: 50px; padding-block: 12px 56px; }
.eyebrow { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; margin-bottom: 16px; }
.hero .eyebrow { display: flex; align-items: center; gap: 12px; color: var(--accent); font-size: .65rem; }
.eyebrow-line { width: 30px; height: 1px; background: currentColor; flex-shrink: 0; }
.hero h1 { font-family: Georgia, serif; font-size: clamp(2.7rem, 5.2vw, 4.6rem); font-weight: 400; line-height: 1.08; letter-spacing: -.055em; }
.hero h1 em { color: var(--accent); font-weight: 400; }
.hero-copy { color: var(--muted); max-width: 440px; margin-bottom: 28px; font-size: .95rem; line-height: 1.8; }
.hero-details { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 24px; color: var(--muted); font-size: .7rem; }
.hero-details span + span { padding-left: 16px; border-left: 1px solid #bfb7a9; }
.hero-art { position: relative; height: 440px; background: #eae1d3; border-radius: 180px 180px 12px 12px; overflow: hidden; }
.room-illustration { width: 100%; height: 100%; object-fit: cover; }
.hero-caption { position: absolute; bottom: 20px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px; border: 1px solid #dcd0bc; border-radius: 8px; background: #fffaf0f0; color: #5e574a; font-size: .65rem; letter-spacing: .02em; }
.caption-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.living-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 30px 0; border-top: 1px solid var(--line); margin-bottom: 12px; }
.living-notes > div { display: flex; gap: 16px; align-items: flex-start; }
.note-number { font-family: Georgia, serif; font-size: .9rem; font-style: italic; color: var(--accent); padding-top: 2px; }
.living-notes h2 { font-size: .9rem; letter-spacing: -.01em; margin: 0 0 6px; }
.living-notes p { font-size: .75rem; color: var(--muted); margin: 0; line-height: 1.7; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; background: var(--accent); color: var(--white); padding: 13px 24px; border: 1px solid var(--accent); border-radius: 6px; font-size: .9rem; font-weight: 600; text-decoration: none; line-height: 1.5; }
.button:hover { background: var(--accent-strong); color: white; }
.button-small { padding: 9px 16px; font-size: .8rem; }
.button-quiet { background: transparent; color: var(--ink); padding: 6px 10px; border-color: var(--line); font-size: .8rem; }
.button-secondary { background: transparent; color: var(--accent); }
.button-full { width: 100%; }
.catalogue-section { border-top: 1px solid var(--line); padding-top: 42px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section-heading h1, .section-heading h2 { margin-bottom: 0; }
.section-heading .eyebrow { margin-bottom: 10px; }
.search-form { display: flex; gap: 8px; }
input:not([type="submit"]):not([type="checkbox"]), select, textarea { width: 100%; padding: 11px 13px; color: var(--ink); border: 1px solid #b8b3a6; border-radius: 6px; background: var(--white); }
textarea { resize: vertical; }
.search-form input[type="search"] { width: min(300px, 50vw); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 22px; }
.product-card { padding: 10px 10px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf9; }
.product-visual { display: block; position: relative; border-radius: 7px; overflow: hidden; aspect-ratio: 1 / 1.08; text-decoration: none; }
.product-image { width: 100%; height: 100%; object-fit: cover; }
.product-placeholder { height: 100%; min-height: 100%; display: grid; place-items: center; color: #70644e; background: #e8e0d2; }
.product-placeholder span { font: 110px Georgia, serif; transition: transform .25s ease; opacity: .7; }
.product-visual:hover .product-placeholder span { transform: scale(1.08) rotate(-6deg); }
.tone-1 { background: #eedccc; color: #8a6045; }
.tone-2 { background: #e2e5da; color: #687154; }
.tone-3 { background: #eaddd5; color: #945c4b; }
.stock-tag { position: absolute; top: 12px; left: 12px; padding: 4px 10px; background: #fff; font-size: .75rem; border-radius: 3px; }
.seller-label { color: var(--muted); font-size: .75rem; margin: 15px 0 6px; }
.product-card h3 { margin-bottom: 12px; overflow-wrap: anywhere; }
.product-card h3 a { text-decoration: none; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .85rem; }
.product-meta span { font-size: .7rem; color: var(--muted); }
.pagination { display: flex; gap: 24px; justify-content: center; margin-top: 36px; }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--muted); font-size: .85rem; }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.detail-image { aspect-ratio: 1; overflow: hidden; border-radius: 8px; }
.detail-image .product-placeholder span { font-size: 180px; }
.detail-copy { padding-top: 24px; }
.detail-price { font-size: 1.8rem; font-weight: 600; margin-bottom: 30px; }
.detail-price span { font-size: .8rem; color: var(--muted); font-weight: 400; }
.description { color: #575c52; overflow-wrap: anywhere; }
.muted, .field-hint { color: var(--muted); }
.field-hint { display: block; font-size: .75rem; margin-block: 6px 0; }
.purchase-form { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.purchase-form input[type="number"] { max-width: 90px; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.demo-note { border: 1px solid #dfd3bf; background: #f4ecdd; padding: 16px; border-radius: 6px; font-size: .85rem; margin-block: 20px; }
.auth-panel, .editor-panel { max-width: 480px; margin: 24px auto; }
.editor-panel { max-width: 680px; }
.auth-panel h1 { font-size: 2.5rem; }
.stacked-form { display: grid; gap: 20px; margin-block: 28px; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-actions, .inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.checkbox-field { display: flex; align-items: center; gap: 10px; }
.checkbox-field label { margin: 0; }
.checkbox-field input { width: 18px; height: 18px; accent-color: var(--ink); }
.image-gallery { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.image-gallery img { width: 100px; height: 100px; object-fit: cover; border-radius: 5px; }
.flash { padding: 16px 20px; border-radius: 5px; margin-bottom: 24px; font-size: .9rem; }
.flash-success { background: #e5edde; border: 1px solid #b7c8ae; }
.flash-error { background: #fbe6df; border: 1px solid #ddada1; color: #842e24; }
.flash ul { margin-bottom: 0; }
.field_with_errors input { border-color: #a5372c !important; }
.text-error { color: #a5372c; font-size: .85rem; }
.empty-state { padding: 70px 20px; border: 1px dashed #c7bcaa; border-radius: 12px; text-align: center; margin-block: 30px; background: #fffdf8; }
.empty-state p { color: var(--muted); }
.badge { display: inline-block; font-size: .75rem; padding: 4px 10px; border-radius: 4px; background: var(--sand); color: var(--ink); white-space: nowrap; }
.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.cart-line { display: flex; gap: 20px; padding-block: 24px; border-bottom: 1px solid var(--line); align-items: start; }
.cart-thumbnail { width: 100px; height: 110px; flex-shrink: 0; border-radius: 6px; overflow: hidden; }
.cart-thumbnail .product-placeholder span { font-size: 50px; }
.cart-line-details { flex: 1; min-width: 0; }
.cart-line-details h2 { font-size: 1.15rem; margin-bottom: 8px; overflow-wrap: anywhere; }
.cart-line-details .muted { font-size: .8rem; }
.quantity-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.quantity-form label { font-size: .7rem; margin: 0; }
.quantity-form input[type="number"] { width: 68px; padding: 6px; }
.text-button { padding: 0; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); font-size: .8rem; }
.summary-panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px; margin-top: 24px; }
.summary-total { display: flex; justify-content: space-between; font-size: 1.3rem; }
.summary-panel .muted { font-size: .75rem; }
.table-wrap { overflow-x: auto; margin-block: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .85rem; text-align: left; }
th, td { padding: 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-weight: 600; font-size: .75rem; background: #f3ede2; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tfoot th, tfoot td { border-top: 1px solid var(--line); border-bottom: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-block: 32px; }
.stat { background: #fff; padding: 22px; border: 1px solid var(--line); border-radius: 6px; }
.stat span { display: block; font-size: .75rem; color: var(--muted); }
.stat strong { display: block; margin-top: 8px; font-size: 1.7rem; letter-spacing: -.04em; overflow-wrap: anywhere; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { display: block; padding: 12px; background: #fff; }

@media (max-width: 900px) {
  .container { padding-inline: 24px; }
  .navigation { min-height: 85px; }
  .nav-links { gap: 14px; }
  .nav-user { display: none; }
  .hero { gap: 28px; min-height: 420px; }
  .hero-art { height: 350px; border-radius: 130px 130px 10px 10px; }
  .hero-caption { left: 12px; right: 12px; bottom: 12px; font-size: .6rem; padding: 9px; }
  .living-notes { gap: 20px; }
  .living-notes > div { gap: 10px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-detail { gap: 32px; }
  .cart-layout { grid-template-columns: 1fr; gap: 10px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .container { padding-inline: 18px; }
  .navigation { padding-block: 20px; align-items: flex-start; }
  .brand { font-size: 1.8rem; gap: 7px; }
  .brand-symbol { width: 28px; height: 28px; }
  .nav-links { justify-content: flex-end; gap: 12px; font-size: .75rem; }
  .nav-links .button { font-size: .7rem; padding: 6px 10px; }
  .hero { grid-template-columns: 1fr; padding-block: 8px 30px; gap: 30px; }
  .hero-art { height: 320px; border-radius: 120px 120px 10px 10px; }
  .hero .eyebrow { font-size: .55rem; letter-spacing: .13em; }
  .hero-details { font-size: .65rem; }
  .living-notes { grid-template-columns: 1fr; gap: 22px; }
  .living-notes > div { gap: 16px; }
  .living-notes p { max-width: 290px; }
  .section-heading { align-items: flex-start; gap: 20px; }
  .search-form { width: 100%; }
  .search-form input[type="search"] { width: 100%; min-width: 0; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .product-card { padding: 7px 7px 14px; }
  .product-card h3 { font-size: 1rem; }
  .product-placeholder span { font-size: 70px; }
  .product-meta { flex-wrap: wrap; gap: 4px; }
  .product-detail { grid-template-columns: 1fr; gap: 12px; }
  .detail-copy { padding-top: 12px; }
  .cart-line { gap: 12px; flex-wrap: wrap; }
  .cart-thumbnail { width: 65px; height: 80px; }
  .cart-line > strong { margin-left: 77px; }
  .summary-panel { padding: 20px; }
  .form-columns { grid-template-columns: 1fr; }
  .stat { padding: 16px; }
  .stat strong { font-size: 1.4rem; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .product-placeholder span { transition: none; }
}
