:root {
  --green: #0a7d4f;
  --green-dark: #086139;
  --green-tint: #e2f1ea;
  --green-soft: #eef6f1;
  --bg: #f4f7f5;
  --card: #fff;
  --text: #17231d;
  --muted: #5d6b63;
  --line: #dde5e0;
  --danger: #b3261e;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  padding-bottom: 88px;
}
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.top {
  background: var(--green); color: #fff;
  padding: 12px 16px 4px;
  padding-top: max(12px, env(safe-area-inset-top));
}
.demo-banner { margin: 0; padding: 8px 16px; background: #fff4cc; color: #5c4400; font-size: 13px; text-align: center; }
.demo-banner a { color: inherit; font-weight: 600; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: #fff; flex: 0 0 auto; }
.top h1 { margin: 0; font-size: 20px; }
.sub { margin: 2px 0 6px; font-size: 14px; opacity: .9; }
.stick {
  position: sticky; top: 0; z-index: 5;
  background: var(--green); color: #fff;
  padding: 6px 16px 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
#q {
  width: 100%; padding: 14px 16px; border: 0; border-radius: 12px;
  font-size: 17px; color: var(--text);
}
.status { margin: 6px 2px 0; font-size: 12px; opacity: .85; min-height: 16px; }
.letters { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0 0; scrollbar-width: none; }
.letters::-webkit-scrollbar { display: none; }
.letters button {
  flex: 0 0 auto; min-width: 36px; height: 36px; padding: 0 8px; border: 0; border-radius: 8px;
  background: rgba(255,255,255,.18); color: #fff; font-weight: 700;
}
.letters button:active { background: rgba(255,255,255,.4); }
.letter {
  font-weight: 800; color: var(--green-dark); padding: 10px 4px 2px;
  scroll-margin-top: calc(var(--head, 150px) + 4px);
}
.row.tap { cursor: pointer; content-visibility: auto; contain-intrinsic-size: auto 64px; -webkit-tap-highlight-color: rgba(10,125,79,.15); }
.row.tap:active { background: var(--green-soft); }
.sentinel { height: 1px; }

main { padding: 12px 16px; max-width: 720px; margin: 0 auto; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; display: flex; align-items: center; gap: 12px;
}
.row .info { flex: 1; min-width: 0; }
.row .name { font-weight: 600; overflow-wrap: anywhere; }
.row .price { color: var(--muted); font-size: 14px; }
.row .price.ask { font-style: italic; }
.add {
  background: var(--green); color: #fff; border: 0; border-radius: 10px;
  padding: 10px 16px; font-weight: 600; min-width: 72px;
}
.add.in { background: var(--green-tint); color: var(--green-dark); }
.made { text-align: center; font-size: 12px; margin: 28px 0 8px; }
.made a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.made img { height: 20px; width: auto; display: block; }

.custom {
  width: 100%; margin-top: 10px; padding: 14px; border-radius: 12px;
  border: 2px dashed var(--green); background: transparent; color: var(--green-dark);
  font-weight: 600; overflow-wrap: anywhere;
}
.empty { color: var(--muted); text-align: center; padding: 24px 8px; }

.bar {
  position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 6; display: flex; justify-content: space-between; align-items: center;
  background: var(--green-dark); color: #fff; border: 0; border-radius: 14px;
  padding: 16px 18px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.bar .mid { flex: 1; text-align: center; opacity: .9; font-weight: 600; }

.sheet {
  position: fixed; inset: 0; z-index: 10; background: var(--bg);
  overflow-y: auto; padding: 16px; padding-bottom: 40px;
}
.sheet > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; font-size: 20px; }
.link { background: none; border: 0; color: var(--green-dark); font-weight: 600; padding: 8px; }
.link.danger { color: var(--danger); display: block; margin: 8px auto 0; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-size: 20px; line-height: 1;
}
.stepper input {
  width: 48px; height: 40px; text-align: center; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px;
}
.tag { font-size: 12px; color: var(--muted); }
.note { color: var(--muted); font-size: 13px; margin: 12px auto; }
.total { font-weight: 700; font-size: 17px; margin: 8px auto 12px; }
.field { display: block; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.field input {
  display: block; width: 100%; margin-top: 4px; padding: 12px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--text);
}
.send {
  width: 100%; padding: 16px; font-size: 17px; font-weight: 700; color: #fff;
  background: #1fa855; border: 0; border-radius: 14px;
}

.toast {
  position: fixed; left: 16px; right: 16px; bottom: 96px; z-index: 20;
  background: #222; color: #fff; padding: 12px 14px; border-radius: 10px; text-align: center;
}

/* products and services together */
.kinds { display: flex; gap: 6px; padding: 8px 0 0; }
.kinds button { border: 0; border-radius: 99px; padding: 7px 14px; font-weight: 600; font-size: 14px; background: rgba(255,255,255,.18); color: #fff; }
.kinds button[aria-pressed="true"] { background: #fff; color: var(--green-dark); }
.row .desc { color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 3px; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tag-service { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; background: var(--green-tint);
  color: var(--green-dark); font-size: 11px; font-weight: 700; vertical-align: middle; }
