:root {
  --bg: #f1f5f9;
  --bg2: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --rule: #e2e8f0;
  --accent: #2563eb;
  --accent2: #0ea5e9;
  --accent-grad: linear-gradient(135deg, #2563eb, #0ea5e9);
  --danger: #ef4444;
  --success: #10b981;
  --warn: #f59e0b;
  --font: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === Header === */
.app-header {
  height: 48px;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--rule);
  position: -webkit-sticky;
}

.header-title { font-size: 1rem; font-weight: 700; }

.back-btn {
  position: absolute;
  left: 12px;
  font-size: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 400;
  line-height: 1;
}

.app-main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(60px + var(--safe-bottom));
}

/* === Home page === */
.home-hero {
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
}

.hero-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.hero-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.hero-subtitle { font-size: 0.85rem; color: var(--muted); }

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  margin: 0 1rem;
  background: var(--bg2);
  border-radius: 10px;
  border: 1px solid var(--rule);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.user-name { font-size: 0.85rem; font-weight: 600; flex: 1; }
.logout-link { font-size: 0.78rem; color: var(--muted); text-decoration: none; }

.home-menu { padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; }

.menu-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s;
}

.menu-card:active { transform: scale(0.98); }
.menu-card.disabled { opacity: 0.4; pointer-events: none; }

.menu-icon { font-size: 1.5rem; width: 40px; text-align: center; }
.menu-text { flex: 1; }
.menu-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.15rem; }
.menu-desc { font-size: 0.75rem; color: var(--muted); }
.menu-arrow { font-size: 1.3rem; color: var(--muted); }

.login-prompt {
  text-align: center;
  padding: 1.5rem 1rem;
}

.login-prompt p { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.75rem; }

.login-btn {
  display: inline-block;
  padding: 10px 28px;
  background: var(--accent-grad);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.config-status { padding: 0.5rem 1rem; }
.config-warn { font-size: 0.72rem; color: var(--warn); text-align: center; }

/* === Filter section (query page) === */
.filter-section {
  background: var(--bg2);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
}

.filter-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.4rem;
  margin-top: 0.5rem;
}

.filter-label:first-child { margin-top: 0; }

.hall-pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.hall-pill {
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.78rem;
  border: 1px solid var(--rule);
  background: #f8fafc;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.hall-pill:active { transform: scale(0.95); }
.hall-pill.active {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
}

.area-select, .search-input, .text-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--ink);
  background: #f8fafc;
  outline: none;
  font-family: var(--font);
  -webkit-appearance: none;
}

.area-select { -webkit-appearance: menulist; }
.area-select:focus, .search-input:focus, .text-input:focus { border-color: var(--accent); }

.result-count {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* === Exhibitor list === */
.exhibitor-list { padding: 0 0.5rem; }

.exhibitor-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  transition: all 0.15s;
  position: relative;
}

.exhibitor-card:active { transform: scale(0.99); }
.exhibitor-card.checked {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.03);
}
.exhibitor-card.expanded .exhibitor-desc {
  display: none;
}

.exhibitor-info { flex: 1; min-width: 0; }

.exhibitor-name {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  word-break: break-word;
}

.exhibitor-meta {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}

.meta-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(14, 165, 233, 0.08);
  color: var(--accent2);
  font-weight: 600;
}

.meta-badge.booth { background: rgba(37, 99, 235, 0.08); color: var(--accent); }
.meta-badge.theme { background: rgba(245, 158, 11, 0.08); color: var(--warn); }

.exhibitor-desc {
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.exhibitor-actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.action-link {
  font-size: 0.7rem;
  color: var(--accent);
  text-decoration: none;
  padding: 3px 8px;
  border: 1px solid var(--accent);
  border-radius: 4px;
}

/* === Bottom bar === */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg2);
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 100;
  padding-bottom: var(--safe-bottom);
}

.selected-count { font-size: 0.82rem; color: var(--muted); }
.selected-count strong { color: var(--accent); font-size: 1rem; }

.send-btn {
  padding: 8px 18px;
  background: var(--accent-grad);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity 0.15s;
}

.send-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.send-btn:active:not(:disabled) { transform: scale(0.97); }

/* === Exhibitor link section (record page) === */
.exhibitor-link-section {
  margin-bottom: 1rem;
}
.link-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.text-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: var(--font);
  background: var(--bg-tint);
  color: var(--ink);
  margin-bottom: 0.5rem;
}

/* === Voice bottom bar === */
.voice-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}
.voice-bottom .new-record-btn {
  flex: 1;
  margin: 0 0.25rem;
}
.voice-bottom .send-btn {
  flex: 1;
  margin: 0 0.25rem;
}

/* === History records === */
.history-section {
  margin-top: 1rem;
}
.history-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.5rem;
}
.history-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}
.hist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.hist-time {
  font-size: 0.75rem;
  color: var(--muted);
}
.hist-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}
.hist-section {
  margin-top: 0.4rem;
}
.hist-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.hist-expand {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 400;
  margin-left: 0.3rem;
}
.hist-content {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  padding: 0.4rem 0.5rem;
  background: var(--bg);
  border-radius: 6px;
  margin-top: 0.3rem;
  white-space: pre-wrap;
  word-break: break-all;
}

/* === Record page === */
.exhibitor-link-section {
  background: var(--bg2);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--rule);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.voice-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 1rem;
  min-height: 300px;
}

.mic-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: var(--accent-grad);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
  transition: transform 0.15s;
  position: relative;
}

.mic-btn:active { transform: scale(1.05); }

.mic-btn.recording {
  background: var(--danger);
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  animation: pulse-rec 1.5s infinite;
}

@keyframes pulse-rec {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.mic-hint { font-size: 0.8rem; color: var(--muted); text-align: center; }

.rec-timer {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.rec-wave {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 30px;
}

.rec-wave span {
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
  animation: wave 0.8s infinite ease-in-out;
}

.rec-wave span:nth-child(1) { height: 12px; animation-delay: 0s; }
.rec-wave span:nth-child(2) { height: 24px; animation-delay: 0.1s; }
.rec-wave span:nth-child(3) { height: 18px; animation-delay: 0.2s; }
.rec-wave span:nth-child(4) { height: 28px; animation-delay: 0.3s; }
.rec-wave span:nth-child(5) { height: 16px; animation-delay: 0.4s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.voice-result {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.result-section {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.65rem;
  background: var(--bg2);
}

.result-section.ai-section {
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.02);
}

.result-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.result-label.orig { color: var(--muted); }

.result-text {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.voice-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg2);
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 100;
  padding-bottom: var(--safe-bottom);
}

.cloud-badge {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.cloud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rule);
}

.cloud-badge.saved { color: var(--success); }
.cloud-badge.saved .cloud-dot { background: var(--success); }

/* === Loading === */
.loading-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 0.85rem;
  z-index: 200;
  text-align: center;
  display: none;
}

.loading-toast.show { display: block; }
.loading-toast .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 0.5rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === Toast === */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--ink);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  z-index: 300;
  transition: transform 0.3s;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* === Admin page === */
.admin-main { padding: 0.75rem; }

.admin-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  padding-left: 0.25rem;
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--rule);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  min-width: 600px;
}

.admin-table th {
  text-align: left;
  padding: 0.5rem;
  background: rgba(37, 99, 235, 0.06);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
  font-weight: 700;
}

.admin-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.record-row { cursor: pointer; }
.record-row:hover { background: rgba(37, 99, 235, 0.02); }

.td-time { white-space: nowrap; color: var(--muted); }
.td-name { font-weight: 600; }
.td-booth { white-space: nowrap; }
.td-summary { color: var(--muted); max-width: 200px; }

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
}

.modal-overlay.show { display: flex; }

.modal-content {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--rule);
}

.modal-title { font-size: 0.95rem; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
}

.modal-body { padding: 1rem; }

.detail-field { margin-bottom: 0.75rem; }
.detail-field label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
  display: block;
  margin-bottom: 0.2rem;
}
.detail-field span { font-size: 0.85rem; }
.detail-text {
  font-size: 0.82rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  margin-top: 0.2rem;
}

/* === Empty list === */
.empty-list {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.manual-add-section {
  padding: 1rem;
  background: var(--bg2);
  border: 1px dashed var(--rule);
  border-radius: 10px;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.manual-add-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}
.manual-input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: var(--font);
  box-sizing: border-box;
}
.manual-input:focus {
  border-color: var(--accent);
  outline: none;
}
.manual-add-btn {
  padding: 0.6rem;
  background: var(--accent-grad);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.manual-add-btn:active { transform: scale(0.97); }

/* === Status pills === */
.status-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.status-pill {
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  background: var(--bg-tint);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.status-pill.active {
  background: var(--accent);
  color: #fff;
}

/* === Visit card === */
.visit-card {
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.6rem;
  border: 1px solid var(--rule);
}
.visit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.visit-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 0.5rem;
}
.visit-status {
  font-size: 0.68rem;
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.visit-meta {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.visit-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.visit-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.action-btn {
  flex: 1;
  text-align: center;
  padding: 0.4rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.action-btn:active { background: var(--bg-tint); }
.record-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Add button in search results === */
.add-btn {
  flex-shrink: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-grad);
  color: #fff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

/* === Status picker modal === */
.status-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.5rem 0;
}
.status-option {
  padding: 0.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  background: #fff;
  border: 2px solid var(--rule);
  cursor: pointer;
  transition: all 0.15s;
}
.status-option:active { transform: scale(0.97); }

/* === Cloud badge === */
.cloud-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.cloud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
}
.cloud-badge.saved .cloud-dot { background: var(--success); }
.cloud-badge.saved { color: var(--success); }

/* === Mode tabs === */
.mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.mode-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}
.mode-tab.active {
  background: var(--accent);
  color: #fff;
}

/* === Text input area === */
.text-area {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.text-record-input {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-size: 0.85rem;
  font-family: var(--font);
  line-height: 1.6;
  resize: vertical;
  color: var(--ink);
  background: #fff;
}
.text-record-input:focus {
  border-color: var(--accent);
  outline: none;
}
.submit-text-btn {
  padding: 0.6rem;
  background: var(--accent-grad);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.submit-text-btn:active { transform: scale(0.97); }
.ai-toggle-row {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}
.ai-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
}
.ai-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}
.ai-toggle-text {
  user-select: none;
}

/* === Query: expandable cards === */
.exhibitor-card .card-main {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  cursor: pointer;
}
.exhibitor-card .checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--rule);
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: all 0.15s;
  cursor: pointer;
}
.exhibitor-card.checked .checkbox {
  background: var(--accent);
  border-color: var(--accent);
}
.exhibitor-card.checked .checkbox::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.exhibitor-card .expand-arrow {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--muted);
  padding: 4px;
  margin-top: 2px;
}
.exhibitor-card .card-expanded {
  padding: 0.6rem 0.5rem 0.5rem 2.2rem;
  border-top: 1px solid var(--rule);
  margin-top: 0.4rem;
}
.detail-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.5;
}
.detail-label {
  flex-shrink: 0;
  color: var(--muted);
  min-width: 70px;
}
.detail-val {
  color: var(--ink);
  flex: 1;
}
.add-visit-inline-btn {
  margin-top: 0.5rem;
  padding: 6px 14px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #86efac;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.add-visit-inline-btn:active { transform: scale(0.97); }

/* === Load more === */
.load-more-wrap {
  text-align: center;
  padding: 1rem 0;
}
.load-more-btn {
  padding: 8px 24px;
  background: var(--bg2);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.load-more-btn:active { transform: scale(0.97); }

/* === Sort pills === */
.sort-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.sort-pill {
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.75rem;
  background: #f1f5f9;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.sort-pill.active {
  background: var(--accent);
  color: #fff;
}

/* === AI summary collapsible === */
.ai-summary-wrap {
  margin-top: 0.5rem;
}
.ai-summary-toggle {
  font-size: 0.75rem;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  font-family: var(--font);
}
.ai-summary-content {
  margin-top: 0.4rem;
  padding: 0.6rem;
  background: #f0f9ff;
  border-radius: 6px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #0369a1;
}



