.nav-icon--private::before,
.nav-icon--private::after {
  width: 10px;
  height: 8px;
  border: 1.3px solid currentColor;
  border-radius: 5px 5px 5px 2px;
  background: var(--nav-item-fill);
}

.nav-icon--private::before { inset: 2px auto auto 1px; }
.nav-icon--private::after { inset: auto 1px 2px auto; }

.private-domain-page {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.private-page-header { justify-content: space-between; }

.private-demo-label,
.private-bind-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f3eef9;
  color: #655181;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 650;
  white-space: nowrap;
}

.private-layout {
  display: grid;
  grid-template-columns: minmax(275px, .8fr) minmax(0, 1.2fr);
  align-items: stretch;
  gap: 16px;
}

.private-connect,
.private-conversation {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.private-connect {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: clamp(14px, 1.65vw, 22px);
}

.private-connect-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.private-wechat-mark {
  position: relative;
  flex: 0 0 42px;
  height: 42px;
  border-radius: 11px;
  background: #e7f4ee;
  color: #327857;
}

.private-wechat-mark::before,
.private-wechat-mark::after {
  position: absolute;
  width: 19px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 9px 9px 9px 4px;
  background: #e7f4ee;
  content: "";
}

.private-wechat-mark::before { top: 10px; left: 9px; }
.private-wechat-mark::after { right: 7px; bottom: 9px; border-radius: 9px 9px 4px 9px; }

.private-connect-title { flex: 1; min-width: 0; }
.private-connect-title h2, .private-conversation-header h2 { font-size: 17px; font-weight: 700; }
.private-connect-title p { margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.private-bind-status {
  align-self: flex-start;
  margin-top: 2px;
  background: #f3f1f5;
  color: #6a6275;
}

.private-bind-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.private-bind-status[data-bound="true"] { background: #e9f5ee; color: #2d6d4f; }

.private-rules {
  padding: 0 12px;
  border: 1px solid #eae5f1;
  border-radius: 10px;
  background: #faf8fc;
}

.private-rule {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--label);
  font-size: 12px;
}

.private-rule--switch { min-height: 62px; }
.private-rule h3 { margin: 0; color: var(--ink); font-size: 13px; }
.private-rule p { margin-top: 1px; color: var(--muted); font-size: 11px; }
.private-rule dd { margin: 0; color: #5f4a80; text-align: end; }
.private-reply-rules { margin: 0; }
.private-reply-rules .private-rule { border-top: 1px solid #ece7f1; }

.private-switch {
  display: flex;
  align-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 21px;
  padding: 2px;
  border: 0;
  border-radius: 12px;
  background: #d6cfde;
}

.private-switch::after {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px #1e152737;
  transition: transform 150ms ease;
  content: "";
}

.private-switch[aria-checked="true"] { background: #428060; }
.private-switch[aria-checked="true"]::after { transform: translateX(15px); }
.private-switch:disabled { opacity: .66; cursor: default; }

.private-session-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 2px 0;
}

.private-session-stats > div { padding: 6px 7px 7px 0; }
.private-session-stats > div + div { padding-inline-start: 11px; border-inline-start: 1px solid var(--line); }
.private-session-stats dt { color: var(--muted); font-size: 11px; }
.private-session-stats dd { margin: 3px 0 0; color: var(--ink); font-size: 23px; font-weight: 670; line-height: 1.2; font-variant-numeric: tabular-nums; }

.private-action {
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.private-action:hover:not(:disabled) { background: #5236bd; }
.private-action:disabled { background: #f1edf7; color: #796c8b; cursor: default; }
.private-action--bind { margin-top: auto; }
.private-action--bind[aria-haspopup="false"] {
  border-color: #e7dfef;
  background: #faf7fc;
  color: #675480;
}

.private-action--bind[aria-haspopup="false"]:hover { background: #f1eafa; }

.private-conversation { display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }

.private-conversation-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
}

.private-chat-mode {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: #f2eef7;
}

.private-chat-mode button {
  min-height: 27px;
  padding: 2px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--label);
  font-size: 12px;
}

.private-chat-mode button[aria-pressed="true"] {
  border-color: #e8def2;
  background: var(--surface);
  color: #584193;
  font-weight: 680;
}

.private-chat-log {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  height: clamp(185px, 29vh, 265px);
  padding: 14px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-block: 1px solid var(--line);
  background: #f6f7f7;
}

.private-chat-log:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }

.private-message { display: grid; gap: 3px; max-width: min(85%, 35em); }
.private-message-author { color: #626772; font-size: 11px; }
.private-message-bubble {
  padding: 7px 10px;
  border: 1px solid #e7e8ea;
  border-radius: 4px 10px 10px;
  background: var(--surface);
  color: #36413d;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.private-message[data-role="visitor"] { align-self: flex-end; }
.private-message[data-role="visitor"] .private-message-author { text-align: end; }
.private-message[data-role="visitor"] .private-message-bubble { border-color: #d7ebdf; border-radius: 10px 4px 10px 10px; background: #e3f3e9; }

.private-chat-form { display: grid; gap: 8px; padding: 12px 16px 15px; }
.private-chat-status { min-height: 18px; color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
.private-chat-shortcuts { display: flex; flex-wrap: wrap; gap: 5px; }

.private-shortcut {
  padding: 3px 7px;
  border: 1px solid #e7dfef;
  border-radius: 6px;
  background: #faf7fc;
  color: #624b86;
  font-size: 11px;
}

.private-shortcut:hover:not(:disabled) { border-color: #d4c7e8; background: #f2ebf8; }
.private-shortcut:disabled { opacity: .65; cursor: default; }
.private-chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 7px; }

.private-chat-compose input {
  width: 100%;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid #e4deeb;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.private-chat-compose input:disabled { background: #faf8fc; }
.private-chat-compose input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

.private-binding-dialog {
  width: min(380px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 16px 44px #3227442c;
}

.private-binding-dialog::backdrop { background: #27203a62; }
.private-dialog-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.private-dialog-header h2 { font-size: 18px; }
.private-dialog-body { display: grid; justify-items: center; gap: 12px; padding: 17px; color: var(--label); text-align: center; font-size: 13px; }
.private-binding-code { display: grid; justify-items: center; gap: 7px; margin: 0; max-width: 100%; }
.private-binding-code img { width: min(100%, 168px); height: auto; border: 1px solid var(--line); border-radius: 8px; image-rendering: pixelated; }
.private-binding-code figcaption { color: var(--muted); font-size: 11px; }
.private-dialog-body .private-action { width: min(100%, 175px); }

@media (max-width: 760px) {
  .private-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 460px) {
  .private-conversation-header, .private-chat-log, .private-chat-form { padding-inline: 10px; }
  .private-conversation-header h2 { font-size: 15px; }
  .private-chat-mode button { padding-inline: 8px; }
  .private-message { max-width: 94%; }
}
