:root, [data-scheme="house"] {
  --bg: #fff;
  --ink: #1e3932;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --accent: #00754a;
  --on: #fff;
  --card: #fff;
  --fill: #f6f6f6;
}
[data-scheme="black"] {
  --bg: #fff;
  --ink: #000;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --accent: #000;
  --on: #fff;
  --card: #fff;
  --fill: #f6f6f6;
}
[data-scheme="dark"] {
  --bg: #1e3932;
  --ink: #fff;
  --muted: #c6d1cc;
  --line: rgba(255,255,255,.16);
  --accent: #00a862;
  --on: #fff;
  --card: #16302a;
  --fill: #142822;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand img { display: block; border-radius: 50%; }
.brand img.ring { animation: ring .6s ease; }
@keyframes ring {
  0% { transform: rotate(0); }
  20% { transform: rotate(18deg); }
  40% { transform: rotate(-16deg); }
  60% { transform: rotate(10deg); }
  100% { transform: rotate(0); }
}
h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 22px; background: transparent; padding: 0;
  background-image: linear-gradient(var(--ink), var(--ink));
  -webkit-mask: url(/assets/menu.svg) center / 22px 22px no-repeat;
  mask: url(/assets/menu.svg) center / 22px 22px no-repeat;
}
.icon-btn[hidden] { display: none; }
.drawer {
  position: absolute; top: 64px; right: 12px; z-index: 30;
  width: min(280px, calc(100vw - 24px));
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.drawer[hidden] { display: none !important; }
.add input, #shop, #shop-name, .line input {
  width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 12px;
  padding: 12px; min-height: 44px;
}
main { max-width: 520px; margin: 0 auto; padding: 16px; }
.panel, .add { display: flex; flex-direction: column; gap: 8px; }
.tabs {
  position: sticky; top: 69px; z-index: 15;
  display: flex; gap: 8px; margin-bottom: 16px;
  background: var(--bg); padding: 8px 0;
}
.tab, .scheme, .line button, .add button, .btn.ghost, .queue-row button {
  min-height: 44px; border-radius: 22px; border: 1px solid var(--line);
  background: var(--card); padding: 10px 14px; font-weight: 700;
}
.tabs .tab { flex: 1; text-align: center; }
.tab.on, .scheme.on, .chip.on {
  background: var(--accent); color: var(--on); border-color: var(--accent);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip, .tab, .btn { scroll-margin: 80px; }
.chip {
  min-height: 44px; min-width: 44px; flex: 1 1 46%;
  border-radius: 22px; border: 1px solid var(--line);
  background: var(--card); padding: 10px 14px; font-weight: 700; text-align: center;
}
.btn {
  min-height: 48px; border: 0; border-radius: 24px; padding: 12px 16px;
  background: var(--accent); color: var(--on); font-weight: 700;
}
.bellbar {
  background: var(--bg);
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
}
.preview { min-height: 20px; margin-bottom: 8px; font-weight: 700; }
.btn.bell { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 18px; }
.btn.bell img { display: block; width: 22px; height: 22px; }
.line { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.line span { flex: 1; font-weight: 700; }
.line button, .add button { flex: 0 0 auto; }
.schemes { display: flex; gap: 8px; }
.scheme { flex: 1; }
.block {
  border: 2px solid var(--ink);
  border-radius: 16px;
  margin: 0 0 14px;
  overflow: hidden;
  background: var(--card);
}
.block h2 {
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--fill);
  border-bottom: 2px solid var(--ink);
}
.block-body { padding: 12px 14px 14px; }
.cat + .cat { margin-top: 14px; padding-top: 14px; border-top: 2px solid var(--line); }
.cat-name {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.picks { display: flex; flex-direction: column; gap: 8px; }
.pick {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; min-height: 48px; text-align: left;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); padding: 10px 14px; font-weight: 700;
}
.pick em {
  font-style: normal; font-weight: 700; font-size: 12px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.pick.on { background: var(--accent); color: var(--on); border-color: var(--accent); }
.pick.on em { color: var(--on); }
.sublabel { margin: 12px 0 8px; font-size: 13px; font-weight: 700; }
.sublabel:first-child { margin-top: 0; }
.block .line input, .block #shop-name, .block #webhook { width: auto; flex: 1; min-width: 0; }
.block #shop-name, .block #webhook { width: 100%; }
.hook-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.hook-actions .btn { flex: 1; }
.status { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
pre.sent {
  margin: 10px 0 0; padding: 10px; background: var(--fill); border-radius: 12px;
  overflow: auto; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}
.queue-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.queue-row:first-child { border-top: 0; padding-top: 0; }
.queue-main { flex: 1; min-width: 0; }
.queue-main b { display: block; }
.queue-main span { color: var(--muted); font-size: 13px; }
.empty { margin: 0; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); border-radius: 20px;
  padding: 10px 14px; font-weight: 700; opacity: 0; pointer-events: none;
}
.toast.show { opacity: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
