:root {
  color-scheme: light;
  --green: #07c160;
  --green-press: #06ad56;
  --bg: #f2f2f2;
  --card: #fff;
  --text: #191919;
  --muted: #888;
  --line: #ededed;
  --danger: #fa5151;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #e7e7e7;
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
}

.frame {
  width: min(480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.brand {
  color: inherit;
  font-weight: 650;
  text-decoration: none;
}

.pill {
  border-radius: 999px;
  background: #fff4d6;
  color: #8a5a00;
  font-size: 12px;
  padding: 3px 8px;
}

.pill-live {
  background: #e8f8ef;
  color: #06753a;
}

.banner {
  margin: 0;
  padding: 10px 16px;
  background: #fff7e8;
  color: #8a5a00;
  font-size: 13px;
}

.page { padding: 16px 16px 96px; }

h1 { font-size: 22px; margin: 0 0 12px; }

h2 { font-size: 16px; margin: 0 0 10px; }

.eyebrow { margin: 0; color: var(--muted); font-size: 13px; }

.steps { margin: 0 0 16px; padding-left: 18px; }

.steps li { margin: 6px 0; }

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.note code,
.url code,
.card code {
  display: inline-block;
  margin-top: 4px;
  word-break: break-all;
  font-size: 13px;
}

.merchant-list { list-style: none; margin: 0; padding: 0; }

.merchant-list li + li { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }

.merchant-list a {
  display: flex;
  justify-content: space-between;
  color: inherit;
  text-decoration: none;
}

.merchant-list a span { color: var(--muted); }

.url { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.products { list-style: none; margin: 0; padding: 0; }

.product {
  display: flex;
  gap: 12px;
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: hsl(var(--hue), 55%, 90%);
  color: hsl(var(--hue), 40%, 28%);
  flex: none;
}

.product-body { flex: 1; min-width: 0; }

.product-title,
.line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.price { color: #c87d2f; font-weight: 650; }

.product p,
.muted { color: var(--muted); font-size: 13px; }

.product form,
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

label { color: var(--muted); font-size: 13px; }

input[type="number"] {
  width: 64px;
  margin-left: 4px;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font: inherit;
}

button,
.button {
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font: inherit;
  padding: 8px 14px;
  text-decoration: none;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: default; }

.ghost,
button.ghost {
  background: #f3f3f3;
  color: var(--text);
}

.paybar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 -16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
}

.paybar strong { color: #c87d2f; font-size: 20px; }

.paybar button { min-width: 128px; padding: 12px 16px; }

.message:empty { display: none; }

.message { color: var(--danger); min-height: 1.2em; }

.sheet {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
}

.sheet[hidden] { display: none; }

.sheet-card {
  width: min(480px, 100%);
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
}

.sheet-card button { width: 100%; margin-top: 8px; padding: 12px; }

.sheet-amount {
  margin: 8px 0;
  font-size: 36px;
  font-weight: 650;
}

.checkout { padding-bottom: 16px; }
