:root {
  color: #241c18;
  background: #f3eee8;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { overflow: hidden; }
#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.dock {
  position: fixed;
  z-index: 2;
  right: 16px;
  bottom: 16px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 252, 248, 0.92);
  border: 1px solid rgba(58, 42, 36, 0.08);
  box-shadow: 0 18px 50px rgba(48, 28, 18, 0.16);
  backdrop-filter: blur(10px);
}
.who { display: flex; align-items: center; justify-content: space-between; }
.open-search { position:fixed;top:max(14px,env(safe-area-inset-top));right:max(14px,env(safe-area-inset-right));z-index:4;display:grid;place-items:center;width:42px;height:42px;border:1px solid #ee4d2d;border-radius:50%;background:#ee4d2d;color:#fff;padding:9px;cursor:pointer;box-shadow:0 4px 14px #241c1840; }
.open-search svg {display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.open-search:focus-visible {outline:2px solid #241c18;outline-offset:2px}
.open-search[hidden] { display: none; }
.who strong { display: block; font-size: 18px; }
.who span, .note { color: #74685f; font-size: 12px; }
.note { margin: 0; }
.log {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  max-height: 46vh;
  padding-right: 2px;
}
.bubble {
  align-self: flex-start;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 16px 16px 16px 6px;
  background: #fff;
  border: 1px solid #efe7e0;
  white-space: pre-wrap;
  line-height: 1.55;
}
.bubble.me {
  align-self: flex-end;
  background: #3a312c;
  color: #fff;
  border-color: #3a312c;
  border-radius: 16px 16px 6px 16px;
}
.cards { display: grid; gap: 8px; }
.card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #efe7e0;
}
.card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: #f3eee8;
}
.card h3 { margin: 0; font-size: 13px; line-height: 1.35; }
.meta { margin: 4px 0; color: #6d625b; font-size: 12px; }
.price { color: #ee4d2d; font-weight: 800; }
.tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.tag.hot { background: #e7f6ec; color: #0d7a3a; }
.tag.wait { background: #fff1e8; color: #c2410c; }
.tag.neutral { background: #f3eee8; color: #6d625b; }
.buy {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ee4d2d;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.composer { display: flex; gap: 8px; }
.composer input, .composer button {
  font: inherit;
  border-radius: 12px;
  border: 1px solid #e4dbd3;
  padding: 11px 12px;
}
.composer input { flex: 1; min-width: 0; background: #fff; }
.composer button {
  background: #3a312c;
  color: #fff;
  border-color: #3a312c;
  font-weight: 700;
  cursor: pointer;
}
.composer button:disabled, .composer input:disabled { opacity: 0.6; }
@media (max-width: 720px) {
  .dock { left: 12px; right: 12px; width: auto; bottom: 12px; max-height: 58vh; }
  #stage { top: 0; right: 0; bottom: auto; left: 0; height: 42vh; }
}

.sound-toggle { border: 1px solid #e4dbd3; border-radius: 999px; background: #fff5db; color: #594321; padding: 7px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.sound-toggle:focus-visible { outline: 2px solid #ee4d2d; outline-offset: 3px; }

.coupon { display:flex; align-items:center; gap:8px; margin:8px 0 4px; font-size:12px; }
.coupon select { font:inherit; padding:6px; border:1px solid #e4dbd3; border-radius:8px; background:#fff5db; }
.after-coupon { color:#0d7a3a; font-weight:800; font-size:15px; }
.coupon-note { font-size:10px; color:#74685f; margin:4px 0; }

.more-products { flex-shrink:0; border:1px solid #e4dbd3; border-radius:14px; background:#fff5db; color:#594321; padding:11px; font:inherit; font-weight:700; cursor:pointer; }
.more-products:disabled { opacity:.6; }

.suggestions { display:flex; flex-wrap:wrap; gap:8px; flex-shrink:0; padding:3px 0; }
.suggestion { border:1px solid #efcf82; background:#fff4d5; color:#624817; border-radius:999px; padding:9px 12px; font:inherit; font-size:13px; cursor:pointer; }
.suggestion:hover { background:#ffe8a6; }
.suggestion:focus-visible { outline:2px solid #ee4d2d; outline-offset:2px; }

.search-prompt { font-size: 15px; font-weight: 750; line-height: 1.5; color: #c2410c; }
.composer button { flex-shrink: 0; white-space: nowrap; font-size: 14px; }
.composer input { min-width: 0; }

.section-title {margin:0;font-size:18px;line-height:1.4;color:#176b39;}
.product-page {color:inherit;text-decoration:none;}
.share, .home {font:inherit;font-size:12px;cursor:pointer;border:1px solid #e4dbd3;border-radius:10px;background:#fff;padding:6px 9px;color:#594321;}
.share {margin-top:7px;display:block;}
.external {display:block;}
.external h3{font-size:15px;line-height:1.45;margin:0 0 6px}.external .thumb{display:block;margin-bottom:9px}.external-price{font-size:13px;line-height:1.55;margin:8px 0;padding:9px 10px;background:#fff8ed;border:1px solid #f5dec1;border-radius:9px}.external .meta{margin:6px 0}
.link-help {font-size:12px;color:#74685f;flex-shrink:0;}
.link-help summary {cursor:pointer;font-weight:650;}
.link-help p {line-height:1.7;margin:6px 0;}
.link-help img {width:100%;max-width:300px;border-radius:12px;}
.dock {max-height:calc(100dvh - 32px);}
.log {flex:1;max-height:none;min-height:120px;}
.card {flex-shrink:0;}
@media(max-width:720px){.dock {max-height:74dvh;}.log {min-height:130px;}.who span {display:none;}#stage {height:28dvh;}.search-prompt{font-size:14px;}.composer input{font-size:16px;}.composer button{font-size:12px;padding:11px 8px;}}

button.link-help {border:0;background:transparent;text-align:left;padding:0;cursor:pointer;font:inherit;font-size:12px;font-weight:650;color:#74685f;}
.help-dialog {width:min(520px,calc(100vw - 24px));max-height:90dvh;border:1px solid #efe7e0;border-radius:20px;padding:0;background:#fffcf8;color:#241c18;overflow:hidden;}
.help-dialog[open] {display:flex;flex-direction:column;}
.help-dialog::backdrop {background:rgba(36,28,24,.55);}
.help-dialog header {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;flex-shrink:0;border-bottom:1px solid #efe7e0;}
.help-dialog h2 {margin:0;font-size:17px;}
.help-dialog header button {font:inherit;font-size:14px;border:1px solid #e4dbd3;background:#fff;border-radius:10px;padding:8px;cursor:pointer;}
.help-scroll {overflow-y:auto;min-height:0;padding:14px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
.help-scroll p {line-height:1.7;margin:0 0 12px;}
.help-scroll img {display:block;width:100%;height:auto;border-radius:12px;}

.product-search-dialog {width:min(760px,calc(100vw - 24px));max-width:none;max-height:min(90dvh,900px);margin:auto;padding:16px;border:0;border-radius:18px;color:#241c18;background:#fffdfa;box-shadow:0 18px 60px #241c1840;overflow-y:auto;}
.product-search-dialog::backdrop {background:#1b1714a8;backdrop-filter:blur(3px);}
.product-search-head {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;}
.product-search-head h2 {margin:0;font-size:19px;}
.product-search-head button,.product-search-actions button,.product-search-pager button {border:1px solid #e4dbd3;border-radius:10px;background:#fff;padding:8px 11px;font:inherit;cursor:pointer;}
.product-search-form {display:grid;gap:10px;}
.product-search-query,.product-search-filters label {display:grid;gap:5px;font-size:12px;color:#64574f;}
.product-search-query input,.product-search-filters input:not([type=checkbox]),.product-search-filters select {width:100%;min-width:0;padding:9px 10px;border:1px solid #e4dbd3;border-radius:9px;background:#fff;color:#241c18;font:inherit;font-size:14px;}
.product-search-filters {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;}
.product-search-check {display:flex!important;align-items:center;gap:7px!important;}
.product-search-actions {display:flex;gap:8px;}
.product-search-actions .search-submit {border-color:#ee4d2d;background:#ee4d2d;color:white;font-weight:700;}
.product-search-status {min-height:22px;margin:9px 0 4px;color:#6d625b;font-size:13px;}
.product-search-results {display:grid;gap:8px;max-height:38dvh;overflow:auto;padding-right:2px;}
.product-search-results .search-result {display:grid;grid-template-columns:60px minmax(0,1fr);gap:9px;padding:9px;border:1px solid #efe7e0;border-radius:12px;background:#fff;}
.product-search-results .search-result img {width:60px;height:60px;object-fit:cover;border-radius:9px;background:#f3eee8;}
.product-search-results h3 {margin:0;font-size:13px;line-height:1.4;}
.product-search-results .search-price {color:#ee4d2d;font-weight:800;}
.product-search-results .search-meta {margin:3px 0;color:#6d625b;font-size:11px;}
.product-search-results .search-buy {display:inline-block;margin-top:3px;padding:5px 9px;border-radius:999px;background:#ee4d2d;color:white;text-decoration:none;font-size:11px;font-weight:700;}
.product-search-pager {display:flex;align-items:center;justify-content:center;gap:12px;margin-top:10px;font-size:12px;}
.product-search-pager button:disabled {opacity:.45;cursor:default;}
@media(max-width:480px){.product-search-dialog{padding:12px}.product-search-filters{grid-template-columns:1fr 1fr;gap:7px}.product-search-results{max-height:33dvh}.product-search-results .search-result{grid-template-columns:48px minmax(0,1fr);padding:7px;gap:7px}.product-search-results .search-result img{width:48px;height:48px}}
