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

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #b2b2b2;
  --line: #ededed;
  --share-bg: #ebebeb;
  --bubble-bg: #ffffff;
  --admin-bg: #f5f6f8;
  --admin-card: #ffffff;
  --primary: #07c160;
  --danger: #fa5151;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue',
    'Microsoft YaHei', sans-serif;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ========== 聊天记录展示页 ========== */

.chat-page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: env(safe-area-inset-bottom);
}

.chat-page--public .chat-body {
  padding-top: 12px;
}

.chat-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 10px 8px 8px;
  background: var(--bg);
  border-bottom: 1px solid #f3f3f3;
}

.chat-header__btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.chat-header__center {
  text-align: center;
  min-width: 0;
}

.chat-header__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.chat-header__url {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-body {
  padding: 18px 0 40px;
}

.date-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}

.date-divider::before,
.date-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.message-list {
  list-style: none;
}

.message-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0 10px;
  padding: 14px 16px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.message-item--no-avatar {
  grid-template-columns: 52px 1fr;
}

.message-item__avatar-wrap {
  width: 40px;
  height: 40px;
  margin-top: 2px;
}

.message-item__avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.message-item__avatar--placeholder {
  visibility: hidden;
}

.message-item__main {
  min-width: 0;
}

.message-item__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.message-item__name,
.message-item__time {
  font-size: 12px;
  color: var(--muted);
}

.message-item__time {
  flex-shrink: 0;
  max-width: 58%;
  text-align: right;
  line-height: 1.35;
  word-break: keep-all;
}

.message-item__content {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word;
}

.chat-footer-line {
  margin: 28px auto 0;
  width: calc(100% - 36px);
  height: 1px;
  background: var(--line);
  position: relative;
}

.chat-footer-line::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d8d8d8;
}

.admin-entry {
  position: fixed;
  right: 12px;
  bottom: 20px;
  z-index: 20;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* ========== 微信分享卡片预览 ========== */

.share-page {
  min-height: 100vh;
  background: var(--share-bg);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
}

.share-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 360px;
}

.share-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.share-card__bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--bubble-bg);
  border-radius: 6px;
  padding: 12px 14px 10px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.share-card__bubble::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 14px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 6px solid var(--bubble-bg);
}

.share-card__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
}

.share-card__line {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-card__footer {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}

.share-tabs {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.share-tabs a {
  flex: 1;
  text-align: center;
  padding: 12px;
  text-decoration: none;
  color: #666;
  font-size: 14px;
}

.share-tabs a.active {
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--primary);
}

.page-with-tabs {
  padding-top: 46px;
}

/* ========== 控制台 ========== */

.admin-page {
  min-height: 100vh;
  background: var(--admin-bg);
  padding: 16px;
  padding-bottom: 80px;
}

.admin-header {
  max-width: 720px;
  margin: 0 auto 16px;
}

.admin-header h1 {
  font-size: 22px;
  margin-bottom: 6px;
}

.admin-header p {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.admin-actions-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-card {
  max-width: 720px;
  margin: 0 auto 14px;
  background: var(--admin-card);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.admin-card h2 {
  font-size: 16px;
  margin-bottom: 14px;
}

.form-row {
  margin-bottom: 14px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-row label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 6px;
}

.form-row input[type='text'],
.form-row input[type='url'],
.form-row input[type='time'],
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fafafa;
}

.form-row textarea {
  min-height: 72px;
  resize: vertical;
}

.avatar-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-preview img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #eee;
}

.message-editor {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fafafa;
}

.message-editor__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: #666;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

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

.btn-secondary {
  background: #eef0f3;
  color: #333;
}

.btn-danger {
  background: #fff0f0;
  color: var(--danger);
}

.btn-small {
  padding: 6px 10px;
  font-size: 12px;
}

.admin-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #eee;
  backdrop-filter: blur(8px);
}

.admin-bar .btn {
  flex: 1;
}

.preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: #eef8f1;
  color: #0a7a3f;
  text-decoration: none;
  font-size: 13px;
}

.hint {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}

/* ========== 登录页 ========== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(180deg, #f0faf4 0%, #f5f6f8 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 22px;
  margin-bottom: 8px;
}

.login-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}

.login-btn {
  width: 100%;
  margin-top: 8px;
}

.login-error {
  margin-top: 12px;
  color: var(--danger);
  font-size: 13px;
  text-align: center;
}

.admin-header__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.admin-mode-tabs {
  position: sticky;
  top: 44px;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
  padding: 8px;
  background: rgba(245, 246, 248, 0.96);
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.admin-mode-tab {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 10px;
  background: transparent;
  color: #666;
  text-align: left;
  cursor: pointer;
}

.admin-mode-tab span,
.admin-mode-tab small {
  display: block;
}

.admin-mode-tab span {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin-bottom: 4px;
}

.admin-mode-tab small {
  font-size: 11px;
  color: #888;
  line-height: 1.35;
}

.admin-mode-tab--active {
  background: #fff;
  border-color: rgba(7, 193, 96, 0.28);
  box-shadow: 0 6px 18px rgba(7, 193, 96, 0.12);
}

.admin-mode-tab--active span {
  color: var(--primary);
}

.admin-panel {
  display: none;
}

.admin-panel--active {
  display: block;
}

.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f6fff9 100%);
  border: 1px solid #e8f5ec;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.admin-panel-head h2 {
  font-size: 19px;
  margin-bottom: 6px;
}

.admin-panel-head p {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.admin-panel-head .btn {
  flex-shrink: 0;
}

.admin-card--account {
  margin-top: 18px;
  border-style: dashed;
}

.admin-body.admin-mode-image #shareDock {
  display: none;
}

.admin-body.admin-mode-image .image-share-dock {
  display: block;
}

.admin-body.admin-mode-text .image-share-dock {
  display: none;
}

.admin-body.admin-mode-image .admin-page--with-dock {
  padding-bottom: 220px;
}

.admin-body.admin-mode-text .admin-panel[data-admin-panel="image"],
.admin-body.admin-mode-image .admin-panel[data-admin-panel="text"] {
  display: none;
}

.admin-section-hint {
  margin-bottom: 12px;
}

.share-link-box {
  margin-top: 14px;
  padding: 12px;
  background: #f7faf8;
  border-radius: 10px;
}

.share-link-box label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}

.share-link-row {
  display: flex;
  gap: 8px;
}

.share-link-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.share-page--inline {
  min-height: auto;
  padding: 16px 0 0;
  background: transparent;
  justify-content: flex-start;
}

.summary-line-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.summary-line-row input {
  flex: 1;
}

/* ========== 控制台底部分享卡片 ========== */

.admin-body {
  background: var(--admin-bg);
}

.admin-page--with-dock {
  padding-bottom: 220px;
}

.share-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #e8e8e8;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
}

.share-dock__actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.share-dock__actions .btn {
  flex: 1;
}

.share-dock__label {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  text-align: center;
}

.share-dock__hint {
  margin-top: 8px;
  font-size: 11px;
  color: #999;
  text-align: center;
  line-height: 1.4;
}

.wx-link-card {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wx-link-card:active {
  transform: scale(0.99);
}

.wx-link-card--disabled {
  opacity: 0.55;
}

.wx-link-card--pulse {
  animation: cardPulse 0.6s ease 2;
  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.35);
}

@keyframes cardPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.wx-link-card__thumb {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #f0f0f0;
}

.wx-link-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.wx-link-card__title {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wx-link-card__desc {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  white-space: pre-line;
  display: block;
  word-break: break-word;
  margin-bottom: 4px;
}

.image-share-settings {
  margin: 16px 0 12px;
  padding-top: 14px;
  border-top: 1px solid #ececec;
}

.image-share-settings h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #222;
}

.wx-link-card__thumb--generated {
  object-fit: cover;
  object-position: top center;
}

.wx-link-card--image-only {
  justify-content: flex-end;
  min-height: 72px;
}

.wx-link-card--image-only .wx-link-card__body {
  display: none;
}

.wx-link-card--image-only .wx-link-card__thumb {
  width: 60px;
  height: 60px;
}

/* ========== 微信分享引导 ========== */

.wx-share-guide {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.wx-share-guide__mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.wx-share-guide__panel {
  position: absolute;
  top: 72px;
  right: 16px;
  left: 16px;
  max-width: 320px;
  margin-left: auto;
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
}

.wx-share-guide__arrow {
  position: absolute;
  top: -36px;
  right: 18px;
  font-size: 32px;
  color: #fff;
  line-height: 1;
}

.wx-share-guide__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.wx-share-guide__text {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 14px;
}

.wx-share-guide__panel .btn {
  width: 100%;
}

.admin-share-tip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 10px 14px;
  background: #fff7e6;
  color: #ad6800;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  border-bottom: 1px solid #ffe7ba;
}

.admin-body .admin-page--with-dock {
  padding-top: 44px;
}

@media (min-width: 768px) {
  .admin-page {
    padding: 24px;
  }
}

/* ========== 图片聊天生成 ========== */

.image-chat-actions,
.image-chat-generate {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.image-chat-hint {
  margin-bottom: 12px;
}

.image-chat-actions .btn {
  min-height: 38px;
  flex: 1 1 calc(50% - 8px);
}

.image-chat-generate .btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.image-message-editor {
  border: 1px solid #e9e9e9;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fafafa;
}

.image-message-editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.image-message-editor__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.image-message-editor__grid .form-row {
  margin-bottom: 0;
}

.image-message-editor__wide {
  grid-column: 1 / -1;
}

.image-file-input {
  margin-top: 8px;
  width: 100%;
  min-height: 40px;
}

.image-chat-preview-wrap {
  margin-top: 14px;
  padding: 14px;
  background: #333;
  border-radius: 14px;
  overflow: hidden;
  min-height: var(--image-preview-height, 896px);
}

.image-chat-preview-stage {
  width: 414px;
  height: 896px;
  transform-origin: top left;
}

.image-chat-capture {
  width: 414px;
  background: transparent;
}

.image-mobile-container {
  width: 414px;
  height: 896px;
  background-color: #f3f3f3;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  color: #000;
}

.image-ios-status-bar {
  height: 47px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
  background-color: #f3f3f3;
}

.image-ios-time {
  min-width: 54px;
  text-align: left;
  letter-spacing: -0.5px;
}

.image-ios-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 65px;
  justify-content: flex-end;
}

.image-ios-icons svg {
  fill: #000;
}

.image-chat-header {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.image-header-left {
  width: 60px;
  display: flex;
  align-items: center;
}

.image-back-icon {
  font-size: 24px;
  font-weight: 300;
  color: #000;
}

.image-header-title {
  font-size: 17px;
  font-weight: 600;
  flex: 1;
  text-align: center;
}

.image-header-right {
  width: 60px;
  text-align: right;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 2px;
  line-height: 1;
  padding-bottom: 8px;
}

.image-chat-area {
  flex: 1;
  padding: 10px 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.image-time-stamp {
  text-align: center;
  margin: 15px 0 20px;
}

.image-time-stamp span {
  font-size: 12px;
  color: #b2b2b2;
}

.image-message {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
}

.image-message.self {
  flex-direction: row-reverse;
}

.image-message.other {
  flex-direction: row;
}

.image-avatar {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-color: #ddd;
}

.image-message.self .image-avatar {
  margin-left: 12px;
}

.image-message.other .image-avatar {
  margin-right: 12px;
}

.image-bubble-call,
.image-bubble-text {
  background-color: #a9ea7a;
  color: #000;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 16px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  max-width: 260px;
  word-break: break-word;
}

.image-message.other .image-bubble-text {
  background-color: #fff;
}

.image-message.self .image-bubble-call::before,
.image-message.self .image-bubble-text::before {
  content: '';
  position: absolute;
  right: -5px;
  top: 14px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 5px solid #a9ea7a;
}

.image-message.other .image-bubble-text::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 14px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 5px solid #fff;
}

.image-call-icon {
  width: 20px;
  height: 20px;
}

.image-video-card {
  width: 190px;
  height: 250px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background-color: #ccc;
  background-size: cover;
  background-position: center;
}

.image-video-card--empty {
  background: linear-gradient(135deg, #b7c7d9, #efe1cc);
}

.image-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  border: 1.5px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.image-play-btn::after {
  content: '';
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #fff;
  margin-left: 4px;
}

.image-video-source {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px 10px 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 11px;
}

.image-video-logo {
  width: 14px;
  height: 14px;
}

.image-img-card {
  max-width: 220px;
  border-radius: 6px;
  overflow: hidden;
  display: block;
}

.image-img-card img {
  width: 100%;
  display: block;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.image-img-placeholder {
  width: 220px;
  height: 136px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f1f1f1, #d8d8d8);
  border: 1px solid #e0e0e0;
}

.image-bottom-bar {
  background-color: #f7f7f7;
  padding: 10px 15px 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #ececec;
  flex-shrink: 0;
}

.image-circle-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: transparent;
}

.image-circle-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #1a1a1a;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.image-circle-icon.image-plus {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
}

.image-circle-icon.image-plus img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-input-container {
  flex: 1;
  height: 40px;
  background-color: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 10px 0 12px;
}

.image-input-container input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
  color: #333;
}

.image-inner-mic {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.image-inner-mic svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #777;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.image-home-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background-color: #000;
  border-radius: 10px;
}

.image-view-body {
  margin: 0;
  min-height: 100vh;
  background: #f3f3f3;
}

.image-view-page {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.image-view-photo {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  vertical-align: top;
}

.image-view-empty {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
}

@media (max-width: 520px) {
  .admin-mode-tabs {
    top: 40px;
    gap: 6px;
    padding: 6px;
    margin-top: 12px;
  }

  .admin-mode-tab {
    padding: 10px 8px;
  }

  .admin-mode-tab span {
    font-size: 14px;
  }

  .admin-mode-tab small {
    font-size: 10px;
  }

  .admin-panel-head {
    display: block;
    padding: 14px;
  }

  .admin-panel-head .btn {
    width: 100%;
    margin-top: 12px;
  }

  .image-chat-preview-wrap {
    padding: 8px;
    margin-left: -4px;
    margin-right: -4px;
  }

  .image-message-editor__grid {
    grid-template-columns: 1fr;
  }

  .image-chat-actions .btn {
    flex-basis: calc(50% - 8px);
    padding-left: 8px;
    padding-right: 8px;
  }

  .image-chat-generate {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    padding: 8px;
    margin-left: -8px;
    margin-right: -8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #eee;
    border-radius: 12px;
    backdrop-filter: blur(8px);
  }
}

/* ========== iOS 风格控制台重绘 ========== */

.admin-body {
  background: #f2f2f7;
}

.admin-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 16px 28px;
}

.admin-header {
  max-width: 720px;
  margin: 0 auto 14px;
  padding: 0 2px;
}

.admin-header h1 {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.6px;
  font-weight: 800;
  color: #111;
}

.admin-header p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: #7a7a80;
}

.admin-header__top .btn {
  min-width: 58px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #3a3a3c;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.admin-mode-tabs {
  max-width: 720px;
  top: 0;
  margin: 16px auto 18px;
  padding: 4px;
  border: none;
  border-radius: 14px;
  background: #e5e5ea;
  box-shadow: none;
}

.admin-mode-tab {
  min-height: 52px;
  padding: 8px 10px;
  border: none;
  border-radius: 11px;
  background: transparent;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}

.admin-mode-tab span {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #3a3a3c;
}

.admin-mode-tab small {
  font-size: 10px;
  color: #8e8e93;
}

.admin-mode-tab--active {
  background: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.admin-mode-tab--active span {
  color: #111;
}

.admin-panel,
.admin-card,
.admin-panel-head {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.admin-panel-head {
  margin-bottom: 12px;
  padding: 18px 18px;
  border: none;
  border-radius: 22px;
  background: #fff;
  box-shadow: none;
}

.admin-panel-head h2 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.4px;
  font-weight: 800;
}

.admin-panel-head p {
  margin-top: 6px;
  color: #8e8e93;
}

.admin-card {
  margin-bottom: 12px;
  padding: 18px;
  border: none;
  border-radius: 22px;
  background: #fff;
  box-shadow: none;
}

.admin-card h2 {
  margin-bottom: 16px;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.2px;
  font-weight: 750;
  color: #111;
}

.form-row {
  margin-bottom: 16px;
}

.form-row label {
  margin-bottom: 7px;
  font-size: 13px;
  color: #8e8e93;
}

.form-row input[type='text'],
.form-row input[type='url'],
.form-row input[type='time'],
.form-row input[type='password'],
.form-row select,
.form-row textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: none;
  border-radius: 13px;
  background: #f2f2f7;
  color: #111;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  -webkit-appearance: none;
  appearance: none;
}

.form-row textarea {
  min-height: 92px;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(0, 122, 255, 0.42), 0 0 0 4px rgba(0, 122, 255, 0.08);
}

.hint {
  color: #8e8e93;
}

.btn {
  min-height: 42px;
  border-radius: 13px;
  font-weight: 650;
  -webkit-appearance: none;
  appearance: none;
}

.btn-primary {
  background: #34c759;
  color: #fff;
}

.btn-secondary {
  background: #f2f2f7;
  color: #1c1c1e;
}

.btn-danger {
  background: #fff1f0;
  color: #ff3b30;
}

.btn-small {
  min-height: 34px;
  border-radius: 999px;
}

.message-editor,
.image-message-editor {
  border: none;
  border-radius: 18px;
  background: #f7f7fb;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.035);
}

.message-editor__head,
.image-message-editor__head {
  color: #6e6e73;
  font-weight: 650;
}

.summary-line-row {
  align-items: center;
}

.avatar-preview {
  padding: 12px;
  border-radius: 16px;
  background: #f2f2f7;
}

.avatar-preview img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.image-chat-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.image-chat-actions .btn {
  min-width: 0;
}

.image-chat-generate {
  padding: 10px;
  border-radius: 18px;
  background: #f7f7fb;
}

.image-chat-preview-wrap {
  border-radius: 22px;
  background: #1c1c1e;
}

.admin-card--account {
  border: none;
  background: rgba(255, 255, 255, 0.72);
}

.share-dock {
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: rgba(248, 248, 248, 0.94);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
}

.share-dock__actions .btn {
  height: 50px;
}

.wx-link-card {
  border: none;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.wx-link-card__thumb {
  width: 60px;
  height: 60px;
  border-radius: 10px;
}

@media (max-width: 520px) {
  .admin-page {
    padding: 58px 18px 28px;
  }

  .admin-header h1 {
    font-size: 26px;
  }

  .admin-mode-tabs {
    position: sticky;
    top: 0;
    z-index: 70;
    margin-left: -2px;
    margin-right: -2px;
  }

  .admin-mode-tab {
    min-height: 50px;
  }

  .admin-mode-tab small {
    display: none;
  }

  .admin-card,
  .admin-panel-head {
    padding: 18px;
    border-radius: 22px;
  }

  .image-chat-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .share-dock {
    border-radius: 22px 22px 0 0;
  }
}

.image-circle-icon.image-voice {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
}

.image-circle-icon.image-voice img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-circle-icon.image-emoji {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
}

.image-circle-icon.image-emoji img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-inner-mic img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}