/* Placebo Pastry — site styles */
:root {
  --bg: #fbf6f1;
  --bg-soft: #f4ebe3;
  --card: #fffdfb;
  --ink: #2b1e1a;
  --muted: #6e5a52;
  --line: #e8dcd3;
  --accent: #b8384a;      /* PLACEBO red */
  --accent-ink: #fff;
  --blush: #f3d9d2;       /* Saint-Honoré pink */
  --radius: 18px;
  --max: 1120px;
  --serif: "Fraunces", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", Roboto, Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.7 var(--sans);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

/* ---- language switching: one element per language, CSS hides the other ---- */
html:not([data-lang="en"]) [lang="en"] { display: none !important; }
html[data-lang="en"] [lang="zh-Hans"] { display: none !important; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section.soft { background: var(--bg-soft); }
.eyebrow { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: .6em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 40em; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; letter-spacing: .12em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .95rem; color: var(--muted); }
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--blush); }
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--card); }
.lang-toggle button {
  font: inherit; font-size: .85rem; border: 0; background: none; color: var(--muted);
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.menu-btn { display: none; font: inherit; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; cursor: pointer; line-height: 0; }
.lang-toggle .short { display: none; }

@media (max-width: 860px) {
  .site-header .wrap { gap: 10px; }
  .brand { font-size: 1.02rem; letter-spacing: .08em; }
  .menu-btn { display: inline-block; order: 3; }
  .lang-toggle { margin-left: auto; order: 2; }
  .lang-toggle button { padding: 4px 9px; white-space: nowrap; }
  .lang-toggle .long { display: none; }
  .lang-toggle .short { display: inline; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; border-radius: 12px; }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { transform: translateY(-1px); }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---- hero ---- */
.hero { padding: clamp(32px, 6vw, 72px) 0; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero-img { border-radius: 28px; overflow: hidden; aspect-ratio: 4/5; background: var(--blush); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: 1fr; } .hero-img { aspect-ratio: 1/1; } }

/* ---- cards ---- */
.grid { display: grid; gap: 20px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid.three, .grid.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid.three, .grid.two, .grid.four { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
a.card { text-decoration: none; display: block; transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(43,30,26,.08); }
.card .more { color: var(--accent); font-weight: 600; margin-top: 8px; display: inline-block; }
.card .icon { font-size: 1.6rem; margin-bottom: 8px; }

/* ---- steps ---- */
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); padding: 0; list-style: none; margin: 24px 0 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--blush); color: var(--accent); font-weight: 700; margin-bottom: 10px;
}
.steps h3 { font-size: 1.05rem; margin-bottom: .3em; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---- gallery ---- */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; background: var(--blush); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr 1fr; } }

/* ---- menu ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.chips a { text-decoration: none; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .92rem; }
.chips a:hover { border-color: var(--ink); }
.menu-cat { scroll-margin-top: 80px; padding-top: 32px; }
.menu-cat > h2 { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.menu-cat > h2 small { font-family: var(--sans); font-size: .9rem; color: var(--muted); font-weight: 400; }
.menu-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
@media (max-width: 760px) { .menu-list { grid-template-columns: 1fr; } }
.item { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.item h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; margin: 0; }
.item .alt { color: var(--muted); font-size: .9rem; }
.item .allergens { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.item .allergens span.tag { font-size: .78rem; background: var(--bg-soft); border-radius: 6px; padding: 1px 8px; color: var(--muted); }
.item details { margin-top: 6px; font-size: .88rem; color: var(--muted); }
.item summary { cursor: pointer; color: var(--accent); }
.note { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 14px 18px; color: var(--muted); font-size: .95rem; }

/* ---- contact ---- */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.contact-list b { color: var(--muted); font-weight: 600; }
@media (max-width: 480px) { .contact-list li { grid-template-columns: 1fr; gap: 2px; } }

/* placeholder marker: must be filled in before launch */
.todo { background: #fff3c4; border: 1px dashed #c9a227; border-radius: 6px; padding: 0 6px; color: #7a5d00; font-size: .9em; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--ink); }

/* ---- page header (inner pages) ---- */
.page-head { padding: clamp(40px, 7vw, 80px) 0 16px; }

.share-tip { margin-top: 12px; font-size: 0.95rem; color: var(--accent); }
button.btn { font-family: inherit; cursor: pointer; }

/* ================= weekly order (/tuan), order status (/o/…), payment ================= */
.wrap.narrow { max-width: 720px; }
.muted-c { color: var(--muted); text-align: center; }
.shop-head { padding: 28px 0 8px; }
.shop-head h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin-bottom: .3em; }
.round-meta { display: grid; gap: 4px; color: var(--muted); font-size: .98rem; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 1px 10px; margin-right: 8px; background: var(--bg-soft); color: var(--muted); vertical-align: 1px; }
.pill.open { background: #e2f1e5; color: #2c7a45; }
.shop-notice { white-space: pre-line; background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 10px 14px; margin: 14px 0 0; color: var(--muted); font-size: .95rem; }

.plist { display: grid; gap: 12px; padding: 16px 0 40px; }
body.has-cartbar .plist { padding-bottom: 110px; }
.pcard { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.pcard.out { opacity: .55; }
.pimg { flex: none; width: 108px; height: 108px; border-radius: 12px; background: var(--blush); overflow: hidden; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pinfo h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; margin: 2px 0 0; }
.palt { font-size: .82rem; color: var(--muted); }
.pdesc { font-size: .88rem; color: var(--muted); margin: 4px 0 6px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pbottom { margin-top: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price { font-weight: 700; color: var(--accent); font-size: 1.05rem; }
.left { font-size: .8rem; color: var(--accent); }
.soldout { margin-left: auto; font-size: .9rem; font-weight: 600; color: var(--muted); }
.stepper { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--card); color: var(--accent); font: inherit; font-size: 1.3rem; line-height: 1; padding: 0; cursor: pointer; }
.stepper button.add { background: var(--accent); color: var(--accent-ink); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper span { min-width: 20px; text-align: center; font-weight: 700; }

.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(43,30,26,.06); }
.cartbar .wrap { display: flex; align-items: center; gap: 12px; }
.cart-sum { flex: 1; color: var(--muted); }
.cart-sum b { color: var(--accent); font-size: 1.3rem; margin-left: 4px; }

body.sheet-open { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(43,30,26,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-panel { background: var(--bg); width: 100%; max-width: 560px; max-height: 94vh; overflow: auto; border-radius: 22px 22px 0 0;
  padding: 0 18px calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-panel { border-radius: 22px; max-height: 90vh; } }
.sheet-top { position: sticky; top: 0; background: var(--bg); display: flex; align-items: center; gap: 8px; padding: 14px 0 10px; z-index: 2; }
.sheet-top h2 { flex: 1; text-align: center; font-size: 1.2rem; margin: 0; }
.sheet-back, .sheet-close { width: 36px; height: 36px; border: 0; background: var(--bg-soft); border-radius: 50%; font-size: 1.4rem; line-height: 1; color: var(--ink); cursor: pointer; }
.lines { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; }
.lines > div, .o-box .li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.lines > div:last-child, .o-box .li.total { border: 0; font-weight: 700; }
.pickups { border: 0; padding: 0; margin: 16px 0 0; }
.pickups legend, label.f { font-size: .92rem; color: var(--muted); font-weight: 600; padding: 0; }
label.f { display: block; margin: 14px 0 4px; }
.pk { display: flex; gap: 10px; align-items: flex-start; padding: 12px; margin-top: 8px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; }
.pk:has(input:checked) { border-color: var(--accent); background: #fff8f8; }
.pk input { flex: none; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--accent); }
.pk span { display: grid; }
.pk small { color: var(--muted); font-size: .85rem; }
#step-info input:not([type="radio"]), #step-info textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
#step-info input:not([type="radio"]):focus, #step-info textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
.form-msg, .pay-msg { color: var(--accent); font-weight: 600; margin: 12px 0; }
.form-msg:empty, .pay-msg:empty { display: none; }
.btn.block { width: 100%; justify-content: center; }
button.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.fine { font-size: .82rem; color: var(--muted); margin-top: 10px; }
.pay-order { color: var(--muted); font-size: .92rem; background: var(--bg-soft); border-radius: 12px; padding: 10px 12px; }

.paybox { display: grid; gap: 10px; }
.paybox.busy { opacity: .7; }
.pay-amount { font-size: 1.05rem; color: var(--muted); }
.pay-amount b { font-size: 1.6rem; color: var(--ink); margin-left: 6px; }
.wallets { display: grid; gap: 10px; }
.apple-pay-btn { display: block; height: 48px; width: 100%; border-radius: 10px; cursor: pointer;
  -webkit-appearance: -apple-pay-button; -apple-pay-button-type: pay; -apple-pay-button-style: black; }
.apple-pay-btn[hidden], .gpay-btn[hidden] { display: none; }
.gpay-btn { height: 48px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.or[hidden] { display: none; }
.card-box { min-height: 50px; }
.pay-loading, .mock-note { color: var(--muted); font-size: .92rem; margin: 0; }
.mock-note { background: #fff6dc; color: #7a5a00; border-radius: 12px; padding: 10px 12px; }
.pay-hint { background: var(--bg-soft); border-radius: 12px; padding: 10px 12px; font-size: .9rem; margin: 0; }
.pay-safe { font-size: .8rem; color: var(--muted); text-align: center; margin: 0; }

.order-page { padding: 24px 20px 48px; }
.o-top { text-align: center; padding: 16px 0 8px; }
.o-icon { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; background: var(--bg-soft); }
.o-icon.ok { background: #2c7a45; color: #fff; }
.o-top h1 { font-size: clamp(1.5rem, 5vw, 2rem); }
.o-no-label { color: var(--muted); font-size: .85rem; letter-spacing: .1em; }
.o-no { font-family: var(--serif); font-size: 3.4rem; line-height: 1.1; font-weight: 700; color: var(--accent); }
.o-round { color: var(--muted); }
.o-tip { background: var(--blush); border-radius: 12px; padding: 8px 12px; display: inline-block; margin: 12px 0 0; font-size: .92rem; }
.o-box { padding: 16px 18px; margin-top: 14px; }
.o-box h3 { font-family: var(--sans); font-size: .9rem; color: var(--muted); font-weight: 700; margin: 0 0 6px; letter-spacing: .04em; }
.kv { line-height: 1.8; }
.o-actions { justify-content: center; }
