:root {
  font-family: Tahoma, Arial, sans-serif;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f2f7f4;
  --ink: #14251e;
  --muted: #586b61;
  --brand: #116b4d;
  --brand-strong: #0d563d;
  --on-brand: #ffffff;
  --line: #d9e6dd;
  --shadow: 0 8px 24px rgb(15 61 43 / 8%);
  --header: rgb(255 255 255 / 96%);
  --scrim: rgb(8 22 15 / 55%);
  --delivery-bg: #edf4f0;
  --delivery-ink: #14251e;
  --toast-bg: #14251e;
  --toast-ink: #ffffff;
  color: var(--ink);
  background: var(--bg);
}
:root[data-theme="dark"] {
  --bg: #101714;
  --surface: #19231e;
  --surface-soft: #223128;
  --ink: #f1f7f2;
  --muted: #b9ccc0;
  --brand: #7ad9a8;
  --brand-strong: #90e6b8;
  --on-brand: #102318;
  --line: #34483b;
  --shadow: 0 8px 24px rgb(0 0 0 / 20%);
  --header: rgb(25 35 30 / 96%);
  --scrim: rgb(0 0 0 / 72%);
  --delivery-bg: #0c1610;
  --delivery-ink: #f1f7f2;
  --toast-bg: #d5f2df;
  --toast-ink: #102318;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; padding-bottom: calc(86px + env(safe-area-inset-bottom)); background: var(--bg); color: var(--ink); overflow-x: hidden; }
body.theme-open { overflow: hidden; }
button, input, textarea { font: inherit; }
button { touch-action: manipulation; }
button:disabled { opacity: .58; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
a { color: var(--brand); }
header { position: sticky; top: 0; z-index: 10; height: 60px; padding: 0 14px; display: flex; align-items: center; gap: 9px; background: var(--header); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
header h1 { font-size: 20px; flex: 1; margin: 0; white-space: nowrap; }
header #balance { font-size: 12px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.icon { border: 0; background: transparent; color: var(--ink); font-size: 25px; cursor: pointer; padding: 4px; }
.hidden { visibility: hidden; }
.theme-toggle { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: var(--ink); font-size: 13px; font-weight: 700; padding: 7px 9px; white-space: nowrap; cursor: pointer; }
main { max-width: 760px; margin: auto; padding: 13px; min-height: calc(100dvh - 150px); }
.hero { display: flex; flex-direction: column; justify-content: center; min-height: 160px; padding: 22px; border-radius: 17px; background: linear-gradient(125deg, #103d32, #176b50 70%, #378d67); color: #fff; margin-bottom: 18px; }
:root[data-theme="dark"] .hero { background: linear-gradient(125deg, #1b4b39, #236347 70%, #357654); }
.hero h2 { margin: 0 0 8px; font-size: clamp(22px, 6vw, 30px); }
.hero p { margin: 0; color: #e8f7ec; }
.hero-tag, .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.hero-tag { color: #d5ecdf; margin-bottom: 8px; }
.eyebrow { color: var(--brand); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.grid:has(> :only-child) { grid-template-columns: 1fr; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 16px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { color: var(--muted); line-height: 1.7; margin: 7px 0; }
.product-card { text-align: right; color: var(--ink); cursor: pointer; width: 100%; min-height: 175px; display: flex; flex-direction: column; padding: 13px; }
.product-card h3 { font-size: 14px; margin-top: 7px; }
.product-card p { flex: 1; font-size: 12px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 11px; margin-top: 8px; }
.card-footer strong, .price { color: var(--brand); font-weight: 800; }
.card-footer span { color: var(--muted); font-size: 11px; }
.primary, .secondary { border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700; cursor: pointer; }
.primary { background: var(--brand); color: var(--on-brand); }
.secondary { background: var(--surface-soft); color: var(--brand); border: 1px solid var(--line); }
.wide { width: 100%; }
.actions { display: flex; gap: 10px; margin-top: 14px; }
.actions > * { flex: 1; }
.search-wrap { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 13px; margin-bottom: 13px; }
.search-wrap span { font-size: 27px; color: var(--brand); }
.search-wrap input { border: 0; outline: 0; padding: 14px 2px; background: transparent; color: var(--ink); }
input::placeholder { color: var(--muted); opacity: 1; }
.categories { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: none; }
.categories::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 30px; padding: 8px 16px; }
.chip.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.section-title h2 { font-size: 18px; margin: 0; }
.section-title span, .muted { color: var(--muted); }
.detail-card h2 { margin: 9px 0 15px; }
.detail-card > p { line-height: 1.8; }
.detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.detail-row strong { color: var(--brand); }
.terms-box { padding: 12px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; margin: 12px 0; overflow-wrap: anywhere; }
.terms-box p { margin: 6px 0 0; white-space: pre-wrap; }
.order { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; text-decoration: none; color: var(--ink); }
.badge { font-size: 12px; background: var(--surface-soft); border: 1px solid var(--line); color: var(--ink); padding: 5px 9px; border-radius: 99px; }
.delivery { direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; background: var(--delivery-bg); color: var(--delivery-ink); border: 1px solid var(--line); padding: 16px; border-radius: 14px; line-height: 1.7; }
.detail-list { display: grid; gap: 10px; }
.detail-list dt { color: var(--muted); font-size: 12px; }
.detail-list dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.loading { text-align: center; padding: 80px; color: var(--muted); }
.spinner { display: block; width: 23px; height: 23px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 13px; }
@keyframes spin { to { transform: rotate(360deg); } }
.wallet-card { background: linear-gradient(135deg, #123d31, #1d7857); border-radius: 22px; color: #fff; padding: 28px; display: grid; gap: 14px; }
:root[data-theme="dark"] .wallet-card { background: linear-gradient(135deg, #1c4d38, #277a55); }
.wallet-card strong { font-size: 36px; }
.wallet-card small { font-size: 16px; }
.wallet-card p { margin: 0; color: #d5ecdf; }
.support-link { display: block; text-align: center; padding: 18px; }
nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: center; background: var(--surface); border-top: 1px solid var(--line); padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)); }
nav button { max-width: 170px; flex: 1; border: 0; background: transparent; color: var(--muted); font-size: 19px; cursor: pointer; }
nav button span { display: block; font-size: 11px; margin-top: 3px; }
nav button.active { color: var(--brand); font-weight: 700; }
#toast { position: fixed; z-index: 40; bottom: 90px; left: 50%; transform: translate(-50%, 20px); background: var(--toast-bg); color: var(--toast-ink); padding: 10px 16px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.theme-overlay[hidden] { display: none; }
.theme-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.theme-scrim { position: absolute; inset: 0; background: var(--scrim); }
.theme-dialog { position: relative; width: min(100%, 760px); padding: 20px 16px calc(22px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -8px 32px rgb(0 0 0 / 18%); animation: sheet-in .18s ease-out; }
.theme-dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.theme-dialog-heading h2 { margin: 0; font-size: 20px; }
.theme-dialog > p { color: var(--muted); margin: 8px 0 16px; font-size: 13px; }
.theme-options { display: grid; gap: 8px; }
.theme-option { display: grid; grid-template-columns: 28px 1fr 20px; align-items: center; gap: 10px; width: 100%; text-align: right; padding: 12px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface-soft); color: var(--ink); cursor: pointer; }
.theme-option[aria-checked="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.theme-option b, .theme-option small { display: block; }
.theme-option small { color: var(--muted); margin-top: 3px; }
.theme-check { color: var(--brand); visibility: hidden; }
.theme-option[aria-checked="true"] .theme-check { visibility: visible; }
@keyframes sheet-in { from { transform: translateY(18px); opacity: .5; } }
.admin-body { padding: 0; }
.admin-body main { min-height: unset; }
.admin { max-width: 1100px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.admin label, .login-card label { display: grid; gap: 6px; margin: 12px 0; color: var(--muted); }
input, textarea { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); }
textarea { min-height: 120px; }
.login-card { max-width: 400px; margin: 12vh auto; background: var(--surface); padding: 28px; border-radius: 18px; }
.terms { font-size: 12px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
@media (max-width: 520px) { .card { border-radius: 15px; } }
@media (max-width: 360px) { .grid { grid-template-columns: 1fr; } header #balance { display: none; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (prefers-reduced-motion: no-preference) { body, header, nav, .card, .terms-box, .theme-toggle, .theme-dialog, .theme-option, .search-wrap, .chip, .secondary, .delivery { transition: background-color .18s, color .18s, border-color .18s; } }
