:root {
  --bg: #ffffff;
  --text: #0b0b0b;
  --muted: #6a6a6a;
  --line: #e8e8e8;
  --soft: #f7f7f5;
  --gold: #a8874f;
  --danger: #a52a2a;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(0,0,0,.07);
  --serif: Georgia, "Times New Roman", "Songti SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body { margin: 0; min-height: 100vh; font-family: var(--sans); background: var(--bg); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.app-shell { min-height: 100vh; }
.page { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; padding: calc(72px + env(safe-area-inset-top)) 20px calc(112px + env(safe-area-inset-bottom)); }
.header { position: fixed; z-index: 20; top: 0; left: 50%; transform: translateX(-50%); width: min(100%, 760px); padding: calc(12px + env(safe-area-inset-top)) 18px 12px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; }
.header-logo { height: 34px; width: auto; justify-self: center; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: #111; display: grid; place-items: center; font-size: 20px; }
.lang-switch { border: 1px solid var(--text); background: #fff; border-radius: 999px; padding: 8px 11px; font-weight: 700; font-size: 12px; letter-spacing: .05em; white-space: nowrap; }
.bottom-bar { position: fixed; z-index: 19; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 760px); padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.bottom-row { display: flex; gap: 10px; align-items: center; }
.primary { width: 100%; border: 0; background: var(--text); color: #fff; min-height: 54px; border-radius: 999px; padding: 14px 20px; font-weight: 700; letter-spacing: .02em; }
.primary:disabled { opacity: .35; cursor: not-allowed; }
.secondary { width: 100%; border: 1px solid var(--text); background: #fff; color: var(--text); min-height: 50px; border-radius: 999px; padding: 12px 18px; font-weight: 650; }
.text-btn { border: 0; background: transparent; color: var(--text); padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: 11px; font-weight: 700; color: var(--gold); margin-bottom: 12px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }
h1 { font-size: clamp(38px, 10vw, 68px); line-height: .98; letter-spacing: -.035em; }
h2 { font-size: clamp(30px, 8vw, 46px); line-height: 1.02; letter-spacing: -.025em; }
h3 { font-size: 24px; line-height: 1.12; }
p { line-height: 1.65; }
.lead { color: var(--muted); font-size: 16px; margin: 16px 0 0; }
.hero { min-height: calc(100vh - 190px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero-logo { width: min(88vw, 440px); margin-bottom: 38px; }
.hero-actions { width: min(100%, 420px); margin-top: 44px; display: grid; gap: 12px; }
.progress { display: flex; gap: 6px; margin: 18px 0 28px; }
.progress span { flex: 1; height: 3px; border-radius: 99px; background: var(--line); }
.progress span.active { background: var(--text); }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 20px; transition: .2s ease; }
.card.selectable { cursor: pointer; }
.card.selectable:active { transform: scale(.99); }
.card.selected { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text), var(--shadow); }
.card.dark { background: var(--text); color: #fff; border-color: var(--text); }
.product-card { min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; }
.product-meta { color: var(--muted); font-size: 14px; margin-top: 8px; }
.product-card.selected .product-meta, .card.dark .muted { color: rgba(255,255,255,.7); }
.price { font-family: var(--serif); font-size: 30px; margin-top: 24px; }
.choice-list { display: grid; gap: 10px; margin-top: 24px; }
.choice { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 16px; text-align: left; }
.choice.selected { border-color: #111; box-shadow: inset 0 0 0 1px #111; }
.choice-title { font-weight: 700; }
.choice-sub { color: var(--muted); margin-top: 5px; font-size: 14px; line-height: 1.45; }
.pill-wrap { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.pill { border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 10px 14px; }
.pill.selected { background: var(--text); color: #fff; border-color: var(--text); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); margin: 22px 0 16px; }
.tab { border: 0; background: #fff; padding: 14px 5px 12px; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 700; }
.scent-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.scent-card { position: relative; min-height: 174px; padding: 17px; }
.scent-name { font-family: var(--serif); font-size: 22px; }
.scent-zh { font-size: 13px; color: var(--muted); margin-top: 4px; }
.scent-desc { color: var(--muted); font-size: 13px; line-height: 1.48; margin: 16px 0 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--soft); border-radius: 999px; padding: 5px 8px; font-size: 11px; }
.check { position: absolute; right: 12px; top: 12px; width: 23px; height: 23px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; background: #fff; font-size: 12px; }
.scent-card.selected .check { background: var(--text); color: #fff; border-color: var(--text); }
.blend-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 18px; background: var(--soft); }
.blend-title { font-family: var(--serif); font-size: 23px; }
.suggestions { display: grid; gap: 8px; margin-top: 14px; }
.suggestion { border: 0; background: #fff; border-radius: 12px; padding: 12px 14px; text-align: left; display: flex; justify-content: space-between; gap: 12px; }
.section { margin-top: 30px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.note-list { display: flex; flex-wrap: wrap; gap: 8px; }
.note-chip { border: 1px solid var(--line); border-radius: 999px; padding: 9px 12px; background: #fff; }
.field { margin-top: 18px; }
.field label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; margin-bottom: 8px; }
.input, .textarea, .select { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 15px 16px; color: var(--text); outline: 0; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--text); }
.textarea { min-height: 100px; resize: vertical; }
.label-preview { border: 1px solid #d7d7d7; border-radius: 4px; padding: 28px 18px; text-align: center; background: #fafafa; margin-top: 22px; }
.label-brand { font-size: 11px; letter-spacing: .3em; margin-bottom: 24px; }
.label-name { font-family: var(--serif); font-size: 28px; text-transform: uppercase; overflow-wrap: anywhere; }
.label-scents { color: var(--muted); font-size: 12px; margin-top: 10px; }
.label-designed { margin-top: 22px; font-size: 12px; }
.line-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: 0; }
.qty-controls { display: flex; align-items: center; gap: 10px; }
.qty-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; }
.total { font-family: var(--serif); font-size: 30px; }
.order-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; }
.order-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.status { display: inline-flex; border-radius: 999px; background: var(--soft); padding: 7px 10px; font-size: 12px; }
.status.paid { background: #eeeae1; }
.status.shipped { background: #e8eef2; }
.formula-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.formula-table th, .formula-table td { padding: 11px 4px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
.formula-table td:last-child, .formula-table th:last-child { text-align: right; }
.notice { border-left: 3px solid var(--gold); padding: 12px 14px; background: #faf8f4; color: #514a40; border-radius: 0 12px 12px 0; }
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #111; color: #fff; border-radius: 999px; padding: 11px 16px; z-index: 99; font-size: 13px; box-shadow: var(--shadow); animation: fadeToast 2.4s forwards; }
@keyframes fadeToast { 0%{opacity:0;transform:translate(-50%,8px)} 10%,80%{opacity:1;transform:translate(-50%,0)} 100%{opacity:0;transform:translate(-50%,-6px)} }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.spacer { height: 10px; }
.admin-link { margin-top: 50px; color: #999; font-size: 12px; }
.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
@media (max-width: 420px) {
  .page { padding-left: 16px; padding-right: 16px; }
  .scent-grid, .grid.two { grid-template-columns: 1fr; }
  .product-card { min-height: 180px; }
}
@media (min-width: 680px) {
  .scent-grid { grid-template-columns: repeat(3, 1fr); }
}
