/* ===================================================================
   Best. by Emma — styles
   Warm ivory paper, ink text, brand gold, bead-turquoise accent.
   =================================================================== */
:root {
  color-scheme: light;
  --bg: #FBF7F1;
  --bg-2: #F5EEE4;
  --surface: #FFFFFF;
  --ink: #241E1A;
  --ink-2: #4A413A;
  --muted: #7A6F66;
  --line: #EAE1D6;
  --gold: #C9982E;
  --gold-ink: #8E6A17;
  --teal: #2B8F8A;
  --teal-ink: #1F6E6A;
  --teal-soft: #E1F2EF;
  --blush: #F6E4DE;
  --success: #2F7D55;
  --success-soft: #E3F2E9;
  --warn: #9A6A12;
  --warn-soft: #FBF0D9;
  --danger: #B0443A;
  --danger-soft: #F8E3E0;
  --r-sm: 10px; --r: 16px; --r-lg: 24px;
  --shadow: 0 1px 2px rgb(36 30 26 / .04), 0 8px 24px -12px rgb(36 30 26 / .12);
  --shadow-lg: 0 24px 60px -24px rgb(36 30 26 / .28);
  --serif: 'Frank Ruhl Libre', 'Times New Roman', serif;
  --sans: 'Assistant', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --script: 'Cormorant Garamond', 'Frank Ruhl Libre', Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5vw, 44px); }
h2 { font-size: clamp(24px, 3.4vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 .8em; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 680px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.gap { gap: 12px; } .row.between { justify-content: space-between; } .row.end { justify-content: flex-end; }
.wrap-row { flex-wrap: wrap; } .center-v { align-items: center; } .grow { flex: 1; }
.stack { display: grid; gap: 16px; } .stack-sm { display: grid; gap: 8px; justify-items: center; }
.block { display: block; width: 100%; }
:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--teal-soft); }

/* ---------- brand */
.brand { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; direction: ltr; }
.brand-best { font: italic 500 30px/1 var(--script); color: var(--gold); letter-spacing: -.01em; }
.brand-by { font: 500 13px/1 var(--sans); color: var(--muted); letter-spacing: .04em; }

/* ---------- header */
#header { position: sticky; top: 0; z-index: 40; background: rgb(251 247 241 / .86); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
#header:has(+ main .page-top), body.scrolled #header { border-color: var(--line); }
.demo-bar { background: var(--ink); color: #fff; font-size: 13px; text-align: center; padding: 5px 12px; }
.demo-bar .link { color: #fff; }
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.nav-links { display: flex; gap: 6px; margin-inline-start: 12px; }
.nav-links a { text-decoration: none; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 500; transition: background .15s; }
.nav-links a:hover, .nav-links a.active { background: var(--bg-2); color: var(--ink); }
.nav-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; text-decoration: none; position: relative; transition: background .15s; }
.icon-btn:hover { background: var(--bg-2); }
.pill-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 14px; cursor: pointer; }
.bag-count { position: absolute; top: 4px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 11px; font-weight: 700; display: none; place-items: center; }
.bag-count.on { display: grid; }
.bag-btn.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.18); } }
@media (max-width: 720px) {
  /* backdrop-filter would trap the fixed bottom bar inside the header */
  #header { backdrop-filter: none; background: var(--bg); }
  .nav { gap: 8px; height: 60px; }
  .nav-links { position: fixed; bottom: 0; inset-inline: 0; margin: 0; justify-content: space-around; background: rgb(255 255 255 / .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); z-index: 40; }
  .nav-links a { font-size: 15px; }
  body { padding-bottom: 64px; }
  .brand-best { font-size: 26px; }
}

/* ---------- buttons, chips, links */
.btn { --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--b); background: var(--b); color: #fff;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .12s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { box-shadow: 0 6px 18px -8px rgb(36 30 26 / .5); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.lg { padding: 14px 26px; font-size: 17px; }
.btn.sm { padding: 7px 14px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface); border-color: var(--ink); box-shadow: none; }
.btn.ghost-strong { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn.success { --b: var(--success); }
.btn.paybox { --b: #1E64F0; }
.btn.google { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn svg { flex: none; }
.danger-text { color: var(--danger) !important; }
.link { background: none; border: 0; padding: 0; color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 500; }
.link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--teal-ink); }
[dir=rtl] .link-arrow svg, [dir=rtl] .scard-arrow svg { transform: scaleX(-1); }
[dir=ltr] .back svg { transform: scaleX(-1); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); border: 0; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; vertical-align: middle; }
.chip svg { width: 15px; height: 15px; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); margin-bottom: 18px; font-weight: 500; }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 10px; text-decoration: none; }
.lead { font-size: 19px; color: var(--ink-2); }
.tag { position: absolute; top: 10px; inset-inline-start: 10px; background: rgb(255 255 255 / .92); color: var(--ink); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(6px); }
.tag-dark { background: var(--ink); color: #fff; }

/* ---------- view transitions */
#view { opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease), transform .35s var(--ease); min-height: 60vh; }
#view.ready { opacity: 1; transform: none; }
.page-top { padding-top: 32px; }
.section { padding-block: 56px; }
.section-head { margin-bottom: 26px; }
.section-head.split { display: flex; justify-content: space-between; align-items: end; gap: 16px; }

/* ---------- hero */
.hero { position: relative; overflow: hidden; padding: 40px 0 24px; background:
  radial-gradient(60% 80% at 85% 10%, rgb(43 143 138 / .10), transparent 60%),
  radial-gradient(50% 70% at 10% 90%, rgb(201 152 46 / .12), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; min-height: min(78vh, 640px); }
.display { font-size: clamp(42px, 7.2vw, 84px); font-weight: 500; line-height: 1.02; letter-spacing: -.025em; margin-bottom: 20px; }
.display span { display: block; }
.display span:last-child { color: var(--teal-ink); }
[dir=ltr] .display span:last-child { font-style: italic; }
.hero-copy .lead { max-width: 30em; margin-bottom: 28px; }
.hero-art { position: relative; height: min(64vh, 540px); }
.hero-tile { position: absolute; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface); border: 6px solid var(--surface); }
.hero-tile img { width: 100%; height: 100%; object-fit: cover; }
.hero-tile.t0 { width: 58%; height: 74%; inset-inline-end: 4%; top: 2%; transform: rotate(3deg); animation: float 9s ease-in-out infinite; }
.hero-tile.t1 { width: 44%; height: 54%; inset-inline-start: 2%; top: 30%; transform: rotate(-5deg); animation: float 11s ease-in-out -3s infinite; }
.hero-tile.t2 { width: 34%; height: 38%; inset-inline-end: 30%; bottom: 0; transform: rotate(6deg); animation: float 10s ease-in-out -6s infinite; }
@keyframes float { 50% { translate: 0 -10px; } }
.bead { position: absolute; border-radius: 50%; box-shadow: inset -4px -6px 10px rgb(0 0 0 / .12), inset 4px 4px 8px rgb(255 255 255 / .6); }
.bead.b1 { width: 34px; height: 34px; background: #63C3BC; top: 6%; inset-inline-start: 22%; }
.bead.b2 { width: 22px; height: 22px; background: var(--gold); bottom: 18%; inset-inline-start: 6%; }
.bead.b3 { width: 26px; height: 26px; background: #F2B5AB; top: 52%; inset-inline-end: 0; }
@media (prefers-reduced-motion: reduce) { .hero-tile { animation: none !important; } #view { transition: none; } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 8px; }
  .hero-art { height: 340px; order: -1; }
  .hero { padding-top: 16px; }
}

/* ---------- product grid & cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr 1fr; gap: 12px; } .pcard-body p.clamp { display: none; } .pcard h3 { font-size: 16px; } }
.pcard { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pcard-img { position: relative; aspect-ratio: 4 / 5; background: var(--bg-2); overflow: hidden; }
.pcard-img img, .pcard-img .img-ph { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pcard:hover .pcard-img img { transform: scale(1.05); }
.pcard.soldout .pcard-img img { filter: grayscale(.6); opacity: .7; }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard h3 { margin: 0; font-size: 18px; }
.pcard-body p { margin: 0; font-size: 14px; }
.pcard-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.price.xl { font-size: 28px; font-family: var(--serif); font-weight: 500; margin: 4px 0 14px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.img-ph { display: grid; place-items: center; color: var(--muted); background: linear-gradient(135deg, var(--bg-2), var(--blush)); }

/* ---------- how it works */
.how { background: var(--surface); padding: 56px 0; border-block: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.steps li { padding: 22px; border-radius: var(--r); background: var(--bg); }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; margin-bottom: 12px; font-family: var(--serif); font-size: 20px; }
.steps li:nth-child(2) .step-n { background: var(--gold); }
.steps li:nth-child(3) .step-n { background: var(--ink); }
.steps p { margin: 0; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- stores */
.stores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.scard { display: flex; gap: 16px; align-items: center; padding: 16px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s; }
.scard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.scard h3 { margin: 0 0 2px; }
.scard p { margin: 0; font-size: 14px; }
.scard > div:nth-child(2) { flex: 1; min-width: 0; }
.scard-av { width: 72px; height: 72px; border-radius: 18px; overflow: hidden; flex: none; background: var(--bg-2); }
.scard-av img, .scard-av .img-ph { width: 100%; height: 100%; object-fit: cover; }
.scard-av.plus { display: grid; place-items: center; border: 2px dashed var(--line); background: transparent; color: var(--teal-ink); }
.scard-cta { background: transparent; box-shadow: none; border: 1.5px dashed var(--line); }
.scard-arrow { color: var(--muted); }
.store-head { display: flex; gap: 22px; align-items: center; margin-bottom: 32px; }
.store-av { width: 120px; height: 120px; border-radius: 28px; overflow: hidden; flex: none; box-shadow: var(--shadow); }
.store-av img, .store-av .img-ph { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) { .store-head { flex-direction: column; align-items: flex-start; } .store-av { width: 88px; height: 88px; } }

/* ---------- story */
.story-card { display: grid; grid-template-columns: 180px 1fr; gap: 32px; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: 36px; box-shadow: var(--shadow); }
.story-logo { width: 180px; height: 180px; object-fit: contain; border-radius: 50%; background: var(--bg); }
@media (max-width: 640px) { .story-card { grid-template-columns: 1fr; padding: 24px; } .story-logo { width: 110px; height: 110px; } }

/* ---------- product page */
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.gallery-main { aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); }
.gallery-main img, .gallery-main .img-ph { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.thumb { width: 72px; height: 88px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; flex: none; background: none; }
.thumb.on { border-color: var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.pinfo { position: sticky; top: 92px; }
.charms { border: 0; padding: 0; margin: 8px 0 18px; }
.charms legend { font-weight: 700; margin-bottom: 10px; }
.charm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.charm { display: grid; gap: 4px; justify-items: center; padding: 6px 6px 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; transition: border-color .15s, transform .15s; }
.charm:hover { transform: translateY(-2px); }
.charm.on { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.charm img, .charm-none { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.charm-none { display: grid; place-items: center; background: var(--bg); color: var(--muted); font-size: 22px; }
.charm em { font-style: normal; color: var(--teal-ink); }
.buy-row { display: flex; gap: 12px; margin: 10px 0 8px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { width: 44px; height: 48px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.qty output { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.qty.sm button { width: 34px; height: 34px; }
.qty.sm svg { width: 16px; }
.btn.grow { flex: 1; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; gap: 20px; } .pinfo { position: static; } }

/* ---------- forms */
.field { display: grid; gap: 6px; }
.field > span, fieldset legend { font-weight: 600; font-size: 15px; }
.field input, .field textarea, .slug-input, .rate input {
  width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus, .slug-input:focus-within { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.field textarea { resize: vertical; }
.field small { font-size: 13px; }
.slug-input { display: flex; align-items: center; padding: 0 0 0 14px; }
.slug-input span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.slug-input input { border: 0; box-shadow: none !important; padding-inline-start: 2px; }
.pw { position: relative; }
.pw .link { position: absolute; inset-inline-end: 14px; top: 50%; translate: 0 -50%; }
[dir=rtl] .pw .link { inset-inline-end: auto; inset-inline-start: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--teal); margin-top: 3px; flex: none; }
fieldset.card { border: 0; margin: 0; }
fieldset.card legend { float: inline-start; width: 100%; font-family: var(--serif); font-size: 20px; font-weight: 500; margin-bottom: 4px; }
fieldset.parent { background: var(--bg-2); box-shadow: none; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .2); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--teal); }
.switch input:checked + i::after { transform: translateX(18px); }
[dir=rtl] .switch input:checked + i::after { transform: translateX(-18px); }
.switch input:focus-visible + i { outline: 2.5px solid var(--teal); outline-offset: 2px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .cols2, .cols3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 12px; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 14px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- bag / checkout */
.checkout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.bag-item { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.bag-img { width: 88px; height: 104px; border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.bag-img img { width: 100%; height: 100%; object-fit: cover; }
.bag-info h3 { margin: 0 0 4px; font-size: 18px; }
.bag-info p { margin: 0 0 6px; }
.bag-end { display: grid; justify-items: end; gap: 6px; }
.bag-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 4px; font-size: 18px; }
.bag-total strong { font-family: var(--serif); font-size: 26px; font-weight: 500; }
.checkout-form { position: sticky; top: 92px; display: grid; gap: 14px; }
.checkout-form h2 { margin: 0; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } .checkout-form { position: static; } }

/* ---------- order status */
.track { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.track::before { content: ''; position: absolute; top: 15px; inset-inline: 12%; height: 2px; background: var(--line); }
.track li { display: grid; justify-items: center; gap: 8px; font-size: 14px; color: var(--muted); position: relative; text-align: center; }
.track .dot { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center; color: #fff; }
.track .dot svg { width: 16px; }
.track li.done { color: var(--ink); font-weight: 600; }
.track li.done .dot { background: var(--teal); border-color: var(--teal); }
.track li.now:first-child .dot { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 6px rgb(201 152 46 / .2); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgb(201 152 46 / .08); } }
.pay-card { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 28px; margin: 8px 0 24px; box-shadow: var(--shadow-lg); }
.pay-card h2 { color: #fff; }
.pay-card .muted { color: rgb(255 255 255 / .7); }
.pay-steps { padding-inline-start: 22px; margin: 0 0 22px; display: grid; gap: 8px; font-size: 18px; }
.pay-steps .chip { background: rgb(255 255 255 / .14); color: #fff; font-size: 15px; }
.paid-card { text-align: center; background: var(--success-soft); border-radius: var(--r-lg); padding: 28px; margin: 8px 0 24px; }
.paid-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; margin: 0 auto 12px; }
.paid-icon svg { width: 32px; height: 32px; }
.order-items { display: grid; gap: 12px; margin-bottom: 18px; }
.oi { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.oi > div { display: grid; }
.oi-img { width: 56px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--bg-2); }
.status-pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); vertical-align: middle; }
.status-pill.pending { background: var(--warn-soft); color: var(--warn); }
.status-pill.paid, .status-pill.approved { background: var(--success-soft); color: var(--success); }
.status-pill.ready { background: var(--teal-soft); color: var(--teal-ink); }
.status-pill.cancelled, .status-pill.rejected { background: var(--danger-soft); color: var(--danger); }
.status-pill.paused { background: var(--bg-2); color: var(--muted); }

/* ---------- auth */
.auth { display: grid; place-items: center; min-height: 70vh; padding-bottom: 40px; }
.auth-card { width: min(440px, 100%); padding: 34px; }
.auth-card h1 { font-size: 30px; margin-bottom: 4px; }
.auth-logo { margin-bottom: 18px; }
.otp { font-size: 28px !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.big-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-ink); display: grid; place-items: center; }
.big-icon svg { width: 30px; height: 30px; }
.sent { padding: 8px 0; }

/* ---------- empty */
.empty-state { text-align: center; padding: 80px 0; display: grid; justify-items: center; gap: 10px; color: var(--muted); }
.empty-state svg { width: 40px; height: 40px; }
.empty-state.small { padding: 40px 0; }
.empty-state h1 { color: var(--ink); }

/* ---------- dashboard */
.dash { padding-bottom: 60px; }
.dash-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head h1 { font-size: 32px; margin: 0; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 22px; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 12px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabs a svg { width: 18px; }
.tabs a.on { color: var(--ink); border-color: var(--ink); }
.badge { background: var(--gold); color: #fff; font-size: 12px; min-width: 20px; height: 20px; border-radius: 999px; display: inline-grid; place-items: center; padding: 0 6px; }
.panel { display: grid; gap: 18px; }
.notice { background: var(--warn-soft); color: var(--warn); padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; }
.panel > .seg, .panel > .row > .seg { justify-self: start; }
.seg { display: inline-flex; background: var(--bg-2); padding: 4px; border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--surface); box-shadow: var(--shadow); }
.seg.sm button { padding: 4px 10px; font-size: 13px; }
.orders { display: grid; gap: 14px; }
.order { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; border-inline-start: 4px solid var(--line); display: grid; gap: 10px; }
.order.status-pending { border-inline-start-color: var(--gold); }
.order.status-paid, .order.status-ready { border-inline-start-color: var(--teal); }
.order.status-cancelled { opacity: .65; }
.order header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.onum { font-family: var(--serif); font-size: 22px; font-weight: 500; margin-inline-end: 6px; }
.order-body { display: flex; justify-content: space-between; gap: 16px; }
.order-total { font-family: var(--serif); font-size: 24px; display: grid; justify-items: end; align-content: start; white-space: nowrap; }
.order-total small { font-family: var(--sans); font-size: 12px; }
.cust { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.oitems { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.oitems li { display: flex; gap: 10px; align-items: center; }
.mini { width: 36px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.note { background: var(--bg); border-radius: 10px; padding: 8px 12px; margin: 8px 0 0; font-style: italic; }
.hint { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 8px 12px; }
.hint svg { width: 18px; flex: none; }
.order footer { display: flex; gap: 8px; flex-wrap: wrap; }
.order footer:empty { display: none; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tile { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 2px; }
.tile span { font-size: 14px; color: var(--muted); font-weight: 600; }
.tile b { font-family: var(--serif); font-size: 32px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.2; }
@media (max-width: 860px) { .tiles, .tiles.three { grid-template-columns: 1fr 1fr; } }
.chart-card .row { margin-bottom: 8px; }
.chart-card h3 { margin: 0; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: #CFC4B7; stroke-width: 1; }
.chart .tick { fill: var(--muted); font: 12px var(--sans); }
.chart .bar { fill: var(--teal); transition: opacity .15s; }
.chart .bar.peak { fill: var(--teal-ink); }
.chart .peak-label { fill: var(--ink); font: 700 12px var(--sans); }
.chart .hover-line { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: .35; }
.chart-tip { position: absolute; top: -6px; background: var(--ink); color: #fff; font-size: 13px; padding: 7px 11px; border-radius: 10px; pointer-events: none; white-space: nowrap; display: grid; box-shadow: var(--shadow-lg); z-index: 2; }
.chart-tip span { opacity: .85; }
.chart-tip[hidden] { display: none; }
.rank { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rank li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.rank li:last-child { border: 0; }
.rank b { font-variant-numeric: tabular-nums; }
.meter { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.bar { height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { font-size: 13px; color: var(--muted); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.owe { color: var(--warn); }
.owed { display: grid; gap: 4px; justify-items: start; background: var(--warn-soft); box-shadow: none; }
.owed span { font-weight: 600; color: var(--warn); }
.owed b { font-family: var(--serif); font-size: 40px; font-weight: 500; }
.owed.clear { background: var(--success-soft); }
.owed.clear span { color: var(--success); }
.owed .btn { margin-top: 8px; }
.plist { display: grid; gap: 10px; }
.prow { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--r); padding: 10px 12px; box-shadow: var(--shadow); }
.prow.off { opacity: .55; }
.prow-img { width: 56px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.prow-info { flex: 1; display: grid; min-width: 0; }
.prow-act { display: flex; gap: 4px; align-items: center; }
.charm-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.charm-tile { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 10px; border-radius: var(--r); border: 0; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; }
.charm-tile.off { opacity: .5; }
.charm-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.photos.one { grid-template-columns: 120px 120px; }
.ph { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .tag { top: 6px; inset-inline-start: 6px; font-size: 11px; padding: 2px 8px; }
.ph-x, .ph-main { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .92); display: grid; place-items: center; cursor: pointer; }
.ph-main { inset-inline-end: auto; inset-inline-start: 6px; font-size: 14px; }
.ph-x svg { width: 16px; }
.ph.add { display: grid; place-items: center; align-content: center; gap: 6px; border: 2px dashed var(--line); background: transparent; cursor: pointer; color: var(--teal-ink); font-size: 13px; font-weight: 600; text-align: center; padding: 8px; }
.avatar-edit { width: 72px; height: 72px; border-radius: 18px; overflow: hidden; background: var(--bg-2); }
.avatar-edit img, .avatar-edit .img-ph { width: 100%; height: 100%; object-fit: cover; }
.linkbox { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 12px; padding: 10px 12px; overflow-x: auto; }
.linkbox code { font-size: 14px; white-space: nowrap; }
.store-admin { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 12px; }
.store-admin.status-pending { border-inline-start: 4px solid var(--gold); }
.store-admin p { margin: 4px 0; }
.store-admin .small { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.av-sm { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex: none; }
.rate { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-inline-start: auto; }
.rate input { width: 64px; padding: 6px 8px; }

/* ---------- modal & toast */
.modal-wrap { position: fixed; inset: 0; z-index: 80; background: rgb(36 30 26 / .45); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .18s; backdrop-filter: blur(3px); }
.modal-wrap.in { opacity: 1; }
.modal-wrap.out { opacity: 0; }
.modal { position: relative; width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-lg); transform: translateY(12px) scale(.98); transition: transform .25s var(--ease); }
.modal.wide { width: min(640px, 100%); }
.modal-wrap.in .modal { transform: none; }
.modal-x { position: absolute; top: 12px; inset-inline-end: 12px; }
.modal h2 { margin-inline-end: 40px; }
.confirm-msg { font-size: 18px; margin: 8px 0 20px; }
.sticky-actions { position: sticky; bottom: -28px; background: var(--surface); padding: 12px 0; margin-bottom: -12px; }
@media (max-width: 560px) {
  .modal-wrap { place-items: end center; padding: 0; }
  .modal { width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92dvh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
}
#toasts { position: fixed; inset-inline: 0; bottom: 24px; z-index: 90; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
@media (max-width: 720px) { #toasts { bottom: 84px; } }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; box-shadow: var(--shadow-lg); animation: tin .3s var(--ease); max-width: calc(100% - 32px); }
.toast-err { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .4s; }
@keyframes tin { from { opacity: 0; transform: translateY(12px); } }

/* ---------- footer */
#footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 36px 0 28px; }
.foot { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.foot-brand p { margin: 6px 0 0; }
.foot-brand .brand-best, .auth-logo .brand-best { margin-inline-end: 6px; }
.auth-logo { direction: ltr; text-align: right; }
[dir=ltr] .auth-logo { text-align: left; }
.foot-brand { direction: ltr; text-align: start; }
[dir=rtl] .foot-brand { text-align: right; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; color: var(--ink-2); font-weight: 500; }
.foot > p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 640px) { .foot { grid-template-columns: 1fr; } }

/* ---------- monthly store fee */
.notice.fee { display: block; text-decoration: none; background: var(--teal-soft); color: var(--teal-ink); font-weight: 600; }
.notice.warn { background: var(--danger-soft); color: var(--danger); }
.fee-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.fee-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.fee-row.late { background: var(--danger-soft); }
.owed p { margin: 4px 0 0; }
