@font-face {
  font-family: ArchiveSerif;
  src: url("/assets/fonts/NotoSerifSC-VF.ttf") format("truetype");
  font-display: swap;
}
:root {
  --paper: #f8f4ec;
  --white: #fffdf9;
  --ink: #322a23;
  --muted: #827669;
  --line: #e3d9cb;
  --brown: #775a43;
  --pale: #ede5d8;
  --red: #ad493f;
  --green: #426e54;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.7;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 11px 17px;
  border-radius: 4px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
button:hover,
.button:hover {
  border-color: var(--brown);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.primary,
.button.primary {
  background: var(--brown);
  color: white;
  border-color: var(--brown);
}
button.danger {
  color: var(--red);
}
.link {
  background: transparent;
  border: 0;
  padding: 7px;
  color: var(--brown);
}
:focus-visible {
  outline: 2px solid var(--brown);
  outline-offset: 3px;
}
input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  min-width: 0;
}
input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--brown);
  flex-shrink: 0;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: ArchiveSerif, serif;
  font-weight: 500;
}
h1 {
  font-size: 34px;
}
h2 {
  font-size: 23px;
}
h3 {
  font-size: 18px;
}
.quiet {
  color: var(--muted);
  font-size: 13px;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--muted);
  margin-bottom: 12px;
}
.shell {
  max-width: 1080px;
  margin: auto;
  padding: 0 30px 110px;
}
.top {
  height: 92px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-family: ArchiveSerif, serif;
  font-size: 22px;
  letter-spacing: 3px;
}
.brand small {
  display: block;
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
}
.top nav {
  display: flex;
  gap: 20px;
}
.top nav a {
  font-size: 13px;
}
.hero {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  padding: 48px;
  margin: 28px 0;
  background: #e9dfcf;
}
.hero h1 {
  line-height: 1.65;
  position: relative;
  z-index: 1;
}
.hero p {
  margin-top: 20px;
  color: #7d6e5c;
}
.hero-art {
  position: absolute;
  width: 290px;
  height: 290px;
  right: 9%;
  top: 10px;
  border: 34px solid #c3b39b;
  border-radius: 50%;
  box-shadow:
    inset 8px 10px 20px #aa977c,
    8px 12px 20px #cbbba580;
  transform: rotate(-25deg) scaleY(0.57);
}
.hero-art:after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border: 23px solid #e6d9c3;
  border-radius: 50%;
  left: 63px;
  top: 50px;
  box-shadow:
    inset 4px 8px 10px #ae9979,
    5px 7px 11px #aa977c66;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 26px 0 18px;
}
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 22px 0;
}
.filters input {
  flex: 1;
  min-width: 160px;
}
.filters select {
  width: auto;
  min-width: 110px;
}
.tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 7px;
}
.tabs button {
  white-space: nowrap;
  border-color: transparent;
  background: transparent;
}
.tabs .active {
  background: var(--brown);
  color: white;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
  margin-top: 20px;
}
.product-card {
  min-width: 0;
  display: block;
}
.product-photo {
  aspect-ratio: 1;
  background: var(--pale);
  overflow: hidden;
  position: relative;
  border-radius: 3px;
}
.product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.product-card:hover img {
  transform: scale(1.025);
}
.product-card .tag {
  position: absolute;
  left: 14px;
  top: 14px;
}
.product-card h3 {
  font-size: 17px;
  margin: 14px 0 6px;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.price {
  font-family: Georgia, serif;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.tag {
  display: inline-block;
  background: #fffcf4e6;
  color: var(--brown);
  padding: 3px 8px;
  font-size: 10px;
  letter-spacing: 1px;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 42px;
  margin: 28px 0;
}
.product-info {
  padding: 16px 0;
}
.product-info h1 {
  font-size: 28px;
  margin: 8px 0 15px;
}
.product-info .price {
  font-size: 31px;
}
.prose {
  white-space: pre-line;
  margin: 24px 0;
  color: var(--muted);
}
.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 15px 0;
}
.specs .selected {
  border-color: var(--brown);
  background: var(--pale);
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.actions > * {
  flex: 1;
  white-space: nowrap;
}
.box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 23px;
  margin: 16px 0;
}
.row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 0;
}
.row img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  background: var(--pale);
  border-radius: 3px;
}
.row .grow {
  flex: 1;
  min-width: 0;
}
.row .quantity {
  width: 68px;
}
.row h3 {
  font-family: inherit;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0;
}
.message {
  padding: 13px 17px;
  margin: 18px 0;
  border-left: 3px solid var(--green);
  background: #edf2e9;
  color: #325b3e;
  overflow-wrap: anywhere;
}
.message.error {
  background: #f7ebe5;
  color: #963f36;
  border-color: var(--red);
}
.empty {
  padding: 75px 25px;
  text-align: center;
  color: var(--muted);
}
.empty .symbol {
  font-family: ArchiveSerif, serif;
  font-size: 65px;
  color: #b29c83;
}
.empty p {
  margin: 12px 0 20px;
}
.bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fffcf7ed;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  gap: 55px;
  padding: 14px 15px max(14px, env(safe-area-inset-bottom));
  z-index: 5;
  backdrop-filter: blur(12px);
}
.bottom a {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.bottom b {
  display: block;
  font-size: 19px;
  font-weight: 400;
}
.bottom a.active {
  color: var(--brown);
}
.demo-note {
  background: #ede6d6;
  padding: 8px 15px;
  font-size: 11px;
  text-align: center;
  color: #806746;
}
.loading {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
.summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.summary dt {
  color: var(--muted);
}
.summary dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.order-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.order-title span {
  font-size: 12px;
  color: var(--muted);
}
.narrow {
  max-width: 650px;
  margin: 35px auto;
}
.status {
  background: var(--pale);
  color: var(--brown);
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 12px;
}
.notice-strip {
  padding: 17px 20px;
  background: var(--pale);
  font-size: 13px;
  color: var(--brown);
  line-height: 1.9;
}
.admin-shell {
  max-width: 1400px;
  margin: auto;
  padding: 0 28px 60px;
}
.admin-layout {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  gap: 30px;
  padding-top: 25px;
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-self: start;
  position: sticky;
  top: 20px;
}
.admin-nav a {
  padding: 12px 15px;
  border-left: 2px solid transparent;
}
.admin-nav a.active {
  background: var(--pale);
  border-color: var(--brown);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.stat {
  padding: 25px;
  background: var(--white);
  border: 1px solid var(--line);
}
.stat strong {
  display: block;
  font: 32px Georgia;
  margin: 8px 0;
}
.table-scroll {
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--line);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 650px;
}
th,
td {
  text-align: left;
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
th {
  background: #f0e9df;
  color: var(--muted);
  font-weight: 500;
}
td button {
  padding: 6px 12px;
  font-size: 12px;
}
.sku-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  margin: 10px 0;
  align-items: end;
}
.preview-image {
  max-width: 200px;
  background: var(--pale);
}
.footer-note {
  margin-top: 45px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1px;
}
@media (max-width: 700px) {
  body {
    font-size: 13px;
  }
  .shell {
    padding: 0 18px 100px;
  }
  .top {
    height: 76px;
  }
  .brand {
    font-size: 19px;
  }
  .top nav {
    gap: 14px;
  }
  .top nav a {
    font-size: 11px;
  }
  .hero {
    padding: 28px 24px;
    min-height: 246px;
    margin: 20px 0;
  }
  .hero h1 {
    font-size: 27px;
    max-width: 240px;
    text-wrap: balance;
  }
  .hero p {
    font-size: 11px;
    position: relative;
    z-index: 1;
  }
  #search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  #search input {
    min-width: 0;
  }
  #search select {
    grid-column: 1/-1;
    grid-row: 2;
    width: 100%;
  }
  .hero-art {
    right: -58px;
    top: 40px;
    width: 240px;
    height: 240px;
    border-width: 29px;
    opacity: 0.8;
  }
  .hero-art:after {
    border-width: 19px;
    left: 30px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 13px;
  }
  .product-card h3 {
    font-size: 15px;
    margin-top: 11px;
  }
  .product-card .tag {
    top: 9px;
    left: 9px;
    padding: 2px 5px;
    font-size: 9px;
  }
  .product-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .price {
    font-size: 21px;
  }
  .product-detail {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .product-info {
    padding: 10px 2px;
  }
  .product-info h1 {
    font-size: 24px;
  }
  .box {
    padding: 18px;
  }
  .bottom {
    justify-content: space-around;
    gap: 0;
  }
  .row {
    gap: 10px;
  }
  .row img {
    width: 64px;
    height: 64px;
  }
  .row .quantity {
    width: 55px;
    padding: 8px;
  }
  .row button {
    padding: 7px;
  }
  .form-grid {
    gap: 12px;
  }
  .narrow {
    margin: 22px auto;
  }
  .admin-shell {
    padding: 0 16px 40px;
  }
  .admin-layout {
    grid-template-columns: 1fr;
    gap: 15px;
    padding-top: 15px;
  }
  .admin-nav {
    flex-direction: row;
    overflow: auto;
    position: static;
    white-space: nowrap;
  }
  .admin-nav a {
    padding: 9px 12px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat {
    padding: 17px;
  }
  .section-head h1 {
    font-size: 26px;
  }
  .sku-row {
    grid-template-columns: 1fr 1fr;
  }
  .sku-row > label:first-child {
    grid-column: 1/-1;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.campaigns {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 22px 0;
}
.campaign {
  position: relative;
  flex: 0 0 65%;
  max-width: 600px;
  height: 220px;
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: 5px;
  background: #ede5d8;
}
.campaign img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.campaign span {
  position: absolute;
  left: 20px;
  bottom: 15px;
  background: #fffaf0e8;
  padding: 8px 14px;
  font-family: serif;
}
.banner-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.catalog-tools, .filter-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; }
.filter-summary { background: var(--pale); padding: 4px 14px; }
#catalog-dialog { color: var(--ink); background: var(--white); width: min(540px, calc(100% - 24px)); max-height: 90dvh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
#catalog-dialog::backdrop { background: #261c1666; }
#catalog-dialog .section-head { margin-top: 0; }
#catalog-dialog .actions { margin-top: 24px; }
#catalog-dialog .actions > button { flex: 1; }
#filter-error { color: var(--red); margin-top: 12px; }
@media (max-width: 600px) {
  .hero { min-height: 160px; padding: 22px 18px; }
  .hero h1 { max-width: 100%; font-size: 26px; line-height: 1.5; }
  .hero p { max-width: 90%; margin-top: 12px; }
  .hero-art { opacity: .28; }
  #catalog-dialog { padding: 18px; }
}

.order-tabs{display:flex;overflow:auto;white-space:nowrap;margin-bottom:24px;gap:8px}.order-tabs a{padding:10px 16px;border-bottom:1px solid #e6dbcc}.order-tabs a.active{background:#806046;color:white}.cart-selection{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 0;border-top:1px solid #e6dbcc}.cart-selection .check{margin:0}.repurchase-context{margin-top:24px;background:#f4ebdf}.repurchase-context h2{margin:12px 0}.admin-layout .form-grid{align-items:end}

.home-publishing-state{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:22px;background:#eee5d9;margin-bottom:20px}.home-publishing-state p{margin-top:8px}.home-banner-row{background:#fcfaf7;margin:16px 0}.home-product-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}.home-featured-line{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e5d9ca;padding:10px 0;gap:16px}.home-featured-line .actions{margin:0}.home-featured-line button{padding:6px 12px}.home-editor-actions{margin-top:30px}#home-preview-dialog{max-width:760px;width:90vw;max-height:88vh;overflow:auto;padding:28px;border:1px solid #d8c7b3;background:#fcfaf7;color:#49372b}#home-preview-dialog::backdrop{background:#30251cc0}.home-preview-banners{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:24px 0}.home-preview-banners img{width:100%;max-height:260px;object-fit:cover}.home-preview-banners h3{margin:10px 0}.home-preview-banners .empty{padding:30px 10px;background:#eee5d9}@media(max-width:600px){.home-publishing-state,.home-product-choices,.home-preview-banners{grid-template-columns:1fr}.home-featured-line{align-items:flex-start}.home-featured-line .actions{flex-wrap:nowrap}#home-preview-dialog{padding:18px}}

.admin-layout>section,.admin-nav{min-width:0}#home-preview-content h1{overflow-wrap:anywhere}@media(max-width:700px){.admin-layout{grid-template-columns:minmax(0,1fr)}}

@media(max-width:600px){.order-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;overflow:visible}.order-tabs a{padding:10px 0;text-align:center;font-size:12px;min-width:0}.home-featured-line{flex-wrap:wrap}.home-featured-line>span{overflow-wrap:anywhere}}

.care-record{display:block}.care-record h3,.care-message p{margin:14px 0}.care-message.unread{border-left:3px solid #87684e}.care-progress{padding:28px;background:#eee5d9;margin-bottom:24px}.care-progress h2{margin:16px 0}.coupon-card{display:grid;grid-template-columns:130px minmax(0,1fr);gap:24px;border:1px solid #e1d3c1;margin:18px 0;padding:24px;background:#fffdfa}.coupon-value{font-size:30px;color:#8d563b;align-self:center}.coupon-value small{display:block;font-size:12px;margin-top:12px}.coupon-card .button{margin-left:12px}.engraving-preview{margin:20px 0;padding:30px 15px;text-align:center;background:#ede3d2;border-radius:50%;border:5px double #b6a48b;font-family:Georgia,serif;overflow-wrap:anywhere}.engraving-preview[data-font=SANS]{font-family:Arial,sans-serif}.engraving-preview[data-font=SCRIPT]{font-family:cursive}.engraving-summary{font-size:12px;color:#866b54;overflow-wrap:anywhere;margin-top:8px}.engraving-config legend{padding:0 10px}.engraving-editor{margin-top:24px}.care-record p{overflow-wrap:anywhere}form[data-care-form]>label,form[data-ops-form]>label{margin:18px 0}@media(max-width:480px){.coupon-card{grid-template-columns:1fr;gap:16px;padding:20px}.coupon-value small{display:inline-block;margin:0 0 0 14px}.coupon-card .button{margin:10px 0 0}.engraving-editor{padding:16px}}
