:root {
  --brand: #167d6c;
  --brand-dark: #0e5e52;
  --brand-soft: #e7f3f0;
  --ink: #17211f;
  --muted: #697572;
  --line: #dde4e1;
  --surface: #ffffff;
  --canvas: #f5f7f6;
  --warm: #f4efe7;
  --danger: #b6423c;
  --warning: #b66b18;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(25, 45, 40, .07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 5vw, 3.8rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1rem; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow { display: block; margin-bottom: 8px; color: var(--brand); font-size: .69rem; font-weight: 800; letter-spacing: .17em; line-height: 1.2; text-transform: uppercase; }
.text-right { text-align: right; }
.full-width { width: 100%; }
.full-span { grid-column: 1 / -1; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.2rem; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; color: white; background: var(--brand); border-radius: 10px 4px 10px 4px; font-size: 1rem; }

.button { display: inline-flex; min-height: 42px; padding: 0 18px; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-weight: 750; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--brand); }
.button-primary:hover { background: var(--brand-dark); }
.button-ghost { color: var(--ink); background: #fff; border-color: var(--line); }
.button-ghost:hover { border-color: #a9b6b2; }
.button-large { min-height: 50px; padding-inline: 24px; }
.button-small { min-height: 36px; padding-inline: 13px; font-size: .84rem; }
.button:disabled, .button.disabled { opacity: .5; pointer-events: none; }
.button-link { padding: 4px 6px; color: var(--brand-dark); background: none; border: 0; cursor: pointer; font-size: .84rem; font-weight: 750; white-space: nowrap; }
.button-link.danger, .danger { color: var(--danger); }
.text-link, .back-link { color: var(--brand-dark); font-size: .88rem; font-weight: 750; }
.icon-button { display: inline-grid; width: 36px; height: 36px; padding: 0; place-items: center; color: var(--ink); background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: 1.25rem; }
.icon-button:hover { background: #edf1ef; }

label { display: grid; gap: 7px; color: #36413e; font-size: .82rem; font-weight: 720; }
input, select, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #cfd9d5; border-radius: 8px; outline: none; }
input, select { height: 44px; padding: 0 12px; }
textarea { min-height: 92px; padding: 11px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
input[type="color"] { padding: 5px; }
label small, .upload-field small { color: var(--muted); font-weight: 500; }
.form-stack { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.span-2 { grid-column: span 2; }
.check-field { display: flex; align-items: center; gap: 10px; }
.check-field input { width: 18px; height: 18px; accent-color: var(--brand); }

.alert { margin-bottom: 20px; padding: 13px 16px; color: #245447; background: #e5f2ed; border: 1px solid #b7d9ce; border-radius: 9px; }
.alert-error { color: #7b302c; background: #fbefee; border-color: #ecc7c4; }
.alert-success { color: #245447; background: #e5f2ed; border-color: #b7d9ce; }
.toast { position: fixed; z-index: 1000; right: 24px; bottom: 24px; padding: 12px 18px; color: #fff; background: #1f2c29; border-radius: 9px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: .2s ease; }
.toast.show { opacity: 1; transform: none; }

/* Authentication */
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, .9fr) minmax(460px, 1.1fr); }
.auth-brand-panel { position: relative; display: flex; overflow: hidden; padding: 48px clamp(32px, 6vw, 84px); flex-direction: column; justify-content: space-between; color: #fff; background: #173c35; }
.auth-brand-panel .wordmark { color: #fff; }
.auth-brand-panel .brand-mark { color: #173c35; background: #d8b47a; }
.auth-statement { position: relative; z-index: 2; max-width: 520px; padding-block: 80px; }
.auth-statement .eyebrow { color: #d8b47a; }
.auth-statement h1 { margin-bottom: 28px; font-family: Georgia, "Noto Serif TC", serif; font-weight: 500; }
.auth-statement p { max-width: 400px; color: #c2d1cd; font-size: 1.04rem; }
.auth-orbit span { position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.auth-orbit span:nth-child(1) { width: 420px; height: 420px; right: -190px; bottom: -120px; }
.auth-orbit span:nth-child(2) { width: 260px; height: 260px; right: -85px; bottom: -45px; }
.auth-orbit span:nth-child(3) { width: 90px; height: 90px; right: 35px; bottom: 42px; background: #d8b47a; border: 0; }
.auth-form-panel { display: grid; padding: 48px 24px; place-items: center; background: #fff; }
.auth-form-card { width: min(420px, 100%); }
.auth-form-card h2 { margin-bottom: 8px; font-size: 2rem; }
.auth-form-card > .muted { margin-bottom: 36px; }
.auth-form-card .button { margin-top: 4px; }
.login-help { margin: 22px 0 8px; padding: 11px 13px; color: #5d6a66; background: var(--canvas); border-radius: 8px; font-size: .8rem; }

/* Application shell */
.app-shell { display: grid; min-height: 100vh; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; z-index: 20; top: 0; display: flex; height: 100vh; padding: 26px 18px 18px; flex-direction: column; color: #d5e0dd; background: #172622; }
.sidebar-brand { margin: 0 10px 34px; color: #fff; }
.sidebar-context { display: grid; margin: 0 10px 22px; gap: 2px; }
.sidebar-context .eyebrow { color: #78928b; }
.sidebar-context strong { overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav { display: grid; gap: 5px; }
.sidebar-nav > a { position: relative; display: flex; min-height: 44px; padding: 0 12px; align-items: center; gap: 11px; border-radius: 9px; color: #afbfba; font-size: .9rem; font-weight: 650; }
.sidebar-nav > a:hover, .sidebar-nav > a.active { color: #fff; background: #243832; }
.sidebar-nav > a.active::before { position: absolute; left: -18px; width: 3px; height: 22px; background: #d8b47a; border-radius: 0 4px 4px 0; content: ""; }
.nav-icon { display: grid; width: 25px; height: 25px; place-items: center; color: #a6bbb5; border: 1px solid #526760; border-radius: 6px; font-size: .68rem; font-weight: 800; }
.nav-count { min-width: 20px; margin-left: auto; padding: 1px 5px; color: #fff; background: var(--danger); border-radius: 20px; text-align: center; font-size: .68rem; }
.sidebar-footer { display: grid; margin-top: auto; padding: 15px 4px 2px; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 9px; border-top: 1px solid #2d403a; }
.avatar { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; color: #fff; background: var(--brand); border-radius: 50%; font-size: .82rem; font-weight: 800; }
.avatar-soft { color: var(--brand-dark); background: var(--brand-soft); }
.sidebar-footer div:nth-child(2) { display: grid; overflow: hidden; }
.sidebar-footer strong { overflow: hidden; color: #fff; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer span { color: #81948f; font-size: .7rem; text-transform: capitalize; }
.sidebar-footer .icon-button { color: #96a8a3; }
.app-main { min-width: 0; }
.topbar { display: flex; height: 90px; padding: 0 clamp(22px, 4vw, 52px); align-items: center; justify-content: space-between; background: rgba(245,247,246,.92); border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 1.55rem; }
.topbar .eyebrow { margin-bottom: 3px; color: #8a9793; }
.mobile-menu { display: none; }
.page-content { padding: 34px clamp(22px, 4vw, 52px) 60px; }
.sidebar-scrim { display: none; }

.panel { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-header { display: flex; margin-bottom: 22px; align-items: end; justify-content: space-between; gap: 16px; }
.panel-header h2 { margin: 0; }
.panel-header .eyebrow { margin-bottom: 5px; }
.content-grid { display: grid; gap: 22px; }
.content-stack { display: grid; align-content: start; gap: 22px; }
.dashboard-grid { margin-top: 22px; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); }
.metric-grid { display: grid; gap: 16px; }
.metric-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card { position: relative; min-height: 145px; padding: 22px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.metric-card::after { position: absolute; width: 68px; height: 68px; right: -22px; bottom: -22px; background: var(--brand-soft); border-radius: 50%; content: ""; }
.metric-card.accent { color: #fff; background: var(--brand); border-color: var(--brand); }
.metric-card.accent::after { background: rgba(255,255,255,.13); }
.metric-card > span { display: block; margin-bottom: 14px; color: var(--muted); font-size: .78rem; font-weight: 720; }
.metric-card.accent > span, .metric-card.accent small { color: #d9ede8; }
.metric-card strong { display: block; margin-bottom: 4px; font-size: clamp(1.55rem, 2.5vw, 2.1rem); letter-spacing: -.04em; }
.metric-card small { color: #8b9794; }
.metric-card small a { color: var(--brand-dark); font-weight: 750; }
.welcome-strip { display: flex; margin-bottom: 22px; padding: 5px 2px 8px; align-items: center; justify-content: space-between; gap: 24px; }
.welcome-strip h2 { margin-bottom: 5px; font-size: 1.65rem; }
.welcome-strip p { margin-bottom: 0; color: var(--muted); }

.merchant-list, .order-list { display: grid; }
.merchant-row, .order-row { display: grid; min-height: 69px; align-items: center; gap: 12px; border-bottom: 1px solid #edf1ef; }
.merchant-row:last-child, .order-row:last-child { border-bottom: 0; }
.merchant-row { grid-template-columns: 40px minmax(0, 1fr) 70px 14px; }
.merchant-row > span:nth-child(2), .order-main { display: grid; }
.merchant-row small, .order-row small { color: var(--muted); }
.row-stat { display: grid; justify-items: end; }
.row-stat small { font-size: .69rem; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.status-dot.on { background: #2d9b76; box-shadow: 0 0 0 4px #e2f2ec; }
.status-dot.off { background: #9ca7a4; }
.order-row { grid-template-columns: 60px minmax(0, 1fr) 80px 100px 14px; }
.order-time { display: grid; padding-right: 12px; border-right: 1px solid var(--line); }
.order-time b { font-size: 1.02rem; }
.order-time small { font-size: .7rem; }
.order-total { text-align: right; }
.chevron { color: #899692; font-size: 1.4rem; }
.insight-card { display: flex; align-items: center; flex-direction: column; text-align: center; }
.insight-card h2 { margin-bottom: 20px; }
.health-ring { display: grid; width: 132px; height: 132px; margin: 4px auto 18px; place-items: center; border: 10px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; transform: rotate(35deg); }
.health-ring span { font-size: 1.65rem; font-weight: 850; transform: rotate(-35deg); }
.health-ring small { font-size: .75rem; }
.insight-card p { color: var(--muted); }
.mini-stats { display: grid; width: 100%; margin-top: auto; padding-top: 18px; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.mini-stats span { display: grid; color: var(--muted); font-size: .7rem; }
.mini-stats span + span { border-left: 1px solid var(--line); }
.mini-stats b { color: var(--ink); font-size: .95rem; }

.action-bar, .settings-header, .order-heading { display: flex; margin-bottom: 18px; align-items: center; justify-content: space-between; gap: 18px; }
.settings-header > div:last-child { display: flex; gap: 10px; }
.page-intro { margin: 0; color: var(--muted); }
.search-form, .filter-form, .shop-search { display: flex; min-width: min(560px, 100%); gap: 8px; }
.search-form input, .filter-form input { min-width: 260px; }
.search-form button, .filter-form button, .shop-search button { padding-inline: 16px; color: var(--brand-dark); background: var(--brand-soft); border: 0; border-radius: 8px; cursor: pointer; font-weight: 750; }
.table-panel { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 18px; color: #75817e; background: #f7f9f8; border-bottom: 1px solid var(--line); text-align: left; font-size: .72rem; letter-spacing: .06em; white-space: nowrap; }
td { padding: 16px 18px; border-bottom: 1px solid #edf1ef; vertical-align: middle; }
tbody tr:hover { background: #fbfcfb; }
tbody tr:last-child td { border-bottom: 0; }
.table-identity { display: flex; min-width: 190px; align-items: center; gap: 11px; }
.table-identity > span:last-child { display: grid; }
.table-identity small, .table-subtext { display: block; color: var(--muted); font-size: .74rem; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; }
.table-actions form { display: inline-flex; }
.code-link { color: var(--brand-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; font-weight: 700; }
.empty-cell { padding: 48px; color: var(--muted); text-align: center; }
.product-thumb { display: grid; width: 46px; height: 46px; flex: 0 0 auto; overflow: hidden; place-items: center; border-radius: 9px; font-family: Georgia, serif; font-weight: 800; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.price-old { display: block; color: #99a29f; text-decoration: line-through; }
.pill { display: inline-flex; min-height: 25px; padding: 2px 10px; align-items: center; border-radius: 20px; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.pill-success { color: #1f755a; background: #e3f2ec; }
.pill-warning { color: #9b5b10; background: #fff1dc; }
.pill-info { color: #356e88; background: #e7f2f7; }
.pill-primary { color: #fff; background: var(--brand); }
.pill-muted { color: #6f7b78; background: #edf0ef; }

.modal { width: min(680px, calc(100% - 28px)); max-height: calc(100vh - 40px); padding: 0; background: transparent; border: 0; }
.modal::backdrop { background: rgba(12, 24, 21, .58); backdrop-filter: blur(2px); }
.modal-card { padding: 26px; background: #fff; border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.22); }
.modal-small { width: min(450px, 100%); margin-inline: auto; }
.modal-wide { width: min(760px, 100%); margin-inline: auto; }
.modal-header { display: flex; margin-bottom: 24px; align-items: start; justify-content: space-between; }
.modal-header h2 { margin: 0; font-size: 1.5rem; }
.modal-actions { display: flex; margin-top: 26px; justify-content: flex-end; gap: 10px; }

.category-board { padding-block: 8px; }
.category-item { display: grid; min-height: 75px; padding: 12px 8px; grid-template-columns: 28px 48px minmax(0, 1fr) 80px 48px 48px; align-items: center; gap: 12px; border-bottom: 1px solid #edf1ef; }
.category-item:last-child { border-bottom: 0; }
.drag-handle { color: #a4aeab; cursor: grab; letter-spacing: -4px; }
.category-number { color: var(--brand); font-family: Georgia, serif; font-size: 1.4rem; }
.category-item > div { display: grid; }
.category-item small { color: var(--muted); }
.empty-state { display: grid; min-height: 250px; padding: 40px; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.empty-state > span { display: grid; width: 54px; height: 54px; margin-bottom: 14px; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 50%; font-weight: 800; }
.empty-state h3 { margin-bottom: 5px; color: var(--ink); font-size: 1.15rem; }
.empty-state p { margin: 0; }

.order-heading { align-items: end; }
.order-heading .back-link { display: block; margin-bottom: 13px; }
.heading-line { display: flex; align-items: center; gap: 12px; }
.heading-line h2 { margin: 0; font-size: 1.65rem; }
.order-heading p { margin: 5px 0 0; color: var(--muted); }
.order-detail-grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, .72fr); }
.receipt-list { display: grid; }
.receipt-item { display: grid; min-height: 74px; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 13px; border-bottom: 1px solid #edf1ef; }
.receipt-item > span:nth-child(2) { display: grid; }
.receipt-item small { color: var(--muted); }
.receipt-total { display: grid; width: min(330px, 100%); margin: 20px 0 0 auto; gap: 8px; }
.receipt-total span { display: flex; justify-content: space-between; color: var(--muted); }
.receipt-total b { color: var(--ink); }
.receipt-total .grand-total { margin-top: 5px; padding-top: 12px; color: var(--ink); border-top: 1px solid var(--line); font-weight: 800; }
.grand-total b { font-size: 1.25rem; }
.timeline { display: grid; gap: 4px; }
.timeline-item { position: relative; display: grid; min-height: 55px; grid-template-columns: 18px 1fr; gap: 12px; }
.timeline-item::after { position: absolute; left: 5px; top: 17px; bottom: -2px; width: 1px; background: var(--line); content: ""; }
.timeline-item:last-child::after { display: none; }
.timeline-item > span { width: 11px; height: 11px; margin-top: 5px; background: var(--brand); border: 3px solid var(--brand-soft); border-radius: 50%; box-sizing: content-box; }
.timeline-item > div { display: grid; align-content: start; }
.timeline-item small { color: var(--muted); }
.compact-panel > h2 { margin-bottom: 20px; }
.detail-list { display: grid; margin: 0; gap: 12px; }
.detail-list div { display: grid; grid-template-columns: 72px 1fr; gap: 10px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 650; }
.note-box { margin-top: 18px; padding: 13px; background: var(--warm); border-radius: 8px; }
.note-box span { font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.note-box p { margin: 5px 0 0; }
.settings-grid { grid-template-columns: minmax(0, 1.5fr) minmax(290px, .7fr); }
.toggle-row { position: relative; display: flex; min-height: 57px; margin-bottom: 17px; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #edf1ef; }
.toggle-row > span { display: grid; }
.toggle-row small { color: var(--muted); font-weight: 500; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row i { position: relative; width: 42px; height: 24px; flex: 0 0 auto; background: #c9d1ce; border-radius: 30px; transition: .2s; }
.toggle-row i::after { position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; content: ""; transition: .2s; }
.toggle-row input:checked + i { background: var(--brand); }
.toggle-row input:checked + i::after { transform: translateX(18px); }
.shop-url-card code { display: block; margin: 16px 0; padding: 13px; overflow: hidden; color: var(--brand-dark); background: var(--brand-soft); border-radius: 8px; text-overflow: ellipsis; }

/* Storefront */
.layout-shop { background: #fff; }
.shop-header { position: sticky; z-index: 30; top: 0; background: rgba(255,255,255,.93); border-bottom: 1px solid #e8ecea; backdrop-filter: blur(12px); }
.header-inner { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 20px; }
.shop-brand { display: flex; align-items: center; gap: 11px; }
.shop-brand > span:last-child { display: grid; }
.shop-brand small { color: var(--muted); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
.shop-logo { display: grid; width: 39px; height: 39px; place-items: center; color: #fff; background: var(--brand); border-radius: 50% 50% 50% 8px; font-family: Georgia, serif; font-weight: 800; }
.shop-brand img { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; }
.shop-nav { display: flex; align-items: center; gap: 28px; font-size: .88rem; font-weight: 720; }
.shop-nav a:hover { color: var(--brand); }
.shop-logout { display: inline-flex; margin-left: -14px; }
.shop-logout button { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; color: #fff; background: var(--brand); border: 0; border-radius: 50%; cursor: pointer; font-size: .75rem; font-weight: 800; }
.cart-link { display: inline-flex; align-items: center; gap: 8px; }
.cart-badge { display: grid; min-width: 22px; height: 22px; padding: 0 6px; place-items: center; color: #fff; background: var(--brand); border-radius: 20px; font-size: .68rem; }
.notice-bar { padding: 8px 0; color: #fff; background: var(--brand); text-align: center; font-size: .78rem; }
.shop-hero { padding: clamp(34px, 6vw, 72px) 0; background: #f2f5f1; }
.hero-inner { display: grid; min-height: 470px; grid-template-columns: .86fr 1.14fr; align-items: center; gap: clamp(35px, 6vw, 82px); }
.hero-copy { padding-left: clamp(0px, 2vw, 24px); }
.hero-copy h1 { margin-bottom: 24px; font-family: Georgia, "Noto Serif TC", serif; font-weight: 500; }
.hero-copy p { max-width: 470px; margin-bottom: 32px; color: #596662; font-size: 1.02rem; }
.hero-visual { position: relative; min-height: 470px; overflow: hidden; background: #d8ded4; border-radius: 90px 10px 90px 10px; }
.hero-visual.has-image { background-position: center; background-size: cover; }
.hero-shape { position: absolute; border-radius: 50%; }
.shape-one { width: 380px; height: 380px; right: -30px; top: -35px; background: #c6d4c8; }
.shape-two { width: 280px; height: 280px; left: -65px; bottom: -60px; background: #e7d9c0; }
.hero-product { position: absolute; display: grid; width: 250px; height: 310px; left: 50%; top: 50%; padding: 32px; align-content: end; color: #fff; background: #1e4c42; border-radius: 120px 120px 18px 18px; box-shadow: 20px 25px 0 rgba(255,255,255,.28); transform: translate(-50%, -50%) rotate(-5deg); }
.hero-product > span { position: absolute; left: 50%; top: 75px; font-family: Georgia, serif; font-size: 5rem; transform: translateX(-50%); }
.hero-product strong { font-family: Georgia, serif; font-size: 1.35rem; }
.hero-product small { color: #b7d1cb; font-size: .6rem; letter-spacing: .13em; text-transform: uppercase; }
.catalog-section { padding-top: 85px; padding-bottom: 100px; }
.catalog-heading { display: flex; margin-bottom: 30px; align-items: end; justify-content: space-between; gap: 24px; }
.catalog-heading h2 { margin: 0; font-family: Georgia, "Noto Serif TC", serif; font-size: 2.25rem; font-weight: 500; }
.shop-search { min-width: 270px; max-width: 330px; }
.shop-search input { background: #f8faf9; border-color: #e2e8e5; }
.category-tabs { display: flex; margin-bottom: 30px; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.category-tabs a { min-width: max-content; padding: 8px 16px; color: #64716d; background: #f3f6f4; border-radius: 30px; font-size: .8rem; font-weight: 720; }
.category-tabs a.active, .category-tabs a:hover { color: #fff; background: var(--brand); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 38px 24px; }
.product-card { min-width: 0; }
.product-media { position: relative; display: grid; aspect-ratio: 1 / .83; overflow: hidden; place-items: center; border-radius: 10px; }
.product-media img, .product-detail-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-media img { transform: scale(1.025); }
.product-letter { position: relative; z-index: 2; color: rgba(25,42,37,.72); font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(3.2rem, 8vw, 6rem); }
.product-watermark { position: absolute; right: 13px; bottom: 10px; color: rgba(25,42,37,.4); font-size: .55rem; font-weight: 800; letter-spacing: .22em; }
.tone-1 { background: #dfe9e1; }.tone-2 { background: #ece3d2; }.tone-3 { background: #d8e3e5; }.tone-4 { background: #e7ded8; }.tone-5 { background: #dcdbe8; }.tone-6 { background: #e7e8d3; }
.sale-tag { position: absolute; left: 13px; top: 13px; padding: 5px 8px; color: #fff; background: #b9583c; border-radius: 4px; font-size: .58rem; letter-spacing: .12em; }
.product-info { padding: 16px 4px 0; }
.product-category { color: var(--brand); font-size: .65rem; font-weight: 800; letter-spacing: .09em; }
.product-info h3 { margin: 5px 0 6px; font-size: 1.12rem; }
.product-info p { min-height: 44px; margin-bottom: 14px; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-price { display: flex; align-items: baseline; gap: 8px; font-weight: 850; }
.product-price del { color: #9da6a3; font-size: .74rem; font-weight: 500; }
.add-button { display: grid; width: 36px; height: 36px; place-items: center; color: #fff; background: var(--brand); border: 0; border-radius: 50%; cursor: pointer; font-size: 1.25rem; }
.add-button:hover { background: var(--brand-dark); }
.store-story { padding: 85px 0; color: #fff; background: #1e302b; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.story-grid .eyebrow { color: #d8b47a; }
.story-grid h2 { font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 500; }
.story-grid p { color: #bdcac6; font-size: 1rem; }
.story-grid dl { display: grid; margin: 30px 0 0; gap: 13px; }
.story-grid dl div { display: grid; grid-template-columns: 90px 1fr; gap: 14px; }
.story-grid dt { color: #7f9690; }
.story-grid dd { margin: 0; }
.shop-footer { padding: 55px 0 25px; background: #f4f5f2; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 45px; }
.footer-grid > div { display: grid; align-content: start; }
.footer-grid > div > span { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.footer-grid p { max-width: 430px; margin: 8px 0 0; color: #69746f; font-size: .82rem; }
.footer-bottom { margin-top: 40px; padding-top: 20px; color: #96a09d; border-top: 1px solid #dfe4e1; font-size: .72rem; }

.product-detail { padding-top: 35px; padding-bottom: 90px; }
.product-detail > .back-link { display: inline-block; margin-bottom: 25px; }
.product-detail-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(35px, 7vw, 90px); }
.product-detail-media { position: sticky; top: 112px; display: grid; height: min(650px, 72vh); overflow: hidden; place-items: center; border-radius: 12px; }
.product-thumbnails { display: flex; margin-top: 12px; gap: 9px; overflow-x: auto; }
.product-thumbnails button { width: 64px; height: 64px; padding: 3px; flex: 0 0 auto; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.product-thumbnails button.active { border-color: var(--brand); }
.product-thumbnails img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.product-detail-copy { padding-top: 28px; }
.product-detail-copy h1 { margin-bottom: 18px; font-family: Georgia, "Noto Serif TC", serif; font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 500; }
.product-detail-copy .lead { color: #66736f; font-size: 1.02rem; }
.detail-price { display: flex; margin: 30px 0 12px; align-items: baseline; gap: 12px; font-size: 1.65rem; font-weight: 850; }
.detail-price del { color: #a2aaa7; font-size: .9rem; font-weight: 500; }
.stock-note { color: var(--brand-dark); font-size: .78rem; font-weight: 720; }
.qty-action { display: grid; margin: 30px 0; grid-template-columns: 145px minmax(0, 1fr); gap: 12px; }
.qty-action > label { align-content: end; }
.qty-control { display: inline-grid; height: 46px; grid-template-columns: 38px 1fr 38px; align-items: center; border: 1px solid var(--line); border-radius: 8px; }
.qty-control button { height: 100%; background: none; border: 0; cursor: pointer; }
.qty-control input { height: 100%; padding: 0; border: 0; text-align: center; -moz-appearance: textfield; }
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; }
.detail-description { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.detail-description h2 { font-size: 1rem; }
.detail-description p { color: #5f6c68; }
.detail-meta { display: grid; margin-top: 28px; padding: 17px; grid-template-columns: 1fr 1fr; gap: 12px; background: #f6f8f7; border-radius: 9px; }
.detail-meta span { display: grid; color: var(--muted); font-size: .72rem; }
.detail-meta b { color: var(--ink); }

.checkout-page { padding-top: 55px; padding-bottom: 100px; }
.checkout-heading { max-width: 650px; margin-bottom: 35px; }
.checkout-heading h1 { margin-bottom: 10px; font-family: Georgia, "Noto Serif TC", serif; font-size: 2.8rem; font-weight: 500; }
.checkout-heading p { color: var(--muted); }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .62fr); align-items: start; gap: 24px; }
.cart-panel { min-height: 330px; }
.cart-items { margin-bottom: 20px; }
.cart-row { display: grid; min-height: 92px; grid-template-columns: 58px minmax(0, 1fr) 118px 90px 34px; align-items: center; gap: 14px; border-bottom: 1px solid #edf1ef; }
.cart-product { display: grid; }
.cart-product small { color: var(--muted); }
.loading-state { padding: 50px; color: var(--muted); text-align: center; }
.order-summary { display: grid; align-content: start; }
.order-summary h2 { margin-bottom: 22px; }
.summary-lines { display: grid; gap: 11px; }
.summary-lines span, .checkout-items > div { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); }
.summary-lines b, .checkout-items b { color: var(--ink); }
.summary-total { display: flex; margin: 20px 0; padding-top: 18px; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--line); }
.summary-total strong { font-size: 1.35rem; }
.order-summary > small { margin-top: 13px; color: var(--muted); text-align: center; }
.sticky-summary { position: sticky; top: 105px; }
.numbered { align-items: center; justify-content: flex-start; }
.numbered > span { display: grid; width: 36px; height: 36px; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 50%; font-size: .72rem; font-weight: 850; }
.choice-grid { display: grid; margin-bottom: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-card { position: relative; display: block; }
.choice-card input { position: absolute; opacity: 0; }
.choice-card > span { display: grid; min-height: 73px; padding: 14px 15px 14px 42px; align-content: center; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.choice-card > span::before { position: absolute; width: 16px; height: 16px; left: 16px; top: 50%; border: 1px solid #aeb9b5; border-radius: 50%; content: ""; transform: translateY(-50%); }
.choice-card input:checked + span { background: var(--brand-soft); border-color: var(--brand); }
.choice-card input:checked + span::before { background: var(--brand); border-color: var(--brand); box-shadow: inset 0 0 0 4px var(--brand-soft); }
.choice-card small { color: var(--muted); font-weight: 500; }
.shipping-address[hidden] { display: none; }
.checkout-items { display: grid; margin-bottom: 18px; gap: 12px; }
.checkout-items small { color: var(--muted); }
.form-message { min-height: 24px; margin: 10px 0 0; color: var(--danger); font-size: .82rem; text-align: center; }
.success-page { display: grid; min-height: 650px; padding-top: 90px; padding-bottom: 90px; justify-items: center; align-content: center; text-align: center; }
.success-mark { display: grid; width: 75px; height: 75px; margin-bottom: 22px; place-items: center; color: #fff; background: var(--brand); border-radius: 50%; font-size: 2rem; }
.success-page h1 { margin-bottom: 10px; font-family: Georgia, "Noto Serif TC", serif; font-weight: 500; }
.success-page > p { color: var(--muted); }
.order-number { display: grid; min-width: min(430px, 100%); margin: 25px 0; padding: 20px 58px; background: #f3f7f5; border: 1px dashed #a9bdb7; border-radius: 10px; }
.order-number span { color: var(--muted); font-size: .7rem; letter-spacing: .1em; }
.order-number strong { color: var(--brand-dark); font-family: ui-monospace, monospace; font-size: 1.3rem; }
.order-number button { color: var(--muted); background: none; border: 0; cursor: pointer; font-size: .72rem; }
.success-actions { display: flex; margin-bottom: 16px; gap: 10px; }
.success-page > small { color: var(--muted); }

/* Customer membership */
.customer-auth-page { display: grid; min-height: 680px; padding-top: 70px; padding-bottom: 90px; grid-template-columns: minmax(0, 1fr) minmax(360px, 470px); align-items: center; gap: clamp(45px, 9vw, 120px); }
.customer-auth-intro h1, .verify-page h1, .account-heading h1, .account-order-heading h1 { margin-bottom: 18px; font-family: Georgia, "Noto Serif TC", serif; font-weight: 500; }
.customer-auth-intro > p { max-width: 560px; color: var(--muted); font-size: 1rem; }
.member-benefits { display: grid; margin-top: 38px; gap: 14px; }
.member-benefits span { display: flex; align-items: center; gap: 15px; color: #52605c; font-weight: 700; }
.member-benefits b { display: grid; width: 35px; height: 35px; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 50%; font-size: .67rem; }
.customer-auth-card { padding: 34px; box-shadow: var(--shadow); }
.customer-auth-card h2 { margin-bottom: 26px; font-size: 1.65rem; }
.auth-switch { margin: 24px 0 0; color: var(--muted); text-align: center; }
.auth-switch a, .auth-secondary-links a { color: var(--brand-dark); font-weight: 750; }
.auth-secondary-links { display: flex; margin-top: 22px; justify-content: space-between; gap: 15px; font-size: .8rem; }
.verify-page { display: grid; min-height: 690px; padding-block: 80px; justify-items: center; align-content: center; text-align: center; }
.verify-mark { display: grid; width: 72px; height: 72px; margin-bottom: 20px; place-items: center; color: #fff; background: var(--brand); border-radius: 50% 50% 50% 14px; font-size: 1.8rem; }
.verify-page > p { max-width: 570px; color: var(--muted); }
.verify-card { display: grid; width: min(460px, 100%); margin-top: 20px; gap: 18px; text-align: left; }
.verification-input { height: 62px; text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.7rem; font-weight: 800; letter-spacing: .35em; }
.resend-form { display: flex; margin-top: 16px; align-items: center; gap: 4px; color: var(--muted); font-size: .8rem; }
.account-page, .account-order-page { padding-top: 55px; padding-bottom: 100px; }
.account-heading, .account-order-heading { display: flex; margin-bottom: 34px; align-items: end; justify-content: space-between; gap: 25px; }
.account-heading h1, .account-order-heading h1 { margin-bottom: 6px; font-size: clamp(2rem, 4vw, 3rem); }
.account-heading p, .account-order-heading p { margin: 0; color: var(--muted); }
.account-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); align-items: start; gap: 22px; }
.account-profile { display: grid; justify-items: center; text-align: center; }
.account-avatar { display: grid; width: 76px; height: 76px; margin-bottom: 15px; place-items: center; color: #fff; background: var(--brand); border-radius: 50% 50% 50% 16px; font-family: Georgia, serif; font-size: 1.7rem; }
.account-profile h2 { margin-bottom: 2px; }
.account-profile > p { color: var(--muted); }
.account-profile dl { display: grid; width: 100%; margin: 20px 0 0; padding-top: 18px; gap: 12px; border-top: 1px solid var(--line); text-align: left; }
.account-profile dl div { display: grid; }
.account-profile dt { color: var(--muted); font-size: .7rem; }
.account-profile dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.account-order-list { display: grid; }
.account-order-card { display: grid; min-height: 83px; grid-template-columns: 55px minmax(0, 1fr) 78px 100px 15px; align-items: center; gap: 14px; border-bottom: 1px solid #edf1ef; }
.account-order-card:last-child { border-bottom: 0; }
.account-order-card:hover { color: var(--brand-dark); }
.account-order-date { display: grid; padding-right: 13px; justify-items: center; border-right: 1px solid var(--line); }
.account-order-date b { font-family: Georgia, serif; font-size: 1.35rem; line-height: 1; }
.account-order-date small, .account-order-main small { color: var(--muted); font-size: .7rem; }
.account-order-main { display: grid; }
.account-order-total { text-align: right; }
.large-pill { min-height: 32px; padding-inline: 15px; }
.customer-order-grid { grid-template-columns: minmax(0, 1.45fr) minmax(290px, .66fr); }
.customer-progress { display: grid; margin: 15px 0 8px; grid-template-columns: repeat(4, 1fr); }
.customer-progress > div { position: relative; display: grid; justify-items: center; gap: 8px; color: #9ba5a2; font-size: .75rem; }
.customer-progress > div::after { position: absolute; z-index: 0; width: calc(100% - 36px); height: 2px; left: calc(50% + 18px); top: 17px; background: #e2e7e5; content: ""; }
.customer-progress > div:last-child::after { display: none; }
.customer-progress span { z-index: 1; display: grid; width: 36px; height: 36px; place-items: center; background: #eef1f0; border-radius: 50%; font-weight: 800; }
.customer-progress .done { color: var(--brand-dark); }
.customer-progress .done span, .customer-progress .done::after { color: #fff; background: var(--brand); }
.inquiry-form { display: grid; margin-bottom: 26px; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.inquiry-form textarea { grid-column: 1; }
.inquiry-thread, .merchant-inquiries { display: grid; gap: 18px; }
.inquiry-item, .merchant-inquiry { display: grid; gap: 9px; }
.inquiry-item + .inquiry-item, .merchant-inquiry + .merchant-inquiry { padding-top: 20px; border-top: 1px solid var(--line); }

.question-section { padding-block: 28px 70px; }
.inquiry-compose { max-width: 900px; margin-inline: auto; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.conversation-list { display: grid; }
.conversation-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 15px; padding: 18px 4px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.conversation-card:last-child { border-bottom: 0; }
.conversation-card:hover { background: var(--surface-soft); }
.conversation-card.is-unread { box-shadow: inset 3px 0 var(--brand); }
.conversation-avatar { display: grid; width: 44px; height: 44px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 50%; place-items: center; font-weight: 800; }
.conversation-main { display: grid; min-width: 0; gap: 5px; }
.conversation-main > span { display: flex; gap: 8px; align-items: baseline; }
.conversation-main small, .conversation-meta, .conversation-main p { color: var(--muted); }
.conversation-main p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-meta { display: grid; justify-items: end; align-content: start; gap: 7px; font-size: .76rem; }
.conversation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 22px; }
.conversation-messages { display: flex; min-height: 260px; padding: 20px; background: var(--surface-soft); border-radius: 14px; flex-direction: column; gap: 14px; }
.conversation-message { width: fit-content; max-width: min(78%, 680px); padding: 12px 15px; background: #fff; border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; }
.conversation-message.from-merchant { align-self: flex-end; color: #fff; background: var(--brand); border-color: var(--brand); border-radius: 16px 4px 16px 16px; }
.conversation-message span { display: block; margin-bottom: 5px; opacity: .72; font-size: .72rem; }
.conversation-message p { margin: 0; line-height: 1.65; }
.conversation-reply { display: grid; margin-top: 18px; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.conversation-reply textarea { min-height: 92px; }
.admin-conversation .conversation-message.from-merchant { align-self: flex-end; }
.pill-danger { color: #a03939; background: #fde8e8; }
.text-danger { color: #a03939; }
.footer-legal, .auth-legal { display: inline-flex; gap: 14px; }
.footer-legal { margin-left: 18px; }
.footer-legal a, .auth-legal a, .simple-footer a { color: inherit; }
.auth-legal { margin-top: 22px; font-size: .84rem; }
.simple-footer { padding: 28px 0; color: var(--muted); border-top: 1px solid var(--line); }
.simple-footer > div { display: flex; justify-content: space-between; gap: 20px; }
.simple-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.policy-page { padding-top: 60px; padding-bottom: 90px; }
.policy-hero { max-width: 860px; margin-bottom: 25px; }
.policy-hero h1 { margin: 12px 0; font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4.6rem); }
.policy-hero > p { color: var(--muted); font-size: 1.08rem; line-height: 1.8; }
.policy-hero > div { display: flex; align-items: center; gap: 18px; color: var(--muted); }
.policy-switch { display: inline-flex; margin: 16px 0 30px; padding: 5px; background: var(--surface-soft); border-radius: 12px; }
.policy-switch a { padding: 10px 18px; color: var(--muted); text-decoration: none; border-radius: 9px; }
.policy-switch a.active { color: #fff; background: var(--brand); }
.policy-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 55px; }
.policy-toc { position: sticky; top: 25px; display: grid; gap: 10px; padding: 18px; background: var(--surface-soft); border-radius: 14px; }
.policy-toc a { color: var(--muted); text-decoration: none; font-size: .82rem; line-height: 1.45; }
.policy-content { max-width: 860px; }
.policy-content section { padding: 5px 0 26px; scroll-margin-top: 20px; }
.policy-content h2 { margin-bottom: 12px; font-size: 1.35rem; }
.policy-content p { margin: 0 0 11px; color: #42504d; line-height: 1.9; }
.policy-disclaimer { margin-top: 20px; padding: 20px; background: #fff7e7; border: 1px solid #f0d89a; border-radius: 12px; }
.merchant-application-card { width: min(680px, 100%); }
.merchant-application-card .form-grid { margin-top: 15px; }
.policy-consent { display: grid; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 13px; }
.policy-consent legend { padding-inline: 8px; font-weight: 800; }
.policy-consent > p { margin: 0; color: var(--muted); font-size: .84rem; }
.policy-consent label { display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; }
.policy-consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.approval-banner { display: flex; margin-bottom: 20px; padding: 18px 22px; color: #6d4d13; background: #fff5dd; border: 1px solid #f0d18c; border-radius: 14px; gap: 14px; }
.approval-banner.rejected { color: #8e3434; background: #fdecec; border-color: #efb7b7; }
.approval-banner > span { font-size: 1.6rem; }
.approval-banner p { margin: 5px 0 0; }
.publish-panel { display: flex; margin-top: 24px; align-items: center; justify-content: space-between; gap: 30px; }
.publish-actions { display: flex; align-items: center; gap: 22px; }
.publish-actions > div:last-child { display: grid; gap: 14px; justify-items: start; }
.shop-qr { display: grid; width: 196px; height: 196px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; place-items: center; }
.shop-qr img, .shop-qr canvas { max-width: 100%; height: auto !important; }
.message { max-width: 88%; padding: 13px 15px; border-radius: 10px; }
.message span { display: block; margin-bottom: 4px; color: var(--muted); font-size: .68rem; font-weight: 720; }
.message p { margin: 0; }
.customer-message { background: #f0f3f2; border-bottom-left-radius: 3px; }
.merchant-message { margin-left: auto; color: #17483d; background: var(--brand-soft); border-bottom-right-radius: 3px; }
.waiting-reply { padding-left: 15px; color: var(--warning); font-size: .72rem; font-weight: 750; }
.no-inquiries { margin: 0; text-align: center; }
.reply-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.small-empty { min-height: 180px; }
.signed-in-note { margin: 16px 0 0; padding: 10px 12px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 8px; font-size: .78rem; }

.simple-header { padding: 20px 0; background: #fff; border-bottom: 1px solid var(--line); }
.error-page { display: grid; min-height: 70vh; padding-block: 90px; justify-items: center; align-content: center; text-align: center; }
.error-code { color: var(--brand); font-family: Georgia, serif; font-size: 5rem; line-height: 1; }
.error-page h1 { margin: 18px 0 10px; font-size: 2rem; }
.error-page p { margin-bottom: 25px; color: var(--muted); }

@media (max-width: 1050px) {
  .metric-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .checkout-grid, .order-detail-grid, .settings-grid { grid-template-columns: minmax(0, 1fr) 330px; }
}

@media (max-width: 820px) {
  .container { width: min(100% - 30px, 700px); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 290px; padding: 28px; }
  .auth-statement { padding: 45px 0 20px; }
  .auth-statement h1 { margin-bottom: 12px; font-size: 2.5rem; }
  .auth-statement p { margin-bottom: 0; }
  .auth-orbit span:nth-child(1) { width: 260px; height: 260px; }
  .auth-orbit span:nth-child(2) { width: 160px; height: 160px; }
  .auth-orbit span:nth-child(3) { width: 60px; height: 60px; }
  .auth-form-panel { padding: 50px 24px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; width: 248px; transform: translateX(-102%); transition: transform .2s ease; }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-scrim { position: fixed; z-index: 15; inset: 0; width: 100%; height: 100%; background: rgba(0,0,0,.34); border: 0; }
  .sidebar-open .sidebar-scrim { display: block; }
  .topbar { height: 78px; justify-content: flex-start; gap: 12px; }
  .topbar > .button { margin-left: auto; }
  .mobile-menu { display: grid; }
  .page-content { padding-top: 25px; }
  .dashboard-grid, .checkout-grid, .order-detail-grid, .settings-grid { grid-template-columns: 1fr; }
  .sticky-summary { position: static; }
  .hero-inner { min-height: 0; grid-template-columns: 1fr; }
  .hero-copy { padding-block: 25px; }
  .hero-visual { min-height: 390px; }
  .story-grid { grid-template-columns: 1fr; gap: 24px; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .product-detail-media { position: static; height: auto; aspect-ratio: 1 / .9; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .customer-auth-page { min-height: 0; padding-top: 55px; grid-template-columns: 1fr; }
  .account-layout, .customer-order-grid { grid-template-columns: 1fr; }
  .conversation-layout { grid-template-columns: 1fr; }
  .policy-layout { grid-template-columns: 1fr; gap: 20px; }
  .policy-toc { position: static; grid-template-columns: 1fr 1fr; }
  .account-profile { grid-template-columns: 76px minmax(0, 1fr); justify-items: start; column-gap: 16px; text-align: left; }
  .account-profile .account-avatar { grid-row: 1 / 3; }
  .account-profile dl { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .container { width: calc(100% - 24px); }
  .page-content { padding-inline: 14px; }
  .topbar { padding-inline: 14px; }
  .topbar h1 { font-size: 1.2rem; }
  .topbar > .button { display: none; }
  .panel { padding: 19px; }
  .metric-grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 125px; padding: 16px; }
  .metric-card strong { font-size: 1.45rem; }
  .welcome-strip, .action-bar, .settings-header, .order-heading, .catalog-heading { align-items: stretch; flex-direction: column; }
  .welcome-strip .button, .action-bar > .button { width: 100%; }
  .search-form, .filter-form { min-width: 0; flex-wrap: wrap; }
  .search-form input, .filter-form input { min-width: 0; flex: 1 1 100%; }
  .filter-form select { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .table-panel { margin-inline: -2px; }
  table { min-width: 720px; }
  .category-item { grid-template-columns: 24px 40px 1fr auto; }
  .category-item .pill { display: none; }
  .category-item form { grid-column: 4; }
  .order-row { grid-template-columns: 48px 1fr auto; padding-block: 10px; }
  .order-row .pill { grid-column: 2; justify-self: start; }
  .order-total { grid-column: 3; grid-row: 1; }
  .chevron { display: none; }
  .order-heading .button { width: 100%; }
  .shop-header .header-inner { min-height: 66px; }
  .shop-brand small, .shop-nav > a:first-child { display: none; }
  .shop-nav { gap: 10px; }
  .notice-bar { text-align: left; }
  .shop-hero { padding: 20px 0 35px; }
  .hero-copy h1 { font-size: 2.55rem; }
  .hero-visual { min-height: 315px; border-radius: 55px 8px 55px 8px; }
  .hero-product { width: 190px; height: 245px; padding: 24px; }
  .hero-product > span { top: 48px; font-size: 4.2rem; }
  .catalog-section { padding-top: 55px; padding-bottom: 70px; }
  .catalog-heading h2 { font-size: 1.85rem; }
  .shop-search { min-width: 0; max-width: none; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .product-media { aspect-ratio: 1 / 1; }
  .product-letter { font-size: 3.4rem; }
  .product-info { padding-top: 11px; }
  .product-info h3 { font-size: .95rem; }
  .product-info p { display: -webkit-box; min-height: 39px; overflow: hidden; font-size: .75rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .product-price { display: grid; gap: 0; font-size: .82rem; }
  .add-button { width: 32px; height: 32px; }
  .store-story { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 25px; }
  .footer-grid > div:first-child { grid-column: auto; }
  .product-detail { padding-top: 22px; }
  .product-detail-copy { padding-top: 0; }
  .product-detail-copy h1 { font-size: 2rem; }
  .qty-action { grid-template-columns: 118px minmax(0, 1fr); }
  .detail-meta { grid-template-columns: 1fr; }
  .checkout-page { padding-top: 35px; }
  .checkout-heading h1 { font-size: 2.2rem; }
  .cart-row { grid-template-columns: 48px 1fr 32px; padding: 12px 0; }
  .cart-row .qty-control { grid-column: 2; width: 110px; }
  .cart-row > strong { grid-column: 3; grid-row: 1; }
  .cart-row > .icon-button { grid-column: 3; grid-row: 2; }
  .choice-grid { grid-template-columns: 1fr; }
  .order-number { min-width: 0; padding-inline: 25px; }
  .success-actions { width: 100%; flex-direction: column; }
  .modal-card { padding: 20px; }
  .shop-logout { margin-left: -4px; }
  .customer-auth-page { padding-top: 38px; padding-bottom: 65px; gap: 35px; }
  .customer-auth-card { padding: 22px; }
  .auth-secondary-links { align-items: center; flex-direction: column; }
  .account-heading, .account-order-heading { align-items: stretch; flex-direction: column; }
  .account-heading .button { width: 100%; }
  .account-profile dl { grid-template-columns: 1fr; }
  .account-order-card { grid-template-columns: 48px 1fr auto; padding-block: 12px; }
  .account-order-card .pill { grid-column: 2; justify-self: start; }
  .account-order-total { grid-column: 3; grid-row: 1; }
  .customer-progress b { font-size: .66rem; }
  .inquiry-form, .reply-form { grid-template-columns: 1fr; }
  .inquiry-form .button, .reply-form .button { width: 100%; }
  .message { max-width: 96%; }
  .conversation-card { grid-template-columns: 42px minmax(0, 1fr); }
  .conversation-meta { grid-column: 2; display: flex; justify-content: space-between; align-items: center; }
  .conversation-message { max-width: 94%; }
  .conversation-reply { grid-template-columns: 1fr; }
  .conversation-reply .button { width: 100%; }
  .publish-panel, .publish-actions { align-items: stretch; flex-direction: column; }
  .shop-qr { align-self: center; }
  .simple-footer > div { flex-direction: column; }
  .footer-legal { display: flex; margin: 10px 0 0; justify-content: center; }
}

@media print {
  .sidebar, .topbar, .shop-header, .shop-footer, .action-bar, .order-heading .button, .compact-panel form, .sidebar-scrim { display: none !important; }
  .app-shell, .order-detail-grid { display: block; }
  .page-content { padding: 0; }
  .panel { margin-bottom: 16px; break-inside: avoid; box-shadow: none; }
  body { background: #fff; }
}
