:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --white: #fffefa;
  --ink: #242c25;
  --muted: #5e685f;
  --line: #e1e3da;
  --pine: #294137;
  --pine-deep: #23372f;
  --tint: #edf2e8;
  --cream: #f6edd9;
  --serif: "Noto Serif SC", "Songti SC", SimSun, serif;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #c18745; outline-offset: 3px; }
.wrap, .header-inner { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand, .header-actions, nav { display: flex; align-items: center; gap: 12px; }
.brand > span:last-child { display: flex; flex-direction: column; white-space: nowrap; }
.brand strong { font-size: 18px; letter-spacing: .13em; line-height: 1.2; }
.brand small { margin-top: 5px; font-size: 10px; letter-spacing: .24em; color: var(--muted); }
.mark { width: 38px; height: 38px; background: var(--pine); border-radius: 11px; display: grid; grid-template: repeat(2, 7px) / repeat(2, 7px); gap: 3px; place-content: center; }
.mark i { border: 1px solid #eae6d6; border-radius: 2px; }
.mark i:last-child { background: #d5c099; border-color: #d5c099; }
nav { gap: 30px; align-self: stretch; }
nav a { position: relative; display: flex; align-items: center; color: var(--muted); font-size: 14px; white-space: nowrap; }
nav a[aria-current="page"] { color: var(--pine); font-weight: 700; }
nav a[aria-current="page"]::after { position: absolute; content: ""; bottom: 0; width: 100%; height: 2px; background: var(--pine); }
.header-actions { gap: 18px; }
.admin-link { color: var(--muted); font-size: 13px; white-space: nowrap; }
.admin-link:hover, nav a:hover { color: var(--pine); }
.button { border: 1px solid transparent; border-radius: 7px; padding: 10px 15px; min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-size: 13px; font-weight: 700; line-height: 1.35; white-space: nowrap; }
.button.dark { color: #fffdf7; background: var(--pine); }
.button.dark:hover { background: #395648; }
.button.light { color: var(--pine-deep); background: var(--cream); }
.button.light:hover { background: #fff6e5; }
.button.outline { background: var(--white); border-color: var(--line); }
.button.outline:hover { background: var(--tint); }
.hero { display: grid; grid-template-columns: 43% 57%; margin-top: 30px; min-height: 365px; color: #fffaf0; background: var(--pine-deep); border-radius: 15px; overflow: hidden; }
.hero-copy { padding: 40px clamp(30px, 4.3vw, 62px); align-self: center; }
.eyebrow { margin: 0 0 18px; color: #e3d3ad; font-size: 12px; letter-spacing: .18em; }
.hero h1 { margin: 0; font: 700 clamp(40px, 4.35vw, 71px)/1.1 var(--serif); letter-spacing: .05em; }
.hero-description { color: #e0e6db; margin: 20px 0 23px; font-size: 14px; line-height: 1.7; }
.hero-photo { position: relative; margin: 0; min-height: 100%; background: #a18768; }
.hero-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 57%; }
.hero-photo button { position: absolute; display: flex; align-items: center; gap: 16px; right: 16px; bottom: 16px; border: 1px solid #fffcf05c; border-radius: 6px; padding: 8px 11px; color: white; background: #26332bdc; font-size: 12px; }
.hero-photo button:hover { background: var(--pine-deep); }
.inventory { margin: 42px 0 60px; scroll-margin-top: 20px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 19px; }
.section-head h2, .secondary h1 { margin: 0; font: 700 clamp(27px, 3vw, 36px)/1.2 var(--serif); letter-spacing: .035em; }
.section-head p, .muted { color: var(--muted); font-size: 14px; margin: 9px 0 0; line-height: 1.65; }
.search { width: min(330px, 100%); display: flex; gap: 12px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; }
.search:focus-within { outline: 2px solid var(--pine); outline-offset: 1px; }
.search input { color: var(--ink); border: 0; outline: 0; background: transparent; padding: 12px 0; min-width: 0; width: 100%; font-size: 13px; }
.glass { flex: 0 0 12px; height: 12px; border: 1.5px solid var(--muted); border-radius: 50%; position: relative; margin-right: 3px; }
.glass::after { content: ""; position: absolute; height: 5px; width: 1.5px; background: var(--muted); left: 9px; top: 8px; transform: rotate(-44deg); }
.filter-row { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.filters, .sort { display: flex; align-items: center; gap: 7px; }
.filters { flex-wrap: wrap; }
.filters button { border: 1px solid transparent; background: none; color: var(--muted); border-radius: 6px; padding: 7px 11px; font-size: 13px; white-space: nowrap; }
.filters button:hover, .filters button[aria-pressed="true"] { color: var(--pine); background: var(--tint); border-color: #dce4d8; }
.filters button[aria-pressed="true"] { font-weight: 700; }
.sort, .sort select { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sort select { min-height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; background: var(--white); }
.result-count { color: var(--muted); font-size: 12px; margin: 14px 0 10px; }
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.card:hover { border-color: #a1b0a2; }
.card-media { position: relative; aspect-ratio: 1.28; background: #e9e2d5; }
.card-media > button:first-child { display: block; border: 0; padding: 0; width: 100%; height: 100%; background: none; }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
.card-stock { position: absolute; left: 10px; top: 10px; padding: 4px 7px; color: var(--pine-deep); background: #f9fbf4; border-radius: 5px; font-size: 11px; font-weight: 700; pointer-events: none; }
.card-stock.out { color: #77461f; background: #fff1dc; }
.favorite { position: absolute; display: grid; place-items: center; right: 10px; top: 10px; width: 31px; height: 31px; border: 1px solid #fffefa9e; border-radius: 7px; color: var(--pine); background: #fffdf1f2; font-size: 17px; }
.favorite:hover { background: white; }
.favorite[aria-pressed="true"] { color: #a75843; }
.card-copy { padding: 12px 13px 14px; }
.card-meta { display: flex; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 11px; }
.card-title { display: block; text-align: left; margin: 7px 0 10px; padding: 0; border: 0; background: none; font-size: 15px; font-weight: 700; line-height: 1.35; }
.card-title:hover { color: #506b53; text-decoration: underline; }
.card-prices { display: flex; flex-wrap: wrap; gap: 7px 16px; padding-top: 10px; border-top: 1px solid var(--line); }
.card-prices span, .detail-prices span { color: var(--muted); font-size: 11px; display: block; }
.card-prices strong { font-size: 19px; color: var(--pine); display: block; }
.card-prices b { display: block; font-size: 15px; font-weight: 600; margin-top: 3px; }
.empty { grid-column: 1 / -1; padding: 45px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 20px; }
.secondary { margin-block: 52px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.guide-grid article, .table-wrap { border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.guide-grid article { padding: 22px; }
.guide-grid h2 { font-size: 17px; margin: 0 0 10px; }
.guide-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.table-wrap { overflow: auto; }
table { text-align: left; width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
th { background: #f0f3ec; }
tr:last-child td { border: 0; }
td button { border: 0; background: none; color: var(--pine); text-decoration: underline; }
.dialog { border: 1px solid var(--line); color: var(--ink); background: var(--white); padding: 24px; border-radius: 13px; max-height: calc(100dvh - 30px); max-width: calc(100vw - 24px); box-shadow: 0 20px 60px #202e2840; }
.dialog::backdrop { background: #1a2925ac; }
.dialog h2 { margin: 0; font-size: 21px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.close { flex: 0 0 33px; min-height: 33px; border-radius: 7px; border: 1px solid var(--line); background: var(--white); font-size: 21px; }
.close:hover { background: var(--tint); }
.product-dialog { width: 810px; }
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-top: 16px; }
.detail-photo { border-radius: 9px; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: var(--paper); }
.detail-prices { display: flex; flex-wrap: wrap; gap: 15px 25px; padding: 12px; border-radius: 7px; background: var(--tint); }
.detail-prices strong { font-size: 21px; color: var(--pine); }
.specs { font-size: 13px; }
.specs div { display: grid; grid-template-columns: minmax(85px, 42%) 1fr; gap: 6px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.compact { width: 400px; }
.compact label { display: block; margin-top: 13px; font-size: 13px; }
.compact input { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; margin-top: 5px; color: var(--ink); }
.full { width: 100%; margin-top: 10px; }
.dialog-note { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.import-warning { padding: 10px 12px; font-size: 12px; line-height: 1.6; color: #5d3b20; background: #f9efdf; border-radius: 7px; }
.studio-header { padding-block: 12px; }
.studio-head { align-items: center; }
.studio-picker { font-size: 13px; color: var(--muted); }
.studio-picker select { padding: 8px; max-width: 100%; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--white); }
.sales-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.asset-frame { display: block; }
.gallery-switch { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.gallery-switch button { border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px; background: var(--white); color: var(--muted); font-size: 12px; }
.gallery-switch button[aria-pressed="true"] { background: var(--pine); color: white; border-color: var(--pine); }
.gallery-open { display: inline-block; margin-top: 9px; text-decoration: underline; font-size: 13px; }
.selling-note { font-size: 13px; line-height: 1.65; }
.listing-preview { margin-top: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); padding: 20px; display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; }
.listing-preview h2 { margin: 0; font-size: 18px; }
.listing-preview p { white-space: pre-line; color: var(--muted); font-size: 14px; line-height: 1.65; margin-bottom: 0; }
@media (max-width: 1000px) { .sales-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 550px) { .sales-grid { gap: 8px; } .sales-grid .studio-asset figcaption { padding: 10px; } .listing-preview { flex-direction: column; } }
.studio-asset { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.asset-frame img, .asset-frame canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: var(--paper); }
.studio-asset figcaption { padding: 16px; }
.studio-asset h2 { margin: 0; font-size: 17px; }
.studio-asset p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 8px 0 14px; }
@media (max-width: 740px) { .studio-head { flex-direction: column; align-items: start; } }
.toast { position: fixed; z-index: 2; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 24px); padding: 10px 14px; border-radius: 7px; color: white; background: var(--pine-deep); font-size: 13px; }
@media (max-width: 1050px) {
  .wrap, .header-inner { width: calc(100% - 56px); }
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .wrap, .header-inner { width: calc(100% - 32px); }
  .header-inner { min-height: 0; flex-wrap: wrap; padding-top: 10px; gap: 10px; }
  nav { order: 3; width: 100%; gap: 22px; min-height: 38px; }
  .header-actions { gap: 8px; }
  .header-actions .button { padding-inline: 9px; }
  .hero { margin-top: 17px; grid-template-columns: 1fr; }
  .hero-photo { min-height: 185px; }
  .hero-copy { padding: 22px 23px; }
  .hero-description { margin: 14px 0 16px; }
  .desktop-only { display: none; }
  .inventory { margin-top: 27px; }
  .inventory .section-head { flex-direction: column; align-items: stretch; }
  .search { width: 100%; }
  .filter-row { flex-wrap: wrap; }
  .filters { gap: 3px; }
  .filters button { padding-inline: 8px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .card-copy { padding: 9px; }
  .card-title { font-size: 13px; }
  .card-prices { gap: 5px 12px; }
  .card-prices strong { font-size: 16px; }
  .card-prices b { font-size: 14px; }
  .guide-grid, .detail-layout { grid-template-columns: 1fr; }
  .detail-layout { gap: 12px; }
  .dialog { padding: 15px; }
}
.choice-caption { margin: 5px 0 8px; font-size: 12px; color: var(--muted); }
.card-prices .locked, .account-status { font-size: 13px; }
.variant-select { margin-bottom: 14px; }
.admin-block { margin-top: 35px; }
.admin-block h2 { margin-bottom: 6px; }
.admin-block details { margin-top: 18px; }
.admin-block summary { cursor: pointer; }
.editor, .dealer-row { margin: 12px 0; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.editor label, .dealer-row label { display: inline-grid; gap: 4px; margin: 4px 7px 5px 0; font-size: 12px; }
.editor input, .editor select, .dealer-row input, .dealer-row select, .compact select { max-width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.field-row { padding: 8px 0; border-top: 1px solid var(--line); }
.dealer-row strong { margin-right: 12px; }
#template-list { font-size: 13px; line-height: 1.8; margin-top: 12px; }
@media(max-width: 740px) { .header-inner { flex-wrap: wrap; } .header-actions { flex-wrap: wrap; } .account-status { font-size: 11px; } }
