@font-face {
  font-family: "Tianci Brush";
  src: url("fonts/brush.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Tianci Serif";
  src: url("fonts/headings.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Tianci Sans";
  src: url("fonts/body.woff2") format("woff2");
  font-weight: 400 650;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f6f3ec;
  --surface: #fffcf5;
  --ink: #221f1a;
  --muted: #675d50;
  --line: #dcd2c2;
  --red: #8e3026;
  --red-dark: #70231c;
  --gold: #cbaa7b;
  --brush: "Tianci Brush", "Kaiti SC", KaiTi, serif;
  --serif: "Tianci Serif", "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  --sans: "Tianci Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font: 400 16px/1.65 var(--sans);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
.wrap { width: min(1240px, calc(100% - 72px)); margin-inline: auto; }
.masthead { color: #f8efdc; background: #211b17; }
.mast-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font: 400 1.72rem/1 var(--brush); letter-spacing: .08em; white-space: nowrap; }
.brand-seal { display: grid; place-items: center; width: 33px; height: 36px; padding-left: .1em; background: var(--red); border: 3px double #dfb493; color: #fff6e5; font-size: 1.22rem; }
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 23px; align-items: center; }
nav a, .hero-link { color: inherit; font-size: .9rem; text-decoration: none; }
nav a:hover, .hero-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-order { border: 1px solid #967856; padding: 7px 11px; }
.hero {
  border-block: 1px solid #785b42;
  background:
    linear-gradient(90deg, #291d19 0%, #372621b0 58%, #2b201bd4 100%),
    radial-gradient(circle at 50% 100%, transparent 13px, #b78d5c52 14px 15px, transparent 16px 22px, #b78d5c47 23px 24px, transparent 25px 31px, #b78d5c44 32px 33px, transparent 34px) 0 0 / 68px 34px,
    radial-gradient(circle at 50% 100%, transparent 13px, #b78d5c42 14px 15px, transparent 16px 22px, #b78d5c37 23px 24px, transparent 25px 31px, #b78d5c34 32px 33px, transparent 34px) 34px 17px / 68px 34px,
    #3c2a22;
}
.hero-inner { min-height: 370px; padding-block: 34px; display: grid; grid-template-columns: minmax(260px, .78fr) minmax(0, 1.35fr); align-items: center; gap: clamp(22px, 6vw, 92px); }
h1, h2, p { margin-top: 0; }
h1 { font: 400 clamp(2.9rem, 5.45vw, 4.9rem)/1.16 var(--brush); letter-spacing: .025em; margin-bottom: 23px; }
h2 { font-size: 1.28rem; margin-bottom: 15px; }
.hero-label { color: #ead1a3; font-size: .9rem; letter-spacing: .14em; margin-bottom: 9px; }
.hero-link { display: inline-block; border-bottom: 1px solid var(--gold); padding: 0 2px 6px; }
.featured { display: grid; grid-template-columns: 1fr 1.14fr 1fr; align-items: center; gap: 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid transparent; padding: 8px 12px; min-height: 42px; font-weight: 550; border-radius: 4px; background: var(--surface); }
.featured-photo { position: relative; overflow: hidden; padding: 0; border: 1px solid #ad8a5f; color: #fff2d9; background: #211a15; border-radius: 2px; box-shadow: 0 10px 28px #1b11127a; }
.featured-photo img { display: block; aspect-ratio: .78; width: 100%; object-fit: cover; object-position: center 36%; transition: transform .22s ease; }
.featured-photo:hover img { transform: scale(1.045); }
.featured-photo:nth-child(2) { transform: translateY(-6px); }
.featured-photo .photo-caption { position: absolute; inset: auto 0 0; display: block; padding: 23px 10px 9px; background: linear-gradient(transparent,#1b1310e8); text-align: center; font-size: .875rem; letter-spacing: .12em; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 14px; }
.gallery { padding-block: 32px 27px; }
.gallery-head h2, .order-head h2 { font: 500 clamp(1.7rem, 3.1vw, 2.4rem)/1.22 var(--serif); letter-spacing: .055em; margin: 0; }
.gallery-head { margin-bottom: 17px; }
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 152px;
  align-items: center;
  gap: 20px 42px;
  margin-top: 24px;
  padding: 20px 25px;
  color: #f8efdc;
  background: #34261e;
  border-left: 4px solid var(--gold);
  border-radius: 4px;
}
.contact h2 { font: 500 clamp(1.4rem, 2.65vw, 2.14rem)/1.34 var(--serif); letter-spacing: .025em; margin-bottom: 7px; }
.contact-intro { margin-bottom: 10px; color: #f2d9af; }
.custom-copy { margin-bottom: 11px; line-height: 1.75; }
.custom-copy strong { white-space: nowrap; font-weight: 600; }
.contact-phones { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 14px; }
.contact-phones span { font-size: .87rem; color: #f2d9af; }
.contact-phones a { color: #fff1d5; text-underline-offset: 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wechat-card { display: grid; place-items: center; gap: 5px; border-color: #cbaa7b; color: #f8efdc; background: #2b2019; padding: 7px; }
.wechat-card:hover { border-color: #fff1d5; }
.wechat-card img, #wechat-dialog img { width: 100%; height: auto; display: block; background: #fff; border-radius: 2px; }
.wechat-card span { font-size: .86rem; }
#wechat-dialog { width: min(460px, calc(100% - 24px)); }
#wechat-dialog img { margin-inline: auto; max-height: 69vh; object-fit: contain; }
.muted, .guide { color: var(--muted); font-size: .875rem; }
.guide { margin: 10px 0 12px; }
.parts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.ghost, .part, .style-card { border-color: var(--line); }
.ghost:hover, .part:hover, .style-card:hover { border-color: var(--red); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible, textarea:focus-visible { outline: 2px solid #a6673c; outline-offset: 3px; }
.primary, .part[aria-pressed="true"] { color: #fff8ea; background: var(--red); border-color: var(--red); }
.primary:hover, .part[aria-pressed="true"]:hover { background: var(--red-dark); }
.part { min-height: 54px; }
.part small { display: block; color: inherit; font-size: .81rem; font-weight: 400; }
.photo-sources { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 11px; }
.photo-sources button { min-height: 38px; padding: 4px 11px; background: transparent; border-color: transparent; font-size: .87rem; font-weight: 500; color: var(--muted); }
.photo-sources button:hover, .photo-sources button[aria-pressed="true"] { border-color: var(--line); color: var(--red-dark); background: var(--surface); }
#no-photos { padding: 18px 12px; border: 1px dashed var(--line); }
.references { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 15px; }
.photo-tile { display: grid; align-content: start; padding: 0; border-color: var(--line); text-align: left; overflow: hidden; min-width: 0; }
.photo-tile:hover, .photo-tile[aria-pressed="true"] { border-color: var(--red); }
.photo-tile[aria-pressed="true"] { color: var(--red-dark); background: #f5e4da; box-shadow: inset 0 0 0 1px var(--red); }
.references img, .reference-text { display: block; width: 100%; aspect-ratio: 1.1; background: #e8e0d3; object-fit: cover; object-position: 50% 30%; }
.reference-text { display: grid; place-items: center; text-align: center; padding: 8px; font-size: .875rem; }
.photo-tile .photo-caption { display: block; font-size: .92rem; padding: 8px 10px; overflow-wrap: anywhere; }
.photo-caption small { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; margin-top: 2px; }
.gallery-foot, .reference-links, .photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.gallery-foot { justify-content: space-between; padding-top: 15px; }
.reference-links { color: var(--muted); font-size: .875rem; }
.reference-links a, .photo-actions a { color: var(--red-dark); text-underline-offset: 3px; }
.order-section { padding-block: 25px 42px; border-top: 1px solid var(--line); }
.order-head { margin-bottom: 15px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 17px; align-items: start; }
.main-column, .side-column { display: grid; gap: 17px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 20px; }
.fields, .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
label { display: grid; gap: 4px; min-width: 0; font-size: .875rem; font-weight: 700; }
.full, .actions .primary { grid-column: 1 / -1; }
input, select, textarea { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #bfb19e; background: #fff; border-radius: 4px; font-weight: 400; font-size: 1rem; }
select { appearance: none; padding-right: 30px; background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 16px center / 5px 5px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 11px center / 5px 5px no-repeat, #fff; }
summary { cursor: pointer; font-weight: 700; font-size: .875rem; }
.order-details { border-top: 1px solid var(--line); padding-top: 10px; }
.order-details .fields { margin-top: 10px; }
.styles { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.style-card { display: grid; align-content: start; gap: 5px; text-align: left; }
.style-card small { color: var(--muted); font-size: .81rem; font-weight: 400; }
.style-card[aria-pressed="true"] { border-color: var(--red); background: #f5e4da; color: var(--red-dark); }
.quote .guide { margin-top: -8px; }
.unit-price { display: flex; align-items: baseline; color: var(--red-dark); margin: 0 0 12px; }
.unit-price strong { font: 700 2rem/1.1 var(--serif); }
.unit-price span { font-size: .9rem; }
.status { margin: 10px 0 0; font-size: .875rem; color: var(--red-dark); }
.status:empty { display: none; }
.saved-order { display: block; width: 100%; text-align: left; overflow-wrap: anywhere; margin-top: 8px; }
.saved-order small { display: block; color: var(--muted); font-size: .875rem; font-weight: 400; }
.saved .muted { margin-bottom: 0; }
dialog { width: min(670px, calc(100% - 24px)); border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); padding: 15px; }
dialog::backdrop { background: #211a16db; }
dialog .section-head { margin-bottom: 8px; align-items: center; }
dialog h2 { margin: 0; }
dialog textarea { margin-top: 8px; resize: vertical; }
#photo-preview { display: block; width: 100%; max-height: 69vh; object-fit: contain; background: #2a211b; border-radius: 3px; }
.photo-actions { margin-top: 10px; }
@media (max-width: 850px) {
  .wrap { width: calc(100% - 40px); }
  .hero-inner { min-height: 0; gap: 23px; }
  .references { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 24px); }
  .mast-inner { min-height: 64px; gap: 9px; }
  .brand { font-size: 1.28rem; gap: 6px; }
  .brand-seal { width: 25px; height: 29px; font-size: 1rem; }
  nav { gap: 7px; }
  nav a { font-size: .79rem; }
  .nav-order { padding: 5px 6px; }
  .hero-inner { grid-template-columns: 1fr; padding-block: 22px 16px; gap: 19px; }
  h1 { margin-bottom: 10px; }
  .featured { gap: 8px; }
  .featured-photo img { aspect-ratio: .86; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 11px; margin-top: 16px; padding: 14px; }
  .wechat-card { width: min(160px, 100%); }
  .gallery { padding-top: 23px; }
  .parts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .references { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .photo-tile .photo-caption { padding: 5px 7px; }
  .panel { padding: 13px; }
  .styles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .featured-photo img { transition: none; }
}
