:root {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --panel: #ffffff;
  --blue: #0071e3;
  --blue-dark: #005bb5;
  --soft: #fbfbfd;
  --danger: #b42318;
  --ok: #12805c;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.site-shell { min-height: 100vh; }
.site-shell,
main,
section,
article,
aside,
form,
div {
  min-width: 0;
}
@keyframes softReveal {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes reportLineIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 48px;
  padding: 0 max(22px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(251, 251, 253, .82);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  font-size: 13px;
}
.brand { font-weight: 600; }
.nav { display: flex; gap: 28px; color: #424245; }
.nav a:hover { color: var(--ink); }

.apple-section {
  min-height: 760px;
  padding: 76px 24px 64px;
  text-align: center;
  display: grid;
  justify-items: center;
  align-content: start;
  overflow: hidden;
}
.eyebrow {
  margin: 0 0 8px;
  color: #86868b;
  font-size: 19px;
  font-weight: 600;
}
h1, h2, h3, p { margin-top: 0; }
.hero h1,
.apple-section h2 {
  margin-bottom: 8px;
  max-width: 980px;
  font-size: clamp(48px, 8vw, 92px);
  line-height: .98;
  letter-spacing: -0.02em;
}
.hero h1,
.hero-line,
.hero-actions,
.hero-visual,
.feature-copy,
.product-panel,
.tile,
.report-preview h2,
.report-preview .link-button,
.report-sheet {
  animation: softReveal .8s cubic-bezier(.2, .8, .2, 1) both;
}
.hero-line { animation-delay: .08s; }
.hero-actions { animation-delay: .16s; }
.hero-visual { animation-delay: .24s; }
.feature-copy,
.report-preview h2 { animation-delay: .08s; }
.product-panel,
.report-preview .link-button { animation-delay: .16s; }
.report-sheet { animation-delay: .24s; }
.tile:nth-child(1) { animation-delay: .04s; }
.tile:nth-child(2) { animation-delay: .12s; }
.tile:nth-child(3) { animation-delay: .2s; }
.hero-line,
.apple-section > p:not(.eyebrow) {
  margin-bottom: 18px;
  color: #1d1d1f;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-bottom: 56px;
}
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--blue);
  font-size: 17px;
  padding: 0 16px;
}
.link-button::after {
  content: ">";
  margin-left: 7px;
  font-size: 16px;
}
.link-button.primary {
  color: #fff;
  background: var(--blue);
  padding: 0 22px;
}
.link-button.primary:hover { background: var(--blue-dark); }

.hero-visual {
  width: min(960px, 100%);
  min-height: 390px;
  display: grid;
  place-items: center;
}
.device-shot {
  width: min(780px, 92vw);
  min-height: 420px;
  border-radius: 42px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(245,245,247,.94)),
    radial-gradient(circle at 20% 0%, #eaf4ff, transparent 40%);
  box-shadow: 0 44px 100px rgba(0,0,0,.14), inset 0 0 0 1px rgba(0,0,0,.06);
}
.device-head {
  height: 28px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding-left: 8px;
}
.device-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c7c7cc;
}
.chat-preview {
  height: 342px;
  border-radius: 28px;
  background: #fff;
  padding: 42px;
  display: grid;
  align-content: center;
  gap: 18px;
}
.bubble {
  max-width: 70%;
  padding: 16px 18px;
  border-radius: 22px;
  font-size: 18px;
  line-height: 1.45;
  text-align: left;
}
.chat-preview .bubble {
  opacity: 0;
  animation: bubbleIn .55s cubic-bezier(.2, .8, .2, 1) forwards;
}
.chat-preview .bubble:nth-child(1) { animation-delay: .38s; }
.chat-preview .bubble:nth-child(2) { animation-delay: .82s; }
.chat-preview .bubble:nth-child(3) { animation-delay: 1.26s; }
.bubble.ai { background: #f5f5f7; color: #1d1d1f; }
.bubble.user { justify-self: end; background: var(--blue); color: #fff; }

.feature-section {
  min-height: 720px;
  padding: 82px max(24px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: center;
  background: #fff;
}
.feature-copy h2 {
  margin-bottom: 14px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.feature-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 24px;
  font-weight: 600;
}
.product-panel {
  min-height: 520px;
  border-radius: 44px;
  background: linear-gradient(180deg, #f5f5f7, #fff);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
}
.conversation-card {
  width: min(460px, 88%);
  border-radius: 32px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0,0,0,.1);
}
.small-label {
  margin-bottom: 20px;
  color: #86868b;
  font-size: 12px;
  font-weight: 700;
}
.line-card {
  height: 58px;
  margin-top: 12px;
  padding: 0 18px;
  border-radius: 18px;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
}
.line-card.active {
  color: #fff;
  background: #1d1d1f;
}

.tile-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.tile {
  min-height: 340px;
  border-radius: 28px;
  padding: 46px;
  background: #fff;
  text-align: center;
  display: grid;
  align-content: center;
  justify-items: center;
}
.tile h3 {
  margin-bottom: 10px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.tile p {
  color: var(--muted);
  font-size: 22px;
  font-weight: 600;
}

.report-sheet {
  width: min(760px, 92vw);
  margin-top: 34px;
  padding: 58px;
  border-radius: 36px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(0,0,0,.1);
  text-align: center;
}
.report-sheet h3 {
  font-size: 36px;
  letter-spacing: -0.02em;
}
.report-sheet p {
  color: var(--muted);
  font-size: 20px;
}
.report-lines {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}
.report-lines p {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 0;
  color: #1d1d1f;
  font-size: 21px;
  line-height: 1.45;
  opacity: 0;
  animation: reportLineIn .55s cubic-bezier(.2, .8, .2, 1) forwards;
}
.report-lines p:nth-child(1) { animation-delay: .38s; }
.report-lines p:nth-child(2) { animation-delay: .58s; }
.report-lines p:nth-child(3) { animation-delay: .78s; }
.report-lines span {
  color: #86868b;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

.chat-stage {
  height: calc(100vh - 48px);
  min-height: 640px;
  padding: 20px max(20px, calc((100vw - 1180px) / 2)) 24px;
  overflow: hidden;
}
.stage-head {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}
.text-back {
  border: 0;
  background: transparent;
  color: var(--blue);
}
.chat-layout {
  height: calc(100% - 54px);
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 24px;
  align-items: stretch;
}
.chat-side {
  position: sticky;
  top: 68px;
  align-self: start;
  max-height: calc(100vh - 96px);
  padding: 34px 0;
  overflow: auto;
}
.chat-side h2 {
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.chat-side p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}
.history-panel {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #e8e8ed;
}
.history-panel h3 {
  margin-bottom: 12px;
  font-size: 18px;
}
.history-list {
  display: grid;
  gap: 10px;
}
.history-item {
  width: 100%;
  border: 1px solid #e8e8ed;
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
  text-align: left;
}
.history-item:hover {
  border-color: #0071e3;
}
.history-item strong,
.history-item span {
  display: block;
}
.history-item strong {
  color: var(--ink);
  font-size: 14px;
}
.history-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.chat-card {
  min-height: 0;
  height: 100%;
  border-radius: 34px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 28px 80px rgba(0,0,0,.08);
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}
.messages {
  min-height: 0;
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
}
.msg {
  max-width: 74%;
  padding: 14px 18px;
  border-radius: 22px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.msg *,
.markdown-report *,
.follow-card-body *,
.transcript *,
.customer-detail * {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.msg p,
.markdown-report p { margin: 0 0 12px; }
.msg p:last-child,
.markdown-report p:last-child { margin-bottom: 0; }
.msg ul,
.msg ol,
.markdown-report ul,
.markdown-report ol {
  margin: 10px 0;
  padding-left: 22px;
}
.msg li,
.markdown-report li { margin: 5px 0; }
.msg strong,
.markdown-report strong { font-weight: 750; }
.msg code,
.markdown-report code {
  border-radius: 6px;
  padding: 2px 5px;
  background: rgba(0,0,0,.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .92em;
}
.msg pre,
.markdown-report pre {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  padding: 14px;
  background: #1d1d1f;
  color: #f5f5f7;
}
.msg pre code,
.markdown-report pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}
.msg blockquote,
.markdown-report blockquote {
  margin: 12px 0;
  border-left: 4px solid #d2d2d7;
  padding-left: 12px;
  color: #6e6e73;
}
.msg.assistant {
  align-self: flex-start;
  background: #f5f5f7;
}
.msg.user {
  align-self: flex-end;
  color: #fff;
  background: var(--blue);
}
.thinking-message {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #424245;
}
.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #86868b;
  animation: typingPulse 1.05s infinite ease-in-out;
}
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
.streaming-message::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: -2px;
  border-radius: 999px;
  background: rgba(0,113,227,.55);
  animation: cursorBlink .9s infinite;
}
@keyframes typingPulse {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
@keyframes cursorBlink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: .1; }
}
.msg.report-message {
  max-width: 88%;
  padding: 0;
  background: transparent;
}
.report-message-card {
  border: 1px solid rgba(0,113,227,.18);
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 58%, #f4fff8 100%);
  box-shadow: 0 18px 46px rgba(0,0,0,.08);
}
.report-message-label {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
}
.report-message-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.35;
}
.report-message-card p {
  color: var(--muted);
}
.report-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.report-message-actions button,
.report-actions button {
  min-height: 40px;
  border: 1px solid rgba(0,113,227,.18);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--blue);
  background: #eef5ff;
  font-weight: 700;
}
.report-message-actions button:first-child,
.report-actions button:first-child {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}
.composer {
  padding: 18px;
  border-top: 1px solid #e8e8ed;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
}
.composer input,
.clean-form input,
.clean-form textarea,
.skill-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.composer input:focus,
.clean-form input:focus,
.clean-form textarea:focus,
.skill-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,113,227,.12);
}
.composer button,
.clean-form button,
.skill-form button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #fff;
  background: var(--blue);
  font-weight: 600;
}
.composer .report-action {
  color: var(--blue);
  background: #eef5ff;
}
.composer button:disabled,
.clean-form button:disabled,
.skill-form button:disabled,
.link-button:disabled {
  opacity: .48;
  cursor: wait;
}

.final-report {
  padding: 80px max(24px, calc((100vw - 900px) / 2));
  background: #fff;
}
.report-title {
  text-align: center;
  margin-bottom: 44px;
}
.report-title h2 {
  font-size: clamp(42px, 6vw, 72px);
  letter-spacing: -0.02em;
}
.report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}
.markdown-report {
  font-size: 20px;
  line-height: 1.75;
  max-width: 100%;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}
.markdown-report h1 {
  font-size: 48px;
  line-height: 1.08;
}
.markdown-report h2 {
  margin-top: 48px;
  font-size: 30px;
}
.markdown-report ul {
  padding-left: 24px;
}
.md-table-wrap {
  max-width: 100%;
  width: 100%;
  overflow-x: auto;
  margin: 18px 0;
  -webkit-overflow-scrolling: touch;
}
.md-table-wrap table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}
.md-table-wrap th,
.md-table-wrap td {
  border: 1px solid #e8e8ed;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}
.md-table-wrap th {
  background: #f5f5f7;
  font-weight: 750;
}
.msg .md-table-wrap table {
  min-width: 520px;
  font-size: 13px;
}
.markdown-report.compact {
  font-size: 16px;
  line-height: 1.68;
}
.markdown-report.compact h1 {
  font-size: 28px;
}
.markdown-report.compact h2 {
  margin-top: 28px;
  font-size: 21px;
}

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(18px);
}
.modal-card {
  position: relative;
  width: min(480px, 100%);
  border-radius: 30px;
  padding: 38px;
  background: #fff;
  box-shadow: 0 34px 120px rgba(0,0,0,.25);
}
.modal-card h2 {
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.modal-card p {
  color: var(--muted);
  font-size: 17px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #6e6e73;
  background: #f5f5f7;
  font-size: 22px;
}
.clean-form {
  display: grid;
  gap: 12px;
}
.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.code-row button {
  min-width: 116px;
  padding: 0 16px;
  white-space: nowrap;
}
.message {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}
.message.ok { color: var(--ok); }

.admin-login {
  min-height: calc(100vh - 48px);
  padding: 100px 24px;
  display: grid;
  justify-items: center;
  align-content: start;
  text-align: center;
}
.admin-login h1 {
  margin-bottom: 8px;
  font-size: 64px;
}
.admin-login p {
  color: var(--muted);
  font-size: 20px;
}
.admin-login .clean-form {
  width: min(420px, 100%);
  margin-top: 28px;
}

.admin-app {
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: 220px 1fr;
  background: #fff;
  min-width: 0;
  overflow-x: hidden;
}
.admin-nav {
  padding: 28px 18px;
  border-right: 1px solid #e8e8ed;
  display: grid;
  align-content: start;
  gap: 8px;
}
.admin-brand {
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 700;
}
.admin-tab,
.logout {
  height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: transparent;
  text-align: left;
  color: #424245;
}
.admin-tab.active {
  color: var(--ink);
  background: #f5f5f7;
  font-weight: 700;
}
.logout {
  margin-top: 28px;
  color: var(--muted);
}
.admin-content {
  padding: 36px;
  overflow: auto;
  min-width: 0;
}
.admin-pane { display: none; }
.admin-pane.active {
  display: block;
  min-width: 0;
}
.pane-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}
.pane-title h1 {
  margin: 0;
  font-size: 44px;
  letter-spacing: -0.02em;
}
.pane-title span {
  color: var(--muted);
}
.pane-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.customer-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 26px;
  min-width: 0;
}
.customer-list {
  border: 1px solid #e8e8ed;
  border-radius: 24px;
  overflow: hidden;
}
.customer-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e8e8ed;
  padding: 18px;
  background: #fff;
  text-align: left;
}
.customer-row.active,
.customer-row:hover {
  background: #f5f5f7;
}
.customer-row.delivery-active {
  background: #fffaf0;
}
.customer-row.delivery-active.active,
.customer-row.delivery-active:hover {
  background: #fff4db;
}
.customer-row strong {
  display: block;
  margin-bottom: 5px;
}
.customer-row span {
  color: var(--muted);
  font-size: 13px;
}
.customer-row .stage-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
}
.customer-row .stage-line b {
  border-radius: 999px;
  padding: 3px 9px;
  color: #0071e3;
  background: #eaf4ff;
  font-size: 12px;
}
.customer-row .delivery-line b {
  color: #946200;
  background: #fff0c2;
}
.customer-detail {
  min-height: 640px;
  min-width: 0;
}
.empty-state {
  color: var(--muted);
  padding: 32px;
  border: 1px solid #e8e8ed;
  border-radius: 24px;
}
.detail-block {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid #e8e8ed;
  border-radius: 24px;
  min-width: 0;
  overflow: hidden;
}
.detail-block h2 {
  font-size: 24px;
}
.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  margin: 8px 0;
}
.kv span:first-child {
  color: var(--muted);
}
.kv.markdown-kv {
  align-items: start;
}
.kv.markdown-kv strong {
  color: var(--ink);
  text-align: left;
}
.kv.markdown-kv p {
  margin: 0 0 8px;
}
.kv.markdown-kv p:last-child {
  margin-bottom: 0;
}
.follow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 18px;
}
.follow-card {
  min-width: 0;
  border-radius: 18px;
  padding: 18px 20px;
  background: #f5f5f7;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.follow-card h3 {
  margin: 0;
  font-size: 18px;
}
.follow-card-body {
  color: #1d1d1f;
  line-height: 1.65;
  min-width: 0;
}
.follow-card-body p {
  margin: 0 0 10px;
}
.follow-card-body p:last-child {
  margin-bottom: 0;
}
.signal-card {
  grid-template-columns: 120px repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
.metric-row {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
}
.metric-row span {
  color: var(--muted);
  font-size: 13px;
}
.metric-row strong {
  color: var(--ink);
  font-size: 18px;
}
.transcript {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow-x: hidden;
}
.transcript .msg {
  max-width: 86%;
}
.skill-form {
  display: grid;
  gap: 16px;
  max-width: 980px;
}
.skill-form label,
.settings-form label {
  display: grid;
  gap: 8px;
  color: #424245;
  font-weight: 600;
}
.skill-form textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.6;
}
.settings-form {
  max-width: 760px;
}
.settings-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid #e8e8ed;
  border-radius: 22px;
  background: #fff;
}
.settings-card h2 {
  margin: 0 0 4px;
  font-size: 20px;
}
.settings-card textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.6;
}
.field-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.inline-check {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: var(--muted) !important;
  font-weight: 400 !important;
}
.inline-check input {
  width: 16px;
  height: 16px;
}
.inline-check.compact {
  margin-left: auto;
  margin-right: 18px;
  font-size: 14px;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.subtle-button,
.danger-button {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 600;
}
.subtle-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}
.danger-button {
  border: 0;
  color: #fff;
  background: #d92d20;
}
.admin-edit {
  display: grid;
  gap: 12px;
}
.follow-edit {
  grid-template-columns: minmax(150px, 190px) minmax(150px, 190px) minmax(280px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 20px;
  background: #f5f5f7;
}
.deal-edit {
  grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr);
  align-items: end;
  gap: 12px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 20px;
  background: #f5f5f7;
}
.deal-edit .deal-wide,
.deal-edit .message {
  grid-column: 1 / -1;
}
.deal-edit button {
  grid-column: 1 / -1;
}
.follow-edit .message {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 0;
}
.follow-edit button {
  grid-column: 4;
  grid-row: 1;
}
.admin-edit select,
.admin-edit textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.follow-edit label {
  gap: 7px;
  color: #1d1d1f;
  font-size: 15px;
}
.deal-edit label {
  gap: 7px;
  color: #1d1d1f;
  font-size: 15px;
}
.follow-edit select,
.follow-edit textarea,
.deal-edit select,
.deal-edit textarea {
  min-height: 44px;
  font-size: 15px;
}
.admin-edit select:focus,
.admin-edit textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,113,227,.12);
}
.admin-edit textarea { min-height: 100px; }
.follow-edit textarea {
  min-height: 44px;
  height: 44px;
  resize: vertical;
}
.deal-edit textarea {
  min-height: 84px;
  resize: vertical;
}
.admin-edit button {
  width: fit-content;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #fff;
  background: var(--blue);
  font-weight: 600;
}
.follow-edit button {
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
}
.skill-form textarea[name="skillPrompt"],
.skill-form textarea[name="reportPrompt"] {
  min-height: 340px;
}
.product-form {
  display: grid;
  gap: 16px;
}
.product-list {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.product-nav {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e8e8ed;
  border-radius: 18px;
  background: #fff;
}
.product-nav-item {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 13px;
  background: #f5f7fb;
  color: #424245;
  text-align: left;
  cursor: pointer;
}
.product-nav-item span {
  color: var(--ink);
  font-weight: 700;
}
.product-nav-item small {
  color: #747480;
  font-size: 12px;
}
.product-nav-item.active {
  border-color: rgba(0,113,227,.38);
  background: #eef5ff;
  box-shadow: 0 8px 22px rgba(0,113,227,.08);
}
.product-current-label {
  margin: 0 0 4px;
  color: #747480;
  font-size: 13px;
  font-weight: 600;
}
.product-card {
  border: 1px solid #e8e8ed;
  border-radius: 24px;
  padding: 20px;
  background: #fff;
}
.product-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.product-card-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
}
.product-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.product-section {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid #e8e8ed;
}
.product-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}
.product-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}
.product-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.product-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.product-fields label {
  display: grid;
  gap: 8px;
  color: #424245;
  font-weight: 600;
}
.product-fields input,
.product-fields textarea,
.product-image-row input,
.product-image-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.product-fields textarea {
  min-height: 94px;
  resize: vertical;
  line-height: 1.55;
}
.product-images {
  display: grid;
  gap: 12px;
}
.product-image-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border-radius: 18px;
  background: #f5f5f7;
}
.product-image-row label {
  display: grid;
  gap: 8px;
  color: #424245;
  font-weight: 600;
}
.product-image-row .product-wide {
  grid-column: 1 / -1;
}
.product-image-row .delete-product-image {
  align-self: end;
}
.product-wide {
  grid-column: 1 / -1;
}
.product-markdown {
  display: grid;
  gap: 8px;
  color: #424245;
  font-weight: 600;
}
.product-markdown textarea {
  width: 100%;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fbfbfd;
  color: var(--ink);
  line-height: 1.65;
  resize: vertical;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}
.product-fields input:focus,
.product-fields textarea:focus,
.product-image-row input:focus,
.product-image-row select:focus,
.product-markdown textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,113,227,.12);
}
.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.upload-row .subtle-button {
  min-height: 42px;
  white-space: nowrap;
}
.product-poster-preview {
  border: 1px solid #e8e8ed;
  border-radius: 18px;
  padding: 12px;
  background: #fbfbfd;
}
.product-poster-preview img {
  display: block;
  max-width: min(320px, 100%);
  max-height: 240px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}
.product-form > button {
  width: fit-content;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #fff;
  background: var(--blue);
  font-weight: 600;
}
.question-pool {
  display: grid;
  gap: 16px;
}
.question-card {
  border: 1px solid #e8e8ed;
  border-radius: 22px;
  padding: 20px;
  background: #fff;
}
.question-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.question-head h2 {
  margin: 8px 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.35;
}
.question-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.question-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: #0071e3;
  background: #eaf4ff;
  font-size: 12px;
  font-weight: 700;
}
.question-ai-answer {
  margin-bottom: 16px;
  border-radius: 16px;
  padding: 12px 14px;
  background: #f5f5f7;
}
.question-ai-answer summary {
  cursor: pointer;
  color: #424245;
  font-weight: 700;
}
.question-ai-answer div {
  margin-top: 12px;
  color: #424245;
  line-height: 1.65;
}
.question-edit {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.question-edit label {
  display: grid;
  gap: 8px;
  color: #424245;
  font-weight: 650;
}
.question-edit select,
.question-edit textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.question-edit textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.55;
}
.question-wide,
.question-edit .message,
.question-actions {
  grid-column: 1 / -1;
}
.question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pane-actions select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-card {
  border-radius: 18px;
  padding: 18px;
  background: #f5f5f7;
}
.profile-card h3 {
  margin-bottom: 14px;
  font-size: 18px;
}
.profile-row {
  display: grid;
  grid-template-columns: minmax(86px, 120px) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(0,0,0,.06);
  line-height: 1.45;
}
.profile-row:first-of-type {
  border-top: 0;
}
.profile-row span {
  color: var(--muted);
  font-size: 13px;
  word-break: keep-all;
}
.profile-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  min-width: 0;
  overflow-wrap: anywhere;
}
.muted-line {
  color: var(--muted);
}
.profile-extra {
  margin-top: 12px;
  border-radius: 18px;
  padding: 14px 18px;
  background: #f5f5f7;
}
.profile-extra summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 700;
}
.json-view {
  overflow: auto;
  border-radius: 18px;
  padding: 18px;
  background: #f5f5f7;
  color: #424245;
  font-size: 14px;
  line-height: 1.55;
}
.md-image {
  display: block;
  width: min(180px, 100%);
  max-height: 220px;
  object-fit: contain;
  margin: 14px 0 4px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  cursor: zoom-in;
}
.image-preview {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 48px 20px 28px;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(12px);
}
.image-preview[hidden] {
  display: none;
}
.image-preview img {
  max-width: min(100%, 960px);
  max-height: 86vh;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 100px rgba(0,0,0,.42);
}
.image-preview-close {
  position: fixed;
  top: 18px;
  right: 18px;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #1d1d1f;
  background: #fff;
  font-weight: 700;
}

@media (max-width: 900px) {
  .topbar { padding: 0 16px; }
  .nav { gap: 14px; }
  .apple-section { min-height: 660px; padding-top: 56px; }
  .feature-section,
  .chat-layout,
  .admin-app,
  .customer-layout,
  .follow-grid {
    grid-template-columns: 1fr;
  }
  .chat-stage {
    height: auto;
    min-height: calc(100vh - 48px);
    overflow: visible;
  }
  .chat-layout {
    height: auto;
  }
  .chat-side {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .chat-card {
    height: 70vh;
    min-height: 540px;
  }
  .follow-card,
  .signal-card,
  .follow-edit,
  .deal-edit {
    grid-template-columns: 1fr;
  }
  .follow-edit button {
    grid-column: auto;
    grid-row: auto;
  }
  .deal-edit button,
  .deal-edit .deal-wide,
  .deal-edit .message {
    grid-column: auto;
  }
  .follow-edit .message {
    grid-row: auto;
  }
  .feature-section { padding: 64px 18px; }
  .tile-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .product-list { grid-template-columns: 1fr; }
  .product-nav { position: static; }
  .product-fields { grid-template-columns: 1fr; }
  .product-image-row { grid-template-columns: 1fr; }
  .upload-row { grid-template-columns: 1fr; }
  .question-head { display: grid; }
  .question-edit { grid-template-columns: 1fr; }
  .tile { min-height: 260px; }
  .chat-side { padding-bottom: 0; }
  .composer {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
  }
  .composer button {
    width: auto;
    padding: 0 14px;
    font-size: 14px;
  }
  .admin-nav {
    border-right: 0;
    border-bottom: 1px solid #e8e8ed;
    grid-template-columns: repeat(4, auto);
    align-items: center;
  }
  .admin-brand { margin-bottom: 0; }
  .logout { margin-top: 0; }
  .admin-content { padding: 22px; }
}

@media (max-width: 600px) {
  .topbar {
    height: auto;
    min-height: 48px;
    padding: 10px 14px;
    gap: 12px;
  }
  .nav {
    gap: 10px;
    font-size: 12px;
    overflow-x: auto;
    white-space: nowrap;
  }
  .apple-section {
    min-height: auto;
    padding: 48px 16px 42px;
  }
  .hero h1,
  .apple-section h2 {
    font-size: 46px;
  }
  .hero-line,
  .apple-section > p:not(.eyebrow) {
    font-size: 23px;
  }
  .hero-actions {
    flex-wrap: wrap;
    margin-bottom: 34px;
  }
  .hero-visual {
    min-height: auto;
  }
  .device-shot {
    min-height: auto;
    border-radius: 28px;
    padding: 12px;
  }
  .chat-preview {
    height: auto;
    min-height: 260px;
    padding: 22px;
  }
  .bubble {
    max-width: 86%;
    font-size: 15px;
  }
  .product-panel {
    min-height: 360px;
    border-radius: 28px;
  }
  .tile {
    min-height: 220px;
    padding: 32px 22px;
  }
  .report-sheet {
    padding: 32px 22px;
    border-radius: 26px;
  }
  .report-lines p {
    font-size: 17px;
  }
  .chat-stage {
    padding: 14px 12px 36px;
  }
  .stage-head {
    height: 44px;
  }
  .chat-side h2 {
    font-size: 34px;
  }
  .chat-card {
    min-height: 560px;
    border-radius: 24px;
  }
  .messages {
    padding: 18px;
  }
  .msg {
    max-width: 90%;
    padding: 12px 14px;
    font-size: 15px;
  }
  .msg.report-message {
    max-width: 100%;
  }
  .report-message-card {
    border-radius: 20px;
    padding: 16px;
  }
  .report-message-actions,
  .report-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .report-message-actions button,
  .report-actions button {
    width: 100%;
  }
  .composer {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .composer input,
  .composer button {
    width: 100%;
  }
  .lead-modal {
    padding: 12px;
  }
  .modal-card {
    border-radius: 24px;
    padding: 28px 20px;
  }
  .modal-card h2 {
    font-size: 28px;
  }
  .code-row {
    grid-template-columns: 1fr;
  }
  .admin-login {
    padding: 64px 18px;
  }
  .admin-login h1 {
    font-size: 48px;
  }
  .admin-app {
    display: block;
  }
  .admin-nav {
    position: sticky;
    top: 48px;
    z-index: 8;
    padding: 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(18px);
  }
  .admin-brand {
    flex: 0 0 auto;
  }
  .admin-tab,
  .logout {
    flex: 0 0 auto;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
  }
  .admin-content {
    width: 100%;
    max-width: 100vw;
    padding: 14px;
    overflow-x: hidden;
  }
  .pane-title {
    align-items: start;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .pane-title h1 {
    width: 100%;
    font-size: 34px;
  }
  .pane-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .inline-check.compact {
    margin-left: 0;
    margin-right: 0;
  }
  .customer-layout {
    gap: 14px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .customer-list,
  .detail-block,
  .empty-state {
    border-radius: 18px;
  }
  .customer-row {
    padding: 14px;
  }
  .customer-detail {
    min-height: auto;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .detail-block {
    padding: 16px;
    overflow-x: hidden;
  }
  .detail-block h2 {
    font-size: 22px;
  }
  .kv {
    grid-template-columns: 88px minmax(0, 1fr);
    font-size: 14px;
  }
  .profile-row {
    grid-template-columns: 82px minmax(0, 1fr);
  }
  .follow-edit {
    padding: 12px;
    border-radius: 16px;
  }
  .follow-edit textarea {
    height: 72px;
  }
  .follow-card {
    padding: 14px;
    gap: 12px;
    overflow-x: hidden;
  }
  .metric-row strong {
    font-size: 16px;
  }
  .markdown-report {
    padding: 20px;
    border-radius: 20px;
    font-size: 15px;
    overflow-x: hidden;
  }
  .report-title {
    display: block;
    margin-bottom: 24px;
  }
  .report-actions {
    margin-top: 16px;
    padding-bottom: 0;
  }
  .markdown-report h1 {
    font-size: 28px;
  }
  .markdown-report h2 {
    font-size: 22px;
  }
  .md-table-wrap {
    margin-left: -2px;
    margin-right: -2px;
  }
  .md-table-wrap table,
  .msg .md-table-wrap table {
    min-width: 420px;
    font-size: 12px;
  }
  .md-table-wrap th,
  .md-table-wrap td {
    padding: 9px 10px;
  }
  .msg pre,
  .markdown-report pre {
    font-size: 12px;
  }
  .transcript .msg {
    max-width: 100%;
  }
  .follow-card-body,
  .metric-row,
  .profile-card,
  .profile-extra {
    min-width: 0;
    max-width: 100%;
  }
  .skill-form textarea[name="skillPrompt"],
  .skill-form textarea[name="reportPrompt"] {
    min-height: 260px;
  }
}
