:root {
  font-family: system-ui, sans-serif;
  color-scheme: light;
  --background: #fcfaf6;
  --surface: #ffffff;
  --soft-surface: #f0eaf4;
  --hero-surface: #ece4f3;
  --text: #302239;
  --muted: #716176;
  --border: #ded4e2;
  --plum: #60348b;
  --button: #60348b;
  --button-text: #ffffff;
  --focus: #8954be;
  --error: #b12240;
  --backdrop: #20132988;
  color: var(--text);
  background: var(--background);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #17111f;
  --surface: #241b2e;
  --soft-surface: #30223d;
  --hero-surface: #362646;
  --text: #f4ecfa;
  --muted: #c0b0cc;
  --border: #665273;
  --plum: #dab8fa;
  --button: #d3acf3;
  --button-text: #2e1641;
  --focus: #d9b4ff;
  --error: #ffafc3;
  --backdrop: #09050ccc;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
header, main, footer { max-width: 1250px; margin: auto; }
header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 32px; border-bottom: 1px solid var(--border); }
.brand { font-size: 29px; font-weight: 850; color: var(--plum); text-decoration: none; letter-spacing: -1px; flex-shrink: 0; }
.brand span { display: block; font-size: 9px; letter-spacing: 2px; margin-top: 5px; }
button, .cta { cursor: pointer; border: 0; border-radius: 12px; background: var(--button); color: var(--button-text); font: inherit; font-weight: 650; padding: 12px 18px; text-decoration: none; }
button:disabled { opacity: .5; cursor: wait; }
nav { display: flex; gap: 8px; align-items: center; }
nav button, .close { background: var(--soft-surface); color: var(--plum); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 12px; width: 44px; height: 44px; flex-shrink: 0; }
.theme-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle svg[hidden] { display: none; }
main { padding: 0 32px; }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; padding: 64px 0; }
.eyebrow { font-size: 12px; font-weight: 750; letter-spacing: 2px; color: var(--plum); }
h1 { font-size: clamp(38px, 5vw, 66px); line-height: 1.05; letter-spacing: -3px; margin: 18px 0; }
.hero p:not(.eyebrow) { font-size: 18px; color: var(--muted); max-width: 440px; line-height: 1.6; }
.cta { display: inline-block; margin-top: 14px; }
.hero-art { background: var(--hero-surface); border-radius: 40% 40% 20px 20px; text-align: center; font-size: 68px; transform: rotate(3deg); padding: 35px; }
.hero-art span { display: block; font-size: 24px; font-weight: 750; margin-top: 20px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.section-title span { font-size: 13px; color: var(--muted); }
h2 { font-size: 26px; letter-spacing: -.6px; }
form { display: flex; align-items: center; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
input, select, textarea { border: 1px solid var(--border); border-radius: 10px; padding: 13px; font: inherit; color: var(--text); background: var(--surface); max-width: 100%; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
option { color: var(--text); background: var(--surface); }
#search-form input { flex: 1; min-width: 150px; }
#store-form input { width: 95px; }
label { font-size: 14px; }
select { flex: 1; min-width: 0; }
.categories { display: flex; gap: 10px; flex-wrap: wrap; }
.categories button { background: var(--surface); color: var(--text); border: 1px solid var(--border); font-size: 14px; }
#notice { color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; min-width: 0; }
.product img { height: 160px; width: 100%; object-fit: contain; background: white; border-radius: 10px; }
.product h3 { font-size: 15px; line-height: 1.5; flex: 1; overflow-wrap: anywhere; }
.product small, .cart-row small { color: var(--muted); }
.product .buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.promise { margin: 65px 0; background: var(--soft-surface); padding: 30px; border-radius: 24px; }
.promise > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.promise p { line-height: 1.8; font-size: 14px; }
footer { padding: 25px 32px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 13px; }
dialog { border: 1px solid var(--border); border-radius: 22px; padding: 30px; width: 580px; max-width: 95vw; max-height: 90vh; background: var(--surface); color: var(--text); }
dialog::backdrop { background: var(--backdrop); }
.close { float: right; }
dialog form { display: grid; }
dialog form input, dialog form textarea { width: 100%; }
.cart-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-row img { width: 55px; height: 55px; object-fit: contain; background: white; border-radius: 8px; flex-shrink: 0; }
.cart-row span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cart-row button { padding: 6px 10px; }
.order { border: 1px solid var(--border); padding: 18px; border-radius: 15px; margin: 15px 0; overflow-wrap: anywhere; }
.order details img { display: block; max-width: 100%; height: auto; border-radius: 10px; margin-top: 12px; }
.orders-heading, .order-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.orders-heading h2 { margin-right: auto; }
.orders-heading button { padding: 10px 12px; }
.order-heading h3 { margin: 0; }
.order-stage, .item-status { font-size: 12px; color: var(--plum); background: var(--soft-surface); border-radius: 8px; padding: 6px 8px; }
.order-timeline { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 18px 0; }
.order-timeline li { display: flex; align-items: center; gap: 7px; padding: 9px 7px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font-size: 12px; }
.order-timeline .current { border-color: var(--plum); background: var(--soft-surface); color: var(--text); font-weight: 700; }
.step-number { width: 23px; height: 23px; display: inline-flex; justify-content: center; align-items: center; border-radius: 50%; border: 1px solid var(--border); flex-shrink: 0; }
.complete .step-number, .current .step-number { background: var(--button); color: var(--button-text); border-color: var(--button); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.order-items { list-style: none; padding: 0; margin: 0; }
.order-item { display: flex; align-items: start; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.order-item > img { width: 55px; height: 55px; object-fit: contain; background: white; border-radius: 8px; flex-shrink: 0; }
.order-item-body { min-width: 0; flex: 1; }
.item-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.order-item p { margin: 8px 0; line-height: 1.5; }
.quantity-summary { font-size: 13px; }
.quantity-note, .approval-notice, .status-note { background: var(--soft-surface); color: var(--text); padding: 10px 12px; border-radius: 10px; line-height: 1.5; }
.replacement-proposal { border: 1px solid var(--border); padding: 12px; margin-top: 12px; border-radius: 12px; }
.replacement-proposal p { font-size: 13px; }
.replacement-clock { display: flex; flex-direction: column; gap: 6px; background: var(--soft-surface); color: var(--text); padding: 10px 12px; border-radius: 10px; }
.replacement-clock strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.replacement-clock [data-replacement-window-status]:empty { display: none; }
.approval-source { color: var(--plum); font-weight: 650; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.order-actions button { min-height: 44px; font-size: 13px; }
.grocery-receipt { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin: 18px 0; }
.receipt-content { margin-top: 14px; }
.receipt-lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.receipt-lines caption { text-align: left; font-weight: 700; margin-bottom: 10px; }
.receipt-lines th, .receipt-lines td { padding: 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.receipt-lines th:last-child, .receipt-lines td:last-child { text-align: right; padding-left: 12px; white-space: nowrap; }
.receipt-lines small { display: block; line-height: 1.6; margin-top: 4px; }
.receipt-lines tfoot th, .receipt-lines tfoot td { border: 0; font-weight: 750; }
.receipt-discount td:last-child { color: var(--plum); }
.receipt-note { font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.receipt-photos { display: flex; gap: 10px; flex-wrap: wrap; }
.order .receipt-photos img { width: 96px; height: 128px; object-fit: contain; background: white; border: 1px solid var(--border); }
.order-bill { border-top: 1px solid var(--border); margin: 18px 0; padding-top: 8px; }
.order-bill dl { margin: 10px 0; }
.order-bill dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; }
.order-bill dd { margin: 0; white-space: nowrap; }
.bill-total { border-top: 1px solid var(--border); margin-top: 8px; font-weight: 750; }
.order-messages { margin-top: 20px; }
.order-messages h4 { margin-bottom: 8px; }
.order-messages ul { list-style: none; padding: 0; }
.order-messages li { line-height: 1.6; font-size: 14px; padding: 8px 0; }
.muted { color: var(--muted); font-size: 13px; }
[role="alert"] { color: var(--error); }
.auth-verification { min-width: 0; border: 1px solid var(--border); background: var(--soft-surface); padding: 14px; border-radius: 12px; }
[data-captcha-status] { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
[data-captcha-widget] { min-width: 0; max-width: 100%; }
.auth-verification a { color: var(--plum); }
.verification-page { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.verification-card { width: min(100%, 480px); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 28px; }
.verification-card h1 { font-size: 34px; letter-spacing: -1px; }
.verification-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.secondary { background: var(--soft-surface); color: var(--text); }
summary { cursor: pointer; color: var(--plum); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (max-width: 750px) {
  header { padding: 18px; align-items: start; flex-wrap: wrap; gap: 14px; }
  .brand { font-size: 23px; }
  nav { gap: 6px; margin-left: auto; flex-wrap: wrap; }
  nav button { padding: 10px; font-size: 12px; min-height: 44px; }
  nav #account { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main { padding: 0 18px; }
  .hero { grid-template-columns: 1fr; padding: 32px 0; }
  .hero-art { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product { padding: 12px; }
  .product img { height: 125px; }
  .product .buy { flex-wrap: wrap; }
  .promise > div { grid-template-columns: 1fr; gap: 0; }
  .section-title { display: block; }
  footer { display: block; }
  footer span { display: block; margin-top: 8px; }
  dialog { padding: 20px; }
  .cart-row { gap: 8px; font-size: 14px; }
  .cart-row img { width: 44px; height: 44px; }
  .cart-row button { padding: 8px; }
  .order { padding: 14px; }
  .order-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-item { gap: 8px; }
  .order-item > img { width: 44px; height: 44px; }
  .order-actions button { flex-grow: 1; }
  .grocery-receipt { padding: 10px; }
}
