:root {
    --ink: #17211b;
    --muted: #64706a;
    --line: #dfe6e1;
    --paper: #ffffff;
    --surface: #f4f7f5;
    --green: #147a4b;
    --green-dark: #0d5e39;
    --green-soft: #e7f5ed;
    --amber: #d97706;
    --red: #c2413b;
    --shadow: 0 12px 35px rgba(23, 33, 27, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100%; color: var(--ink); background: var(--surface); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 15px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(223, 230, 225, .9); background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); }
.nav { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 7px; color: #fff; background: var(--green); font-family: Georgia, serif; font-size: 22px; }
.nav nav { display: flex; gap: 28px; font-weight: 650; }
.nav nav a:hover { color: var(--green); }
.notice { border-bottom: 1px solid #f2dfb7; color: #78500b; background: #fff8e7; padding: 9px 0; text-align: center; font-size: 14px; }
main.container { min-height: calc(100vh - 150px); padding-top: 36px; padding-bottom: 70px; }
footer { padding: 28px 0; color: var(--muted); background: var(--paper); border-top: 1px solid var(--line); text-align: center; font-size: 13px; }
.hero { min-height: 250px; display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 48px 54px; color: #f8fbf9; background: #163e2c; border-radius: 8px; box-shadow: var(--shadow); }
.hero h1 { max-width: 680px; margin: 8px 0 10px; font-family: Georgia, "Songti SC", serif; font-size: clamp(32px, 5vw, 54px); line-height: 1.12; font-weight: 700; letter-spacing: 0; }
.hero p { max-width: 660px; margin: 0; color: #cfe0d7; font-size: 17px; }
.eyebrow { color: #4fc386; font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-weight: 700; transition: .18s ease; white-space: nowrap; }
.button.primary { color: #fff; background: var(--green); }
.button.primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.button.secondary { color: var(--ink); border-color: var(--line); background: #fff; }
.button.secondary:hover { border-color: #a9b8af; background: #fafcfb; }
.hero .button.secondary { border-color: rgba(255,255,255,.28); color: #fff; background: rgba(255,255,255,.09); }
.button.disabled { color: #8a948e; background: #edf1ef; cursor: not-allowed; }
.button.block { width: 100%; }
.category-tabs { display: flex; gap: 8px; margin: 30px 0 22px; overflow-x: auto; padding-bottom: 4px; }
.category-tabs a { flex: 0 0 auto; padding: 8px 15px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-weight: 650; }
.category-tabs a.active, .category-tabs a:hover { color: #fff; border-color: var(--green); background: var(--green); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); transition: .2s ease; }
.product-card:hover { transform: translateY(-3px); border-color: #bdcbc2; box-shadow: var(--shadow); }
.product-image { aspect-ratio: 16 / 9; overflow: hidden; background: #e8eeea; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image.placeholder { display: grid; place-items: center; background: #dfeae4; }
.product-image.placeholder span { display: grid; place-items: center; width: 64px; height: 64px; color: #fff; background: var(--green); border-radius: 8px; font-family: Georgia, serif; font-size: 34px; }
.product-body { padding: 20px; }
.product-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.product-body h2 { margin: 8px 0 6px; font-size: 19px; line-height: 1.35; }
.product-body > p { height: 48px; margin: 0; overflow: hidden; color: var(--muted); font-size: 14px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.product-footer strong { color: var(--red); font-size: 24px; font-family: Georgia, serif; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: 0 6px 22px rgba(23, 33, 27, .05); }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); gap: 24px; align-items: start; }
.product-detail, .checkout-panel { padding: 32px; }
.product-detail h1 { margin: 8px 0 12px; font-family: Georgia, "Songti SC", serif; font-size: 34px; line-height: 1.25; }
.description { color: var(--muted); }
.detail-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 28px 0; border: 1px solid var(--line); border-radius: 6px; }
.detail-stats > div { display: flex; flex-direction: column; padding: 18px; }
.detail-stats > div + div { border-left: 1px solid var(--line); }
.detail-stats span { color: var(--muted); font-size: 13px; }
.detail-stats strong { margin-top: 2px; font-size: 20px; }
details { border-top: 1px solid var(--line); padding-top: 18px; }
summary { cursor: pointer; font-weight: 700; }
.tutorial { margin-top: 14px; color: var(--muted); }
.checkout-panel { position: sticky; top: 100px; }
.checkout-panel h2 { margin: 0 0 22px; }
label { display: block; margin-bottom: 17px; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; margin-top: 7px; padding: 11px 12px; color: var(--ink); border: 1px solid #ccd6d0; border-radius: 5px; outline: none; background: #fff; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20,122,75,.1); }
.total-row { display: flex; align-items: center; justify-content: space-between; margin: 24px 0; padding-top: 20px; border-top: 1px solid var(--line); }
.total-row strong { color: var(--red); font-family: Georgia, serif; font-size: 28px; }
.form-hint, .muted { color: var(--muted); }
.form-hint { margin: 14px 0 0; font-size: 12px; text-align: center; }
.query-wrap { width: min(760px, 100%); margin: 0 auto; }
.query-panel, .order-result { padding: 32px; }
.query-panel h1 { margin: 7px 0 2px; font-family: Georgia, "Songti SC", serif; font-size: 32px; }
.query-panel form { margin-top: 24px; }
.order-result { margin-top: 22px; }
.status-line { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.status { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 4px; font-size: 12px; font-weight: 750; }
.status.paid, .status.available { color: #09653b; background: #e1f4e9; }
.status.pending { color: #9a5b05; background: #fff1d2; }
.status.closed { color: #68716c; background: #edf0ee; }
.order-result dl { display: grid; grid-template-columns: 110px 1fr; margin: 22px 0; }
.order-result dt, .order-result dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.order-result dt { color: var(--muted); }
.delivery { margin: 22px 0; padding: 18px; border: 1px solid #b9dec8; border-radius: 6px; background: #effaf4; }
.delivery-label { margin-bottom: 8px; color: var(--green-dark); font-weight: 800; }
.delivery pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: Consolas, monospace; font-size: 14px; }
.copy-button { margin-top: 14px; padding: 7px 12px; border: 1px solid #acd3bc; border-radius: 5px; color: var(--green-dark); background: #fff; cursor: pointer; }
.result { width: min(720px, 100%); margin: 28px auto; padding: 46px; text-align: center; }
.result-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; font-size: 31px; font-weight: 800; }
.result-icon.success { color: #fff; background: var(--green); }
.result-icon.error { color: #fff; background: var(--red); }
.result-icon.pending { color: #fff; background: var(--amber); }
.result h1 { margin: 0; font-size: 28px; }
.result .delivery { text-align: left; }
.result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.empty { padding: 60px 20px; border: 1px dashed #bdc9c1; border-radius: 8px; color: var(--muted); text-align: center; background: #fff; }
.alert { margin: 16px 0; padding: 12px 14px; border-radius: 5px; font-size: 14px; }
.alert.error { color: #8e2925; border: 1px solid #efc2c0; background: #fff0ef; }
.alert.success { color: #0c613a; border: 1px solid #badfc9; background: #ebf8f0; }
.install-page { display: grid; min-height: 100vh; place-items: center; padding: 30px 0; background: #eef3f0; }
.install-wrap { width: min(720px, calc(100% - 32px)); }
.install-panel { padding: 38px; }
.install-panel h1 { margin: 8px 0 4px; font-family: Georgia, "Songti SC", serif; font-size: 34px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }

@media (max-width: 860px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-panel { position: static; }
    .hero { align-items: flex-start; flex-direction: column; padding: 38px 30px; }
}

@media (max-width: 600px) {
    .container { width: min(100% - 24px, 1160px); }
    .nav { min-height: 62px; }
    .brand { max-width: 62%; font-size: 15px; }
    .nav nav { gap: 14px; font-size: 13px; }
    main.container { padding-top: 20px; }
    .hero { min-height: 0; padding: 30px 22px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 15px; }
    .product-grid { grid-template-columns: 1fr; }
    .product-detail, .checkout-panel, .query-panel, .order-result, .result, .install-panel { padding: 22px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
    .result-actions { flex-direction: column; }
}
