:root {
  --paper: #f7f4ef;
  --paper-deep: #efebe4;
  --ink: #343431;
  --muted: #7d7b73;
  --line: #ded9d1;
  --sage: #879985;
  --sage-dark: #5e745d;
  --rose: #c78376;
  --cream: #fbfaf7;
  --white: #fffdf9;
  --shadow: 0 14px 42px rgba(55, 53, 46, .08);
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; font-family: Manrope, "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif; background: var(--paper); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
img { display: block; width: 100%; object-fit: cover; }

.shell { width: min(1180px, 100%); margin: 0 auto; padding-bottom: 88px; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 8; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(222,217,209,.65); }
.brand { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.brand-mark { width: 26px; height: 26px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font: 600 12px/1 "Noto Serif SC", serif; }
.brand-text strong { display: block; font: 600 17px/1.1 "Noto Serif SC", serif; letter-spacing: 1px; }
.brand-text small { color: var(--muted); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; }
.top-actions { display: flex; gap: 9px; align-items: center; }
.icon-btn { width: 38px; height: 38px; background: transparent; border-radius: 50%; display: grid; place-items: center; font-size: 18px; position: relative; transition: .2s ease; }
.icon-btn:hover, .icon-btn.active { background: var(--paper-deep); }
.badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; background: var(--rose); color: #fff; border-radius: 10px; font-size: 10px; display: grid; place-items: center; }
.role-btn { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--white); font-size: 12px; }

.hero { margin: 0 16px; height: clamp(365px, 54vw, 560px); min-height: 365px; border-radius: 0 0 16px 16px; overflow: hidden; position: relative; background: #d6d6cf; }
.hero img { height: 100%; filter: saturate(.78); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(24,29,27,.55), transparent 68%), linear-gradient(0deg, rgba(24,29,27,.45), transparent 55%); }
.hero-copy { position: absolute; z-index: 1; bottom: 40px; left: clamp(22px, 5vw, 62px); color: #fffdf9; max-width: 410px; }
.eyebrow { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; opacity: .8; }
.hero h1 { margin: 12px 0 10px; font: 600 clamp(34px, 5.5vw, 68px)/1.12 "Noto Serif SC", serif; letter-spacing: 1px; }
.hero p { margin: 0 0 22px; font-size: 14px; line-height: 1.8; opacity: .88; }
.primary { background: var(--sage-dark); color: #fff; border-radius: 99px; padding: 12px 18px; font-weight: 600; font-size: 13px; }
.hero .primary { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.55); backdrop-filter: blur(12px); }
.section { padding: 36px 24px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.section-title { margin: 0; font: 600 24px/1.3 "Noto Serif SC", serif; }
.section-kicker { color: var(--muted); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 5px; }
.text-btn { color: var(--sage-dark); background: transparent; font-size: 12px; font-weight: 600; }
.scenes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.scene { min-height: 112px; padding: 13px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); text-align: left; display: flex; flex-direction: column; justify-content: space-between; transition: transform .2s, box-shadow .2s; }
.scene:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.scene-photo { height: 56px; border-radius: 8px; overflow: hidden; }
.scene-photo img { height: 100%; }
.scene strong { font: 600 13px "Noto Serif SC", serif; }
.scene small { color: var(--muted); font-size: 10px; margin-top: 5px; }
.editor-pick { display: grid; grid-template-columns: minmax(210px, 1fr) 1fr; min-height: 180px; overflow: hidden; background: var(--paper-deep); border-radius: 12px; }
.editor-pick img { height: 100%; min-height: 180px; }
.editor-copy { padding: 24px 26px; display: flex; flex-direction: column; justify-content: center; }
.tag { display: inline-flex; width: max-content; padding: 5px 9px; background: rgba(135,153,133,.16); color: var(--sage-dark); border-radius: 99px; font-size: 10px; font-weight: 700; }
.editor-copy h3 { margin: 11px 0 7px; font: 600 23px/1.25 "Noto Serif SC", serif; }
.editor-copy p { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.trust { margin-top: 30px; padding: 14px 16px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; background: #efede8; color: #929088; font-size: 10px; text-align: center; }
.trust span { display: flex; justify-content: center; gap: 6px; align-items: center; white-space: nowrap; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px 12px; }
.product-card { min-width: 0; position: relative; cursor: pointer; transition: transform .2s; }
.product-card:active { transform: scale(.98); }
.product-image { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 10px; background: var(--paper-deep); position: relative; }
.product-image img { height: 100%; transition: transform .45s ease; }
.product-card:hover .product-image img { transform: scale(1.035); }
.product-label { position: absolute; bottom: 9px; left: 9px; background: rgba(49,49,46,.76); color: #fff; font-size: 10px; padding: 4px 7px; border-radius: 4px; }
.heart { position: absolute; right: 8px; top: 8px; width: 31px; height: 31px; background: rgba(255,255,255,.86); border-radius: 50%; font-size: 16px; }
.product-info { padding: 10px 2px 0; }
.product-name { margin: 0; font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.price { color: var(--sage-dark); font-size: 16px; font-weight: 700; }
.old-price { color: #aaa7a0; font-size: 11px; text-decoration: line-through; margin-left: 5px; }
.stock { color: var(--muted); font-size: 10px; }
.insert-card { grid-column: 1 / -1; min-height: 122px; overflow: hidden; position: relative; border-radius: 12px; background: #dedfd5; }
.insert-card img { height: 122px; filter: saturate(.7); }
.insert-card div { position: absolute; inset: 0; padding: 22px 24px; background: linear-gradient(90deg, rgba(41,47,41,.62), transparent); color: white; }
.insert-card h3 { margin: 0 0 6px; font: 600 19px "Noto Serif SC", serif; }
.insert-card p { margin: 0; font-size: 11px; opacity: .85; }

.page { padding: 28px 24px; }
.page-title { display: flex; justify-content: space-between; align-items: end; margin: 6px 0 24px; }
.page-title h1 { margin: 0; font: 600 32px "Noto Serif SC", serif; }
.page-title p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.searchbox { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 99px; padding: 11px 15px; margin-bottom: 18px; }
.searchbox input { border: 0; outline: 0; background: none; width: 100%; color: var(--ink); font-size: 13px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 8px; }
.filter { white-space: nowrap; padding: 8px 13px; border-radius: 99px; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.filter.active { color: #fff; background: var(--sage-dark); border-color: var(--sage-dark); }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); background: var(--white); border-radius: 12px; }
.empty .icon { font-size: 32px; margin-bottom: 12px; }
.summary-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.summary-row + .summary-row { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.summary-row strong { font-size: 14px; }
.summary-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.qty-control { display: inline-flex; align-items: center; gap: 10px; background: var(--paper); border-radius: 99px; padding: 3px; }
.qty-control button { width: 24px; height: 24px; border-radius: 50%; background: var(--white); }
.qty-control span { min-width: 14px; text-align: center; font-size: 12px; }
.money { color: var(--sage-dark); font-weight: 700; }
.checkout-bar { position: fixed; bottom: 66px; left: 50%; transform: translateX(-50%); width: min(760px, calc(100% - 28px)); z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 14px; background: rgba(255,253,249,.94); backdrop-filter: blur(18px); box-shadow: 0 10px 30px rgba(54,49,42,.16); border: 1px solid var(--line); }
.checkout-total small { display: block; color: var(--muted); font-size: 10px; }
.checkout-total strong { font-size: 20px; }
.checkout-bar .primary { padding: 11px 23px; }
.order-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.order-tab { background: none; padding: 0 0 12px; color: var(--muted); font-size: 12px; white-space: nowrap; border-bottom: 2px solid transparent; }
.order-tab.active { color: var(--ink); border-color: var(--sage-dark); }
.order-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.order-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--muted); }
.status { color: var(--sage-dark); background: rgba(135,153,133,.13); padding: 5px 8px; border-radius: 99px; font-size: 10px; }
.status.pending { color: #ad7656; background: rgba(199,131,118,.13); }
.order-items { display: flex; gap: 10px; margin: 14px 0; }
.order-thumb { width: 48px; height: 60px; border-radius: 6px; overflow: hidden; flex: 0 0 auto; }
.order-thumb img { height: 100%; }
.order-item-copy { flex: 1; min-width: 0; }
.order-item-copy strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-item-copy small { color: var(--muted); font-size: 10px; line-height: 2; }
.order-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; font-size: 12px; }
.small-btn { padding: 8px 12px; border: 1px solid var(--line); background: var(--white); border-radius: 99px; font-size: 11px; }
.small-btn.primary-outline { color: var(--sage-dark); border-color: var(--sage); }

.employee-hero { background: #e5e8df; border-radius: 12px; padding: 24px; display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.employee-hero h2 { margin: 7px 0 5px; font: 600 25px "Noto Serif SC", serif; }
.employee-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.employee-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-dark); color: white; font: 600 18px "Noto Serif SC", serif; }
.metric-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 20px; }
.metric { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.metric small { color: var(--muted); font-size: 10px; }
.metric strong { display: block; margin-top: 8px; font-size: 20px; }
.subnav { display: flex; gap: 7px; padding: 4px; background: var(--paper-deep); border-radius: 10px; margin-bottom: 16px; }
.subnav button { flex: 1; padding: 9px; background: transparent; border-radius: 7px; color: var(--muted); font-size: 11px; }
.subnav button.active { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px rgba(60,50,40,.07); }
.collect-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; max-height: 450px; overflow-y: auto; }
.collect-item { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 9px; cursor: pointer; }
.collect-item img { aspect-ratio: 1 / 1.1; border-radius: 7px; margin-bottom: 8px; }
.collect-item strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collect-item span { display: block; color: var(--sage-dark); font-size: 12px; font-weight: 700; margin-top: 4px; }
.collect-side { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.select, .field { width: 100%; border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 11px 12px; color: var(--ink); outline: none; font-size: 12px; }
.field-label { display: block; margin: 14px 0 7px; font-size: 11px; color: var(--muted); }
.field-area { min-height: 80px; resize: vertical; }
.panel-title { font: 600 19px "Noto Serif SC", serif; margin: 0 0 14px; }
.record { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.record:last-child { border-bottom: 0; }
.record strong { display: block; font-size: 12px; }
.record small { color: var(--muted); font-size: 10px; line-height: 2; }
.checkin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big-action { padding: 18px; border-radius: 10px; text-align: left; border: 1px solid var(--line); background: var(--white); }
.big-action strong { display: block; font: 600 17px "Noto Serif SC", serif; margin-bottom: 5px; }
.big-action small { color: var(--muted); font-size: 10px; }

.admin-head { display: flex; justify-content: space-between; align-items: center; background: #303a32; color: #fff; border-radius: 12px; padding: 25px; margin-bottom: 18px; }
.admin-head h2 { margin: 0 0 5px; font: 600 25px "Noto Serif SC", serif; }
.admin-head p { margin: 0; color: rgba(255,255,255,.65); font-size: 11px; }
.admin-head .tag { background: rgba(255,255,255,.12); color: #dcebd6; }
.admin-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 20px; }
.admin-metric { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 15px; }
.admin-metric small { color: var(--muted); font-size: 10px; }
.admin-metric strong { display: block; font-size: 21px; margin: 8px 0 2px; }
.admin-metric span { color: var(--sage-dark); font-size: 10px; }
.admin-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }
.bar-chart { height: 150px; display: flex; gap: 10px; align-items: end; padding: 14px 0 0; }
.bar { flex: 1; background: #bdc9b9; border-radius: 5px 5px 0 0; position: relative; min-height: 10%; }
.bar:nth-child(2n) { background: #d4b4a8; }
.bar span { position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 9px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 11px; }
th { color: var(--muted); font-size: 10px; text-align: left; font-weight: 500; padding: 9px 8px; border-bottom: 1px solid var(--line); }
td { padding: 11px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td strong { font-weight: 600; }
.mini-pill { padding: 4px 7px; border-radius: 99px; background: var(--paper-deep); color: var(--muted); font-size: 9px; }
.mini-pill.active { color: var(--sage-dark); background: #e4eee1; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 66px; z-index: 7; display: flex; justify-content: center; gap: 0; background: rgba(255,253,249,.95); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav-btn { width: min(150px, 22vw); background: transparent; color: #aaa79f; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; position: relative; }
.nav-btn span:first-child { font-size: 19px; line-height: 1; }
.nav-btn.active { color: var(--sage-dark); }
.nav-badge { position: absolute; top: 8px; margin-left: 23px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 15px); opacity: 0; pointer-events: none; transition: .25s; z-index: 30; background: rgba(43,45,40,.9); color: #fff; padding: 11px 16px; border-radius: 99px; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(38,39,35,.38); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.modal { width: min(680px, 100%); max-height: 90vh; overflow-y: auto; background: var(--paper); border-radius: 18px 18px 0 0; padding: 22px 20px 30px; animation: slide-up .25s ease; }
@keyframes slide-up { from { transform: translateY(30px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.modal-head h2 { margin: 0; font: 600 21px "Noto Serif SC", serif; }
.close { width: 31px; height: 31px; border-radius: 50%; background: var(--paper-deep); }
.detail-hero { aspect-ratio: 4/3; border-radius: 11px; overflow: hidden; margin: -22px -20px 18px; }
.detail-hero img { height: 100%; }
.detail-title { margin: 0; font: 600 25px "Noto Serif SC", serif; }
.detail-description { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 8px 0 17px; }
.detail-price { font-size: 22px; color: var(--sage-dark); font-weight: 700; }
.detail-actions { display: flex; gap: 9px; margin-top: 20px; }
.detail-actions button { flex: 1; padding: 13px; }
.role-options { display: grid; gap: 9px; }
.role-option { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 15px; text-align: left; display: flex; justify-content: space-between; align-items: center; }
.role-option strong { display: block; font: 600 15px "Noto Serif SC", serif; }
.role-option small { display: block; color: var(--muted); margin-top: 4px; font-size: 10px; }
.form-actions { display: flex; gap: 9px; margin-top: 20px; }
.form-actions > * { flex: 1; }

@media (max-width: 700px) {
  .topbar { padding: 0 16px; }
  .role-btn { padding: 8px 10px; }
  .role-btn span { display: none; }
  .section, .page { padding-left: 16px; padding-right: 16px; }
  .scenes { display: flex; overflow-x: auto; padding-bottom: 3px; }
  .scene { flex: 0 0 112px; }
  .editor-pick { grid-template-columns: 1fr; }
  .editor-pick img { height: 190px; min-height: 0; }
  .editor-copy { padding: 19px 21px 22px; }
  .trust { margin-left: -16px; margin-right: -16px; overflow-x: auto; display: flex; justify-content: space-around; }
  .trust span { flex: 0 0 auto; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 420px) {
  .hero { margin: 0 8px; }
  .hero-copy { left: 22px; bottom: 26px; }
  .hero h1 { font-size: 36px; }
  .product-grid { gap: 18px 10px; }
  .page-title h1 { font-size: 28px; }
  .employee-hero { padding: 18px; }
}
