:root {
  --orange: #eb6100;
  --ink: #1a1a1a;
  --muted: #666;
  --bg: #f6f4f1;
  --card: #fff;
  --line: #e6e2dc;
  --ok: #1b7f4e;
  --danger: #b42318;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100%;
}
body { padding-bottom: 72px; }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #383838;
  color: #fff;
  padding: 14px 16px 12px;
}
.brand {
  font-size: 12px;
  letter-spacing: 0.12em;
  opacity: 0.85;
}
.page-title {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
}

#view { padding: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.card h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.product {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
}
.product img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
}
.product .title { font-weight: 600; font-size: 15px; }
.product .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-size: 18px;
}
.qty span { min-width: 20px; text-align: center; font-weight: 600; }

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 4px;
}
input, select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
}
textarea { min-height: 72px; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.btn:disabled { opacity: 0.5; }
.btn.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.link {
  background: transparent;
  color: var(--orange);
  border: none;
  font-weight: 600;
}

.summary {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
  font-size: 14px;
}
.summary.total {
  font-size: 18px;
  font-weight: 700;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0ebe4;
  font-size: 12px;
  color: var(--muted);
}
.pill.ok { background: #e5f6ee; color: var(--ok); }
.pill.warn { background: #fff4e5; color: #9a6700; }

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.tabs button {
  border: none;
  background: transparent;
  padding: 10px 4px;
  font-size: 13px;
  color: var(--muted);
}
.tabs button.active {
  color: var(--orange);
  font-weight: 700;
}

.muted { color: var(--muted); font-size: 13px; line-height: 1.5; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 50;
  max-width: 90%;
}
.toast.hidden { display: none; }

.pay-options {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.pay-options label.option {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 15px;
}
.pay-options input { width: auto; }
