.chat-header { gap: 8px; }
.chat-header h2 { display: flex; align-items: center; gap: 10px; flex: 1; }
.chat-header h2 > span { display: grid; place-items: center; color: var(--deep); }
#chat-restart, .chat-reset-confirm button {
  min-height: 44px;
  padding: 5px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--deep);
  font-size: 13px;
  font-weight: 600;
}
.chat-reset-confirm { padding: 10px 13px; background: var(--paper); border-radius: 12px; }
.chat-reset-confirm p { margin: 0; font-size: 14px; }
.chat-reset-confirm #chat-reset-ok { color: var(--price); }
.chat-sheet .chat-context, .chat-message:has(.chat-product) {
  padding: 0;
  margin: 8px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
}
.chat-product { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; }
.chat-product-copy { display: grid; min-width: 0; gap: 3px; line-height: 1.4; overflow-wrap: anywhere; }
.chat-product-copy small { color: var(--muted); font-size: 11px; }
.chat-product-copy strong { font-size: 16px; line-height: 1.35; }
.chat-product-copy span { color: var(--muted); font-size: 13px; }
.chat-product-copy b { margin-top: 2px; color: var(--deep); font-size: 14px; font-variant-numeric: tabular-nums; }
.chat-product-photo { position: relative; flex: none; width: 76px; height: 76px; overflow: hidden; border-radius: 7px; }
.chat-product-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.chat-product-photo span {
  position: absolute; right: 3px; bottom: 3px; background: #172b3ecc; color: white;
  font-size: 10px; line-height: 1.5; border-radius: 3px; padding: 0 4px;
}
.chat-message:has(.chat-product) > span { display: block; padding: 8px 12px 0; }
.chat-sheet .chat-log { gap: 12px; padding: 16px 1px; }
.chat-sheet .chat-message { flex-shrink: 0; background: var(--paper); color: var(--ink); }
.chat-sheet .chat-message.visitor { background: var(--deep); color: var(--surface); }
.chat-time { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.visitor .chat-time { color: #d5e4f0; text-align: right; }
.chat-message:has(.chat-product) > .chat-time { padding: 0 12px 8px; }
.chat-image-preview { display: block; max-width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.chat-sheet .chat-form { padding-top: 10px; border-top: 1px solid var(--line); }
.chat-sheet .chat-attachment { margin: 4px 0; overflow-wrap: anywhere; }
.chat-form .attach { height: 44px; width: 44px; }
.chat-form input[type="text"] { font-size: 16px; }
.chat-form button:disabled { background: var(--paper); color: var(--muted); opacity: 1; }
.chat-zoom[open] {
  position: fixed; inset: 0; box-sizing: border-box; width: 100%; height: 100%; max-width: none; max-height: none;
  display: grid; place-items: center; padding: 16px; border: 0; margin: 0; background: rgba(10,28,43,.96);
}
.chat-zoom::backdrop { background: #101e2e; }
.chat-zoom img { max-width: 100%; max-height: 85dvh; object-fit: contain; }
.chat-zoom .icon-button { position: absolute; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
