:root {
  color-scheme: light;
  --ink: #222722;
  --muted: #565d54;
  --paper: #f8f8f4;
  --green: #2e3c31;
  --line: #dedfd7;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { padding: 0; }
:focus-visible { outline: 2px solid #637756; outline-offset: 4px; }
.shell { width: min(1312px, calc(100% - 112px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: flex; width: fit-content; gap: 13px; align-items: center; white-space: nowrap; }
.brand-cn { font-size: 1.35rem; font-weight: 750; letter-spacing: .10em; }
.brand-en { font: 700 .65rem/1.3 system-ui, sans-serif; letter-spacing: .14em; color: var(--muted); }
nav { display: flex; gap: clamp(19px, 3.3vw, 49px); font-size: .875rem; white-space: nowrap; }
nav a:first-child { font-weight: 700; }
nav a:hover, .footer-inner a:hover { text-decoration: underline; text-underline-offset: 4px; }
.header-search { justify-self: end; display: flex; align-items: center; gap: 8px; min-height: 44px; background: transparent; border: 0; font-size: .875rem; }
.hero { margin-top: 34px; display: grid; grid-template-columns: .80fr 1.20fr; min-height: clamp(355px, 35vw, 470px); border-radius: 5px; overflow: hidden; background: var(--green); }
.hero-content { align-self: center; color: #f5f4ec; padding: 43px clamp(30px, 5.1vw, 76px); }
.hero-kicker { display: flex; gap: 10px; align-items: center; font-size: .875rem; letter-spacing: .14em; color: #e0e5d8; }
.hero-kicker::before { content: ""; width: 21px; height: 1px; background: currentColor; }
.hero h1 { margin: 23px 0 19px; font-size: clamp(2.55rem, 4.4vw, 4.85rem); font-weight: 650; letter-spacing: .045em; line-height: 1.14; }
.hero p { font-size: 1rem; line-height: 1.7; color: #e5e8de; margin: 0 0 27px; }
.primary-link { min-height: 47px; display: inline-flex; align-items: center; padding: 0 21px; border-radius: 3px; color: var(--green); background: #f5f4ec; font-size: .875rem; font-weight: 700; }
.primary-link:hover { background: #e0e5d8; }
.hero-media { position: relative; min-height: 100%; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 57% center; background: #dbd8cc; }
.catalog { padding: clamp(45px, 5.4vw, 77px) 0 77px; scroll-margin-top: 20px; min-height: 360px; }
.catalog-heading { display: flex; align-items: baseline; gap: 15px; margin-bottom: 25px; }
.catalog-heading h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.25; letter-spacing: .04em; }
.count { font-size: .875rem; color: var(--muted); }
.catalog-tools { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.filters, .catalog-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filters:empty { display: none; }
.filters button, .catalog-controls select, .search-box { min-height: 42px; border: 1px solid var(--line); border-radius: 3px; background: transparent; font-size: .875rem; }
.filters button { padding: 0 17px; }
.filters button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.filters button[aria-pressed="false"]:hover { background: #ebede6; }
.search-box { display: flex; align-items: center; gap: 8px; width: 176px; padding: 0 11px; }
.search-box:focus-within { border-color: #637756; }
.search-box svg { flex: none; color: var(--muted); }
.search-box input { min-width: 0; width: 100%; border: 0; padding: 9px 0; background: transparent; outline: 0; }
.search-box input::placeholder { color: var(--muted); }
.catalog-controls select { appearance: none; padding: 0 33px 0 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%23222722' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 10px center; }
.products { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 29px 20px; }
.product { width: 100%; text-align: left; background: none; border: 0; display: block; }
.product-image { border-radius: 4px; aspect-ratio: 1.06; overflow: hidden; position: relative; display: grid; place-items: center; background: #e9ebe4; color: var(--muted); }
.product-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease; }
.product:hover .product-image img { transform: scale(1.035); }
.product-meta { display: flex; justify-content: space-between; align-items: end; gap: 10px; padding: 13px 0 0; }
.product-category { display: inline-block; color: var(--muted); font-size: .8125rem; }
.product h3 { font-size: 1.0625rem; line-height: 1.4; margin: 4px 0 0; overflow-wrap: anywhere; }
.product-price { white-space: nowrap; font: 650 1rem/1.4 system-ui, sans-serif; }
.status { padding: 39px 13px; border: 1px dashed var(--line); border-radius: 4px; text-align: center; color: var(--muted); }
.status p { margin: 0; }
.status button { margin-top: 13px; padding: 6px 12px; background: none; border: 1px solid var(--line); border-radius: 3px; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .875rem; }
.footer-brand { font-weight: 700; color: var(--ink); }
dialog { width: min(700px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; border: 0; border-radius: 6px; color: var(--ink); background: var(--paper); }
dialog[open] { display: grid; grid-template-columns: 1fr 1fr; }
dialog::backdrop { background: #171d16a3; }
.close { position: absolute; z-index: 1; top: 12px; right: 12px; width: 38px; height: 38px; border: 1px solid var(--line); background: var(--paper); border-radius: 50%; font-size: 1.4rem; line-height: 1; }
.detail-image { aspect-ratio: 1; border-radius: 0; align-self: start; }
.detail-copy { padding: 44px 26px 28px; }
.detail-copy h2 { margin: 8px 0; font-size: 1.55rem; overflow-wrap: anywhere; }
.detail-copy .product-price { margin: 0 0 21px; }
.description { margin: 0; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--muted); }
@media (max-width: 940px) {
  .shell { width: calc(100% - 64px); }
}
@media (max-width: 690px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 61px; grid-template-columns: 1fr auto; gap: 0; }
  nav { display: none; }
  .hero { margin-top: 20px; grid-template-columns: 1fr; }
  .hero-content { padding: 30px 24px; }
  .hero h1 { margin: 15px 0 12px; }
  .hero p { margin-bottom: 19px; }
  .hero-media { min-height: 0; }
  .hero-image { position: static; aspect-ratio: 1.75; max-height: none; height: auto; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 12px; }
  .product-meta { align-items: start; flex-direction: column; gap: 4px; }
}
@media (max-width: 430px) {
  .catalog-controls { width: 100%; flex-wrap: nowrap; }
  .search-box { flex: 1; }
  dialog[open] { grid-template-columns: 1fr; }
  .detail-image { aspect-ratio: 1.28; }
  .detail-copy { padding: 21px; }
}
.header-actions { justify-self: end; display: flex; align-items: center; gap: 18px; }
.header-actions a, .header-actions button { background: none; border: 0; font-size: .875rem; white-space: nowrap; }

.detail-copy .stock-note { margin: 0 0 14px; font-size: .875rem; color: var(--muted); }
.buy-btn { width: 100%; min-height: 48px; border: 0; border-radius: 3px; background: var(--green); color: #f5f4ec; font-weight: 700; font-size: .95rem; }
.buy-btn:hover:not(:disabled) { background: #3d4f41; }
.buy-btn:disabled { opacity: .45; cursor: default; }

/* 表单页（登录 / 注册） */
.form-wrap { width: min(420px, calc(100% - 32px)); margin: clamp(30px, 8vh, 80px) auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 34px 28px; }
.form-wrap h1 { margin: 0 0 6px; font-size: 1.5rem; }
.form-wrap .sub { margin: 0 0 24px; color: var(--muted); font-size: .9rem; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; font-size: .875rem; color: var(--muted); }
.field input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 3px; padding: 0 12px; background: var(--paper); }
.field input:focus { border-color: #637756; outline: 0; }
.form-submit { width: 100%; min-height: 48px; border: 0; border-radius: 3px; background: var(--green); color: #f5f4ec; font-weight: 700; margin-top: 6px; }
a.form-submit.sso-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.form-alt { margin-top: 18px; text-align: center; font-size: .875rem; color: var(--muted); }
.form-alt a { text-decoration: underline; text-underline-offset: 3px; }
.form-notice { margin: 0 0 14px; font-size: .875rem; color: #a12626; }

/* 订单中心 */
.order-list { display: grid; gap: 16px; padding: clamp(30px, 5vw, 56px) 0 80px; }
.order-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px; }
.order-card .order-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.order-card .order-title { font-weight: 700; font-size: 1.05rem; }
.order-card .order-meta { margin-top: 8px; display: grid; gap: 5px; font-size: .875rem; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 12px; border-radius: 100px; font-size: .8125rem; }
.status-PAID { background: #e5f6ee; color: #08784f; }
.status-PENDING { background: #fff4e0; color: #9a6a12; }
.status-CLOSED { background: #eee; color: var(--muted); }
.order-cards { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 4px; display: grid; gap: 8px; }
.order-cards .secret { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .9rem; overflow-wrap: anywhere; }
.order-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn-link { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 3px; background: #fff; font-size: .875rem; }
.btn-primary { min-height: 38px; padding: 0 16px; border: 0; border-radius: 3px; background: var(--green); color: #f5f4ec; font-size: .875rem; }

/* 后台 */
.admin-section { margin: clamp(26px, 5vw, 50px) 0; }
.admin-section h2 { font-size: 1.25rem; margin: 0 0 16px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; font-size: .875rem; }
.admin-table th, .admin-table td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { background: var(--paper); color: var(--muted); font-weight: 600; }
.admin-form { display: grid; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
.admin-form .row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.admin-form textarea { width: 100%; min-height: 110px; border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; font-family: inherit; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
