:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-input: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --primary: #58a6ff;
  --success: #3fb950;
  --warn: #d29922;
  --error: #f85149;
  --wa: #25d366;
  --tg: #0088cc;
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.header h1 { font-size: 18px; }
.subtitle { font-size: 12px; color: var(--text-muted); margin-left: 8px; }

.header-status {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.key-expiry-label {
  color: var(--warn);
  font-size: 12px;
  white-space: nowrap;
}

.header-status #btn-logout {
  margin-left: 4px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-right: 4px;
}

.status-dot.on { background: var(--success); }
.status-dot.qr { background: var(--warn); animation: pulse 1s infinite; }
.status-dot.error { background: var(--error); }

@keyframes pulse { 50% { opacity: 0.5; } }

.auto-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  height: calc(100vh - 53px);
}

.sidebar, .right-panel {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px;
}

.right-panel { border-right: none; border-left: 1px solid var(--border); }

.panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.panel h3 { font-size: 13px; margin-bottom: 10px; color: var(--text-muted); }

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.panel-header-row h3 { margin-bottom: 0; }

.hint { font-size: 12px; color: var(--text-muted); margin: 8px 0; }

.qr-img {
  width: 180px;
  height: 180px;
  display: block;
  margin: 8px auto;
  border-radius: var(--radius);
}

.qr-img[hidden] {
  display: none !important;
}

.btn {
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  margin-top: 6px;
}

.btn:hover { border-color: var(--primary); }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-ghost { background: transparent; }
.btn-sm { width: auto; padding: 4px 10px; font-size: 12px; margin-top: 0; }
.btn-block { margin-top: 10px; }

.tg-mode-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.tg-mode-btn {
  flex: 1;
  padding: 6px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.tg-mode-btn.active {
  background: rgba(88, 166, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

input, textarea, select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  margin-bottom: 6px;
  outline: none;
}

input:focus, textarea:focus { border-color: var(--primary); }

.form-group { margin-bottom: 8px; }
.form-group label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.contacts-list { max-height: 300px; overflow-y: auto; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 4px;
}

.contact-item:hover { background: var(--bg-input); }
.contact-item.active { border-color: var(--primary); background: rgba(88,166,255,0.1); }

.contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.contact-avatar.wa { background: rgba(37,211,102,0.2); }
.contact-avatar.tg { background: rgba(0,136,204,0.2); }

.contact-info { flex: 1; min-width: 0; }
.contact-name { font-size: 13px; font-weight: 500; }
.contact-preview { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.contact-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 10px;
  color: var(--text-muted);
}

.contact-ai-label { font-weight: 600; letter-spacing: 0.02em; }
.contact-ai-badge {
  align-self: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.contact-toggle input { width: auto; margin: 0; }

.profile-ai-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  padding: 6px 8px;
  border-radius: var(--radius);
  background: var(--bg-input);
  font-size: 12px;
  cursor: pointer;
}

.profile-ai-toggle input { width: auto; margin: 0; }

.contacts-hint { margin: 0 0 8px; font-size: 11px; }

/* Chat — 中间双框常驻：上框空状态/指纹，下框聊天（左右栏勿动） */
.chat-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.chat-pane-top {
  flex: 1 1 48%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.chat-pane-bottom {
  flex: 1 1 52%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 8px;
  min-height: 0;
}

/* 防止 display:flex 盖掉 HTML hidden */
.chat-empty[hidden],
#chat-empty[hidden],
.desktop-embed[hidden],
#desktop-embed[hidden] {
  display: none !important;
}

.empty-icon { font-size: 48px; opacity: 0.4; }

/* 指纹浏览器：嵌在上框内 */
.desktop-embed {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: #12151a;
}

.desktop-embed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text);
  flex-shrink: 0;
}

.desktop-embed-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.desktop-embed-stage {
  flex: 1;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 10px 10px;
  min-height: 0;
  overflow: auto;
  position: relative;
  background: #12151a;
}

.desktop-phone-slot {
  flex: 0 0 auto;
  width: 360px;
  max-width: 42vw;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 200px;
  min-height: 0;
  z-index: 1;
}

.desktop-phone-slot.is-floating {
  position: absolute;
  flex: none;
  max-width: none;
  margin: 0;
}

.desktop-phone-slot.is-fixed {
  z-index: 5;
}

.desktop-phone-slot.is-fixed .desktop-slot-resize,
.desktop-phone-slot.is-fixed .desktop-slot-resize-e,
.desktop-phone-slot.is-fixed .desktop-slot-resize-s {
  display: none;
}

.desktop-phone-slot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
  cursor: move;
  user-select: none;
}

.desktop-phone-slot.is-fixed .desktop-phone-slot-bar {
  cursor: default;
}

.desktop-phone-slot-bar strong {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
  flex: 1;
  min-width: 0;
}

.desktop-phone-slot-bar .desktop-phone-size {
  flex-shrink: 0;
  opacity: 0.8;
}

.desktop-phone-slot-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.desktop-phone-slot-bar .btn {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 11px;
}

.desktop-phone-slot.is-fixed .desktop-slot-fix {
  background: rgba(80, 160, 255, 0.22);
  border-color: rgba(80, 160, 255, 0.45);
}

.desktop-phone-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 440 / 800;
  height: auto;
  /* 外框不要压得太矮，否则 noVNC 里聊天底栏会被裁掉 */
  max-height: min(860px, calc(100vh - 120px));
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

/* 手动缩放：用内联像素高，禁止 height:100% 把窗口压扁 */
.desktop-phone-slot.is-resized .desktop-phone-frame {
  aspect-ratio: auto !important;
  max-height: none !important;
  min-height: 280px !important;
  flex: none !important;
  height: auto; /* 被 JS important 像素高覆盖；无内联时至少不塌成 0 */
}

.desktop-phone-slot.is-fullscreen {
  display: flex;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  z-index: 30;
}

.desktop-phone-slot.is-fullscreen .desktop-phone-frame {
  aspect-ratio: auto !important;
  max-height: none !important;
  flex: 1 !important;
  min-height: 0 !important;
  height: auto !important;
  width: 100% !important;
}

.desktop-phone-notch {
  display: none;
}

.desktop-embed-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #000;
  pointer-events: auto;
}

.desktop-slot-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 4;
  background:
    linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.4) 50%);
  border-bottom-right-radius: 6px;
}

.desktop-slot-resize-e {
  position: absolute;
  top: 12px;
  right: 0;
  width: 10px;
  bottom: 18px;
  cursor: ew-resize;
  z-index: 3;
}

.desktop-slot-resize-s {
  position: absolute;
  left: 12px;
  right: 18px;
  bottom: 0;
  height: 10px;
  cursor: ns-resize;
  z-index: 3;
}

/* 全屏指纹：隐藏 PC 面板，只留指纹窗口；可切回 */
body.fp-browser-fs {
  overflow: hidden;
}

body.fp-browser-fs .header,
body.fp-browser-fs .sidebar,
body.fp-browser-fs .right-panel {
  display: none !important;
}

body.fp-browser-fs .layout {
  display: block !important;
  height: 100vh;
  overflow: hidden;
}

body.fp-browser-fs .chat-area {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 10000;
  background: #0b0d10;
}

body.fp-browser-fs .desktop-embed {
  height: 100%;
}

body.fp-browser-fs .desktop-phone-slot:not(.is-fullscreen) {
  display: none !important;
}

body.fp-browser-fs .desktop-embed-title-pc {
  display: inline-flex !important;
}

/* PC 网页版全屏：隐藏多余栏，iframe 铺满 */
body.fp-browser-fs .desktop-phone-slot.is-pc-mode .desktop-phone-slot-bar {
  display: none;
}

body.fp-browser-fs .desktop-phone-slot.is-pc-mode.is-fullscreen {
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

body.fp-browser-fs .desktop-phone-slot.is-pc-mode .desktop-phone-frame {
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  height: 100% !important;
  width: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  flex: 1 !important;
}

body.fp-browser-fs.fp-pc-chrome-hidden .desktop-embed-bar {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 40;
  background: transparent;
  border: 0;
  padding: 6px 8px;
  opacity: 0.15;
  transition: opacity 0.2s;
}

body.fp-browser-fs.fp-pc-chrome-hidden .desktop-embed-bar:hover {
  opacity: 1;
  background: rgba(18, 21, 26, 0.85);
}

.desktop-embed-title-pc {
  display: none;
}

#chat-room {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  height: 100%;
}

.chat-room-placeholder {
  text-align: center;
  padding: 24px 12px;
  opacity: 0.75;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.chat-name { font-weight: 600; }
.chat-platform { font-size: 11px; color: var(--text-muted); margin-left: 8px; }

.chat-auto-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  cursor: pointer;
}

.chat-auto-toggle input { width: auto; margin: 0; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg {
  max-width: 70%;
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.msg.in { align-self: flex-start; background: var(--bg-input); border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.auto::after { content: ' 🤖'; font-size: 10px; opacity: 0.7; }

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.chat-input input { flex: 1; margin: 0; }

.chat-input .btn { width: auto; margin: 0; }

/* Log */
.log-panel { flex: 1; }
.log-list {
  max-height: 200px;
  overflow-y: auto;
  font-size: 11px;
  font-family: monospace;
}

.log-item {
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.log-item.success { color: var(--success); }
.log-item.error { color: var(--error); }
.log-item.warn { color: var(--warn); }
.log-item.info { color: var(--primary); }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  cursor: pointer;
}

.modal-content {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 400px;
  max-width: 90vw;
  pointer-events: auto;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg-input);
  color: var(--text-muted);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-content h3 { margin-bottom: 12px; }
.pending-from { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.pending-original {
  background: var(--bg-input);
  padding: 10px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 8px;
}
.pending-reply {
  background: rgba(88,166,255,0.15);
  padding: 10px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--primary);
}

.modal-actions { display: flex; gap: 8px; }
.modal-actions .btn { flex: 1; margin: 0; }

.modal-wide { max-width: 560px; }
.modal-scroll { max-height: 90vh; overflow-y: auto; }

.panel-subsection {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
}

.panel-subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-subsection-head h4 { margin: 0; font-size: 13px; }

.form-row-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

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

.inline-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  cursor: pointer;
}

.inline-check input { width: auto; margin: 0; }

#pf-cookies-text {
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

#pf-proxy-result.ok { color: #3fb950; }
#pf-proxy-result.err { color: #f85149; }
#ai-test-result.ok { color: #3fb950; }
#ai-test-result.err { color: #f85149; }

.media-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.media-tab {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
}

.media-tab.active {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(88, 166, 255, 0.1);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.media-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-input);
}

.media-thumb {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
  background: #111;
}

.media-voice {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.media-card-meta {
  padding: 4px 6px;
  font-size: 10px;
}

.media-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-view {
  font-size: 11px;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  white-space: pre-wrap;
  margin-bottom: 8px;
}

.memory-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.memory-step {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-height: 64px;
}

.memory-step-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.memory-step-body {
  font-size: 11px;
  line-height: 1.45;
  word-break: break-word;
  max-height: 72px;
  overflow-y: auto;
}

.plan-day-select {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
}

.plan-day-focus {
  margin-bottom: 8px;
}

.plan-day-row-focus {
  border-color: rgba(88, 166, 255, 0.45);
}

.plan-days-all {
  margin: 6px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
  background: var(--bg-card);
}

.plan-days-all > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  user-select: none;
}

.chat-plan-days {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.profile-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}

.profile-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
}

.profile-badge.ok {
  color: #3fb950;
  border-color: rgba(63, 185, 80, 0.45);
  background: rgba(46, 160, 67, 0.12);
}

.profile-badge.warn {
  color: #d29922;
  border-color: rgba(210, 153, 34, 0.45);
  background: rgba(210, 153, 34, 0.12);
}

.plan-day-row {
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
}

.plan-day-head {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.plan-title {
  width: 140px;
  font-size: 12px;
  padding: 2px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}

.plan-direction {
  width: 100%;
  font-size: 11px;
  resize: vertical;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  padding: 6px;
}

.profile-meta-extra { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.accounts-hint { margin-bottom: 10px; font-size: 11px; }

.profiles-list { display: flex; flex-direction: column; gap: 10px; }

.profile-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}

.profile-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.profile-icon { font-size: 20px; line-height: 1; }
.profile-title { flex: 1; min-width: 0; }
.profile-title strong { display: block; font-size: 13px; }
.profile-meta { font-size: 11px; color: var(--text-muted); }
.profile-fp { font-size: 10px; line-height: 1.4; margin-bottom: 8px; word-break: break-all; }
.profile-qr { max-width: 160px; margin: 6px auto; display: block; }

.profile-browser-hint { font-size: 11px; line-height: 1.5; padding: 8px; background: rgba(88,166,255,0.1); border-radius: 6px; margin: 6px 0; }
.profile-browser-hint.ok { background: rgba(46,160,67,0.15); color: #3fb950; }
.profile-browser-hint.error { background: rgba(248,81,73,0.15); color: #f85149; }

.profile-qr-box { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0; }
.profile-qr-img { width: 220px; height: 220px; background: #fff; padding: 10px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.25); }

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.profile-actions .btn { margin: 0; padding: 4px 8px; font-size: 11px; }

.profile-video-call-hint {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
}

.profile-video-call-hint .btn-link {
  background: none;
  border: none;
  color: #7eb6ff;
  cursor: pointer;
  padding: 0 4px;
  font-size: 11px;
  text-decoration: underline;
}

.contact-remark {
  font-size: 10px;
  color: var(--primary);
  margin-bottom: 2px;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .right-panel { display: none; }
}
