/* 店單 MenuLink — design tokens (NO WhatsApp brand green (forbidden)) */
:root {
  --coral: #FF7A59;
  --coral-dark: #E85D3A;
  --amber: #FF9F43;
  --teal: #0D9488;
  --teal-dark: #0F766E;
  --ink: #2D3436;
  --muted: #636E72;
  --line: #E8E4DF;
  --bg: #F7F3EE;
  --card: #FFFFFF;
  --soft: #FFF8F3;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Noto Sans CJK HK", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei",
    "Nunito", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.45;
}

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

.shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* —— Public menu —— */
.header {
  background: linear-gradient(135deg, var(--coral), var(--amber));
  color: #fff;
  padding: 20px 20px 24px;
}
.shop-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  font-size: 12px;
  margin-bottom: 10px;
}
.shop-badge .dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: var(--coral-dark);
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.header h1 { font-size: 26px; font-weight: 800; letter-spacing: 0.5px; }
.header p { font-size: 13px; opacity: 0.92; margin-top: 4px; }

.content { flex: 1; padding: 16px 16px 8px; }
.section-label {
  font-size: 12px; font-weight: 700; color: var(--muted);
  letter-spacing: 1px; margin: 4px 0 10px;
}

.item {
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.item-info { flex: 1; min-width: 0; }
.item-name { font-size: 16px; font-weight: 700; }
.item-price { font-size: 14px; color: var(--coral-dark); font-weight: 700; margin-top: 2px; }

.stepper {
  display: flex; align-items: center; gap: 8px;
  background: var(--soft); border-radius: 999px; padding: 4px;
}
.stepper button {
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: #fff; color: var(--ink); font-size: 18px; font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); cursor: pointer;
}
.stepper .qty { width: 20px; text-align: center; font-weight: 700; font-size: 15px; }

.notes {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 14px; margin-top: 6px;
}
.notes label {
  font-size: 12px; font-weight: 700; color: var(--muted);
  display: block; margin-bottom: 6px;
}
.notes input {
  width: 100%; border: none; border-bottom: 1px dashed var(--line);
  background: transparent; font-size: 14px; padding: 8px 0; color: var(--ink);
  outline: none;
}

.summary {
  margin-top: 14px; background: var(--card); border-radius: 16px;
  padding: 14px 16px; border: 1px solid var(--line);
}
.summary-row {
  display: flex; justify-content: space-between;
  font-size: 14px; color: var(--muted); margin-bottom: 6px;
}
.summary-row.total {
  font-size: 18px; font-weight: 800; color: var(--ink);
  margin-top: 8px; margin-bottom: 0; padding-top: 10px;
  border-top: 1px solid var(--line);
}

.cta-wrap { padding: 12px 16px 4px; }
/* Legal: ≥48px between CTA and AdSense (never directly under CTA) */
.ad-gap { height: 48px; flex-shrink: 0; }
.cta {
  display: block; width: 100%; text-align: center;
  background: var(--teal); color: #fff; font-weight: 800; font-size: 16px;
  padding: 16px 20px; border-radius: 16px; border: none;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.28);
  cursor: pointer; text-decoration: none;
}
.cta:hover:not(:disabled) { background: var(--teal-dark); }
.cta:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.cta-hint { text-align: center; font-size: 11px; color: var(--muted); margin-top: 8px; }

.footer-block { padding: 8px 16px 24px; }
.ad-slot {
  height: 50px; max-width: 320px; margin: 0 auto 10px;
  background: #EDEDED; border: 1px dashed #C0C0C0; border-radius: 8px;
  display: grid; place-items: center;
  color: #888; font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
}
.watermark {
  text-align: center; font-size: 12px; color: #8A8A8A; padding: 4px 4px 8px;
}
.watermark strong { color: var(--coral); font-weight: 700; }
.disclaimer {
  font-size: 10px; color: #9A9A9A; line-height: 1.55;
  text-align: center; padding: 0 4px;
}
.footer-links {
  text-align: center; font-size: 11px; color: #A0A0A0;
  margin-top: 10px;
}
.footer-links a { color: var(--muted); }
.site-footer { padding: 16px; text-align: center; }

/* —— Landing / login / owner —— */
.demo-banner {
  background: #FFF3CD; color: #856404;
  font-size: 12px; font-weight: 700; text-align: center;
  padding: 8px 12px; border-bottom: 1px solid #FFE69C;
}
.topbar {
  background: #fff; padding: 12px 16px 14px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.topbar .mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--coral), var(--amber));
  display: grid; place-items: center; flex-shrink: 0; overflow: hidden;
}
.topbar .mark img { width: 28px; height: 28px; }
.topbar h1 { font-size: 17px; font-weight: 800; }
.topbar .sub { font-size: 12px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.topbar .link-btn {
  font-size: 12px; font-weight: 700; color: var(--muted);
  background: none; border: none; cursor: pointer; text-decoration: underline;
}

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px; margin-bottom: 12px;
}
.card h2 {
  font-size: 13px; font-weight: 800; color: var(--muted);
  margin-bottom: 10px; letter-spacing: 0.5px;
}
.field { margin-bottom: 10px; }
.field label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--muted); margin-bottom: 4px;
}
.field input, .field textarea {
  width: 100%; background: var(--soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; font-size: 15px;
  color: var(--ink); font-weight: 600;
}
.item-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 8px;
  padding: 8px; background: var(--soft); border-radius: 12px;
}
.item-row input[type="text"] { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; }
.item-row input[type="number"] {
  width: 72px; font-size: 13px; color: var(--coral-dark); font-weight: 700; text-align: right;
}
.item-row .rm {
  background: none; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 4px;
}
.toggle {
  width: 40px; height: 22px; border-radius: 999px;
  background: #CCC; position: relative; flex-shrink: 0; border: none; cursor: pointer;
}
.toggle.on { background: var(--teal); }
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: left 0.15s;
}
.toggle.on::after { left: auto; right: 2px; }

.btn-row { display: flex; gap: 8px; margin-top: 8px; }
.btn {
  flex: 1; text-align: center; padding: 10px; border-radius: 12px;
  font-size: 13px; font-weight: 700; border: none; cursor: pointer;
}
.btn-ghost { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-coral { background: var(--coral); color: #fff; }

.link-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--soft); border-radius: 12px; padding: 10px 12px;
  border: 1px dashed var(--teal);
}
.link-box code {
  flex: 1; font-size: 12px; color: var(--teal); font-weight: 700; word-break: break-all;
}
.copy {
  background: var(--teal); color: #fff; border: none; border-radius: 8px;
  padding: 6px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer;
}

.terms-box {
  background: var(--soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; margin: 10px 0;
  display: flex; gap: 10px; align-items: flex-start;
}
.terms-box input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--teal); }
.terms-box label { font-size: 13px; font-weight: 600; line-height: 1.4; }

.upgrade {
  background: linear-gradient(135deg, #FFF3E8, #FFE8E0);
  border: 1px solid #FFD0C0; border-radius: 16px; padding: 14px; margin-top: 4px;
}
.upgrade h3 { font-size: 15px; font-weight: 800; color: var(--coral-dark); }
.upgrade p { font-size: 12px; color: var(--muted); margin: 6px 0 10px; line-height: 1.45; }

.msg {
  font-size: 13px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px;
}
.msg.err { background: #FDECEA; color: #C0392B; }
.msg.ok { background: #E8F8F5; color: var(--teal-dark); }

/* Login hero */
.hero {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px 28px 40px;
}
.logo-wrap {
  width: 88px; height: 88px; border-radius: 24px;
  background: linear-gradient(135deg, var(--coral), var(--amber));
  display: grid; place-items: center;
  box-shadow: 0 12px 28px rgba(255, 122, 89, 0.35);
  margin-bottom: 18px;
}
.logo-wrap img { width: 56px; height: 56px; }
.brand { font-size: 32px; font-weight: 800; letter-spacing: 1px; }
.brand span { color: var(--coral); }
.tag { font-size: 13px; color: var(--muted); margin-top: 4px; margin-bottom: 28px; }
.login-card {
  width: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 22px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.login-card h2 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.login-card .hint { font-size: 13px; color: var(--muted); line-height: 1.45; margin-bottom: 18px; }
.fine {
  margin-top: 14px; font-size: 11px; color: #A0A0A0; text-align: center; line-height: 1.5;
}
.legal-doc {
  max-width: 720px; margin: 0 auto; padding: 24px 16px 48px;
  white-space: pre-wrap; font-size: 14px; line-height: 1.65;
}
.legal-doc h1 { font-size: 22px; margin-bottom: 16px; white-space: normal; }

/* Landing */
.landing-hero {
  background: linear-gradient(135deg, var(--coral), var(--amber));
  color: #fff; padding: 40px 24px 48px; text-align: center;
}
.landing-hero h1 { font-size: 36px; font-weight: 800; }
.landing-hero p { opacity: 0.95; margin-top: 8px; }
.landing-body { max-width: 480px; margin: 0 auto; padding: 24px 16px; }
.landing-body .cta { margin: 16px 0; }
