:root {
  color-scheme: light;
  --navy: #19172d;
  --page: #f5f6fa;
  --green: #08be60;
  --muted: #a6a6b0;
  --text: #25242c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #eceef3;
  color: var(--text);
}

body {
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(8, 190, 96, .55);
  outline-offset: 2px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 24px;
  height: 24px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  position: relative;
  width: min(100%, 470px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--page);
}

.primary-button {
  width: 100%;
  height: 52px;
  border-radius: 4px;
  background: var(--navy);
  color: #fff;
  font-size: 16px;
  letter-spacing: 1px;
  transition: filter .15s, transform .15s;
}

.primary-button:active,
.create-button:active {
  filter: brightness(1.18);
  transform: scale(.995);
}

/* 口令与登录 */
.auth-page {
  min-height: 100dvh;
  padding-right: 22px;
  padding-bottom: 70px;
  padding-left: 22px;
}

.access-page {
  padding-top: 25vh;
}

.login-page {
  padding-top: 22.3vh;
}

.auth-card {
  width: 100%;
  border-top: 4px solid var(--navy);
  background: #fff;
  box-shadow: 0 7px 22px rgba(31, 35, 58, .09);
}

.access-card {
  min-height: 500px;
  padding: 34px 32px 24px;
}

.workbench-label {
  margin: 0;
  color: #35343d;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}

.lock-box {
  display: grid;
  width: 52px;
  height: 52px;
  margin-top: 25px;
  place-items: center;
  border: 1px solid #e7e8ed;
  border-radius: 13px;
  background: linear-gradient(145deg, #fff, #f5f6f8);
  color: #292735;
  box-shadow: 0 3px 9px rgba(31, 35, 58, .05);
}

.lock-box .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.8;
}

.auth-title {
  margin: 22px 0 0;
  color: #1f1e26;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: .5px;
}

.auth-description {
  margin: 7px 0 0;
  color: #a1a1aa;
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: .5px;
}

.access-form {
  position: relative;
  margin-top: 25px;
}

.access-form label {
  display: block;
  margin-bottom: 9px;
  color: #777781;
  font-size: 12px;
}

.access-form input {
  width: 100%;
  height: 51px;
  padding: 0 16px;
  border: 1px solid #85858d;
  border-radius: 4px;
  background: #f7f8fb;
  color: #33323b;
  font-size: 16px;
  letter-spacing: 2px;
}

.access-form input::placeholder {
  color: #b7b8bf;
  font-size: 16px;
  letter-spacing: 2px;
}

.access-form .primary-button {
  margin-top: 22px;
}

.form-error {
  position: absolute;
  top: 91px;
  left: 0;
  margin: 0;
  color: #d84c4c;
  font-size: 11px;
}

.form-error[hidden] {
  display: none;
}

.auth-divider {
  height: 1px;
  margin-top: 27px;
  background: #f0f0f3;
}

.auth-footer {
  margin: 19px 0 0;
  color: #b9b9c0;
  font-size: 11px;
  text-align: center;
  letter-spacing: .5px;
}

.login-card {
  min-height: 456px;
  padding: 31px 28px 23px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-logo {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  place-items: center;
  border-radius: 4px;
  background: var(--navy);
  color: #fff;
}

.brand-logo .icon {
  width: 29px;
  height: 29px;
  stroke-width: 1.45;
}

.brand-name {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 600;
}

.brand-slogan {
  margin: 0;
  color: #aaaab2;
  font-size: 10px;
  letter-spacing: 1px;
}

.login-card .auth-title {
  margin-top: 24px;
}

.login-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 28px;
}

.feature-chip {
  display: grid;
  height: 40px;
  place-items: center;
  border: 1px solid #f0f0f3;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #f8f9fb);
  color: #9b9ba4;
  font-size: 12px;
  box-shadow: 0 2px 5px rgba(31, 35, 58, .035);
}

.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}

.login-button .icon {
  width: 20px;
  height: 20px;
}

.login-safe {
  margin: 14px 0 0;
  color: #b0b0b8;
  font-size: 11px;
  text-align: center;
}

.login-card .auth-divider {
  margin-top: 26px;
}

/* 使用面板 */
.dashboard {
  min-height: 100dvh;
  padding-bottom: 96px;
}

.compliance-ticker {
  height: 36px;
  overflow: hidden;
  background: var(--navy);
  color: #f5f4f8;
  font-size: 13px;
  line-height: 36px;
  white-space: nowrap;
}

.ticker-track {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 25s linear infinite;
  will-change: transform;
}

@keyframes ticker {
  from { transform: translateX(470px); }
  to { transform: translateX(-100%); }
}

.dashboard-content {
  padding: 12px 8px 0;
}

.user-card {
  display: flex;
  height: 94px;
  padding: 17px 26px;
  align-items: center;
  border-radius: 4px;
  background: var(--navy);
  color: #fff;
}

.user-avatar {
  width: 56px;
  height: 57px;
  flex: 0 0 56px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-radius: 5px;
  object-fit: cover;
}

.user-summary {
  min-width: 0;
  margin-left: 14px;
}

.user-name {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
}

.user-id {
  margin: 2px 0 0;
  color: #cfced8;
  font-size: 13px;
  line-height: 1.4;
}

.member-badge {
  min-width: 96px;
  height: 28px;
  margin-left: auto;
  border: 1px solid #625e76;
  border-radius: 2px;
  background: #39364a;
  color: #dddbe5;
  font-size: 12px;
  font-weight: 400;
}

.permission-list {
  display: grid;
  gap: 3px;
  margin-left: auto;
}

.permission-tag {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .12);
  color: #d0ced9;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}

.create-button {
  width: 100%;
  height: 54px;
  margin-top: 16px;
  border-radius: 3px;
  background: var(--navy);
  color: #fff;
  font-size: 16px;
  letter-spacing: 2px;
  transition: filter .15s, transform .15s;
}

.records-card {
  min-height: 355px;
  margin-top: 16px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(31, 35, 58, .07);
}

.records-card.card-records {
  min-height: 280px;
}

.records-header {
  height: 55px;
  margin: 0 22px;
  padding-top: 20px;
  border-bottom: 1px solid #f0f0f3;
}

.records-header h2 {
  margin: 0;
  color: #3c3b43;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
}

.empty-state {
  display: flex;
  padding-top: 55px;
  align-items: center;
  flex-direction: column;
  color: #adb0b3;
  text-align: center;
}

.empty-state .icon {
  width: 37px;
  height: 37px;
  color: #b9bec0;
  stroke-width: 1.6;
}

.empty-title {
  margin: 21px 0 0;
  color: #b1b1b8;
  font-size: 13px;
}

.empty-tip {
  margin: 11px 0 0;
  color: #b8b8be;
  font-size: 11px;
}

.card-records .empty-state {
  padding-top: 56px;
}

.profile-menu {
  display: grid;
  gap: 10px;
  margin-top: 54px;
}

.menu-item {
  display: flex;
  width: 100%;
  height: 50px;
  padding: 0 14px;
  align-items: center;
  background: #fff;
  color: #3c3b43;
  text-align: left;
  box-shadow: 0 1px 4px rgba(31, 35, 58, .06);
}

.menu-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 2px;
  background: var(--green);
  color: #fff;
}

.menu-icon .icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.menu-label {
  margin-left: 12px;
  font-size: 14px;
}

.menu-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: #9999a1;
}

.bottom-nav {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 470px);
  min-height: 83px;
  padding: 10px 9px max(8px, env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid #e7e7eb;
  background: rgba(255, 255, 255, .98);
  transform: translateX(-50%);
}

.nav-item {
  display: flex;
  padding: 0;
  align-items: center;
  flex-direction: column;
  background: transparent;
  color: #979797;
}

.nav-item.active {
  color: var(--green);
}

.nav-icon {
  width: 27px;
  height: 27px;
  stroke-width: 1.75;
}

.nav-label {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.2;
}

/* 创建工具与记录 */
.records-card.has-records,
.card-records.has-records {
  min-height: 0;
}

.record-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.record-item {
  overflow: hidden;
  border: 1px solid #ededf1;
  border-radius: 5px;
  background: #fff;
}

.record-thumb {
  display: block;
  width: 100%;
  max-height: 300px;
  border-bottom: 1px solid #efeff2;
  background: #f3f4f7;
  object-fit: contain;
}

.record-meta {
  display: flex;
  padding: 12px 13px 8px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.record-meta strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-meta time {
  flex: 0 0 auto;
  color: #aaaab2;
  font-size: 10px;
}

.record-actions {
  display: flex;
  padding: 7px 10px 10px;
  flex-wrap: wrap;
  gap: 7px;
}

.record-actions button {
  padding: 7px 12px;
  border-radius: 3px;
  background: #f0f1f5;
  color: #4b4a55;
  font-size: 12px;
}

.record-actions .danger-button {
  margin-left: auto;
  background: #fff1f1;
  color: #c45353;
}

.card-record-preview {
  display: flex;
  padding: 18px 14px 8px;
  align-items: center;
  gap: 12px;
}

.record-avatar {
  width: 54px;
  height: 54px;
  border-radius: 7px;
  object-fit: cover;
}

.card-record-preview strong {
  font-size: 16px;
}

.card-record-preview p {
  margin: 5px 0 0;
  color: #9999a2;
  font-size: 12px;
}

.record-qr {
  width: 64px;
  height: 64px;
  margin-left: auto;
}

.editor-page {
  padding-bottom: 30px;
}

.editor-topbar {
  position: sticky;
  z-index: 12;
  top: 0;
  display: grid;
  height: 58px;
  padding: 0 8px;
  grid-template-columns: 78px 1fr 78px;
  align-items: center;
  background: var(--navy);
  color: #fff;
}

.editor-topbar h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}

.editor-topbar button {
  padding: 10px 4px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  text-align: left;
}

.editor-content {
  padding: 12px 8px 24px;
}

.tool-form {
  display: grid;
  gap: 12px;
}

.form-section,
.preview-section,
.guide-card {
  padding: 20px 18px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(31, 35, 58, .06);
}

.form-section {
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 8px;
  color: #55545e;
  font-size: 13px;
}

.form-field input:not([type="range"]):not([type="color"]),
.form-field textarea,
.form-field select {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #dddde4;
  border-radius: 4px;
  outline: none;
  background: #fafbfd;
  color: #33323c;
  font: inherit;
  font-size: 14px;
}

.form-field textarea {
  resize: vertical;
  line-height: 1.6;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.rich-editor:focus {
  border-color: var(--green);
}

.form-field input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.form-field input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 3px;
  border: 1px solid #dddde4;
  border-radius: 4px;
  background: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid.three-columns {
  grid-template-columns: .8fr .65fr 1fr;
}

.upload-button {
  display: flex;
  min-height: 76px;
  padding: 14px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px dashed #b9bbc4;
  border-radius: 5px;
  background: #fafbfd;
  color: #6d6c77;
  font-size: 13px;
  cursor: pointer;
}

.upload-button .icon {
  color: var(--green);
}

.file-chips {
  color: #9b9ba4;
  font-size: 12px;
  text-align: center;
}

.secondary-button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #dddde4;
  border-radius: 4px;
  background: #f4f5f8;
  color: #4a4953;
  font-size: 14px;
  text-align: center;
}

.secondary-button:disabled,
.primary-button:disabled {
  cursor: wait;
  opacity: .55;
}

.full-button {
  width: 100%;
}

.green-button {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.editor-actions .primary-button {
  grid-column: 1 / -1;
  height: 50px;
  font-size: 15px;
}

.preview-section h2 {
  margin: 0 0 16px;
  font-size: 15px;
}

.preview-placeholder {
  display: grid;
  min-height: 130px;
  place-items: center;
  border: 1px dashed #e0e0e6;
  color: #aaaab2;
  font-size: 12px;
  text-align: center;
}

.long-preview {
  display: block;
  width: 100%;
  border: 1px solid #eee;
}

.form-hint {
  margin: 0;
  color: #9999a3;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rich-toolbar button,
.rich-toolbar label {
  min-width: 36px;
  padding: 8px 10px;
  border: 1px solid #e0e0e5;
  border-radius: 3px;
  background: #f5f6f8;
  color: #4b4a54;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}

.rich-editor {
  min-height: 210px;
  padding: 13px;
  border: 1px solid #dddde4;
  border-radius: 4px;
  outline: none;
  background: #fff;
  color: #35343d;
  font-size: 15px;
  line-height: 1.7;
}

.rich-editor:empty::before {
  color: #b4b4bc;
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-editor img {
  display: block;
  max-width: 100%;
  margin: 12px auto;
}

.crop-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #e8eaf0;
  cursor: move;
  touch-action: none;
}

.avatar-editor {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-editor img {
  width: 76px;
  height: 76px;
  border-radius: 9px;
  object-fit: cover;
}

.avatar-editor label {
  cursor: pointer;
}

.tutorial-video {
  display: block;
  width: min(100%, 360px);
  max-height: 72vh;
  margin: 0 0 22px;
  border-radius: 6px;
  background: #000;
  object-fit: contain;
}

.guide-card h2 {
  margin: 0 0 22px;
  color: #34333d;
  font-size: 17px;
  line-height: 1.7;
}

.guide-card ol {
  margin: 0 0 28px;
  padding-left: 23px;
  color: #666570;
  font-size: 14px;
  line-height: 1.9;
}

.guide-card li + li {
  margin-top: 12px;
}

/* 名片分享落地页 */
.shared-card-page {
  padding-bottom: 30px;
  background: #f3f4f8;
}

.shared-hero {
  padding: 56px 26px 64px;
  background: var(--navy);
  color: #fff;
  text-align: center;
}

.shared-avatar {
  width: 104px;
  height: 104px;
  border: 4px solid rgba(255, 255, 255, .25);
  border-radius: 18px;
  object-fit: cover;
}

.shared-hero h1 {
  margin: 18px 0 8px;
  font-size: 27px;
  font-weight: 600;
}

.shared-hero p {
  margin: 0;
  color: #cbc9d6;
  font-size: 14px;
  line-height: 1.6;
}

.shared-body {
  margin: -28px 16px 0;
  padding: 28px 22px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(25, 23, 45, .09);
}

.shared-bio {
  margin: 0 0 24px;
  color: #6c6b75;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.contact-row {
  display: flex;
  padding: 16px 0;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #eeeef2;
  color: #888791;
  font-size: 13px;
}

.contact-row strong {
  color: #282731;
  font-size: 17px;
}

.contact-button {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  line-height: 48px;
  text-align: center;
  text-decoration: none;
}

.outline-contact {
  border: 1px solid #dddde4;
  background: #fff;
  color: #45444e;
}

.shared-qr {
  padding: 30px 0 22px;
  text-align: center;
}

.shared-qr img {
  width: 178px;
  height: 178px;
}

.shared-qr p {
  margin: 10px 0 0;
  color: #9998a2;
  font-size: 12px;
}

.shared-footer {
  padding: 24px 0 10px;
  color: #aaa9b2;
  font-size: 11px;
  text-align: center;
}

.shared-loading {
  display: grid;
  min-height: 100dvh;
  padding: 30px;
  place-content: center;
  color: #777681;
  text-align: center;
}

.shared-loading a {
  color: var(--green);
}

/* 卡密激活 */
.permission-tag.active {
  background: rgba(8, 190, 96, .24);
  color: #a5f2c8;
}

.member-badge.active {
  border-color: rgba(8, 190, 96, .55);
  background: rgba(8, 190, 96, .2);
  color: #b7f5d2;
}

.activation-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  padding: 22px;
  place-items: center;
  background: rgba(17, 20, 31, .72);
  backdrop-filter: blur(2px);
}

.activation-dialog {
  width: min(100%, 320px);
  overflow: hidden;
  border: 1px solid #454254;
  border-radius: 4px;
  background: #211f30;
  color: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.activation-dialog h2 {
  margin: 0;
  padding: 18px 16px;
  border-bottom: 1px solid #454254;
  font-size: 16px;
  text-align: center;
}

.activation-description {
  margin: 0;
  padding: 18px 20px 14px;
  color: #aaa6b3;
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

#activation-form {
  padding: 0 20px 14px;
}

#activation-code {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 0;
  border-radius: 2px;
  outline: 0;
  background: #fff;
  color: #363441;
  font-size: 15px;
  text-transform: uppercase;
}

.activation-modules {
  display: grid;
  margin-top: 28px;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.activation-modules button {
  display: flex;
  min-width: 0;
  height: 66px;
  padding: 7px 2px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 1px solid #4d485b;
  border-radius: 2px;
  background: transparent;
  color: #9f99aa;
  font-size: 10px;
}

.activation-modules .icon {
  width: 20px;
  height: 20px;
}

.activation-modules button.active {
  border-color: #00b956;
  color: #00c55b;
}

.activation-error {
  margin: 12px 0 0;
  color: #ff9696;
  font-size: 12px;
  text-align: center;
}

.activation-actions {
  display: grid;
  margin-top: 16px;
  grid-template-columns: 1fr 1.65fr;
  gap: 10px;
}

.activation-actions button {
  height: 43px;
  font-size: 14px;
  font-weight: 600;
}

.activation-cancel {
  border: 1px solid #4d485b;
  background: transparent;
  color: #aaa5b1;
}

.activation-submit {
  background: #00b83e;
  color: #fff;
}

.activation-submit:disabled {
  opacity: .55;
}

.toast {
  position: fixed;
  z-index: 30;
  bottom: 105px;
  left: 50%;
  max-width: min(84vw, 360px);
  padding: 10px 16px;
  border-radius: 5px;
  background: rgba(25, 23, 45, .9);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .18s, transform .18s;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 视频同款创建、分享与公开页面 */
.modal-overlay {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  padding: 18px;
  place-items: center;
  background: rgba(15, 16, 25, .66);
}

.modal-dialog {
  display: flex;
  width: min(100%, 420px);
  max-height: 92dvh;
  overflow: hidden;
  flex-direction: column;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .25);
}

.modal-header {
  display: flex;
  min-height: 54px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eeeef2;
}

.modal-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.modal-close {
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  color: #777681;
  font-size: 28px;
  line-height: 1;
}

.modal-body {
  overflow-y: auto;
  padding: 18px;
  overscroll-behavior: contain;
}

.modal-form {
  display: grid;
  gap: 16px;
}

.modal-actions {
  display: grid;
  margin-top: 4px;
  grid-template-columns: 1fr 1.5fr;
  gap: 10px;
}

.modal-actions .primary-button {
  height: 44px;
  font-size: 14px;
  letter-spacing: 0;
}

.title-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option-card {
  position: relative;
  cursor: pointer;
}

.option-card input {
  position: absolute;
  opacity: 0;
}

.option-card span {
  display: grid;
  min-height: 58px;
  padding: 10px;
  place-items: center;
  border: 1px solid #dddde4;
  border-radius: 5px;
  color: #666570;
  font-size: 13px;
  text-align: center;
}

.option-card input:checked + span {
  border-color: var(--green);
  background: #eefbf4;
  color: #07954c;
}

.custom-title-fields {
  display: grid;
  gap: 16px;
}

.custom-title-fields[hidden] {
  display: none;
}

.compact-upload {
  min-height: 54px;
}

.avatar-form-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-form-row img {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
}

.avatar-form-row label {
  cursor: pointer;
}

.switch-field {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  color: #55545e;
  font-size: 14px;
}

.switch-field input {
  width: 42px;
  height: 22px;
  accent-color: var(--green);
}

.form-divider {
  padding-top: 12px;
  border-top: 1px solid #eeeef2;
  color: #888791;
  font-size: 13px;
}

.record-preview {
  display: flex;
  min-height: 82px;
  padding: 15px 14px 8px;
  align-items: center;
  gap: 12px;
}

.record-preview > div {
  min-width: 0;
}

.record-preview strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-preview p {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: #9999a2;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.note-record-preview {
  align-items: flex-start;
}

.square-record-thumb {
  width: 150px;
  height: 150px;
  margin: 14px auto 0;
  border: 0;
  border-radius: 4px;
  object-fit: cover;
}

.record-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 3px;
  background: #f0f0f3;
  color: #9998a2;
  font-size: 10px;
}

.record-status.public {
  background: #eaf9f1;
  color: #07954c;
}

.record-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.record-actions button {
  padding: 8px 4px;
}

.record-actions .danger-button {
  margin-left: 0;
}

.single-action {
  grid-template-columns: 1fr;
}

.single-action .primary-button {
  grid-column: auto;
}

.plain-note-editor {
  min-height: 54vh;
  white-space: pre-wrap;
}

.square-crop {
  border: 2px solid #fff;
  outline: 1px solid #b9bbc4;
  aspect-ratio: 1;
}

.merge-editor-heading {
  display: flex;
  padding: 16px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
}

.merge-editor-heading > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.merge-editor-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-editor-heading span {
  color: #9998a2;
  font-size: 12px;
}

.merge-editor-heading .secondary-button {
  flex: 0 0 auto;
}

.conversation-list {
  display: grid;
  gap: 18px;
  padding: 18px 12px 30px;
}

.editable-conversation {
  background: #f5f6fa;
}

.conversation-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.conversation-row.own {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 5px;
  background: #e5e5e9;
  object-fit: cover;
}

.message-main {
  max-width: calc(100% - 72px);
}

.message-sender {
  margin-bottom: 5px;
  color: #9999a2;
  font-size: 11px;
}

.message-sender time {
  margin-left: 5px;
}

.own .message-sender {
  text-align: right;
}

.message-bubble {
  padding: 10px 12px;
  border-radius: 4px;
  background: #fff;
  color: #292831;
  font-size: 15px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.own .message-bubble {
  background: #95ec69;
}

.message-delete {
  position: absolute;
  top: -10px;
  right: -5px;
  width: 23px;
  height: 23px;
  padding: 0;
  border-radius: 50%;
  background: #d8d8de;
  color: #777681;
  font-size: 16px;
  line-height: 1;
}

.own .message-delete {
  right: auto;
  left: -5px;
}

.conversation-empty {
  padding: 70px 20px;
  color: #aaaab2;
  font-size: 13px;
  text-align: center;
}

.share-dialog-content {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.share-dialog-content p {
  margin: 0;
  color: #888791;
  font-size: 13px;
  line-height: 1.6;
}

.share-qr {
  width: 220px;
  height: 220px;
  border: 1px solid #eeeef2;
}

.share-url {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #e0e0e6;
  border-radius: 4px;
  background: #f7f8fa;
  color: #777681;
  font-size: 12px;
}

.share-jump {
  height: 46px;
  background: var(--green);
  font-size: 14px;
  letter-spacing: 0;
}

.share-secondary-actions {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.public-page {
  background: #fff;
}

.public-chat-page {
  background: #ededed;
}

.public-chat-header,
.public-image-header,
.profile-topbar {
  display: grid;
  min-height: 54px;
  padding: 0 16px;
  place-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, .07);
}

.public-chat-header h1,
.public-image-header h1,
.profile-topbar h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
}

.public-chat-date {
  padding-top: 18px;
  color: #999;
  font-size: 12px;
  text-align: center;
}

.public-conversation {
  min-height: calc(100dvh - 110px);
  align-content: start;
}

/* 分享页：仿微信原生聊天记录列表 */
.wx-record-page {
  padding-bottom: 24px;
  background: #fff;
}

.wx-record-row {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #ededed;
}

.wx-record-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 4px;
  background: #ececec;
  object-fit: cover;
}

.wx-record-main {
  flex: 1;
  min-width: 0;
}

.wx-record-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.wx-record-name {
  min-width: 0;
  overflow: hidden;
  color: #8f8f8f;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wx-record-time {
  flex: 0 0 auto;
  color: #b2b2b2;
  font-size: 13px;
}

.wx-record-text {
  color: #191919;
  font-size: 17px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.wx-record-empty {
  padding: 60px 16px;
  color: #b2b2b2;
  font-size: 15px;
  text-align: center;
}

/* 最后一条消息下方：分隔线中间断开并带一个小点，与微信原生聊天记录一致 */
.wx-record-row:last-child {
  position: relative;
  border-bottom: 0;
}

.wx-record-row:last-child::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    #ededed 0,
    #ededed calc(50% - 8px),
    transparent calc(50% - 8px),
    transparent calc(50% + 8px),
    #ededed calc(50% + 8px),
    #ededed 100%
  );
}

.wx-record-row:last-child::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: #ededed;
}

.public-note-page {
  padding-top: 4px;
  background: #fff;
}

.note-green-line {
  position: fixed;
  top: 0;
  right: 0;
  left: 50%;
  width: min(100%, 470px);
  height: 4px;
  background: var(--green);
  transform: translateX(-50%);
}

.public-note {
  padding: 34px 24px 50px;
}

.public-note h1 {
  margin: 0 0 12px;
  color: #24232b;
  font-size: 25px;
  line-height: 1.4;
}

.public-note-description {
  margin: 0 0 28px;
  color: #9998a2;
  font-size: 14px;
  line-height: 1.7;
}

.public-note-content {
  color: #34333b;
  font-size: 16px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.public-image-page {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  background: #050505;
  color: #fff;
}

.public-image-header {
  flex: 0 0 54px;
  border-color: #242424;
}

.public-image-content {
  display: grid;
  min-height: calc(100dvh - 54px);
  padding: 16px;
  place-items: center;
}

.public-image-content img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 100px);
  object-fit: contain;
}

.public-profile-page {
  background: #f6f6f6;
}

.profile-card {
  background: #fff;
}

.profile-identity {
  display: flex;
  padding: 30px 22px;
  align-items: center;
  gap: 18px;
}

.profile-avatar {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border-radius: 7px;
  object-fit: cover;
}

.profile-identity h1 {
  margin: 0 0 12px;
  font-size: 23px;
  font-weight: 500;
}

.profile-identity p {
  margin: 0;
  color: #999;
  font-size: 13px;
}

.gender {
  margin-left: 5px;
  font-size: 18px;
}

.gender-male {
  color: #5786c5;
}

.gender-female {
  color: #df6d89;
}

.profile-details {
  margin: 0 22px;
  padding: 8px 0;
  border-top: 1px solid #eee;
}

.profile-details > div {
  display: grid;
  padding: 12px 0;
  grid-template-columns: 65px 1fr;
  font-size: 14px;
  line-height: 1.5;
}

.profile-details span {
  color: #999;
}

.profile-details strong {
  font-weight: 400;
  overflow-wrap: anywhere;
}

.verified-mark {
  display: inline-grid;
  width: 17px;
  height: 17px;
  margin-left: 6px;
  place-items: center;
  border-radius: 50%;
  background: #09bb61;
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.profile-actions {
  display: grid;
  margin: 20px 22px 0;
  padding: 20px 0;
  gap: 12px;
  border-top: 1px solid #eee;
}

.profile-actions button {
  min-height: 46px;
  border-radius: 5px;
  font-size: 16px;
}

.profile-primary {
  background: #07c160;
  color: #fff;
}

.profile-secondary {
  background: #f2f2f2;
  color: #333;
}

.simulation-tip {
  margin: 0;
  padding: 0 22px 24px;
  color: #aaa;
  font-size: 11px;
  text-align: center;
}

.live-chat-page {
  padding-bottom: 82px;
}

.live-chat-messages {
  min-height: calc(100dvh - 140px);
}

.chat-composer {
  position: fixed;
  z-index: 15;
  right: 0;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 470px);
  min-height: 66px;
  padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  grid-template-columns: 1fr 68px;
  gap: 8px;
  border-top: 1px solid #ddd;
  background: #f7f7f7;
  transform: translateX(-50%);
}

.chat-composer input {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  outline: none;
  background: #fff;
  font-size: 15px;
}

.chat-composer button {
  border-radius: 5px;
  background: #07c160;
  color: #fff;
}

.chat-composer button:disabled {
  opacity: .55;
}

.toast {
  z-index: 100;
}

@media (min-width: 521px) {
  .app-shell {
    box-shadow: 0 0 30px rgba(31, 35, 58, .08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation-duration: 60s;
  }
}
