:root {
  color-scheme: light;
  --blue: #0b4fd6;
  --blue-dark: #073da8;
  --ink: #17243b;
  --muted: #63718a;
  --line: #dce4f0;
  --surface: #ffffff;
  --canvas: #f4f7fc;
  --green: #18794e;
  --red: #b42318;
  --amber: #946200;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); font-size: 16px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.topbar { height: 72px; padding: 0 max(20px, calc((100vw - 1160px)/2)); background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 20px; letter-spacing: -.03em; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--blue); font-size: 20px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.text-toggle, .mute { min-height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer; }
.text-toggle { padding: 8px 12px; font-weight: 600; }
.text-toggle span { color: #9aa7ba; padding: 0 3px; }
.mute { width: 44px; font-size: 18px; }
.view-switch { width: min(100% - 32px, 420px); margin: 22px auto 0; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border: 1px solid var(--line); border-radius: 14px; background: #eaf0f8; }
.view-tab { min-height: 44px; border: 0; border-radius: 10px; color: #52617a; background: transparent; font-weight: 650; cursor: pointer; }
.view-tab.active { color: var(--blue); background: #fff; box-shadow: 0 1px 3px #182b491a; }
main { width: min(100% - 32px, 1160px); margin: 22px auto 56px; }
.hidden { display: none !important; }
.customer-view { max-width: 540px; margin: 0 auto; }
.customer-shell { padding: clamp(22px, 5vw, 40px); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 12px 35px #233c6410; }
.order-kicker, .eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 14px; font-weight: 650; }
.shop-label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.shop-input { display: block; width: 100%; min-height: 48px; padding: 10px 12px; color: var(--ink); font-size: 20px; font-weight: 700; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.progress { display: flex; gap: 7px; margin: 24px 0; }
.progress span { height: 5px; flex: 1; border-radius: 99px; background: #e8edf5; }
.progress span.current, .progress span.done { background: var(--blue); }
.prompt { margin: 0 0 20px; font-size: clamp(20px, 4vw, 25px); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.privacy-note { margin: 14px 8px; color: var(--muted); text-align: center; font-size: 13px; }
.language-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chip-button, .alt-chip { min-height: 44px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; color: #35445e; background: #fff; cursor: pointer; }
.chip-button.selected, .alt-chip:hover { border-color: var(--blue); color: var(--blue); background: #eff5ff; }
.mic-button { display: block; width: 96px; height: 96px; margin: 22px auto 10px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; font-size: 34px; cursor: pointer; box-shadow: 0 8px 20px #0b4fd633; transition: transform .15s ease, background .15s ease; }
.mic-button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.mic-button.listening { background: #c42c3d; }
.mic-hint, .live-label, .subtle { color: var(--muted); text-align: center; font-size: 14px; }
.waveform { display: flex; height: 42px; justify-content: center; align-items: center; gap: 3px; }
.waveform i { width: 3px; height: 12px; border-radius: 3px; background: #618de8; animation: wave .75s ease-in-out infinite alternate; }
.waveform i:nth-child(3n) { animation-delay: -.35s; }.waveform i:nth-child(3n + 1) { animation-delay: -.15s; }
@keyframes wave { to { height: 32px; } }
.transcript { display: block; width: 100%; min-height: 108px; resize: vertical; padding: 12px; border: 1px solid #cbd6e5; border-radius: 12px; color: var(--ink); background: #fff; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.primary, .secondary { min-height: 46px; padding: 10px 16px; border-radius: 11px; font-weight: 650; cursor: pointer; }
.primary { color: #fff; background: var(--blue); border: 1px solid var(--blue); }
.primary:hover { background: var(--blue-dark); }
.secondary { color: #34435c; background: #fff; border: 1px solid var(--line); }
.full { width: 100%; margin-top: 14px; }
.inline-link { padding: 6px; color: var(--blue); border: 0; background: none; text-decoration: underline; cursor: pointer; }
.detected { margin: 8px 0; color: var(--muted); font-size: 14px; }
.notice { margin: 12px 0; padding: 12px 14px; border: 1px solid #cbdcfb; border-radius: 12px; color: #263f70; background: #f2f6ff; }
.notice.error { border-color: #f0c5c1; color: #8e211a; background: #fff5f4; }
.alt-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.stars { display: flex; justify-content: center; gap: 6px; margin: 20px 0 8px; }
.star { width: 50px; height: 50px; padding: 0; border: 1px solid var(--line); border-radius: 12px; color: #aab4c3; background: #fff; font-size: 29px; cursor: pointer; }
.star.selected { color: #e3a008; border-color: #f0cd70; background: #fff9e8; }
.summary { margin: 18px 0; padding: 14px; border-radius: 14px; background: #f7f9fc; }
.summary p { margin: 4px 0 10px; }
.summary strong, .rating { color: #dc9700; letter-spacing: .08em; }
.seller-view { display: grid; gap: 22px; }
.seller-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.seller-heading .eyebrow { margin-bottom: 3px; color: var(--blue); }
h1, h2 { margin: 0; letter-spacing: -.025em; }
h1 { font-size: clamp(25px, 4vw, 32px); line-height: 1.2; }
h2 { font-size: 19px; }
.demo-label, .count-pill { padding: 5px 10px; border-radius: 99px; color: #43536d; background: #e8eef7; font-size: 13px; font-weight: 650; white-space: nowrap; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.stat-card, .seller-section { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat-value { margin: 3px 0; font-size: clamp(22px, 5vw, 30px); line-height: 1.2; font-weight: 750; letter-spacing: -.03em; overflow-wrap: anywhere; }
.stat-detail { color: var(--muted); font-size: 12px; }
.seller-section { padding: 20px; }
.theme-bars { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 8px; }
.theme-row { min-height: 44px; padding: 9px 11px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-radius: 10px; background: #f5f7fb; }
.theme-name { font-weight: 600; }
.theme-counts { display: flex; gap: 9px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.positive { color: var(--green); }.negative { color: var(--red); }.neutral { color: var(--amber); }
.feedback-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 16px 0; }
.filters select { min-width: 0; min-height: 44px; padding: 8px 32px 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: #34435c; background: #fff; }
.review-filter { grid-column: 1 / -1; min-height: 44px; display: flex; align-items: center; gap: 9px; color: #34435c; font-size: 14px; cursor: pointer; }
.review-filter input { width: 20px; height: 20px; accent-color: var(--blue); }
.feedback-list { display: grid; gap: 10px; }
.feedback-card { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.feedback-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.language-badge { padding: 4px 9px; border-radius: 99px; color: #294779; background: #edf3ff; font-size: 12px; font-weight: 650; }
.feedback-text { margin: 12px 0; font-size: 16px; overflow-wrap: anywhere; }
.theme-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-chip, .review-badge { padding: 4px 8px; border-radius: 8px; color: var(--green); background: #eaf6ef; font-size: 12px; font-weight: 600; }
.theme-chip.neg { color: var(--red); background: #fff0ee; }.theme-chip.neu { color: #765600; background: #fff7df; }
.review-badge { color: #7c4a00; background: #fff1d6; }
.empty-state { padding: 28px 14px; border: 1px dashed #bac7d8; border-radius: 12px; color: var(--muted); text-align: center; }
:focus-visible { outline: 3px solid #77a5ff; outline-offset: 2px; }
@media (min-width: 700px) {
  .view-switch { margin-top: 24px; }
  main { margin-top: 28px; }
  .stats-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
  .stat-card { padding: 20px; }
  .filters { display: flex; align-items: center; }
  .filters select { min-width: 160px; }
  .review-filter { margin-left: auto; }
}
@media (max-width: 420px) {
  .topbar { height: 64px; padding: 0 14px; }
  .brand { font-size: 18px; }
  .view-switch { margin-top: 16px; }
  main { width: min(100% - 20px, 1160px); margin-top: 14px; }
  .customer-shell { padding: 20px 16px; border-radius: 17px; }
  .seller-section { padding: 15px; }
  .theme-bars { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
