#customerManagementPanel.panel { backdrop-filter: none; }

.cm-workbook {
  position: relative;
  min-width: 0;
  height: calc(100dvh - 122px);
  min-height: 430px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #c7d3e4;
  background: #fff;
  color: var(--st-ink);
  font-family: var(--st-font-family);
}

body.mobile-preview .cm-workbook {
  height: calc(var(--mobile-viewport-height, 100dvh) - var(--mobile-dashboard-height, 154px) - 95px);
  min-height: 300px;
}

body.mobile-preview.mobile-panel-open #customerManagementPanel.active-panel {
  height: calc(var(--mobile-viewport-height, 100dvh) - 72px);
  min-height: 0;
  display: flex !important;
  flex-direction: column;
}

body.mobile-preview.mobile-panel-open #customerManagementPanel > .cm-workbook {
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
}

body[data-customer-management-standalone] .cm-workbook {
  height: calc(100dvh - 72px);
}

body[data-customer-management-standalone].mobile-preview .cm-workbook {
  height: calc(100dvh - 72px);
}

.cm-sheet-head {
  min-height: 48px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #c7d3e4;
  background: #fff;
}

.cm-sheet-head > div:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.cm-sheet-head h3 {
  margin: 0;
  color: #172236;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.cm-sheet-head [data-cm-total] {
  color: #687990;
  font-size: 12px;
}

.cm-sheet-actions {
  display: flex;
  gap: 8px;
}

.cm-sheet-actions button,
.cm-filter-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #6d8fd2;
  border-radius: 5px;
  background: #fff;
  color: #31569f;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cm-sheet-actions button.primary,
.cm-filter-actions button.primary {
  background: #31569f;
  color: #fff;
}

.cm-sheet-actions button:hover:not(:disabled),
.cm-filter-actions button:hover:not(:disabled) {
  background: #526fba;
  color: #fff;
}

.cm-sheet-actions button:disabled { opacity: .48; cursor: default; }

.cm-sheet-actions [data-cm-refresh] {
  width: 84px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.cm-status {
  min-height: 28px;
  margin: 0;
  padding: 5px 12px;
  border-bottom: 1px solid #dbe3ef;
  background: #f7f9fc;
  color: #687990;
  font-size: 12px;
}

.cm-status[data-tone="success"] { color: #17795c; }
.cm-status[data-tone="warning"] { color: #8a5b00; background: #fff9e8; }
.cm-status[data-tone="error"] { color: #ad2f2f; background: #fff2f2; }
.cm-grid-frame {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cm-grid-frame[hidden] { display: none; }

.cm-grid-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
}

.cm-grid {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-family: var(--st-font-family);
  font-size: var(--st-body-font);
}

.cm-grid th,
.cm-grid td {
  box-sizing: border-box;
  height: var(--st-row-height);
  padding: 2px 4px;
  border-right: 1px solid var(--st-grid);
  border-bottom: 1px solid var(--st-grid);
  overflow: hidden;
  color: var(--st-ink);
  line-height: var(--st-body-line);
  background: #fff;
}

.cm-grid th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: var(--st-head-height);
  padding-right: calc(var(--st-filter-size) + 6px);
  background: var(--st-head-bg);
  color: var(--st-head-ink);
  font-size: var(--st-head-font);
  font-weight: 700;
  line-height: var(--st-head-line);
  text-align: center;
  white-space: nowrap;
}
.cm-four-char-label {
  width: 4em;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.cm-grid td {
  font-family: var(--st-font-family);
  font-size: var(--st-body-font);
}

.cm-grid th:first-child,
.cm-grid td:first-child { border-left: 0; }
.cm-grid tr.is-dirty td { background: #fffdf0; }
.cm-grid tr:hover td { background: #f8faff; }

.cm-grid input,
.cm-grid select {
  width: 100%;
  min-width: 0;
  height: calc(var(--st-row-height) - 8px);
  min-height: 0;
  box-sizing: border-box;
  padding: 1px 3px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 3px;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.cm-grid input:hover { border-color: #c7d3e4; background: #fff; }
.cm-grid input:focus { border-color: #6d8fd2; background: #fff; box-shadow: 0 0 0 1px #d5e1f5; }
.cm-grid input:disabled { color: #536681; opacity: 1; }
.cm-member-entry {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 2px;
}
.cm-member-link,
.cm-member-edit {
  min-width: 0;
  height: calc(var(--st-row-height) - 8px);
  padding: 1px 3px;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #31569f;
  font: inherit;
  line-height: 1.2;
  text-align: left;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.cm-member-link:hover,
.cm-member-link:focus-visible,
.cm-member-edit:hover,
.cm-member-edit:focus-visible { background: #eaf1ff; outline: 1px solid #8fa8db; }
.cm-member-edit {
  width: 24px;
  padding: 0;
  color: #687990;
  text-align: center;
  text-decoration: none;
}
.cm-grid select {
  padding-right: 14px;
  appearance: auto;
}
.cm-grid select:hover { border-color: #c7d3e4; background: #fff; }
.cm-grid select:focus { border-color: #6d8fd2; background: #fff; box-shadow: 0 0 0 1px #d5e1f5; }
.cm-grid select:disabled { color: #536681; opacity: 1; }
.cm-customer-scope-inline {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(85px, .55fr) minmax(165px, 1fr);
  gap: 2px;
  align-items: center;
}
.cm-grid td:nth-child(4) select {
  color: #233b63;
  font-weight: 600;
}
.cm-sequence { text-align: center; font-variant-numeric: tabular-nums; }
.cm-empty-row { height: 86px !important; color: #75869d !important; text-align: center; }

.cm-column-filter {
  position: absolute;
  top: 50%;
  right: 3px;
  width: var(--st-filter-size);
  height: var(--st-filter-size);
  min-height: 0;
  padding: 0;
  display: inline-grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 2px;
  background: #fff;
  color: #24704f;
  font-size: 8px;
  cursor: pointer;
}

.cm-column-filter:hover,
.cm-column-filter.filtered,
.cm-column-filter.sorted { background: #1b7452; color: #fff; }

.cm-sheet-footer {
  min-height: var(--st-footer-height);
  flex: 0 0 var(--st-footer-height);
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--st-grid);
  background: #f7f9fc;
  color: #687990;
  font-size: 12px;
}

.cm-sheet-tabs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-self: stretch;
  align-items: flex-end;
  overflow-x: auto;
  scrollbar-width: thin;
}

.cm-sheet-footer > [data-cm-visible-total] { flex: 0 0 auto; }

.cm-sheet-tab {
  flex: 0 0 auto;
  align-self: flex-end;
  height: var(--st-tab-height);
  min-height: var(--st-tab-height);
  padding: 0 14px;
  border: 1px solid var(--st-grid);
  border-bottom: 0;
  border-radius: 0;
  box-shadow: inset 0 3px 0 var(--st-tab-green);
  background: #fff;
  color: var(--st-tab-blue);
  font-family: var(--st-tab-font-family);
  font-size: var(--st-tab-font);
  font-weight: 700;
}

.cm-sheet-tab b { margin-left: 4px; }
.cm-sheet-tab:not(.active) {
  box-shadow: none;
  background: #eef3f9;
  color: #60728d;
}

.cm-filter-popover {
  position: absolute;
  z-index: 20;
  width: 238px;
  padding: 10px;
  border: 1px solid #aebed5;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgb(46 67 100 / 18%);
  background: #fff;
}

.cm-filter-popover[hidden] { display: none; }
.cm-filter-popover strong { display: block; margin-bottom: 8px; color: #172236; font-size: 13px; }
.cm-filter-popover input {
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid #b8c7dd;
  border-radius: 4px;
  font-family: "Microsoft YaHei", sans-serif;
}
.cm-filter-values { max-height: 180px; margin-top: 8px; overflow: auto; border: 1px solid #d5deeb; background: #fbfcfe; }
.cm-filter-values label { display: flex; align-items: center; gap: 7px; min-height: 28px; padding: 3px 7px; cursor: pointer; color: #31435f; font-size: 12px; }
.cm-filter-values label:hover { background: #eaf2fb; }
.cm-filter-values input { width: auto; min-height: auto; margin: 0; }
.cm-filter-values span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-filter-empty { display: block; padding: 8px; color: #74839a; font-size: 12px; }
.cm-filter-actions { margin-top: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.cm-filter-actions button { min-height: 30px; padding: 0 5px; }

.cm-col-sequence { width: 4%; }
.cm-col-inquiry-date { width: 116px; }
.cm-col-member { width: 9%; }
.cm-col-receptionist { width: 96px; }
.cm-col-customer { width: 25%; }
.cm-col-follow-status { width: 9%; }
.cm-col-requirement { width: auto; }
.cm-col-tag { width: 104px; }
.cm-col-quality { width: 80px; }

.cm-grid input[type="date"] {
  min-width: 0;
  padding-right: 1px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.1px;
  text-overflow: clip;
  white-space: nowrap;
}

.cm-system-status {
  display: block;
  overflow: hidden;
  color: #536681;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-source-platform { display:block; padding:0 12px; color:#304568; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.cm-profile-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
}
.cm-profile-summary-desktop {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.cm-profile-summary:has(> .cm-profile-summary-empty-desktop) {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.cm-profile-summary-mobile { display: none; }
.cm-profile-summary-unfiled,
.cm-member-unfiled-id { display: none; }
.cm-profile-summary-main,
.cm-profile-summary-empty {
  min-width: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #285aa6;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.cm-profile-summary-empty { color: #77869b; font-weight: 500; }
.cm-profile-summary-empty:not(:disabled) { color: #285aa6; text-decoration: underline; }
.cm-profile-contact-icons, .cm-contact-indicators { display: flex; flex-wrap: wrap; gap: 7px; }
.cm-profile-contact-icons { flex-wrap: nowrap; justify-self: end; align-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.cm-contact-indicator { display: inline-flex; color: #aeb7c4; }
.cm-contact-indicator.is-filled { color: #238636; }
.cm-contact-indicator .cm-contact-icon, .cm-profile-mobile-icon .cm-contact-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cm-contact-indicators { margin-top: 5px; }
.cm-profile-mobile-icon:not(.cm-profile-mobile-icon-company):not(.is-empty) { border-color: #79ad8a; background: #f2fbf5; color: #238636; }
.cm-profile-mobile-icon.is-empty { border-color: #c7ced8; color: #aeb7c4; background: #f5f7fa; }
.cm-profile-contact-icons b {
  min-width: 21px;
  height: 19px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e8f0ff;
  color: #315ca8;
  font-size: 10px;
  line-height: 1;
}

.cm-workbook.is-detail-page > :not(.cm-inquiry-page) { display: none; }
.cm-inquiry-page {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  background: #fff;
}
.cm-inquiry-page[hidden] { display: none; }
.cm-profile-dialog {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}
.cm-profile-head {
  position: relative;
  min-height: 48px;
  flex: 0 0 auto;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--st-grid);
  background: #fff;
  color: #294f96;
}
.cm-profile-head > div:not(.cm-profile-actions):not(.cm-phone-profile-actions) {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: max-content;
  max-width: calc(100% - 300px);
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.cm-profile-head h3 { margin: 0; font-size: 18px; }
.cm-profile-actions { position: relative; z-index: 1; display: flex; gap: 7px; margin-left: auto; }
.cm-profile-actions button,
.cm-follow-up-body > section > header button,
.cm-detail-back {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #9eb5dc;
  border-radius: 5px;
  background: #fff;
  color: #294f96;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cm-profile-actions button.primary { border-color: #526fba; background: #526fba; color: #fff; }
.cm-detail-back { position: relative; z-index: 1; }
.cm-profile-actions button:disabled { cursor: not-allowed; opacity: .55; }
.cm-follow-up-body > section > header button:disabled { cursor: default; opacity: .5; }
.cm-follow-up-body > section > header button:hover:not(:disabled) { background: #526fba; color: #fff; }
.cm-follow-up-body > section > header button:focus-visible { outline: 2px solid #31569f; outline-offset: 2px; }
.cm-inquiry-summary {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(166px, 1.1fr) minmax(0, .9fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--st-grid);
  background: #f7f9fc;
}
.cm-inquiry-summary > span {
  min-width: 0;
  min-height: 42px;
  padding: 5px 9px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: 6px;
  border-right: 1px solid var(--st-grid);
}
.cm-inquiry-summary > span:last-child { border-right: 0; }
.cm-inquiry-summary b {
  white-space: nowrap;
  color: #6a7890;
  font-size: 12px;
  line-height: 1.3;
}
.cm-inquiry-summary b::after { content: "："; }
.cm-inquiry-summary em {
  min-width: 0;
  color: #233b63;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-detail-tabs {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 10px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  border-bottom: 1px solid var(--st-grid);
  background: #fff;
}
.cm-detail-tabs button {
  min-height: 34px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #60718b;
  font: 700 13px/1 var(--st-font-family);
  cursor: pointer;
}
.cm-detail-tabs button.active,
.cm-detail-tabs button[aria-selected="true"] {
  border-bottom-color: #31569f;
  color: #294f96;
}
.cm-detail-tabs button b {
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e8eef9;
  font-size: 11px;
}
.cm-independent-inquiry-detail { padding: 18px max(18px, 15%); background: #f7faff; }
.cm-independent-detail-fields { display: grid; gap: 14px; }
.cm-independent-detail-fields label { display: grid; gap: 6px; color: #405778; font: 700 13px/1.4 var(--st-font-family); }
.cm-independent-detail-fields input, .cm-independent-detail-fields textarea { width: 100%; box-sizing: border-box; border: 1px solid #b8c8df; border-radius: 3px; padding: 8px; color: #293445; font: 14px/1.5 var(--st-font-family); resize: vertical; }
.cm-independent-top-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cm-independent-detail-composer { display: grid; gap: 6px; color: #405778; font: 700 13px/1.4 var(--st-font-family); }
.cm-independent-drop-zone { display: grid; gap: 7px; padding: 9px; border: 1px dashed #8da5cc; border-radius: 4px; background: #fff; color: #405778; font: 700 13px/1.4 var(--st-font-family); transition: border-color .15s, background .15s, box-shadow .15s; }
.cm-independent-drop-zone textarea { border: 0; min-height: 126px; padding: 0; outline: 0; resize: vertical; }
.cm-independent-drop-zone:focus-within { border-color: #526fba; box-shadow: 0 0 0 1px #d5e1f5; }
.cm-independent-drop-zone.is-dragging { border-color: #31569f; background: #eef4ff; box-shadow: inset 0 0 0 1px #31569f; }
.cm-independent-drop-zone > p { margin: 0; color: #657792; font-size: 12px; font-weight: 400; }
.cm-independent-screenshot-list { display: grid; gap: 6px; }
.cm-independent-screenshot-list article { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 6px; border: 1px solid #d5dfed; background: #f9fbff; }
.cm-independent-screenshot-list article span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.cm-independent-screenshot-list article small { color: #708199; font-weight: 400; }
.cm-independent-screenshot-open { min-height: 28px; padding: 0 9px; border: 1px solid #6d8fd2; background: #fff; color: #31569f; font-weight: 700; cursor: pointer; }
.cm-independent-screenshot-empty { margin: 0; color: #708199; font-size: 12px; font-weight: 400; }
.cm-independent-link-line { display: flex; gap: 8px; align-items: flex-start; }
.cm-independent-link-line textarea { min-width: 0; min-height: 62px; }
.cm-independent-link-line a { min-height: 34px; box-sizing: border-box; padding: 6px 12px; border: 1px solid #6d8fd2; border-radius: 3px; background: #fff; white-space: nowrap; color: #31569f; font-weight: 700; text-decoration: none; }
.cm-independent-link-empty { min-height: 34px; box-sizing: border-box; padding: 7px 0; color: #708199; font-weight: 400; }
.cm-independent-link-line a[hidden], .cm-independent-link-empty[hidden] { display: none; }
.cm-independent-detail-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.cm-independent-detail-actions button { min-height: 34px; padding: 0 14px; }
@media (max-width: 680px) {
  .cm-independent-inquiry-detail { padding: 12px; }
  .cm-independent-top-row { grid-template-columns: 1fr; }
  .cm-independent-screenshot-list article { grid-template-columns: auto minmax(0,1fr); }
  .cm-independent-screenshot-list article .st-table-action { grid-column: 1 / -1; justify-self: start; }
}
.cm-profile-body { min-height: 0; flex: 1 1 auto; overflow: auto; padding: 10px; }
.cm-profile-body[hidden] { display: none; }
.cm-follow-up-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 10px;
}
.cm-follow-up-body[hidden] { display: none; }
.cm-follow-up-form[hidden],
.cm-follow-up-history[hidden],
[data-cm-follow-up-add][hidden] { display: none; }
.cm-follow-up-form,
.cm-follow-up-history {
  min-width: 0;
  border: 1px solid var(--st-grid);
  background: #fff;
}
.cm-follow-up-form > header,
.cm-follow-up-history > header {
  min-height: 36px;
  padding: 5px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--st-grid);
  background: var(--st-head-bg);
  color: var(--st-head-ink);
  font-size: 12px;
}
.cm-follow-up-form > header span,
.cm-follow-up-history > header span { color: #6b7b91; font-size: 11px; font-weight: 400; }
.cm-follow-up-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr) minmax(0, 1fr);
  align-items: end;
  gap: 16px 12px;
  padding: 18px;
}
.cm-follow-up-form { width: 70%; margin-inline: auto; border: 1px solid #c5d1e5; border-radius: 8px; }
.cm-follow-up-form > header { padding: 10px 18px; border: 0; border-radius: 6px; background: #f3f6fb; }
.cm-follow-up-fields .cm-follow-up-inline { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.cm-follow-up-inline > span { white-space: nowrap; }
.cm-follow-up-inline input, .cm-follow-up-inline select { min-width: 0; }
.cm-follow-up-screenshot { padding: 0; font-size: 12px; }
.cm-follow-up-screenshot > span { display: block; margin-bottom: 6px; color: #60718b; font-weight: 700; }
.cm-follow-up-paste-hint { margin: 0 0 8px; font-size: 11px; color: #687990; line-height: 1.5; }
.cm-follow-up-screenshot > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.cm-follow-up-screenshot input[type="file"] { width: min(100%, 245px); }
.cm-follow-up-screenshot button,
.cm-follow-up-screenshot input::file-selector-button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #9db2e0;
  border-radius: 4px;
  background: #fff;
  color: #31569f;
  font: 700 12px/1.35 var(--st-font-family);
  cursor: pointer;
}
.cm-follow-up-screenshot button:disabled { opacity: .5; cursor: default; }
.cm-follow-up-screenshot button:hover:not(:disabled) { background: #eef3ff; }
[data-cm-follow-up-screenshot-name] { overflow-wrap: anywhere; max-width: 50%; color: #687990; }
.cm-follow-up-screenshot .cm-follow-up-upload { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; border-style: dashed; }
.cm-follow-up-upload svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.cm-follow-up-paste-zone { min-width: 170px; max-width: 100%; min-height: 38px; padding: 10px 12px; border: 1px dashed #9db2e0; border-radius: 4px; color: #31569f; font: 12px/1.35 var(--st-font-family); cursor: text; overflow-wrap: anywhere; }
.cm-follow-up-paste-zone:empty::before { content: attr(data-placeholder); pointer-events: none; }
.cm-follow-up-paste-zone:focus { outline: 2px solid #b6c7ef; outline-offset: 2px; background: #f6f8ff; }
.cm-follow-up-paste-zone[aria-disabled="true"] { opacity: .5; cursor: default; }
.cm-follow-up-screenshot .cm-follow-up-thumbnail { width: 72px; height: 58px; padding: 3px; overflow: hidden; }
.cm-follow-up-thumbnail img { width: 100%; height: 100%; object-fit: contain; display: block; }
[data-cm-follow-up-screenshot-add][hidden],
[data-cm-follow-up-screenshot-preview][hidden], [data-cm-follow-up-screenshot-remove][hidden] { display: none; }
@media (min-width: 681px) and (max-width: 1000px) {
  .cm-follow-up-fields { padding: 12px 0; gap: 14px 8px; }
}
.cm-follow-up-fields label {
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 0;
}
.cm-follow-up-fields label > span { color: #60718b; font-size: 11px; font-weight: 700; }
.cm-follow-up-fields input,
.cm-follow-up-fields select,
.cm-follow-up-fields textarea {
  width: 100%;
  min-height: 34px;
  box-sizing: border-box;
  padding: 4px 6px;
  border: 1px solid #b8c7dd;
  border-radius: 5px;
  background: #fff;
  color: var(--st-ink);
  font: 12px/1.35 var(--st-font-family);
  resize: vertical;
}
.cm-follow-up-fields .cm-follow-up-wide {
  grid-column: 1 / -1;
  border-right: 0;
}
.cm-follow-up-submit {
  grid-column: 1 / -1;
  min-height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.cm-follow-up-submit button {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid #526fba;
  border-radius: 4px;
  background: #526fba;
  color: #fff;
  font: 700 12px/1 var(--st-font-family);
}
.cm-follow-up-submit button:disabled { cursor: default; opacity: .5; }
.cm-follow-up-submit [data-cm-follow-up-cancel] { background: #fff; color: #31569f; border-color: #9db2e0; }
.cm-follow-up-fields textarea { min-height: calc(3 * 1.35em + 10px); }
.cm-follow-up-form > p {
  min-height: 28px;
  margin: 0;
  padding: 5px 8px;
  color: #687990;
  font-size: 11px;
}
.cm-follow-up-form > p[data-tone="success"] { color: #17795c; }
.cm-follow-up-form > p[data-tone="warning"] { color: #8a5b00; background: #fff9e8; }
.cm-follow-up-form > p[data-tone="error"] { color: #ad2f2f; background: #fff2f2; }
.cm-follow-up-status { margin: 0; padding: 5px 9px; color: #17795c; font-size: 12px; }
.cm-follow-up-scroll { max-height: 285px; overflow: auto; }
.cm-follow-up-history table {
  width: 100%;
  min-width: 880px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--st-ink);
  font: var(--st-body-font)/var(--st-body-line) var(--st-font-family);
}
.cm-follow-up-history th,
.cm-follow-up-history td {
  padding: 7px 8px;
  border-right: 1px solid var(--st-grid);
  border-bottom: 1px solid var(--st-grid);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.cm-follow-up-history th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--st-head-bg);
  color: var(--st-head-ink);
  text-align: center;
  white-space: nowrap;
}
.cm-follow-up-history th:nth-child(1) { width: 138px; }
.cm-follow-up-history th:nth-child(2) { width: 82px; }
.cm-follow-up-history th:nth-child(4) { width: 140px; }
.cm-follow-up-history td:nth-child(4) { text-align: center; }
.cm-follow-up-history th:nth-child(5) { width: 100px; }
.cm-follow-up-history th:nth-child(6) { width: 96px; }
.cm-follow-up-empty { height: 72px; color: #75869d; text-align: center !important; vertical-align: middle !important; }
.cm-profile-status {
  position: fixed;
  z-index: 1000;
  inset: 0;
  padding: 18px;
  display: grid;
  place-items: center;
  background: rgb(18 31 54 / 58%);
  pointer-events: auto;
}
.cm-profile-status[hidden] { display: none; }
.cm-image-source-menu {
  position: fixed;
  z-index: 1100;
  width: 164px;
  max-width: calc(100vw - 16px);
  padding: 4px;
  border: 1px solid #c9d5e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 18px rgb(28 49 82 / 16%);
}
.cm-image-source-menu[hidden] { display: none; }
.cm-image-source-menu button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: #31569f;
  text-align: left;
  font: 14px/1.4 "Microsoft YaHei", sans-serif;
  cursor: pointer;
}
.cm-image-source-menu button:hover, .cm-image-source-menu button:focus-visible { background: #eef3fb; }
.cm-profile-status-card {
  box-sizing: border-box;
  position: relative;
  width: min(430px, 100%);
  min-height: 150px;
  padding: 20px 18px 14px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #8fa7cc;
  border-top: 4px solid #526fba;
  border-radius: 8px;
  background: #fff;
  color: #26364d;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
  box-shadow: 0 16px 45px rgb(10 25 50 / 30%);
}
.cm-profile-status[data-confirm-action="save-close"] .cm-profile-status-card {
  /* POST-295: size to the message, not a fixed empty rectangle. */
  width: max-content;
  max-width: calc(100% - 12px);
  min-height: 0;
  padding: 8px 12px;
  grid-template-rows: auto auto;
  gap: 8px;
  color: #26364d;
  font-size: 14px;
}
.cm-profile-status[data-confirm-action="save-close"] .cm-profile-status-actions button { min-width: 48px; min-height: 32px; }
.cm-profile-status-actions { display: flex; justify-content: center; gap: 7px; }
.cm-profile-status-actions[hidden] { display: none; }
.cm-profile-status-actions button,
.cm-profile-image-card button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #7896c8;
  border-radius: 4px;
  background: #fff;
  color: #31569f;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cm-profile-status-dismiss {
  justify-self: center;
  min-width: 72px;
  min-height: 28px;
  padding: 0 14px;
  border: 1px solid #9bb0d1;
  border-radius: 4px;
  background: #fff;
  color: #31569f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cm-profile-status-dismiss[hidden] { display: none; }
.cm-profile-image-card button.danger { border-color: #cf7f75; color: #a9382c; }
.cm-profile-status-card button.danger { border-color: #cf7f75; color: #a9382c; }
.cm-profile-status-card button.primary { border-color: #526fba; background: #526fba; color: #fff; }
.cm-main-unsaved {
  position: fixed;
  z-index: 1220;
  inset: 0;
  padding: 18px;
  display: grid;
  place-items: center;
  background: rgb(18 31 54 / 58%);
}
.cm-main-unsaved[hidden] { display: none; }
.cm-main-unsaved-card {
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100% - 12px);
  padding: 10px 14px;
  display: grid;
  gap: 10px;
  border: 1px solid #8fa7cc;
  border-top: 4px solid #526fba;
  border-radius: 8px;
  background: #fff;
  color: #26364d;
  font: 14px/1.55 "Microsoft YaHei", sans-serif;
  text-align: center;
  box-shadow: 0 16px 45px rgb(10 25 50 / 30%);
}
.cm-main-unsaved-actions { display: flex; justify-content: center; gap: 8px; }
.cm-main-unsaved-actions button {
  min-width: 48px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #7896c8;
  border-radius: 4px;
  background: #fff;
  color: #31569f;
  font: 700 12px "Microsoft YaHei", sans-serif;
  cursor: pointer;
}
.cm-main-unsaved-actions button.primary { border-color: #526fba; background: #526fba; color: #fff; }
.cm-main-unsaved-actions button:disabled { opacity: .55; cursor: default; }
.cm-profile-table-scroll {
  width: 70%;
  margin-inline: auto;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--st-grid);
  background: #fff;
}
.cm-profile-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-family: var(--st-font-family);
  font-size: var(--st-body-font);
  color: var(--st-ink);
}
.cm-profile-table .cm-profile-label-col { width: 60.48px; }
.cm-profile-table .cm-profile-value-col { width: calc(50% - 60.48px); }
.cm-profile-table th,
.cm-profile-table td {
  box-sizing: border-box;
  min-height: var(--st-row-height);
  padding: 3px 5px;
  border-right: 1px solid var(--st-grid);
  border-bottom: 1px solid var(--st-grid);
  vertical-align: middle;
}
.cm-profile-table tr > :last-child { border-right: 0; }
.cm-profile-table tbody tr:last-child > * { border-bottom: 0; }
.cm-profile-table tbody th {
  overflow-wrap: anywhere;
  height: var(--st-row-height);
  background: #f7f9fc;
  color: var(--st-head-ink);
  font-weight: 700;
  text-align: center;
  white-space: normal;
}
.cm-profile-table tbody td { background: #fff; }
.cm-profile-table input,
.cm-profile-table textarea {
  width: 100%;
  min-height: calc(var(--st-row-height) - 8px);
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--st-ink);
  font-family: var(--st-font-family);
  font-size: var(--st-body-font);
  line-height: var(--st-body-line);
}
.cm-profile-table input:hover:not(:disabled),
.cm-profile-table textarea:hover:not(:disabled) { border-color: #c7d3e4; }
.cm-profile-table input:focus,
.cm-profile-table textarea:focus {
  border-color: #6d8fd2;
  outline: 0;
  box-shadow: 0 0 0 1px #d5e1f5;
}
.cm-profile-table input:disabled,
.cm-profile-table textarea:disabled { background: #f2f5f9; color: #5f6f84; opacity: 1; }
.cm-profile-table [data-cm-profile-readonly="true"] {
  border-color: #cbd6e5;
  background: #eef2f7;
  color: #53647c;
}
.cm-profile-control { min-width: 0; display: grid; gap: 3px; }
.cm-profile-control small {
  color: #8a5d1d;
  font-size: 11px;
  line-height: 1.25;
}
.cm-profile-control small[hidden] { display: none; }
.cm-profile-channel { position: relative; min-width: 0; }
.cm-profile-account-box { position: relative; display: contents; min-width: 0; }
.cm-profile-account-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--st-action-height) auto;
  align-items: center;
  gap: 4px;
}
.cm-profile-image-icon {
  box-sizing: border-box;
  position: relative;
  height: var(--st-action-height);
  width: var(--st-action-height);
  min-width: var(--st-action-height);
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid #6d8fd2;
  border-radius: var(--st-action-radius);
  background: #fff;
  color: #31569f;
  cursor: pointer;
}
.cm-profile-image-icon:hover { background: #526fba; color: #fff; }
.cm-profile-image-icon:has(input:disabled) { cursor: default; opacity: .5; }
.cm-profile-image-icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.cm-profile-image-icon input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
.cm-profile-thumb-button {
  box-sizing: border-box;
  height: var(--st-action-height);
  width: 36px;
  min-height: var(--st-action-height);
  padding: 0;
  border: 1px solid #9fb4d3;
  border-radius: var(--st-action-radius);
  background: #fff;
  color: #31569f;
  cursor: pointer;
}
.cm-profile-thumb-button[hidden] { display: none; }
.cm-profile-thumb-button:hover,
.cm-profile-thumb-button:focus-visible { background: #526fba; color: #fff; }
.cm-profile-thumb-button .cm-profile-saved-image-icon,
.cm-phone-profile-image-button .cm-profile-saved-image-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.cm-profile-thumb-button img {
  display: none;
}
.cm-phone-profile-image-button {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid #9fb4d3;
  border-radius: 5px;
  background: #fff;
  color: #31569f;
  cursor: pointer;
}
.cm-phone-profile-image-button:hover,
.cm-phone-profile-image-button:focus-visible { background: #526fba; color: #fff; }
.cm-profile-image-viewer {
  position: absolute;
  z-index: 5;
  inset: 0;
  padding: 18px;
  display: grid;
  place-items: center;
  background: rgb(18 31 54 / 58%);
}
.cm-profile-image-viewer[hidden] { display: none; }
.cm-profile-image-card {
  width: min(620px, 100%);
  max-height: calc(100% - 8px);
  padding: 10px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 9px;
  overflow: hidden;
  border: 1px solid #7795c8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 45px rgb(10 25 50 / 32%);
}
.cm-profile-image-card > header,
.cm-profile-image-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cm-profile-image-card > header strong { color: #294f8f; font-size: 15px; }
.cm-profile-image-card > header button { min-width: 30px; padding: 0; font-size: 20px; line-height: 1; }
.cm-profile-image-card > footer { justify-content: flex-end; }
.cm-profile-image-card > footer[hidden] { display: none; }
.cm-profile-image-card > img {
  width: 100%;
  height: min(340px, 40vh);
  min-height: 0;
  object-fit: contain;
  border: 1px solid #d0d9e7;
  border-radius: 5px;
  background: #f4f6fa;
}

@media (min-width: 681px) and (max-width: 1366px) {
  body.mobile-preview .cm-sheet-head { min-height: 46px; padding: 5px 8px; }
  body.mobile-preview .cm-sheet-head h3 { font-size: 16px; }
  body.mobile-preview .cm-sheet-actions { gap: 6px; }
  body.mobile-preview .cm-sheet-actions button { min-height: 34px; padding: 0 8px; font-size: 11.5px; }
  body.mobile-preview .cm-sheet-actions [data-cm-refresh] { width: 72px; min-height: 34px; padding: 0 8px; font-size: 13px; }
}

@media (max-width: 900px) {
  .cm-workbook { min-height: 300px; }
  .cm-grid { width: 1180px; min-width: 1180px; }
  .cm-sheet-head { min-height: 46px; padding: 5px 8px; }
  .cm-sheet-head h3 { font-size: 16px; }
  .cm-sheet-actions { gap: 5px; }
  .cm-sheet-actions button { min-height: 34px; padding: 0 8px; font-size: 11.5px; }
  .cm-sheet-actions [data-cm-refresh] { width: 72px; min-height: 34px; padding: 0 8px; font-size: 13px; }
}

@media (max-width: 680px), (max-width: 960px) and (max-height: 500px) and (pointer: coarse) {
  body[data-customer-management-standalone].mobile-preview .cm-workbook {
    height: calc(100dvh - 48px);
  }
  .cm-workbook {
    min-height: 330px;
    border-right: 0;
    border-left: 0;
  }
  .cm-sheet-head {
    min-height: 40px;
    padding: 4px 8px;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
  }
  .cm-sheet-head > div:first-child { display: none; }
  .cm-sheet-head h3 { font-size: 14px; }
  .cm-sheet-head [data-cm-total] { font-size: 10px; }
  .cm-sheet-actions { width: auto; display: flex; justify-content: flex-end; }
  .cm-sheet-actions [data-cm-add],
  .cm-sheet-actions [data-cm-save] { display: none; }
  .cm-sheet-actions button { min-width: 0; min-height: 32px; padding: 0 10px; }
  .cm-sheet-actions [data-cm-refresh] { width: auto; min-height: 32px; padding: 0 5px; font-size: 11px; }
  .cm-status { min-height: 26px; padding: 4px 8px; }
  .cm-grid-scroll { overflow-x: hidden; overflow-y: auto; }
  .cm-grid { width: 100%; min-width: 0; }
  .cm-grid th,
  .cm-grid td { height: 42px; padding: 2px; font-size: 13px; }
  .cm-grid th { padding-right: 15px; font-size: 13px; }
  .cm-grid col:nth-child(2),
  .cm-grid col:nth-child(6),
  .cm-grid col:nth-child(7),
  .cm-grid col:nth-child(8),
  .cm-grid col:nth-child(9),
  .cm-grid th:nth-child(2),
  .cm-grid th:nth-child(6),
  .cm-grid th:nth-child(7),
  .cm-grid th:nth-child(8),
  .cm-grid th:nth-child(9),
  .cm-grid td:nth-child(2),
  .cm-grid td:nth-child(6),
  .cm-grid td:nth-child(7),
  .cm-grid td:nth-child(8),
  .cm-grid td:nth-child(9) { display: none; }
  .cm-grid .cm-col-sequence { width: 34px; }
  .cm-grid .cm-col-member { width: 22%; }
  .cm-grid .cm-col-receptionist { width: 33%; }
  .cm-grid .cm-col-customer { width: auto; }
  .cm-grid .cm-responsive-heading[data-phone-label] {
    font-size: 0;
  }
  .cm-grid .cm-responsive-heading[data-phone-label]::after {
    content: attr(data-phone-label);
    font-size: 13px;
  }
  .cm-grid .cm-four-char-label { width: auto; display: inline; }
  .cm-grid select { padding-right: 2px; appearance: none; }
  .cm-member-entry { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cm-member-edit { display: none; }
  .cm-profile-summary-desktop { display: none; }
  .cm-profile-summary-mobile {
    min-width: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 2px;
    white-space: nowrap;
  }
  .cm-profile-mobile-icon {
    width: 100%;
    height: 26px;
    min-width: 0;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid #a9bbdb;
    border-radius: 4px;
    background: #f5f8ff;
    color: #315ca8;
    font: 700 10px/1 var(--st-font-family);
    cursor: pointer;
  }
  .cm-profile-mobile-icon:hover,
  .cm-profile-mobile-icon:focus-visible {
    border-color: #5778bb;
    background: #e8f0ff;
    outline: 1px solid #8fa8db;
  }
  .cm-profile-mobile-icon-phone,
  .cm-profile-mobile-icon-email { font-size: 14px; }
  .cm-profile-summary-empty {
    width: 100%;
    padding: 0 2px;
    font-size: 11px;
    text-align: center;
  }
  .cm-profile-summary-empty-desktop { display: none; }
  .cm-profile-summary-unfiled {
    display: block;
    color: #77869b;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
  }
  .cm-column-filter { right: 1px; }
  .cm-sheet-footer { padding: 0 6px; }
  .cm-profile-head { align-items: center; padding: 8px; }
  .cm-profile-head > div:not(.cm-profile-actions) { position: static; width: auto; max-width: none; transform: none; margin-left: auto; }
  .cm-profile-actions { display: none; }
  .cm-detail-back { min-height: 32px; padding: 0 7px; font-size: 11px; }
  .cm-profile-head h3 { font-size: 15px; }
  .cm-profile-actions { gap: 4px; }
  .cm-profile-actions [data-cm-profile-edit],
  .cm-profile-actions [data-cm-profile-save] { display: none; }
  .cm-profile-image-icon { display: none; }
  .cm-profile-account-line { grid-template-columns: minmax(0, 1fr) auto; }
  .cm-profile-actions button { min-height: 32px; padding: 0 7px; font-size: 11px; }
  .cm-profile-body { padding: 6px; }
  .cm-inquiry-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cm-inquiry-summary > span { min-height: 38px; border-bottom: 1px solid var(--st-grid); }
  .cm-inquiry-summary > span:nth-child(2n) { border-right: 0; }
  .cm-inquiry-summary > span:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .cm-detail-tabs { min-height: 38px; padding: 0 5px; }
  .cm-detail-tabs button { min-height: 32px; flex: 1 1 50%; padding: 0 6px; font-size: 12px; }
  .cm-follow-up-body { padding: 6px; }
  .cm-follow-up-form .cm-follow-up-fields { display: none; }
  .cm-follow-up-form > header { align-items: flex-start; flex-direction: column; gap: 2px; }
  .cm-follow-up-scroll { max-height: none; }
  .cm-profile-table-scroll { width: 100%; overflow: visible; }
  .cm-profile-table {
    width: 100%;
    min-width: 0;
    display: block;
    table-layout: auto;
  }
  .cm-profile-table colgroup { display: none; }
  .cm-profile-table tbody { display: block; }
  .cm-profile-table tbody tr {
    display: grid;
    grid-template-columns: 86.4px minmax(0, 1fr);
  }
  .cm-profile-table tbody th,
  .cm-profile-table tbody td {
    width: auto;
    min-width: 0;
    min-height: 35px;
    height: auto;
    border-right: 1px solid var(--st-grid);
    border-bottom: 1px solid var(--st-grid);
  }
  .cm-profile-table tbody td { border-right: 0; }
  .cm-profile-table tbody tr:last-child > * { border-bottom: 1px solid var(--st-grid); }
  .cm-profile-table tbody tr:last-child > :nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 360px) {
  .cm-profile-actions button { padding: 0 4px; font-size: 10.5px; }
}

.cm-phone-customers { display: none; }
.cm-phone-retry { display: none; }
.cm-phone-detail-overview, .cm-phone-profile-list, .cm-phone-followups { display: none; }
.cm-phone-profile-actions { display: none; }
.cm-phone-edit-entry { display: none; }
.cm-phone-detail-back { display: none; }
.cm-follow-up-evidence-hint { margin: 0; color: #77859a; font-size: 12px; line-height: 1.6; }

/* POST-279: one bounded upload target, with a native editable paste host. */
.cm-follow-up-screenshot {
  border: 1px dashed #b6c7e0; border-radius: 6px; padding: 14px 12px 10px;
  background: #fafbfd; text-align: center;
}
.cm-follow-up-screenshot.is-dragging { border-color: #436ac0; background: #edf3ff; outline: 2px solid #dce7fc; }
.cm-follow-up-screenshot > .cm-follow-up-upload-content { justify-content: center; gap: 8px; }
.cm-follow-up-screenshot .cm-follow-up-upload {
  flex-direction: column; justify-content: center; gap: 6px; border: 0; background: transparent; padding: 0 14px;
}
.cm-follow-up-upload svg { width: 24px; height: 24px; }
.cm-follow-up-screenshot .cm-follow-up-paste-zone {
  display: block; min-width: 0; min-height: 28px; padding: 6px 2px 2px; border: 0;
  border-radius: 3px; font-size: 11px; line-height: 1.5; color: #6b7c95;
}
.cm-follow-up-screenshot .cm-follow-up-paste-hint { margin: 2px 0 0; font-size: 10px; color: #7f8b9b; }
.cm-follow-up-screenshot .cm-follow-up-thumbnail { width: 88px; height: 64px; }
[data-cm-follow-up-screenshot-replace][hidden] { display: none; }

/* 手机客户列表是独立阅读视图，PC/平板九列表格保持不变。 */
@media (max-width: 680px), (max-width: 960px) and (max-height: 500px) and (pointer: coarse) {
  /* POST-283: content height, capped for internal scrolling; no full-screen card. */
  body.mobile-preview.mobile-panel-open #customerManagementPanel.active-panel:not(:has(.is-detail-page)) {
    height: auto; min-height: 0; max-height: calc(var(--mobile-viewport-height, 100dvh) - 88px);
    background: transparent; box-shadow: none;
  }
  body .cm-workbook:not(.is-detail-page) {
    height: auto !important; min-height: 0; max-height: calc(var(--mobile-viewport-height, 100dvh) - 88px);
    flex: 0 1 auto !important; border: 0; border-radius: 0; box-shadow: none;
  }
  .cm-workbook:not(.is-detail-page) > .cm-grid-frame { display: none; }
  #customerManagementPanel > .customer-management-topbar,
  .cm-workbook > .cm-sheet-head,
  .cm-workbook > .cm-status[data-tone="success"],
  .cm-workbook > .cm-status:empty { display: none; }
  .cm-workbook:not(.is-detail-page) > .cm-phone-retry:not([hidden]) {
    display: block; align-self: flex-start; margin: 0 8px 6px; padding: 5px 10px;
    border: 1px solid #9eb5dc; border-radius: 4px; background: #fff; color: #405c98;
  }
  .cm-workbook:not(.is-detail-page) > .cm-phone-customers {
    display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; min-width: 0;
    background: #fff; color: #27364b; font-family: "Microsoft YaHei", Arial, sans-serif;
  }
  .cm-phone-tools { flex: 0 0 auto; padding: 2px 12px 0; }
  .cm-phone-tools > select {
    width: 100%; height: 36px; border: 0; background: #fff; color: #27364b;
    font: 700 17px "Microsoft YaHei", sans-serif; padding: 0 4px;
  }
  .cm-phone-search-line { display: flex; gap: 8px; margin-top: 6px; align-items: center; }
  .cm-phone-search-line input {
    width: 0; flex: 1; min-width: 0; height: 40px; box-sizing: border-box; border: 1px solid #e5e9ef;
    border-radius: 6px; background: #f4f6f8; padding: 0 10px; font-size: 14px;
  }
  .cm-phone-search-line button, .cm-phone-filters button {
    flex: 0 0 auto; min-height: 40px; padding: 0 8px; border: 0; background: #fff;
    color: #405c98; font: 600 14px "Microsoft YaHei", sans-serif;
  }
  .cm-phone-search-line button { height: 40px; min-height: 40px; width: 68px; padding: 0 4px; border: 1px solid #d8e1ef; border-radius: 6px; background: #f6f8fc; box-sizing: border-box; }
  .cm-phone-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 0; }
  .cm-phone-filters[hidden] { display: none; }
  .cm-phone-filters label { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 12px; }
  .cm-phone-filters select { flex: 1; min-width: 0; width: 0; height: 34px; border: 1px solid #d9e0ec; background: #fff; }
  .cm-phone-filters button { grid-column: 1 / -1; min-height: 30px; justify-self: end; }
  .cm-phone-count { margin: 0; padding: 8px 0 6px; font-size: 12px; color: #758296; border-bottom: 1px solid #edf0f4; }
  .cm-phone-list { overflow-y: auto; overflow-x: hidden; flex: 0 1 auto; min-height: 0; padding: 0 12px; overscroll-behavior: contain; }
  .cm-phone-list > [role="listitem"] { height: auto; min-height: 0; margin: 0; padding: 0; }
  .cm-phone-list .cm-phone-customer {
    display: block; width: 100%; min-width: 0; border: 0; border-bottom: 1px solid #e8edf3;
    height: auto; min-height: 0; border-radius: 0; box-shadow: none; margin: 0; padding: 12px 0; background: #fff;
    color: #667183; text-align: left; white-space: normal; font: 14px/1.65 "Microsoft YaHei", Arial, sans-serif;
    cursor: pointer; overflow-wrap: anywhere;
  }
  .cm-phone-list .cm-phone-customer:focus-visible { outline: 2px solid #5473b1; outline-offset: -2px; }
  .cm-phone-list .cm-phone-customer:active { background: #f5f8fc; }
  .cm-phone-customer-heading { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 7px; }
  .cm-phone-customer-heading strong { flex: 1; min-width: 0; color: #202b3b; font-size: 17px; font-weight: 700; line-height: 1.5; }
  .cm-phone-star { flex: 0 0 auto; color: #a57920; font-size: 12px; }
  /* POST-288: contact availability beside the title; all status labels below. */
  .cm-phone-customer-heading .cm-contact-indicators { flex: 0 0 auto; flex-wrap: nowrap; gap: 8px; margin: 4px 0 0; }
  .cm-phone-filed { font-size: 11px; color: #738197; background: #f1f4f8; padding: 0 5px; border-radius: 3px; }
  .cm-phone-card-identity, .cm-phone-card-status { display: block; min-width: 0; }
  .cm-phone-card-status { margin-top: 6px; font-size: 12px; color: #7a8797; }
  .cm-phone-line { display: block; }
  .cm-phone-receptionist { display: inline-block; margin-left: 12px; }
  .cm-phone-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .cm-phone-badges > span { background: #f0f3f9; color: #6073a0; padding: 1px 7px; border-radius: 3px; font-size: 12px; }
  .cm-phone-badges .cm-phone-follow-status { margin-left: 0; background: #f3f4f6; color: #657184; }
  .cm-phone-badges > .cm-phone-star { color: #a57920; background: #faf5e8; }
  .cm-phone-badges > .cm-phone-filed { color: #738197; background: #f1f4f8; }
  .cm-phone-empty { padding: 32px 5px; text-align: center; color: #758296; font-size: 14px; }

  /* POST-272: 默认阅读资料，显式编辑时复用既有档案表单。 */
  .cm-inquiry-page .cm-profile-dialog {
    display: block; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    font-family: "Microsoft YaHei", Arial, sans-serif;
  }
  /* The detail page owns its sole navigation; the list keeps the host's home bar. */
  body:has(#customerManagementPanel .is-detail-page) .mobile-active-module-bar,
  #customerManagementPanel:has(.is-detail-page) > .panel-head { display: none !important; }
  body.mobile-preview.mobile-panel-open #customerManagementPanel.active-panel:has(.is-detail-page) {
    height: var(--mobile-viewport-height, 100dvh); margin: 0; border: 0; border-radius: 0; box-shadow: none;
  }
  .cm-workbook.is-detail-page { border: 0; border-radius: 0; box-shadow: none; }
  body[data-customer-management-standalone].mobile-preview .cm-workbook.is-detail-page { height: 100dvh; }
  .cm-profile-head { position: sticky; top: 0; z-index: 3; height: 48px; min-height: 48px; padding: 6px 12px; border-bottom: 0; }
  .cm-profile-head > div:not(.cm-profile-actions):not(.cm-phone-profile-actions) {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    margin: 0; width: max-content; max-width: calc(100% - 150px);
  }
  .cm-profile-head h3 { color: #243245; font-size: 16px; font-weight: 500; }
  .cm-profile-head > .cm-phone-profile-actions { position: relative; left: auto; top: auto; transform: none; width: auto; max-width: none; pointer-events: auto; }
  .cm-phone-detail-back { display: grid; place-items: center; width: 36px; height: 36px; padding: 6px; border: 0; background: transparent; color: #405c98; cursor: pointer; }
  .cm-phone-detail-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
  .cm-detail-back { border: 0; padding: 0; color: #405778; background: transparent; font-size: 12px; }
  .cm-inquiry-summary, .cm-profile-body > .cm-profile-table-scroll,
  .cm-follow-up-body > .cm-follow-up-form, .cm-follow-up-body > .cm-follow-up-history { display: none; }
  .cm-phone-detail-overview { display: block; padding: 4px 16px 8px; color: #293445; }
  .cm-phone-detail-heading { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
  .cm-phone-detail-overview h2 { display: none; }
  .cm-phone-detail-heading { float: right; margin: 3px 0 0 8px; }
  .cm-phone-detail-subtitle { margin: 3px 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; font-size: 13px; color: #7b8592; }
  /* POST-296: detail summary only; list/card star sizes stay unchanged. */
  .cm-phone-detail-overview .cm-phone-star { font-size: 13px; }
  .cm-phone-detail-overview dl { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; }
  .cm-phone-detail-overview dl > div { display: flex; align-items: baseline; min-width: 0; gap: 6px; font-size: 13px; line-height: 1.6; }
  .cm-phone-detail-overview dt { white-space: nowrap; }
  .cm-phone-detail-overview dt, .cm-phone-profile-list dt { color: #84909e; font-weight: 400; }
  .cm-phone-detail-overview dd { margin: 0; overflow-wrap: anywhere; }
  .cm-detail-tabs { position: sticky; top: 48px; z-index: 2; background: #fff; padding: 0 12px; border-bottom: 1px solid #e8edf3; }
  .cm-detail-tabs button { border-radius: 0; font-size: 15px; min-height: 44px; }
  .cm-profile-body, .cm-follow-up-body { padding: 0 16px max(80px, env(safe-area-inset-bottom)); overflow: visible; min-height: 0; }
  .cm-profile-body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .cm-profile-head .cm-phone-edit-entry:not([hidden]) { display: block; margin-left: auto; min-height: 36px; padding: 0 4px; border: 0; background: #fff; color: #405c98; font: 500 13px "Microsoft YaHei", sans-serif; cursor: pointer; }
  .cm-inquiry-page:has([data-cm-detail-panel="profile"][hidden]) .cm-phone-edit-entry { display: none !important; }
  .cm-follow-up-body { display: block; }
  /* POST-292: four natural Chinese glyphs, same type size as values, two-em separation. */
  .cm-phone-profile-list { display: block; margin: 0; color: #293445; font-size: 16px; line-height: 1.5; }
  .cm-phone-profile-list > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; padding: 0; border-bottom: 1px solid #e8edf3; background: #eef3f8; }
  .cm-phone-profile-list .cm-value-empty { font-size: inherit; color: #a1a9b4; }
  .cm-phone-profile-list dt { display: flex; justify-content: flex-end; align-items: flex-start; box-sizing: border-box; padding: 8px 12px 8px 20px; text-align: right; font-size: 16px; color: #60718b; background: #eef3f8; }
  .cm-phone-icon-slot { display: inline-flex; flex: 0 0 17px; width: 17px; height: 17px; align-items: center; }
  .cm-phone-form-label { display: flex; justify-content: flex-end; width: 100%; text-align: right; white-space: nowrap; }
  /* POST-291: remove only profile-label icons and their space, not upload/list icons. */
  .cm-phone-profile-list dt > .cm-phone-icon-slot,
  .cm-phone-form-label > .cm-phone-icon-slot { display: none; }
  .cm-phone-profile-list dt > span:last-child,
  .cm-phone-form-label > span:last-child { display: block; flex: 0 0 auto; width: max-content; margin: 0; letter-spacing: normal; white-space: nowrap; text-align: right; text-align-last: right; }
  /* POST-289: align actual Chinese glyph edges without inserting spaces into labels. */
  .cm-phone-profile-list dt > .cm-phone-label-spread:last-child,
  .cm-phone-form-label > .cm-phone-label-spread:last-child { width: 4em; text-align: justify; text-align-last: justify; white-space: normal; }
  /* POST-297: justify the displayed ID label only; keep the actual ID untouched. */
  .cm-phone-profile-list [data-cm-phone-profile-row="memberId"] dt > span:last-child,
  .is-profile-editing th:has(+ td [data-cm-profile-field="memberId"]) .cm-phone-form-label > span:last-child { width: 4em; text-align: justify; text-align-last: justify; white-space: normal; }
  .cm-profile-legacy-label { display: none; }
  .cm-contact-icon { flex: 0 0 17px; width: 17px; height: 17px; fill: none; stroke: #7285a4; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .cm-value-empty { color: #9aa3af; }
  .cm-phone-profile-list dd { margin: 0; padding: 8px 0; min-width: 0; text-align: left; overflow-wrap: anywhere; background: #fff; }
  .cm-phone-profile-list [data-cm-phone-profile-row="memberId"] dd { display: flex; align-items: baseline; gap: 8px; }
  .cm-phone-profile-list [data-cm-phone-profile-row="memberId"] dd > span { min-width: 0; }
  .cm-phone-profile-list [data-cm-phone-profile-edit] { flex: 0 0 auto; display: inline-block; margin: 0; padding: 0 5px; }
  .cm-phone-profile-list [data-cm-phone-profile-edit][hidden] { display: none; }
  .cm-phone-profile-list dd > span { white-space: pre-wrap; }
  .cm-phone-profile-list button { display: block; margin-top: 6px; min-height: 32px; padding: 0; border: 0; background: #fff; color: #4867a1; font: 13px "Microsoft YaHei", sans-serif; }
  .cm-phone-profile-actions:not([hidden]) {
    display: flex; justify-content: flex-end; gap: 4px; padding: 0; margin-left: auto;
    z-index: 2; background: #fff;
  }
  .cm-profile-body > .cm-phone-profile-actions:not([hidden]) { position: static; display: flex; justify-content: flex-end; gap: 12px; padding: 16px 0 0; margin: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
  .cm-profile-body > .cm-phone-profile-actions button { min-width: 88px; min-height: 42px; border: 1px solid #a8bad7; border-radius: 5px; }
  .cm-phone-profile-actions button {
    min-height: 36px; min-width: 36px; padding: 0 6px; border: 0;
    border-radius: 4px; background: #fff; color: #405c98; font: 600 14px "Microsoft YaHei", sans-serif;
    cursor: pointer;
  }
  .cm-phone-profile-actions [data-cm-phone-profile-save] { background: #4867a1; border-color: #4867a1; color: #fff; }
  .cm-phone-profile-actions button:disabled { opacity: .5; cursor: default; }
  .cm-phone-profile-actions button[hidden] { display: none; }
  .is-profile-editing .cm-phone-profile-list { display: none; }
  .is-profile-editing .cm-profile-body > .cm-profile-table-scroll { display: block; width: 100%; border: 0; }
  .is-profile-editing .cm-profile-table { display: block; width: 100%; min-width: 0; }
  .is-profile-editing .cm-profile-table colgroup { display: none; }
  .is-profile-editing .cm-profile-table tbody { display: block; }
  .is-profile-editing .cm-profile-table tbody tr { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0 20px; background: #eef3f8; }
  .is-profile-editing .cm-profile-table tbody th,
  .is-profile-editing .cm-profile-table tbody td { width: auto; min-width: 0; height: auto; padding: 6px 0; border: 0; background: #fff; }
  .is-profile-editing .cm-profile-table tbody tr:last-child > * { border-bottom: 0; }
  .is-profile-editing .cm-profile-table tbody th { display: flex; box-sizing: border-box; padding: 6px 12px 6px 20px; justify-content: flex-end; align-items: center; background: #eef3f8; color: #60718b; font: 400 16px/1.5 "Microsoft YaHei", sans-serif; text-align: right; }
  .is-profile-editing .cm-profile-table input,
  .is-profile-editing .cm-profile-table textarea {
    box-sizing: border-box; min-width: 0; min-height: 40px; font: 16px/1.5 "Microsoft YaHei", sans-serif;
    border-color: #cbd6e5; background: #fff; color: #293445;
  }
  .is-profile-editing .cm-profile-table input::placeholder,
  .is-profile-editing .cm-profile-table textarea::placeholder { color: #a1a9b4; opacity: 1; }
  .is-profile-editing .cm-profile-table input:disabled { background: #f2f5f9; }
  .is-profile-editing .cm-profile-account-line { grid-template-columns: minmax(0, 1fr); }
  .is-profile-editing .cm-profile-account-box { display: block; grid-column: 1; grid-row: 1; }
  /* POST-294: keep the upload hit area inside the right edge, clear of account text. */
  .is-profile-editing .cm-profile-account-box input { padding-left: 6px; padding-right: 44px; }
  .is-profile-editing .cm-profile-image-icon { grid-column: 1; grid-row: 1; justify-self: end; margin-right: 2px; z-index: 1; }
  .is-profile-editing .cm-profile-image-icon { display: inline-grid; width: 36px; height: 36px; border: 0; background: transparent; }
  .is-profile-editing .cm-profile-image-icon svg { width: 24px; height: 24px; }
  .is-profile-editing .cm-profile-thumb-button { grid-column: 1 / -1; justify-self: start; }
  .cm-phone-followups { display: block; }
  .cm-phone-followup-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
  .cm-phone-followup-heading button { min-height: 36px; padding: 0 10px; }
  .is-followup-page .cm-phone-detail-overview, .is-followup-page .cm-detail-tabs,
  .is-followup-page .cm-phone-followups { display: none; }
  .is-followup-page .cm-follow-up-form:not([hidden]) { display: block; width: 100%; min-width: 0; border: 0; margin: 0; padding: 0; }
  .is-followup-page .cm-follow-up-form > header { display: none; }
  .is-followup-page .cm-follow-up-fields { display: flex; flex-direction: column; gap: 16px; padding: 12px 0; }
  .is-followup-page .cm-follow-up-fields > * { width: 100%; min-width: 0; margin: 0; }
  .is-followup-page .cm-follow-up-fields label { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  .is-followup-page .cm-follow-up-fields label > span { font-size: 13px; font-weight: 500; }
  .is-followup-page [data-cm-follow-up-field] { width: 100%; min-width: 0; min-height: 44px; box-sizing: border-box; font: 16px/1.5 "Microsoft YaHei", sans-serif; padding: 8px; }
  .is-followup-page .cm-follow-up-fields > label:nth-child(3) { order: 5; }
  .is-followup-page .cm-follow-up-evidence-hint { display: none; }
  .is-followup-page .cm-follow-up-submit { order: 7; display: flex; gap: 12px; justify-content: flex-end; padding-top: 6px; }
  .is-followup-page .cm-follow-up-submit button { min-width: 88px; min-height: 44px; font-size: 15px; }
  .is-followup-page .cm-follow-up-screenshot { padding: 14px 10px; }
  .is-followup-page .cm-follow-up-upload-content { flex-wrap: wrap; gap: 10px; }
  .is-followup-page .cm-follow-up-paste-zone { display: none; }
  .cm-phone-history-caption { color: #8a94a1; font-size: 12px; margin: 13px 0; }
  .cm-phone-followups:has(.cm-phone-empty) .cm-phone-history-caption { display: none; }
  .cm-phone-followups .cm-phone-empty { padding: 28px 0; }
  .cm-phone-followups ol { list-style: none; margin: 0; padding: 0 0 0 8px; }
  .cm-phone-followup { position: relative; margin: 0; padding: 0 0 24px 20px; border-left: 1px solid #e0e6ee; overflow-wrap: anywhere; color: #293445; font-size: 14px; line-height: 1.7; }
  .cm-phone-followup::before { content: ""; position: absolute; left: -5px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #6181ba; box-shadow: 0 0 0 4px #eef3fc; }
  .cm-phone-followup:last-child { border-left-color: transparent; }
  .cm-phone-followup time { display: block; margin-bottom: 5px; font-size: 12px; color: #84909e; }
  .cm-phone-followup-meta { display: flex; gap: 8px; flex-wrap: wrap; }
  .cm-phone-followup-meta span { color: #728093; font-size: 12px; }
  .cm-phone-followup-content { margin: 8px 0; white-space: pre-wrap; }
  .cm-phone-followup dl { margin: 0; color: #728093; font-size: 13px; }
  .cm-phone-followup dl > div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 6px; margin-top: 5px; }
  .cm-phone-followup dt { font-weight: 400; }
  .cm-phone-followup dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
}

@media (max-height: 620px) {
  .cm-workbook { min-height: 260px; }
}

/* POST-280: desktop/tablet profile form. Phone viewing/editing stays on its existing layout. */
.cm-profile-form-label, .cm-profile-view-value { display: none; }
.cm-account-paste { display: none; }
@media (min-width: 681px) and (min-height: 501px), (min-width: 961px), (min-width: 681px) and (pointer: fine) { body:not(.mobile-phone) .cm-phone-form-label { display: none; } }
.cm-profile-table tr[hidden] { display: none !important; }
@media (min-width: 681px) and (min-height: 501px), (min-width: 961px), (min-width: 681px) and (pointer: fine) {
  body:not(.mobile-phone) .cm-profile-table-scroll { border: 1px solid #c5d1e5; border-radius: 8px; padding: 18px; box-sizing: border-box; }
  body:not(.mobile-phone) .cm-profile-table,
  body:not(.mobile-phone) .cm-profile-table tbody { display: block; }
  body:not(.mobile-phone) .cm-profile-table colgroup,
  body:not(.mobile-phone) .cm-profile-table th { display: none; }
  body:not(.mobile-phone) .cm-profile-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 16px; }
  body:not(.mobile-phone) .cm-profile-table tr:last-child { margin-bottom: 0; }
  body:not(.mobile-phone) .cm-profile-table td { display: block; min-width: 0; min-height: 0; padding: 0; border: 0; }
  body:not(.mobile-phone) .cm-profile-table td[colspan] { grid-column: 1 / -1; }
  body:not(.mobile-phone) .cm-profile-form-label { display: flex; align-items: center; gap: 5px; margin: 0 0 6px; font: 700 var(--st-body-font)/1.5 var(--st-font-family); color: #60718b; white-space: nowrap; letter-spacing: normal; }
  body:not(.mobile-phone) .cm-profile-form-label .cm-contact-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  body:not(.mobile-phone) .cm-profile-table input:not([type="file"]),
  body:not(.mobile-phone) .cm-profile-table textarea { min-height: 34px; padding: 6px 8px; border: 1px solid #b8c7dd; border-radius: 5px; background: #fff; box-sizing: border-box; }
  body:not(.mobile-phone) .cm-profile-table input:disabled,
  body:not(.mobile-phone) .cm-profile-table textarea:disabled { background: #f2f5f9; }
  body:not(.mobile-phone) .cm-profile-account-line { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
  body:not(.mobile-phone) .cm-profile-control { gap: 4px; }
  body:not(.mobile-phone) .is-profile-editing .cm-profile-account-box { display: block; }
  body:not(.mobile-phone) .is-profile-editing .cm-profile-account-box input { height: 52px; padding-bottom: 23px; }
  body:not(.mobile-phone) .is-profile-editing .cm-account-paste { position: absolute; display: block; left: 8px; right: 8px; bottom: 5px; min-height: 15px; padding: 0; border: 0; color: #84909e; font-size: 10px; line-height: 15px; white-space: nowrap; overflow: hidden; }
  body:not(.mobile-phone) .cm-account-paste:empty::before { content: attr(data-placeholder); pointer-events: none; }
  body:not(.mobile-phone) .cm-account-paste:focus { outline: 1px solid #7896c8; }
  body:not(.mobile-phone) .cm-profile-channel.is-dragging { outline: 2px dashed #7896c8; background: #f2f6fc; }
  body:not(.mobile-phone) .cm-profile-view-value { min-width: 0; min-height: 34px; padding: 6px 8px; line-height: var(--st-body-line); white-space: pre-wrap; overflow-wrap: anywhere; box-sizing: border-box; border-radius: 5px; }
  body:not(.mobile-phone) .cm-profile-view-value.is-empty { color: #8b97a7; }
  body:not(.mobile-phone) .cm-profile-view-value.is-locked { background: #f2f5f9; color: #5f6f84; }
  body:not(.mobile-phone) [data-cm-profile-modal]:not(.is-profile-editing) .cm-profile-view-value { display: block; }
  body:not(.mobile-phone) [data-cm-profile-modal]:not(.is-profile-editing) .cm-profile-table input,
  body:not(.mobile-phone) [data-cm-profile-modal]:not(.is-profile-editing) .cm-profile-table textarea,
  body:not(.mobile-phone) [data-cm-profile-modal]:not(.is-profile-editing) .cm-profile-image-icon { display: none; }
}

/* POST-294: desktop only; touch tablet layout keeps its existing account row. */
@media (min-width: 681px) and (pointer: fine) {
  body:not(.mobile-phone):not(.mobile-tablet) .is-profile-editing .cm-profile-account-line { grid-template-columns: minmax(0, 1fr) auto; }
  body:not(.mobile-phone):not(.mobile-tablet) .is-profile-editing .cm-profile-account-box { grid-column: 1; grid-row: 1; }
  body:not(.mobile-phone):not(.mobile-tablet) .is-profile-editing .cm-profile-image-icon { grid-column: 1; grid-row: 1; justify-self: end; margin-right: 8px; width: 32px; height: 32px; z-index: 1; }
  body:not(.mobile-phone):not(.mobile-tablet) .is-profile-editing .cm-profile-account-box input { padding-right: 48px; }
  body:not(.mobile-phone):not(.mobile-tablet) .is-profile-editing .cm-account-paste { right: 48px; }
  body:not(.mobile-phone):not(.mobile-tablet) .is-profile-editing .cm-profile-thumb-button { grid-column: 2; grid-row: 1; }
}
/* POST-299: desktop-only tag management; no permanent button or new table column. */
.cm-tag-menu[hidden], .cm-tag-dialog[hidden] { display:none !important; }
.cm-tag-menu { position:fixed; z-index:1200; padding:4px; background:#fff; border:1px solid #c8d3e6; border-radius:6px; box-shadow:0 6px 20px #253d6526; }
.cm-tag-menu button { border:0; background:white; color:#3d568e; font:14px "Microsoft YaHei",sans-serif; padding:8px 14px; cursor:pointer; }
.cm-tag-menu button:hover, .cm-tag-menu button:focus-visible { background:#edf2fb; }
.cm-tag-dialog { position:fixed; inset:0; z-index:1210; display:flex; align-items:center; justify-content:center; padding:16px; background:#25344b55; }
.cm-tag-card { width:380px; max-width:100%; max-height:calc(100dvh - 32px); overflow:auto; padding:18px; border:1px solid #c8d3e6; border-radius:10px; background:#fff; color:#293445; box-shadow:0 10px 32px #23355030; font:14px "Microsoft YaHei",sans-serif; }
.cm-tag-card header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.cm-tag-card h3 { margin:0; font-size:16px; color:#3d568e; }
.cm-tag-card header span { color:#7a8799; font-size:12px; }
.cm-tag-edit-list { max-height:45vh; overflow:auto; }
.cm-tag-edit-row { margin-bottom:8px; }
.cm-tag-edit-row input { box-sizing:border-box; width:100%; height:34px; padding:5px 9px; border:1px solid #c8d3e6; border-radius:5px; color:#293445; font:inherit; }
.cm-tag-card button { min-height:32px; padding:5px 14px; border:1px solid #8ea3d0; border-radius:5px; background:#fff; color:#3d568e; font:inherit; cursor:pointer; }
.cm-tag-card button:disabled { opacity:.5; cursor:default; }
.cm-tag-card .primary { background:#526db0; color:#fff; }
.cm-tag-card .cm-tag-add { width:100%; border-style:dashed; }
.cm-tag-card footer { display:flex; justify-content:flex-end; gap:10px; }
.cm-tag-error { margin:10px 0; color:#af3945; font-size:12px; overflow-wrap:anywhere; }
.cm-tag-conflict { display:block; margin-top:4px; font-size:12px; color:#97651e; overflow-wrap:anywhere; }
.cm-tag-conflict button { padding:2px 6px; min-height:26px; font-size:12px; }
.cm-contact-match-hint { margin: 0 0 8px; padding: 7px 10px; border: 1px solid #d8e5f5; border-radius: 6px; background: #f5f9ff; color: #526783; font-size: 12px; line-height: 1.5; }
.cm-profile-history{padding:14px 18px;overflow:auto;min-height:0;color:#42526a}.cm-profile-history>p{margin:0 0 12px;color:#738199;font-size:12px}.cm-profile-history-list{display:grid;gap:10px}.cm-profile-history-list article{border:1px solid #d7dfec;border-radius:8px;background:#fff;overflow:hidden}.cm-profile-history-list header{display:flex;align-items:center;gap:12px;padding:9px 12px;background:#f3f6fb;font-size:12px}.cm-profile-history-list header time{margin-left:auto;color:#718096}.cm-profile-history-list header em{font-style:normal;color:#3f5f9e}.cm-profile-history-list ul{list-style:none;margin:0;padding:4px 12px}.cm-profile-history-list li{display:grid;grid-template-columns:minmax(88px,140px) minmax(0,1fr) 20px minmax(0,1fr);gap:8px;align-items:start;padding:7px 0;border-bottom:1px solid #edf1f6;font-size:12px;word-break:break-word}.cm-profile-history-list li:last-child{border-bottom:0}.cm-profile-history-list li i{text-align:center;font-style:normal;color:#8b96a8}.cm-profile-history-empty{padding:24px;text-align:center}
.cm-profile-history-link{display:block;width:max-content;margin:10px 2px 2px;color:#355da8;font-size:13px;text-decoration:underline;text-underline-offset:2px}.cm-profile-history-link:hover{color:#244b91}.cm-profile-history-link:focus-visible{outline:2px solid #7897d1;outline-offset:2px}
.cm-profile-history-link[hidden]{display:none}
@media (max-width:680px){.cm-profile-history{padding:10px}.cm-profile-history-list header{flex-wrap:wrap}.cm-profile-history-list header time{margin-left:0}.cm-profile-history-list li{grid-template-columns:90px minmax(0,1fr)}.cm-profile-history-list li i{display:none}.cm-profile-history-list li span:last-child{grid-column:2}}
